home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / rn_4_3_blars.lzh / help.c < prev    next >
Text File  |  1990-08-24  |  10KB  |  321 lines

  1. /* $Header: help.c,v 4.3.2.1 90/03/22 23:10:10 sob Exp $
  2.  *
  3.  * $Log:    help.c,v $
  4.  * Revision 4.3.2.1  90/03/22  23:10:10  sob
  5.  * checkpoint
  6.  * 
  7.  * Revision 4.3.1.2  85/09/10  11:05:39  lwall
  8.  * Improved %m in in_char().
  9.  * 
  10.  * Revision 4.3.1.1  85/05/10  11:33:10  lwall
  11.  * Branch for patches.
  12.  * 
  13.  * Revision 4.3  85/05/01  11:38:59  lwall
  14.  * Baseline for release with 4.3bsd.
  15.  * 
  16.  */
  17.  
  18. #include "EXTERN.h"
  19. #include "common.h"
  20. #include "rn.h"
  21. #include "term.h"
  22. #include "INTERN.h"
  23. #include "help.h"
  24.  
  25. void
  26. help_init()
  27. {
  28.     ;
  29. }
  30.  
  31. int
  32. help_page()
  33. {
  34.     int cmd;
  35.  
  36. #ifdef PAGERHELP
  37.     doshell(sh,filexp(PAGERHELP));
  38. #else
  39.     page_init();
  40.     if ((cmd = print_lines("\
  41. Paging commands:\n\
  42. ",STANDOUT)) ||
  43.     (cmd = print_lines("\n\
  44. SP    Display the next page.\n\
  45. x    Display the next page decrypted (rot13).\n\
  46. d    Display half a page more.\n\
  47. CR    Display one more line.\n\
  48. ^R,v,^X    Restart the current article (v=verbose header, ^X=rot13).\n\
  49. ",NOMARKING)) ||
  50.     (cmd = print_lines("\
  51. ^B    Back up one page.\n\
  52. ^L,X    Refresh the screen (X=rot13).\n\
  53. g pat    Go to (search forward within article for) pattern.\n\
  54. G    Search again for current pattern within article.\n\
  55. ^G    Search for next line beginning with \"Subject:\".\n\
  56. TAB    Search for next line beginning with a different character.\n\
  57. q    Quit the pager, go to end of article.  Leave article read or unread.\n\
  58. j    Junk this article (mark it read).  Goes to end of article.\n\
  59. \n\
  60. ",NOMARKING)) ||
  61.     (cmd = print_lines("\
  62. The following commands skip the rest of the current article, then behave\n\
  63. just as if typed to the 'What next?' prompt at the end of the article:\n\
  64. ",STANDOUT)) ||
  65.     (cmd = print_lines("\n\
  66. n    Scan forward for next unread article.\n\
  67. N    Go to next article.\n\
  68. ^N    Scan forward for next unread article with same title.\n\
  69. p,P,^P    Same as n,N,^N, only going backwards.\n\
  70. -    Go to previously displayed article.\n\
  71. \n\
  72. ",NOMARKING)) ||
  73.     (cmd = print_lines("\
  74. The following commands also take you to the end of the article.\n\
  75. Type h at end of article for a description of these commands:\n\
  76. ",STANDOUT)) ||
  77.     (cmd = print_lines("\
  78.     # $ & / = ? c C f F k K ^K m M number r R ^R s S u v w W Y ^ |\n\
  79. \n\
  80. (To return to the middle of the article after one of these commands, type ^L.)\n\
  81. ",NOMARKING)) )
  82.     return cmd;
  83. #endif
  84.     return 0;
  85. }
  86.  
  87. int
  88. help_art()
  89. {
  90.     int cmd;
  91. #ifdef ARTHELP
  92.     doshell(sh,filexp(ARTHELP));
  93. #else
  94.     page_init();
  95.     if ((cmd = print_lines("\
  96. Article Selection commands:\n\
  97. ",STANDOUT)) ||
  98.     (cmd = print_lines("\n\
  99. n,SP    Scan forward for next unread article.\n\
  100. N    Go to next article.\n\
  101. ^N    Scan forward for next unread article with same subject.\n\
  102. p,P,^P    Same as n,N,^N, only going backwards.\n\
  103. -    Go to previously displayed article.\n\
  104. ",NOMARKING)) ||
  105.     (cmd = print_lines("\
  106. number    Go to specified article.\n\
  107. range{,range} command{:command}\n\
  108.     Apply one or more commands to one or more ranges of articles.\n\
  109.     Ranges are of the form: number | number-number.  You may use . for\n\
  110.     the current article, and $ for the last article.\n\
  111.      Valid commands are: j, m, M, s, S, and !.\n\
  112. ",NOMARKING)) ||
  113.     (cmd = print_lines("\
  114. /pattern/modifiers\n\
  115.     Scan forward for article containing pattern in the subject line.\n\
  116.     (Use ?pat? to scan backwards; append h to scan headers, a to scan\n\
  117.     entire articles, r to scan read articles, c to make case sensitive.\n\
  118. ",NOMARKING)) ||
  119.     (cmd = print_lines("\
  120. /pattern/modifiers:command{:command}\n\
  121.     Apply one or more commands to the set of articles matching pattern.\n\
  122.     Use a K modifier to save entire command to the KILL file for this\n\
  123.     newsgroup.  Commands m and M, if first, imply an r modifier.\n\
  124.      Valid commands are: j, m, M, s, S, and !.\n\
  125. ",NOMARKING)) ||
  126.     (cmd = print_lines("\
  127. f,F    Submit a followup article (F = include this article).\n\
  128. r,R    Reply through net mail (R = include this article).\n\
  129. s ...    Save to file or pipe via sh.\n\
  130. S ...    Save via preferred shell.\n\
  131. w,W    Like s and S but save without the header.\n\
  132. | ...    Same as s|...\n\
  133. C    Cancel this article, if yours.\n\
  134. ",NOMARKING)) ||
  135.     (cmd = print_lines("\
  136. ^R,v    Restart article (v=verbose).\n\
  137. ^X    Restart article, rot13 mode.\n\
  138. c    Catch up (mark all articles as read).\n\
  139. ^B    Back up one page.\n\
  140. ^L    Refresh the screen.  You can get back to the pager with this.\n\
  141. X    Refresh screen in rot13 mode.\n\
  142. ",NOMARKING)) ||
  143.     (cmd = print_lines("\
  144. ^    Go to first unread article.  Disables subject search mode.\n\
  145. $    Go to end of newsgroup.  Disables subject search mode.\n\
  146. ",NOMARKING)) ||
  147.     (cmd = print_lines("#       Print last article number.\n\
  148. &    Print current values of command-line switches.\n\
  149. &switch {switch}\n\
  150.     Set or unset more switches.\n\
  151. &&    Print current macro definitions.\n\
  152. &&def    Define a new macro.\n\
  153. j    Junk this article (mark it read).  Stays at end of article.\n\
  154. m    Mark article as still unread.\n\
  155. M    Mark article as still unread upon exiting newsgroup or Y command.\n\
  156. ",NOMARKING)) ||
  157.     (cmd = print_lines("\
  158. Y    Yank back articles marked temporarily read via M.\n\
  159. k    Mark current SUBJECT as read.\n\
  160. K    Mark current SUBJECT as read, and save command in KILL file.\n\
  161. =    List subjects of unread articles.\n\
  162. u    Unsubscribe to this newsgroup.\n\
  163. ^K    Edit local KILL file (the one for this newsgroup).\n\
  164. q    Quit this newsgroup for now.\n\
  165. Q    Quit newsgroup, staying at current newsgroup.\n\
  166. ",NOMARKING)) )
  167.     return cmd;
  168. #endif
  169.     return 0;
  170. }
  171.  
  172. int
  173. help_ng()
  174. {
  175.     int cmd;
  176. #ifdef NGHELP
  177.     doshell(sh,filexp(NGHELP));
  178. #else
  179.     page_init();
  180.     if (cmd = print_lines("\
  181. Newsgroup Selection commands:\n\
  182. ",STANDOUT) )
  183.     return cmd;
  184.     if (ng != nextrcline) {
  185.     if (cmd = print_lines("\
  186. \n\
  187. y,SP    Do this newsgroup now.\n\
  188. .cmd    Do this newsgroup, executing cmd as first command.\n\
  189. =    Equivalent to .=<carriage return>.\n\
  190. u    Unsubscribe from this newsgroup.\n\
  191. c    Catch up (mark this newsgroup all read).\n\
  192. ",NOMARKING) )
  193.         return cmd;
  194.     }
  195.     if ((cmd = print_lines("\
  196. \n\
  197. n    Go to the next newsgroup with unread news.\n\
  198. N    Go to the next newsgroup.\n\
  199. p    Go to the previous newsgroup with unread news.\n\
  200. P    Go to the previous newsgroup.\n\
  201. ",NOMARKING)) ||
  202.     (cmd = print_lines("\
  203. -    Go to the previously displayed newsgroup.\n\
  204. 1    Go to the first newsgroup.\n\
  205. ^    Go to the first newsgroup with unread news.\n\
  206. $    Go to the last newsgroup.\n\
  207. ",NOMARKING)) ||
  208.     (cmd = print_lines("\
  209. g name    Go to the named newsgroup.  Subscribe to new newsgroups this way too.\n\
  210. /pat    Search forward for newsgroup matching pattern.\n\
  211. ?pat    Search backward for newsgroup matching pattern.\n\
  212.     (Use * and ? style patterns.  Append r to include read newsgroups.)\n\
  213. ",NOMARKING)) ||
  214.     (cmd = print_lines("\
  215. l pat    List unsubscribed newsgroups containing pattern.\n\
  216. m name    Move named newsgroup elsewhere (no name moves current newsgroup).\n\
  217. o pat    Only display newsgroups matching pattern.  Omit pat to unrestrict.\n\
  218. a pat    Like o, but also scans for unsubscribed newsgroups matching pattern.\n\
  219. L    List current .newsrc.\n\
  220. ",NOMARKING)) ||
  221.     (cmd = print_lines("\
  222. &    Print current command-line switch settings.\n\
  223. &switch {switch}\n\
  224.     Set (or unset) more command-line switches.\n\
  225. &&    Print current macro definitions.\n\
  226. &&def    Define a new macro.\n\
  227. !cmd    Shell escape.\n\
  228. ",NOMARKING)) ||
  229.     (cmd = print_lines("\
  230. q    Quit rn.\n\
  231. ^K    Edit the global KILL file.  Use commands like /pattern/j to suppress\n\
  232.     pattern in every newsgroup.\n\
  233. v    Print version.\n\
  234. ",NOMARKING)) )
  235.     return cmd;
  236. #endif
  237. #ifdef PUSHBACK
  238.     if (cmd = get_anything())
  239.     return cmd;
  240.     show_macros();
  241. #endif
  242.     return 0;
  243. }
  244.  
  245. #ifdef ESCSUBS
  246. int
  247. help_subs()
  248. {
  249.     int cmd;
  250. #ifdef SUBSHELP
  251.     doshell(sh,filexp(SUBSHELP));
  252. #else
  253.     page_init();
  254.     if ((cmd = print_lines("\
  255. Valid substitutions are:\n\
  256. ",STANDOUT)) ||
  257.     (cmd = print_lines("\
  258. \n\
  259. a    Current article number\n\
  260. A    Full name of current article (%P/%c/%a)\n\
  261. b    Destination of last save command, often a mailbox\n\
  262. B    Bytes to ignore at beginning of last saved article\n\
  263. ",NOMARKING)) ||
  264.     (cmd = print_lines("\
  265. c    Current newsgroup, directory form\n\
  266. C    Current newsgroup, dot form\n\
  267. d    Full name of newsgroup directory (%P/%c)\n\
  268. D    Distribution line from current article\
  269. ",NOMARKING)) ||
  270.     (cmd = print_lines("\
  271. f    Who the current article is from\n\
  272. F    Newsgroups to followup to (from Newsgroups and Followup-To)\n\
  273. h    (This help message)\n\
  274. H    Host name (yours)\n\
  275. i    Message-I.D. line from current article, with <>\n\
  276. I    Reference indicator mark (see -F switch)\n\
  277. ",NOMARKING)) ||
  278.     (cmd = print_lines("\
  279. l    News administrator's login name, if any\n\
  280. L    Login name (yours)\n\
  281. m    Current mode, first letter of (init, newsgroup, article, pager,\n\
  282.         Add, Catchup, Delete bogus, Mailbox, Resubscribe)\n\
  283. M    Number of article marked with M\n\
  284. n    Newsgroups from current article\n\
  285. N    Full name (yours)\n\
  286. ",NOMARKING)) ||
  287.     (cmd = print_lines("\
  288. o    Organization (yours)\n\
  289. O    Original working directory (where you ran rn from)\n\
  290. p    Your private news directory (from -d)\n\
  291. P    Public news spool directory\n\
  292. ",NOMARKING)) ||
  293.     (cmd = print_lines("\
  294. r    Last reference (parent article id)\n\
  295. R    References list for followup article\n\
  296. s    Subject, with all Re's and (nf)'s stripped off\n\
  297. S    Subject, with one Re stripped off\
  298. ",NOMARKING)) ||
  299.     (cmd = print_lines("\
  300. t    New To line derived from From and Reply-To (Internet format)\n\
  301. T    New To line derived from Path\n\
  302. u    Number of unread articles\n\
  303. U    Number of unread articles not counting current article\n\
  304. x    News library directory\n\
  305. X    Rn library directory\n\
  306. z    Length of current article in bytes\n\
  307. ",NOMARKING)) ||
  308.     (cmd = print_lines("\
  309. ~    Your home directory\n\
  310. .    Directory containing . files\n\
  311. $    Current process number\n\
  312. /    Last search string\n\
  313. ESC    Run preceding command through % interpretation\n\
  314. ",NOMARKING)) )
  315.     return cmd;
  316. #endif
  317.     return 0;
  318. }
  319. #endif
  320.  
  321.