projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include config.h.
[gnulib.git]
/
lib
/
argmatch.c
diff --git
a/lib/argmatch.c
b/lib/argmatch.c
index
f3f1a50
..
d632890
100644
(file)
--- a/
lib/argmatch.c
+++ b/
lib/argmatch.c
@@
-17,6
+17,12
@@
/* Written by David MacKenzie <djm@ai.mit.edu> */
/* 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>
#include <stdio.h>
#ifdef STDC_HEADERS
#include <string.h>
@@
-35,12
+41,12
@@
argmatch (arg, optlist)
char **optlist;
{
int i; /* Temporary index in OPTLIST. */
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). */
int matchind = -1; /* Index of first nonexact match. */
int ambiguous = 0; /* If nonzero, multiple nonexact match(es). */
-
+
arglen = strlen (arg);
arglen = strlen (arg);
-
+
/* Test all elements for either exact match or abbreviated matches. */
for (i = 0; optlist[i]; i++)
{
/* Test all elements for either exact match or abbreviated matches. */
for (i = 0; optlist[i]; i++)
{