home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Borland Programmer's Resource
/
Borland_Programmers_Resource_CD_1995.iso
/
code
/
graphics
/
flilib
/
flisrc
/
jrename.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
|
1995-05-19
|
360 b
|
20 lines
#include "jlib.h"
/* Rename a file */
Boolean dos_rename (oldname, newname)
char *oldname, *newname;
{
union i86_regs reg;
reg.b.ah = 0x56;
reg.w.dx = i86_ptr_offset(oldname);
reg.w.ds = i86_ptr_seg(oldname);
reg.w.di = i86_ptr_offset(newname);
reg.w.es = i86_ptr_seg(newname);
if (i86_sysint(0x21,®,®)&1)
return(0);
return(1);
}