From 8174a918ea3b7cb216bf7ea98cfdc10661b5c37d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 6 May 2020 16:56:32 +0200 Subject: make the whole project more python idiomatic * rename src directory to allocbench * make global variable names UPPERCASE * format a lot of code using yapf * use lowercase ld_preload and ld_library_path as Allocator members * name expected Errors 'err' and don't raise a new Exception * disable some pylint messages --- src/benchmarks/espresso/getopt.c | 45 ---------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/benchmarks/espresso/getopt.c (limited to 'src/benchmarks/espresso/getopt.c') diff --git a/src/benchmarks/espresso/getopt.c b/src/benchmarks/espresso/getopt.c deleted file mode 100644 index 017c907..0000000 --- a/src/benchmarks/espresso/getopt.c +++ /dev/null @@ -1,45 +0,0 @@ -#include "espresso.h" -#include "port.h" -/* File : getopt.c - Author : Henry Spencer, University of Toronto - Updated: 28 April 1984 - Purpose: get option letter from argv. -*/ -#define NullS ((char *) 0) - -char *optarg; /* Global argument pointer. */ -int optind = 0; /* Global argv index. */ - -int getopt(int argc, char * const * argv, const char * optstring) - { - register int c; - register char *place; - static char *scan = NullS; /* Private scan pointer. */ - - optarg = NullS; - - if (scan == NullS || *scan == '\0') { - if (optind == 0) optind++; - if (optind >= argc) return EOF; - place = argv[optind]; - if (place[0] != '-' || place[1] == '\0') return EOF; - optind++; - if (place[1] == '-' && place[2] == '\0') return EOF; - scan = place+1; - } - - c = *scan++; - place = strchr(optstring, c); - if (place == NullS || c == ':') { - fprintf(stderr, "%s: unknown option %c\n", argv[0], c); - return '?'; - } - if (*++place == ':') { - if (*scan != '\0') { - optarg = scan, scan = NullS; - } else { - optarg = argv[optind], optind++; - } - } - return c; - } -- cgit v1.2.3