Move some code (including the optional objects) into libwsutil
[obnox/wireshark/wip.git] / wsutil / wsgetopt.h
similarity index 97%
rename from wsgetopt.h
rename to wsutil/wsgetopt.h
index e22c634bcc6041c7aa4558cb246cd28bade09503..8744bed10fa941cd1aef924e00895b7eac80df6c 100644 (file)
@@ -28,7 +28,7 @@ extern "C" {
    Also, when `ordering' is RETURN_IN_ORDER,
    each non-option ARGV-element is returned here.  */
 
-extern char *optarg;
+WS_VAR_IMPORT char *optarg;
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
@@ -42,16 +42,16 @@ extern char *optarg;
    Otherwise, `optind' communicates from one call to the next
    how much of ARGV has been scanned so far.  */
 
-extern int optind;
+WS_VAR_IMPORT int optind;
 
 /* Callers store zero here to inhibit the error message `getopt' prints
    for unrecognized options.  */
 
-extern int opterr;
+WS_VAR_IMPORT int opterr;
 
 /* Set to an option character which was unrecognized.  */
 
-extern int optopt;
+WS_VAR_IMPORT int optopt;
 
 /* Describe the long-named options requested by the application.
    The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector