=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/fileio.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/mg/fileio.c 2000/02/25 19:13:21 1.3 +++ src/usr.bin/mg/fileio.c 2000/02/26 23:22:44 1.4 @@ -1,5 +1,5 @@ /* - * sys V fileio.c + * POSIX fileio.c */ #include "def.h" @@ -304,9 +304,6 @@ #ifndef NO_STARTUP #include -#ifndef F_OK -#define F_OK 04 /* for stupid Sys V */ -#endif /* * Find a startup file for the user and return its name. As a service @@ -348,6 +345,7 @@ #endif #ifndef NO_DIRED +#include #include "kbd.h" /* @@ -437,43 +435,6 @@ bcopy(&lp->l_text[56], cp, llength(lp) - 56); cp[llength(lp) - 56] = '\0'; return lgetc(lp, 2) == 'd'; -} - -/* - * I, a System V novice, could only figure out how to do unlinkdir() - * and rename() as exec's of the appropriate functions. So sue me. - * --Stephen Walton, December 1987 - */ - -unlinkdir(f) -char *f; -{ - int status, pid, wpid; - - if ((pid = fork()) == 0) - execl("/bin/rmdir", "rmdir", f, (char *)NULL); - else if (pid > 0) - while ((wpid = wait(&status)) && wpid != pid) - ; - else - return FALSE; - return status == 0; -} - -Xrename(f1, f2) -char *f1, *f2; -{ - - int status, pid, wpid; - - if ((pid = fork()) == 0) - execl("/bin/mv", "mv", f1, f2, (char *)NULL); - else if (pid > 0) - while ((wpid = wait(&status)) && wpid != pid) - ; - else - return FALSE; - return status == 0; } #endif NO_DIRED