ratfor (1.0-15) getopt.c

Summary

 getopt.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

--- ratfor-1.0.orig/getopt.c
+++ ratfor-1.0/getopt.c
@@ -3,13 +3,14 @@
  */
 
 #include <stdio.h>
-#include <string.h>
 
 char	*optarg;	/* Global argument pointer. */
 int	optind77 = 0;	/* Global argv index. */
 
 static char	*scan = NULL;	/* Private scan pointer. */
 
+extern char	*index();
+
 int
 our_getopt(argc, argv, optstring)
 int argc;
@@ -37,7 +38,7 @@
 	}
 
 	c = *scan++;
-	place = strchr(optstring, (int) c);
+	place = index(optstring, c);
 
 	if (place == NULL || c == ':') {
 		fprintf(stderr, "%s: unknown option -%c\n", argv[0], c);