From c48799bb5c808ca954453329f1b00f6023c90110 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Thu, 10 Sep 2020 20:26:02 +0200 Subject: [PATCH] Remove windows/getopt Final commit that fixes https://gitlab.com/graphviz/graphviz/-/issues/1820. --- windows/getopt/CMakeLists.txt | 13 --- windows/getopt/getopt.c | 58 ------------ windows/getopt/getopt.h | 20 ---- windows/getopt/getopt.vcxproj | 128 -------------------------- windows/getopt/getopt.vcxproj.filters | 27 ------ 5 files changed, 246 deletions(-) delete mode 100644 windows/getopt/CMakeLists.txt delete mode 100644 windows/getopt/getopt.c delete mode 100644 windows/getopt/getopt.h delete mode 100644 windows/getopt/getopt.vcxproj delete mode 100644 windows/getopt/getopt.vcxproj.filters diff --git a/windows/getopt/CMakeLists.txt b/windows/getopt/CMakeLists.txt deleted file mode 100644 index 949311ec7..000000000 --- a/windows/getopt/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -if (NOT HAVE_GETOPT_H) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -add_library(getopt STATIC - # Header files - getopt.h - - # Source files - getopt.c -) - -endif (NOT HAVE_GETOPT_H) diff --git a/windows/getopt/getopt.c b/windows/getopt/getopt.c deleted file mode 100644 index 38dad46bb..000000000 --- a/windows/getopt/getopt.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include - -#define ERR(s, c) if(opterr) fprintf (stderr, "%s%s'%c'\n", argv[0], s, c) - -char *optarg; - -int optind = 1; -int optopt; -int opterr = 1; - - -int getopt(int argc, char *const *argv, const char *opts) -{ - static int sp = 1; - int c; - char *cp; - - if (sp == 1) { - if (optind >= argc || - argv[optind][0] != '-' || argv[optind][1] == '\0') - return(EOF); - else if (strcmp(argv[optind], "--") == 0) { - optind++; - return(EOF); - } - } - - optopt = c = argv[optind][sp]; - if (c == ':' || (cp = strchr(opts, c)) == 0) { - ERR(": illegal option -- ", c); - if (argv[optind][++sp] == '\0') { - optind++; - sp = 1; - } - return('?'); - } - if (*++cp == ':') { - if (argv[optind][sp + 1] != '\0') - optarg = &argv[optind++][sp + 1]; - else if (++optind >= argc) { - ERR(": option requires an argument -- ", c); - sp = 1; - return('?'); - } - else - optarg = argv[optind++]; - sp = 1; - } - else { - if (argv[optind][++sp] == '\0') { - sp = 1; - optind++; - } - optarg = 0; - } - return(c); -} diff --git a/windows/getopt/getopt.h b/windows/getopt/getopt.h deleted file mode 100644 index 6ef886d92..000000000 --- a/windows/getopt/getopt.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef GETOPT_H -#define GETOPT_H - -#ifdef __cplusplus -extern "C" { -#endif - -extern char *optarg; - -extern int optind; -extern int opterr; -extern int optopt; - -int getopt(int argc, char *const *argv, const char *opts); - -#ifdef __cplusplus -} -#endif - -#endif /* GETOPT_H */ diff --git a/windows/getopt/getopt.vcxproj b/windows/getopt/getopt.vcxproj deleted file mode 100644 index 5246c34aa..000000000 --- a/windows/getopt/getopt.vcxproj +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {65B7EE6E-6C9D-49CF-806C-86FB80FA6B05} - getopt - 10.0 - - - - StaticLibrary - true - v142 - MultiByte - - - StaticLibrary - false - v142 - true - MultiByte - - - StaticLibrary - true - v142 - MultiByte - - - StaticLibrary - false - v142 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - $(ProjectDir) - - - $(ProjectDir) - - - $(ProjectDir) - - - $(ProjectDir) - - - - Level4 - Disabled - - - - - Level4 - Disabled - - - - - Level4 - MaxSpeed - true - true - - - true - true - - - - - Level4 - MaxSpeed - true - true - - - true - true - - - - - - - - - - - - \ No newline at end of file diff --git a/windows/getopt/getopt.vcxproj.filters b/windows/getopt/getopt.vcxproj.filters deleted file mode 100644 index 972b6b5b3..000000000 --- a/windows/getopt/getopt.vcxproj.filters +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - - - Source Files - - - \ No newline at end of file -- 2.40.0