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

Defined functions

help_art defined in line 78; used 2 times
help_init defined in line 16; used 2 times
help_ng defined in line 161; used 2 times
help_page defined in line 22; used 2 times
help_subs defined in line 235; used 2 times
Last modified: 1986-03-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1474
Valid CSS Valid XHTML 1.0 Strict