Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
/*
2
 * pANS stdio -- rename
3
 */
4
#include "iolib.h"
5
int rename(const char *old, const char *new){
6
	if(link((char *)old, (char *)new)<0) return -1;
7
	if(unlink((char *)old)<0){
8
		unlink((char *)new);
9
		return -1;
10
	}
11
	return 0;
12
}