home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_02
/
1002014b
< prev
next >
Wrap
Text File
|
1991-12-17
|
323b
|
16 lines
Listing 2 -- the file rename.c
/* rename function -- UNIX version */
#include "xstdio.h"
/* UNIX system calls */
int _Link(const char *, const char *);
int _Unlink(const char *);
int (rename)(const char *old, const char *new)
{ /* rename a file */
return (_Link(old, new) ? -1 : _Unlink(old));
}