From 2c64fb221a265f9e7fc93374906b1e7540377561 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 3 Oct 1998 05:39:55 +0000 Subject: Checkpoint changes. Bug fixes, mostly. --- ar.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'ar.c') 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; -- cgit v1.2.3