' "A buffer is a VECTOR of two STRINGs. The first points to the buffer, the second to the first unused character in the buffer. Entry points: adds the character to the buffer. adds a line-feed to the buffer after the character. (used in CHRTABLE). inserts 'count' characters from file, or whole thing. inserts 'count' characters or the whole string. inserts the first string into the buffer, with the second string added as a prefix of each non-empty line. BPRMPT1 BPRMPT2 Manifest offsets for accessing prompts in buffer. BUF-BITS A MACRO for playing with the BBITS field. Takes a buffer, a bit, and (optionally) an atom or false. If only two arguments, returns the current value (atom or false); if three, sets/clears the specified bit. BUF-ECHO-FLAG If FALSE, echoes happen as usual. If a fix, instead of echoing we erase characters, and setg buf-echo-flag to false. If atom or applicable, apply to the character typed, the buffer, and outchan. clears buffer. grows buffer by count characters. return number of characters in buffer. makes a buffer of length count, with prompts of prompt1 and prompt2. efficient buffer printer of buffer to (optional) channel. The characters in the buffer are printed, without regard to MUDDLE escape characteristics (i.e., double-quote will not be preceded by a back-slash). For printing as a string, see 'BUFSPRINT'. BUFSIZE free variable, amount to grow by if not given. prints a buffer on an (optional) channel (default .OUTCHAN). The function prints the buffer as a string, 'escaping' the characters double-quote and back-slash so that the the string may be read correctly as a MUDDLE object. function which applies TECO to a buffer. May be used in CHRTABLE, and is default control-E function. uses EXTRACT to generate a string whose length is the number of characters in the buffer. CHRTABLE initial table, ESC___ Returns from GETSTR (via GETSTRACT) ^Q Quotes the next character ^X Deletes current line ^W Deletes word back to separator ^@ Clears buffer ^E Edit the buffer ^F Inserts a file into the buffer ^P Undo the last major deletion ^T Re-enter TECO without munging its buffer ^D Displays the buffer on next line ^L Clears the screen and displays the buffer returns deleted character or FALSE. Applies to the character, unless DELPRINT is false. Initial GVAL of DELPRINT is IMDEL. GVAL applied to chars when deleted, unless GVAL is FALSE. > deletes characters from buffer till member of string is deleted. Returns # of chrs deleted. If optional string present, prints it (followed by crlf) rather than echoing deleted characters on non-display. sends delete-to-end-of-line stream (ctl-P L) to system. DISPLAY? T if console is an erasable display. deletes the current line from the buffer. The separator (initially ,LINEBRKS contains CR__ only) is not deleted. deletes one 'word' in the buffer back from current point till a member of ,WORDBRKS is encountered. The separator is not deleted. asks for file names, inputs the file. FORMATEFFS string of format-effector chars. Reads the cursor position on the channel (it better be open on something where that's meaningful) and updates the channel's position indicators. Used internally after SIOTs and such, which don't change the data stored in the channel. reads a string from the tty into the buffer (arg1). The processing for characters is defined by a dispatch table (default .CHRTABLE). This argument is a structured object of pairs. The first element is a character, the second an applicable object which is applied to the buffer and the character, whenever that character is seen. GETSTR sets up a special activation which is bound to the atom GETSTRACT. This activation marks the repeat loop, and thus may be returned from to get out of GETSTR. GETSTR returns the buffer. GETSTRACT GETSTR's activation, special. takes a BUFFER and does a horizontal position to the calculated end of the last line. For deletions, etc. clears the buffer and does '. clears screen if character is Form-feed. Then prints the buffer. deletes on character and returns it, or FALSE if buffer empty. (Used in CHRTABLE). knows how to delete chars from display. Uses GVAL of DISPLAY? to determine whether applicable. initializes defaults, setgs DISPLAY?. Does IOT on channel (default ,INCHAN) with bits as given by word. Character is only useful on output. Returns character returns T if console is an erasable display. LINEBRKS see 'TTY ORDER' on .INFO.; also NDR;TTY-ON (et al). quotes the next character by calling IOT, thus escaping the normal dispatch through GETSTR. The function assumes the TTY environment has been set up correctly. (see MY-TTY-OFF). Returns first value of RCPOS on channel (default ,INCHAN). REENTER-TECO-CHAR character that means reenter TECO without munging its buffer. Does SIOT on channel of string, with control bits as set by word. Returns string, probably rested. Interruptable during SIOT. Fix is # chars to print, default to entire string. TECO-PROGRAM a string which is what BUFTECO will use to try to load the inferior TECO. Does TTY-GET into supplied uv. Does TTY-SET from supplied uv. takes a char (H or V) and a FIX, does ctl-P to set cursor position in system. TTY1 TTY2 these are words which MY-TTY-OFF uses too pass to TTY-SET. TTY-SET sets the way the system handles characters for you -- echoing, interrupting and activating may be specified for classes of characters. each class has a field in either TTY1 or TTY2. Undoes the last `major' deletion (word or more) from the buffer. If nothing there, no effect. CHR is ignored. WORDBRKS strings of breaks to be used in deletion " \ IOT #DECL ("VALUE" CHARACTER "OPTIONAL" CHANNEL CHARACTER) ADDSTRING INF-RESULT TECO-READ-BUFFER TECO-BUFFER-SIZE INF-CONTIN TECO-CLOSE TECO-OPEN TECO-ALLOC TECO-KILL INF-START TECO-LOAD % % % % % % % T OUTCHAN "TTY" "-continued-" " " (CHANNEL) "\\\"" "\\\\" % ![*BREAK-16 *VALUE!] % TECO % % "C" "You are starting " % " for the first time. If your INIT is unconventional, you may have to exit with ^C, ^K or their equivalents (not ^Z!) after it begins listening. " "Control-Z before ready? " " edit aborted. " "Back to " "An empty string was returned from " ". The buffer has been left unchanged. " "DONE" ^Z-TYPED "Please return from " " with ^C, ^K, or their equivalents. Please re-enter with ^" ". You could get yourself into a bad state. " "An error occurred in returning from " ": " " was not able to start up successfully: " (*BREAK-16 :KILL) *VALUE ":KILL" %< RGLOC TTY1 T> % % GETSTRACT OLD-TTY % ERROR!-INTERRUPTS INTERRUPT ELSE % % % #DISMISS T CHRTABLE DELPRINT ( ACTIVATION) % % % " XXX?" "X" "S" "R" "L" "U" % "î" "File-name: " "READ" "DSK:" "[File-Input Aborted]" "[DONE]" ARG-WRONG-TYPE!-ERRORS ADDSTRING ""]>> .GLUE > CHANNEL FIX)] 38>> > ]> UVECTOR "OPTIONAL" CHANNEL)] 125>> > [4 STRING] FIX STRING FIX>> "If this bit is on, print a new prompt on every cr" > " , ;:.">> >> > (FORMATEFFS) STRING (BUFSIZE) FIX (OLD-TTY) UVECTOR> > )
,BBITS > > >>) (T > >> FIX>>)>>> > > > BUFFER)] 364>> )] 465>> FIX)] 679>> > > STRING STRING "OPTIONAL" FIX)] 918>> > > )] 1024>> )] 1231>> > > > > > > CHARACTER CHANNEL)] 1956>> >> >> \ VECTOR> STRING)] 2070>> CHARACTER >)] 2370>> > > > > BUFFER CHARACTER)] 2587>> BUFFER < OR CHARACTER FIX>)] 2602>> > > > > > STRING STRING)] 2887>> )] 2937>> > > ]>)] 3341>> > > )] 3721>> ,ADDCRLF ,IBUFPRINT !\ ,IBUFPRINT !\ ,UNKILL !\ ,QUOTECHR !\ > !\ ,DLINE !\ ,DWORD !\ , DLINE ,IBUFCLEAR]> > >