some fixes: calloc was wrong; catch traps, and let divides

by 0 generate a signal, if on a unix machine
This commit is contained in:
ceriel
1989-02-20 18:01:33 +00:00
parent 8aee01de95
commit 30959cd73f
3 changed files with 44 additions and 1 deletions

View File

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