home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume23 / tin / patch03b < prev    next >
Encoding:
Text File  |  1991-10-19  |  48.7 KB  |  1,810 lines

  1. Newsgroups: comp.sources.misc
  2. From: iain@norisc.siemens.de (Iain J. Lea)
  3. Subject:  v23i079:  tin - threaded full screen newsreader, Patch03b/4
  4. Message-ID: <1991Oct20.032014.24635@sparky.imd.sterling.com>
  5. X-Md4-Signature: 4ee46096c076afac08b5a0eeafc6d324
  6. Date: Sun, 20 Oct 1991 03:20:14 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: iain@norisc.siemens.de (Iain J. Lea)
  10. Posting-number: Volume 23, Issue 79
  11. Archive-name: tin/patch03b
  12. Environment: BSD, SCO, ISC, SUNOS, SYSVR3, SYSVR4, ULTRIX, XENIX
  13. Patch-To: tin: Volume 23, Issue 15-23
  14.  
  15. #!/bin/sh
  16. # this is tin.patch.02 (part 2 of tin1.0)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file tin.patch03 continued
  19. #
  20. if touch 2>&1 | fgrep '[-amc]' > /dev/null
  21.  then TOUCH=touch
  22.  else TOUCH=true
  23. fi
  24. if test ! -r shar3_seq_.tmp; then
  25.     echo "Please unpack part 1 first!"
  26.     exit 1
  27. fi
  28. (read Scheck
  29.  if test "$Scheck" != 2; then
  30.     echo "Please unpack part $Scheck next!"
  31.     exit 1
  32.  else
  33.     exit 0
  34.  fi
  35. ) < shar3_seq_.tmp || exit 1
  36. echo "x - Continuing file tin.patch03"
  37. sed 's/^X//' << 'SHAR_EOF' >> tin.patch03 &&
  38. X!         tin_done(0);
  39. X  }
  40. X  
  41. X  
  42. X--- 591,601 ----
  43. X  group_done:
  44. X      fix_new_highest (sav_groupnum);
  45. X      update_newsrc (group, my_group[sav_groupnum], FALSE);
  46. X  
  47. X!     if (index_point == -2) {
  48. X!         tin_done (0);
  49. X!     }    
  50. X!     clear_note_area ();
  51. X  }
  52. X  
  53. X  
  54. X***************
  55. X*** 652,658 ****
  56. X      CleartoEOLN ();
  57. X  #endif
  58. X  
  59. X!     sprintf (buf, "%s (%d)", group, top_base);
  60. X      center_line (0, TRUE, buf);
  61. X  
  62. X      if (col = (COLS - (int) strlen (txt_type_h_for_help))+1) {
  63. X--- 657,667 ----
  64. X      CleartoEOLN ();
  65. X  #endif
  66. X  
  67. X!     if (active[my_group[cur_groupnum]].thread) {
  68. X!         sprintf (buf, "%s (%d %d)", group, top_base, top);
  69. X!     } else {
  70. X!         sprintf (buf, "%s (U %d)", group, top);
  71. X!     }
  72. X      center_line (0, TRUE, buf);
  73. X  
  74. X      if (col = (COLS - (int) strlen (txt_type_h_for_help))+1) {
  75. X***************
  76. X*** 708,719 ****
  77. X      }
  78. X  
  79. X      for (j=0, i = first_subj_on_screen; i < last_subj_on_screen; i++, j++) {
  80. X!         respnum = base[i];
  81. X  
  82. X          if (arts[respnum].tagged) {
  83. X              sprintf (new_resps, "%3d", arts[respnum].tagged);
  84. X          } else if (new_responses(i)) {
  85. X!             strcpy (new_resps, "  +");
  86. X          } else {
  87. X              strcpy (new_resps, "   ");
  88. X          }
  89. X--- 717,728 ----
  90. X      }
  91. X  
  92. X      for (j=0, i = first_subj_on_screen; i < last_subj_on_screen; i++, j++) {
  93. X!         respnum = (int) base[i];
  94. X  
  95. X          if (arts[respnum].tagged) {
  96. X              sprintf (new_resps, "%3d", arts[respnum].tagged);
  97. X          } else if (new_responses(i)) {
  98. X!             sprintf (new_resps, "  %c", UNREAD_ART_MARK);
  99. X          } else {
  100. X              strcpy (new_resps, "   ");
  101. X          }
  102. X***************
  103. X*** 818,824 ****
  104. X      int i;
  105. X      int sum = 0;
  106. X  
  107. X!     for (i = base[thread]; i >= 0; i = arts[i].thread)
  108. X              if (arts[i].unread)
  109. X                  sum++;
  110. X      
  111. X--- 827,833 ----
  112. X      int i;
  113. X      int sum = 0;
  114. X  
  115. X!     for (i = (int) base[thread]; i >= 0; i = arts[i].thread)
  116. X              if (arts[i].unread)
  117. X                  sum++;
  118. X      
  119. Xdiff -rcs 102/hashstr.c 103/hashstr.c
  120. X*** 102/hashstr.c    Mon Sep 23 17:55:38 1991
  121. X--- 103/hashstr.c    Mon Sep 30 18:35:58 1991
  122. X***************
  123. X*** 68,74 ****
  124. X  
  125. X          h = *t++;
  126. X          while (*t)
  127. X!             h = ((h << 1) ^ *t++) % TABLE_SIZE;
  128. X      }
  129. X  
  130. X      p = table[h];
  131. X--- 68,74 ----
  132. X  
  133. X          h = *t++;
  134. X          while (*t)
  135. X!             h = ((h << 1) ^ *t++) % (long) TABLE_SIZE;
  136. X      }
  137. X  
  138. X      p = table[h];
  139. X***************
  140. X*** 99,105 ****
  141. X      struct hashnode *p;
  142. X      int *iptr;
  143. X  
  144. X!     p = (struct hashnode *) my_malloc (sizeof (*p));
  145. X  
  146. X      p->next = (struct hashnode *) 0;
  147. X      iptr = (int *) my_malloc ((unsigned) strlen (s) + sizeof (int)+1);
  148. X--- 99,105 ----
  149. X      struct hashnode *p;
  150. X      int *iptr;
  151. X  
  152. X!     p = (struct hashnode *) my_malloc ((unsigned) sizeof (*p));
  153. X  
  154. X      p->next = (struct hashnode *) 0;
  155. X      iptr = (int *) my_malloc ((unsigned) strlen (s) + sizeof (int)+1);
  156. Xdiff -rcs 102/help.c 103/help.c
  157. X*** 102/help.c    Tue Sep 24 08:39:25 1991
  158. X--- 103/help.c    Mon Sep 30 12:35:19 1991
  159. X***************
  160. X*** 3,9 ****
  161. X   *  Module    : help.c
  162. X   *  Author    : R.Skrenta / I.Lea
  163. X   *  Created   : 01-04-91
  164. X!  *  Updated   : 24-09-91
  165. X   *  Release   : 1.0
  166. X   *  Notes     :
  167. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  168. X--- 3,9 ----
  169. X   *  Module    : help.c
  170. X   *  Author    : R.Skrenta / I.Lea
  171. X   *  Created   : 01-04-91
  172. X!  *  Updated   : 26-09-91
  173. X   *  Release   : 1.0
  174. X   *  Notes     :
  175. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  176. X***************
  177. X*** 130,136 ****
  178. X      char *help[];
  179. X      char *title;
  180. X  {
  181. X!     char buf[LEN+1];
  182. X      char ch;
  183. X      int i, len;
  184. X      int group_len = 0;
  185. X--- 130,136 ----
  186. X      char *help[];
  187. X      char *title;
  188. X  {
  189. X!     char buf[LEN];
  190. X      char ch;
  191. X      int i, len;
  192. X      int group_len = 0;
  193. X***************
  194. X*** 253,258 ****
  195. X--- 253,259 ----
  196. X                  break;
  197. X  
  198. X              case ctrl('R'):            /* Home */
  199. X+             case 'g':
  200. X                  if (cur_page != 1) {
  201. X                      cur_page = 1;
  202. X                      pos_help = 0;
  203. X***************
  204. X*** 260,265 ****
  205. X--- 261,267 ----
  206. X                  break;
  207. X  
  208. X              case '$':                /* End */
  209. X+             case 'G':
  210. X                  if (cur_page != max_page) {
  211. X                      cur_page = max_page;
  212. X                      pos_help = (max_page-1) * NOTESLINES;
  213. Xdiff -rcs 102/kill.c 103/kill.c
  214. X*** 102/kill.c    Mon Sep 23 17:55:38 1991
  215. X--- 103/kill.c    Mon Sep 30 18:14:57 1991
  216. X***************
  217. X*** 3,9 ****
  218. X   *  Module    : kill.c
  219. X   *  Author    : I.Lea
  220. X   *  Created   : 01-04-91
  221. X!  *  Updated   : 28-08-91
  222. X   *  Release   : 1.0
  223. X   *  Notes     : kill articles
  224. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  225. X--- 3,9 ----
  226. X   *  Module    : kill.c
  227. X   *  Author    : I.Lea
  228. X   *  Created   : 01-04-91
  229. X!  *  Updated   : 30-09-91
  230. X   *  Release   : 1.0
  231. X   *  Notes     : kill articles
  232. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  233. X***************
  234. X*** 15,21 ****
  235. X  
  236. X  #include    "tin.h"
  237. X  
  238. X! extern char index_file[LEN+1];
  239. X  
  240. X  struct kill_t *killf;
  241. X  int kill_num = 0;
  242. X--- 15,21 ----
  243. X  
  244. X  #include    "tin.h"
  245. X  
  246. X! extern char index_file[LEN];
  247. X  
  248. X  struct kill_t *killf;
  249. X  int kill_num = 0;
  250. X***************
  251. X*** 27,33 ****
  252. X  
  253. X  int read_kill_file ()
  254. X  {
  255. X!     char buf[LEN+1];
  256. X      FILE *fp;
  257. X  
  258. X      free_kill_array ();
  259. X--- 27,33 ----
  260. X  
  261. X  int read_kill_file ()
  262. X  {
  263. X!     char buf[LEN];
  264. X      FILE *fp;
  265. X  
  266. X      free_kill_array ();
  267. X***************
  268. X*** 140,161 ****
  269. X      char *group_name;
  270. X      int index;
  271. X  {
  272. X!     char text[LEN+1];
  273. X!     char kill_from[LEN+1];
  274. X!     char kill_subj[LEN+1];
  275. X!     char kill_group[LEN+1];
  276. X      char ch_default = 's';
  277. X      char *str;    
  278. X      int ch;
  279. X      int counter;
  280. X      int kill_from_ok = FALSE;
  281. X      int kill_subj_ok = FALSE;
  282. X      int kill_every_group;
  283. X      
  284. X      sprintf (kill_group, "%s only", group_name);
  285. X!     my_strncpy (text, arts[index].subject, 45);
  286. X      sprintf (kill_subj, txt_kill_subject, text);
  287. X!     my_strncpy (text, arts[index].from, 45);
  288. X      sprintf (kill_from, txt_kill_from, text);
  289. X      text[0] = '\0';
  290. X      
  291. X--- 140,180 ----
  292. X      char *group_name;
  293. X      int index;
  294. X  {
  295. X!     char text[LEN];
  296. X!     char kill_from[LEN];
  297. X!     char kill_subj[LEN];
  298. X!     char kill_group[LEN];
  299. X      char ch_default = 's';
  300. X      char *str;    
  301. X      int ch;
  302. X      int counter;
  303. X+     int killed = TRUE;
  304. X      int kill_from_ok = FALSE;
  305. X      int kill_subj_ok = FALSE;
  306. X      int kill_every_group;
  307. X+ 
  308. X+ #ifdef SIGTSTP
  309. X+     void (*susp)();
  310. X+ 
  311. X+     if (do_sigtstp) {
  312. X+ #ifdef POSIX_JOB_CONTROL
  313. X+         sigemptyset (&kill_act.sa_mask);
  314. X+         kill_act.sa_flags = SA_RESTART | SA_RESETHAND;
  315. X+         kill_act.sa_handler = SIG_DFL;
  316. X+         sigaction (SIGTSTP, &kill_act, &old_act);
  317. X+         kill_act.sa_handler = SIG_IGN;
  318. X+         sigaction (SIGTSTP, &kill_act, 0L);
  319. X+ #else
  320. X+         susp = signal (SIGTSTP, SIG_DFL);
  321. X+         signal (SIGTSTP, SIG_IGN);
  322. X+ #endif
  323. X+     }
  324. X+ #endif
  325. X      
  326. X      sprintf (kill_group, "%s only", group_name);
  327. X!     my_strncpy (text, arts[index].subject, COLS-35);
  328. X      sprintf (kill_subj, txt_kill_subject, text);
  329. X!     my_strncpy (text, arts[index].from, COLS-35);
  330. X      sprintf (kill_from, txt_kill_from, text);
  331. X      text[0] = '\0';
  332. X      
  333. X***************
  334. X*** 172,188 ****
  335. X      fflush(stdout);
  336. X  
  337. X      show_menu_help (txt_help_kill_text);
  338. X!     parse_menu_string (INDEX_TOP, strlen (txt_kill_text), text);
  339. X  
  340. X      if (text[0]) {
  341. X          show_menu_help (txt_help_kill_text_type);
  342. X          counter = 1;
  343. X!         MoveCursor (INDEX_TOP+2, strlen (txt_kill_text_type));
  344. X          str = "Subject: line only    ";
  345. X          printf ("%s", str);
  346. X          fflush(stdout);
  347. X          do {
  348. X!             MoveCursor (INDEX_TOP+2, strlen (txt_kill_text_type));
  349. X              if ((ch    = ReadCh()) == ' ') {
  350. X                  counter++;
  351. X                  if (counter == KILL_BOTH+1) {
  352. X--- 191,207 ----
  353. X      fflush(stdout);
  354. X  
  355. X      show_menu_help (txt_help_kill_text);
  356. X!     parse_menu_string (INDEX_TOP, (int) strlen (txt_kill_text), text);
  357. X  
  358. X      if (text[0]) {
  359. X          show_menu_help (txt_help_kill_text_type);
  360. X          counter = 1;
  361. X!         MoveCursor (INDEX_TOP+2, (int) strlen (txt_kill_text_type));
  362. X          str = "Subject: line only    ";
  363. X          printf ("%s", str);
  364. X          fflush(stdout);
  365. X          do {
  366. X!             MoveCursor (INDEX_TOP+2, (int) strlen (txt_kill_text_type));
  367. X              if ((ch    = ReadCh()) == ' ') {
  368. X                  counter++;
  369. X                  if (counter == KILL_BOTH+1) {
  370. X***************
  371. X*** 216,227 ****
  372. X      if (text[0] || kill_subj_ok || kill_from_ok) {
  373. X          show_menu_help (txt_help_kill_group);
  374. X          kill_every_group = FALSE;
  375. X!         MoveCursor (INDEX_TOP+10, strlen (txt_kill_group));
  376. X          str = kill_group;
  377. X          printf ("%s", str);
  378. X          fflush(stdout);
  379. X          do {
  380. X!             MoveCursor (INDEX_TOP+10, strlen (txt_kill_group));
  381. X              if ((ch    = ReadCh()) == ' ') {
  382. X                  kill_every_group = !kill_every_group;
  383. X                  if (kill_every_group) {
  384. X--- 235,246 ----
  385. X      if (text[0] || kill_subj_ok || kill_from_ok) {
  386. X          show_menu_help (txt_help_kill_group);
  387. X          kill_every_group = FALSE;
  388. X!         MoveCursor (INDEX_TOP+10, (int) strlen (txt_kill_group));
  389. X          str = kill_group;
  390. X          printf ("%s", str);
  391. X          fflush(stdout);
  392. X          do {
  393. X!             MoveCursor (INDEX_TOP+10, (int) strlen (txt_kill_group));
  394. X              if ((ch    = ReadCh()) == ' ') {
  395. X                  kill_every_group = !kill_every_group;
  396. X                  if (kill_every_group) {
  397. X***************
  398. X*** 240,246 ****
  399. X          do {
  400. X              sprintf (msg, "%s%c", txt_abort_edit_save_killfile, ch_default);
  401. X              wait_message (msg);
  402. X!             MoveCursor(LINES, strlen (txt_abort_edit_save_killfile));
  403. X              if ((ch = ReadCh()) == CR)
  404. X                  ch = ch_default;
  405. X          } while (ch != 'a' && ch != 'e' && ch != 's');
  406. X--- 259,265 ----
  407. X          do {
  408. X              sprintf (msg, "%s%c", txt_abort_edit_save_killfile, ch_default);
  409. X              wait_message (msg);
  410. X!             MoveCursor(LINES, (int) strlen (txt_abort_edit_save_killfile));
  411. X              if ((ch = ReadCh()) == CR)
  412. X                  ch = ch_default;
  413. X          } while (ch != 'a' && ch != 'e' && ch != 's');
  414. X***************
  415. X*** 251,260 ****
  416. X                  untag_all_articles ();
  417. X                  read_kill_file ();
  418. X                  reload_index_file (group_name, FALSE);
  419. X!                 return TRUE;
  420. X  
  421. X              case 'a':
  422. X!                 return FALSE;
  423. X              
  424. X              case 's':
  425. X                  if (kill_num > max_kill-1) {
  426. X--- 270,281 ----
  427. X                  untag_all_articles ();
  428. X                  read_kill_file ();
  429. X                  reload_index_file (group_name, FALSE);
  430. X!                 killed = TRUE;
  431. X!                 goto kill_done;
  432. X  
  433. X              case 'a':
  434. X!                 killed = FALSE;
  435. X!                 goto kill_done;
  436. X              
  437. X              case 's':
  438. X                  if (kill_num > max_kill-1) {
  439. X***************
  440. X*** 299,305 ****
  441. X                      }
  442. X                  }
  443. X                  write_kill_file ();
  444. X!                 return TRUE;
  445. X          }    
  446. X      }
  447. X      /* NOTREACHED */
  448. X--- 320,341 ----
  449. X                      }
  450. X                  }
  451. X                  write_kill_file ();
  452. X! 
  453. X! kill_done:
  454. X! 
  455. X! #ifdef SIGTSTP
  456. X!                 if (do_sigtstp) {
  457. X! #ifdef POSIX_JOB_CONTROL
  458. X!                     sigemptyset (&kill_act.sa_mask);
  459. X!                     kill_act.sa_flags = SA_RESTART | SA_RESETHAND;
  460. X!                     kill_act.sa_handler = SIG_IGN;
  461. X!                     sigaction (SIGTSTP, &old_act, 0L);
  462. X! #else
  463. X!                     signal (SIGTSTP, susp);
  464. X! #endif
  465. X!                 }
  466. X! #endif
  467. X!                 return (killed);
  468. X          }    
  469. X      }
  470. X      /* NOTREACHED */
  471. Xdiff -rcs 102/lang.c 103/lang.c
  472. X*** 102/lang.c    Tue Sep 24 14:01:45 1991
  473. X--- 103/lang.c    Mon Sep 30 18:29:55 1991
  474. X***************
  475. X*** 3,9 ****
  476. X   *  Module    : lang.c
  477. X   *  Author    : R.Skrenta / I.Lea
  478. X   *  Created   : 01-04-91
  479. X!  *  Updated   : 24-09-91
  480. X   *  Release   : 1.0
  481. X   *  Notes     :
  482. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  483. X--- 3,9 ----
  484. X   *  Module    : lang.c
  485. X   *  Author    : R.Skrenta / I.Lea
  486. X   *  Created   : 01-04-91
  487. X!  *  Updated   : 30-09-91
  488. X   *  Release   : 1.0
  489. X   *  Notes     :
  490. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  491. X***************
  492. X*** 23,29 ****
  493. X  
  494. X  char txt_group[] = "Group %s...    ";
  495. X  char txt_cannot_open_art[] = "can't open article %s: ";
  496. X! char txt_indexing[] = "Indexing...%4d";
  497. X  char txt_corrupt_index[] = "Index file %s corrupted. error %d on article %d";
  498. X  
  499. X  /*
  500. X--- 23,30 ----
  501. X  
  502. X  char txt_group[] = "Group %s...    ";
  503. X  char txt_cannot_open_art[] = "can't open article %s: ";
  504. X! char txt_indexing[] = "Indexing...";
  505. X! char txt_indexing_num[] = "Indexing...%4d";
  506. X  char txt_corrupt_index[] = "Index file %s corrupted. error %d on article %d";
  507. X  
  508. X  /*
  509. X***************
  510. X*** 50,56 ****
  511. X  char txt_subscribed_to[] = "subscribed to %s";
  512. X  char txt_unsubscribed_to[] = "unsubscribed from %s";
  513. X  char txt_mark_all_read[] = "Mark everything as read? (y/n): ";
  514. X- char txt_marked_as_read[] = "All articles marked as read";
  515. X  char txt_no_more_groups[] = "No more groups";
  516. X  char txt_no_prev_group[] = "No previous group";
  517. X  char txt_no_arts[] = "*** No Articles ***";
  518. X--- 51,56 ----
  519. X***************
  520. X*** 110,116 ****
  521. X  #else
  522. X  char txt_save_pattern[] = "Enter regex save pattern [%s]> ";
  523. X  #endif
  524. X- char txt_base_subdir[] = "Enter sub directory name> ";
  525. X  char txt_saved_pattern_to[] = "-- Saved pattern to %s - %s --";
  526. X  char txt_saved_to_mailbox[] = "-- Saved to mailbox %s --";
  527. X  char txt_switch_on_kill_art_menu[] = "Kill Article Menu is switched OFF. Select Options Menu to switch it ON.";
  528. X--- 110,115 ----
  529. X***************
  530. X*** 158,164 ****
  531. X  char txt_cannot_find_base_art[] = "Cannot find base article %s";
  532. X  char txt_out_of_memory[] = "%s: out of memory";
  533. X  char txt_rename_error[] = "Error: rename %s to %s";
  534. X! char txt_shell_escape[] = "Enter shell command> ";
  535. X  
  536. X  /*
  537. X   *  nntp_open.c
  538. X--- 157,163 ----
  539. X  char txt_cannot_find_base_art[] = "Cannot find base article %s";
  540. X  char txt_out_of_memory[] = "%s: out of memory";
  541. X  char txt_rename_error[] = "Error: rename %s to %s";
  542. X! char txt_shell_escape[] = "Enter shell command [%s]> ";
  543. X  
  544. X  /*
  545. X   *  nntp_open.c
  546. X***************
  547. X*** 243,249 ****
  548. X  char txt_thread_saved_to_many[] = "-- Thread saved to %s - %s --";
  549. X  char txt_thread_saved_to[] = "-- Thread saved to %s --";
  550. X  char txt_pipe_to_command[] = "Pipe to command [%s]: ";
  551. X- char txt_error_printing_art[] = "-- Error printing article --";
  552. X  char txt_printing[] = "Printing...";
  553. X  char txt_printed[] = "-- Article(s) printed --";
  554. X  char txt_append_to_file[] = "File %s exists. Append? (y/n): ";
  555. X--- 242,247 ----
  556. X***************
  557. X*** 294,300 ****
  558. X  char txt_sort_by_date_ascend[] = "Date: field (ascending)";
  559. X  char txt_help_autosave[] = "Auto save article/thread by Archive-name: header. <SPACE> toggles & <CR> sets.";
  560. X  char txt_help_save_separate[] = "Save articles/threads to separate files. <SPACE> toggles & <CR> sets.";
  561. X! char txt_help_print_header[] = "Print complete mail header or Subject: & From:. <SPACE> toggles & <CR> sets.";
  562. X  char txt_help_pos_first_unread[] = "Put cursor at first/last unread art in groups. <SPACE> toggles & <CR> sets.";
  563. X  char txt_help_show_author[] = "Show Subject & From (author) fields in group menu. <SPACE> toggles & <CR> sets.";
  564. X  char txt_help_draw_arrow[] = "Draw -> or highlighted bar for selection. <SPACE> toggles & <CR> sets.";
  565. X--- 292,298 ----
  566. X  char txt_sort_by_date_ascend[] = "Date: field (ascending)";
  567. X  char txt_help_autosave[] = "Auto save article/thread by Archive-name: header. <SPACE> toggles & <CR> sets.";
  568. X  char txt_help_save_separate[] = "Save articles/threads to separate files. <SPACE> toggles & <CR> sets.";
  569. X! char txt_help_print_header[] = "By printing print all/part of header. <SPACE> toggles & <CR> sets.";
  570. X  char txt_help_pos_first_unread[] = "Put cursor at first/last unread art in groups. <SPACE> toggles & <CR> sets.";
  571. X  char txt_help_show_author[] = "Show Subject & From (author) fields in group menu. <SPACE> toggles & <CR> sets.";
  572. X  char txt_help_draw_arrow[] = "Draw -> or highlighted bar for selection. <SPACE> toggles & <CR> sets.";
  573. X***************
  574. X*** 306,312 ****
  575. X  char txt_help_maildir[] = "The directory where articles/threads are to be saved in mailbox format.";
  576. X  char txt_help_printer[] = "The printer program with options that is to be used to print articles/threads.";
  577. X  char txt_select_rcfile_option[] = "Select option by entering number before text. Any other key to save.";
  578. X- char txt_save_options[] = "Save options? (y/n): ";
  579. X  
  580. X  /*
  581. X   *  save.c
  582. X--- 304,309 ----
  583. Xdiff -rcs 102/lang.h 103/lang.h
  584. X*** 102/lang.h    Tue Sep 24 08:37:45 1991
  585. X--- 103/lang.h    Mon Sep 30 18:31:11 1991
  586. X***************
  587. X*** 3,9 ****
  588. X   *  Module    : lang.h
  589. X   *  Author    : I.Lea
  590. X   *  Created   : 01-04-91
  591. X!  *  Updated   : 24-09-91
  592. X   *  Release   : 1.0
  593. X   *  Notes     :
  594. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  595. X--- 3,9 ----
  596. X   *  Module    : lang.h
  597. X   *  Author    : I.Lea
  598. X   *  Created   : 01-04-91
  599. X!  *  Updated   : 30-09-91
  600. X   *  Release   : 1.0
  601. X   *  Notes     :
  602. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  603. X***************
  604. X*** 20,25 ****
  605. X--- 20,26 ----
  606. X  extern char txt_group[];
  607. X  extern char txt_cannot_open_art[];
  608. X  extern char txt_indexing[];
  609. X+ extern char txt_indexing_num[];
  610. X  extern char txt_corrupt_index[];
  611. X  
  612. X  /*
  613. X***************
  614. X*** 42,48 ****
  615. X  extern char txt_subscribed_to[];
  616. X  extern char txt_unsubscribed_to[];
  617. X  extern char txt_mark_all_read[];
  618. X- extern char txt_marked_as_read[];
  619. X  extern char txt_no_more_groups[];
  620. X  extern char txt_no_prev_group[];
  621. X  extern char txt_no_arts[];
  622. X--- 43,48 ----
  623. X***************
  624. X*** 94,106 ****
  625. X  extern char txt_help_T[];
  626. X  extern char txt_help_U[];
  627. X  extern char txt_help_v[];
  628. X- extern char txt_help_i_u[];
  629. X  extern char txt_help_w[];
  630. X  extern char txt_help_i_search[];
  631. X  extern char txt_help_thread[];
  632. X  extern char txt_help_dash[];
  633. X  extern char txt_save_pattern[];
  634. X- extern char txt_base_subdir[];
  635. X  extern char txt_saved_pattern_to[];
  636. X  extern char txt_saved_to_mailbox[];
  637. X  extern char txt_switch_on_kill_art_menu[];
  638. X--- 94,104 ----
  639. X***************
  640. X*** 201,207 ****
  641. X  extern char txt_thread_saved_to[];
  642. X  extern char txt_pipe_to_command[];
  643. X  extern char txt_command_failed[];
  644. X- extern char txt_error_printing_art[];
  645. X  extern char txt_printing[];
  646. X  extern char txt_printed[];
  647. X  extern char txt_append_to_file[];
  648. X--- 199,204 ----
  649. X***************
  650. X*** 280,287 ****
  651. X  extern char txt_opt_savedir[];
  652. X  extern char txt_opt_maildir[];
  653. X  extern char txt_opt_printer[];
  654. X- extern char txt_opt_kill_subj[];
  655. X- extern char txt_opt_kill_from[];
  656. X  extern char txt_options_menu[];
  657. X  extern char txt_help_autosave[];
  658. X  extern char txt_help_save_separate[];
  659. X--- 277,282 ----
  660. X***************
  661. X*** 290,296 ****
  662. X  extern char txt_help_show_author[];
  663. X  extern char txt_help_draw_arrow[];
  664. X  extern char txt_help_kill_articles[];
  665. X- extern char txt_help_post_process[];
  666. X  extern char txt_help_mark_saved_read[];
  667. X  extern char txt_help_post_proc_type[];
  668. X  extern char txt_help_sort_type[];
  669. X--- 285,290 ----
  670. X***************
  671. X*** 298,304 ****
  672. X  extern char txt_help_maildir[];
  673. X  extern char txt_help_printer[];
  674. X  extern char txt_select_rcfile_option[];
  675. X- extern char txt_save_options[];
  676. X  
  677. X  /*
  678. X   *  save.c
  679. X--- 292,297 ----
  680. X***************
  681. X*** 335,341 ****
  682. X  extern char txt_reset_newsrc[];
  683. X  extern char txt_no_groups_to_read[];
  684. X  extern char txt_added_groups[];
  685. X- extern char txt_rewriting_newsrc_file[];
  686. X  extern char txt_plural[];
  687. X  extern char txt_no_groups_to_yank_in[];
  688. X  extern char txt_group_selection[];
  689. X--- 328,333 ----
  690. Xdiff -rcs 102/main.c 103/main.c
  691. X*** 102/main.c    Tue Sep 24 14:09:04 1991
  692. X--- 103/main.c    Mon Sep 30 12:35:49 1991
  693. X***************
  694. X*** 3,9 ****
  695. X   *  Module    : main.c
  696. X   *  Author    : R.Skrenta / I.Lea
  697. X   *  Created   : 01-04-91
  698. X!  *  Updated   : 24-09-91
  699. X   *  Release   : 1.0
  700. X   *  Notes     :
  701. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  702. X--- 3,9 ----
  703. X   *  Module    : main.c
  704. X   *  Author    : R.Skrenta / I.Lea
  705. X   *  Created   : 01-04-91
  706. X!  *  Updated   : 29-09-91
  707. X   *  Release   : 1.0
  708. X   *  Notes     :
  709. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  710. X***************
  711. X*** 16,23 ****
  712. X  #include    "tin.h"
  713. X  
  714. X  char *version = "v1.0";
  715. X! char cvers[LEN+1];
  716. X! char nntp_server[LEN+1];
  717. X  
  718. X  int NOTESLINES;                        /* set in set_win_size () */
  719. X  int RIGHT_POS;                        /* set in set_win_size () */
  720. X--- 16,23 ----
  721. X  #include    "tin.h"
  722. X  
  723. X  char *version = "v1.0";
  724. X! char cvers[LEN];
  725. X! char nntp_server[LEN];
  726. X  
  727. X  int NOTESLINES;                        /* set in set_win_size () */
  728. X  int RIGHT_POS;                        /* set in set_win_size () */
  729. X***************
  730. X*** 58,69 ****
  731. X      extern int optind;
  732. X      extern char *optarg;
  733. X      int c, i, created;
  734. X      int notify_new_groups = FALSE;
  735. X      struct stat st;
  736. X      
  737. X      debug = FALSE;
  738. X  
  739. X!     set_signal_handlers ();
  740. X  
  741. X      basename (argv[0], progname);
  742. X  
  743. X--- 58,72 ----
  744. X      extern int optind;
  745. X      extern char *optarg;
  746. X      int c, i, created;
  747. X+     int check_any_unread = FALSE;
  748. X      int notify_new_groups = FALSE;
  749. X+     int start_any_unread = FALSE;
  750. X+     int start_groupnum = 0;
  751. X      struct stat st;
  752. X      
  753. X      debug = FALSE;
  754. X  
  755. X!     set_signal_handlers ();        /* all except SIGINT ctrl-C */
  756. X  
  757. X      basename (argv[0], progname);
  758. X  
  759. X***************
  760. X*** 84,90 ****
  761. X      init_selfinfo ();    /* set up char *'s: homedir, newsrc, etc. */
  762. X      init_alloc ();        /* allocate initial array sizes */
  763. X  
  764. X!     while ((c = getopt (argc, argv, "cd:Df:hm:M:np:rs:SuUv")) != EOF) {
  765. X          switch(c) {
  766. X              case 'c':
  767. X                  catchup = TRUE;
  768. X--- 87,93 ----
  769. X      init_selfinfo ();    /* set up char *'s: homedir, newsrc, etc. */
  770. X      init_alloc ();        /* allocate initial array sizes */
  771. X  
  772. X!     while ((c = getopt (argc, argv, "cd:Df:hm:M:np:rs:SuUvzZ")) != EOF) {
  773. X          switch(c) {
  774. X              case 'c':
  775. X                  catchup = TRUE;
  776. X***************
  777. X*** 159,167 ****
  778. X--- 162,179 ----
  779. X  
  780. X              case 'v':
  781. X                  verbose = TRUE;
  782. X+                 break;
  783. X+ 
  784. X+             case 'z':
  785. X+                 start_any_unread = TRUE;
  786. X                  update = TRUE;
  787. X                  break;
  788. X  
  789. X+             case 'Z':
  790. X+                 check_any_unread = TRUE;
  791. X+                 update = TRUE;
  792. X+                 break;
  793. X+ 
  794. X              case 'h':
  795. X              case '?':
  796. X              default:
  797. X***************
  798. X*** 196,201 ****
  799. X--- 208,214 ----
  800. X      } else {
  801. X          backup_newsrc ();
  802. X          read_newsrc (TRUE);
  803. X+         mark_unthreaded_groups ();
  804. X      }
  805. X  
  806. X      if (kill_articles) {        /* read in users kill file */
  807. X***************
  808. X*** 203,213 ****
  809. X      }
  810. X      
  811. X      /*
  812. X       *  save any new articles to savedir structure for later reading
  813. X       */
  814. X      if (save_news) {
  815. X          do_update ();
  816. X!         save_any_news ();
  817. X          exit (0);
  818. X      }
  819. X      
  820. X--- 216,243 ----
  821. X      }
  822. X      
  823. X      /*
  824. X+      *  check/start if any new/unread articles
  825. X+      */
  826. X+     if (check_any_unread) {
  827. X+         i = check_start_save_any_news (CHECK_ANY_NEWS);
  828. X+         exit (i);
  829. X+     } else if (start_any_unread) {
  830. X+         start_groupnum = check_start_save_any_news (START_ANY_NEWS);
  831. X+         if (start_groupnum == -1) {        /* no new/unread news so exit */
  832. X+             exit (0);
  833. X+         }
  834. X+         update = FALSE;
  835. X+     }
  836. X+ 
  837. X+     /*
  838. X       *  save any new articles to savedir structure for later reading
  839. X       */
  840. X      if (save_news) {
  841. X+         i = catchup;            /* set catchup to FALSE */
  842. X+         catchup = FALSE;
  843. X          do_update ();
  844. X!         catchup = i;            /* set catchup to previous value */
  845. X!         check_start_save_any_news (SAVE_ANY_NEWS);
  846. X          exit (0);
  847. X      }
  848. X      
  849. X***************
  850. X*** 214,230 ****
  851. X      /*
  852. X       *  update index files
  853. X       */
  854. X- 
  855. X      if (update || update_fork) {
  856. X!         COLS = DEFAULT_COLS;        /* set because curses has not started */ 
  857. X          if (update_fork) {
  858. X!             catchup = FALSE;        /* turn off msgs when running forked */ 
  859. X              verbose = FALSE;
  860. X!             if (fork () == 0) {        /* fork child to update indexes in background */
  861. X                  do_update ();
  862. X                  exit (0);
  863. X              }
  864. X          } else {
  865. X              do_update ();
  866. X              exit (0);
  867. X          }
  868. X--- 244,262 ----
  869. X      /*
  870. X       *  update index files
  871. X       */
  872. X      if (update || update_fork) {
  873. X!         COLS = DEFAULT_COLS;            /* set because curses has not started */ 
  874. X          if (update_fork) {
  875. X!             catchup = FALSE;            /* turn off msgs when running forked */ 
  876. X              verbose = FALSE;
  877. X!             if (fork () == 0) {            /* fork child to update indexes in background */
  878. X!                 thread_arts = FALSE;    /* stop threading to run faster */
  879. X                  do_update ();
  880. X                  exit (0);
  881. X              }
  882. X+             update = FALSE;
  883. X          } else {
  884. X+             thread_arts = FALSE;    /* stop threading to run faster */
  885. X              do_update ();
  886. X              exit (0);
  887. X          }
  888. X***************
  889. X*** 244,252 ****
  890. X          notify_groups ();
  891. X      }
  892. X       
  893. X!     mail_setup ();        /* record mailbox size for "you have mail" */
  894. X  
  895. X!     selection_index ();
  896. X  
  897. X      tin_done (0);
  898. X  }
  899. X--- 276,284 ----
  900. X          notify_groups ();
  901. X      }
  902. X       
  903. X!     signal (SIGINT, signal_handler);    /* catch ctrl-C */
  904. X  
  905. X!     selection_index (start_groupnum);
  906. X  
  907. X      tin_done (0);
  908. X  }
  909. X***************
  910. X*** 259,279 ****
  911. X      char *progname;
  912. X  {
  913. X      sprintf (msg, "%s %s PL%d - threaded usenet newsreader. Copyright 1991 Iain Lea.\n", progname, version, PATCHLEVEL);
  914. X!     error_message (msg, "");
  915. X      error_message ("Usage: %s [options] [newsgroups]", progname);
  916. X!     error_message ("  -c       mark all articles as read in subscribed newsgroups", "");
  917. X      error_message ("  -d dir   save articles to directory [default=%s]", savedir);
  918. X      error_message ("  -f file  subscribed newsgroups file [default=%s]", newsrc);
  919. X!     error_message ("  -h       help", "");
  920. X      error_message ("  -m file  mail program [default=%s]", DEFAULT_MAILER);
  921. X!     error_message ("  -n       notify user of any new newsgroups since last session", "");
  922. X      error_message ("  -M dir   mailbox directory [default=%s]", maildir);
  923. X      error_message ("  -p file  print program with options [default=%s]", DEFAULT_PRINTER);
  924. X      error_message ("  -r       read news remotely from default NNTP server", DEFAULT_PRINTER);
  925. X      error_message ("  -s dir   spool directory [default=%s]", SPOOLDIR);
  926. X!     error_message ("  -S       save all new articles for later reading");
  927. X!     error_message ("  -u       update index files only", "");
  928. X      error_message ("  -U       fork %s -u to update index files in background", progname);
  929. X!     error_message ("  -v       update index files only (verbose)", "");
  930. X      error_message ("\nMail bug reports/gripes/comments to %s", BUG_REPORT_ADDRESS);
  931. X  }
  932. X--- 291,313 ----
  933. X      char *progname;
  934. X  {
  935. X      sprintf (msg, "%s %s PL%d - threaded usenet newsreader. Copyright 1991 Iain Lea.\n", progname, version, PATCHLEVEL);
  936. X!     error_message (msg, (char *) 0);
  937. X      error_message ("Usage: %s [options] [newsgroups]", progname);
  938. X!     error_message ("  -c       mark all articles as read in subscribed newsgroups", (char *) 0);
  939. X      error_message ("  -d dir   save articles to directory [default=%s]", savedir);
  940. X      error_message ("  -f file  subscribed newsgroups file [default=%s]", newsrc);
  941. X!     error_message ("  -h       help", (char *) 0);
  942. X      error_message ("  -m file  mail program [default=%s]", DEFAULT_MAILER);
  943. X!     error_message ("  -n       notify user of any new newsgroups since last session", (char *) 0);
  944. X      error_message ("  -M dir   mailbox directory [default=%s]", maildir);
  945. X      error_message ("  -p file  print program with options [default=%s]", DEFAULT_PRINTER);
  946. X      error_message ("  -r       read news remotely from default NNTP server", DEFAULT_PRINTER);
  947. X      error_message ("  -s dir   spool directory [default=%s]", SPOOLDIR);
  948. X!     error_message ("  -S       save all new articles for later reading", (char *) 0);
  949. X!     error_message ("  -u       update index files only", (char *) 0);
  950. X      error_message ("  -U       fork %s -u to update index files in background", progname);
  951. X!     error_message ("  -v       update index files only (verbose)", (char *) 0);
  952. X!     error_message ("  -z       start if any unread news", (char *) 0);
  953. X!     error_message ("  -Z       return status indicating if any unread news", (char *) 0);
  954. X      error_message ("\nMail bug reports/gripes/comments to %s", BUG_REPORT_ADDRESS);
  955. X  }
  956. XFiles 102/memory.c and 103/memory.c are identical
  957. Xdiff -rcs 102/misc.c 103/misc.c
  958. X*** 102/misc.c    Mon Sep 23 20:02:20 1991
  959. X--- 103/misc.c    Mon Sep 30 18:42:28 1991
  960. X***************
  961. X*** 3,9 ****
  962. X   *  Module    : misc.c
  963. X   *  Author    : R.Skrenta / I.Lea
  964. X   *  Created   : 01-04-91
  965. X!  *  Updated   : 23-09-91
  966. X   *  Release   : 1.0
  967. X   *  Notes     :
  968. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  969. X--- 3,9 ----
  970. X   *  Module    : misc.c
  971. X   *  Author    : R.Skrenta / I.Lea
  972. X   *  Created   : 01-04-91
  973. X!  *  Updated   : 30-09-91
  974. X   *  Release   : 1.0
  975. X   *  Notes     :
  976. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  977. X***************
  978. X*** 19,55 ****
  979. X  char *mailbox_name = (char *) 0;
  980. X  int  mailbox_size;
  981. X  
  982. X! char rcdir[LEN+1];
  983. X! char rcfile[LEN+1];
  984. X! char indexdir[LEN+1];
  985. X! char killfile[LEN+1];
  986. X! char postfile[LEN+1];
  987. X  
  988. X! char active_file[LEN+1];
  989. X! char homedir[LEN+1];
  990. X! char userid[LEN+1];
  991. X! char delgroups[LEN+1];
  992. X! char newsrc[LEN+1];
  993. X! char newnewsrc[LEN+1];
  994. X! char add_addr[LEN+1];        /* address to add to rR reply to author with mail */
  995. X! char bug_addr[LEN+1];        /* address to add send bug reports to */
  996. X! char txt_help_bug_report[LEN+1];    /* address to add send bug reports to */
  997. X! char reply_to[LEN+1];        /* reply-to address */
  998. X! char my_org[LEN+1];            /* organization */
  999. X! char sig[LEN+1];
  1000. X! char signature[LEN+1];
  1001. X! char killsubj[LEN+1];        /* contains Subject:'s not to be shown */
  1002. X! char killfrom[LEN+1];        /* conatins From:'s not to be shown */
  1003. X! char page_header[LEN+1];    /* page header of pgm name and version */
  1004. X! char savedir[LEN+1];        /* directory to save articles to */
  1005. X! char spooldir[LEN+1];        /* directory where new is */
  1006. X! char mailer[LEN+1];            /* mail program */
  1007. X! char maildir[LEN+1];        /* mailbox dir where = saves are stored */
  1008. X! char mailbox[LEN+1];        /* system mailbox for each user */
  1009. X! char printer[LEN+1];        /* printer program */
  1010. X! char article[LEN+1];        /* ~/.article file */
  1011. X! char dead_article[LEN+1];    /* ~/dead.article file */
  1012. X! char progname[LEN+1];        /* program name */
  1013. X  int sort_art_type;            /* sort arts[] array by subject,from or date field */
  1014. X  int save_separate;            /* save a each part of a thread to a separate file */
  1015. X  int save_archive_name;        /* save thread with name from Archive-name: field */
  1016. X--- 19,57 ----
  1017. X  char *mailbox_name = (char *) 0;
  1018. X  int  mailbox_size;
  1019. X  
  1020. X! char rcdir[LEN];
  1021. X! char rcfile[LEN];
  1022. X! char indexdir[LEN];
  1023. X! char killfile[LEN];
  1024. X! char postfile[LEN];
  1025. X! char unthreadfile[LEN];
  1026. X  
  1027. X! char active_file[LEN];
  1028. X! char homedir[LEN];
  1029. X! char userid[LEN];
  1030. X! char delgroups[LEN];
  1031. X! char newsrc[LEN];
  1032. X! char newnewsrc[LEN];
  1033. X! char add_addr[LEN];            /* address to add to rR reply to author with mail */
  1034. X! char bug_addr[LEN];            /* address to add send bug reports to */
  1035. X! char txt_help_bug_report[LEN];    /* address to add send bug reports to */
  1036. X! char reply_to[LEN];            /* reply-to address */
  1037. X! char my_org[LEN];            /* organization */
  1038. X! char sig[LEN];
  1039. X! char signature[LEN];
  1040. X! char default_shell_command[LEN];    /* offers user default choice */
  1041. X! char killsubj[LEN];            /* contains Subject:'s not to be shown */
  1042. X! char killfrom[LEN];            /* conatins From:'s not to be shown */
  1043. X! char page_header[LEN];        /* page header of pgm name and version */
  1044. X! char savedir[LEN];            /* directory to save articles to */
  1045. X! char spooldir[LEN];            /* directory where new is */
  1046. X! char mailer[LEN];            /* mail program */
  1047. X! char maildir[LEN];            /* mailbox dir where = saves are stored */
  1048. X! char mailbox[LEN];            /* system mailbox for each user */
  1049. X! char printer[LEN];            /* printer program */
  1050. X! char article[LEN];            /* ~/.article file */
  1051. X! char dead_article[LEN];        /* ~/dead.article file */
  1052. X! char progname[LEN];            /* program name */
  1053. X  int sort_art_type;            /* sort arts[] array by subject,from or date field */
  1054. X  int save_separate;            /* save a each part of a thread to a separate file */
  1055. X  int save_archive_name;        /* save thread with name from Archive-name: field */
  1056. X***************
  1057. X*** 62,67 ****
  1058. X--- 64,70 ----
  1059. X  int post_proc_type;            /* type of post processing to be performed */
  1060. X  int default_printer;        /* set to false if user give a printer with -p switch */
  1061. X  int save_news;                /* save all arts to savedir structure */
  1062. X+ int thread_arts;            /* thread/unthread articles for viewing */
  1063. X  int num_of_tagged_files;
  1064. X  
  1065. X  /*
  1066. X***************
  1067. X*** 72,78 ****
  1068. X  
  1069. X  void init_selfinfo ()
  1070. X  {
  1071. X!     char nam[LEN+1];
  1072. X      char *p;
  1073. X      extern char *getenv();
  1074. X      extern struct passwd *getpwuid();
  1075. X--- 75,81 ----
  1076. X  
  1077. X  void init_selfinfo ()
  1078. X  {
  1079. X!     char nam[LEN];
  1080. X      char *p;
  1081. X      extern char *getenv();
  1082. X      extern struct passwd *getpwuid();
  1083. X***************
  1084. X*** 110,115 ****
  1085. X--- 113,119 ----
  1086. X      show_author = TRUE;
  1087. X      sort_art_type = SORT_BY_NOTHING;
  1088. X      save_news = FALSE;
  1089. X+     thread_arts = TRUE;
  1090. X      
  1091. X      killsubj[0] = '\0';
  1092. X      killfrom[0] = '\0';
  1093. X***************
  1094. X*** 122,127 ****
  1095. X--- 126,132 ----
  1096. X      default_mail_address[0] = '\0';
  1097. X      default_regex_pattern[0] = '\0';
  1098. X      default_save_file[0] = '\0';
  1099. X+     default_shell_command[0] = '\0';
  1100. X      
  1101. X      sprintf (rcdir,  "%s/%s", get_val ("TINDIR", homedir), RCDIR);
  1102. X      sprintf (indexdir, "%s/%s", rcdir, INDEXDIR);
  1103. X***************
  1104. X*** 128,133 ****
  1105. X--- 133,139 ----
  1106. X      sprintf (rcfile,   "%s/%s", rcdir, RCFILE);
  1107. X      sprintf (killfile, "%s/%s", rcdir, KILLFILE);
  1108. X      sprintf (postfile, "%s/%s", rcdir, POSTFILE);
  1109. X+     sprintf (unthreadfile, "%s/%s", rcdir, UNTHREADFILE);
  1110. X  
  1111. X      sprintf (signature, "%s/.signature", homedir);
  1112. X      sprintf (sig, "%s/.Sig", homedir);
  1113. X***************
  1114. X*** 159,164 ****
  1115. X--- 165,175 ----
  1116. X              fclose (fp);
  1117. X          }
  1118. X      }
  1119. X+     if (stat (unthreadfile, &sb) == -1) {
  1120. X+         if ((fp = fopen (unthreadfile, "w")) != NULL) {
  1121. X+             fclose (fp);
  1122. X+         }
  1123. X+     }
  1124. X  
  1125. X      read_rcfile ();
  1126. X  
  1127. X***************
  1128. X*** 333,339 ****
  1129. X      register int i, j;
  1130. X  
  1131. X      for (i = 0; i < top_base; i++) {
  1132. X!         for (j = base[i] ; j >= 0 ; j = arts[j].thread) {
  1133. X              if (j == n) {
  1134. X                  return i;
  1135. X              }
  1136. X--- 344,350 ----
  1137. X      register int i, j;
  1138. X  
  1139. X      for (i = 0; i < top_base; i++) {
  1140. X!         for (j = (int) base[i] ; j >= 0 ; j = arts[j].thread) {
  1141. X              if (j == n) {
  1142. X                  return i;
  1143. X              }
  1144. X***************
  1145. X*** 356,362 ****
  1146. X  
  1147. X      i = which_base (n);
  1148. X  
  1149. X!     for (j = base[i]; j != -1; j = arts[j].thread)
  1150. X          if (j == n)
  1151. X              break;
  1152. X          else
  1153. X--- 367,373 ----
  1154. X  
  1155. X      i = which_base (n);
  1156. X  
  1157. X!     for (j = (int) base[i]; j != -1; j = arts[j].thread)
  1158. X          if (j == n)
  1159. X              break;
  1160. X          else
  1161. X***************
  1162. X*** 377,387 ****
  1163. X      int oldi = -3;
  1164. X      int sum = 0;
  1165. X  
  1166. X!     assert(n < top_base);
  1167. X  
  1168. X!     for (i = base[n]; i != -1; i = arts[i].thread) {
  1169. X!         assert(i != -2);
  1170. X!         assert(i != oldi);
  1171. X          oldi = i;
  1172. X          sum++;
  1173. X      }
  1174. X--- 388,398 ----
  1175. X      int oldi = -3;
  1176. X      int sum = 0;
  1177. X  
  1178. X!     assert (n < top_base);
  1179. X  
  1180. X!     for (i = (int) base[n]; i != -1; i = arts[i].thread) {
  1181. X!         assert (i != -2);
  1182. X!         assert (i != oldi);
  1183. X          oldi = i;
  1184. X          sum++;
  1185. X      }
  1186. X***************
  1187. X*** 429,436 ****
  1188. X  int invoke_editor (nam)
  1189. X      char *nam;
  1190. X  {
  1191. X!     char buf[LEN+1];
  1192. X!     static char editor[LEN+1];
  1193. X      static int first = TRUE;
  1194. X  
  1195. X      if (first) {
  1196. X--- 440,447 ----
  1197. X  int invoke_editor (nam)
  1198. X      char *nam;
  1199. X  {
  1200. X!     char buf[LEN];
  1201. X!     static char editor[LEN];
  1202. X      static int first = TRUE;
  1203. X  
  1204. X      if (first) {
  1205. X***************
  1206. X*** 451,457 ****
  1207. X  
  1208. X  void shell_escape ()
  1209. X  {
  1210. X!     char shell[LEN+1];
  1211. X      char *p;
  1212. X  
  1213. X  #ifdef SIGTSTP
  1214. X--- 462,468 ----
  1215. X  
  1216. X  void shell_escape ()
  1217. X  {
  1218. X!     char shell[LEN];
  1219. X      char *p;
  1220. X  
  1221. X  #ifdef SIGTSTP
  1222. X***************
  1223. X*** 458,478 ****
  1224. X      void (*susp)();
  1225. X  #endif
  1226. X  
  1227. X!     if (! parse_string (txt_shell_escape, shell))
  1228. X          strcpy (shell, get_val ("SHELL", DEFAULT_SHELL));
  1229. X  
  1230. X      for (p = shell; *p && (*p == ' ' || *p == '\t'); p++)
  1231. X          continue;
  1232. X  
  1233. X!     if (! *p)
  1234. X!         strcpy (shell, get_val ("SHELL", DEFAULT_SHELL));
  1235. X      
  1236. X      Raw (FALSE);
  1237. X  
  1238. X      set_real_uid_gid ();
  1239. X  
  1240. X-     fputs ("\r\n", stdout);
  1241. X- 
  1242. X  #ifdef SIGTSTP
  1243. X      if (do_sigtstp)
  1244. X          susp = signal (SIGTSTP, SIG_DFL);
  1245. X--- 469,502 ----
  1246. X      void (*susp)();
  1247. X  #endif
  1248. X  
  1249. X!     sprintf (msg, txt_shell_escape, default_shell_command);
  1250. X!     
  1251. X!     if (! parse_string (msg, shell))
  1252. X          strcpy (shell, get_val ("SHELL", DEFAULT_SHELL));
  1253. X  
  1254. X      for (p = shell; *p && (*p == ' ' || *p == '\t'); p++)
  1255. X          continue;
  1256. X  
  1257. X!     if (*p) {
  1258. X!         my_strncpy (default_shell_command, p, LEN);
  1259. X!     } else {
  1260. X!         if (default_shell_command[0]) {
  1261. X!             my_strncpy (shell, default_shell_command, LEN);
  1262. X!         } else {
  1263. X!             strcpy (shell, get_val ("SHELL", DEFAULT_SHELL));
  1264. X!         }
  1265. X!         p = shell;
  1266. X!     }
  1267. X! 
  1268. X!     ClearScreen ();
  1269. X!     sprintf (msg, "Shell Command (%s)", p);
  1270. X!     center_line (0, TRUE, msg);
  1271. X!     MoveCursor (INDEX_TOP, 0);
  1272. X      
  1273. X      Raw (FALSE);
  1274. X  
  1275. X      set_real_uid_gid ();
  1276. X  
  1277. X  #ifdef SIGTSTP
  1278. X      if (do_sigtstp)
  1279. X          susp = signal (SIGTSTP, SIG_DFL);
  1280. X***************
  1281. X*** 502,512 ****
  1282. X  void tin_done (ret)
  1283. X      int ret;
  1284. X  {
  1285. X      nntp_finish ();            /* disconnect from NNTP server */
  1286. X      free_all_arrays ();        /* deallocate all arrays */
  1287. X!     ClearScreen();
  1288. X!     Raw(FALSE);
  1289. X!     exit(ret);
  1290. X  }
  1291. X  
  1292. X  /*
  1293. X--- 526,568 ----
  1294. X  void tin_done (ret)
  1295. X      int ret;
  1296. X  {
  1297. X+     char group_path[LEN], *p;
  1298. X+     int ask = TRUE;
  1299. X+     register int i, j;
  1300. X+     
  1301. X+     /*
  1302. X+      * check if any groups were read & ask if they should marked read
  1303. X+      */
  1304. X+     for (i = 0 ; i < local_top ; i++) {
  1305. X+         if (active[my_group[i]].read) {
  1306. X+             if (ask) {
  1307. X+                 if (prompt_yn (LINES, "Catchup all groups entered during this session? (y/n): ", 'n')) {
  1308. X+                     ask = FALSE;
  1309. X+                     thread_arts = FALSE;    /* speeds up index loading */
  1310. X+                 } else {
  1311. X+                     break;
  1312. X+                 }
  1313. X+             }
  1314. X+             sprintf (msg, "Catchup %s...", active[my_group[i]].name);
  1315. X+             wait_message (msg);
  1316. X+             strcpy (group_path, active[my_group[i]].name);
  1317. X+             for (p = group_path; *p; p++) {
  1318. X+                 if (*p == '.') {
  1319. X+                     *p = '/';
  1320. X+                 }
  1321. X+             }
  1322. X+             index_group (active[my_group[i]].name, group_path);
  1323. X+             for (j = 0; j < top; j++) {
  1324. X+                 arts[j].unread = ART_READ;
  1325. X+             }
  1326. X+             update_newsrc (active[my_group[i]].name, my_group[i], FALSE);
  1327. X+         }
  1328. X+     }
  1329. X      nntp_finish ();            /* disconnect from NNTP server */
  1330. X      free_all_arrays ();        /* deallocate all arrays */
  1331. X!     ClearScreen ();
  1332. X!     Raw (FALSE);
  1333. X!     exit (ret);
  1334. X  }
  1335. X  
  1336. X  /*
  1337. X***************
  1338. X*** 517,523 ****
  1339. X  {
  1340. X      FILE *fp;
  1341. X      char *p, *q;
  1342. X!     char buf[LEN+1];
  1343. X      int created, i;
  1344. X      long h;
  1345. X      
  1346. X--- 573,579 ----
  1347. X  {
  1348. X      FILE *fp;
  1349. X      char *p, *q;
  1350. X!     char buf[LEN];
  1351. X      int created, i;
  1352. X      long h;
  1353. X      
  1354. X***************
  1355. X*** 571,578 ****
  1356. X          active[num_active].name = str_dup (buf);
  1357. X          active[num_active].max = (long) atol (p);
  1358. X          active[num_active].min = (long) atol (q);
  1359. X!         active[num_active].next = -1;        /* hash chaining */
  1360. X!         active[num_active].flag = NOTGOT;   /* not in my_group[] yet */
  1361. X  
  1362. X          num_active++;
  1363. X  
  1364. X--- 627,636 ----
  1365. X          active[num_active].name = str_dup (buf);
  1366. X          active[num_active].max = (long) atol (p);
  1367. X          active[num_active].min = (long) atol (q);
  1368. X!         active[num_active].next = -1;        /* hash chaining */
  1369. X!         active[num_active].flag = NOTGOT;    /* not in my_group[] yet */
  1370. X!         active[num_active].read = FALSE;    /* read/unread */
  1371. X!         active[num_active].thread = TRUE;    /* thread articles */
  1372. X  
  1373. X          num_active++;
  1374. X  
  1375. X***************
  1376. X*** 594,632 ****
  1377. X       */
  1378. X      created = backup_active (TRUE);
  1379. X  
  1380. X- #ifdef SORT_ACTIVE_FILE        /* DOES NOT WORK - ERROR */
  1381. X-     if (num_active) {
  1382. X-         qsort (active, num_active, sizeof (struct group_ent), active_comp);
  1383. X-     }
  1384. X- #endif    
  1385. X- 
  1386. X      debug_print_active ();
  1387. X  
  1388. X      return (created);
  1389. X  }
  1390. X  
  1391. X! 
  1392. X! #ifdef SORT_ACTIVE_FILE        /* DOES NOT WORK - ERROR */
  1393. X! int active_comp (p1, p2)
  1394. X!      char *p1;
  1395. X!      char *p2;
  1396. X!   {
  1397. X!      struct group_ent *s1 = (struct group_ent *) p1;
  1398. X!      struct group_ent *s2 = (struct group_ent *) p2;
  1399. X   
  1400. X!     /* s1->name less than s2->name */
  1401. X!     if (strcmp (s1->name, s2->name) < 0) {
  1402. X!         return -1;
  1403. X      }
  1404. X!     /* s1->name greater than s2->name */
  1405. X!     if (strcmp (s1->name, s2->name) > 0) {
  1406. X!         return 1;
  1407. X      }
  1408. X!     return 0;
  1409. X  }
  1410. X- #endif
  1411. X  
  1412. X- 
  1413. X  /*
  1414. X   *  create ~/.tin/active from LIBDIR/active if it does not exist 
  1415. X   */
  1416. X--- 652,701 ----
  1417. X       */
  1418. X      created = backup_active (TRUE);
  1419. X  
  1420. X      debug_print_active ();
  1421. X  
  1422. X      return (created);
  1423. X  }
  1424. X  
  1425. X! /*
  1426. X!  *  Mark any groups in my_group[] that are in ~/.tin/unthread so they
  1427. X!  *  will not be threaded
  1428. X!  */
  1429. X   
  1430. X! void mark_unthreaded_groups ()
  1431. X! {
  1432. X!     FILE *fp;
  1433. X!     char buf[LEN];
  1434. X!     int i;
  1435. X!     long h;
  1436. X!     
  1437. X!     if ((fp = fopen (unthreadfile, "r")) == NULL) {
  1438. X!         error_message (txt_cannot_open, unthreadfile);
  1439. X!         return;
  1440. X      }
  1441. X! 
  1442. X!     while (fgets (buf, sizeof (buf), fp) != NULL) {
  1443. X!         buf[strlen (buf)-1] = '\0'; 
  1444. X!         h = hash_groupname (buf);
  1445. X! 
  1446. X!         if (debug) {
  1447. X!             printf ("Unthreading %s...\n", buf);
  1448. X!         }
  1449. X! 
  1450. X!         if ((i = group_hash[h]) >= 0) {
  1451. X!             active[i].thread = FALSE;
  1452. X!         } else {
  1453. X!             for (i=group_hash[h]; active[i].next >= 0; i=active[i].next) {
  1454. X!                 if (strcmp (active[i].name, buf) == 0) {
  1455. X!                     active[i].thread = FALSE;
  1456. X!                     break;
  1457. X!                 }
  1458. X!             }
  1459. X!         }
  1460. X      }
  1461. X!     fclose (fp);
  1462. X  }
  1463. X  
  1464. X  /*
  1465. X   *  create ~/.tin/active from LIBDIR/active if it does not exist 
  1466. X   */
  1467. X***************
  1468. X*** 693,699 ****
  1469. X      char *path;
  1470. X      int mode;
  1471. X  {
  1472. X!     char buf[LEN+1];
  1473. X      struct stat sb;
  1474. X  
  1475. X      sprintf(buf, "mkdir %s", path);
  1476. X--- 762,768 ----
  1477. X      char *path;
  1478. X      int mode;
  1479. X  {
  1480. X!     char buf[LEN];
  1481. X      struct stat sb;
  1482. X  
  1483. X      sprintf(buf, "mkdir %s", path);
  1484. X***************
  1485. X*** 812,826 ****
  1486. X  
  1487. X  void set_real_uid_gid ()
  1488. X  {
  1489. X!     setuid (real_uid);
  1490. X!     setgid (real_gid);
  1491. X  }
  1492. X  
  1493. X  
  1494. X  void set_tin_uid_gid ()
  1495. X  {
  1496. X!     setuid (tin_uid);
  1497. X!     setgid (tin_gid);
  1498. X  }
  1499. X  
  1500. X  
  1501. X--- 881,903 ----
  1502. X  
  1503. X  void set_real_uid_gid ()
  1504. X  {
  1505. X!     if (setuid (real_uid) == -1) {
  1506. X!         error_message ("Error setuid(real) failed", (char *) 0);
  1507. X!     }
  1508. X!     if (setgid (real_gid) == -1) {
  1509. X!         error_message ("Error setgid(real) failed", (char *) 0);
  1510. X!     }
  1511. X  }
  1512. X  
  1513. X  
  1514. X  void set_tin_uid_gid ()
  1515. X  {
  1516. X!     if (setuid (tin_uid) == -1) {
  1517. X!         error_message ("Error setuid(tin) failed", (char *) 0);
  1518. X!     }
  1519. X!     if (setgid (tin_gid) == -1) {
  1520. X!         error_message ("Error setgid(tin) failed", (char *) 0);
  1521. X!     }
  1522. X  }
  1523. X  
  1524. X  
  1525. X***************
  1526. X*** 848,857 ****
  1527. X  
  1528. X      Raw (FALSE);
  1529. X      
  1530. X!     printf ("Checking for new newsgroups...");
  1531. X      fflush (stdout);
  1532. X      
  1533. X!     old_active = (struct notify_t *) my_malloc (sizeof (struct notify_t) * num_active);
  1534. X      if (old_active == (struct notify_t *) 0) {
  1535. X          error_message (txt_out_of_memory, progname);
  1536. X          goto notify_groups_done;
  1537. X--- 925,934 ----
  1538. X  
  1539. X      Raw (FALSE);
  1540. X      
  1541. X!     printf ("Checking active list for new newsgroups...");
  1542. X      fflush (stdout);
  1543. X      
  1544. X!     old_active = (struct notify_t *) my_malloc ((unsigned) sizeof (struct notify_t) * num_active);
  1545. X      if (old_active == (struct notify_t *) 0) {
  1546. X          error_message (txt_out_of_memory, progname);
  1547. X          goto notify_groups_done;
  1548. X***************
  1549. X*** 913,929 ****
  1550. X  }
  1551. X  
  1552. X  
  1553. X! void basename (dirname, basename)
  1554. X      char *dirname;        /* argv[0] */
  1555. X!     char *basename;        /* progname is returned */
  1556. X  {
  1557. X      int i;
  1558. X      
  1559. X!     strcpy (basename, dirname);
  1560. X      
  1561. X!     for (i=(int) strlen(dirname)-1 ; i ; i--) {
  1562. X          if (dirname[i] == '/') {
  1563. X!             strcpy (basename, dirname+(i+1));
  1564. X              break;
  1565. X          }
  1566. X      }
  1567. X--- 990,1006 ----
  1568. X  }
  1569. X  
  1570. X  
  1571. X! void basename (dirname, program)
  1572. X      char *dirname;        /* argv[0] */
  1573. X!     char *program;        /* progname is returned */
  1574. X  {
  1575. X      int i;
  1576. X      
  1577. X!     strcpy (program, dirname);
  1578. X      
  1579. X!     for (i=(int) strlen (dirname)-1 ; i ; i--) {
  1580. X          if (dirname[i] == '/') {
  1581. X!             strcpy (program, dirname+(i+1));
  1582. X              break;
  1583. X          }
  1584. X      }
  1585. Xdiff -rcs 102/newsrc.c 103/newsrc.c
  1586. X*** 102/newsrc.c    Mon Sep 23 17:55:39 1991
  1587. X--- 103/newsrc.c    Mon Sep 30 14:49:05 1991
  1588. X***************
  1589. X*** 3,9 ****
  1590. X   *  Module    : newsrc.c
  1591. X   *  Author    : R.Skrenta / I.Lea
  1592. X   *  Created   : 01-04-91
  1593. X!  *  Updated   : 23-09-91
  1594. X   *  Release   : 1.0
  1595. X   *  Notes     :
  1596. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1597. X--- 3,9 ----
  1598. X   *  Module    : newsrc.c
  1599. X   *  Author    : R.Skrenta / I.Lea
  1600. X   *  Created   : 01-04-91
  1601. X!  *  Updated   : 30-09-91
  1602. X   *  Release   : 1.0
  1603. X   *  Notes     :
  1604. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1605. X***************
  1606. X*** 26,34 ****
  1607. X      FILE *fp_newsrc, *fp_backup;
  1608. X      
  1609. X      set_real_uid_gid ();
  1610. X!     
  1611. X      if ((fp_newsrc = fopen (newsrc, "r")) != NULL) {
  1612. X          sprintf (buf, "%s/.oldnewsrc", homedir);
  1613. X          if ((fp_backup = fopen (buf, "w")) != NULL) {
  1614. X              while (fgets (buf, sizeof (buf), fp_newsrc) != NULL) {
  1615. X                  fputs (buf, fp_backup);
  1616. X--- 26,35 ----
  1617. X      FILE *fp_newsrc, *fp_backup;
  1618. X      
  1619. X      set_real_uid_gid ();
  1620. X! 
  1621. X      if ((fp_newsrc = fopen (newsrc, "r")) != NULL) {
  1622. X          sprintf (buf, "%s/.oldnewsrc", homedir);
  1623. X+         unlink (buf);    /* because rn make link of .newsrc -> .oldnewsrc */
  1624. X          if ((fp_backup = fopen (buf, "w")) != NULL) {
  1625. X              while (fgets (buf, sizeof (buf), fp_newsrc) != NULL) {
  1626. X                  fputs (buf, fp_backup);
  1627. X***************
  1628. X*** 154,160 ****
  1629. X  
  1630. X  void rewrite_newsrc ()
  1631. X  {
  1632. X!     char buf[8192], old[LEN+1];
  1633. X      char old_groups[LEN];
  1634. X      FILE *fp, *fp_old, *fp_new;
  1635. X      int found_old_group, len;    
  1636. X--- 155,161 ----
  1637. X  
  1638. X  void rewrite_newsrc ()
  1639. X  {
  1640. X!     char buf[8192], old[LEN];
  1641. X      char old_groups[LEN];
  1642. X      FILE *fp, *fp_old, *fp_new;
  1643. X      int found_old_group, len;    
  1644. X***************
  1645. X*** 181,187 ****
  1646. X                  strncmp (buf, old, len) == 0) {
  1647. X                  old[len] = '\0';
  1648. X                  fprintf (stderr, txt_not_in_active_file, old);
  1649. X!                 fprintf (stderr, ". Deleting.\n");
  1650. X                  fflush (stderr);
  1651. X                  found_old_group = TRUE;    
  1652. X              }
  1653. X--- 182,188 ----
  1654. X                  strncmp (buf, old, len) == 0) {
  1655. X                  old[len] = '\0';
  1656. X                  fprintf (stderr, txt_not_in_active_file, old);
  1657. X!                 fprintf (stderr, ". Deleting.\r\n");
  1658. X                  fflush (stderr);
  1659. X                  found_old_group = TRUE;    
  1660. X              }
  1661. Xdiff -rcs 102/nntp.h 103/nntp.h
  1662. X*** 102/nntp.h    Mon Sep 23 17:55:39 1991
  1663. X--- 103/nntp.h    Mon Sep 30 07:58:07 1991
  1664. X***************
  1665. X*** 3,9 ****
  1666. X   *  Module    : nntp.h
  1667. X   *  Author    : R.Skrenta
  1668. X   *  Created   : 01-04-91
  1669. X!  *  Updated   : 10-08-91
  1670. X   *  Release   : 1.0
  1671. X   *  Notes     : Changed a bit so nntp knows about Tass
  1672. X   *              This file is originally from the nntp 1.5 source.
  1673. X--- 3,9 ----
  1674. X   *  Module    : nntp.h
  1675. X   *  Author    : R.Skrenta
  1676. X   *  Created   : 01-04-91
  1677. X!  *  Updated   : 27-09-91
  1678. X   *  Release   : 1.0
  1679. X   *  Notes     : Changed a bit so nntp knows about Tass
  1680. X   *              This file is originally from the nntp 1.5 source.
  1681. X***************
  1682. X*** 14,20 ****
  1683. X--- 14,22 ----
  1684. X   *              right notice, and it must be included in any copy made
  1685. X   */
  1686. X  
  1687. X+ #ifndef    NNTP_SERVER_FILE
  1688. X  #define    NNTP_SERVER_FILE    "/etc/nntpserver"
  1689. X+ #endif
  1690. X  
  1691. X  /*
  1692. X   *  External routine declarations
  1693. Xdiff -rcs 102/open.c 103/open.c
  1694. X*** 102/open.c    Mon Sep 23 17:55:39 1991
  1695. X--- 103/open.c    Mon Sep 30 18:44:17 1991
  1696. X***************
  1697. X*** 3,9 ****
  1698. X   *  Module    : open.c
  1699. X   *  Author    : R.Skrenta / I.Lea
  1700. X   *  Created   : 01-04-91
  1701. X!  *  Updated   : 28-08-91
  1702. X   *  Release   : 1.0
  1703. X   *  Notes     : reads news locally (/usr/spool/news) or via NNTP
  1704. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1705. X--- 3,9 ----
  1706. X   *  Module    : open.c
  1707. X   *  Author    : R.Skrenta / I.Lea
  1708. X   *  Created   : 01-04-91
  1709. X!  *  Updated   : 27-09-91
  1710. X   *  Release   : 1.0
  1711. X   *  Notes     : reads news locally (/usr/spool/news) or via NNTP
  1712. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1713. X***************
  1714. X*** 46,52 ****
  1715. X  int compiled_with_nntp = FALSE;
  1716. X  #endif
  1717. X  
  1718. X! char server_name[LEN+1];
  1719. X  
  1720. X  
  1721. X  char *is_remote ()
  1722. X--- 46,52 ----
  1723. X  int compiled_with_nntp = FALSE;
  1724. X  #endif
  1725. X  
  1726. X! char server_name[LEN];
  1727. X  
  1728. X  
  1729. X  char *is_remote ()
  1730. X***************
  1731. X*** 74,98 ****
  1732. X  void nntp_startup ()
  1733. X  {
  1734. X  #ifdef USE_NNTP    
  1735. X!     char *server_name;
  1736. X      int ret;
  1737. X      extern char *getenv();
  1738. X  
  1739. X      if (read_news_via_nntp) {
  1740. X          if (nntp_server[0]) {
  1741. X!             server_name = nntp_server;
  1742. X          } else {
  1743. X!             server_name = getserverbyfile (NNTP_SERVER_FILE);
  1744. X          }
  1745. X!         if (server_name == NULL) {
  1746. X              fprintf(stderr, txt_cannot_get_nntp_server_name);
  1747. X              fprintf(stderr, txt_server_name_in_file_env_var, NNTP_SERVER_FILE);
  1748. X              exit(1);
  1749. X          }
  1750. X  
  1751. X!         ret = server_init (server_name);
  1752. X  /*
  1753. X!         handle_server_response (ret, server_name);
  1754. X  */        
  1755. X          switch (ret) {
  1756. X          case OK_CANPOST:
  1757. X--- 74,101 ----
  1758. X  void nntp_startup ()
  1759. X  {
  1760. X  #ifdef USE_NNTP    
  1761. X!     char *server;
  1762. X      int ret;
  1763. X      extern char *getenv();
  1764. X  
  1765. X      if (read_news_via_nntp) {
  1766. X          if (nntp_server[0]) {
  1767. X!             server = nntp_server;
  1768. X          } else {
  1769. X!             server = getserverbyfile (NNTP_SERVER_FILE);
  1770. X          }
  1771. X!         if (server == (char *) 0) {
  1772. X              fprintf(stderr, txt_cannot_get_nntp_server_name);
  1773. X              fprintf(stderr, txt_server_name_in_file_env_var, NNTP_SERVER_FILE);
  1774. X              exit(1);
  1775. X          }
  1776. X  
  1777. X!         wait_message ("Connecting...");
  1778. X!         
  1779. X!         ret = server_init (server);
  1780. X!         putchar ('\n');
  1781. X  /*
  1782. X!         handle_server_response (ret, server);
  1783. X  */        
  1784. X          switch (ret) {
  1785. X          case OK_CANPOST:
  1786. X***************
  1787. X*** 100,106 ****
  1788. X              break;    
  1789. X  
  1790. X          case -1:
  1791. X!             fprintf (stderr, txt_failed_to_connect_to_server, server_name);
  1792. X              exit (1);
  1793. X  
  1794. X          default:
  1795. X--- 103,109 ----
  1796. X              break;    
  1797. X  
  1798. SHAR_EOF
  1799. echo "End of tin1.0 part 2"
  1800. echo "File tin.patch03 is continued in part 3"
  1801. echo "3" > shar3_seq_.tmp
  1802. exit 0
  1803.  
  1804. exit 0 # Just in case...
  1805. -- 
  1806. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1807. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1808. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1809. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1810.