summaryrefslogtreecommitdiff
path: root/ar.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1998-10-03 05:39:55 +0000
committerPaul Smith <psmith@gnu.org>1998-10-03 05:39:55 +0000
commit2c64fb221a265f9e7fc93374906b1e7540377561 (patch)
tree4603a4b4e5ec9a6366e02f5ece9b6f6e9371084c /ar.c
parente90887e68aa6dfa8c91af7d3bb2d2799f5a51b5e (diff)
downloadgunmake-2c64fb221a265f9e7fc93374906b1e7540377561.tar.gz
Checkpoint changes. Bug fixes, mostly.
Diffstat (limited to 'ar.c')
-rw-r--r--ar.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/ar.c b/ar.c
index 7167dc3..04d7411 100644
--- a/ar.c
+++ b/ar.c
@@ -46,7 +46,7 @@ ar_name (name)
return 0;
if (p[1] == '(' && end[-1] == ')')
- fatal ("attempt to use unsupported feature: `%s'", name);
+ fatal (NILF, "attempt to use unsupported feature: `%s'", name);
return 1;
}
@@ -137,7 +137,7 @@ int
ar_touch (name)
char *name;
{
- error ("touch archive member is not available on VMS");
+ error (NILF, "touch archive member is not available on VMS");
return -1;
}
#else
@@ -169,22 +169,24 @@ ar_touch (name)
switch (ar_member_touch (arname, memname))
{
case -1:
- error ("touch: Archive `%s' does not exist", arname);
+ error (NILF, "touch: Archive `%s' does not exist", arname);
break;
case -2:
- error ("touch: `%s' is not a valid archive", arname);
+ error (NILF, "touch: `%s' is not a valid archive", arname);
break;
case -3:
perror_with_name ("touch: ", arname);
break;
case 1:
- error ("touch: Member `%s' does not exist in `%s'", memname, arname);
+ error (NILF,
+ "touch: Member `%s' does not exist in `%s'", memname, arname);
break;
case 0:
val = 0;
break;
default:
- error ("touch: Bad return code from ar_member_touch on `%s'", name);
+ error (NILF,
+ "touch: Bad return code from ar_member_touch on `%s'", name);
}
if (!arname_used)
@@ -233,15 +235,6 @@ ar_glob_match (desc, mem, truncated,
return 0L;
}
-/* Alphabetic sorting function for `qsort'. */
-
-static int
-ar_glob_alphacompare (a, b)
- char **a, **b;
-{
- return strcmp (*a, *b);
-}
-
/* Return nonzero if PATTERN contains any metacharacters.
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
static int
@@ -316,7 +309,7 @@ ar_glob (arname, member_pattern, size)
names[i++] = n->name;
/* Sort them alphabetically. */
- qsort ((char *) names, i, sizeof (*names), ar_glob_alphacompare);
+ qsort ((char *) names, i, sizeof (*names), alpha_compare);
/* Put them back into the chain in the sorted order. */
i = 0;