a8846b3ca8a21370fa7512895d7eeb33e6096be2
[unix-history] / usr / src / bin / ls / util.c
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Michael Fischbein.
*
* %sccs.include.redist.c%
*/
#ifndef lint
static char sccsid[] = "@(#)util.c 8.1 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
#include <fts.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ls.h"
#include "extern.h"
void
prcopy(src, dest, len)
register char *src, *dest;
register int len;
{
register int ch;
while(len--) {
ch = *src++;
*dest++ = isprint(ch) ? ch : '?';
}
}
void
usage()
{
(void)fprintf(stderr, "usage: ls [-1ACFLRTacdfiklqrstu] [file ...]\n");
exit(1);
}