changeset 422:3c2a459abb69

(argmatch): Include sys/types.h and declare length argument with type size_t.
author Jim Meyering <jim@meyering.net>
date Sat, 13 May 1995 12:55:49 +0000
parents 24a13fb1b0c5
children 78a1b4521806
files lib/argmatch.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/argmatch.c
+++ b/lib/argmatch.c
@@ -17,6 +17,12 @@
 
 /* Written by David MacKenzie <djm@ai.mit.edu> */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <sys/types.h>
+
 #include <stdio.h>
 #ifdef STDC_HEADERS
 #include <string.h>
@@ -35,12 +41,12 @@
      char **optlist;
 {
   int i;			/* Temporary index in OPTLIST.  */
-  int arglen;			/* Length of ARG.  */
+  size_t arglen;		/* Length of ARG.  */
   int matchind = -1;		/* Index of first nonexact match.  */
   int ambiguous = 0;		/* If nonzero, multiple nonexact match(es).  */
-  
+
   arglen = strlen (arg);
-  
+
   /* Test all elements for either exact match or abbreviated matches.  */
   for (i = 0; optlist[i]; i++)
     {