home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!usc!news.service.uci.edu!unogate!mvb.saic.com!vmsnet-sources
- From: flowers@memstvx1.memst.edu
- Newsgroups: vmsnet.sources
- Subject: C Swing v3.6.4 patches, part 03/04
- Message-ID: <9908350@MVB.SAIC.COM>
- Date: Mon, 04 Jan 1993 20:21:18 GMT
- Organization: Memphis State University
- Lines: 1319
- Approved: Mark.Berryman@Mvb.Saic.Com
-
- Submitted-by: flowers@memstvx1.memst.edu
- Posting-number: Volume 4, Issue 24
- Archive-name: cswing/patch3_03
- Patch-to: cswing: Volume 3, Issue 35-52,93,211-218
-
- -+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+
- X! then jump to that percent of the file, otherwise just jump
- X! to # percent of the file.
- X `20
- X W If the current screen width is 80, make it 132 and
- X vica-versa. For other values, this command is ignored.
- X**************
- X*** 189,195
- X then jump to that percent of the file otherwise just
- X jump to # percent of the file.
- X `20
- X! W If the current screen width is 80, make it 132 and
- X vica-versa. For other values, this command is ignored.
- X `20
- X Q, RETURN, CONTROL_K->E, CONTROL_X->CONTROL_C
- X--- 195,201 -----
- X then jump to that percent of the file, otherwise just jump
- X to # percent of the file.
- X `20
- X! W If the current screen width is 80, make it 132 and
- X vica-versa. For other values, this command is ignored.
- X `20
- X Q, RETURN, CONTROL_K->E, CONTROL_X->CONTROL_C
- X**************
- X*** 198,208
- X `20
- X ?, H, CONTROL_H, HELP
- X `20
- X! Help. Give a description of all the MOST
- X! commands. The MOST environment variable
- X! MOST_HELP must be set for this to be meaningful,
- X! `09 unless the short help summary has been designated
- X! `09 at compile time.
- X `20
- X /, CONTROL_F, FIND
- X `20
- X--- 204,213 -----
- X `20
- X ?, H, CONTROL_H, HELP
- X `20
- X! Help. Give a description of all the MOST commands. The
- X! MOST environment variable MOST_HELP must be set for this
- X! to be meaningful, unless the short help summary has been
- X! designated at compile time.
- X `20
- X /, CONTROL_F, FIND
- X `20
- X**************
- X*** 206,214
- X `20
- X /, CONTROL_F, FIND
- X `20
- X! Prompt for a string and search forward from the
- X! current line for #th distinct line containing
- X! the string. CONTROL_G aborts.
- X `20
- X \ Prompt for a string and search backward for the
- X #th distinct line containing the string.
- X--- 211,219 -----
- X `20
- X /, CONTROL_F, FIND
- X `20
- X! Prompt for a string and search forward from the top of the
- X! `09 current window for the #th distinct occurrence of the
- X! `09 string. CONTROL_G aborts.
- X `20
- X \ Prompt for a string and search backward from the current
- X cursor position for the #th distinct occurrence of the
- X**************
- X*** 210,218
- X current line for #th distinct line containing
- X the string. CONTROL_G aborts.
- X `20
- X! \ Prompt for a string and search backward for the
- X! #th distinct line containing the string.
- X! CONTROL_G aborts.
- X `20
- X R Search for the next # lines containing an
- X occurrence of the last search string in the
- X--- 215,223 -----
- X `09 current window for the #th distinct occurrence of the
- X `09 string. CONTROL_G aborts.
- X `20
- X! \ Prompt for a string and search backward from the current
- X! cursor position for the #th distinct occurrence of the
- X! string. CONTROL_G aborts.
- X `20
- X R Search from the current cursor position for the next #th
- X occurrence of the last search string in the direction of
- X**************
- X*** 214,222
- X #th distinct line containing the string.
- X CONTROL_G aborts.
- X `20
- X! R Search for the next # lines containing an
- X! occurrence of the last search string in the
- X! direction of the previous search.
- X `20
- X M, SELECT, CONTROL_K->M, CONTROL_K->CONTROL_B
- X `20
- X--- 219,227 -----
- X cursor position for the #th distinct occurrence of the
- X string. CONTROL_G aborts.
- X `20
- X! R Search from the current cursor position for the next #th
- X! occurrence of the last search string in the direction of
- X! the previous search (Repeat).
- X `20
- X For text files, the screen cursor is positioned at the
- X `09 beginning of the string for each search hit. This also
- X**************
- X*** 218,224
- X occurrence of the last search string in the
- X direction of the previous search.
- X `20
- X! M, SELECT, CONTROL_K->M, CONTROL_K->CONTROL_B
- X `20
- X Set a mark on the current line for later reference.
- X `20
- X--- 223,242 -----
- X occurrence of the last search string in the direction of
- X the previous search (Repeat).
- X `20
- X! For text files, the screen cursor is positioned at the
- X! `09 beginning of the string for each search hit. This also
- X! `09 applies to Kanji mode. In Binary mode, the cursor is
- X! `09 positioned at the beginning of the string in the character
- X! `09 version, to the right of the hexidecimal version of the
- X! `09 line containing the hit. Once a string is specified, it
- X! `09 is retained in subsequent entries of '\' and '/' so that
- X! `09 these commands can be used simply to reverse the direction
- X! `09 of searches (then repeated via 'R'), or the previous
- X! `09 string can be deleted from the prompt and a new string
- X! `09 entered. However, forward (/) searches always start at
- X! `09 the top of the current window, whereas reverse (\)
- X! `09 searches and repeats (R) start from the current cursor
- X! `09 position.
- X `20
- X The backquote key is used to quote control characters and
- X `09 escape in search string specifications. This is useful
- X**************
- X*** 220,225
- X `20
- X M, SELECT, CONTROL_K->M, CONTROL_K->CONTROL_B
- X `20
- X Set a mark on the current line for later reference.
- X `20
- X PERIOD, INSERT_HERE, CONTROL_K->RETURN, CONTROL_K->CONTROL_J,
- X--- 238,262 -----
- X `09 searches and repeats (R) start from the current cursor
- X `09 position.
- X `20
- X+ The backquote key is used to quote control characters and
- X+ `09 escape in search string specifications. This is useful
- X+ `09 when searching for the occurrence of a string with such
- X+ `09 characters or a string at the beginning of a line in
- X+ `09 stream files. In the latter case, to find occurrences of
- X+ `09 `60The' at the beginning of a line, enter `60`5EJThe where the `
- V60
- X+ `09 quotes the CONTROL_J. If you enter `5EJ (rather than
- X+ `09 CONTROL_J), or CONTROL_J without the preceding backquote,
- X+ `09 it will be treated as that two-character string, not as
- X+ `09 the control character.
- X+ `20
- X+ Note that in Binary mode, control, escape, and tab (`5EI
- V)
- X+ `09 characters must always be entered explicitly (with
- X+ `09 backquotes) in search string specifications, regardless of
- X+ `09 whether the left-hand display is in hexidecimal or verbose
- X+ `09 format.
- X+`20
- X+ M, SELECT, CONTROL_K->M, CONTROL_K->CONTROL_B
- X+`20
- X Set a mark on the current line for later reference.
- X `20
- X PERIOD, INSERT_HERE, CONTROL_K->RETURN, CONTROL_K->CONTROL_J,
- X**************
- X*** 225,234
- X PERIOD, INSERT_HERE, CONTROL_K->RETURN, CONTROL_K->CONTROL_J,
- X CONTROL_K->CONTROL_M
- X `20
- X! Set a mark on the current line but return to
- X! previous mark. This allows the user to toggle
- X! back and forth between two positions in the
- X! file.
- X `20
- X L Toggle locking for this window. The window is
- X locked if there is a `60*' at the left edge of the
- X--- 262,270 -----
- X PERIOD, INSERT_HERE, CONTROL_K->RETURN, CONTROL_K->CONTROL_J,
- X CONTROL_K->CONTROL_M
- X `20
- X! Set a mark on the current line but return to previous
- X! mark. This allows the user to toggle back and forth
- X! between two positions in the file.
- X `20
- X L Toggle locking for this window. The window is locked if
- X there is a `60*' at the left edge of the status line
- V.
- X**************
- X*** 230,239
- X back and forth between two positions in the
- X file.
- X `20
- X! L Toggle locking for this window. The window is
- X! locked if there is a `60*' at the left edge of the
- X! status line. Windows locked together, scroll
- X! together.
- X `20
- X CONTROL_X->2
- X `20
- X--- 266,274 -----
- X mark. This allows the user to toggle back and forth
- X between two positions in the file.
- X `20
- X! L Toggle locking for this window. The window is locked if
- X! there is a `60*' at the left edge of the status line
- V.
- X! Windows locked together, scroll together.
- X `20
- X CONTROL_X->2
- X `20
- X**************
- X*** 251,261
- X `20
- X Delete all other windows, leaving only one window.
- X `20
- X! E Edit this file. MOST uses callable EDT and TPU or
- X! spawns and editor to perform the editing task. In
- X! `09 addition, MOST can attach to a kept editor. See the
- X! `09 discussion of the environment variable, MOST_EDITOR,
- X! `09 above.
- X `20
- X $, ESC->$ This is system dependent. On VMS, this causes MOST to
- X spawn a subprocess. When the user exits the process,
- X--- 286,295 -----
- X `20
- X Delete all other windows, leaving only one window.
- X `20
- X! E Edit this file. MOST uses callable EDT and TPU or spawns
- X! an editor to perform the editing task. In addition, MOST
- X! can attach to a kept editor. See the discussion of the
- X! environment variable, MOST_EDITOR, above.
- X `20
- X $, ESC->$ This is system dependent. On VMS, this causes MOST to
- X spawn a subprocess. When the user exits the process, MOST
- X**************
- X*** 257,266
- X `09 discussion of the environment variable, MOST_EDITOR,
- X `09 above.
- X `20
- X! $, ESC->$ This is system dependent. On VMS, this causes MOST to
- X! spawn a subprocess. When the user exits the process,
- X! MOST is resumed. On unix systems, MOST simply suspends
- X! itself.
- X `20
- X :N Skip to the next filename given in the command line. Use
- X the arrow keys to scroll forward or backward through the
- X--- 291,299 -----
- X can attach to a kept editor. See the discussion of the
- X environment variable, MOST_EDITOR, above.
- X `20
- X! $, ESC->$ This is system dependent. On VMS, this causes MOST to
- X! spawn a subprocess. When the user exits the process, MOST
- X! is resumed. On unix systems, MOST simply suspends itself.
- X `20
- X :N Skip to the next filename given in the command line. Use
- X the arrow keys to scroll forward or backward through the
- X**************
- X*** 262,270
- X MOST is resumed. On unix systems, MOST simply suspends
- X itself.
- X `20
- X! :N Skip to the next filename given in the command line. Use
- X! the arrow keys to scroll forward or backward through the
- X! file list. `60Q' or 'CONTROL_G' cancels the fetch, and any
- X other key selects the given file.
- X `20
- X :C Toggle case sensitive search.
- X--- 295,303 -----
- X spawn a subprocess. When the user exits the process, MOST
- X is resumed. On unix systems, MOST simply suspends itself.
- X `20
- X! :N Skip to the next filename given in the command line. Use
- X! the arrow keys to scroll forward or backward through the
- X! file list. `60Q' or 'CONTROL_G' cancels the fetch, and an
- Vy
- X other key selects the given file.
- X `20
- X :C Toggle case sensitive search.
- X**************
- X*** 269,276
- X `20
- X :C Toggle case sensitive search.
- X `20
- X! :D Delete current file. This command is only
- X! meaningful with the +d switch.
- X `20
- X :O Toggle various options. With this key sequence,
- X MOST displays a prompt asking the user to hit
- X--- 302,309 -----
- X `20
- X :C Toggle case sensitive search.
- X `20
- X! :D Delete current file. This command is only meaningful with
- X! the +d switch.
- X `20
- X :O Toggle various options. With this key sequence, MOST
- X displays a prompt asking the user to hit one of: bistvw.
- X**************
- X*** 272,283
- X :D Delete current file. This command is only
- X meaningful with the +d switch.
- X `20
- X! :O Toggle various options. With this key sequence,
- X! MOST displays a prompt asking the user to hit
- X! one of: bistvw. The `60b', 's', `60t', `60v', and
- X! `09 `60w' options have the same meaning as the command
- X! line switches. For example, the `60w' option will
- X! toggle wrapping on and off for the current
- X window.
- X `20
- X The `60i' option must be used with a prefix
- X--- 305,315 -----
- X :D Delete current file. This command is only meaningful with
- X the +d switch.
- X `20
- X! :O Toggle various options. With this key sequence, MOST
- X! displays a prompt asking the user to hit one of: bistvw.
- X! The `60b', 's', `60t', `60v', and `60w' options have th
- Ve same
- X! meaning as the command line switches. For example, the
- X! `60w' option will toggle wrapping on and off for the curren
- Vt
- X window.
- X `20
- X The `60i' option must be used with a # prefix integer (0 o
- Vr
- X**************
- X*** 280,289
- X toggle wrapping on and off for the current
- X window.
- X `20
- X! The `60i' option must be used with a prefix
- X! integer #. All lines indented beyond # columns
- X! will not be displayed. For example, consider
- X! the fragment:
- X `20
- X int main(int argc, char **argv)
- X `7B
- X--- 312,321 -----
- X `60w' option will toggle wrapping on and off for the curren
- Vt
- X window.
- X `20
- X! The `60i' option must be used with a # prefix integer (0 o
- Vr
- X! no integer terminates the option). All lines indented
- X! beyond # columns will not be displayed. For example,
- X! consider the fragment:
- X `20
- X int main(int argc, char **argv)
- X `7B
- X**************
- X*** 297,306
- X exit(0);
- X `7D
- X `20
- X! The key sequence `601:Oi' will cause MOST to
- X! display the file ignoring all lines indented
- X! beyond the first column. So for the example
- X! above, MOST would display:
- X `20
- X int main(int argc, char **argv)...
- X `7D
- X--- 329,337 -----
- X exit(0);
- X `7D
- X `20
- X! The key sequence `601:Oi' will cause MOST to display th
- Ve
- X! file ignoring all lines indented beyond the first column.
- X! So for the example above, MOST would display:
- X `20
- X int main(int argc, char **argv)...
- X `7D
- X**************
- X*** 305,311
- X int main(int argc, char **argv)...
- X `7D
- X `20
- X! where the `60...' indicates lines follow are not
- X displayed.
- X `20
- X CONTROL_K->G, CONTROL_X->CONTROL_F
- X--- 336,342 -----
- X int main(int argc, char **argv)...
- X `7D
- X `20
- X! where the `60...' indicates that lines follow which are no
- Vt
- X displayed.
- X `20
- X The 'i' function is disabled in Wrap mode, and is
- X**************
- X*** 308,314
- X where the `60...' indicates lines follow are not
- X displayed.
- X `20
- X! CONTROL_K->G, CONTROL_X->CONTROL_F
- X `20
- X Fetch a new file to this window. You will be prompted
- X for the name of the new file. CONTROL_G cancels the
- X--- 339,348 -----
- X where the `60...' indicates that lines follow which are no
- Vt
- X displayed.
- X `20
- X! The 'i' function is disabled in Wrap mode, and is
- X! automatically re-enabled when Wrap mode is toggled off.
- X! The search functions are disabled when the 'i' function is
- X! set, and are re-enabled when it is toggled off.
- X `20
- X CONTROL_K->G, CONTROL_X->CONTROL_F
- X `20
- X**************
- X*** 310,320
- X `20
- X CONTROL_K->G, CONTROL_X->CONTROL_F
- X `20
- X! Fetch a new file to this window. You will be prompted
- X! for the name of the new file. CONTROL_G cancels the
- X! fetch. A carriage return fetches the file, and adds it
- X! to the file ring list, after those that were indicated
- X! on the command line.
- X `20
- X CONTROL_T
- X `20
- X--- 344,356 -----
- X The search functions are disabled when the 'i' function is
- X set, and are re-enabled when it is toggled off.
- X `20
- X! CONTROL_K->G, CONTROL_X->CONTROL_F
- X!`20
- X! Fetch a new file to this window. You will be prompted for
- X! the name of the new file. CONTROL_G cancels the fetch. A
- X! carriage return fetches the file, and adds it to the file
- X! ring list, after those that were indicated on the command
- X! line.
- X `20
- X CONTROL_G
- X `20
- X**************
- X*** 316,322
- X to the file ring list, after those that were indicated
- X on the command line.
- X `20
- X! CONTROL_T
- X `20
- X Show the current date and time.
- X `20
- X--- 352,360 -----
- X ring list, after those that were indicated on the command
- X line.
- X `20
- X! CONTROL_G
- X! `20
- X! Cancel a prompt and the command which evoked the prompt.
- X `20
- X CONTROL_T
- X `20
- X**************
- X*** 318,323
- X `20
- X CONTROL_T
- X `20
- X Show the current date and time.
- X `20
- X HINTS
- X--- 356,363 -----
- X `20
- X Cancel a prompt and the command which evoked the prompt.
- X `20
- X+ CONTROL_T
- X+`20
- X Show the current date and time.
- X `20
- X `20
- X**************
- X*** 320,326
- X `20
- X Show the current date and time.
- X `20
- X- HINTS
- X `20
- X Control_G aborts the commands requiring the user to type something in
- X at a prompt. The backquote key has a special meaning here. It is
- X--- 360,365 -----
- X `20
- X Show the current date and time.
- X `20
- X `20
- X BUGS
- X `20
- X**************
- X*** 322,335
- X `20
- X HINTS
- X `20
- X- Control_G aborts the commands requiring the user to type something in
- X- at a prompt. The backquote key has a special meaning here. It is
- X- used to quote certain characters. This is useful when searching for
- X- the occurrence of a string with a control character or a string at
- X- the beginning of a line in stream files. In the latter case, to find
- X- the occurence of `60The' at the beginning of a line, enter `60`5EJThe
- V where
- X- `60 quotes the CONTROL_J.
- X-`20
- X BUGS
- X `20
- X Almost all of the known bugs or limitations of MOST are due to a
- X--- 361,366 -----
- X Show the current date and time.
- X `20
- X `20
- X BUGS
- X `20
- X At this time, MOST only works well with terminals understanding
- X**************
- X*** 332,349
- X `20
- X BUGS
- X `20
- X! Almost all of the known bugs or limitations of MOST are due to a
- X! desire to read and interpret control characters or escape sequences
- X! in files (`5EH for underlining or bolding a character; `5EM for bol
- Vding
- X! a line; <ESC>`5B#m for underlining, bolding, or displaying strings
- V in
- X! reverse video). One side effect is that they can get clipped when
- X! scrolling right and left through a file, or when wrap mode is set.
- X! When in doubt, use the '-v' switch or ':O v' toggle to make control
- X! characters and escape sequences explicit in the display.`20
- X!`20
- X! String may not work properly with binary files.
- X!`20
- X! At this time, MOST only works well with terminals understanding
- X vt100 escape sequences. MOST does not seem to have any problem with
- X xterm.
- X `20
- X--- 363,369 -----
- X `20
- X BUGS
- X `20
- X! At this time, MOST only works well with terminals understanding
- X vt100 escape sequences. MOST does not seem to have any problem with
- X xterm.
- X `20
- X**************
- X*** 347,353
- X vt100 escape sequences. MOST does not seem to have any problem with
- X xterm.
- X `20
- X! Malloc failures are not checked. MOST may crash if there is not
- X enough room to hold the file.
- X `20
- X AUTHOR
- X--- 367,373 -----
- X vt100 escape sequences. MOST does not seem to have any problem with
- X xterm.
- X `20
- X! Malloc failures are not checked. MOST may crash if there is not
- X enough room to hold the file.
- X `20
- X `20
- X**************
- X*** 350,356
- X Malloc failures are not checked. MOST may crash if there is not
- X enough room to hold the file.
- X `20
- X- AUTHOR
- X `20
- X John E. Davis
- X The Ohio State University
- X--- 370,375 -----
- X Malloc failures are not checked. MOST may crash if there is not
- X enough room to hold the file.
- X `20
- X `20
- X AUTHOR
- X `20
- X**************
- X*** 352,357
- X `20
- X AUTHOR
- X `20
- X John E. Davis
- X The Ohio State University
- X Department of Physics
- X--- 371,378 -----
- X enough room to hold the file.
- X `20
- X `20
- X+ AUTHOR
- X+`20
- X John E. Davis
- X The Ohio State University
- X Department of Physics
- X**************
- X*** 359,365
- X `20
- X AUTHOR'S ACKNOWLEDGEMENT
- X `20
- X! I would like to thank the users of MOST for valuable comments and
- X criticisms. I would especially like to thank those individuals who
- X have contributed code to MOST:
- X `20
- X--- 380,386 -----
- X `20
- X AUTHOR'S ACKNOWLEDGEMENT
- X `20
- X! I would like to thank the users of MOST for valuable comments and
- X criticisms. I would especially like to thank those individuals who
- X have contributed code to MOST:
- X `20
- X**************
- X*** 368,374
- X I would also like to thank Shinichi Hama for his valuable criticisms
- X of MOST.
- X `20
- X- NOTE
- X `20
- X MOST(3.02FM) is a modification by Foteos Macrides
- X (MACRIDES@WFEB2.BITNET)
- X--- 389,394 -----
- X I would also like to thank Shinichi Hama for his valuable criticisms
- X of MOST.
- X `20
- X `20
- X NOTE
- X `20
- X**************
- X*** 370,380
- X `20
- X NOTE
- X `20
- X! MOST(3.02FM) is a modification by Foteos Macrides
- X! (MACRIDES@WFEB2.BITNET)
- X! of a modification (3.02) by Harry Flowers
- X! (FLOWERS@MEMSTVX1.BITNET, FLOWERS@MEMSTVX1.MEMST.EDU)
- X! of John Davis' MOST(3.01). See header in main.c for modification
- X! and copyright information. The copyright provisions also apply to
- X! this version, and to any programs derived from it. Briefly, you
- X! must make the source code freely available to anyone who wants it.
- X--- 390,405 -----
- X of MOST.
- X `20
- X `20
- X! NOTE
- X!`20
- X! MOST(3.03FM) is an upgrade by Foteos Macrides (MACRIDES@SCI.WFEB.EDU,
- X! MACRIDES@WFEB2.BITNET) of MOST(3.02FM), a modification of MOST(3.02)
- X! by Harry Flowers (FLOWERS@MEMSTVX1.MEMST.EDU,FLOWERS@MEMSTVX1.BITNET)
- X! of John Davis' MOST(3.01). See header in main.c for modification
- X! and copyright information. The copyright provisions also apply to
- X! this version, and to any programs derived from it. Briefly, you
- X! must make the source code freely available to anyone who wants it
- V.
- X! This program is bundled with the network distribution of CSWING
- V.
- X! You can ftp CSWING from rigel.efd.lth.se (130.235.52.10).
- X! `20
- X! Send bug reports to MACRIDES@SCI.WFEB.EDU.
- $ CALL UNPACK MOST_DOC_FM.PAT;364 1162055011
- $ create 'f'
- X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dmost.h;1
- X--- disk$disk1:`5Bflowers.swing.src`5Dmost.h;2
- X**************
- X*** 1,10
- X! extern int SQUEEZE_LINES; /* switch parameters */
- X! extern int MOST_A_OPT; /* automatically choose -b if necessary
- V */
- X! extern int MOST_C_OPT; /* begin pages at top of screen */
- X! extern int MOST_V_OPT; /* display control chars */
- X! extern int MOST_B_OPT; /* display Binary File */
- X! extern int MOST_T_OPT; /* display tab as `5EI-- valid only wit
- Vh V option */
- X! extern int MOST_D_OPT; /* delete file mode (see ':D') */
- X! extern int MOST_L_OPT; /* use `5EL (formfeed) to clear screen
- V */
- X!`20
- X extern void most( char *, int);
- X--- 1,8 -----
- X! extern int MOST_B_OPT; /* display Binary File
- V */
- X! extern int MOST_C_OPT; /* begin pages at top of screen
- V */
- X! extern int MOST_D_OPT; /* delete file mode (see ':D')
- V */
- X! extern int MOST_L_OPT; /* use `5EL (formfeed) to clear screen
- V */
- X! extern int MOST_T_OPT; /* display tab as `5EI-- valid only wit
- Vh V */
- X! extern int MOST_V_OPT; /* display control chars
- V */
- X! extern int SQUEEZE_LINES; /* switch parameters
- V */
- X extern void most( char *, int);
- $ CALL UNPACK MOST_H.PAT;364 1946188761
- $ create 'f'
- X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dmost_options.opt;363
- X--- disk$disk1:`5Bflowers.swing.src`5Dmost_options.opt;2
- X**************
- X*** 1,2
- X sys$share:vaxcrtl.exe/share
- X! IDENTIFICATION="MOST V3.02 FM"
- X--- 1,2 -----
- X sys$share:vaxcrtl.exe/share
- X! IDENTIFICATION="MOST V3.03 FM"
- $ CALL UNPACK MOST_OPTIONS_OPT.PAT;364 1411928778
- $ create 'f'
- X*** disk$disk1:`5Bflowers.swing.vmsnet`5Doptions_file.opt;2
- X--- disk$disk1:`5Bflowers.swing.src`5Doptions_file.opt;3
- X**************
- X*** 1,2
- X sys$share:vaxcrtl.exe/share
- X! IDENTIFICATION="SWING V3.6.3 HF"
- X--- 1,2 -----
- X sys$share:vaxcrtl.exe/share
- X! IDENTIFICATION="SWING V3.6.4 HF"
- $ CALL UNPACK OPTIONS_FILE_OPT.PAT;364 2084467634
- $ create 'f'
- X$ WRITE SYS$OUTPUT "Edit me!"`09! Delete this line
- X$ EXIT`09`09`09`09! And this one, too
- X$! XPAT = "$dev:`5Bdir`5DPATCH.EXE" ! NOT the VMS PATCH prog
- X$! Fix the above line to define XPAT for the patch utility
- X$ XPAT AAAREADME.1ST <AAAREADME_1ST.PAT
- X$ XPAT BUFFER.C <BUFFER_C.PAT
- X$ XPAT CMD.C <CMD_C.PAT
- X$ XPAT HELP.C <HELP_C.PAT
- X$ XPAT KEYM.C <KEYM_C.PAT
- X$ XPAT LINE.C <LINE_C.PAT
- X$ XPAT LINK_V5.COM <LINK_V5_COM.PAT
- X$ XPAT MAIN.C <MAIN_C.PAT
- X$ XPAT MOST.DOC_FM <MOST_DOC_FM.PAT
- X$ XPAT MOST.H <MOST_H.PAT
- X$ XPAT MOST_OPTIONS.OPT <MOST_OPTIONS_OPT.PAT
- X$ XPAT OPTIONS_FILE.OPT <OPTIONS_FILE_OPT.PAT
- X$ XPAT SEARCH.C <SEARCH_C.PAT
- X$ XPAT SWING.C <SWING_C.PAT
- X$ XPAT SWING.H <SWING_H.PAT
- X$ XPAT SWING_38.C <SWING_38_C.PAT
- X$ XPAT WINDOW.C <WINDOW_C.PAT
- $ CALL UNPACK PATCH.COM;364 1699896402
- $ create 'f'
- X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dsearch.c;2
- X--- disk$disk1:`5Bflowers.swing.src`5Dsearch.c;4
- X**************
- X*** 5,19
- X `20
- X #define upcase(ch) ((!MOST_C_OPT && (ch <= 'z') && (ch >= 'a')) ? ch &= 0x
- VDF : ch)
- X `20
- X! /* This routine returns the 1 + position of first match of key in str.
- X! key is modified to match the case of str. */
- X! /* We should try to optimize this routine */
- X! /* searches from beg up to but not including end */
- X! unsigned char *forw_search_region(unsigned char *beg,unsigned char *end, u
- Vnsigned char *key)
- X! `7B
- X! char ch, ch2,char1,work`5B80`5D;
- X! unsigned char *pos;
- X! int key_len,j, str_len;
- X `20
- X if (MOST_C_OPT)
- X `7B
- X--- 5,11 -----
- X `20
- X #define upcase(ch) ((!MOST_C_OPT && (ch <= 'z') && (ch >= 'a')) ? ch &= 0x
- VDF : ch)
- X `20
- X! int S_DIFF = 0;
- X `20
- X /*
- X ** This routine returns the 1 + position of first match of key in str.
- X**************
- X*** 15,20
- X unsigned char *pos;
- X int key_len,j, str_len;
- X `20
- X if (MOST_C_OPT)
- X `7B
- X strcpy(work,key);
- X--- 7,35 -----
- X `20
- X int S_DIFF = 0;
- X `20
- X+ /*
- X+ ** This routine returns the 1 + position of first match of key in str.
- X+ ** Key is modified to match the case of str.
- X+ ** We should try to optimize this routine.
- X+ ** Searches from beg up to but not including end.
- X+ ** If tabs (`5EI) or formatting characters or strings (`5EH, `5EM, <ESC>`
- V5B#m) are
- X+ ** in the original text, they are handled such that hits will occur for
- X+ ** matches as the search string appears on the screen, i.e, the search
- X+ ** string should be entered with spaces instead of tabs and without the
- X+ ** formatting characters when not in Binary or Verbose mode (plus -t or
- X+ ** :Ot set for tabs).
- X+ */
- X+ unsigned char *forw_search_region(unsigned char *beg,unsigned char *end,
- X+ unsigned char *key)
- X+ `7B
- X+ char ch,ch2,char1,work`5B80`5D;
- X+ unsigned char *pos,*save_pos,*b,*e,*i;
- X+ int key_len,j,s,str_len,tab_flag;
- X+ static unsigned char *s_pos1;
- X+ static unsigned char *s_pos2;
- X+ extern int M_FLAG;
- X+ extern char *M_POS;
- X+`20
- X if (MOST_C_OPT)
- X `7B
- X strcpy(work,key);
- X**************
- X*** 40,45
- X `20
- X while(1)
- X `7B
- X while (ch = *beg, ch = upcase(ch), ch != char1)
- X `7B
- X if (beg > end) return(EOB);
- X--- 55,63 -----
- X `20
- X while(1)
- X `7B
- X+ again:
- X+ tab_flag = 0;
- X+ S_DIFF = 0;
- X while (ch = *beg, ch = upcase(ch), ch != char1)
- X `7B
- X if (beg > end) return(EOB);
- X**************
- X*** 43,48
- X while (ch = *beg, ch = upcase(ch), ch != char1)
- X `7B
- X if (beg > end) return(EOB);
- X beg++;
- X `7D
- X beg++;
- X--- 61,75 -----
- X while (ch = *beg, ch = upcase(ch), ch != char1)
- X `7B
- X if (beg > end) return(EOB);
- X+ if (!MOST_B_OPT)
- X+ `7B
- X+ if((!MOST_V_OPT `7C`7C !MOST_T_OPT) &&
- X+ char1 == ' ' && ch == '\t')
- X+ `7B
- X+ tab_flag = 1;
- X+ break;
- X+ `7D
- X+ `7D
- X beg++;
- X `7D
- X beg++;
- X**************
- X*** 46,52
- X beg++;
- X `7D
- X beg++;
- X- /* so we have a position of possible match */
- X `20
- X j = 1;
- X pos = beg; /* save this position so we start from here again */
- X--- 73,78 -----
- X beg++;
- X `7D
- X beg++;
- X `20
- X /*
- X ** We have a position of possible match.
- X**************
- X*** 48,54
- X beg++;
- X /* so we have a position of possible match */
- X `20
- X! j = 1;
- X pos = beg; /* save this position so we start from here again */
- X while(ch = *beg++, ch = upcase(ch),
- X ch2 = work`5Bj++`5D, (ch == ch2) && (j <= key_len));
- X--- 74,138 -----
- X `7D
- X beg++;
- X `20
- X! /*
- X! ** We have a position of possible match.
- X! ** If not Binary mode,
- X! ** skip if not Verbose mode and it's in an <ESC>`5B#m
- X! ** sequence, or a `5EM overstrike string.
- X! */
- X! if (!MOST_B_OPT)
- X! `7B
- X! if (!MOST_V_OPT)
- X! `7B
- X! if ((char1 == '`5B' &&
- X! (*(beg - 2) == '\033' && *(beg + 1) == 'm' &&
- X! (*beg == '0' `7C`7C *beg == '1' `7C`7C
- X! *beg == '4' `7C`7C *beg == '7'))) `7C`7C
- X! (char1 == 'm' &&
- X! (*(beg - 4) == '\033' && *(beg - 3) == '`5B' &&
- X! (*(beg - 2) == '0' `7C`7C *(beg - 2) == '1' `7
- VC`7C
- X! *(beg - 2) == '4' `7C`7C *(beg - 2) == '7')))
- V `7C`7C
- X! ((char1 == '0' `7C`7C char1 == '1' `7C`7C
- X! char1 == '4' `7C`7C char1 == '7') &&
- X! (*(beg - 3) == '\033' && *(beg - 2) == '`5B' &&
- X! *beg == 'm')))
- X! goto again;
- X! else
- X! `7B
- X! save_pos = C_POS;
- X! C_POS = beg - 1;
- X! b = beg_of_line1();
- X! if (!MOST_W_OPT)
- X! `7B
- X! e = end_of_line1();
- X! for (i = b; i <= e; i++)
- X! if (*i == '\015')
- X! `7B
- X! M_FLAG = 1;
- X! M_POS = i;
- X! `7D
- X! `7D
- X! else
- X! e = end_of_line();
- X! if (M_FLAG && C_POS > M_POS)
- X! `7B
- X! C_POS = save_pos;
- X! M_FLAG = 0;
- X! goto again;
- X! `7D
- X! C_POS = save_pos;
- X! M_FLAG = 0;
- X! `7D
- X! `7D
- X! `7D
- X! `20
- X! /*
- X! ** Now see if the rest of the string matches.
- X! ** If not Binary mode,
- X! ** deal with any embedded backspaces (`5EH)
- X! ** or <ESC>`5B#m sequences if not Verbose mode,
- X! ** and with tabs if not Verbose or explicit Tab modes.
- X! */
- X pos = beg; /* save this position so we start from here again */
- X `20
- X if (!MOST_B_OPT && tab_flag)
- X**************
- X*** 50,57
- X `20
- X j = 1;
- X pos = beg; /* save this position so we start from here again */
- X- while(ch = *beg++, ch = upcase(ch),
- X- ch2 = work`5Bj++`5D, (ch == ch2) && (j <= key_len));
- X `20
- X if (j > key_len)
- X `7B
- X--- 134,139 -----
- X ** and with tabs if not Verbose or explicit Tab modes.
- X */
- X pos = beg; /* save this position so we start from here again */
- X `20
- X if (!MOST_B_OPT && tab_flag)
- X `7B
- X**************
- X*** 53,59
- X while(ch = *beg++, ch = upcase(ch),
- X ch2 = work`5Bj++`5D, (ch == ch2) && (j <= key_len));
- X `20
- X! if (j > key_len)
- X `7B
- X /* make key match 'key' in beg */
- X beg = pos - 1; /* skip back to beginning of match */
- X--- 135,141 -----
- X */
- X pos = beg; /* save this position so we start from here again */
- X `20
- X! if (!MOST_B_OPT && tab_flag)
- X `7B
- X beg--;
- X j = 0;
- X**************
- X*** 55,61
- X `20
- X if (j > key_len)
- X `7B
- X! /* make key match 'key' in beg */
- X beg = pos - 1; /* skip back to beginning of match */
- X for (j = 0; j < key_len; j++) key`5Bj`5D = *beg++;
- X return(pos - 1);
- X--- 137,243 -----
- X `20
- X if (!MOST_B_OPT && tab_flag)
- X `7B
- X! beg--;
- X! j = 0;
- X! `7D
- X! else
- X! j = 1;
- X!`20
- X! if (MOST_B_OPT)
- X! `7B
- X! while(ch = *beg++, ch = upcase(ch), ch2 = work`5Bj++`5D,
- X! (ch == ch2 && j <= key_len)) ;
- X! `7D
- X! else
- X! `7B
- X! while(ch = *beg++, ch = upcase(ch), ch2 = work`5Bj++`5D,
- X! ((ch == ch2) `7C`7C
- X! (!MOST_V_OPT && (ch == '_' `7C`7C ch == '\033')) `7
- VC`7C
- X! ((!MOST_V_OPT `7C`7C !MOST_T_OPT) &&
- X! ch == '\t' && ch2 == ' ') &&
- X! (j <= key_len)))
- X! `7B
- X! /*
- X! ** deal with underlining via `5EH if not Verbose mo
- Vde
- X! */
- X! if (ch2 != '_' && (ch == '_' && *beg == '\b'))
- X! `7B
- X! ch = *(beg + 1);
- X! ch = upcase(ch);
- X! if (ch == ch2)
- X! beg += 2;
- X! else break;
- X! `7D
- X! `20
- X! /*
- X! ** deal with bolding via `5EH if not Verbose mode
- X! */
- X! else if (!MOST_B_OPT && !MOST_V_OPT && *beg == '\b')
- X! beg += 2;
- X! `20
- X! /*
- X! ** deal with <ESC>`5B#m if not Verbose mode
- X! */
- X! else if (ch == '\033' &&
- X! *beg == '`5B' && *(beg + 2) == 'm' &&
- X! (*(beg + 1) == '0' `7C`7C *(beg + 1) == '1'
- V `7C`7C
- X! *(beg + 1) == '4' `7C`7C *(beg + 1) == '7'
- V))
- X! `7B
- X! ch = *(beg + 3);
- X! ch = upcase(ch);
- X! if (ch != ch2) break;
- X! else beg += 4;
- X! `7D
- X! `20
- X! /*
- X! ** deal with tabs if not Verbose or explicit Tab mo
- Vdes
- X! */
- X! else if (ch == '\t' && ch2 == ' ')
- X! `7B
- X! j--;
- X! save_pos = beg - 1;
- X! if (tab_flag && beg == pos &&
- X! (*(beg - 2) == '\t' `7C`7C *(beg - 2) == '
- V '))
- X! break;
- X! while (*beg == '\t' `7C`7C *beg == ' ')
- X! beg++;
- X! if (save_pos == beg_of_line1())
- X! s = apparant_distance(beg) - 1;
- X! else if (MOST_W_OPT)
- X! `7B
- X! MOST_W_OPT = 0;
- X! s = apparant_distance(beg) -
- X! apparant_distance(save_pos);
- X! MOST_W_OPT = 1;
- X! `7D
- X! else
- X! s = apparant_distance(beg) -
- X! apparant_distance(save_pos);
- X! while (s && work`5Bj`5D == ' ' && j < key_len)
- X! `7B
- X! j++;
- X! s--;
- X! `7D
- X! if (tab_flag &&
- X! save_pos == pos - 1 && *beg == work`5Bj`5D
- V)
- X! S_DIFF = s;
- X! else if (!tab_flag && s != 0 && j < key_len)
- X! `7B
- X! j = key_len;
- X! break;
- X! `7D
- X! `7D
- X! `7D
- X! `7D
- X! `20
- X! /*
- X! ** if it's a full match
- X! */
- X! if (j > key_len)
- X! `7B
- X! /*
- X! ** make key match 'key' in beg
- X! */
- X beg = pos - 1; /* skip back to beginning of match */
- X for (j = 0; j < key_len; j++)
- X `7B
- X**************
- X*** 57,63
- X `7B
- X /* make key match 'key' in beg */
- X beg = pos - 1; /* skip back to beginning of match */
- X! for (j = 0; j < key_len; j++) key`5Bj`5D = *beg++;
- X return(pos - 1);
- X `7D
- X `20
- X--- 239,284 -----
- X ** make key match 'key' in beg
- X */
- X beg = pos - 1; /* skip back to beginning of match */
- X! for (j = 0; j < key_len; j++)
- X! `7B
- X! if (MOST_B_OPT)
- X! `7B
- X! key`5Bj`5D = *beg++;
- X! `7D
- X! else
- X! `7B
- X! /*
- X! ** deal with overstriking via `5EH if not Ver
- Vbose
- X! */
- X! if (!MOST_V_OPT && *(beg + 1) == '\b')
- X! beg += 2;
- X! `20
- X! /*
- X! ** now deal with tabs if not Verbose or
- X! ** explicit Tab modes,
- X! ** else just get the character
- X! */
- X! if ((!MOST_V_OPT `7C`7C !MOST_T_OPT) &&
- X! *beg == '\t' && work`5Bj`5D == ' ')
- X! `7B
- X! while (*beg == '\t' `7C`7C *beg == ' ')
- V beg++;
- X! while (key`5Bj`5D == ' ') j++;
- X! j--;
- X! `7D
- X! else
- X! key`5Bj`5D = *beg++;
- X! `09`09`09 `20
- X! `20
- X! /*
- X! ** now deal with <ESC>`5B#m if not Verbose
- X! */
- X! if (!MOST_V_OPT && *(beg) == '\033' &&
- X! *(beg + 1) == '`5B' && *(beg + 3) == 'm' &
- V&
- X! (*(beg + 2) == '0' `7C`7C *(beg + 2) == '1
- V' `7C`7C
- X! *(beg + 2) == '4' `7C`7C *(beg + 2) == '7
- V'))
- X! beg += 4;
- X! `7D
- X! `7D
- X return(pos - 1);
- X `7D
- X else beg = pos;
- X**************
- X*** 60,66
- X for (j = 0; j < key_len; j++) key`5Bj`5D = *beg++;
- X return(pos - 1);
- X `7D
- X- `20
- X else beg = pos;
- X `7D
- X `7D
- X--- 281,286 -----
- X `7D
- X return(pos - 1);
- X `7D
- X else beg = pos;
- X `7D
- X `7D
- X**************
- X*** 66,72
- X `7D
- X `20
- X `20
- X! unsigned char *back_search_region(unsigned char *beg,unsigned char *end, u
- Vnsigned char *key)
- X `7B
- X char ch, ch2,char1,work`5B80`5D;
- X unsigned char *pos;
- X--- 286,305 -----
- X `7D
- X `20
- X `20
- X! /*
- X! ** This routine returns the 1 + position of first match of key in str.
- X! ** Key is modified to match the case of str.
- X! ** We should try to optimize this routine.
- X! ** Searches from end up to but not including beg.
- X! ** If tabs (`5EI) or formatting characters or strings (`5EH, `5EM, <ESC>`
- V5B#m) are
- X! ** in the original text, they are handled such that hits will occur for
- X! ** matches as the search string appears on the screen, i.e, the search
- X! ** string should be entered with spaces instead of tabs and without the
- X! ** formatting characters when not in Binary or Verbose mode (plus -t or
- X! ** :Ot set for tabs).
- X! */
- X! unsigned char *back_search_region(unsigned char *beg,unsigned char *end,
- X! unsigned char *key)
- X `7B
- X char ch,ch2,char1,work`5B80`5D;
- X unsigned char *pos,*save_pos,*b,*e,*i;
- X**************
- X*** 68,76
- X `20
- X unsigned char *back_search_region(unsigned char *beg,unsigned char *end, u
- Vnsigned char *key)
- X `7B
- X! char ch, ch2,char1,work`5B80`5D;
- X! unsigned char *pos;
- X! int key_len,j, str_len;
- X `20
- X if (MOST_C_OPT)
- X `7B
- X--- 301,311 -----
- X unsigned char *back_search_region(unsigned char *beg,unsigned char *end,
- X unsigned char *key)
- X `7B
- X! char ch,ch2,char1,work`5B80`5D;
- X! unsigned char *pos,*save_pos,*b,*e,*i;
- X! int key_len,j,s,str_len,tab_flag;
- X! extern int M_FLAG;
- X! extern char *M_POS;
- X `20
- X if (MOST_C_OPT)
- X `7B
- X**************
- X*** 97,102
- X `20
- X while(1)
- X `7B
- X while (ch = *end, ch = upcase(ch), ch != char1)
- X `7B
- X if (beg > end) return(EOB);
- X--- 332,340 -----
- X `20
- X while(1)
- X `7B
- X+ again:
- X+ tab_flag = 0;
- X+ S_DIFF = 0;
- X while (ch = *end, ch = upcase(ch), ch != char1)
- X `7B
- X if (beg > end) return(EOB);
- X**************
- X*** 100,105
- X while (ch = *end, ch = upcase(ch), ch != char1)
- X `7B
- X if (beg > end) return(EOB);
- X end--;
- X `7D
- X end--;
- X--- 338,352 -----
- X while (ch = *end, ch = upcase(ch), ch != char1)
- X `7B
- X if (beg > end) return(EOB);
- X+ if (!MOST_B_OPT)
- X+ `7B
- X+ if((!MOST_V_OPT `7C`7C !MOST_T_OPT) &&
- X+ char1 == ' ' && ch == '\t')
- X+ `7B
- X+ tab_flag = 1;
- X+ break;
- X+ `7D
- X+ `7D
- X end--;
- X `7D
- X end--;
- X**************
- X*** 103,111
- X end--;
- X `7D
- X end--;
- X! /* so we have a position of possible match */
- X!`20
- X! j = key_len - 2;
- X pos = end; /* save this position so we start from here again */
- X while(ch = *end--, ch = upcase(ch),
- X ch2 = work`5Bj`5D, (ch == ch2) && (j >= 0)) j--;
- X--- 350,415 -----
- X end--;
- X `7D
- X end--;
- X! `20
- X! /*
- X! ** We have a position of possible match.
- X! ** If not Binary mode,
- X! ** skip if not Verbose mode and it's in an <ESC>`5B#m
- +-+-+-+-+-+-+-+- END OF PART 3 +-+-+-+-+-+-+-+-
-
-