home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / vmsnet / sources / 470 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  47.9 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!usc!news.service.uci.edu!unogate!mvb.saic.com!vmsnet-sources
  2. From: flowers@memstvx1.memst.edu
  3. Newsgroups: vmsnet.sources
  4. Subject: C Swing v3.6.4 patches, part 03/04
  5. Message-ID: <9908350@MVB.SAIC.COM>
  6. Date: Mon, 04 Jan 1993 20:21:18 GMT
  7. Organization: Memphis State University
  8. Lines: 1319
  9. Approved: Mark.Berryman@Mvb.Saic.Com
  10.  
  11. Submitted-by: flowers@memstvx1.memst.edu
  12. Posting-number: Volume 4, Issue 24
  13. Archive-name: cswing/patch3_03
  14. Patch-to: cswing: Volume 3, Issue 35-52,93,211-218
  15.  
  16. -+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+
  17. X!                then jump to that percent of the file, otherwise just jump
  18. X!                to # percent of the file.
  19. X `20
  20. X       W         If  the current screen  width  is  80,  make  it  132  and
  21. X                 vica-versa.  For other values, this command is ignored.
  22. X**************
  23. X*** 189,195
  24. X                 then jump to that  percent  of the file  otherwise just
  25. X                 jump to # percent of the file.
  26. X `20
  27. X!      W         If the current screen width is  80,  make  it  132  and
  28. X                 vica-versa.  For other values, this command is ignored.
  29. X `20
  30. X       Q, RETURN, CONTROL_K->E, CONTROL_X->CONTROL_C
  31. X--- 195,201 -----
  32. X                 then jump to that percent of the file, otherwise just jump
  33. X                 to # percent of the file.
  34. X `20
  35. X!      W         If  the current screen  width  is  80,  make  it  132  and
  36. X                 vica-versa.  For other values, this command is ignored.
  37. X `20
  38. X       Q, RETURN, CONTROL_K->E, CONTROL_X->CONTROL_C
  39. X**************
  40. X*** 198,208
  41. X `20
  42. X       ?, H, CONTROL_H, HELP
  43. X `20
  44. X!                Help.  Give   a  description  of  all    the MOST
  45. X!                commands.      The    MOST  environment  variable
  46. X!                MOST_HELP must be set for this to be  meaningful,
  47. X! `09       unless the short help summary has been designated
  48. X! `09       at compile time.
  49. X `20
  50. X       /, CONTROL_F, FIND
  51. X `20
  52. X--- 204,213 -----
  53. X `20
  54. X       ?, H, CONTROL_H, HELP
  55. X `20
  56. X!                Help.  Give a description  of  all the MOST commands.  The
  57. X!                MOST environment variable MOST_HELP must be  set  for this
  58. X!                to be meaningful, unless the short help  summary  has been
  59. X!                designated at compile time.
  60. X `20
  61. X       /, CONTROL_F, FIND
  62. X `20
  63. X**************
  64. X*** 206,214
  65. X `20
  66. X       /, CONTROL_F, FIND
  67. X `20
  68. X!                Prompt for a string and search  forward from the
  69. X!                current line for  #th distinct  line  containing
  70. X!                the string.  CONTROL_G aborts.
  71. X `20
  72. X       \         Prompt for a string and search backward  for the
  73. X                 #th  distinct   line  containing  the    string.
  74. X--- 211,219 -----
  75. X `20
  76. X       /, CONTROL_F, FIND
  77. X `20
  78. X!                Prompt for a string and search forward from the top of the
  79. X! `09       current window for the  #th  distinct  occurrence  of  the
  80. X! `09       string.  CONTROL_G aborts.
  81. X `20
  82. X       \         Prompt for a string and search  backward  from the current
  83. X                 cursor  position  for  the #th distinct occurrence of  the
  84. X**************
  85. X*** 210,218
  86. X                 current line for  #th distinct  line  containing
  87. X                 the string.  CONTROL_G aborts.
  88. X `20
  89. X!      \         Prompt for a string and search backward  for the
  90. X!                #th  distinct   line  containing  the    string.
  91. X!                CONTROL_G aborts.
  92. X `20
  93. X       R         Search  for the   next   # lines  containing  an
  94. X                 occurrence of   the last  search string   in the
  95. X--- 215,223 -----
  96. X  `09       current window for the  #th  distinct  occurrence  of  the
  97. X  `09       string.  CONTROL_G aborts.
  98. X `20
  99. X!      \         Prompt for a string and search  backward  from the current
  100. X!                cursor  position  for  the #th distinct occurrence of  the
  101. X!                string.  CONTROL_G aborts.
  102. X `20
  103. X       R         Search from the current cursor  position for the next  #th
  104. X                 occurrence  of  the last search string in the direction of
  105. X**************
  106. X*** 214,222
  107. X                 #th  distinct   line  containing  the    string.
  108. X                 CONTROL_G aborts.
  109. X `20
  110. X!      R         Search  for the   next   # lines  containing  an
  111. X!                occurrence of   the last  search string   in the
  112. X!                direction of the previous search.
  113. X `20
  114. X       M, SELECT, CONTROL_K->M, CONTROL_K->CONTROL_B
  115. X `20
  116. X--- 219,227 -----
  117. X                 cursor  position  for  the #th distinct occurrence of  the
  118. X                 string.  CONTROL_G aborts.
  119. X `20
  120. X!      R         Search from the current cursor  position for the next  #th
  121. X!                occurrence  of  the last search string in the direction of
  122. X!                the previous search (Repeat).
  123. X `20
  124. X                 For  text  files,  the screen cursor is positioned at  the
  125. X  `09       beginning  of  the string for each search hit.  This  also
  126. X**************
  127. X*** 218,224
  128. X                 occurrence of   the last  search string   in the
  129. X                 direction of the previous search.
  130. X `20
  131. X!      M, SELECT, CONTROL_K->M, CONTROL_K->CONTROL_B
  132. X `20
  133. X                 Set a mark on the current line for later reference.
  134. X `20
  135. X--- 223,242 -----
  136. X                 occurrence  of  the last search string in the direction of
  137. X                 the previous search (Repeat).
  138. X `20
  139. X!                For  text  files,  the screen cursor is positioned at  the
  140. X! `09       beginning  of  the string for each search hit.  This  also
  141. X! `09       applies  to  Kanji  mode.    In Binary mode, the cursor is
  142. X! `09       positioned at the beginning of the string in the character
  143. X! `09       version, to the  right  of  the hexidecimal version of the
  144. X! `09       line containing the hit.    Once a string is specified, it
  145. X! `09       is retained in subsequent entries  of  '\' and '/' so that
  146. X! `09       these commands can be used simply to reverse the direction
  147. X! `09       of  searches  (then  repeated  via 'R'), or  the  previous
  148. X! `09       string  can be deleted from the prompt and  a  new  string
  149. X! `09       entered.    However,  forward (/) searches always start at
  150. X! `09       the  top  of  the  current  window,  whereas  reverse  (\)
  151. X! `09       searches and repeats  (R)  start  from  the current cursor
  152. X! `09       position.
  153. X `20
  154. X                 The backquote key is used to quote control characters  and
  155. X  `09       escape in  search  string  specifications.  This is useful
  156. X**************
  157. X*** 220,225
  158. X `20
  159. X       M, SELECT, CONTROL_K->M, CONTROL_K->CONTROL_B
  160. X `20
  161. X                 Set a mark on the current line for later reference.
  162. X `20
  163. X       PERIOD, INSERT_HERE, CONTROL_K->RETURN, CONTROL_K->CONTROL_J,
  164. X--- 238,262 -----
  165. X  `09       searches and repeats  (R)  start  from  the current cursor
  166. X  `09       position.
  167. X `20
  168. X+                The backquote key is used to quote control characters  and
  169. X+ `09       escape in  search  string  specifications.  This is useful
  170. X+ `09       when searching for  the  occurrence  of a string with such
  171. X+ `09       characters or a string  at  the  beginning  of  a  line in
  172. X+ `09       stream files.  In the  latter case, to find occurrences of
  173. X+ `09       `60The' at the beginning of a line, enter `60`5EJThe where the `
  174. V60
  175. X+ `09       quotes  the  CONTROL_J.    If you enter  `5EJ  (rather  than
  176. X+ `09       CONTROL_J),  or CONTROL_J without the preceding backquote,
  177. X+ `09       it will  be  treated  as that two-character string, not as
  178. X+ `09       the control character.
  179. X+     `20
  180. X+                Note that in Binary mode,  control,  escape,  and tab (`5EI
  181. V)
  182. X+ `09       characters  must  always  be  entered  explicitly    (with
  183. X+ `09       backquotes) in search string specifications, regardless of
  184. X+ `09       whether the left-hand display is in hexidecimal or verbose
  185. X+ `09       format.
  186. X+`20
  187. X+      M, SELECT, CONTROL_K->M, CONTROL_K->CONTROL_B
  188. X+`20
  189. X                 Set a mark on the current line for later reference.
  190. X `20
  191. X       PERIOD, INSERT_HERE, CONTROL_K->RETURN, CONTROL_K->CONTROL_J,
  192. X**************
  193. X*** 225,234
  194. X       PERIOD, INSERT_HERE, CONTROL_K->RETURN, CONTROL_K->CONTROL_J,
  195. X               CONTROL_K->CONTROL_M
  196. X `20
  197. X!                Set a mark on the current line but  return  to
  198. X!                previous mark.  This allows the user to toggle
  199. X!                back  and  forth  between two positions in the
  200. X!                file.
  201. X `20
  202. X       L         Toggle locking  for this window.   The window is
  203. X                 locked if there is a `60*' at the left edge of the
  204. X--- 262,270 -----
  205. X       PERIOD, INSERT_HERE, CONTROL_K->RETURN, CONTROL_K->CONTROL_J,
  206. X               CONTROL_K->CONTROL_M
  207. X `20
  208. X!                Set a mark on the current  line  but  return  to  previous
  209. X!                mark.    This allows the user to  toggle  back  and  forth
  210. X!                between two positions in the file.
  211. X `20
  212. X       L         Toggle locking for this window.  The window  is  locked if
  213. X                 there  is  a  `60*'  at  the left edge of the  status  line
  214. V.
  215. X**************
  216. X*** 230,239
  217. X                 back  and  forth  between two positions in the
  218. X                 file.
  219. X `20
  220. X!      L         Toggle locking  for this window.   The window is
  221. X!                locked if there is a `60*' at the left edge of the
  222. X!                status line. Windows  locked  together,   scroll
  223. X!                together.
  224. X `20
  225. X       CONTROL_X->2
  226. X `20
  227. X--- 266,274 -----
  228. X                 mark.    This allows the user to  toggle  back  and  forth
  229. X                 between two positions in the file.
  230. X `20
  231. X!      L         Toggle locking for this window.  The window  is  locked if
  232. X!                there  is  a  `60*'  at  the left edge of the  status  line
  233. V.
  234. X!                Windows locked together, scroll together.
  235. X `20
  236. X       CONTROL_X->2
  237. X `20
  238. X**************
  239. X*** 251,261
  240. X `20
  241. X                 Delete all other windows, leaving only one window.
  242. X `20
  243. X!      E         Edit this file.  MOST uses callable EDT  and  TPU or
  244. X!                spawns and editor to perform the  editing  task.  In
  245. X! `09       addition, MOST can attach to a kept editor.  See the
  246. X! `09       discussion of the environment variable, MOST_EDITOR,
  247. X! `09       above.
  248. X `20
  249. X       $, ESC->$ This is system dependent.   On VMS, this causes MOST to
  250. X                 spawn a subprocess.  When the user  exits  the process,
  251. X--- 286,295 -----
  252. X `20
  253. X                 Delete all other windows, leaving only one window.
  254. X `20
  255. X!      E         Edit this file.  MOST uses callable EDT and TPU or  spawns
  256. X!                an editor to  perform the editing task.  In addition, MOST
  257. X!                can attach to a  kept  editor.   See the discussion of the
  258. X!                environment variable, MOST_EDITOR, above.
  259. X `20
  260. X       $, ESC->$ This is system dependent.   On  VMS,  this  causes MOST to
  261. X                 spawn a subprocess.  When the user exits the process, MOST
  262. X**************
  263. X*** 257,266
  264. X  `09       discussion of the environment variable, MOST_EDITOR,
  265. X  `09       above.
  266. X `20
  267. X!      $, ESC->$ This is system dependent.   On VMS, this causes MOST to
  268. X!                spawn a subprocess.  When the user  exits  the process,
  269. X!                MOST is resumed.  On unix systems, MOST simply suspends
  270. X!                itself.
  271. X `20
  272. X       :N        Skip to the next filename given in the command line.  Use
  273. X                 the arrow keys to scroll  forward or backward through the
  274. X--- 291,299 -----
  275. X                 can attach to a  kept  editor.   See the discussion of the
  276. X                 environment variable, MOST_EDITOR, above.
  277. X `20
  278. X!      $, ESC->$ This is system dependent.   On  VMS,  this  causes MOST to
  279. X!                spawn a subprocess.  When the user exits the process, MOST
  280. X!                is resumed.  On unix systems, MOST simply suspends itself.
  281. X `20
  282. X       :N        Skip to the next filename given in the  command line.  Use
  283. X                 the  arrow  keys to scroll forward or backward through the
  284. X**************
  285. X*** 262,270
  286. X                 MOST is resumed.  On unix systems, MOST simply suspends
  287. X                 itself.
  288. X `20
  289. X!      :N        Skip to the next filename given in the command line.  Use
  290. X!                the arrow keys to scroll  forward or backward through the
  291. X!                file list.  `60Q' or 'CONTROL_G' cancels the fetch, and any
  292. X                 other key selects the given file.
  293. X `20
  294. X       :C        Toggle case sensitive search.
  295. X--- 295,303 -----
  296. X                 spawn a subprocess.  When the user exits the process, MOST
  297. X                 is resumed.  On unix systems, MOST simply suspends itself.
  298. X `20
  299. X!      :N        Skip to the next filename given in the  command line.  Use
  300. X!                the  arrow  keys to scroll forward or backward through the
  301. X!                file list.   `60Q' or 'CONTROL_G' cancels the fetch, and an
  302. Vy
  303. X                 other key selects the given file.
  304. X `20
  305. X       :C        Toggle case sensitive search.
  306. X**************
  307. X*** 269,276
  308. X `20
  309. X       :C        Toggle case sensitive search.
  310. X `20
  311. X!      :D        Delete  current   file.   This  command is  only
  312. X!                meaningful with the +d switch.
  313. X `20
  314. X       :O        Toggle various options.  With this key sequence,
  315. X                 MOST  displays a prompt  asking  the user to hit
  316. X--- 302,309 -----
  317. X `20
  318. X       :C        Toggle case sensitive search.
  319. X `20
  320. X!      :D        Delete current file.  This command is only meaningful with
  321. X!                the +d switch.
  322. X `20
  323. X       :O        Toggle various options.   With  this  key  sequence,  MOST
  324. X                 displays a prompt asking the user to hit  one of:  bistvw.
  325. X**************
  326. X*** 272,283
  327. X       :D        Delete  current   file.   This  command is  only
  328. X                 meaningful with the +d switch.
  329. X `20
  330. X!      :O        Toggle various options.  With this key sequence,
  331. X!                MOST  displays a prompt  asking  the user to hit
  332. X!                one of: bistvw.     The `60b', 's', `60t',  `60v', and
  333. X! `09       `60w' options have the same meaning as the command
  334. X!                line switches.  For example, the `60w' option will
  335. X!                toggle  wrapping  on  and  off  for the  current
  336. X                 window.
  337. X `20
  338. X                 The `60i'  option  must be    used  with a  prefix
  339. X--- 305,315 -----
  340. X       :D        Delete current file.  This command is only meaningful with
  341. X                 the +d switch.
  342. X `20
  343. X!      :O        Toggle various options.   With  this  key  sequence,  MOST
  344. X!                displays a prompt asking the user to hit  one of:  bistvw.
  345. X!                The  `60b',  's',  `60t', `60v', and `60w' options have  th
  346. Ve  same
  347. X!                meaning  as  the  command line switches.  For example, the
  348. X!                `60w' option will toggle wrapping on and off for the curren
  349. Vt
  350. X                 window.
  351. X `20
  352. X                 The `60i' option  must be used with a # prefix integer (0 o
  353. Vr
  354. X**************
  355. X*** 280,289
  356. X                 toggle  wrapping  on  and  off  for the  current
  357. X                 window.
  358. X `20
  359. X!                The `60i'  option  must be    used  with a  prefix
  360. X!                integer #.  All lines  indented beyond # columns
  361. X!                will not be   displayed.  For example,  consider
  362. X!                the fragment:
  363. X `20
  364. X                 int main(int argc, char **argv)
  365. X                  `7B
  366. X--- 312,321 -----
  367. X                 `60w' option will toggle wrapping on and off for the curren
  368. Vt
  369. X                 window.
  370. X `20
  371. X!                The `60i' option  must be used with a # prefix integer (0 o
  372. Vr
  373. X!                no integer terminates the  option).    All  lines indented
  374. X!                beyond # columns will not  be  displayed.    For  example,
  375. X!                consider the fragment:
  376. X `20
  377. X                 int main(int argc, char **argv)
  378. X                  `7B
  379. X**************
  380. X*** 297,306
  381. X                      exit(0);
  382. X                 `7D
  383. X `20
  384. X!                The key  sequence  `601:Oi'  will  cause  MOST  to
  385. X!                display  the  file ignoring  all lines  indented
  386. X!                beyond  the  first column.    So for the example
  387. X!                above, MOST would display:
  388. X `20
  389. X                 int main(int argc, char **argv)...
  390. X                 `7D
  391. X--- 329,337 -----
  392. X                      exit(0);
  393. X                 `7D
  394. X `20
  395. X!                The key sequence `601:Oi' will cause  MOST  to  display  th
  396. Ve
  397. X!                file ignoring all lines indented beyond the  first column.
  398. X!                So for the example above, MOST would display:
  399. X `20
  400. X                 int main(int argc, char **argv)...
  401. X                 `7D
  402. X**************
  403. X*** 305,311
  404. X                 int main(int argc, char **argv)...
  405. X                 `7D
  406. X `20
  407. X!                where the `60...'  indicates  lines follow are not
  408. X                 displayed.
  409. X `20
  410. X       CONTROL_K->G, CONTROL_X->CONTROL_F
  411. X--- 336,342 -----
  412. X                 int main(int argc, char **argv)...
  413. X                 `7D
  414. X `20
  415. X!                where the `60...' indicates that lines follow which  are no
  416. Vt
  417. X                 displayed.
  418. X `20
  419. X                 The  'i'  function  is  disabled  in  Wrap  mode,  and  is
  420. X**************
  421. X*** 308,314
  422. X                 where the `60...'  indicates  lines follow are not
  423. X                 displayed.
  424. X `20
  425. X!      CONTROL_K->G, CONTROL_X->CONTROL_F
  426. X `20
  427. X                 Fetch a new file to this window.   You will be prompted
  428. X                 for the name of the  new  file.   CONTROL_G cancels the
  429. X--- 339,348 -----
  430. X                 where the `60...' indicates that lines follow which  are no
  431. Vt
  432. X                 displayed.
  433. X `20
  434. X!                The  'i'  function  is  disabled  in  Wrap  mode,  and  is
  435. X!                automatically re-enabled  when  Wrap  mode is toggled off.
  436. X!                The search functions are disabled when the 'i' function is
  437. X!                set, and are re-enabled when it is toggled off.
  438. X `20
  439. X       CONTROL_K->G, CONTROL_X->CONTROL_F
  440. X `20
  441. X**************
  442. X*** 310,320
  443. X `20
  444. X       CONTROL_K->G, CONTROL_X->CONTROL_F
  445. X `20
  446. X!                Fetch a new file to this window.   You will be prompted
  447. X!                for the name of the  new  file.   CONTROL_G cancels the
  448. X!                fetch.  A carriage return fetches the file, and adds it
  449. X!                to the file ring  list, after those that were indicated
  450. X!                on the command line.
  451. X `20
  452. X       CONTROL_T
  453. X `20
  454. X--- 344,356 -----
  455. X                 The search functions are disabled when the 'i' function is
  456. X                 set, and are re-enabled when it is toggled off.
  457. X `20
  458. X!      CONTROL_K->G, CONTROL_X->CONTROL_F
  459. X!`20
  460. X!                Fetch a new file to this window.  You will be prompted for
  461. X!                the name of the new file.  CONTROL_G cancels the fetch.  A
  462. X!                carriage return fetches the file, and  adds it to the file
  463. X!                ring list, after those that were indicated  on the command
  464. X!                line.
  465. X `20
  466. X       CONTROL_G
  467. X      `20
  468. X**************
  469. X*** 316,322
  470. X                 to the file ring  list, after those that were indicated
  471. X                 on the command line.
  472. X `20
  473. X!      CONTROL_T
  474. X `20
  475. X                 Show the current date and time.
  476. X `20
  477. X--- 352,360 -----
  478. X                 ring list, after those that were indicated  on the command
  479. X                 line.
  480. X `20
  481. X!      CONTROL_G
  482. X!     `20
  483. X!                Cancel a prompt and the command which evoked the prompt.
  484. X `20
  485. X       CONTROL_T
  486. X `20
  487. X**************
  488. X*** 318,323
  489. X `20
  490. X       CONTROL_T
  491. X `20
  492. X                 Show the current date and time.
  493. X `20
  494. X  HINTS
  495. X--- 356,363 -----
  496. X      `20
  497. X                 Cancel a prompt and the command which evoked the prompt.
  498. X `20
  499. X+      CONTROL_T
  500. X+`20
  501. X                 Show the current date and time.
  502. X `20
  503. X `20
  504. X**************
  505. X*** 320,326
  506. X `20
  507. X                 Show the current date and time.
  508. X `20
  509. X- HINTS
  510. X `20
  511. X       Control_G aborts the commands requiring the user to type something in
  512. X       at a prompt.  The  backquote  key  has a special meaning here.  It is
  513. X--- 360,365 -----
  514. X `20
  515. X                 Show the current date and time.
  516. X `20
  517. X `20
  518. X  BUGS
  519. X `20
  520. X**************
  521. X*** 322,335
  522. X `20
  523. X  HINTS
  524. X `20
  525. X-      Control_G aborts the commands requiring the user to type something in
  526. X-      at a prompt.  The  backquote  key  has a special meaning here.  It is
  527. X-      used to quote certain characters.   This is useful when searching for
  528. X-      the occurrence of a string with a  control  character  or a string at
  529. X-      the beginning of a line in stream files.  In the latter case, to find
  530. X-      the occurence of `60The' at the beginning of a line, enter `60`5EJThe
  531. V where
  532. X-      `60 quotes the CONTROL_J.
  533. X-`20
  534. X  BUGS
  535. X `20
  536. X       Almost all of  the known bugs or limitations  of  MOST  are due to  a
  537. X--- 361,366 -----
  538. X                 Show the current date and time.
  539. X `20
  540. X `20
  541. X  BUGS
  542. X `20
  543. X       At this time,  MOST  only  works  well  with terminals understanding
  544. X**************
  545. X*** 332,349
  546. X `20
  547. X  BUGS
  548. X `20
  549. X!      Almost all of  the known bugs or limitations  of  MOST  are due to  a
  550. X!      desire  to read and interpret control characters or  escape sequences
  551. X!      in files  (`5EH for underlining or bolding a character;  `5EM for bol
  552. Vding
  553. X!      a line;  <ESC>`5B#m for underlining, bolding,  or displaying strings
  554. V in
  555. X!      reverse video).  One side effect is that they can  get  clipped  when
  556. X!      scrolling  right and left  through a file,  or when wrap mode is set.
  557. X!      When  in doubt, use  the '-v' switch or ':O v' toggle to make control
  558. X!      characters and escape sequences explicit in the display.`20
  559. X!`20
  560. X!      String may not work properly with binary files.
  561. X!`20
  562. X!      At  this  time, MOST only works  well  with  terminals understanding
  563. X       vt100 escape sequences.  MOST does not seem to have any problem with
  564. X       xterm.
  565. X `20
  566. X--- 363,369 -----
  567. X `20
  568. X  BUGS
  569. X `20
  570. X!      At this time,  MOST  only  works  well  with terminals understanding
  571. X       vt100 escape sequences.  MOST does not seem to have any problem with
  572. X       xterm.
  573. X `20
  574. X**************
  575. X*** 347,353
  576. X       vt100 escape sequences.  MOST does not seem to have any problem with
  577. X       xterm.
  578. X `20
  579. X!      Malloc failures  are not checked.  MOST may   crash  if there is not
  580. X       enough room to hold the file.
  581. X `20
  582. X  AUTHOR
  583. X--- 367,373 -----
  584. X       vt100 escape sequences.  MOST does not seem to have any problem with
  585. X       xterm.
  586. X `20
  587. X!      Malloc failures are not checked.    MOST  may  crash if there is not
  588. X       enough room to hold the file.
  589. X `20
  590. X `20
  591. X**************
  592. X*** 350,356
  593. X       Malloc failures  are not checked.  MOST may   crash  if there is not
  594. X       enough room to hold the file.
  595. X `20
  596. X- AUTHOR
  597. X `20
  598. X       John E. Davis
  599. X       The Ohio State University
  600. X--- 370,375 -----
  601. X       Malloc failures are not checked.    MOST  may  crash if there is not
  602. X       enough room to hold the file.
  603. X `20
  604. X `20
  605. X  AUTHOR
  606. X `20
  607. X**************
  608. X*** 352,357
  609. X `20
  610. X  AUTHOR
  611. X `20
  612. X       John E. Davis
  613. X       The Ohio State University
  614. X       Department of Physics
  615. X--- 371,378 -----
  616. X       enough room to hold the file.
  617. X `20
  618. X `20
  619. X+ AUTHOR
  620. X+`20
  621. X       John E. Davis
  622. X       The Ohio State University
  623. X       Department of Physics
  624. X**************
  625. X*** 359,365
  626. X `20
  627. X  AUTHOR'S ACKNOWLEDGEMENT
  628. X `20
  629. X!      I would like  to thank the users  of MOST for valuable  comments and
  630. X       criticisms.  I would especially like to  thank those individuals who
  631. X       have contributed code to MOST:
  632. X `20
  633. X--- 380,386 -----
  634. X `20
  635. X  AUTHOR'S ACKNOWLEDGEMENT
  636. X `20
  637. X!      I would like to thank the  users  of  MOST for valuable comments and
  638. X       criticisms.  I would especially like to  thank those individuals who
  639. X       have contributed code to MOST:
  640. X `20
  641. X**************
  642. X*** 368,374
  643. X       I would also like to thank Shinichi Hama for his valuable criticisms
  644. X       of MOST.
  645. X `20
  646. X- NOTE
  647. X `20
  648. X       MOST(3.02FM) is a modification by Foteos Macrides
  649. X                                    (MACRIDES@WFEB2.BITNET)
  650. X--- 389,394 -----
  651. X       I would also like to thank Shinichi Hama for his valuable criticisms
  652. X       of MOST.
  653. X `20
  654. X `20
  655. X  NOTE
  656. X `20
  657. X**************
  658. X*** 370,380
  659. X `20
  660. X  NOTE
  661. X `20
  662. X!      MOST(3.02FM) is a modification by Foteos Macrides
  663. X!                                   (MACRIDES@WFEB2.BITNET)
  664. X!      of a modification (3.02) by Harry Flowers
  665. X!                 (FLOWERS@MEMSTVX1.BITNET, FLOWERS@MEMSTVX1.MEMST.EDU)
  666. X!      of John Davis' MOST(3.01).   See header in main.c for modification
  667. X!      and copyright information.  The copyright provisions also apply to
  668. X!      this version, and to  any programs  derived from it.  Briefly, you
  669. X!      must make the source code freely available to anyone who wants it.
  670. X--- 390,405 -----
  671. X       of MOST.
  672. X `20
  673. X `20
  674. X! NOTE
  675. X!`20
  676. X!      MOST(3.03FM) is an upgrade by Foteos Macrides (MACRIDES@SCI.WFEB.EDU,
  677. X!      MACRIDES@WFEB2.BITNET) of MOST(3.02FM),  a modification of MOST(3.02)
  678. X!      by Harry Flowers (FLOWERS@MEMSTVX1.MEMST.EDU,FLOWERS@MEMSTVX1.BITNET)
  679. X!      of John Davis' MOST(3.01).  See header  in  main.c  for  modification
  680. X!      and copyright  information.   The  copyright provisions also apply to
  681. X!      this version, and  to  any  programs  derived  from it.  Briefly, you
  682. X!      must make the source  code  freely available  to  anyone who wants it
  683. V.
  684. X!      This program is  bundled  with  the  network  distribution  of CSWING
  685. V.
  686. X!      You can ftp CSWING from rigel.efd.lth.se (130.235.52.10).
  687. X!     `20
  688. X!      Send bug reports to MACRIDES@SCI.WFEB.EDU.
  689. $ CALL UNPACK MOST_DOC_FM.PAT;364 1162055011
  690. $ create 'f'
  691. X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dmost.h;1
  692. X--- disk$disk1:`5Bflowers.swing.src`5Dmost.h;2
  693. X**************
  694. X*** 1,10
  695. X! extern int SQUEEZE_LINES;          /* switch parameters */
  696. X! extern int MOST_A_OPT;             /* automatically choose -b if necessary
  697. V */
  698. X! extern int MOST_C_OPT;             /* begin pages at top of screen */
  699. X! extern int MOST_V_OPT;             /* display control chars */
  700. X! extern int MOST_B_OPT;             /* display Binary File */
  701. X! extern int MOST_T_OPT;             /* display tab as `5EI-- valid only wit
  702. Vh V option */
  703. X! extern int MOST_D_OPT;             /* delete file mode  (see ':D')  */
  704. X! extern int MOST_L_OPT;             /* use `5EL (formfeed) to clear screen
  705. V */
  706. X!`20
  707. X  extern void most( char *, int);
  708. X--- 1,8 -----
  709. X! extern int MOST_B_OPT;             /* display Binary File
  710. V                   */
  711. X! extern int MOST_C_OPT;             /* begin pages at top of screen
  712. V          */
  713. X! extern int MOST_D_OPT;             /* delete file mode  (see ':D')
  714. V          */
  715. X! extern int MOST_L_OPT;             /* use `5EL (formfeed) to clear screen
  716. V     */
  717. X! extern int MOST_T_OPT;             /* display tab as `5EI-- valid only wit
  718. Vh V */
  719. X! extern int MOST_V_OPT;             /* display control chars
  720. V                 */
  721. X! extern int SQUEEZE_LINES;          /* switch parameters
  722. V                     */
  723. X  extern void most( char *, int);
  724. $ CALL UNPACK MOST_H.PAT;364 1946188761
  725. $ create 'f'
  726. X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dmost_options.opt;363
  727. X--- disk$disk1:`5Bflowers.swing.src`5Dmost_options.opt;2
  728. X**************
  729. X*** 1,2
  730. X  sys$share:vaxcrtl.exe/share
  731. X! IDENTIFICATION="MOST V3.02 FM"
  732. X--- 1,2 -----
  733. X  sys$share:vaxcrtl.exe/share
  734. X! IDENTIFICATION="MOST V3.03 FM"
  735. $ CALL UNPACK MOST_OPTIONS_OPT.PAT;364 1411928778
  736. $ create 'f'
  737. X*** disk$disk1:`5Bflowers.swing.vmsnet`5Doptions_file.opt;2
  738. X--- disk$disk1:`5Bflowers.swing.src`5Doptions_file.opt;3
  739. X**************
  740. X*** 1,2
  741. X  sys$share:vaxcrtl.exe/share
  742. X! IDENTIFICATION="SWING V3.6.3 HF"
  743. X--- 1,2 -----
  744. X  sys$share:vaxcrtl.exe/share
  745. X! IDENTIFICATION="SWING V3.6.4 HF"
  746. $ CALL UNPACK OPTIONS_FILE_OPT.PAT;364 2084467634
  747. $ create 'f'
  748. X$ WRITE SYS$OUTPUT "Edit me!"`09! Delete this line
  749. X$ EXIT`09`09`09`09! And this one, too
  750. X$! XPAT = "$dev:`5Bdir`5DPATCH.EXE" ! NOT the VMS PATCH prog
  751. X$! Fix the above line to define XPAT for the patch utility
  752. X$ XPAT AAAREADME.1ST <AAAREADME_1ST.PAT
  753. X$ XPAT BUFFER.C <BUFFER_C.PAT
  754. X$ XPAT CMD.C <CMD_C.PAT
  755. X$ XPAT HELP.C <HELP_C.PAT
  756. X$ XPAT KEYM.C <KEYM_C.PAT
  757. X$ XPAT LINE.C <LINE_C.PAT
  758. X$ XPAT LINK_V5.COM <LINK_V5_COM.PAT
  759. X$ XPAT MAIN.C <MAIN_C.PAT
  760. X$ XPAT MOST.DOC_FM <MOST_DOC_FM.PAT
  761. X$ XPAT MOST.H <MOST_H.PAT
  762. X$ XPAT MOST_OPTIONS.OPT <MOST_OPTIONS_OPT.PAT
  763. X$ XPAT OPTIONS_FILE.OPT <OPTIONS_FILE_OPT.PAT
  764. X$ XPAT SEARCH.C <SEARCH_C.PAT
  765. X$ XPAT SWING.C <SWING_C.PAT
  766. X$ XPAT SWING.H <SWING_H.PAT
  767. X$ XPAT SWING_38.C <SWING_38_C.PAT
  768. X$ XPAT WINDOW.C <WINDOW_C.PAT
  769. $ CALL UNPACK PATCH.COM;364 1699896402
  770. $ create 'f'
  771. X*** disk$disk1:`5Bflowers.swing.vmsnet`5Dsearch.c;2
  772. X--- disk$disk1:`5Bflowers.swing.src`5Dsearch.c;4
  773. X**************
  774. X*** 5,19
  775. X `20
  776. X  #define upcase(ch) ((!MOST_C_OPT && (ch <= 'z') && (ch >= 'a')) ? ch &= 0x
  777. VDF : ch)
  778. X `20
  779. X! /* This routine returns the 1 + position of first match of key in str.
  780. X!    key is modified to match the case of str. */
  781. X! /* We should try to optimize this routine */
  782. X! /* searches from beg up to but not including end */
  783. X! unsigned char *forw_search_region(unsigned char *beg,unsigned char *end, u
  784. Vnsigned char *key)
  785. X! `7B
  786. X!     char ch, ch2,char1,work`5B80`5D;
  787. X!     unsigned char *pos;
  788. X!     int key_len,j, str_len;
  789. X `20
  790. X      if (MOST_C_OPT)
  791. X        `7B
  792. X--- 5,11 -----
  793. X `20
  794. X  #define upcase(ch) ((!MOST_C_OPT && (ch <= 'z') && (ch >= 'a')) ? ch &= 0x
  795. VDF : ch)
  796. X `20
  797. X! int S_DIFF = 0;
  798. X `20
  799. X  /*
  800. X  **  This routine returns the 1 + position of first match of key in str.
  801. X**************
  802. X*** 15,20
  803. X      unsigned char *pos;
  804. X      int key_len,j, str_len;
  805. X `20
  806. X      if (MOST_C_OPT)
  807. X        `7B
  808. X            strcpy(work,key);
  809. X--- 7,35 -----
  810. X `20
  811. X  int S_DIFF = 0;
  812. X `20
  813. X+ /*
  814. X+ **  This routine returns the 1 + position of first match of key in str.
  815. X+ **  Key is modified to match the case of str.
  816. X+ **  We should try to optimize this routine.
  817. X+ **  Searches from beg up to but not including end.
  818. X+ **  If tabs (`5EI) or formatting characters or strings (`5EH, `5EM, <ESC>`
  819. V5B#m) are
  820. X+ **    in the original text, they are handled such that hits will occur for
  821. X+ **    matches as the search string appears on the screen, i.e, the search
  822. X+ **    string should be entered with spaces instead of tabs and without the
  823. X+ **    formatting characters when not in Binary or Verbose mode (plus -t or
  824. X+ **    :Ot set for tabs).
  825. X+ */
  826. X+ unsigned char *forw_search_region(unsigned char *beg,unsigned char *end,
  827. X+                                   unsigned char *key)
  828. X+ `7B
  829. X+     char ch,ch2,char1,work`5B80`5D;
  830. X+     unsigned char *pos,*save_pos,*b,*e,*i;
  831. X+     int key_len,j,s,str_len,tab_flag;
  832. X+     static unsigned char *s_pos1;
  833. X+     static unsigned char *s_pos2;
  834. X+     extern int M_FLAG;
  835. X+     extern char *M_POS;
  836. X+`20
  837. X      if (MOST_C_OPT)
  838. X        `7B
  839. X            strcpy(work,key);
  840. X**************
  841. X*** 40,45
  842. X     `20
  843. X      while(1)
  844. X        `7B
  845. X            while (ch = *beg, ch = upcase(ch), ch != char1)
  846. X              `7B
  847. X                  if (beg > end) return(EOB);
  848. X--- 55,63 -----
  849. X     `20
  850. X      while(1)
  851. X        `7B
  852. X+ again:
  853. X+           tab_flag = 0;
  854. X+           S_DIFF = 0;
  855. X            while (ch = *beg, ch = upcase(ch), ch != char1)
  856. X              `7B
  857. X                  if (beg > end) return(EOB);
  858. X**************
  859. X*** 43,48
  860. X            while (ch = *beg, ch = upcase(ch), ch != char1)
  861. X              `7B
  862. X                  if (beg > end) return(EOB);
  863. X                  beg++;
  864. X              `7D
  865. X            beg++;
  866. X--- 61,75 -----
  867. X            while (ch = *beg, ch = upcase(ch), ch != char1)
  868. X              `7B
  869. X                  if (beg > end) return(EOB);
  870. X+                 if (!MOST_B_OPT)
  871. X+                   `7B
  872. X+                       if((!MOST_V_OPT `7C`7C !MOST_T_OPT) &&
  873. X+                          char1 == ' ' && ch == '\t')
  874. X+                         `7B
  875. X+                             tab_flag = 1;
  876. X+                             break;
  877. X+                         `7D
  878. X+                   `7D
  879. X                  beg++;
  880. X              `7D
  881. X            beg++;
  882. X**************
  883. X*** 46,52
  884. X                  beg++;
  885. X              `7D
  886. X            beg++;
  887. X-           /* so we have a position of possible match */
  888. X `20
  889. X            j = 1;
  890. X            pos = beg;  /* save this position so we start from here again */
  891. X--- 73,78 -----
  892. X                  beg++;
  893. X              `7D
  894. X            beg++;
  895. X `20
  896. X            /*
  897. X            **  We have a position of possible match.
  898. X**************
  899. X*** 48,54
  900. X            beg++;
  901. X            /* so we have a position of possible match */
  902. X `20
  903. X!           j = 1;
  904. X            pos = beg;  /* save this position so we start from here again */
  905. X            while(ch = *beg++, ch = upcase(ch),
  906. X                  ch2 = work`5Bj++`5D, (ch == ch2) && (j <= key_len));
  907. X--- 74,138 -----
  908. X              `7D
  909. X            beg++;
  910. X `20
  911. X!           /*
  912. X!           **  We have a position of possible match.
  913. X!           **  If not Binary mode,
  914. X!           **    skip if not Verbose mode and it's in an <ESC>`5B#m
  915. X!           **    sequence, or a `5EM overstrike string.
  916. X!           */
  917. X!           if (!MOST_B_OPT)
  918. X!             `7B
  919. X!                 if (!MOST_V_OPT)
  920. X!                   `7B
  921. X!                       if ((char1 == '`5B' &&
  922. X!                            (*(beg - 2) == '\033' && *(beg + 1) == 'm' &&
  923. X!                             (*beg == '0' `7C`7C *beg == '1' `7C`7C
  924. X!                              *beg == '4' `7C`7C *beg == '7'))) `7C`7C
  925. X!                           (char1 == 'm' &&
  926. X!                            (*(beg - 4) == '\033' && *(beg - 3) == '`5B' &&
  927. X!                             (*(beg - 2) == '0' `7C`7C *(beg - 2) == '1' `7
  928. VC`7C
  929. X!                              *(beg - 2) == '4' `7C`7C *(beg - 2) == '7')))
  930. V `7C`7C
  931. X!                           ((char1 == '0' `7C`7C char1 == '1' `7C`7C
  932. X!                             char1 == '4' `7C`7C char1 == '7') &&
  933. X!                            (*(beg - 3) == '\033' && *(beg - 2) == '`5B' &&
  934. X!                             *beg == 'm')))
  935. X!                         goto again;
  936. X!                       else
  937. X!                         `7B
  938. X!                             save_pos = C_POS;
  939. X!                             C_POS = beg - 1;
  940. X!                             b = beg_of_line1();
  941. X!                             if (!MOST_W_OPT)
  942. X!                               `7B
  943. X!                                   e = end_of_line1();
  944. X!                                   for (i = b; i <= e; i++)
  945. X!                                     if (*i == '\015')
  946. X!                                       `7B
  947. X!                                           M_FLAG = 1;
  948. X!                                           M_POS = i;
  949. X!                                       `7D
  950. X!                               `7D
  951. X!                             else
  952. X!                               e = end_of_line();
  953. X!                             if (M_FLAG && C_POS > M_POS)
  954. X!                               `7B
  955. X!                                   C_POS = save_pos;
  956. X!                                   M_FLAG = 0;
  957. X!                                   goto again;
  958. X!                               `7D
  959. X!                             C_POS = save_pos;
  960. X!                             M_FLAG = 0;
  961. X!                         `7D
  962. X!                   `7D
  963. X!             `7D
  964. X!            `20
  965. X!           /*
  966. X!           **  Now see if the rest of the string matches.
  967. X!           **  If not Binary mode,
  968. X!           **    deal with any embedded backspaces (`5EH)
  969. X!           **    or <ESC>`5B#m sequences if not Verbose mode,
  970. X!           **    and with tabs if not Verbose or explicit Tab modes.
  971. X!           */
  972. X            pos = beg;  /* save this position so we start from here again */
  973. X `20
  974. X            if (!MOST_B_OPT && tab_flag)
  975. X**************
  976. X*** 50,57
  977. X `20
  978. X            j = 1;
  979. X            pos = beg;  /* save this position so we start from here again */
  980. X-           while(ch = *beg++, ch = upcase(ch),
  981. X-                 ch2 = work`5Bj++`5D, (ch == ch2) && (j <= key_len));
  982. X `20
  983. X            if (j > key_len)
  984. X              `7B
  985. X--- 134,139 -----
  986. X            **    and with tabs if not Verbose or explicit Tab modes.
  987. X            */
  988. X            pos = beg;  /* save this position so we start from here again */
  989. X `20
  990. X            if (!MOST_B_OPT && tab_flag)
  991. X              `7B
  992. X**************
  993. X*** 53,59
  994. X            while(ch = *beg++, ch = upcase(ch),
  995. X                  ch2 = work`5Bj++`5D, (ch == ch2) && (j <= key_len));
  996. X `20
  997. X!           if (j > key_len)
  998. X              `7B
  999. X                  /* make key match 'key' in beg */
  1000. X                  beg = pos - 1;  /* skip back to beginning of match */
  1001. X--- 135,141 -----
  1002. X            */
  1003. X            pos = beg;  /* save this position so we start from here again */
  1004. X `20
  1005. X!           if (!MOST_B_OPT && tab_flag)
  1006. X              `7B
  1007. X                  beg--;
  1008. X                  j = 0;
  1009. X**************
  1010. X*** 55,61
  1011. X `20
  1012. X            if (j > key_len)
  1013. X              `7B
  1014. X!                 /* make key match 'key' in beg */
  1015. X                  beg = pos - 1;  /* skip back to beginning of match */
  1016. X                  for (j = 0; j < key_len; j++) key`5Bj`5D = *beg++;
  1017. X                  return(pos - 1);
  1018. X--- 137,243 -----
  1019. X `20
  1020. X            if (!MOST_B_OPT && tab_flag)
  1021. X              `7B
  1022. X!                 beg--;
  1023. X!                 j = 0;
  1024. X!             `7D
  1025. X!           else
  1026. X!             j = 1;
  1027. X!`20
  1028. X!           if (MOST_B_OPT)
  1029. X!             `7B
  1030. X!                 while(ch = *beg++, ch = upcase(ch), ch2 = work`5Bj++`5D,
  1031. X!                       (ch == ch2 && j <= key_len)) ;
  1032. X!             `7D
  1033. X!           else
  1034. X!             `7B
  1035. X!                 while(ch = *beg++, ch = upcase(ch), ch2 = work`5Bj++`5D,
  1036. X!                       ((ch == ch2) `7C`7C
  1037. X!                        (!MOST_V_OPT && (ch == '_' `7C`7C ch == '\033')) `7
  1038. VC`7C
  1039. X!                        ((!MOST_V_OPT `7C`7C !MOST_T_OPT) &&
  1040. X!                         ch == '\t' && ch2 == ' ') &&
  1041. X!                        (j <= key_len)))
  1042. X!                   `7B
  1043. X!                       /*
  1044. X!                       **  deal with underlining via `5EH if not Verbose mo
  1045. Vde
  1046. X!                       */
  1047. X!                       if (ch2 != '_' && (ch == '_' && *beg == '\b'))
  1048. X!                         `7B
  1049. X!                             ch = *(beg + 1);
  1050. X!                             ch = upcase(ch);
  1051. X!                             if (ch == ch2)
  1052. X!                               beg += 2;
  1053. X!                             else break;
  1054. X!                         `7D
  1055. X!                      `20
  1056. X!                       /*
  1057. X!                       **  deal with bolding via `5EH if not Verbose mode
  1058. X!                       */
  1059. X!                       else if (!MOST_B_OPT && !MOST_V_OPT && *beg == '\b')
  1060. X!                         beg += 2;
  1061. X!                      `20
  1062. X!                       /*
  1063. X!                       **  deal with <ESC>`5B#m if not Verbose mode
  1064. X!                       */
  1065. X!                       else if (ch == '\033' &&
  1066. X!                                *beg == '`5B' && *(beg + 2) == 'm' &&
  1067. X!                                (*(beg + 1) == '0' `7C`7C *(beg + 1) == '1'
  1068. V `7C`7C
  1069. X!                                 *(beg + 1) == '4' `7C`7C *(beg + 1) == '7'
  1070. V))
  1071. X!                         `7B
  1072. X!                             ch = *(beg + 3);
  1073. X!                             ch = upcase(ch);
  1074. X!                             if (ch != ch2) break;
  1075. X!                             else beg += 4;
  1076. X!                         `7D
  1077. X!                        `20
  1078. X!                       /*
  1079. X!                       **  deal with tabs if not Verbose or explicit Tab mo
  1080. Vdes
  1081. X!                       */
  1082. X!                       else if (ch == '\t' && ch2 == ' ')
  1083. X!                         `7B
  1084. X!                             j--;
  1085. X!                             save_pos = beg - 1;
  1086. X!                             if (tab_flag && beg == pos &&
  1087. X!                                 (*(beg - 2) == '\t' `7C`7C *(beg - 2) == '
  1088. V '))
  1089. X!                               break;
  1090. X!                             while (*beg == '\t' `7C`7C *beg == ' ')
  1091. X!                               beg++;
  1092. X!                             if (save_pos == beg_of_line1())
  1093. X!                               s = apparant_distance(beg) - 1;
  1094. X!                             else if (MOST_W_OPT)
  1095. X!                               `7B
  1096. X!                                   MOST_W_OPT = 0;
  1097. X!                                   s = apparant_distance(beg) -
  1098. X!                                       apparant_distance(save_pos);
  1099. X!                                   MOST_W_OPT = 1;
  1100. X!                               `7D
  1101. X!                             else
  1102. X!                               s = apparant_distance(beg) -
  1103. X!                                   apparant_distance(save_pos);
  1104. X!                             while (s && work`5Bj`5D == ' ' && j < key_len)
  1105. X!                               `7B
  1106. X!                                   j++;
  1107. X!                                   s--;
  1108. X!                               `7D
  1109. X!                             if (tab_flag &&
  1110. X!                                 save_pos == pos - 1 && *beg == work`5Bj`5D
  1111. V)
  1112. X!                                   S_DIFF = s;
  1113. X!                             else if (!tab_flag && s != 0 && j < key_len)
  1114. X!                               `7B
  1115. X!                                   j = key_len;
  1116. X!                                   break;
  1117. X!                               `7D
  1118. X!                         `7D
  1119. X!                   `7D
  1120. X!             `7D
  1121. X!            `20
  1122. X!           /*
  1123. X!           **  if it's a full match
  1124. X!           */
  1125. X!           if (j > key_len)
  1126. X!             `7B
  1127. X!                 /*
  1128. X!                 **  make key match 'key' in beg
  1129. X!                 */
  1130. X                  beg = pos - 1;  /* skip back to beginning of match */
  1131. X                  for (j = 0; j < key_len; j++)
  1132. X                    `7B
  1133. X**************
  1134. X*** 57,63
  1135. X              `7B
  1136. X                  /* make key match 'key' in beg */
  1137. X                  beg = pos - 1;  /* skip back to beginning of match */
  1138. X!                 for (j = 0; j < key_len; j++) key`5Bj`5D = *beg++;
  1139. X                  return(pos - 1);
  1140. X              `7D
  1141. X           `20
  1142. X--- 239,284 -----
  1143. X                  **  make key match 'key' in beg
  1144. X                  */
  1145. X                  beg = pos - 1;  /* skip back to beginning of match */
  1146. X!                 for (j = 0; j < key_len; j++)
  1147. X!                   `7B
  1148. X!                       if (MOST_B_OPT)
  1149. X!                         `7B
  1150. X!                             key`5Bj`5D = *beg++;
  1151. X!                         `7D
  1152. X!                       else
  1153. X!                         `7B
  1154. X!                             /*
  1155. X!                             **  deal with overstriking via `5EH if not Ver
  1156. Vbose
  1157. X!                             */
  1158. X!                             if (!MOST_V_OPT && *(beg + 1) == '\b')
  1159. X!                               beg += 2;
  1160. X!                            `20
  1161. X!                             /*
  1162. X!                             **  now deal with tabs if not Verbose or
  1163. X!                             **    explicit Tab modes,
  1164. X!                             **  else just get the character
  1165. X!                             */
  1166. X!                             if ((!MOST_V_OPT `7C`7C !MOST_T_OPT) &&
  1167. X!                                 *beg == '\t' && work`5Bj`5D == ' ')
  1168. X!                               `7B
  1169. X!                                   while (*beg == '\t' `7C`7C *beg == ' ')
  1170. V beg++;
  1171. X!                                   while (key`5Bj`5D == ' ') j++;
  1172. X!                                   j--;
  1173. X!                               `7D
  1174. X!                             else
  1175. X!                               key`5Bj`5D = *beg++;
  1176. X! `09`09`09     `20
  1177. X!                              `20
  1178. X!                             /*
  1179. X!                             **  now deal with <ESC>`5B#m if not Verbose
  1180. X!                             */
  1181. X!                             if (!MOST_V_OPT && *(beg) == '\033' &&
  1182. X!                                 *(beg + 1) == '`5B' && *(beg + 3) == 'm' &
  1183. V&
  1184. X!                                 (*(beg + 2) == '0' `7C`7C *(beg + 2) == '1
  1185. V' `7C`7C
  1186. X!                                  *(beg + 2) == '4' `7C`7C *(beg + 2) == '7
  1187. V'))
  1188. X!                               beg += 4;
  1189. X!                         `7D
  1190. X!                   `7D
  1191. X                  return(pos - 1);
  1192. X              `7D
  1193. X            else beg = pos;
  1194. X**************
  1195. X*** 60,66
  1196. X                  for (j = 0; j < key_len; j++) key`5Bj`5D = *beg++;
  1197. X                  return(pos - 1);
  1198. X              `7D
  1199. X-          `20
  1200. X            else beg = pos;
  1201. X        `7D
  1202. X  `7D
  1203. X--- 281,286 -----
  1204. X                    `7D
  1205. X                  return(pos - 1);
  1206. X              `7D
  1207. X            else beg = pos;
  1208. X        `7D
  1209. X  `7D
  1210. X**************
  1211. X*** 66,72
  1212. X  `7D
  1213. X `20
  1214. X `20
  1215. X! unsigned char *back_search_region(unsigned char *beg,unsigned char *end, u
  1216. Vnsigned char *key)
  1217. X  `7B
  1218. X      char ch, ch2,char1,work`5B80`5D;
  1219. X      unsigned char *pos;
  1220. X--- 286,305 -----
  1221. X  `7D
  1222. X `20
  1223. X `20
  1224. X! /*
  1225. X! **  This routine returns the 1 + position of first match of key in str.
  1226. X! **  Key is modified to match the case of str.
  1227. X! **  We should try to optimize this routine.
  1228. X! **  Searches from end up to but not including beg.
  1229. X! **  If tabs (`5EI) or formatting characters or strings (`5EH, `5EM, <ESC>`
  1230. V5B#m) are
  1231. X! **    in the original text, they are handled such that hits will occur for
  1232. X! **    matches as the search string appears on the screen, i.e, the search
  1233. X! **    string should be entered with spaces instead of tabs and without the
  1234. X! **    formatting characters when not in Binary or Verbose mode (plus -t or
  1235. X! **    :Ot set for tabs).
  1236. X! */
  1237. X! unsigned char *back_search_region(unsigned char *beg,unsigned char *end,
  1238. X!                                   unsigned char *key)
  1239. X  `7B
  1240. X      char ch,ch2,char1,work`5B80`5D;
  1241. X      unsigned char *pos,*save_pos,*b,*e,*i;
  1242. X**************
  1243. X*** 68,76
  1244. X `20
  1245. X  unsigned char *back_search_region(unsigned char *beg,unsigned char *end, u
  1246. Vnsigned char *key)
  1247. X  `7B
  1248. X!     char ch, ch2,char1,work`5B80`5D;
  1249. X!     unsigned char *pos;
  1250. X!     int key_len,j, str_len;
  1251. X `20
  1252. X      if (MOST_C_OPT)
  1253. X        `7B
  1254. X--- 301,311 -----
  1255. X  unsigned char *back_search_region(unsigned char *beg,unsigned char *end,
  1256. X                                    unsigned char *key)
  1257. X  `7B
  1258. X!     char ch,ch2,char1,work`5B80`5D;
  1259. X!     unsigned char *pos,*save_pos,*b,*e,*i;
  1260. X!     int key_len,j,s,str_len,tab_flag;
  1261. X!     extern int M_FLAG;
  1262. X!     extern char *M_POS;
  1263. X `20
  1264. X      if (MOST_C_OPT)
  1265. X        `7B
  1266. X**************
  1267. X*** 97,102
  1268. X     `20
  1269. X      while(1)
  1270. X        `7B
  1271. X            while (ch = *end, ch = upcase(ch), ch != char1)
  1272. X              `7B
  1273. X                  if (beg > end) return(EOB);
  1274. X--- 332,340 -----
  1275. X     `20
  1276. X      while(1)
  1277. X        `7B
  1278. X+ again:
  1279. X+           tab_flag = 0;
  1280. X+           S_DIFF = 0;
  1281. X            while (ch = *end, ch = upcase(ch), ch != char1)
  1282. X              `7B
  1283. X                  if (beg > end) return(EOB);
  1284. X**************
  1285. X*** 100,105
  1286. X            while (ch = *end, ch = upcase(ch), ch != char1)
  1287. X              `7B
  1288. X                  if (beg > end) return(EOB);
  1289. X                  end--;
  1290. X              `7D
  1291. X            end--;
  1292. X--- 338,352 -----
  1293. X            while (ch = *end, ch = upcase(ch), ch != char1)
  1294. X              `7B
  1295. X                  if (beg > end) return(EOB);
  1296. X+                 if (!MOST_B_OPT)
  1297. X+                   `7B
  1298. X+                       if((!MOST_V_OPT `7C`7C !MOST_T_OPT) &&
  1299. X+                          char1 == ' ' && ch == '\t')
  1300. X+                         `7B
  1301. X+                             tab_flag = 1;
  1302. X+                             break;
  1303. X+                         `7D
  1304. X+                   `7D
  1305. X                  end--;
  1306. X              `7D
  1307. X            end--;
  1308. X**************
  1309. X*** 103,111
  1310. X                  end--;
  1311. X              `7D
  1312. X            end--;
  1313. X!           /* so we have a position of possible match */
  1314. X!`20
  1315. X!           j = key_len - 2;
  1316. X            pos = end;  /* save this position so we start from here again */
  1317. X            while(ch = *end--, ch = upcase(ch),
  1318. X                  ch2 = work`5Bj`5D, (ch == ch2) && (j >= 0)) j--;
  1319. X--- 350,415 -----
  1320. X                  end--;
  1321. X              `7D
  1322. X            end--;
  1323. X!            `20
  1324. X!           /*
  1325. X!           **  We have a position of possible match.
  1326. X!           **  If not Binary mode,
  1327. X!           **    skip if not Verbose mode and it's in an <ESC>`5B#m
  1328. +-+-+-+-+-+-+-+-  END  OF PART 3 +-+-+-+-+-+-+-+-
  1329.  
  1330.