Update of /cvsroot/monetdb/pathfinder/compiler
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv19623

Modified Files:
      Tag: XQuery_0-16
        win32_getopt.c 
Log Message:
- fix win32_getopt to work in posix compatible mode



Index: win32_getopt.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/win32_getopt.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- win32_getopt.c      1 Mar 2007 18:56:44 -0000       1.1.2.1
+++ win32_getopt.c      3 Mar 2007 09:51:12 -0000       1.1.2.2
@@ -64,18 +64,9 @@
 {
   static int charind=0;
   const char *s;
-  char mode, colon_mode;
+  char mode = '+', colon_mode = '+';
   int off = 0, opt = -1;
 
-  if(getenv("POSIXLY_CORRECT")) colon_mode = mode = '+';
-  else {
-    if((colon_mode = *opts) == ':') off ++;
-    if(((mode = opts[off]) == '+') || (mode == '-')) {
-      off++;
-      if((colon_mode != ':') && ((colon_mode = opts[off]) == ':'))
-        off ++;
-    }
-  }
   win32_optarg = 0;
   if(charind) {
     win32_optopt = argv[win32_optind][charind];
@@ -160,18 +151,9 @@
                      const struct option *longopts, int *longind,
                      int long_only)
 {
-  char mode, colon_mode = *shortopts;
+  char mode = '+', colon_mode = '+';
   int shortoff = 0, opt = -1;
 
-  if(getenv("POSIXLY_CORRECT")) colon_mode = mode = '+';
-  else {
-    if((colon_mode = *shortopts) == ':') shortoff ++;
-    if(((mode = shortopts[shortoff]) == '+') || (mode == '-')) {
-      shortoff++;
-      if((colon_mode != ':') && ((colon_mode = shortopts[shortoff]) == ':'))
-        shortoff ++;
-    }
-  }
   win32_optarg = 0;
   if((win32_optind >= argc) ||
       ((argv[win32_optind][0] == '-') &&


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to