server: use getopt

Mike McCormack mike at codeweavers.com
Thu Jun 8 20:45:26 CDT 2006


Anoni Moose wrote:
> This patch let's the server code use getopt to parse arguments. 

+    while ((optchr = getopt(argc, argv, "d:fhk:p:vw")) != -1 &&
+          optind < argc) {     /* 'Tis possible we might have a 
variable declaration... */
+
+        switch (optchr) {
+
              case 'd':
-                if (isdigit(argv[i][2])) debug_level = atoi( argv[i] + 2 );
+             if (isdigit(optarg[0])) debug_level = atoi( optarg );
                  else debug_level++;
                  break;

Using getopt() doesn't really gain us anything here.

Also, changing the indent and brace style to suit yourself (especially 
in wineserver) isn't appreciated.

Mike



More information about the wine-devel mailing list