/* Test system file name access */ #include main(argc,argv) int argc; char *argv[]; { char *fcb,*getfnx(),*getefcb(),*fn2a(),local[14]; int i,u; if(argc < 2) { printf("Print or set system file name.\n Syntax: %s n [filename]\n",fn2a(getefcb(),local)); exit(0); } /* convert file number to int */ sscanf(argv[1],"%d",&i); if(i<0 || i>4) { printf("Bad file number!\n"); exit(-1); } if(argc == 2) { strncpy(local,getfnx(i),12); } else { fcb = 0x5c; zsetfcb(fcb,argv[2],&u); strncpy(local,fcb+1,12); setfnx(i,local); } printf(" System file %d is %s\n",i,local); }