adapted to the system(3L) interface

This commit is contained in:
erikb
1986-03-25 10:39:23 +00:00
parent 0e39681621
commit 1afbf0e20f
12 changed files with 137 additions and 140 deletions

View File

@@ -5,7 +5,7 @@
#include "use_tmp.h"
#include "botch_free.h"
#include "system.h"
#include <system.h>
#include "alloc.h"
#include "Lpars.h"
#include "arith.h"
@@ -267,22 +267,19 @@ unstack_world()
list is generated.
*/
extern char *nmlist; /* BAH! -- main.c */
static int nfd;
static File *nfp = 0;
open_name_list()
{
if (nmlist) {
if ((nfd = sys_creat(nmlist, 0644)) < 0) {
fatal("cannot create namelist %s", nmlist);
}
}
if (nmlist && sys_open(nmlist, OP_WRITE, &nfp) == 0)
fatal("cannot create namelist %s", nmlist);
}
namelist(nm)
char *nm;
{
if (nmlist) {
sys_write(nfd, nm, strlen(nm));
sys_write(nfd, "\n", 1);
sys_write(nfp, nm, strlen(nm));
sys_write(nfp, "\n", 1);
}
}