break ; case STS_NOTFOUND: tederror("Failed to open the file") ; prsys_error() ; status = 0 ; break ; } } } return( status ) ; } #if VAXVMS static char *old_source[10] = { 0,0,0,0,0,0,0,0,0,0 }; static char *old_infile[10] = { 0,0,0,0,0,0,0,0,0,0 }; static int dir_level = 0 ; static donextfile() { extern char *infile[], insource[] ; char temp[_FILESIZE+20], *cp, *dp, *fp ; extern int dirindex ; int vm_base[2], vm_size, res, sts ; if ((sts = __donextfile()) == NEXT_OK && isdirectory(infile[0])) then { *( dp = temp ) = 0 ; cp = infile[0] ; while ( *cp && !( *cp == ']' || *cp == '>' ) ) *dp++ = *cp++ ; *dp++ = '.' ; if (*cp) cp++ ; while ( *cp && *cp != '.' ) *dp++ = *cp++ ; *dp = 0 ; strcat(dp,"]*.*") ; vm_size = _FILESIZE*2 ; if ( ( lib$get_vm(&vm_size,&vm_base[0]) & 1 ) && ( lib$get_vm(&vm_size,&vm_base[1]) & 1 ) ) then { old_source[dir_level] = vm_base[0] ; old_infile[dir_level] = vm_base[1] ; strcpy(old_source[dir_level],insource) ; strcpy(old_infile[dir_level++],infile[0]) ; } ; strcpy(insource,temp) ; dirindex = 0 ; return( sts = donextfile() ) ; } else { if ( sts == NEXT_NMF && dir_level ) then { fp = infile[0] ; strcpy(insource,old_source[--dir_level]) ; strcpy(fp,old_infile[dir_level]) ; printf("No more files in subdirectory\n\n") ; dirindex = 0 ; while ( (res=getnext(fp,insource,dirindex))==NEXT_OK && strcmp(old_infile[dir_level],fp) != 0 ) dirindex++ ; if ( res == NEXT_OK ) then return( sts = donextfile() ) ; else { dirindex = 0 ; return( sts = donextfile() ) ; } ; } else return( sts ) ; } ; } #else static donextfile() { return( __donextfile() ) ; } static isdirectory(f) char *f ; { return(0) ; } #endif static __donextfile() { extern char *infile[], insource[] ; extern int dirindex, waswild ; char ans[10],s[_FILESIZE+10] ; register int done,res,status ; extern int nxtwdi, nxtwcc ; done = 0 ; while ( (done = (testcc() != 0) ? -1:done) == 0 && (res=getnext(infile[0],insource,dirindex)) == NEXT_OK ) { strcpy(s,"Edit ") ; strcpy(&s[strlen(s)],infile[0]) ; strcpy(&s[strlen(s)]," ? ") ; status = getprm(ans,s,10) ; if ( status == 0 ) then ans[0] = 'Q' ; if ( ans[0] == CR ) then ans[0] = 'N' ; done = 0 ; switch( tolower(ans[0]) ) { case 'q': done = -1 ; break ; case 'y': done = 1 ; break ; case 'n': dirindex++ ; break ; case 'b': if ( dirindex > 0 ) then dirindex-- ; break ; case 't': dirindex = 0 ; break ; case 's': status=getprm(insource,"Input file ? ",_FILESIZE) ; insource[trimjunk(insource,status)] = 0 ; if ( (waswild=iswild( insource )) == 0 ) then { strcpy(infile[0],insource) ; insource[0] = 0 ; done = 1 ; } if ( status == 0 ) then done = -1 ; else dirindex = 0 ; break ; } } if ( res == NEXT_NMF ) then done = 2 ; switch(done) { case 2: status = NEXT_NMF ; break ; case 1: status = NEXT_OK ; break ; case 0: status = NEXT_FAILURE ; break ; case -1: status = NEXT_CONTROLC ; break ; } return(status) ; } #if RSX static loading() { } #endif static doopen(s) char *s ; { register int openstatus, iflstatus ; extern int filesize,infisize,inlun,*maxline ; extern int termtype ; #if VAXVMS extern int loading() ; #endif setmbc() ; if ( (openstatus = openfi(s,inlun)) == sys_normal ) then { saveprotection() ; savefilename(s) ; infisize = filesize ; termtype = inqtermtype() ; settimerast(10,loading) ; iflstatus = ifl(inlun) ; cantimerast() ; closef( inlun ) ; clrmbc() ; if ( ifl_error(iflstatus) == 0 ) then return( STS_FATAL ) ; else return( STS_FOUND ) ; } clrmbc() ; return( STS_NOTFOUND ) ; } stEDSTARC [.050036]EDSTAR.C [.050036]    X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddfatic ifl_error(sts) int sts ; { if ( sts != sys_normal ) then { tederror("?Fatal workfile initialization error") ; tederror("?Please check for sufficient free disk space"); return(0) ; } else return(1) ; } static doswitches(s) char *s ; { extern struct fswitch inswitch ; inswitch.casexl = 0 ; inswitch.create = 0 ; inswitch.journal= 0 ; inswitch.recover= 0 ; inswitch.tabxl = 0 ; inswitch.page = 0 ; inswitch.casetabxl = 0 ; while ( *s != 0 ) { while ( ! ( *s == 0 || *s == '/' ) ) s++ ; if ( *s++ != 0 ) then switch (*s++) { case 'c': case 'C': if (*s == 'r' || *s == 'R') then inswitch.create = 1 ; else inswitch.casexl = 1 ; break ; case 'j': case 'J': inswitch.journal = 1 ; break ; case 'p': case 'P': inswitch.page = getval(s) ; xprintf("%d\n",inswitch.page); break ; case 'r': case 'R': inswitch.recover = 1 ; break ; case 't': case 'T': inswitch.tabxl = 1 ; break ; case 'x': case 'X': inswitch.tabxl = 1 ; inswitch.casexl = 1 ; inswitch.casetabxl = 1 ; break ; default: break ; } /* end case */ } /* end while */ return( sys_normal ) ; } static getval(s) char *s ; { register int res ; register char ch ; res = 0 ; while (*s != 0 && *s++ != ':') ; while (*s != 0 && isdigit( (ch = *s++) ) ) res = 10*res + (ch - '0') ; return(res) ; }