ent]++ ; } else { scwarning(w_lrnx) ; lrnmod = 0 ; } return(1) ; } vtlearn() { extern int lrnmod,macsize[],mactimes,maccurrent ; if ( mactimes ) then return(0) ; if ( lrnmod ) then { scwarning(w_lrno) ; lrnmod = 0 ; } else { scwarning(w_lrn) ; lrnmod = 1 ; macsize[maccurrent] = 0 ; } return(1) ; } doecmd() { extern int goldcount,goldk,rept ; register char thech ; goldk = 0 ; thech = getfuncommand() ; while ( goldk == 0 && rept >= 0 ) { funcommand( thech ) ; if ( testcc() ) then { noecho() ; scwarning( w_abort ) ; ref_screen() ; scloadline() ; break ; } if ( goldk == 0 ) then rept-- ; } if ( goldk == 0 ) then { goldcount = 0 ; rept = 0 ; } } #define ins_failure 0 #define ins_noecho 1 #define ins_normal 2 #define ins_noprint 3 static doinschar() { register int save1 ; register char ch ; register int status ; extern int noins, erasef, read_only ; extern char curch ; ch = curch ; save1 = noins ; if (isdelimiter(ch)) then status = docrlfin() ; else { if ( ch < SPACE && ch != TAB ) then status = doctlchar() ; else { status = dogoldletter() ; if ( status == 0 ) then { status = do_ins(ch) ; if ( ch == TAB ) then erasef = 1 ; } } } if ( status == ins_normal ) then { if ( no_echo == 0 ) then { if (erasef) then lkill() ; partdump() ; scmove() ; } erasef = 0 ; } noins = save1 ; return(1) ; } /* DOCRLFIN() */ /* */ /* Process a carriage return, line feed or form feed input */ static docrlfin() { register int null_line ; extern int chposition, read_only ; extern char curch ; if ( curch == LF ) then return (ins_normal) ; null_line = (atcrlf() && !(worklength == 1 && workbuffer[0] == FF)) ; if ( chposition == 0 && null_line == 0 ) then sclinsert(curch) ; else { if (null_line) then { creset() ; scunloadline() ; mvdown() ; sclinsert(curch) ; } else { if ( read_only == 0 ) then { sveoln(chposition) ; deleoln(chposition) ; lkill() ; scunloadline() ; mvdown() ; sclinsert(curch) ; findeoln() ; if (svlinsert(chposition) !=0) then retype() ; } } } return(ins_normal) ; } vtopenline() { register char savech ; register int oldcurline ; int oldchposition,oldcurposition ; oldcurposition = curposition ; oldchposition = chposition ; oldcurline = *curline ; savech = curch ; curch = CR ; docrlfin() ; scunloadline() ; curposition = oldcurposition ; chposition = oldchposition ; *curline = oldcurline ; curch = savech ; scloadline() ; scmove() ; return(1) ; } /* DOCTLCHAR() */ /* */ /* Process control character other than CR,LF,FF and TAB */ #define CTRLA 01 #define CTRLB 02 #define CTRLC 03 #define CTRLD 04 #define CTRLE 05 #define CTRLF 06 #define CTRLG 07 #define CTRLH 010 #define CTRLK 013 #define CTRLN 016 #define CTRLP 020 #define CTRLR 022 #define CTRLT 024 #define CTRLU 025 #define CTRLV 026 #define CTRLW 027 #define CTRLX 030 #define CTRLY 031 #define CTRLZ 032 #define CTRLBCK 034 static doctlchar() { register int status ; extern int goldcount,read_only,vt_status ; status = ins_noprint ; switch (curch) { case CTRLA: if ( w == 0 ) then vt_status = 0 ; else scwarning(w_winend) ; break ; case CTRLB: vtlastpage() ; break ; case CTRLD: vtdeleteline() ; break ; case CTRLE: execmacro() ; break ; case CTRLF: vtnxtword() ; break ; case CTRLG: if ( read_only == 0 ) then { puttxtsave(chposition) ; partdump() ; scmove() ; } break ; case CTRLH: if ( atcrlf() ) then vtboln() ; else vteoln() ; break ; case CTRLN: vtdorep() ; break ; case CTRLP: SCROOTC [.050036]SCROOT.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|bddf if ( ch == ESC ) then escprint = 1 ; if ( overwrite(ch) != ins_normal ) then while ( rept > 0 && worklength < maxlen ) { scxins(ch) ; if ( no_echo == 0 ) then scinecho(ch) ; dowrap() ; rept-- ; } rept = 0 ; if ( ch == TAB ) then erasef = 1 ; return( ins_noecho ) ; } static overwrite(ch) char ch ; { extern char workbuffer[] ; extern int chposition,noins ; register int rflag ; if ( noins == 0 ) then return( ins_failure ) ; if ( atcrlf() ) then { noins = 0 ; return( ins_failure ) ; } else { rflag = ( workbuffer[chposition] == TAB ) ; workbuffer[chposition] = ch ; putbin(&ch,1) ; txtmod() ; pinc() ; fixposition() ; if ( rflag ) then retype() ; return( ins_normal ) ; } } vtoverwrite() { extern int noins ; if ( noins ) then { ledoff( l_overwrite ) ; noins = 0 ; } else { ledon( l_overwrite ) ; noins = 1 ; } } static dowrap() { } scxins(ch) char ch ; { extern int read_only ; register char *cp,*dp ; register int i ; if ( worklength < maxlen && read_only == 0 ) then { tabcheck(ch) ; txtmod() ; cp = &workbuffer[worklength] ; dp = cp ; for ( i=0; i= '0' && curch <= '9' ) ) then return(0) ; goldcount = 0 ; pos = 0 ; val = 0 ; rept = 0 ; while ( pos >= 0 ) { switch( curch ) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if ( val > 999 ) then vtbell() ; else { val = val*10 + (curch-060) ; pos++ ; ceol24() ; scdecout( val ) ; goback() ; } break ; case CR: return( rept = val ) ; break ; case RUB: val = val/10 ; pos-- ; ceol24() ; scdecout( val ) ; goback() ; break ; default: rept = val ; scdoch() ; return(val) ; break ; } vtgetc() ; } return(0) ; } vtspins() { register int temp ; extern int rept ; temp = rept ; rept = 0 ; if ( temp ) then do_ins(temp) ; } dorubout() { extern int prevdelete,read_only ; register int eol ; register int ch ; if ( curch != RUB ) then return(0) ; eol = atcrlf() ; if ( eol && chposition == 0 ) then return(1) ; if ( eol ) then pdec() ; if ( read_only == 0 ) then { if ( prevdelete != 0 && chposition != 0 && eol == 0 ) then vtel() ; ch = remchar(chposition) ; if ( eol ) then { scmove() ; lkill() ; } else scremchar(ch) ; } return(1) ; } SCROOTC [.050036]SCROOT.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>