SCCS-vsn: bin/ls/util.c 5.13
-static char sccsid[] = "@(#)util.c 5.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)util.c 5.13 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#include <sys/stat.h>
#endif /* not lint */
#include <sys/types.h>
#include <sys/stat.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <ctype.h>
#include <fts.h>
#include <ctype.h>
#include <fts.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "ls.h"
#include "extern.h"
#include "ls.h"
#include "extern.h"
(void)fprintf(stderr, "usage: ls [-1ACFLRTacdfiklqrstu] [file ...]\n");
exit(1);
}
(void)fprintf(stderr, "usage: ls [-1ACFLRTacdfiklqrstu] [file ...]\n");
exit(1);
}
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-void
-#if __STDC__
-err(int fatal, const char *fmt, ...)
-#else
-err(fatal, fmt, va_alist)
- int fatal;
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- (void)fprintf(stderr, "ls: ");
- (void)vfprintf(stderr, fmt, ap);
- va_end(ap);
- (void)fprintf(stderr, "\n");
- if (fatal)
- exit(1);
-}