home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume31 / tin / part09 < prev    next >
Encoding:
Text File  |  1992-07-07  |  52.0 KB  |  1,447 lines

  1. Newsgroups: comp.sources.misc
  2. From: iain%anl433.uucp@Germany.EU.net (Iain Lea)
  3. Subject:  v31i009:  tin - threaded full screen newsreader v1.1 PL4, Part09/15
  4. Message-ID: <1992Jul7.181746.7648@sparky.imd.sterling.com>
  5. X-Md4-Signature: f5cb28a35600b63580f76655b35eb952
  6. Date: Tue, 7 Jul 1992 18:17:46 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: iain%anl433.uucp@Germany.EU.net (Iain Lea)
  10. Posting-number: Volume 31, Issue 9
  11. Archive-name: tin/part09
  12. Environment: BSD, SCO, ISC, SUNOS, SYSVR3, SYSVR4, ULTRIX, XENIX
  13. Supersedes: tin: Volume 30, Issue 1-14
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then feed it
  17. # into a shell via "sh file" or similar.  To overwrite existing files,
  18. # type "sh file -c".
  19. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  20. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  21. # Contents:  kill lang.c rcfile.c
  22. # Wrapped by kent@sparky on Mon Jun 29 23:35:13 1992
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 9 (of 15)."'
  26. if test -f 'kill' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'kill'\"
  28. else
  29.   echo shar: Extracting \"'kill'\" \(489 characters\)
  30.   sed "s/^X//" >'kill' <<'END_OF_FILE'
  31. X# 1st line  1=(Subject: only)  2=(From: only)  3=(Subject: & From:)
  32. X#           K=(kill) H=(auto-selection)
  33. X# 2nd line  0=(kill on all newsgroups)  >0=(kill on specific newsgroup)
  34. X#
  35. X# 001 HOT
  36. X2    H
  37. X0
  38. X*Chris Torek*
  39. X#
  40. X# 002 HOT
  41. X2    H
  42. X0
  43. X*Stallman*
  44. X#
  45. X# 003 HOT
  46. X2    H
  47. X0
  48. X*Randal L. Schwartz*
  49. X#
  50. X# 004 HOT
  51. X2    H
  52. X0
  53. X*Larry Wall*
  54. X#
  55. X# 005 HOT
  56. X2    H
  57. X0
  58. X*Syd Weinstein*
  59. X#
  60. X# 006 HOT
  61. X2    H
  62. X0
  63. X*Tom Christiansen*
  64. X#
  65. X# 007 HOT
  66. X2    H
  67. X0
  68. X*Geoff Collyer*
  69. X#
  70. X# 008 HOT
  71. X2    H
  72. X0
  73. X*Michael I Bushnell*
  74. X#
  75. X# 009 HOT
  76. X2    H
  77. X0
  78. X*Henry Spencer*
  79. END_OF_FILE
  80.   if test 489 -ne `wc -c <'kill'`; then
  81.     echo shar: \"'kill'\" unpacked with wrong size!
  82.   fi
  83.   # end of 'kill'
  84. fi
  85. if test -f 'lang.c' -a "${1}" != "-c" ; then 
  86.   echo shar: Will not clobber existing file \"'lang.c'\"
  87. else
  88.   echo shar: Extracting \"'lang.c'\" \(24092 characters\)
  89.   sed "s/^X//" >'lang.c' <<'END_OF_FILE'
  90. X/*
  91. X *  Project   : tin - a threaded Netnews reader
  92. X *  Module    : lang.c
  93. X *  Author    : I.Lea
  94. X *  Created   : 01-04-91
  95. X *  Updated   : 20-06-92
  96. X *  Notes     :
  97. X *  Copyright : (c) Copyright 1991-92 by Iain Lea
  98. X *              You may  freely  copy or  redistribute  this software,
  99. X *              so  long as there is no profit made from its use, sale
  100. X *              trade or  reproduction.  You may not change this copy-
  101. X *              right notice, and it must be included in any copy made
  102. X */
  103. X
  104. X/*
  105. X * active.c
  106. X */
  107. Xchar txt_subscribe_to_new_group[] = "Subscribe to %s (y/n): ";
  108. Xchar txt_delete_bogus_group[] = "Remove bogus group %s (y/n): ";
  109. Xchar txt_reading_active_file[] = "Reading active file...";
  110. Xchar txt_reading_newsgroups_file[] = "Reading newsgroups file...";
  111. X
  112. X/*
  113. X *  art.c
  114. X */
  115. X
  116. Xchar txt_group[] = "Group %s...";
  117. Xchar txt_cannot_open_art[] = "can't open article %s: ";
  118. Xchar txt_indexing[] = "Indexing %s...";
  119. Xchar txt_indexing_num[] = "Indexing %s...%4d";
  120. Xchar txt_corrupt_index[] = "Index file %s corrupted. error %d on article %d";
  121. Xchar txt_checking_for_news[] = "Checking for news...";
  122. Xchar txt_there_is_no_news[] = "There is no news\n";
  123. Xchar txt_killing_arts[] = "Selecting articles...";
  124. Xchar txt_unkilling_arts[] = "Unselecting articles...";
  125. X
  126. X/*
  127. X *  feed.c
  128. X */
  129. X
  130. Xchar txt_art_thread_regex_tag[] = " a)rticle, t)hread, h)ot, p)attern, T)agged articles, q)uit: ";
  131. Xchar txt_post_process_type[] = "Process n)one, s)har, u)udecode, U)udecode & zoo: ";
  132. X#ifdef NO_REGEX 
  133. Xchar txt_feed_pattern[] = "Enter pattern [%s]> ";
  134. X#else
  135. Xchar txt_feed_pattern[] = "Enter regex pattern [%s]> ";
  136. X#endif
  137. Xchar txt_no_command[] = "No command";
  138. Xchar txt_piping[] = "Piping...";
  139. Xchar txt_saved[] = "-- %d Article(s) saved --";
  140. X
  141. X/*
  142. X *  group.c
  143. X */
  144. X
  145. Xchar txt_cannot_post[] = "*** Posting not allowed ***";
  146. Xchar txt_tagged_art[] = "Tagged article";
  147. Xchar txt_untagged_art[] = "Uuntagged article";
  148. Xchar txt_inverse_on[] = "Inverse video enabled";
  149. Xchar txt_inverse_off[] = "Inverse video disabled";
  150. Xchar txt_subscribed_to[] = "Subscribed to %s";
  151. Xchar txt_unsubscribed_to[] = "Unsubscribed from %s";
  152. Xchar txt_mark_all_read[] = "Mark all articles as read? (y/n): ";
  153. Xchar txt_mark_thread_read[] = "Mark thread as read? (y/n): ";
  154. Xchar txt_no_more_groups[] = "No more groups";
  155. Xchar txt_no_prev_group[] = "No previous group";
  156. Xchar txt_no_arts[] = "*** No Articles ***";
  157. Xchar txt_no_groups[] = "*** No Groups ***";
  158. Xchar txt_not_active_newsfeed[] = "Command only allowed on active news";
  159. Xchar txt_end_of_thread[] = "*** End of Thread ***";
  160. Xchar txt_end_of_arts[] = "*** End of Articles ***";
  161. Xchar txt_end_of_groups[] = "*** End of Groups ***";
  162. Xchar txt_no_next_unread_art[] = "No next unread article";
  163. Xchar txt_no_prev_unread_art[] = "No previous unread article";
  164. Xchar txt_no_last_message[] = "No last message";
  165. Xchar txt_bad_command[] = "Bad command.  Type 'h' for help.";
  166. Xchar txt_you_have_mail[] = "    You have mail\n";
  167. Xchar txt_type_h_for_help[] = "           h=help\n";
  168. Xchar txt_read_art[] = "Read article> ";
  169. Xchar txt_search_forwards[] = "Search forwards [%s]> ";
  170. Xchar txt_search_backwards[] = "Search backwards [%s]> ";
  171. Xchar txt_author_search_forwards[] = "Author search forwards [%s]> ";
  172. Xchar txt_author_search_backwards[] = "Author search backwards [%s]> ";
  173. Xchar txt_no_search_string[] = "No search string";
  174. Xchar txt_no_match[] = "No match";
  175. Xchar txt_post_subject[] = "Post subject [%s]> ";
  176. Xchar txt_no_subject[] = "No subject";
  177. Xchar txt_cannot_open[] = "can't open %s";
  178. Xchar txt_posting[] = "Posting article...";
  179. Xchar txt_art_posted[] = "-- Article posted --";
  180. Xchar txt_art_rejected[] = "-- Article rejected (saved to %s) --";
  181. Xchar txt_quit_edit_post[] = "q)uit, e)dit, p)ost: ";
  182. Xchar txt_help_4[] = "4$       Goto spooldir 4 ($=goto last spooldir)\r\n";
  183. Xchar txt_help_i_4[] = "4$       Goto article 4 ($=goto last article)\r\n";
  184. Xchar txt_help_ctrl_k[] = "^K       Kill / Auto select (hot) current article\r\n";
  185. Xchar txt_help_ctrl_l[] = "^L       Redraw page\r\n";
  186. Xchar txt_help_ctrl_d[] = "^D^U     Down (^U=up) a page\r\n";
  187. Xchar txt_help_ctrl_f[] = "^F^B     Down (^B=up) a page\r\n";
  188. Xchar txt_help_i_cr[] = "<CR>     Read current article\r\n";
  189. Xchar txt_help_cr[] = "<CR>     Read news from selected spooldir\r\n";
  190. Xchar txt_help_i_tab[] = "<TAB>    Goto next unread article or group\r\n";
  191. Xchar txt_help_d[] = "d        Toggle display of subject only & subject/author\r\n";
  192. Xchar txt_help_l[] = "l        List articles within current thread\r\n";
  193. Xchar txt_help_m[] = "m        Move current group within group selection list\r\n";
  194. Xchar txt_help_M[] = "M        Menu of configurable options\r\n";
  195. Xchar txt_help_a[] = "aA       Author forward (A=backward) search\r\n";
  196. Xchar txt_help_sel_c[] = "cC       Mark group read (C=and goto next unread group)\r\n";
  197. Xchar txt_help_c[] = "c        Mark all articles as read and goto group selection menu\r\n";
  198. Xchar txt_help_g[] = "g        Choose a new group by name\r\n";
  199. Xchar txt_help_I[] = "I        Toggle inverse video\r\n";
  200. Xchar txt_help_K[] = "K        Mark article/thread as read & goto next unread\r\n";
  201. Xchar txt_help_j[] = "jk       Down (k=up) a line\r\n";
  202. Xchar txt_help_i_n[] = "np       Goto next (p=previous) group\r\n";
  203. Xchar txt_help_i_p[] = "NP       Goto next (P=previous) unread article\r\n";
  204. Xchar txt_help_q[] = "Q        Quit\r\n";
  205. Xchar txt_help_r[] = "r        Toggle display to show all / only unread articles\r\n";
  206. Xchar txt_help_s[] = "su       Subscribe (u=unsubscribe) to current group\r\n";
  207. Xchar txt_help_S[] = "SU       Subscribe (U=unsubscribe) to groups that match pattern\r\n";
  208. Xchar txt_help_t[] = "t        Return to group selection level\r\n";
  209. Xchar txt_help_T[] = "T        Tag current article for crossposting/mailing/piping/printing/saving\r\n";
  210. Xchar txt_help_u[] = "u        Toggle display of unthreaded & threaded articles\r\n";
  211. Xchar txt_help_U[] = "U        Untag all tagged articles\r\n";
  212. Xchar txt_help_v[] = "v        Show version information\r\n";
  213. Xchar txt_help_w[] = "w        Post an article to current group\r\n";
  214. Xchar txt_help_x[] = "x        Crosspost current article to another group\r\n";
  215. Xchar txt_help_i_search[] = "/?       Subject forward (?=backward) search\r\n";
  216. Xchar txt_help_thread[] = "<>       Goto first (>=last) article in current thread\r\n";
  217. X#ifndef NO_SHELL_ESCAPE
  218. Xchar txt_help_shell[] = "!        Shell escape\r\n";
  219. X#endif
  220. Xchar txt_help_dash[] = "-        Show last message\r\n";
  221. Xchar txt_help_i_star[] = "*        Select thread\r\n";
  222. Xchar txt_help_i_dot[] = ".        Toggle selection of thread\r\n";
  223. Xchar txt_help_i_coma[] = "@        Reverse all selections (all articles)\r\n";
  224. Xchar txt_help_i_tilda[] ="~        Undo all selections (all articles)\r\n";
  225. Xchar txt_help_X[] = "X        Mark all unread articles that have not been selected as read\r\n";
  226. Xchar txt_help_plus[] = "+        Perform auto-selection on group\r\n";
  227. Xchar txt_help_equal[] = "=        Mark threads selected if at least one unread art is selected\r\n";
  228. Xchar txt_help_semicolon[] = ";        Mark threads selected if at least one unread art is selected\r\n";
  229. X#ifdef NO_REGEX 
  230. Xchar txt_save_pattern[] = "Enter save pattern [%s]> ";
  231. X#else
  232. Xchar txt_save_pattern[] = "Enter regex save pattern [%s]> ";
  233. X#endif
  234. Xchar txt_saved_pattern_to[] = "-- Saved pattern to %s - %s --";
  235. Xchar txt_saved_to_mailbox[] = "-- Saved to mailbox %s --";
  236. Xchar txt_threading_arts[] = "Threading articles...";
  237. Xchar txt_unthreading_arts[] = "Unthreading articles...";
  238. Xchar txt_select_pattern[] = "Enter selection pattern [%s]> ";
  239. X
  240. X/* 
  241. X *  help.c:
  242. X */
  243. X
  244. Xchar txt_group_select_com[] = "Group Selection Commands (page %d of %d)";
  245. Xchar txt_spooldir_com[] = "Spooldir Selection Commands (page %d of %d)";
  246. Xchar txt_index_page_com[] = "Index Page Commands (page %d of %d)";
  247. Xchar txt_thread_com[] = "Thread Commands (page %d of %d)";
  248. Xchar txt_art_pager_com[] = "Article Pager Commands (page %d of %d)";
  249. Xchar txt_hit_space_for_more[] = "PgDn,End,<SPACE>,^D - page down. PgUp,Home,b,^U - page up. <CR>,q - quit";
  250. Xchar txt_post_history_menu[] = "Posted articles history (page %d of %d)";
  251. X
  252. X/* 
  253. X *  kill.c:
  254. X */
  255. X
  256. Xchar txt_corrupt_kill_file[] = "Corrupt kill file %s";
  257. Xchar txt_kill_menu[] = "Kill Article Menu";
  258. Xchar txt_kill_how[] = "Kill type : ";
  259. Xchar txt_kill_subject[] = "Kill Subject [%-*.*s] (y/n): ";
  260. Xchar txt_kill_from[] =    "Kill From    [%-*.*s] (y/n): ";
  261. Xchar txt_kill_text[] = "Kill text pattern : ";
  262. Xchar txt_kill_text_type[] = "Apply pattern to  : ";
  263. Xchar txt_kill_group[] =     "Kill pattern scope: ";
  264. Xchar txt_help_kill_how[] = "Choose kill or auto select. <SPACE> toggles & <CR> sets.";
  265. Xchar txt_help_kill_subject[] = "Subject: line to add to kill file. <SPACE> toggles & <CR> sets.";
  266. Xchar txt_help_kill_from[] = "From: line to add to kill file. <SPACE> toggles & <CR> sets.";
  267. Xchar txt_help_kill_text[] = "Enter text pattern to kill if Subject: & From: lines are not what you want.";
  268. Xchar txt_help_kill_text_type[] = "Select where text pattern should be applied. <SPACE> toggles & <CR> sets.";
  269. Xchar txt_help_kill_group[] = "Kill/auto-select only current group or all groups. <SPACE> toggles & <CR> sets.";
  270. Xchar txt_quit_edit_save_killfile[] = "q)uit e)dit s)ave kill/hot description: ";
  271. X
  272. X
  273. X/* 
  274. X *  main.c:
  275. X */
  276. X
  277. Xchar txt_option_not_enabled[] = "Option not enabled. Recompile with %s.";
  278. Xchar txt_not_in_active_file[] = "Group %s not found in active file";
  279. Xchar txt_screen_init_failed[] = "%s: Screen initialization failed";
  280. Xchar txt_bad_active_file[] = "Active file corrupt - %s";
  281. X
  282. X/*
  283. X *  misc.c
  284. X */
  285. X
  286. Xchar txt_cannot_open_active_file[] = "Cannot open %s. Try %s -r to read news via NNTP.\n";
  287. Xchar txt_active_file_is_empty[] = "%s contains no newsgroups. Exiting.";
  288. Xchar txt_checking_active_file[] = "Checking for new newsgroups...";
  289. Xchar txt_checking[] = "Checking...";
  290. Xchar txt_cannot_find_base_art[] = "Cannot find base article %s";
  291. Xchar txt_out_of_memory[] = "%s: out of memory";
  292. Xchar txt_rename_error[] = "Error: rename %s to %s";
  293. Xchar txt_shell_escape[] = "Enter shell command [%s]> ";
  294. X
  295. X/*
  296. X *  newsrc.c
  297. X */
  298. X
  299. Xchar txt_creating_newsrc[] = "Creating .newsrc...\n";
  300. Xchar txt_deleting_from_newsrc[] = "Group %s not in active file. Deleting.";
  301. X
  302. X/*
  303. X *  open.c
  304. X */
  305. Xchar txt_connecting[] = "Connecting to %s...";
  306. Xchar txt_cannot_get_nntp_server_name[] = "Cannot find NNTP server name";
  307. Xchar txt_server_name_in_file_env_var[] = "Put the server name in the file %s,\nor set the environment variable NNTPSERVER";
  308. Xchar txt_failed_to_connect_to_server[] = "Failed to connect to (%s) server";
  309. Xchar txt_rejected_by_nntpserver[] = "Rejected by server, nntp error %d";
  310. Xchar txt_connection_to_server_broken[] = "Connection to server broken";
  311. Xchar txt_stuff_nntp_cannot_open[] = "stuff_nntp: can't open %s: ";
  312. Xchar txt_nntp_to_fp_cannot_reopen[] = "nntp_to_fp: can't reopen %s: ";
  313. Xchar txt_nntp_to_fd_cannot_reopen[] = "nntp_to_fd: can't reopen %s: ";
  314. X
  315. X/*
  316. X *  page.c
  317. X */
  318. X
  319. Xchar txt_quit[] = "Do you really want to quit? (y/n): ";
  320. Xchar txt_art_unavailable[] = "Article %ld unavailable";
  321. Xchar txt_art_marked_as_unread[] = "Article marked as unread";
  322. Xchar txt_thread_marked_as_unread[] = "Thread marked as unread";
  323. Xchar txt_begin_of_art[] = "*** Beginning of article ***";
  324. Xchar txt_next_resp[] = "-- Next response --";
  325. Xchar txt_last_resp[] = "-- Last response --";
  326. Xchar txt_more[] = "--More--";
  327. Xchar txt_more_percent[] = "--More--(%d%%) [%ld/%ld]";
  328. Xchar txt_thread_x_of_n[] = "%sThread %4d of %4d\r\n";
  329. Xchar txt_art[] = "Article %ld  ";
  330. Xchar txt_resp_x_of_n[] = "Respno %3d of %3d\r\n";
  331. Xchar txt_no_resp[] = "No responses\r\n";
  332. Xchar txt_1_resp[] = "1 Response\r\n";
  333. Xchar txt_x_resp[] = "%d Responses\r\n";
  334. Xchar txt_s_at_s[] = "%s at %s";
  335. Xchar txt_thread_resp_page[] = "Thread %d of %d, Resp %d (page %d):  %s";
  336. Xchar txt_thread_page[] = "Thread %d of %d (page %d):  %s";
  337. Xchar txt_read_resp[] = "Read response> ";
  338. Xchar txt_help_p_0[] = "0        Read the base article in current thread\r\n";
  339. Xchar txt_help_p_4[] = "4        Read response 4 in current thread\r\n";
  340. Xchar txt_help_p_cr[] = "<CR>     Goto to next thread\r\n";
  341. Xchar txt_help_p_tab[] = "<TAB>    Goto next unread article\r\n";
  342. Xchar txt_help_b[] = "b<SPACE> Back (<SPACE>=forward) a page\r\n";
  343. Xchar txt_help_bug[] = "B        Mail bug/comment to %s\r\n";
  344. Xchar txt_help_p_f[] = "fF       Post (F=copy text) a followup\r\n";
  345. Xchar txt_help_C[] = "C        Cancel current article that must have been posted by you\r\n";
  346. Xchar txt_help_ctrl_h[] = "^H       Show articles header\r\n";
  347. Xchar txt_help_h[] = "h        Command help\r\n";
  348. Xchar txt_help_i[] = "q        Return to previous level\r\n";
  349. Xchar txt_help_ck[] = "ck       Mark thread as read & return to previous level\r\n";
  350. Xchar txt_help_p_k[] = "kK       Mark article (K=thread) as read & advance to next unread\r\n";
  351. Xchar txt_help_p_m[] = "m        Mail article/thread/hot/pattern/tagged articles to someone\r\n";
  352. Xchar txt_help_p_n[] = "nN       Goto to the next (N=unread) article\r\n";
  353. Xchar txt_help_o[] = "o        Output article/thread/hot/pattern/tagged articles to printer\r\n";
  354. Xchar txt_help_p_p[] = "pP       Goto the previous (P=unread) article\r\n";
  355. Xchar txt_help_p_r[] = "rR       Reply through mail (R=copy text) to author\r\n";
  356. Xchar txt_help_p_s[] = "s        Save article/thread/hot/pattern/tagged articles to file\r\n";
  357. Xchar txt_help_p_z[] = "zZ       Mark article (Z=thread) as unread\r\n";
  358. Xchar txt_help_p_ctrl_r[] = "^R$      Redisplay first ($=last) page of article\r\n";
  359. Xchar txt_help_p_g[] = "gG       Goto first (G=last) page of article\r\n";
  360. Xchar txt_help_p_d[] = "d        Toggle rot-13 decoding for current article\r\n";
  361. Xchar txt_help_pipe[] = "|        Pipe article/thread/hot/pattern/tagged articles into command\r\n";
  362. Xchar txt_help_p_search[] = "/        Article forward search\r\n";
  363. Xchar txt_help_p_star[] = "*        Select article\r\n";
  364. Xchar txt_help_p_dot[] = ".        Toggle article selection\r\n";
  365. Xchar txt_help_p_coma[] = "@        Reverse aarticle selections\r\n";
  366. Xchar txt_help_p_tilda[] = "~        Undo all selections in thread\r\n";
  367. Xchar txt_mail_art_to[] = "Mail article to [%.*s]> ";
  368. Xchar txt_no_mail_address[] = "No mail address";
  369. Xchar txt_quit_edit_send[] = "q)uit, e)dit, s)end";
  370. Xchar txt_quit_edit_cancel[] = "q)uit, e)dit, c)ancel";
  371. Xchar txt_mailing_to[] = "Mailing to %s...";
  372. Xchar txt_mailed[] = "-- %d Article(s) mailed --";
  373. Xchar txt_command_failed_s[] = "Command failed: %s\n";
  374. Xchar txt_in_art_you_write[] = "In article %s you write:\n";
  375. Xchar txt_resp_to_poster[] = "Responses have been directed to the poster. Post anyway? (y/n): ";
  376. Xchar txt_resp_redirect[] = "Responses have been directed to the following newsgroups";
  377. Xchar txt_continue[] = "Continue? (y/n): ";
  378. Xchar txt_writes[] = "%s writes:\n";
  379. Xchar txt_writes_name[] = "%s (%s) writes:\n";
  380. Xchar txt_save_filename[] = "Save filename [%s]> ";
  381. Xchar txt_art_not_saved[] = "-- Article not saved --";
  382. Xchar txt_no_filename[] = "No filename";
  383. Xchar txt_saving[] = "Saving...";
  384. Xchar txt_art_saved_to[] = "-- Article saved to %s --";
  385. Xchar txt_thread_not_saved[] = "-- Thread not saved --";
  386. Xchar txt_thread_saved_to_many[] = "-- Thread saved to %s - %s --";
  387. Xchar txt_thread_saved_to[] = "-- Thread saved to %s --";
  388. Xchar txt_pipe_to_command[] = "Pipe to command [%.*s]> ";
  389. Xchar txt_printing[] = "Printing...";
  390. Xchar txt_printed[] = "-- %d Article(s) printed --";
  391. Xchar txt_append_to_file[] = "File %s exists. Append? (y/n): ";
  392. Xchar txt_toggled_rot13[] = "Toggled rot13 encoding";
  393. X
  394. X/*
  395. X *  post.c
  396. X */
  397. X
  398. Xchar txt_no_arts_posted[] = "No articles have been posted";
  399. Xchar txt_post_an_article[] = "Post an article...";
  400. Xchar txt_post_a_followup[] = "Post a followup...";
  401. Xchar txt_mail_bug_report[] = "Mail bug report...";
  402. Xchar txt_crosspost_group[] = "Crosspost article to group(s) [%s]> ";
  403. Xchar txt_no_group[] = "No group";
  404. Xchar txt_crosspost_an_article[] = "Crossposting article...";
  405. Xchar txt_mail_bug_report_confirm[] = "Mail bug report to %s%s? (y/n): ";
  406. Xchar txt_reply_to_author[] = "Reply to author...";
  407. Xchar txt_no_blank_line[] = "No blank line found after header information. q)uit, e)dit: ";
  408. Xchar txt_cancelling[] = "Cancelling article...";
  409. Xchar txt_art_cancelled[] = "Article cancelled";
  410. Xchar txt_art_cannot_cancel[] = "Article cannot be cancelled";
  411. Xchar txt_quit_edit_xpost[] = "q)uit, e)dit, p)ost [%.*s]: %c";
  412. X
  413. X/*
  414. X *  prompt.c
  415. X */
  416. X
  417. Xchar txt_hit_any_key[] = "-- Press any key to continue --";
  418. X
  419. X/*
  420. X *  rcfile.c
  421. X */
  422. Xchar txt_opt_autosave[] = "1. Auto save       : ";
  423. Xchar txt_opt_start_editor_offset[] = "2. Editor Offset   : ";
  424. Xchar txt_opt_mark_saved_read[] = "3. Mark saved read : ";
  425. Xchar txt_opt_confirm_action[] =  "4. Confirm command : ";
  426. Xchar txt_opt_draw_arrow[] = "5. Draw arrow      : ";
  427. Xchar txt_opt_print_header[] = "6. Print header    : ";
  428. Xchar txt_opt_pos_first_unread[] = "7. Goto 1st unread : ";
  429. Xchar txt_opt_page_scroll[] = "8. Scroll full page: ";
  430. Xchar txt_opt_catchup_groups[] = "9. Catchup on quit : ";
  431. Xchar txt_opt_thread_arts[] =   "10 Thread articles : ";
  432. Xchar txt_opt_show_only_unread[] = "11 Show only unread: ";
  433. Xchar txt_opt_show_description[] = "12 Show description: ";
  434. Xchar txt_opt_show_author[] = "13 Show author     : ";
  435. Xchar txt_opt_process_type[] = "14 Process type    : ";
  436. Xchar txt_opt_sort_type[] = "15 Sort article by : ";
  437. Xchar txt_opt_savedir[] = "16 Save directory  : ";
  438. Xchar txt_opt_maildir[] = "17 Mail directory  : ";
  439. Xchar txt_opt_printer[] = "18 Printer         : ";
  440. Xchar txt_options_menu[] = "Options Menu";
  441. Xchar txt_show_from_none[] = "None";
  442. Xchar txt_show_from_addr[] = "Addr";
  443. Xchar txt_show_from_name[] = "Name";
  444. Xchar txt_show_from_both[] = "Both";
  445. Xchar txt_post_process_none[] = "None";
  446. Xchar txt_post_process_sh[] = "Shell archive";
  447. Xchar txt_post_process_uudecode[] = "Uudecode";
  448. Xchar txt_post_process_uud_lst_zoo[] = "Uudecode & list zoo archive";
  449. Xchar txt_post_process_uud_ext_zoo[] = "Uudecode & extract zoo archive";
  450. Xchar txt_sort_by_nothing[] = "Nothing";
  451. Xchar txt_sort_by_subj_descend[] = "Subject: field (descending)";
  452. Xchar txt_sort_by_subj_ascend[] = "Subject: field (ascending)";
  453. Xchar txt_sort_by_from_descend[] = "From: field (descending)";
  454. Xchar txt_sort_by_from_ascend[] = "From: field (ascending)";
  455. Xchar txt_sort_by_date_descend[] = "Date: field (descending)";
  456. Xchar txt_sort_by_date_ascend[] = "Date: field (ascending)";
  457. Xchar txt_help_autosave[] = "Auto save article/thread by Archive-name: header. <SPACE> toggles & <CR> sets.";
  458. Xchar txt_help_start_editor_offset[] = "Start editor with line offset. <SPACE> toggles & <CR> sets.";
  459. Xchar txt_help_confirm_action[] = "Ask for command confirmation. <SPACE> toggles & <CR> sets.";
  460. Xchar txt_help_print_header[] = "By printing print all/part of header. <SPACE> toggles & <CR> sets.";
  461. Xchar txt_help_pos_first_unread[] = "Put cursor at first/last unread art in groups. <SPACE> toggles & <CR> sets.";
  462. Xchar txt_help_show_author[] = "Show Subject & From (author) fields in group menu. <SPACE> toggles & <CR> sets.";
  463. Xchar txt_help_draw_arrow[] = "Draw -> or highlighted bar for selection. <SPACE> toggles & <CR> sets.";
  464. Xchar txt_help_mark_saved_read[] = "Mark saved articles/threads as read. <SPACE> toggles & <CR> sets."; 
  465. Xchar txt_help_page_scroll[] = "Scroll half/full page of groups/articles. <SPACE> toggles & <CR> sets."; 
  466. Xchar txt_help_catchup_groups[] = "Ask to mark groups read when quiting. <SPACE> toggles & <CR> sets."; 
  467. Xchar txt_help_thread_arts[] = "Enable/disable threading of articles in all groups. <SPACE> toggles & <CR> sets."; 
  468. Xchar txt_help_show_only_unread[] = "Show all articles or only unread articles. <SPACE> toggles & <CR> sets."; 
  469. Xchar txt_help_show_description[] = "Show short description for each newsgroup. <SPACE> toggles & <CR> sets."; 
  470. Xchar txt_help_post_proc_type[] = "Post process (ie. unshar) saved article/thread. <SPACE> toggles & <CR> sets."; 
  471. Xchar txt_help_sort_type[] = "Sort articles by Subject, From or Date fields. <SPACE> toggles & <CR> sets.";
  472. Xchar txt_help_savedir[] = "The directory where you want articles/threads saved.";
  473. Xchar txt_help_maildir[] = "The directory where articles/threads are to be saved in mailbox format.";
  474. Xchar txt_help_printer[] = "The printer program with options that is to be used to print articles/threads.";
  475. Xchar txt_select_rcfile_option[] = "Select option by entering number before text. Any other key to save.";
  476. X
  477. X/*
  478. X *  save.c
  479. X */
  480. X
  481. Xchar txt_post_processing[] = "Post processing...";
  482. Xchar txt_post_processing_finished[] = "-- post processing completed --";
  483. Xchar txt_deleting[] = "Deleting...";
  484. Xchar txt_uudecoding[] = "Uudecoding...";
  485. Xchar txt_extracting_shar[] ="\r\nExtracting %s...\r\n";
  486. Xchar txt_delete_processed_files[] = "Delete saved files that have been post processed? (y/n): ";
  487. Xchar txt_post_processing_failed[] = "Post processing failed";
  488. Xchar txt_listing_archive[] = "\r\n\r\nListing %s archive...\r\n"; 
  489. Xchar txt_extracting_archive[] = "\r\n\r\nExtracting %s archive...\r\n";
  490. Xchar txt_checksum_of_file[] = "\r\n\r\nChecksum of %s...\r\n\r\n"; 
  491. X
  492. X/*
  493. X *  search.c
  494. X */
  495. X
  496. Xchar txt_searching[] = "Searching...";
  497. X
  498. X/*
  499. X *  select.c
  500. X */
  501. X
  502. Xchar txt_moving[] = "Moving %s...";
  503. X#ifdef NO_REGEX
  504. Xchar txt_subscribe_pattern[] = "Enter subscribe pattern> ";
  505. Xchar txt_unsubscribe_pattern[] = "Enter unsubscribe pattern> ";
  506. X#else
  507. Xchar txt_subscribe_pattern[] = "Enter regex subscribe pattern> ";
  508. Xchar txt_unsubscribe_pattern[] = "Enter regex unsubscribe pattern> ";
  509. X#endif
  510. Xchar txt_subscribing[] = "Subscribing...";
  511. Xchar txt_subscribing_to[] = "Subscribing to %s...";
  512. Xchar txt_unsubscribing[] = "Unsubscribing...";
  513. Xchar txt_unsubscribing_from[] = "Unsubscribing from %s...";
  514. Xchar txt_subscribed_num_groups[] = "subscribed to %d groups";
  515. Xchar txt_unsubscribed_num_groups[] = "unsubscribed from %d groups";
  516. Xchar txt_del_group_in_newsrc[] = "Delete %s from .newsrc? (y/n): ";
  517. Xchar txt_group_deleted[] = "Group %s deleted";
  518. Xchar txt_group_undeleted[] = "Group undeleted";
  519. Xchar txt_mark_group_read[] = "Mark group %s as read? (y/n): ";
  520. Xchar txt_no_groups_to_delete[] = "No groups to delete";
  521. Xchar txt_reset_newsrc[] = "Reset newsrc? (y/n): ";
  522. Xchar txt_post_newsgroup[] = "Post newsgroup> ";
  523. Xchar txt_yanking_all_groups[] = "Yanking in all groups...";
  524. Xchar txt_yanking_sub_groups[] = "Yanking in subscribed to groups...";
  525. Xchar txt_no_groups_to_read[] = "No more groups to read";
  526. Xchar txt_added_groups[] = "Added %d group%s";
  527. Xchar txt_plural[] = "s";
  528. Xchar txt_no_groups_to_yank_in[] = "No more groups to yank in";
  529. Xchar txt_group_selection[] = "Group Selection";
  530. Xchar txt_spooldir_selection[] = "Spooldir Selection (%d)";
  531. Xchar txt_select_group[] = "Select group> ";
  532. Xchar txt_select_spooldir[] = "Select spooldir> ";
  533. Xchar txt_help_g_4[] = "4$       Select group 4 ($=select last group)\r\n";
  534. Xchar txt_help_g_ctrl_r[] = "^R       Reset .newsrc\r\n";
  535. Xchar txt_help_g_ctrl_k[] = "^KZ      Delete (Z=undelete) group from .newsrc\r\n";
  536. Xchar txt_help_g_cr[] = "<CR>     Read current group\r\n";
  537. Xchar txt_help_g_c[] = "c        Mark group as all read\r\n";
  538. Xchar txt_help_g_l[] = "l        List & select another spooldir\r\n";
  539. Xchar txt_help_g_tab[] =   "n<TAB>   Goto next group with unread news and enter it\r\n";
  540. Xchar txt_help_n[] = "N        Goto next group with unread news\r\n";
  541. Xchar txt_help_g_q[] = "qQ       Quit\r\n";
  542. Xchar txt_help_W[] = "W        List articles posted by user\r\n";
  543. Xchar txt_help_g_y[] = "y        Yank in subscribed/unsubscribed from .newsrc\r\n";
  544. Xchar txt_help_g_z[] = "z        Mark current group as unread\r\n";
  545. Xchar txt_help_y[] = "Y        Yank in active file to see any new news\r\n";
  546. Xchar txt_help_g_search[] = "/?       Group forward (?=backward) search\r\n";
  547. Xchar txt_newsgroup[] = "Goto newsgroup [%s]> ";
  548. Xchar txt_newsgroup_position[] = "Position %s in group list (1,2,..,$) [%d]> ";
  549. X
  550. X/*
  551. X *  signal.c
  552. X */
  553. X
  554. Xchar txt_resizing_window[] = "resizing window";
  555. Xchar txt_suspended_message[] = "\nStopped. Type 'fg' to restart TIN\n";
  556. X
  557. X/*
  558. X *  thread.c
  559. X */
  560. X
  561. Xchar txt_no_resps_in_thread[] = "No responses to list in current thread";
  562. Xchar txt_help_t_0[] = "0        Goto the base article in current thread\r\n";
  563. Xchar txt_help_t_4[] = "4$       Goto response 4 ($=goto last response) in current thread\r\n";
  564. Xchar txt_help_t_cr[] = "<CR>     Read current response\r\n";
  565. Xchar txt_help_t_tab[] = "<TAB>    Goto next unread response\r\n";
  566. Xchar txt_help_t_K[] =   "K        Mark thread as read & return\r\n";
  567. END_OF_FILE
  568.   if test 24092 -ne `wc -c <'lang.c'`; then
  569.     echo shar: \"'lang.c'\" unpacked with wrong size!
  570.   fi
  571.   # end of 'lang.c'
  572. fi
  573. if test -f 'rcfile.c' -a "${1}" != "-c" ; then 
  574.   echo shar: Will not clobber existing file \"'rcfile.c'\"
  575. else
  576.   echo shar: Extracting \"'rcfile.c'\" \(24690 characters\)
  577.   sed "s/^X//" >'rcfile.c' <<'END_OF_FILE'
  578. X/*
  579. X *  Project   : tin - a threaded Netnews reader
  580. X *  Module    : rcfile.c
  581. X *  Author    : I.Lea
  582. X *  Created   : 01-04-91
  583. X *  Updated   : 20-06-92
  584. X *  Notes     :
  585. X *  Copyright : (c) Copyright 1991-92 by Iain Lea
  586. X *              You may  freely  copy or  redistribute  this software,
  587. X *              so  long as there is no profit made from its use, sale
  588. X *              trade or  reproduction.  You may not change this copy-
  589. X *              right notice, and it must be included in any copy made
  590. X */
  591. X
  592. X#include    "tin.h"
  593. X
  594. Xextern int index_point;
  595. X
  596. Xstatic int COL1;
  597. Xstatic int COL2;
  598. Xstatic int COL3;
  599. X
  600. X/*
  601. X *  read_rcfile - read defaults from ~/.tin/tinrc
  602. X */
  603. X
  604. Xint read_rcfile ()
  605. X{
  606. X    char buf[LEN];
  607. X    FILE *fp;
  608. X
  609. X    if ((fp = fopen (rcfile, "r")) == NULL) {
  610. X        return (FALSE);
  611. X    }    
  612. X
  613. X    while (fgets (buf, sizeof (buf), fp) != NULL) {
  614. X        if (buf[0] == '#' || buf[0] == '\n') { 
  615. X            continue;
  616. X        }    
  617. X        if (match_boolean (buf, "save_archive=", &save_archive_name)) {
  618. X            continue;
  619. X        }    
  620. X        if (match_boolean (buf, "start_editor_offset=", &start_editor_offset)) {
  621. X            continue;
  622. X        }    
  623. X        if (match_boolean (buf, "mark_saved_read=", &mark_saved_read)) {
  624. X            continue;
  625. X        }    
  626. X        if (match_boolean (buf, "draw_arrow=", &draw_arrow_mark)) {
  627. X            if (draw_arrow_mark == FALSE && inverse_okay == FALSE) {
  628. X                inverse_okay = TRUE;
  629. X            }
  630. X            continue;
  631. X        }    
  632. X        if (match_boolean (buf, "print_header=", &print_header)) {
  633. X            continue;
  634. X        }
  635. X        if (match_number (buf, "kill_level=", &kill_level)) {
  636. X            continue;
  637. X        }
  638. X        if (match_boolean (buf, "pos_first_unread=", &pos_first_unread)) {
  639. X            continue;
  640. X        }    
  641. X        if (match_boolean (buf, "full_page_scroll=", &full_page_scroll)) {
  642. X            continue;
  643. X        }    
  644. X        if (match_boolean (buf, "catchup_read_groups=", &catchup_read_groups)) {
  645. X            continue;
  646. X        }    
  647. X        if (match_boolean (buf, "thread_articles=", &thread_arts)) {
  648. X            continue;
  649. X        }    
  650. X        if (match_boolean (buf, "unlink_article=", &unlink_article)) {
  651. X            continue;
  652. X        }    
  653. X        if (match_boolean (buf, "show_only_unread=", &show_only_unread)) {
  654. X            continue;
  655. X        }    
  656. X        if (match_boolean (buf, "confirm_action=", &confirm_action)) {
  657. X            continue;
  658. X        }
  659. X        if (match_boolean (buf, "show_description=", &show_description)) {
  660. X            continue;
  661. X        }
  662. X        if (match_number (buf, "show_author=", &default_show_author)) {
  663. X            continue;
  664. X        }    
  665. X        if (match_number (buf, "post_process_type=", &post_proc_type)) {
  666. X            switch (post_proc_type) {
  667. X                case POST_PROC_SHAR:
  668. X                    proc_ch_default = 's';
  669. X                    break;
  670. X                case POST_PROC_UUDECODE:
  671. X                    proc_ch_default = 'u';
  672. X                    break;
  673. X                case POST_PROC_UUD_LST_ZOO:
  674. X                    proc_ch_default = 'U';
  675. X                    break;
  676. X                case POST_PROC_UUD_EXT_ZOO:
  677. X                    proc_ch_default = 'U';
  678. X                    break;
  679. X                case POST_PROC_NONE:
  680. X                default:
  681. X                    proc_ch_default = 'n';
  682. X                    break;
  683. X            }
  684. X            continue;
  685. X        }    
  686. X        if (match_number (buf, "sort_article_type=", &sort_art_type)) {
  687. X            continue;
  688. X        }    
  689. X        if (match_string (buf, "savedir=", default_savedir, sizeof (default_savedir))) {
  690. X            if (default_savedir[0] == '.' && strlen (default_savedir) == 1) {
  691. X#if defined(BSD) && ! defined(sinix)
  692. X                getwd (buf);    
  693. X#else
  694. X                getcwd (buf, LEN);
  695. X#endif
  696. X                my_strncpy (default_savedir, buf, sizeof (default_savedir));
  697. X            }
  698. X            continue;
  699. X        }    
  700. X        if (match_string (buf, "maildir=", default_maildir, sizeof (default_maildir))) {
  701. X            continue;
  702. X        }
  703. X        if (match_string (buf, "printer=", printer, sizeof (printer))) {
  704. X            continue;
  705. X        }
  706. X        if (match_string (buf, "default_spooldir_alias=", spooldir_alias, sizeof (spooldir_alias))) {
  707. X            continue;
  708. X        }
  709. X        if (match_string (buf, "default_author_search=", default_author_search, sizeof (default_author_search))) {
  710. X            continue;
  711. X        }
  712. X        if (match_string (buf, "default_goto_group=", default_goto_group, sizeof (default_goto_group))) {
  713. X            continue;
  714. X        }
  715. X        if (match_string (buf, "default_group_search=", default_group_search, sizeof (default_group_search))) {
  716. X            continue;
  717. X        }
  718. X        if (match_string (buf, "default_subject_search=", default_subject_search, sizeof (default_subject_search))) {
  719. X            continue;
  720. X        }
  721. X        if (match_string (buf, "default_art_search=", default_art_search, sizeof (default_art_search))) {
  722. X            continue;
  723. X        }
  724. X        if (match_string (buf, "default_crosspost_group=", default_crosspost_group, sizeof (default_crosspost_group))) {
  725. X            continue;
  726. X        }
  727. X        if (match_string (buf, "default_mail_address=", default_mail_address, sizeof (default_mail_address))) {
  728. X            continue;
  729. X        }
  730. X        if (match_number (buf, "default_move_group=", &default_move_group)) {
  731. X            continue;
  732. X        }
  733. X        if (match_string (buf, "default_pipe_command=", default_pipe_command, sizeof (default_pipe_command))) {
  734. X            continue;
  735. X        }
  736. X        if (match_string (buf, "default_post_subject=", default_post_subject, sizeof (default_post_subject))) {
  737. X            continue;
  738. X        }
  739. X        if (match_string (buf, "default_regex_pattern=", default_regex_pattern, sizeof (default_regex_pattern))) {
  740. X            continue;
  741. X        }
  742. X        if (match_string (buf, "default_save_file=", default_save_file, sizeof (default_save_file))) {
  743. X            continue;
  744. X        }
  745. X        if (match_string (buf, "default_select_pattern=", default_select_pattern, sizeof (default_select_pattern))) {
  746. X            continue;
  747. X        }
  748. X        if (match_string (buf, "default_shell_command=", default_shell_command, sizeof (default_shell_command))) {
  749. X            continue;
  750. X        }
  751. X    }
  752. X    fclose (fp);
  753. X    return TRUE;        
  754. X}
  755. X
  756. X
  757. X/*
  758. X *  write_rcfile - write defaults to ~/.tin/tinrc
  759. X */
  760. X
  761. Xvoid write_rcfile ()
  762. X{
  763. X    FILE *fp;
  764. X
  765. X    if ((fp = fopen (rcfile, "w")) == NULL) {
  766. X        return;
  767. X    }    
  768. X    
  769. X    if (! cmd_line) {
  770. X        wait_message (txt_saving);
  771. X    }
  772. X    fprintf (fp, "# if ON articles/threads with Archive-name: in mail header will\n");
  773. X    fprintf (fp, "# be automatically saved with the Archive-name & part/patch no.\n");
  774. X    fprintf (fp, "save_archive=%s\n\n", (save_archive_name ? "ON" : "OFF"));
  775. X    fprintf (fp, "# if ON editor will be started with cursor offset into the file\n");
  776. X    fprintf (fp, "# otherwise the cursor will be positioned at the first line\n");
  777. X    fprintf (fp, "start_editor_offset=%s\n\n", (start_editor_offset ? "ON" : "OFF"));
  778. X    fprintf (fp, "# if ON mark articles that are saved as read\n");
  779. X    fprintf (fp, "mark_saved_read=%s\n\n", (mark_saved_read ? "ON" : "OFF"));
  780. X    fprintf (fp, "# if 0 killed articles are simply marked as being read\n");
  781. X    fprintf (fp, "# if 1 killed articles are removed and never seen\n");
  782. X    fprintf (fp, "kill_level=%d\n\n", kill_level);
  783. X    fprintf (fp, "# if ON use -> otherwise highlighted bar for selection\n");
  784. X    fprintf (fp, "draw_arrow=%s\n\n", (draw_arrow_mark ? "ON" : "OFF"));
  785. X    fprintf (fp, "# if ON print all of mail header otherwise Subject: & From: lines\n");
  786. X    fprintf (fp, "print_header=%s\n\n", (print_header ? "ON" : "OFF"));
  787. X    fprintf (fp, "# if ON put cursor at first unread art in group otherwise last art\n");
  788. X    fprintf (fp, "pos_first_unread=%s\n\n", (pos_first_unread ? "ON" : "OFF"));
  789. X    fprintf (fp, "# if ON scroll full page of groups/articles otherwise half a page\n");
  790. X    fprintf (fp, "full_page_scroll=%s\n\n", (full_page_scroll ? "ON" : "OFF"));
  791. X    fprintf (fp, "# if ON ask user if read groups should all be marked read\n");
  792. X    fprintf (fp, "catchup_read_groups=%s\n\n", (catchup_read_groups ? "ON" : "OFF"));
  793. X    fprintf (fp, "# if ON confirm certain commands with y/n before executing\n");
  794. X    fprintf (fp, "confirm_action=%s\n\n", (confirm_action ? "ON" : "OFF"));
  795. X    fprintf (fp, "# if ON show group description text after newsgroup name at\n");
  796. X    fprintf (fp, "# group selection level\n");
  797. X    fprintf (fp, "show_description=%s\n\n", (show_description ? "ON" : "OFF"));
  798. X    fprintf (fp, "# part of from field to display 0) none 1) address 2) full name 3) both\n");
  799. X    fprintf (fp, "show_author=%d\n\n", default_show_author);
  800. X    fprintf (fp, "# type of post processing to perform after saving articles.\n");
  801. X    fprintf (fp, "# 0=(none) 1=(shar) 2=(uudecode) 3=(uud & list zoo) 4=(uud & extract zoo) 5=(patch).\n");
  802. X    fprintf (fp, "post_process_type=%d\n\n", post_proc_type);
  803. X    fprintf (fp, "# if ON and group not in ~/.tin/unthread articles will be threaded.\n");
  804. X    fprintf (fp, "thread_articles=%s\n\n", (thread_arts ? "ON" : "OFF"));
  805. X    fprintf (fp, "# if ON remove ~/.article after posting.\n");
  806. X    fprintf (fp, "unlink_article=%s\n\n", (unlink_article ? "ON" : "OFF"));
  807. X    fprintf (fp, "# if ON show only new/unread articles otherwise show all.\n");
  808. X    fprintf (fp, "show_only_unread=%s\n\n", (show_only_unread ? "ON" : "OFF"));
  809. X    fprintf (fp, "# sort articles by 0=(nothing) 1=(Subject descend) 2=(Subject ascend)\n");
  810. X    fprintf (fp, "# 3=(From descend) 4=(From ascend) 5=(Date descend) 6=(Date ascend).\n");
  811. X    fprintf (fp, "sort_article_type=%d\n\n", sort_art_type);
  812. X    fprintf (fp, "# (-d) directory where articles/threads are saved\n");
  813. X    fprintf (fp, "savedir=%s\n\n", default_savedir);
  814. X    fprintf (fp, "# (-M) directory where articles/threads are saved in mailbox format\n");    
  815. X    fprintf (fp, "maildir=%s\n\n", default_maildir);    
  816. X    fprintf (fp, "# (-p) print program with parameters used to print articles/threads\n");
  817. X    fprintf (fp, "printer=%s\n\n", printer);
  818. X
  819. X    fprintf (fp, "# default actions/prompt strings for questions\n");
  820. X    fprintf (fp, "default_spooldir_alias=%s\n", spooldir_alias);
  821. X    fprintf (fp, "default_author_search=%s\n", default_author_search);
  822. X    fprintf (fp, "default_goto_group=%s\n", default_goto_group);
  823. X    fprintf (fp, "default_group_search=%s\n", default_group_search);
  824. X    fprintf (fp, "default_subject_search=%s\n", default_subject_search);
  825. X    fprintf (fp, "default_art_search=%s\n", default_art_search);
  826. X    fprintf (fp, "default_crosspost_group=%s\n", default_crosspost_group);
  827. X    fprintf (fp, "default_mail_address=%s\n", default_mail_address);
  828. X    fprintf (fp, "default_move_group=%d\n", default_move_group);
  829. X    fprintf (fp, "default_pipe_command=%s\n", default_pipe_command);
  830. X    fprintf (fp, "default_post_subject=%s\n", default_post_subject);
  831. X    fprintf (fp, "default_regex_pattern=%s\n", default_regex_pattern);
  832. X    fprintf (fp, "default_save_file=%s\n", default_save_file);
  833. X    fprintf (fp, "default_select_pattern=%s\n", default_select_pattern);
  834. X    fprintf (fp, "default_shell_command=%s\n", default_shell_command);
  835. X
  836. X    fclose (fp);
  837. X    chmod (rcfile, 0600);
  838. X}
  839. X
  840. X/*
  841. X *  options menu so that the user can dynamically change parameters
  842. X */
  843. Xint change_rcfile (group, kill_at_once)
  844. X    char *group;
  845. X    int kill_at_once;
  846. X{
  847. X    char *str = (char *) 0;
  848. X    int ch, i;
  849. X    int kill_changed = FALSE;
  850. X    int orig_show_only_unread;
  851. X    int orig_thread_arts;
  852. X    int option;
  853. X    int ret_code = NO_KILLING;
  854. X    int var_orig;
  855. X    
  856. X#ifdef SIGTSTP
  857. X    sigtype_t (*susp)();
  858. X    
  859. X    susp = (sigtype_t *) 0;
  860. X
  861. X    if (do_sigtstp) {
  862. X        susp = sigdisp (SIGTSTP, SIG_DFL);
  863. X    }
  864. X#endif
  865. X
  866. X    COL1 = 0;
  867. X    COL2 = ((COLS / 3) * 1) + 1;
  868. X    COL3 = ((COLS / 3) * 2) + 2;
  869. X
  870. X    show_rcfile_menu ();
  871. X
  872. X    while (1) {
  873. X
  874. X#ifdef SIGTSTP
  875. X        if (do_sigtstp) {
  876. X            sigdisp (SIGTSTP, rcfile_suspend);
  877. X        }
  878. X#endif
  879. X        MoveCursor (LINES, 0);
  880. X        ch = ReadCh ();
  881. X        if (ch >= '1' && ch <= '9') {
  882. X            option = prompt_num (ch, "Enter option number> ");
  883. X        } else {
  884. X            if (ch == 'q' || ch == ESC) {
  885. X                option = -1;
  886. X            } else {
  887. X                option = 0;
  888. X            }
  889. X        }
  890. X#ifdef SIGTSTP
  891. X        if (do_sigtstp) {
  892. X            sigdisp (SIGTSTP, SIG_IGN);
  893. X        }
  894. X#endif
  895. X        switch (option) {
  896. X            case 0:
  897. X                write_rcfile ();
  898. X                /* FALLTHRU */
  899. X            case -1:
  900. X                if (kill_changed) {
  901. X                    if (kill_at_once) {
  902. X                        if (killed_articles = read_kill_file ()) {
  903. X                            if (kill_any_articles (group)) {
  904. X                                make_threads (FALSE);
  905. X                                find_base (show_only_unread);
  906. X                            }
  907. X                        } else {
  908. X                            if (unkill_all_articles()) {
  909. X                                make_threads (FALSE);
  910. X                                find_base (show_only_unread);
  911. X                            }
  912. X                        }
  913. X                    }
  914. X                    ret_code = KILLING;
  915. X                }
  916. X
  917. X                clear_note_area ();
  918. X#ifdef SIGTSTP
  919. X                if (do_sigtstp) {
  920. X                    sigdisp (SIGTSTP, susp);
  921. X                }
  922. X#endif
  923. X                return ret_code;
  924. X            
  925. X            case 1:        /* auto save */
  926. X                prompt_on_off (INDEX_TOP, COL1, &save_archive_name, 
  927. X                    txt_help_autosave, txt_opt_autosave);
  928. X                break;
  929. X
  930. X            case 2:        /* start editor with line offset */
  931. X                prompt_on_off (INDEX_TOP, COL2, &start_editor_offset, 
  932. X                    txt_help_start_editor_offset, txt_opt_start_editor_offset);
  933. X                break;
  934. X            
  935. X            case 3:        /* mark saved articles read */
  936. X                prompt_on_off (INDEX_TOP, COL3, &mark_saved_read, 
  937. X                    txt_help_mark_saved_read, txt_opt_mark_saved_read);
  938. X                break;
  939. X
  940. X            case 4:        /* confirm action */
  941. X                prompt_on_off (INDEX_TOP+2, COL1, &confirm_action, 
  942. X                    txt_help_confirm_action, txt_opt_confirm_action);
  943. X                break;
  944. X
  945. X            case 5:        /* draw -> / highlighted bar */
  946. X                prompt_on_off (INDEX_TOP+2, COL2, &draw_arrow_mark, 
  947. X                    txt_help_draw_arrow, txt_opt_draw_arrow);
  948. X                if (draw_arrow_mark == FALSE && inverse_okay == FALSE) {
  949. X                    inverse_okay = TRUE;
  950. X                }
  951. X                break;
  952. X
  953. X            case 6:        /* print header */
  954. X                prompt_on_off (INDEX_TOP+2, COL3, &print_header, 
  955. X                    txt_help_print_header, txt_opt_print_header);
  956. X                break;
  957. X            
  958. X            case 7:        /* position cursor at first / last unread art */
  959. X                prompt_on_off (INDEX_TOP+4, COL1, &pos_first_unread, 
  960. X                    txt_help_pos_first_unread, txt_opt_pos_first_unread);
  961. X                break;
  962. X
  963. X            case 8:        /* scroll half/full page of groups/articles */
  964. X                prompt_on_off (INDEX_TOP+4, COL2, &full_page_scroll, 
  965. X                    txt_help_page_scroll, txt_opt_page_scroll);
  966. X                break;
  967. X
  968. X            case 9:        /* catchup read groups when quitting */
  969. X                prompt_on_off (INDEX_TOP+4, COL3, &catchup_read_groups, 
  970. X                    txt_help_catchup_groups, txt_opt_catchup_groups);
  971. X                break;
  972. X
  973. X            case 10:    /* thread/unthread all groups except those in ~/.tin/unthreaded */
  974. X                orig_thread_arts = thread_arts;    
  975. X                prompt_on_off (INDEX_TOP+6, COL1, &thread_arts, 
  976. X                    txt_help_thread_arts, txt_opt_thread_arts);
  977. X                if (thread_arts != orig_thread_arts || group != (char *) 0) {
  978. X                    make_threads (TRUE);
  979. X                    find_base (show_only_unread);
  980. X                }
  981. X                break;
  982. X
  983. X            case 11:    /* show all arts or just new/unread arts */
  984. X                orig_show_only_unread = show_only_unread;    
  985. X                prompt_on_off (INDEX_TOP+6, COL2, &show_only_unread, 
  986. X                    txt_help_show_only_unread, txt_opt_show_only_unread);
  987. X                if (show_only_unread != orig_show_only_unread || group != (char *) 0) {
  988. X                    make_threads (TRUE);
  989. X                    find_base (show_only_unread);
  990. X                    if (space_mode) {
  991. X                        for (i = 0; i < top_base; i++) {
  992. X                            if (new_responses (i)) {
  993. X                                break;
  994. X                            }
  995. X                        }
  996. X                        if (i < top_base) {
  997. X                            index_point = i;
  998. X                        } else {
  999. X                            index_point = top_base - 1;
  1000. X                        }
  1001. X                    } else {
  1002. X                        index_point = top_base - 1;
  1003. X                    }
  1004. X                }
  1005. X                break;
  1006. X
  1007. X            case 12:    /* show newsgroup description text next to newsgroups */
  1008. X                prompt_on_off (INDEX_TOP+6, COL3, &show_description, 
  1009. X                    txt_help_show_description, txt_opt_show_description);
  1010. X                if (show_description) {    /* force reread of newgroups file */
  1011. X                    reread_active_file = TRUE;
  1012. X                }
  1013. X                break;
  1014. X
  1015. X            case 13:        /* show subject & author / subject only */
  1016. X                var_orig = show_author;
  1017. X                show_menu_help (txt_help_show_author);
  1018. X                do {
  1019. X                    MoveCursor (INDEX_TOP+8, COL1 + (int) strlen (txt_opt_show_author));
  1020. X                    if ((ch    = ReadCh()) == ' ') {
  1021. X                        if (show_author + 1 > SHOW_FROM_BOTH) {
  1022. X                            show_author = SHOW_FROM_NONE;
  1023. X                        } else {
  1024. X                            show_author++;
  1025. X                        }
  1026. X                        switch (show_author) {
  1027. X                            case SHOW_FROM_NONE:
  1028. X                                str = txt_show_from_none;
  1029. X                                break;
  1030. X                            case SHOW_FROM_ADDR:
  1031. X                                str = txt_show_from_addr;
  1032. X                                break;
  1033. X                            case SHOW_FROM_NAME:
  1034. X                                str = txt_show_from_name;
  1035. X                                break;
  1036. X                            case SHOW_FROM_BOTH:
  1037. X                                str = txt_show_from_both;
  1038. X                                break;
  1039. X                        }
  1040. X                        fputs (str, stdout);
  1041. X                        fflush (stdout);
  1042. X                    }
  1043. X                } while (ch != CR && ch != ESC);
  1044. X
  1045. X                if (ch == ESC) {    /* restore original value */
  1046. X                    show_author = var_orig;
  1047. X                    switch (show_author) {
  1048. X                        case SHOW_FROM_NONE:
  1049. X                            str = txt_show_from_none;
  1050. X                            break;
  1051. X                        case SHOW_FROM_ADDR:
  1052. X                            str = txt_show_from_addr;
  1053. X                            break;
  1054. X                        case SHOW_FROM_NAME:
  1055. X                            str = txt_show_from_name;
  1056. X                            break;
  1057. X                        case SHOW_FROM_BOTH:
  1058. X                            str = txt_show_from_both;
  1059. X                            break;
  1060. X                    }
  1061. X                    fputs (str, stdout);
  1062. X                    fflush (stdout);
  1063. X                } else {
  1064. X                    default_show_author = show_author;
  1065. X                    set_subj_from_size (COLS);
  1066. X                }
  1067. X                break;
  1068. X
  1069. X            case 14:
  1070. X                var_orig = post_proc_type;
  1071. X                show_menu_help (txt_help_post_proc_type);
  1072. X                do {
  1073. X                    MoveCursor (INDEX_TOP+8, COL2 + (int) strlen (txt_opt_process_type));
  1074. X                    if ((ch    = ReadCh()) == ' ') {
  1075. X                        if (post_proc_type + 1 > POST_PROC_UUD_EXT_ZOO) {
  1076. X                            post_proc_type = POST_PROC_NONE;
  1077. X                        } else {
  1078. X                            post_proc_type++;
  1079. X                        }
  1080. X                        switch (post_proc_type) {
  1081. X                            case POST_PROC_NONE:
  1082. X                                str = txt_post_process_none;
  1083. X                                proc_ch_default = 'n';
  1084. X                                break;
  1085. X                            case POST_PROC_SHAR:
  1086. X                                str = txt_post_process_sh;
  1087. X                                proc_ch_default = 's';
  1088. X                                break;
  1089. X                            case POST_PROC_UUDECODE:
  1090. X                                str = txt_post_process_uudecode;
  1091. X                                proc_ch_default = 'u';
  1092. X                                break;
  1093. X                            case POST_PROC_UUD_LST_ZOO:
  1094. X                                str = txt_post_process_uud_lst_zoo;
  1095. X                                proc_ch_default = 'U';
  1096. X                                break;
  1097. X                            case POST_PROC_UUD_EXT_ZOO:
  1098. X                                str = txt_post_process_uud_ext_zoo;
  1099. X                                proc_ch_default = 'U';
  1100. X                                break;
  1101. X                        }
  1102. X                        CleartoEOLN (); 
  1103. X                        fputs (str, stdout);
  1104. X                        fflush (stdout);
  1105. X                    }
  1106. X                } while (ch != CR && ch != ESC);
  1107. X
  1108. X                if (ch == ESC) {    /* restore original value */
  1109. X                    post_proc_type = var_orig;
  1110. X                    switch (post_proc_type) {
  1111. X                        case POST_PROC_NONE:
  1112. X                            str = txt_post_process_none;
  1113. X                            proc_ch_default = 'n';
  1114. X                            break;
  1115. X                        case POST_PROC_SHAR:
  1116. X                            str = txt_post_process_sh;
  1117. X                            proc_ch_default = 's';
  1118. X                            break;
  1119. X                        case POST_PROC_UUDECODE:
  1120. X                            str = txt_post_process_uudecode;
  1121. X                            proc_ch_default = 'u';
  1122. X                            break;
  1123. X                        case POST_PROC_UUD_LST_ZOO:
  1124. X                            str = txt_post_process_uud_lst_zoo;
  1125. X                            proc_ch_default = 'U';
  1126. X                            break;
  1127. X                        case POST_PROC_UUD_EXT_ZOO:
  1128. X                            str = txt_post_process_uud_ext_zoo;
  1129. X                            proc_ch_default = 'U';
  1130. X                            break;
  1131. X                    }
  1132. X                    CleartoEOLN (); 
  1133. X                    fputs (str, stdout);
  1134. X                    fflush (stdout);
  1135. X                }
  1136. X                break;
  1137. X
  1138. X            case 15:
  1139. X                var_orig = sort_art_type;
  1140. X                show_menu_help (txt_help_sort_type);
  1141. X                do {
  1142. X                    MoveCursor (INDEX_TOP+10, COL1 + (int) strlen (txt_opt_sort_type));
  1143. X                    if ((ch    = ReadCh()) == ' ') {
  1144. X                        if (sort_art_type + 1 > SORT_BY_DATE_ASCEND) {
  1145. X                            sort_art_type = SORT_BY_NOTHING;
  1146. X                        } else {
  1147. X                            sort_art_type++;
  1148. X                        }
  1149. X                        switch (sort_art_type) {
  1150. X                            case SORT_BY_NOTHING:
  1151. X                                str = txt_sort_by_nothing;
  1152. X                                break;
  1153. X                            case SORT_BY_SUBJ_DESCEND:
  1154. X                                str = txt_sort_by_subj_descend;
  1155. X                                break;
  1156. X                            case SORT_BY_SUBJ_ASCEND:
  1157. X                                str = txt_sort_by_subj_ascend;
  1158. X                                break;
  1159. X                            case SORT_BY_FROM_DESCEND:
  1160. X                                str = txt_sort_by_from_descend;
  1161. X                                break;
  1162. X                            case SORT_BY_FROM_ASCEND:
  1163. X                                str = txt_sort_by_from_ascend;
  1164. X                                break;
  1165. X                            case SORT_BY_DATE_DESCEND:
  1166. X                                str = txt_sort_by_date_descend;
  1167. X                                break;
  1168. X                            case SORT_BY_DATE_ASCEND:
  1169. X                                str = txt_sort_by_date_ascend;
  1170. X                                break;
  1171. X                        }
  1172. X                        CleartoEOLN (); 
  1173. X                        fputs (str, stdout);
  1174. X                        fflush (stdout);
  1175. X                    }
  1176. X                } while (ch != CR && ch != ESC);
  1177. X
  1178. X                if (ch == ESC) {    /* restore original value */
  1179. X                    sort_art_type = var_orig;
  1180. X                    switch (sort_art_type) {
  1181. X                        case SORT_BY_NOTHING:
  1182. X                            str = txt_sort_by_nothing;
  1183. X                            break;
  1184. X                        case SORT_BY_SUBJ_DESCEND:
  1185. X                            str = txt_sort_by_subj_descend;
  1186. X                            break;
  1187. X                        case SORT_BY_SUBJ_ASCEND:
  1188. X                            str = txt_sort_by_subj_ascend;
  1189. X                            break;
  1190. X                        case SORT_BY_FROM_DESCEND:
  1191. X                            str = txt_sort_by_from_descend;
  1192. X                            break;
  1193. X                        case SORT_BY_FROM_ASCEND:
  1194. X                            str = txt_sort_by_from_ascend;
  1195. X                            break;
  1196. X                        case SORT_BY_DATE_DESCEND:
  1197. X                            str = txt_sort_by_date_descend;
  1198. X                            break;
  1199. X                        case SORT_BY_DATE_ASCEND:
  1200. X                            str = txt_sort_by_date_ascend;
  1201. X                            break;
  1202. X                    }
  1203. X                    CleartoEOLN (); 
  1204. X                    fputs (str, stdout);
  1205. X                    fflush (stdout);
  1206. X                }
  1207. X                break;
  1208. X
  1209. X            case 16:
  1210. X                show_menu_help (txt_help_savedir);
  1211. X                prompt_menu_string (INDEX_TOP+12, COL1 + (int) strlen (txt_opt_savedir), default_savedir);
  1212. X                expand_rel_abs_pathname (INDEX_TOP+12, COL1 + (int) strlen (txt_opt_savedir), default_savedir);
  1213. X                break;
  1214. X
  1215. X            case 17:
  1216. X                show_menu_help (txt_help_maildir);
  1217. X                prompt_menu_string (INDEX_TOP+14, COL1 + (int) strlen (txt_opt_maildir), default_maildir);
  1218. X                expand_rel_abs_pathname (INDEX_TOP+14, COL1 + (int) strlen (txt_opt_maildir), default_maildir);
  1219. X                break;
  1220. X
  1221. X            case 18:
  1222. X                show_menu_help (txt_help_printer);
  1223. X                prompt_menu_string (INDEX_TOP+16, COL1 + (int) strlen (txt_opt_printer), printer);
  1224. X                expand_rel_abs_pathname (INDEX_TOP+16, COL1 + (int) strlen (txt_opt_printer), printer);
  1225. X                break;
  1226. X        }
  1227. X        show_menu_help (txt_select_rcfile_option);
  1228. X    }
  1229. X}
  1230. X
  1231. X
  1232. Xvoid show_rcfile_menu ()
  1233. X{
  1234. X    char *str = (char *) 0;
  1235. X
  1236. X    ClearScreen ();
  1237. X
  1238. X    center_line (0, TRUE, txt_options_menu);
  1239. X    
  1240. X    MoveCursor (INDEX_TOP, 0);
  1241. X    printf ("%s%s\r\n\r\n", txt_opt_autosave, (save_archive_name ? "ON " : "OFF"));
  1242. X    printf ("%s%s\r\n\r\n", txt_opt_confirm_action, (confirm_action ? "ON " : "OFF"));
  1243. X    printf ("%s%s\r\n\r\n", txt_opt_pos_first_unread, (pos_first_unread ? "ON " : "OFF"));
  1244. X    printf ("%s%s", txt_opt_thread_arts, (thread_arts ? "ON " : "OFF"));
  1245. X
  1246. X    MoveCursor(INDEX_TOP, COL2);
  1247. X    printf ("%s%s", txt_opt_start_editor_offset, (start_editor_offset ? "ON " : "OFF"));
  1248. X    MoveCursor(INDEX_TOP+2, COL2);
  1249. X    printf ("%s%s", txt_opt_draw_arrow, (draw_arrow_mark ? "ON " : "OFF"));
  1250. X    MoveCursor(INDEX_TOP+4, COL2);
  1251. X    printf ("%s%s", txt_opt_page_scroll, (full_page_scroll ? "ON " : "OFF"));
  1252. X    MoveCursor(INDEX_TOP+6, COL2);
  1253. X    printf ("%s%s", txt_opt_show_only_unread, (show_only_unread ? "ON " : "OFF"));
  1254. X
  1255. X    MoveCursor(INDEX_TOP, COL3);
  1256. X    printf ("%s%s", txt_opt_mark_saved_read, (mark_saved_read ? "ON " : "OFF"));
  1257. X    MoveCursor(INDEX_TOP+2, COL3);
  1258. X    printf ("%s%s", txt_opt_print_header, (print_header ? "ON " : "OFF"));
  1259. X    MoveCursor(INDEX_TOP+4, COL3);
  1260. X    printf ("%s%s", txt_opt_catchup_groups, (catchup_read_groups ? "ON " : "OFF"));
  1261. X    MoveCursor(INDEX_TOP+6, COL3);
  1262. X    printf ("%s%s", txt_opt_show_description, (show_description ? "ON " : "OFF"));
  1263. X
  1264. X    MoveCursor(INDEX_TOP+8, COL1);
  1265. X    switch (show_author) {
  1266. X        case SHOW_FROM_NONE:
  1267. X            str = txt_show_from_none;
  1268. X            break;
  1269. X        case SHOW_FROM_ADDR:
  1270. X            str = txt_show_from_addr;
  1271. X            break;
  1272. X        case SHOW_FROM_NAME:
  1273. X            str = txt_show_from_name;
  1274. X            break;
  1275. X        case SHOW_FROM_BOTH:
  1276. X            str = txt_show_from_both;
  1277. X            break;
  1278. X    }
  1279. X    printf ("%s%s", txt_opt_show_author, str);
  1280. X    MoveCursor(INDEX_TOP+8, COL2);
  1281. X    switch (post_proc_type) {
  1282. X        case POST_PROC_NONE:
  1283. X            str = txt_post_process_none;
  1284. X            break;
  1285. X        case POST_PROC_SHAR:
  1286. X            str = txt_post_process_sh;
  1287. X            break;
  1288. X        case POST_PROC_UUDECODE:
  1289. X            str = txt_post_process_uudecode;
  1290. X            break;
  1291. X        case POST_PROC_UUD_LST_ZOO:
  1292. X            str = txt_post_process_uud_lst_zoo;
  1293. X            break;
  1294. X        case POST_PROC_UUD_EXT_ZOO:
  1295. X            str = txt_post_process_uud_ext_zoo;
  1296. X            break;
  1297. X    }
  1298. X
  1299. X    printf ("%s%s\r\n\r\n", txt_opt_process_type, str);
  1300. X    
  1301. X    MoveCursor(INDEX_TOP+10, COL1);
  1302. X    switch (sort_art_type) {
  1303. X        case SORT_BY_NOTHING:
  1304. X            str = txt_sort_by_nothing;
  1305. X            break;
  1306. X        case SORT_BY_SUBJ_DESCEND:
  1307. X            str = txt_sort_by_subj_descend;
  1308. X            break;
  1309. X        case SORT_BY_SUBJ_ASCEND:
  1310. X            str = txt_sort_by_subj_ascend;
  1311. X            break;
  1312. X        case SORT_BY_FROM_DESCEND:
  1313. X            str = txt_sort_by_from_descend;
  1314. X            break;
  1315. X        case SORT_BY_FROM_ASCEND:
  1316. X            str = txt_sort_by_from_ascend;
  1317. X            break;
  1318. X        case SORT_BY_DATE_DESCEND:
  1319. X            str = txt_sort_by_date_descend;
  1320. X            break;
  1321. X        case SORT_BY_DATE_ASCEND:
  1322. X            str = txt_sort_by_date_ascend;
  1323. X            break;
  1324. X    }
  1325. X    printf ("%s%s\r\n\r\n", txt_opt_sort_type, str);
  1326. X
  1327. X    printf ("%s%s\r\n\r\n", txt_opt_savedir, default_savedir);
  1328. X    printf ("%s%s\r\n\r\n", txt_opt_maildir, default_maildir);
  1329. X    printf ("%s%s\r\n\r\n", txt_opt_printer, printer);
  1330. X    fflush(stdout);
  1331. X
  1332. X    show_menu_help (txt_select_rcfile_option);
  1333. X    MoveCursor (LINES, 0);
  1334. X}
  1335. X
  1336. X/*
  1337. X *  expand ~/News to /usr/username/News and print to screen
  1338. X */
  1339. Xvoid expand_rel_abs_pathname (line, col, str)
  1340. X    int line;
  1341. X    int col;
  1342. X    char *str;
  1343. X{
  1344. X    char buf[LEN];
  1345. X    
  1346. X    if (str[0] == '~') {
  1347. X        if (strlen (str) == 1) {
  1348. X            strcpy (str, homedir);
  1349. X        } else {
  1350. X            sprintf (buf, "%s%s", homedir, str+1);
  1351. X            strcpy (str, buf);
  1352. X        }
  1353. X    }
  1354. X    MoveCursor (line, col);
  1355. X    CleartoEOLN ();
  1356. X    puts (str);
  1357. X    fflush (stdout);
  1358. X}
  1359. X
  1360. X/*
  1361. X *  show_menu_help
  1362. X */
  1363. Xvoid show_menu_help (help_message)
  1364. X    char *help_message;
  1365. X{
  1366. X     MoveCursor (LINES-2, 0);
  1367. X     CleartoEOLN ();
  1368. X     center_line (LINES-2, FALSE, help_message);
  1369. X}
  1370. X
  1371. X
  1372. Xint match_boolean (line, pat, dst)
  1373. X    char *line;
  1374. X    char *pat;
  1375. X    int *dst;
  1376. X{
  1377. X    int    patlen = strlen (pat);
  1378. X
  1379. X    if (strncmp (line, pat, patlen) == 0) {
  1380. X        *dst = (strncmp (&line[patlen], "ON", 2) == 0 ? TRUE : FALSE);
  1381. X        return TRUE;
  1382. X    }
  1383. X    return FALSE;
  1384. X}
  1385. X
  1386. X
  1387. Xint match_number (line, pat, dst)
  1388. X    char *line;
  1389. X    char *pat;
  1390. X    int *dst;
  1391. X{
  1392. X    int    patlen = strlen (pat);
  1393. X
  1394. X    if (strncmp (line, pat, patlen) == 0) {
  1395. X        *dst = atoi (&line[patlen]);
  1396. X        return TRUE;
  1397. X    }
  1398. X    return FALSE;
  1399. X}
  1400. X
  1401. X
  1402. Xint match_string (line, pat, dst, dstlen)
  1403. X    char *line;
  1404. X    char *pat;
  1405. X    char *dst;
  1406. X    int dstlen;
  1407. X{
  1408. X    int    patlen = strlen (pat);
  1409. X
  1410. X    if (strncmp (line, pat, patlen) == 0) {
  1411. X        strncpy (dst, &line[patlen], dstlen);
  1412. X        dst[strlen (dst) - 1] = '\0';
  1413. X        return TRUE;
  1414. X    }
  1415. X    return FALSE;
  1416. X}
  1417. X
  1418. END_OF_FILE
  1419.   if test 24690 -ne `wc -c <'rcfile.c'`; then
  1420.     echo shar: \"'rcfile.c'\" unpacked with wrong size!
  1421.   fi
  1422.   # end of 'rcfile.c'
  1423. fi
  1424. echo shar: End of archive 9 \(of 15\).
  1425. cp /dev/null ark9isdone
  1426. MISSING=""
  1427. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  1428.     if test ! -f ark${I}isdone ; then
  1429.     MISSING="${MISSING} ${I}"
  1430.     fi
  1431. done
  1432. if test "${MISSING}" = "" ; then
  1433.     echo You have unpacked all 15 archives.
  1434.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1435. else
  1436.     echo You still must unpack the following archives:
  1437.     echo "        " ${MISSING}
  1438. fi
  1439. exit 0
  1440. exit 0 # Just in case...
  1441.