home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
unix
/
volume22
/
auth-utils
/
part01
/
util
/
rewind.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1990-04-29
|
320 b
|
18 lines
/* rewind version 1.0, 4/20/90. */
#include <sys/file.h>
#include <stdio.h>
main(argc,argv)
int argc;
char *argv[];
{
int fd;
if ((argc != 2) || (sscanf(argv[1],"%d",&fd) < 1))
{ fputs("Usage: rewind fd\n",stderr); exit(1); }
if (lseek(fd,0,0))
{ perror("rewind: fatal: cannot seek"); exit(2); }
exit(0);
}