ack/lang/cem/libcc/gen/rename.c

10 lines
132 B
C
Raw Normal View History

int
rename(from, to)
char *from, *to;
{
(void) unlink(to);
if (link(from, to) < 0) return -1;
(void) unlink(from);
return 0;
}