home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume31 / tin / patch05c < prev    next >
Encoding:
Text File  |  1992-08-16  |  60.5 KB  |  2,277 lines

  1. Newsgroups: comp.sources.misc
  2. From: iain%anl433.uucp@Germany.EU.net (Iain Lea)
  3. Subject:  v31i082:  tin - threaded full screen newsreader v1.1, Patch05c/7
  4. Message-ID: <1992Aug16.012519.12579@sparky.imd.sterling.com>
  5. X-Md4-Signature: bb8ea06dc421b2edb2b1f04b7845baed
  6. Date: Sun, 16 Aug 1992 01:25:19 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 82
  11. Archive-name: tin/patch05c
  12. Environment: BSD, SCO, ISC, SUNOS, SYSVR3, SYSVR4, ULTRIX, XENIX
  13. Patch-To: tin: Volume 31, Issue 1-15
  14.  
  15. #!/bin/sh
  16. # this is patch-1.15.shar.03 (part 3 of tin-1.15)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file tin-1.15.patch continued
  19. #
  20. if test ! -r _shar_seq_.tmp; then
  21.     echo 'Please unpack part 1 first!'
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 3; then
  26.     echo Please unpack part "$Scheck" next!
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < _shar_seq_.tmp || exit 1
  32. if test ! -f _shar_wnt_.tmp; then
  33.     echo 'x - still skipping tin-1.15.patch'
  34. else
  35. echo 'x - continuing file tin-1.15.patch'
  36. sed 's/^X//' << 'SHAR_EOF' >> 'tin-1.15.patch' &&
  37. X  extern int real_umask;
  38. X  extern int reread_active_file;
  39. ! extern int save_archive_name;
  40. X  extern int save_news;
  41. - extern int save_num;
  42. X  extern int show_author;
  43. X  extern int show_description;
  44. ! extern int show_only_unread;
  45. ! extern int sort_art_type;
  46. X  extern int space_mode;
  47. X  extern int spooldir_is_active;
  48. X  extern int start_editor_offset;
  49. X  extern int start_line_offset;
  50. X  extern int system_status;
  51. - extern int thread_arts;
  52. X  extern int tin_gid;
  53. X  extern int tin_uid;
  54. X  extern int top;
  55. X  extern int top_base;
  56. X  extern int unlink_article;
  57. --- 571,590 ----
  58. X  extern int real_uid;
  59. X  extern int real_umask;
  60. X  extern int reread_active_file;
  61. ! extern int reread_active_file_secs;
  62. X  extern int save_news;
  63. X  extern int show_author;
  64. X  extern int show_description;
  65. ! extern int show_last_line_prev_page;
  66. ! extern int show_only_unread_groups;
  67. X  extern int space_mode;
  68. X  extern int spooldir_is_active;
  69. X  extern int start_editor_offset;
  70. X  extern int start_line_offset;
  71. X  extern int system_status;
  72. X  extern int tin_gid;
  73. X  extern int tin_uid;
  74. + extern int tab_after_X_selection;
  75. X  extern int top;
  76. X  extern int top_base;
  77. X  extern int unlink_article;
  78. ***************
  79. *** 563,569 ****
  80. X  extern int update_fork;
  81. X  extern int check_any_unread;
  82. X  extern int start_any_unread;
  83. - extern int notify_new_groups;
  84. X  extern int xindex_supported;
  85. X  extern int xuser_supported;
  86. X  extern int xspooldir_supported;
  87. --- 593,598 ----
  88. ***************
  89. *** 573,581 ****
  90. --- 602,612 ----
  91. X  extern struct passwd *myentry;
  92. X  extern struct article_t *arts;
  93. X  extern struct group_t *active;
  94. + extern struct active_size_t *active_size;
  95. X  extern struct kill_t *killf;
  96. X  extern struct posted_t *posted;
  97. X  extern struct save_t *save;
  98. + extern struct spooldir_t *spooldirs;
  99. X  extern struct screen_t *screen;
  100. X  
  101. X  #ifdef POSIX_JOB_CONTROL
  102. diff -rcs ../1.14/feed.c ./feed.c
  103. *** ../1.14/feed.c    Tue Aug 11 21:23:04 1992
  104. --- ./feed.c    Fri Jul 24 18:59:53 1992
  105. ***************
  106. *** 3,9 ****
  107. X   *  Module    : feed.c
  108. X   *  Author    : I.Lea
  109. X   *  Created   : 31-08-91
  110. !  *  Updated   : 18-06-92
  111. X   *  Notes     : provides same interface to mail,pipe,print and save commands
  112. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea
  113. X   *              You may  freely  copy or  redistribute  this software,
  114. --- 3,9 ----
  115. X   *  Module    : feed.c
  116. X   *  Author    : I.Lea
  117. X   *  Created   : 31-08-91
  118. !  *  Updated   : 23-07-92
  119. X   *  Notes     : provides same interface to mail,pipe,print and save commands
  120. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea
  121. X   *              You may  freely  copy or  redistribute  this software,
  122. ***************
  123. *** 73,86 ****
  124. X       */
  125. X      if (num_of_tagged_arts) {
  126. X          ch_default = 'T';
  127. !     } else if (num_of_hot_arts) {
  128. X          ch_default = 'h';
  129. X      } else if (num_of_responses (b)) {
  130. X          ch_default = 't';
  131. X      }
  132. X  
  133. !     if ((save_archive_name == FALSE || arts[respnum].archive == (char *) 0) ||
  134. !         (save_archive_name == TRUE && function != FEED_SAVE) ||
  135. X          ch_default == 'T') {
  136. X          do {
  137. X              sprintf (msg, "%s%s%c", prompt, txt_art_thread_regex_tag, ch_default);
  138. --- 73,88 ----
  139. X       */
  140. X      if (num_of_tagged_arts) {
  141. X          ch_default = 'T';
  142. !     } else if (num_of_hot_arts && default_auto_save == FALSE) {
  143. X          ch_default = 'h';
  144. X      } else if (num_of_responses (b)) {
  145. X          ch_default = 't';
  146. +     } else {
  147. +         ch_default = 'a';
  148. X      }
  149. X  
  150. !     if ((default_auto_save == FALSE || arts[respnum].archive == (char *) 0) ||
  151. !         (default_auto_save == TRUE && function != FEED_SAVE) ||
  152. X          ch_default == 'T') {
  153. X          do {
  154. X              sprintf (msg, "%s%s%c", prompt, txt_art_thread_regex_tag, ch_default);
  155. ***************
  156. *** 88,95 ****
  157. X              MoveCursor (LINES, (int) strlen (msg)-1);
  158. X              if ((ch = (char) ReadCh ()) == CR)
  159. X                  ch = ch_default;
  160. !         } while (ch != ESC && ch != 'a' && ch != 't' && ch != 'T' && 
  161. !             ch != 'h' && ch != 'p' && ch != 'q');
  162. X      } else {
  163. X          filename[0] = '\0';
  164. X          ch = ch_default;
  165. --- 90,96 ----
  166. X              MoveCursor (LINES, (int) strlen (msg)-1);
  167. X              if ((ch = (char) ReadCh ()) == CR)
  168. X                  ch = ch_default;
  169. !         } while (! strchr ("ahpqtT\033", ch));
  170. X      } else {
  171. X          filename[0] = '\0';
  172. X          ch = ch_default;
  173. ***************
  174. *** 194,200 ****
  175. X              break;
  176. X          case FEED_SAVE:        /* ask user for filename */
  177. X              free_save_array ();
  178. !             if ((save_archive_name == FALSE || arts[respnum].archive == (char *) 0)) {
  179. X                  sprintf (msg, txt_save_filename, default_save_file);
  180. X                  if (! prompt_string (msg, filename)) {
  181. X                      clear_message ();
  182. --- 195,201 ----
  183. X              break;
  184. X          case FEED_SAVE:        /* ask user for filename */
  185. X              free_save_array ();
  186. !             if ((default_auto_save == FALSE || arts[respnum].archive == (char *) 0)) {
  187. X                  sprintf (msg, txt_save_filename, default_save_file);
  188. X                  if (! prompt_string (msg, filename)) {
  189. X                      clear_message ();
  190. ***************
  191. *** 244,251 ****
  192. X                          MoveCursor (LINES, (int) strlen (msg)-1);
  193. X                          if ((proc_ch = (char) ReadCh ()) == CR)
  194. X                              proc_ch = proc_ch_default;
  195. !                     } while (proc_ch != 'n' && proc_ch != 's' &&
  196. !                          proc_ch != 'u' && proc_ch != 'U');
  197. X                  }
  198. X              }
  199. X              clear_message ();
  200. --- 245,255 ----
  201. X                          MoveCursor (LINES, (int) strlen (msg)-1);
  202. X                          if ((proc_ch = (char) ReadCh ()) == CR)
  203. X                              proc_ch = proc_ch_default;
  204. !                     } while (! strchr ("nqsuU\033", proc_ch));
  205. !                     if (proc_ch == 'q' || proc_ch == ESC) {    /* exit */
  206. !                         clear_message ();
  207. !                         return;
  208. !                     }
  209. X                  }
  210. X              }
  211. X              clear_message ();
  212. ***************
  213. *** 472,479 ****
  214. --- 476,492 ----
  215. X              break;
  216. X      }
  217. X  
  218. + if (debug == 2) {
  219. +     printf ("REDRAW=[%d]  ", redraw_screen);
  220. +     fflush (stdout);
  221. + }
  222. X      redraw_screen = mail_check ();    /* in case of sending to oneself */
  223. X  
  224. + if (debug == 2) {
  225. +     printf ("REDRAW=[%d]", redraw_screen);
  226. +     fflush (stdout);
  227. +     sleep (2);
  228. + }
  229. X      switch (function) {
  230. X          case FEED_PIPE:
  231. X              pclose (fp);        
  232. ***************
  233. *** 499,504 ****
  234. --- 512,519 ----
  235. X      if (level == PAGE_LEVEL) {
  236. X          if (ch != 'a') {
  237. X              note_page = art_open (arts[respnum].artnum, group_path);
  238. +         } else if (force_screen_redraw) {
  239. +             redraw_screen = TRUE;
  240. X          }
  241. X          note_end = orig_note_end;
  242. X          note_page = orig_note_page;
  243. diff -rcs ../1.14/getline.c ./getline.c
  244. *** ../1.14/getline.c    Tue Aug 11 21:23:04 1992
  245. --- ./getline.c    Mon Jul 20 12:51:09 1992
  246. ***************
  247. *** 3,9 ****
  248. X   *  Module    : getline.c
  249. X   *  Author    : Chris Thewalt & Iain Lea 
  250. X   *  Created   : 09-11-91
  251. !  *  Updated   : 29-03-92
  252. X   *  Notes     : emacs style line editing input package.  
  253. X   *  Copyright : (c) Copyright 1991-92 by Chris Thewalt & Iain Lea
  254. X   *              Permission to use, copy, modify, and distribute this
  255. --- 3,9 ----
  256. X   *  Module    : getline.c
  257. X   *  Author    : Chris Thewalt & Iain Lea 
  258. X   *  Created   : 09-11-91
  259. !  *  Updated   : 25-06-92
  260. X   *  Notes     : emacs style line editing input package.  
  261. X   *  Copyright : (c) Copyright 1991-92 by Chris Thewalt & Iain Lea
  262. X   *              Permission to use, copy, modify, and distribute this
  263. ***************
  264. *** 140,151 ****
  265. X              switch (c) {
  266. X                  case ESC:             /* abort */
  267. X                      return (char *) 0;
  268. -                     break;
  269. X                  case '\n':             /* newline */
  270. X                  case '\r':
  271. X                      gl_newline ();
  272. X                      return gl_buf;
  273. -                     break;
  274. X                  case CTRL_A:
  275. X                      gl_fixup (-1, 0);
  276. X                      break;
  277. --- 140,149 ----
  278. diff -rcs ../1.14/group.c ./group.c
  279. *** ../1.14/group.c    Tue Aug 11 21:23:06 1992
  280. --- ./group.c    Fri Aug  7 13:28:43 1992
  281. ***************
  282. *** 3,9 ****
  283. X   *  Module    : group.c
  284. X   *  Author    : I.Lea & R.Skrenta
  285. X   *  Created   : 01-04-91
  286. !  *  Updated   : 20-06-92
  287. X   *  Notes     :
  288. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea & Rich Skrenta
  289. X   *              You may  freely  copy or  redistribute  this software,
  290. --- 3,9 ----
  291. X   *  Module    : group.c
  292. X   *  Author    : I.Lea & R.Skrenta
  293. X   *  Created   : 01-04-91
  294. !  *  Updated   : 07-08-92
  295. X   *  Notes     :
  296. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea & Rich Skrenta
  297. X   *              You may  freely  copy or  redistribute  this software,
  298. ***************
  299. *** 30,40 ****
  300. X  static int len_subj;
  301. X  static char *spaces = "XXXX";
  302. X  
  303. ! static int bld_sline();
  304. ! static int draw_sline();
  305. X  
  306. X  #ifndef ART_ADJUST    /* what we do here is bizarre */
  307. ! #define ART_ADJUST(n)    (show_only_unread \
  308. X                  ? ((n) > 1 ? (n) : 0) \
  309. X                  : ((n) > 0 ? (n) - 1 : 0))
  310. X  #endif
  311. --- 30,40 ----
  312. X  static int len_subj;
  313. X  static char *spaces = "XXXX";
  314. X  
  315. ! static int bld_sline ();
  316. ! static int draw_sline ();
  317. X  
  318. X  #ifndef ART_ADJUST    /* what we do here is bizarre */
  319. ! #define ART_ADJUST(n)    (active[my_group[cur_groupnum]].attribute.show_only_unread \
  320. X                  ? ((n) > 1 ? (n) : 0) \
  321. X                  : ((n) > 0 ? (n) - 1 : 0))
  322. X  #endif
  323. ***************
  324. *** 54,60 ****
  325. X      char *p;
  326. X      int ch;
  327. X      int dummy = 0;
  328. !     int flag, i, n;
  329. X      int kill_state;
  330. X      int old_top = 0;
  331. X      int posted;
  332. --- 54,61 ----
  333. X      char *p;
  334. X      int ch;
  335. X      int dummy = 0;
  336. !     int flag, i;
  337. !     int n = -1;
  338. X      int kill_state;
  339. X      int old_top = 0;
  340. X      int posted;
  341. ***************
  342. *** 64,73 ****
  343. X      int xflag = 0;
  344. X       struct art_stat_t sbuf;
  345. X  
  346. !     active[my_group[cur_groupnum]].attribute.read = TRUE;
  347. X  
  348. X      glob_group = group;
  349. X      sav_groupnum = cur_groupnum;
  350. X      
  351. X      strcpy (group_path, group);            /* turn comp.unix.amiga into */
  352. X      for (p = group_path; *p; p++)        /* comp/unix/amiga */
  353. --- 65,76 ----
  354. X      int xflag = 0;
  355. X       struct art_stat_t sbuf;
  356. X  
  357. !     show_author = active[my_group[cur_groupnum]].attribute.show_author;
  358. !     active[my_group[cur_groupnum]].attribute.read_during_session = TRUE;
  359. X  
  360. X      glob_group = group;
  361. X      sav_groupnum = cur_groupnum;
  362. +     num_of_tagged_arts = 0;
  363. X      
  364. X      strcpy (group_path, group);            /* turn comp.unix.amiga into */
  365. X      for (p = group_path; *p; p++)        /* comp/unix/amiga */
  366. ***************
  367. *** 96,103 ****
  368. X          index_point = 0;
  369. X      }
  370. X      
  371. X      clear_note_area ();
  372. X      show_group_page (group);
  373. X  
  374. X      while (TRUE) {
  375. --- 99,106 ----
  376. X          index_point = 0;
  377. X      }
  378. X      
  379. +     set_subj_from_size (COLS);
  380. X      clear_note_area ();
  381. X      show_group_page (group);
  382. X  
  383. X      while (TRUE) {
  384. ***************
  385. *** 216,241 ****
  386. X                  show_group_page (group);
  387. X                  break;
  388. X  
  389. !             case '\t':
  390. X                   space_mode = TRUE;
  391. !                 if (index_point < 0
  392. !                 || (n=next_unread((int) base[index_point]))<0) {
  393. !                     for (i = cur_groupnum+1 ; i < group_top ; i++)
  394. !                         if (unread[i] > 0)
  395. X                              break;
  396. !                     if (i >= group_top)
  397. X                          goto group_done;
  398. X                      cur_groupnum = i;
  399. X                      index_point = -3;
  400. X                      goto group_done;
  401. X                  }
  402. !                 index_point = show_page(n, &dummy, group, group_path);
  403. !                 if (index_point < 0)
  404. X                      goto group_done;
  405. X                  clear_note_area ();
  406. !                 show_group_page(group);
  407. X                  break;
  408. X      
  409. X              case ' ':        /* page down */
  410. --- 219,251 ----
  411. X                  show_group_page (group);
  412. X                  break;
  413. X  
  414. !             case '\t':    /* goto next unread article/group */
  415. ! tab_pressed:            
  416. X                   space_mode = TRUE;
  417. !                 if (index_point < 0) {
  418. !                     n == -1;
  419. !                 } else {
  420. !                     n = next_unread ((int) base[index_point]);
  421. !                 }    
  422. !                 if (index_point < 0 || n < 0) {
  423. !                     for (i = cur_groupnum+1 ; i < group_top ; i++) {
  424. !                         if (active[my_group[i]].unread > 0) {
  425. X                              break;
  426. !                         }
  427. !                     }        
  428. !                     if (i >= group_top) {
  429. X                          goto group_done;
  430. !                     }
  431. X                      cur_groupnum = i;
  432. X                      index_point = -3;
  433. X                      goto group_done;
  434. X                  }
  435. !                 index_point = show_page (n, &dummy, group, group_path);
  436. !                 if (index_point < 0) {
  437. X                      goto group_done;
  438. +                 }    
  439. X                  clear_note_area ();
  440. !                 show_group_page (group);
  441. X                  break;
  442. X      
  443. X              case ' ':        /* page down */
  444. ***************
  445. *** 288,296 ****
  446. X                  n = (int) base[index_point];
  447. X                  old_artnum = arts[n].artnum;
  448. X                  if (kill_art_menu (group, (int) base[index_point])) {
  449. !                     kill_any_articles (group);
  450. X                      make_threads (FALSE);
  451. !                     find_base (show_only_unread);
  452. X                      index_point = find_new_pos (old_top, old_artnum, index_point);
  453. X                  }
  454. X                  show_group_page (group);
  455. --- 298,306 ----
  456. X                  n = (int) base[index_point];
  457. X                  old_artnum = arts[n].artnum;
  458. X                  if (kill_art_menu (group, (int) base[index_point])) {
  459. !                     kill_any_articles (my_group[cur_groupnum]);
  460. X                      make_threads (FALSE);
  461. !                     find_base (my_group[cur_groupnum]);
  462. X                      index_point = find_new_pos (old_top, old_artnum, index_point);
  463. X                  }
  464. X                  show_group_page (group);
  465. ***************
  466. *** 331,341 ****
  467. X                      erase_subject_arrow();
  468. X  #endif                    
  469. X                      index_point++;
  470. !                     show_group_page(group);
  471. X                  } else {
  472. !                     erase_subject_arrow();
  473. X                      index_point++;
  474. !                     draw_subject_arrow();
  475. X                  }
  476. X                  break;
  477. X  
  478. --- 341,351 ----
  479. X                      erase_subject_arrow();
  480. X  #endif                    
  481. X                      index_point++;
  482. !                     show_group_page (group);
  483. X                  } else {
  484. !                     erase_subject_arrow ();
  485. X                      index_point++;
  486. !                     draw_subject_arrow ();
  487. X                  }
  488. X                  break;
  489. X  
  490. ***************
  491. *** 421,427 ****
  492. X  
  493. X                  i = (ch == 'a');
  494. X  
  495. !                 n = search_author(show_only_unread, (int) base[index_point], i);
  496. X                  if (n < 0)
  497. X                      break;
  498. X  
  499. --- 431,437 ----
  500. X  
  501. X                  i = (ch == 'a');
  502. X  
  503. !                 n = search_author (my_group[cur_groupnum], (int) base[index_point], i);
  504. X                  if (n < 0)
  505. X                      break;
  506. X  
  507. ***************
  508. *** 443,456 ****
  509. X                  break;
  510. X                  
  511. X              case 'c':    /* catchup - mark all articles as read */
  512. !                 if (!confirm_action || prompt_yn (LINES, txt_mark_all_read, 'y')) {
  513. X                      for (n = 0; n < top; n++) {
  514. X                          arts[n].unread = ART_READ;
  515. X                      }
  516. !                     if (cur_groupnum + 1 < group_top) {
  517. !                         cur_groupnum++;
  518. !                     }
  519. !                     goto group_done;
  520. X                  }
  521. X                  break;
  522. X  
  523. --- 453,471 ----
  524. X                  break;
  525. X                  
  526. X              case 'c':    /* catchup - mark all articles as read */
  527. !             case 'C':    /* catchup - and goto next unread group */
  528. !                 if (! confirm_action || prompt_yn (LINES, txt_mark_all_read, 'y')) {
  529. X                      for (n = 0; n < top; n++) {
  530. X                          arts[n].unread = ART_READ;
  531. X                      }
  532. !                     if (ch == 'c') {
  533. !                         if (cur_groupnum + 1 < group_top) {
  534. !                             cur_groupnum++;
  535. !                         }
  536. !                         goto group_done;
  537. !                     } else {
  538. !                         goto tab_pressed;
  539. !                     }    
  540. X                  }
  541. X                  break;
  542. X  
  543. ***************
  544. *** 484,497 ****
  545. X                      break;
  546. X                  }
  547. X                  for (i = (int) base[index_point]; i >= 0; i = arts[i].thread) {
  548. !                     arts[i].unread = ART_READ;
  549. !                 }    
  550. !                 bld_sline(index_point);
  551. !                 draw_sline(index_point, FALSE);
  552. !                 if (index_point + 1 < top_base)
  553. !                     goto group_down;
  554. !                 draw_subject_arrow();
  555. !                 info_message(txt_end_of_arts);
  556. X                  break;
  557. X  
  558. X              case 'l':    /* list articles within current thread */
  559. --- 499,537 ----
  560. X                      break;
  561. X                  }
  562. X                  for (i = (int) base[index_point]; i >= 0; i = arts[i].thread) {
  563. !                     if (arts[i].unread != ART_READ) {
  564. !                         arts[i].unread = ART_READ;
  565. !                         if (arts[i].hot) {
  566. !                             if (num_of_hot_arts) {
  567. !                                 num_of_hot_arts--;
  568. !                             }
  569. !                         }
  570. !                     }
  571. !                 }
  572. !                 show_group_title (TRUE);    
  573. !                 bld_sline (index_point);
  574. !                 draw_sline (index_point, FALSE);
  575. !                 n = next_unread (next_response ((int) base[index_point]));
  576. !                 if (n < 0) {
  577. !                     draw_subject_arrow ();
  578. !                     info_message (txt_no_next_unread_art);
  579. !                     break;
  580. !                 }
  581. !                 if ((n = which_thread (n)) < 0) {
  582. !                     error_message ("Internal error: K which_thread < 0", "");
  583. !                     break;
  584. !                 }
  585. !                 if (n < first_subj_on_screen || n >= last_subj_on_screen) {
  586. !                     index_point = n;
  587. !                     show_group_page (group);
  588. !                 } else {
  589. !                     erase_subject_arrow ();
  590. !                     index_point = n;
  591. !                     draw_subject_arrow ();
  592. !                 }
  593. X                  break;
  594. X  
  595. X              case 'l':    /* list articles within current thread */
  596. ***************
  597. *** 528,547 ****
  598. X                      n = (int) base[index_point];
  599. X                      old_artnum = arts[n].artnum;
  600. X                  }
  601. !                 n = sort_art_type;
  602. X                  kill_state = change_rcfile (group, TRUE);
  603. !                 if (kill_state == NO_KILLING && n != sort_art_type) {
  604. X                      make_threads (TRUE);
  605. !                     find_base (show_only_unread);
  606. X                  }
  607. X                  index_point = find_new_pos (old_top, old_artnum, index_point);
  608. X                  show_group_page (group);
  609. X                  break;
  610. X  
  611. !             case 'n':    /* next group */
  612. !                 clear_message();
  613. X                  if (cur_groupnum + 1 >= group_top)
  614. !                     info_message(txt_no_more_groups);
  615. X                  else {
  616. X                      cur_groupnum++;
  617. X                      index_point = -3;
  618. --- 568,588 ----
  619. X                      n = (int) base[index_point];
  620. X                      old_artnum = arts[n].artnum;
  621. X                  }
  622. !                 n = default_sort_art_type;
  623. X                  kill_state = change_rcfile (group, TRUE);
  624. !                 if (kill_state == NO_KILLING && n != default_sort_art_type) {
  625. X                      make_threads (TRUE);
  626. !                     find_base (my_group[cur_groupnum]);
  627. X                  }
  628. +                 set_subj_from_size (COLS);
  629. X                  index_point = find_new_pos (old_top, old_artnum, index_point);
  630. X                  show_group_page (group);
  631. X                  break;
  632. X  
  633. !             case 'n':    /* goto next group */
  634. !                 clear_message ();
  635. X                  if (cur_groupnum + 1 >= group_top)
  636. !                     info_message (txt_no_more_groups);
  637. X                  else {
  638. X                      cur_groupnum++;
  639. X                      index_point = -3;
  640. ***************
  641. *** 550,556 ****
  642. X                  }
  643. X                  break;
  644. X  
  645. !             case 'N':    /* go to next unread article */
  646. X                  if (index_point < 0) {
  647. X                      info_message(txt_no_next_unread_art);
  648. X                      break;
  649. --- 591,597 ----
  650. X                  }
  651. X                  break;
  652. X  
  653. !             case 'N':    /* goto next unread article */
  654. X                  if (index_point < 0) {
  655. X                      info_message(txt_no_next_unread_art);
  656. X                      break;
  657. ***************
  658. *** 627,643 ****
  659. X                    */
  660. X                   i = -1;
  661. X                   if (index_point >= 0) {
  662. !                      if (show_only_unread || new_responses(index_point))
  663. X                           i = base[index_point];
  664. !                      else if ((n = prev_unread(base[index_point])) >= 0)
  665. X                           i = n;
  666. !                      else if ((n = next_unread(base[index_point])) >= 0)
  667. X                           i = n;
  668. X                   }
  669. !                  show_only_unread = (show_only_unread ? FALSE : TRUE);
  670. !                  auto_select_articles (group);
  671. !                  find_base (show_only_unread);
  672. !                  if (i >= 0 && (n = which_thread(i)) >= 0)
  673. X                       index_point = n;
  674. X                   else if (top_base > 0)
  675. X                       index_point = top_base - 1;
  676. --- 668,687 ----
  677. X                    */
  678. X                   i = -1;
  679. X                   if (index_point >= 0) {
  680. !                      if (active[my_group[cur_groupnum]].attribute.show_only_unread || 
  681. !                          new_responses (index_point)) {
  682. X                           i = base[index_point];
  683. !                      } else if ((n = prev_unread (base[index_point])) >= 0) {
  684. X                           i = n;
  685. !                      } else if ((n = next_unread (base[index_point])) >= 0) {
  686. X                           i = n;
  687. +                      }    
  688. X                   }
  689. !                  active[my_group[cur_groupnum]].attribute.show_only_unread = 
  690. !                      !active[my_group[cur_groupnum]].attribute.show_only_unread;
  691. !                  auto_select_articles (my_group[cur_groupnum]);
  692. !                  find_base (my_group[cur_groupnum]);
  693. !                  if (i >= 0 && (n = which_thread (i)) >= 0)
  694. X                       index_point = n;
  695. X                   else if (top_base > 0)
  696. X                       index_point = top_base - 1;
  697. ***************
  698. *** 671,679 ****
  699. X  
  700. X              case 'u':    /* unthread/thread articles */
  701. X                   if (index_point >= 0) {
  702. !                     thread_arts = !thread_arts;
  703. X                      make_threads (TRUE);
  704. !                     find_base (show_only_unread);
  705. X                      show_group_page (group);
  706. X                  }
  707. X                  break;
  708. --- 715,724 ----
  709. X  
  710. X              case 'u':    /* unthread/thread articles */
  711. X                   if (index_point >= 0) {
  712. !                     active[my_group[cur_groupnum]].attribute.thread_arts = 
  713. !                         !active[my_group[cur_groupnum]].attribute.thread_arts;
  714. X                      make_threads (TRUE);
  715. !                     find_base (my_group[cur_groupnum]);
  716. X                      show_group_page (group);
  717. X                  }
  718. X                  break;
  719. ***************
  720. *** 681,687 ****
  721. X              case 'U':    /* untag all articles */
  722. X                   if (index_point >= 0) {
  723. X                      untag_all_articles ();
  724. !                     update_group_page (group);
  725. X                  }
  726. X                  break;
  727. X  
  728. --- 726,732 ----
  729. X              case 'U':    /* untag all articles */
  730. X                   if (index_point >= 0) {
  731. X                      untag_all_articles ();
  732. !                     update_group_page ();
  733. X                  }
  734. X                  break;
  735. X  
  736. ***************
  737. *** 720,725 ****
  738. --- 765,775 ----
  739. X                  }
  740. X                  n = 0;
  741. X                  for (i = (int) base[index_point] ; i != -1 ; i = arts[i].thread) {
  742. +                     if (arts[i].unread == ART_READ) {
  743. +                         if (arts[i].hot && num_of_hot_arts) {
  744. +                             num_of_hot_arts++;
  745. +                         }
  746. +                     }
  747. X                      arts[i].unread = ART_UNREAD;
  748. X                      ++n;
  749. X                      if (ch == 'z')
  750. ***************
  751. *** 726,731 ****
  752. --- 776,782 ----
  753. X                          break;
  754. X                  }
  755. X                  assert (n > 0);
  756. +                 show_group_title (TRUE);
  757. X                  bld_sline(index_point);
  758. X                  draw_sline(index_point, FALSE);
  759. X                  draw_subject_arrow();
  760. ***************
  761. *** 769,775 ****
  762. X              case '@':    /* reverse selections */
  763. X                  for (i=0; i<top; ++i)
  764. X                      arts[i].hot = (arts[i].hot ? 0 : 1);
  765. !                 update_group_page (group);
  766. X                  break;
  767. X  
  768. X                case '~':    /* undo selections */
  769. --- 820,826 ----
  770. X              case '@':    /* reverse selections */
  771. X                  for (i=0; i<top; ++i)
  772. X                      arts[i].hot = (arts[i].hot ? 0 : 1);
  773. !                 update_group_page ();
  774. X                  break;
  775. X  
  776. X                case '~':    /* undo selections */
  777. ***************
  778. *** 778,784 ****
  779. X                       arts[i].zombie = 0;
  780. X                   }
  781. X                   xflag = 0;
  782. !                   update_group_page(group);
  783. X                    break;
  784. X    
  785. X               case '=':    /* select matching patterns */
  786. --- 829,835 ----
  787. X                       arts[i].zombie = 0;
  788. X                   }
  789. X                   xflag = 0;
  790. !                   update_group_page ();
  791. X                    break;
  792. X    
  793. X               case '=':    /* select matching patterns */
  794. ***************
  795. *** 814,820 ****
  796. X                       ++flag;
  797. X                   }
  798. X                   if (flag)
  799. !                      update_group_page (group);
  800. X                   break;
  801. X  
  802. X              case ';':    /* make all unread hot if 1 is hot */
  803. --- 865,871 ----
  804. X                       ++flag;
  805. X                   }
  806. X                   if (flag)
  807. !                      update_group_page ();
  808. X                   break;
  809. X  
  810. X              case ';':    /* make all unread hot if 1 is hot */
  811. ***************
  812. *** 843,850 ****
  813. X                      }
  814. X                  }
  815. X  
  816. !                 if (show_only_unread) {
  817. !                     find_base (show_only_unread);
  818. X                  }
  819. X  
  820. X                  xflag = 1;
  821. --- 894,901 ----
  822. X                      }
  823. X                  }
  824. X  
  825. !                 if (active[my_group[cur_groupnum]].attribute.show_only_unread) {
  826. !                     find_base (my_group[cur_groupnum]);
  827. X                  }
  828. X  
  829. X                  xflag = 1;
  830. ***************
  831. *** 854,865 ****
  832. X                  break;
  833. X  
  834. X              case '+':    /* perform auto-selection on group */
  835. !                 if (auto_select_articles (group) == 0)
  836. !                     break;
  837. !                 update_group_page (group);
  838. X                  break;
  839. X  
  840. !             X_undo:
  841. X                  for (i=0; i<top; ++i) {
  842. X                      if (arts[i].unread == ART_READ
  843. X                          && arts[i].zombie == 1) {
  844. --- 905,916 ----
  845. X                  break;
  846. X  
  847. X              case '+':    /* perform auto-selection on group */
  848. !                 if (auto_select_articles (my_group[cur_groupnum])) {
  849. !                     update_group_page ();
  850. !                 }
  851. X                  break;
  852. X  
  853. ! X_undo:
  854. X                  for (i=0; i<top; ++i) {
  855. X                      if (arts[i].unread == ART_READ
  856. X                          && arts[i].zombie == 1) {
  857. ***************
  858. *** 868,875 ****
  859. X                      }
  860. X                  }
  861. X  
  862. !                 if (show_only_unread) {
  863. !                     find_base (show_only_unread);
  864. X                  }
  865. X  
  866. X                  xflag = 0;
  867. --- 919,926 ----
  868. X                      }
  869. X                  }
  870. X  
  871. !                 if (active[my_group[cur_groupnum]].attribute.show_only_unread) {
  872. !                     find_base (my_group[cur_groupnum]);
  873. X                  }
  874. X  
  875. X                  xflag = 0;
  876. ***************
  877. *** 916,922 ****
  878. X          }
  879. X      }
  880. X      
  881. !     unread[groupnum] = sum;
  882. X  }
  883. X  
  884. X  
  885. --- 967,973 ----
  886. X          }
  887. X      }
  888. X      
  889. !     active[my_group[groupnum]].unread = sum;
  890. X  }
  891. X  
  892. X  
  893. ***************
  894. *** 925,932 ****
  895. X  {
  896. X  #ifndef INDEX_DAEMON
  897. X  
  898. !     char buf[LEN];
  899. !     int i, art_cnt = 0;
  900. X  
  901. X      set_signals_group ();
  902. X      
  903. --- 976,982 ----
  904. X  {
  905. X  #ifndef INDEX_DAEMON
  906. X  
  907. !     int i;
  908. X  
  909. X      set_signals_group ();
  910. X      
  911. ***************
  912. *** 937,962 ****
  913. X      CleartoEOLN ();
  914. X  #endif
  915. X  
  916. !     if (show_only_unread) {
  917. !         for (i = 0 ; i < top_base ; i++) {
  918. !             art_cnt += new_responses (i);
  919. !         }    
  920. !     } else {
  921. !         for (i = 0 ; i < top ; i++) {
  922. !             if (! IGNORE_ART(i)) {
  923. !                 ++art_cnt;
  924. !             }
  925. !         }        
  926. !     }
  927. !     if (active[my_group[cur_groupnum]].attribute.thread && thread_arts) {
  928. !         sprintf (buf, "%s (%dT %dA %dK %dH)", group, top_base, art_cnt,
  929. !             num_of_killed_arts, num_of_hot_arts);
  930. !     } else {
  931. !         sprintf (buf, "%s (%dU %dK %dH)", group, art_cnt, 
  932. !             num_of_killed_arts, num_of_hot_arts);
  933. !     }
  934. !     show_title (buf);
  935. X  
  936. X  #ifndef USE_CLEARSCREEN
  937. X      MoveCursor (1, 0);
  938. --- 987,993 ----
  939. X      CleartoEOLN ();
  940. X  #endif
  941. X  
  942. !     show_group_title (FALSE);
  943. X  
  944. X  #ifndef USE_CLEARSCREEN
  945. X      MoveCursor (1, 0);
  946. ***************
  947. *** 1025,1050 ****
  948. X  }
  949. X  
  950. X  
  951. ! void update_group_page(group)
  952. ! char *group;
  953. X  {
  954. X  #ifndef INDEX_DAEMON
  955. X      register int i;
  956. X  
  957. X      for (i = first_subj_on_screen; i < last_subj_on_screen; ++i) {
  958. !         bld_sline(i);
  959. !         draw_sline(i, FALSE);
  960. X      }
  961. X  
  962. X      if (top_base <= 0)
  963. X          return;
  964. X  
  965. !     draw_subject_arrow();
  966. X  #endif /* INDEX_DAEMON */
  967. X  }
  968. X  
  969. X  
  970. ! void draw_subject_arrow()
  971. X  {
  972. X      MoveCursor (INDEX2LNUM(index_point), 0);
  973. X  
  974. --- 1056,1080 ----
  975. X  }
  976. X  
  977. X  
  978. ! void update_group_page ()
  979. X  {
  980. X  #ifndef INDEX_DAEMON
  981. X      register int i;
  982. X  
  983. X      for (i = first_subj_on_screen; i < last_subj_on_screen; ++i) {
  984. !         bld_sline (i);
  985. !         draw_sline (i, FALSE);
  986. X      }
  987. X  
  988. X      if (top_base <= 0)
  989. X          return;
  990. X  
  991. !     draw_subject_arrow ();
  992. X  #endif /* INDEX_DAEMON */
  993. X  }
  994. X  
  995. X  
  996. ! void draw_subject_arrow ()
  997. X  {
  998. X      MoveCursor (INDEX2LNUM(index_point), 0);
  999. X  
  1000. ***************
  1001. *** 1059,1065 ****
  1002. X      MoveCursor (LINES, 0);
  1003. X  }
  1004. X  
  1005. ! void erase_subject_arrow()
  1006. X  {
  1007. X      MoveCursor (INDEX2LNUM(index_point), 0);
  1008. X  
  1009. --- 1089,1095 ----
  1010. X      MoveCursor (LINES, 0);
  1011. X  }
  1012. X  
  1013. ! void erase_subject_arrow ()
  1014. X  {
  1015. X      MoveCursor (INDEX2LNUM(index_point), 0);
  1016. X  
  1017. ***************
  1018. *** 1183,1189 ****
  1019. X  void set_subj_from_size (num_cols)
  1020. X      int num_cols;
  1021. X  {
  1022. !     int size = 0;
  1023. X      
  1024. X      if (show_author == SHOW_FROM_BOTH) {
  1025. X          max_subj = (num_cols / 2) - 2;
  1026. --- 1213,1221 ----
  1027. X  void set_subj_from_size (num_cols)
  1028. X      int num_cols;
  1029. X  {
  1030. !     int i, size = 0;
  1031. !     
  1032. !     i = my_group[cur_groupnum];
  1033. X      
  1034. X      if (show_author == SHOW_FROM_BOTH) {
  1035. X          max_subj = (num_cols / 2) - 2;
  1036. ***************
  1037. *** 1214,1219 ****
  1038. --- 1246,1278 ----
  1039. X  
  1040. X  void toggle_subject_from ()
  1041. X  {
  1042. +     int i;
  1043. + int tmp;
  1044. +     
  1045. +     i = my_group[cur_groupnum];
  1046. + tmp = show_author;
  1047. +     
  1048. +     if (active[i].attribute.show_author != SHOW_FROM_NONE) {
  1049. +         if (show_author != SHOW_FROM_NONE) {
  1050. +             show_author = SHOW_FROM_NONE;
  1051. +         } else {
  1052. +             show_author = active[i].attribute.show_author;
  1053. +         }
  1054. +     } else {
  1055. +         if (show_author + 1 > SHOW_FROM_BOTH) {
  1056. +             show_author = SHOW_FROM_NONE;
  1057. +         } else {
  1058. +             show_author++;
  1059. +         }
  1060. +     }
  1061. + if (debug == 2) {
  1062. + sprintf (msg, "Show before=[%d]  after=[%d]", tmp, show_author);
  1063. + error_message (msg, "");
  1064. + }
  1065. + #if 0
  1066. X      if (default_show_author != SHOW_FROM_NONE) {
  1067. X          if (show_author != SHOW_FROM_NONE) {
  1068. X              show_author = SHOW_FROM_NONE;
  1069. ***************
  1070. *** 1227,1232 ****
  1071. --- 1286,1293 ----
  1072. X              show_author++;
  1073. X          }
  1074. X      }
  1075. + #endif
  1076. X      set_subj_from_size (COLS);
  1077. X  }
  1078. X  
  1079. ***************
  1080. *** 1235,1241 ****
  1081. X   *
  1082. X   * WARNING: the routine is tightly coupled with draw_sline() in the sense
  1083. X   * that draw_sline() expects bld_sline() to place the article mark
  1084. !  * (READ_ART_MARK, HOT_ART_MARK, etc) at MARK_OFFSET in the screen[].col.
  1085. X   * So, if you change the format used in this routine, be sure to check
  1086. X   * that the value of MARK_OFFSET is still correct. 
  1087. X   * Yes, this is somewhat kludgy.
  1088. --- 1296,1302 ----
  1089. X   *
  1090. X   * WARNING: the routine is tightly coupled with draw_sline() in the sense
  1091. X   * that draw_sline() expects bld_sline() to place the article mark
  1092. !  * (read_art_makr, hot_art_mark, etc) at MARK_OFFSET in the screen[].col.
  1093. X   * So, if you change the format used in this routine, be sure to check
  1094. X   * that the value of MARK_OFFSET is still correct. 
  1095. X   * Yes, this is somewhat kludgy.
  1096. ***************
  1097. *** 1256,1262 ****
  1098. X      respnum = (int) base[i];
  1099. X      
  1100. X      stat_thread(i, &sbuf);
  1101. !     if (show_only_unread)
  1102. X          n = sbuf.unread + sbuf.seen;
  1103. X      else
  1104. X          n = sbuf.total;
  1105. --- 1317,1323 ----
  1106. X      respnum = (int) base[i];
  1107. X      
  1108. X      stat_thread(i, &sbuf);
  1109. !     if (active[my_group[cur_groupnum]].attribute.show_only_unread)
  1110. X          n = sbuf.unread + sbuf.seen;
  1111. X      else
  1112. X          n = sbuf.total;
  1113. ***************
  1114. *** 1328,1334 ****
  1115. X      /* it is somewhat less efficient to go back and redo that art mark
  1116. X       * if hot, but it is quite readable as to what is happening 
  1117. X       */
  1118. !     if (screen[j].col[k] == HOT_ART_MARK) {
  1119. X          MoveCursor (INDEX2LNUM(i), k);
  1120. X          ToggleInverse ();
  1121. X          fputc (screen[j].col[k], stdout);
  1122. --- 1389,1395 ----
  1123. X      /* it is somewhat less efficient to go back and redo that art mark
  1124. X       * if hot, but it is quite readable as to what is happening 
  1125. X       */
  1126. !     if (screen[j].col[k] == hot_art_mark) {
  1127. X          MoveCursor (INDEX2LNUM(i), k);
  1128. X          ToggleInverse ();
  1129. X          fputc (screen[j].col[k], stdout);
  1130. ***************
  1131. *** 1339,1342 ****
  1132. --- 1400,1444 ----
  1133. X      
  1134. X  #endif /* INDEX_DAEMON */
  1135. X      return(0);
  1136. + }
  1137. + void show_group_title (clear_title)
  1138. +     int clear_title;
  1139. + {
  1140. + #ifndef INDEX_DAEMON
  1141. +     char buf[PATH_LEN];
  1142. +     register int i, art_cnt = 0;
  1143. +     
  1144. +     if (active[my_group[cur_groupnum]].attribute.show_only_unread) {
  1145. +         for (i = 0 ; i < top_base ; i++) {
  1146. +             art_cnt += new_responses (i);
  1147. +         }    
  1148. +     } else {
  1149. +         for (i = 0 ; i < top ; i++) {
  1150. +             if (! IGNORE_ART(i)) {
  1151. +                 ++art_cnt;
  1152. +             }
  1153. +         }        
  1154. +     }
  1155. +     if (active[my_group[cur_groupnum]].attribute.thread_arts && default_thread_arts) {
  1156. +         sprintf (buf, "%s (%dT %dA %dK %dH)", 
  1157. +             active[my_group[cur_groupnum]].name, top_base, 
  1158. +             art_cnt, num_of_killed_arts, num_of_hot_arts);
  1159. +     } else {
  1160. +         sprintf (buf, "%s (%dU %dK %dH)", 
  1161. +             active[my_group[cur_groupnum]].name,
  1162. +             art_cnt, num_of_killed_arts, num_of_hot_arts);
  1163. +     }
  1164. +     if (clear_title) {
  1165. +         MoveCursor (0, 0);
  1166. +         CleartoEOLN ();
  1167. +     }
  1168. +     
  1169. +     show_title (buf);
  1170. + #endif /* INDEX_DAEMON */
  1171. X  }
  1172. Files ../1.14/hashstr.c and ./hashstr.c are identical
  1173. diff -rcs ../1.14/help.c ./help.c
  1174. *** ../1.14/help.c    Tue Aug 11 21:23:07 1992
  1175. --- ./help.c    Sun Jul 26 15:12:00 1992
  1176. ***************
  1177. *** 3,9 ****
  1178. X   *  Module    : help.c
  1179. X   *  Author    : I.Lea
  1180. X   *  Created   : 01-04-91
  1181. !  *  Updated   : 20-06-92
  1182. X   *  Notes     :
  1183. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea
  1184. X   *              You may  freely  copy or  redistribute  this software,
  1185. --- 3,9 ----
  1186. X   *  Module    : help.c
  1187. X   *  Author    : I.Lea
  1188. X   *  Created   : 01-04-91
  1189. !  *  Updated   : 26-07-92
  1190. X   *  Notes     :
  1191. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea
  1192. X   *              You may  freely  copy or  redistribute  this software,
  1193. ***************
  1194. *** 35,40 ****
  1195. --- 35,41 ----
  1196. X      txt_help_M,
  1197. X      txt_help_n,
  1198. X      txt_help_g_q,
  1199. +     txt_help_g_r,
  1200. X      txt_help_s,
  1201. X      txt_help_S,
  1202. X      txt_help_v,
  1203. ***************
  1204. *** 79,84 ****
  1205. --- 80,86 ----
  1206. X      txt_help_b,
  1207. X      txt_help_bug_report,
  1208. X      txt_help_c,
  1209. +     txt_help_cC,
  1210. X      txt_help_d,
  1211. X      txt_help_g,
  1212. X      txt_help_h,
  1213. ***************
  1214. *** 195,200 ****
  1215. --- 197,209 ----
  1216. X      (char *) 0
  1217. X  };
  1218. X  
  1219. + static char *info_title;
  1220. + static char **info_help;
  1221. + static int cur_page;
  1222. + static int group_len = 0;
  1223. + static int info_type;
  1224. + static int max_page;
  1225. + static int pos_help;
  1226. X  
  1227. X  void show_info_page (type, help, title)
  1228. X      int type; 
  1229. ***************
  1230. *** 201,219 ****
  1231. X      char *help[];
  1232. X      char *title;
  1233. X  {
  1234. -     char buf[LEN];
  1235. X      char ch;
  1236. X      int i, len;
  1237. -     int group_len = 0;
  1238. X      int old_page = 0;
  1239. -     int cur_page = 1;
  1240. -     int max_page = 1;
  1241. -     int pos_help = 0;
  1242. X  
  1243. X      if (NOTESLINES <= 0) {
  1244. X          return;
  1245. X      }
  1246. X  
  1247. X      /*
  1248. X       *  find how many elements in array
  1249. X       */
  1250. --- 210,233 ----
  1251. X      char *help[];
  1252. X      char *title;
  1253. X  {
  1254. X      char ch;
  1255. X      int i, len;
  1256. X      int old_page = 0;
  1257. X  
  1258. X      if (NOTESLINES <= 0) {
  1259. X          return;
  1260. X      }
  1261. X  
  1262. +     set_signals_help ();
  1263. +     cur_page = 1;
  1264. +     max_page = 1;
  1265. +     pos_help = 0;
  1266. +     
  1267. +     info_help = help;
  1268. +     info_type = type;
  1269. +     info_title = title;
  1270. +     
  1271. X      /*
  1272. X       *  find how many elements in array
  1273. X       */
  1274. ***************
  1275. *** 237,264 ****
  1276. X  
  1277. X      while (1) {
  1278. X          if (cur_page != old_page) {
  1279. !             ClearScreen ();
  1280. !             sprintf (buf, title, cur_page, max_page);
  1281. !             center_line (0, TRUE, buf);
  1282. !             MoveCursor (INDEX_TOP, 0);
  1283. !             if (type == HELP_INFO) { 
  1284. !                 for (i=pos_help ; i < (pos_help + NOTESLINES) && help[i] ; i++) {
  1285. !                     fputs (help[i], stdout);
  1286. !                 }
  1287. !             } else {
  1288. !                 for (i=pos_help ; i < (pos_help + NOTESLINES) && posted[i].date[0] ; i++) {
  1289. !                     sprintf (msg, "%8s  %c  %-*s  %s",
  1290. !                         posted[i].date, posted[i].action,  
  1291. !                         group_len, posted[i].group, posted[i].subj);
  1292. !                         msg[COLS-2] = '\0';
  1293. !                     printf ("%s\r\n", msg);
  1294. !                 }
  1295. !             }
  1296. !         }
  1297. !         if (cur_page != old_page) {
  1298. !             center_line (LINES, FALSE, txt_hit_space_for_more);
  1299. X          }
  1300. X  
  1301. X          old_page = cur_page;
  1302. --- 251,257 ----
  1303. X  
  1304. X      while (1) {
  1305. X          if (cur_page != old_page) {
  1306. !             display_info_page ();
  1307. X          }
  1308. X  
  1309. X          old_page = cur_page;
  1310. ***************
  1311. *** 269,324 ****
  1312. X                  switch (get_arrow_key ()) {
  1313. X                      case KEYMAP_UP:
  1314. X                      case KEYMAP_PAGE_UP:
  1315. !                         if (cur_page > 1) {
  1316. !                             cur_page--;
  1317. !                             pos_help = (cur_page-1)*NOTESLINES;
  1318. !                         }
  1319. X                          break;
  1320. X  
  1321. X                      case KEYMAP_DOWN:
  1322. X                      case KEYMAP_PAGE_DOWN:
  1323. !                         if (cur_page < max_page) {
  1324. !                             pos_help = cur_page*NOTESLINES;
  1325. !                             cur_page++;
  1326. !                         }
  1327. X                          break;
  1328. X  
  1329. X                      case KEYMAP_HOME:
  1330. !                         if (cur_page != 1) {
  1331. !                             cur_page = 1;
  1332. !                             pos_help = 0;
  1333. !                         }
  1334. X                          break;
  1335. X                      
  1336. X                      case KEYMAP_END:
  1337. !                         if (cur_page != max_page) {
  1338. !                             cur_page = max_page;
  1339. !                             pos_help = (max_page-1) * NOTESLINES;
  1340. !                         }
  1341. X                          break;
  1342. X                  }
  1343. X                  break;
  1344. X  
  1345. X              case ctrl('D'):            /* page down */
  1346. X              case ' ':
  1347. X              case 'j':
  1348. X                  if (cur_page < max_page) {
  1349. X                      pos_help = cur_page*NOTESLINES;
  1350. X                      cur_page++;
  1351. !                 }
  1352. X                  break;
  1353. X              
  1354. X              case ctrl('U'):            /* page up */
  1355. X              case 'b':
  1356. X              case 'k':
  1357. X                  if (cur_page > 1) {
  1358. X                      cur_page--;
  1359. X                      pos_help = (cur_page-1)*NOTESLINES;
  1360. !                 }
  1361. X                  break;
  1362. X  
  1363. X              case ctrl('R'):            /* Home */
  1364. X              case 'g':
  1365. X                  if (cur_page != 1) {
  1366. X                      cur_page = 1;
  1367. X                      pos_help = 0;
  1368. --- 262,316 ----
  1369. X                  switch (get_arrow_key ()) {
  1370. X                      case KEYMAP_UP:
  1371. X                      case KEYMAP_PAGE_UP:
  1372. !                         goto help_page_up;
  1373. X                          break;
  1374. X  
  1375. X                      case KEYMAP_DOWN:
  1376. X                      case KEYMAP_PAGE_DOWN:
  1377. !                         goto help_page_down;
  1378. X                          break;
  1379. X  
  1380. X                      case KEYMAP_HOME:
  1381. !                         goto help_home;
  1382. X                          break;
  1383. X                      
  1384. X                      case KEYMAP_END:
  1385. !                         goto help_end;
  1386. X                          break;
  1387. X                  }
  1388. X                  break;
  1389. X  
  1390. X              case ctrl('D'):            /* page down */
  1391. +             case ctrl('F'):            /* vi style */
  1392. X              case ' ':
  1393. X              case 'j':
  1394. + help_page_down:
  1395. X                  if (cur_page < max_page) {
  1396. X                      pos_help = cur_page*NOTESLINES;
  1397. X                      cur_page++;
  1398. !                 } else {
  1399. !                     pos_help = 0;
  1400. !                     cur_page = 1;
  1401. !                 }                
  1402. X                  break;
  1403. X              
  1404. X              case ctrl('U'):            /* page up */
  1405. +             case ctrl('B'):            /* vi style */
  1406. X              case 'b':
  1407. X              case 'k':
  1408. + help_page_up:
  1409. X                  if (cur_page > 1) {
  1410. X                      cur_page--;
  1411. X                      pos_help = (cur_page-1)*NOTESLINES;
  1412. !                 } else {
  1413. !                     pos_help = (max_page-1) * NOTESLINES;
  1414. !                     cur_page = max_page;
  1415. !                 }                
  1416. X                  break;
  1417. X  
  1418. X              case ctrl('R'):            /* Home */
  1419. X              case 'g':
  1420. + help_home:
  1421. X                  if (cur_page != 1) {
  1422. X                      cur_page = 1;
  1423. X                      pos_help = 0;
  1424. ***************
  1425. *** 327,332 ****
  1426. --- 319,325 ----
  1427. X  
  1428. X              case '$':                /* End */
  1429. X              case 'G':
  1430. + help_end:
  1431. X                  if (cur_page != max_page) {
  1432. X                      cur_page = max_page;
  1433. X                      pos_help = (max_page-1) * NOTESLINES;
  1434. ***************
  1435. *** 340,343 ****
  1436. --- 333,364 ----
  1437. X                  return;
  1438. X          }    
  1439. X      }
  1440. + }
  1441. + void display_info_page ()
  1442. + {
  1443. +     char buf[PATH_LEN];
  1444. +     int i;
  1445. +     
  1446. +     ClearScreen ();
  1447. +     sprintf (buf, info_title, cur_page, max_page);
  1448. +     center_line (0, TRUE, buf);
  1449. +     MoveCursor (INDEX_TOP, 0);
  1450. +     if (info_type == HELP_INFO) { 
  1451. +         for (i=pos_help ; i < (pos_help + NOTESLINES) && info_help[i] ; i++) {
  1452. +             fputs (info_help[i], stdout);
  1453. +         }
  1454. +     } else {
  1455. +         for (i=pos_help ; i < (pos_help + NOTESLINES) && posted[i].date[0] ; i++) {
  1456. +             sprintf (buf, "%8s  %c  %-*s  %s",
  1457. +                 posted[i].date, posted[i].action,  
  1458. +                 group_len, posted[i].group, posted[i].subj);
  1459. +                 buf[COLS-2] = '\0';
  1460. +             printf ("%s\r\n", buf);
  1461. +         }
  1462. +     }
  1463. +     center_line (LINES, FALSE, txt_hit_space_for_more);
  1464. X  }
  1465. diff -rcs ../1.14/inews.c ./inews.c
  1466. *** ../1.14/inews.c    Tue Aug 11 21:23:07 1992
  1467. --- ./inews.c    Mon Jul 27 06:55:29 1992
  1468. ***************
  1469. *** 3,9 ****
  1470. X   *  Module    : inews.c
  1471. X   *  Author    : I.Lea
  1472. X   *  Created   : 17-03-92
  1473. !  *  Updated   : 20-06-92
  1474. X   *  Notes     : NNTP builtin version of inews
  1475. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea
  1476. X   *              You may  freely  copy or  redistribute  this software,
  1477. --- 3,9 ----
  1478. X   *  Module    : inews.c
  1479. X   *  Author    : I.Lea
  1480. X   *  Created   : 17-03-92
  1481. !  *  Updated   : 02-07-92
  1482. X   *  Notes     : NNTP builtin version of inews
  1483. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea
  1484. X   *              You may  freely  copy or  redistribute  this software,
  1485. ***************
  1486. *** 14,20 ****
  1487. X  
  1488. X  #include    "tin.h"
  1489. X  
  1490. ! #if defined(BSD) || defined(RS6000)
  1491. X  #    ifdef apollo
  1492. X  #        include    </bsd4.3/usr/include/netdb.h>
  1493. X  #    else
  1494. --- 14,20 ----
  1495. X  
  1496. X  #include    "tin.h"
  1497. X  
  1498. ! #if defined(BSD) || defined(RS6000) || defined(sinix)
  1499. X  #    ifdef apollo
  1500. X  #        include    </bsd4.3/usr/include/netdb.h>
  1501. X  #    else
  1502. ***************
  1503. *** 63,69 ****
  1504. X       * Send Path: and From: article headers
  1505. X       */
  1506. X  #ifdef NNTP_INEWS_GATEWAY
  1507. !     sprintf (line, "Path: %s", userid);
  1508. X  #else
  1509. X      sprintf (line, "Path: %s!%s", host_name, userid);
  1510. X  #endif    
  1511. --- 63,73 ----
  1512. X       * Send Path: and From: article headers
  1513. X       */
  1514. X  #ifdef NNTP_INEWS_GATEWAY
  1515. !     if (*(NNTP_INEWS_GATEWAY)) {
  1516. !         sprintf (line, "Path: %s", userid);
  1517. !     } else {    
  1518. !         sprintf (line, "Path: %s!%s", host_name, userid);
  1519. !     }
  1520. X  #else
  1521. X      sprintf (line, "Path: %s!%s", host_name, userid);
  1522. X  #endif    
  1523. ***************
  1524. *** 110,158 ****
  1525. X  #ifndef INDEX_DAEMON
  1526. X  
  1527. X      char host[PATH_LEN];
  1528. ! #ifdef NNTP_INEWS_GATEWAY    
  1529. X      FILE *fp;
  1530. X  
  1531. X      host_name[0] = '\0';
  1532. X  
  1533. !     /*
  1534. !      * If 1st letter is '/' read gateway name from specified file
  1535. !      */
  1536. !     if (*(NNTP_INEWS_GATEWAY) == '/') {
  1537. !         if ((fp = fopen (NNTP_INEWS_GATEWAY, "r")) != (FILE *) 0) {
  1538. !             if (fgets (host, sizeof (host), fp) != (char *) 0) {
  1539. !                 my_strncpy (host_name, host, strlen (host)-1);
  1540. !             }    
  1541. !             fclose (fp);
  1542. X          }
  1543. !         if (! host_name[0]) {
  1544. !             strcpy(host_name, "PROBLEM_WITH_INEWS_GATEWAY_FILE");
  1545. !         }
  1546. !     } else {
  1547. !         strcpy (host_name, NNTP_INEWS_GATEWAY);
  1548. !     }    
  1549. ! #else
  1550. ! #    if defined(BSD) || defined(sinix) || defined(RS6000) || defined(HPUX)
  1551. !     {
  1552. !         struct hostent *host_entry;
  1553. !         gethostname (host, sizeof (host)); 
  1554. !         host_entry = gethostbyname (host);
  1555. !         my_strncpy (host, host_entry->h_name, sizeof (host)); 
  1556. !     }    
  1557. ! #    else    
  1558. !     {
  1559. !         struct utsname uts_name;
  1560. X  
  1561. !         uname (&uts_name);
  1562. !         my_strncpy (host, uts_name.nodename, sizeof (host));
  1563. X      }
  1564. - #    endif
  1565. -     strcpy (host_name, host);
  1566. - #endif
  1567. X  #endif /* INDEX_DAEMON */
  1568. X  }
  1569. X  
  1570. --- 114,168 ----
  1571. X  #ifndef INDEX_DAEMON
  1572. X  
  1573. X      char host[PATH_LEN];
  1574. !     char nntp_inews_gateway[PATH_LEN];
  1575. X      FILE *fp;
  1576. X  
  1577. X      host_name[0] = '\0';
  1578. +     nntp_inews_gateway[0] = '\0';
  1579. +     
  1580. + #ifdef NNTP_INEWS_GATEWAY
  1581. +     if (*(NNTP_INEWS_GATEWAY)) {
  1582. +         strcpy (nntp_inews_gateway, NNTP_INEWS_GATEWAY);
  1583. +     }
  1584. + #endif
  1585. +     
  1586. +     if (nntp_inews_gateway[0]) {
  1587. +         /*
  1588. +          * If 1st letter is '/' read gateway name from specified file
  1589. +          */
  1590. +         if (nntp_inews_gateway[0] == '/') {
  1591. +             if ((fp = fopen (nntp_inews_gateway, "r")) != (FILE *) 0) {
  1592. +                 if (fgets (host, sizeof (host), fp) != (char *) 0) {
  1593. +                     my_strncpy (host_name, host, strlen (host)-1);
  1594. +                 }    
  1595. +                 fclose (fp);
  1596. +             }
  1597. +             if (! host_name[0]) {
  1598. +                 strcpy(host_name, "PROBLEM_WITH_INEWS_GATEWAY_FILE");
  1599. +             }
  1600. +         } else {
  1601. +             strcpy (host_name, nntp_inews_gateway);
  1602. +         }    
  1603. +     } else {
  1604. + #        if defined(BSD) || defined(sinix) || defined(RS6000) || defined(HPUX)
  1605. +         {
  1606. +             struct hostent *host_entry;
  1607. +             gethostname (host, sizeof (host)); 
  1608. +             host_entry = gethostbyname (host);
  1609. +             my_strncpy (host, host_entry->h_name, sizeof (host)); 
  1610. +         }    
  1611. + #        else    
  1612. +         {
  1613. +             struct utsname uts_name;
  1614. X  
  1615. !             uname (&uts_name);
  1616. !             my_strncpy (host, uts_name.nodename, sizeof (host));
  1617. X          }
  1618. ! #        endif
  1619. X  
  1620. !         strcpy (host_name, host);
  1621. X      }
  1622. X  #endif /* INDEX_DAEMON */
  1623. X  }
  1624. X  
  1625. ***************
  1626. *** 165,185 ****
  1627. X  {
  1628. X  #ifndef INDEX_DAEMON
  1629. X  
  1630. !     char domain[256];
  1631. X      char full_name[128];
  1632. !     char host_name[256];
  1633. X      char *ptr;
  1634. - #ifdef NNTP_INEWS_DOMAIN
  1635. X      FILE *fp;
  1636. - #endif
  1637. X      
  1638. X      domain[0] = '\0';
  1639. !     
  1640. X      if ((ptr = (char *) getenv ("NAME")) != (char *) 0) {
  1641. X          my_strncpy (full_name, ptr, sizeof (full_name));
  1642. X      } else {    
  1643. X          my_strncpy (full_name, myentry->pw_gecos, sizeof (full_name));
  1644. !         if ((ptr = (char *) strchr (full_name, ','))) {
  1645. X              *ptr = '\0';            
  1646. X          }
  1647. X      }
  1648. --- 175,202 ----
  1649. X  {
  1650. X  #ifndef INDEX_DAEMON
  1651. X  
  1652. !     char domain[PATH_LEN];
  1653. X      char full_name[128];
  1654. !     char host_name[PATH_LEN];
  1655. !     char nntp_inews_domain[PATH_LEN];
  1656. X      char *ptr;
  1657. X      FILE *fp;
  1658. X      
  1659. X      domain[0] = '\0';
  1660. !     nntp_inews_domain[0] = '\0';
  1661. ! #ifdef NNTP_INEWS_DOMAIN
  1662. !     if (*(NNTP_INEWS_DOMAIN)) {
  1663. !         strcpy (nntp_inews_domain, NNTP_INEWS_DOMAIN);
  1664. !     }
  1665. ! #endif
  1666. !         
  1667. X      if ((ptr = (char *) getenv ("NAME")) != (char *) 0) {
  1668. X          my_strncpy (full_name, ptr, sizeof (full_name));
  1669. X      } else {    
  1670. X          my_strncpy (full_name, myentry->pw_gecos, sizeof (full_name));
  1671. !         ptr = (char *) strchr (full_name, ',');
  1672. !         if (ptr != (char *) 0) {
  1673. X              *ptr = '\0';            
  1674. X          }
  1675. X      }
  1676. ***************
  1677. *** 186,220 ****
  1678. X  
  1679. X      get_host_name (host_name);
  1680. X  
  1681. ! #ifdef NNTP_INEWS_DOMAIN
  1682. !     /*
  1683. !      * If 1st letter is '/' read domain name from specified file
  1684. !      */
  1685. !     if (*(NNTP_INEWS_DOMAIN) == '/') {
  1686. !         if ((fp = fopen (NNTP_INEWS_DOMAIN, "r")) != (FILE *) 0) {
  1687. !             if (fgets (domain, sizeof (domain), fp) != (char *) 0) {
  1688. !                 if (ptr = (char *) strchr (domain, '\n')) {
  1689. !                     *ptr = '\0';
  1690. X                  }
  1691. X              }
  1692. !             fclose (fp);
  1693. !         }
  1694. !         if (! domain[0]) {
  1695. !             strcpy (domain, "PROBLEM_WITH_INEWS_DOMAIN_FILE");
  1696. X          }
  1697. -     } else {
  1698. -         my_strncpy (domain, NNTP_INEWS_DOMAIN, sizeof (domain));
  1699. -     }
  1700. X      
  1701. !     if (domain[0] == '.') {
  1702. !         sprintf (from_name, "%s@%s%s (%s)",
  1703. !             userid, host_name, domain, full_name);
  1704. X      } else {    
  1705. !         sprintf (from_name, "%s@%s (%s)", userid, domain, full_name);
  1706. !     }        
  1707. ! #else    
  1708. !     sprintf (from_name, "%s@%s (%s)", userid, host_name, full_name);
  1709. ! #endif
  1710. X  
  1711. X      if (debug == 2) {
  1712. X          error_message ("FROM: %s", from_name);
  1713. --- 203,241 ----
  1714. X  
  1715. X      get_host_name (host_name);
  1716. X  
  1717. !     if (nntp_inews_domain[0]) {
  1718. !         /*
  1719. !          * If 1st letter is '/' read domain name from specified file
  1720. !          */
  1721. !         if (nntp_inews_domain[0] == '/') {
  1722. !             if ((fp = fopen (nntp_inews_domain, "r")) != (FILE *) 0) {
  1723. !                 if (fgets (domain, sizeof (domain), fp) != (char *) 0) {
  1724. !                     if (ptr = (char *) strchr (domain, '\n')) {
  1725. !                         *ptr = '\0';
  1726. !                     }
  1727. X                  }
  1728. +                 fclose (fp);
  1729. X              }
  1730. !             if (! domain[0]) {
  1731. !                 strcpy (domain, "PROBLEM_WITH_INEWS_DOMAIN_FILE");
  1732. !             }
  1733. !         } else {
  1734. !             my_strncpy (domain, nntp_inews_domain, sizeof (domain));
  1735. X          }
  1736. X      
  1737. !         if (domain[0] == '.') {
  1738. !             sprintf (from_name, "%s@%s%s (%s)",
  1739. !                 userid, host_name, domain, full_name);
  1740. !         } else {    
  1741. !             sprintf (from_name, "%s@%s (%s)", userid, domain, full_name);
  1742. !         }        
  1743. X      } else {    
  1744. !         if (host_name[0] == '%') {
  1745. !             sprintf (from_name, "%s%s (%s)", userid, host_name, full_name);
  1746. !         } else {
  1747. !             sprintf (from_name, "%s@%s (%s)", userid, host_name, full_name);
  1748. !         }
  1749. !     }
  1750. X  
  1751. X      if (debug == 2) {
  1752. X          error_message ("FROM: %s", from_name);
  1753. diff -rcs ../1.14/init.c ./init.c
  1754. *** ../1.14/init.c    Tue Aug 11 21:23:08 1992
  1755. --- ./init.c    Fri Aug  7 11:46:11 1992
  1756. ***************
  1757. *** 3,9 ****
  1758. X   *  Module    : init.c
  1759. X   *  Author    : I.Lea
  1760. X   *  Created   : 01-04-91
  1761. !  *  Updated   : 20-06-92
  1762. X   *  Notes     :
  1763. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea
  1764. X   *              You may  freely  copy or  redistribute  this software,
  1765. --- 3,9 ----
  1766. X   *  Module    : init.c
  1767. X   *  Author    : I.Lea
  1768. X   *  Created   : 01-04-91
  1769. !  *  Updated   : 07-08-92
  1770. X   *  Notes     :
  1771. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea
  1772. X   *              You may  freely  copy or  redistribute  this software,
  1773. ***************
  1774. *** 14,83 ****
  1775. X  
  1776. X  #include    "tin.h"
  1777. X  
  1778. - char rcdir[PATH_LEN];
  1779. - char rcfile[PATH_LEN];
  1780. - char indexdir[PATH_LEN];
  1781. - char killfile[PATH_LEN];
  1782. - char postfile[PATH_LEN];
  1783. - char unthreadfile[PATH_LEN];
  1784. - char cvers[LEN];
  1785. - char nntp_server[LEN];
  1786. X  char active_file[PATH_LEN];
  1787. ! char newsgroups_file[PATH_LEN];
  1788. ! char subscriptions_file[PATH_LEN];
  1789. ! char homedir[PATH_LEN];
  1790. ! char userid[LEN];
  1791. ! char delgroups[LEN];
  1792. ! char default_maildir[PATH_LEN];            /* mailbox dir where = saves are stored */
  1793. ! char newsrc[PATH_LEN];
  1794. ! char newnewsrc[PATH_LEN];
  1795. ! char add_addr[LEN];            /* address to add to rR reply to author with mail */
  1796. ! char bug_addr[LEN];            /* address to add send bug reports to */
  1797. ! char txt_help_bug_report[LEN];    /* address to add send bug reports to */
  1798. ! char reply_to[LEN];            /* Reply-To: address */
  1799. ! char my_org[LEN];            /* Organization: */
  1800. ! char my_distribution[LEN];        /* Distribution: */
  1801. X  char default_select_pattern[LEN];
  1802. X  char default_sigfile[PATH_LEN];
  1803. X  char default_signature[PATH_LEN];
  1804. X  char default_shell_command[LEN];    /* offers user default choice */
  1805. ! char killsubj[LEN];            /* contains Subject:'s not to be shown */
  1806. ! char killfrom[LEN];            /* conatins From:'s not to be shown */
  1807. ! char page_header[LEN];        /* page header of pgm name and version */
  1808. ! char default_savedir[PATH_LEN];            /* directory to save articles to */
  1809. ! char spooldir[PATH_LEN];        /* directory where news is */
  1810. ! char spooldir_alias[PATH_LEN];        /* alias of spooldir being used */
  1811. X  char mail_news_user[LEN];    /* mail new news to this user address */
  1812. ! char mailer[PATH_LEN];            /* mail program */
  1813. ! char mailbox[PATH_LEN];            /* system mailbox for each user */
  1814. ! char printer[LEN];            /* printer program specified from tinrc */
  1815. ! char cmd_line_printer[LEN];    /* printer program specified on cmd line */
  1816. ! char article[PATH_LEN];            /* ~/.article file */
  1817. ! char dead_article[PATH_LEN];    /* ~/dead.article file */
  1818. ! char progname[PATH_LEN];        /* program name */
  1819. X  char redirect_output[LEN];    /* /dev/null or nothing if -D option */
  1820. X  
  1821. X  int xindex_supported = FALSE;
  1822. X  int xuser_supported = FALSE;
  1823. X  int xspooldir_supported = FALSE;
  1824. ! int NOTESLINES;                        /* set in set_win_size () */
  1825. ! int RIGHT_POS;                        /* set in set_win_size () */
  1826. ! int MORE_POS;                        /* set in set_win_size () */
  1827. X  int confirm_action;
  1828. X  int max_subj = 0;
  1829. X  int max_from = 0;
  1830. ! int max_active;
  1831. ! int num_active;                        /* one past top of active */
  1832. ! int group_top;                        /* one past top of my_group */
  1833. ! int groupname_len = 0;                    /* one past top of my_group */
  1834. ! int catchup = FALSE;                /* mark all arts read in all subscribed groups */
  1835. ! int update_fork = FALSE;            /* update index files by forked tin -u */
  1836. ! int verbose = FALSE;                /* update index files only mode */
  1837. ! int start_line_offset;                /* used by invoke_editor for line no. */
  1838. ! int inn_nntp_server = FALSE;            /* read news via INN NNTP */
  1839. ! int read_news_via_nntp = FALSE;        /* read news locally or via NNTP */
  1840. ! int local_index;                    /* do private indexing? */
  1841. ! int max_art;
  1842. X  int real_gid;
  1843. X  int real_uid;
  1844. X  int real_umask;
  1845. --- 14,86 ----
  1846. X  
  1847. X  #include    "tin.h"
  1848. X  
  1849. X  char active_file[PATH_LEN];
  1850. ! char attributes_file[PATH_LEN];
  1851. ! char add_addr[LEN];        /* address to add to rR reply to author with mail */
  1852. ! char article[PATH_LEN];        /* ~/.article file */
  1853. ! char bug_addr[LEN];        /* address to add send bug reports to */
  1854. ! char cmd_line_printer[LEN];    /* printer program specified on cmd line */
  1855. ! char cvers[LEN];
  1856. ! char dead_article[PATH_LEN];    /* ~/dead.article file */
  1857. ! char default_maildir[PATH_LEN];    /* mailbox dir where = saves are stored */
  1858. X  char default_select_pattern[LEN];
  1859. X  char default_sigfile[PATH_LEN];
  1860. X  char default_signature[PATH_LEN];
  1861. X  char default_shell_command[LEN];    /* offers user default choice */
  1862. ! char default_savedir[PATH_LEN];        /* directory to save articles to */
  1863. ! char default_select_pattern[LEN];
  1864. ! char delgroups[LEN];
  1865. ! char homedir[PATH_LEN];
  1866. ! char indexdir[PATH_LEN];
  1867. ! char killfile[PATH_LEN];
  1868. ! char killsubj[LEN];        /* contains Subject:'s not to be shown */
  1869. ! char killfrom[LEN];        /* contains From:'s not to be shown */
  1870. ! char lock_file[PATH_LEN];    /* conatins name of index lock file */
  1871. X  char mail_news_user[LEN];    /* mail new news to this user address */
  1872. ! char mailbox[PATH_LEN];        /* system mailbox for each user */
  1873. ! char mailer[PATH_LEN];        /* mail program */
  1874. ! char my_org[LEN];        /* Organization: */
  1875. ! char my_distribution[LEN];    /* Distribution: */
  1876. ! char newsgroups_file[PATH_LEN];
  1877. ! char newsrc[PATH_LEN];
  1878. ! char newnewsrc[PATH_LEN];
  1879. ! char page_header[LEN];        /* page header of pgm name and version */
  1880. ! char postfile[PATH_LEN];
  1881. ! char printer[LEN];        /* printer program specified from tinrc */
  1882. ! char progname[PATH_LEN];    /* program name */
  1883. ! char quote_chars[PATH_LEN];    /* quote chars for posting/mails ": " */
  1884. ! char rcdir[PATH_LEN];
  1885. ! char rcfile[PATH_LEN];
  1886. X  char redirect_output[LEN];    /* /dev/null or nothing if -D option */
  1887. + char reply_to[LEN];        /* Reply-To: address */
  1888. + char spooldir[PATH_LEN];    /* directory where news is */
  1889. + char spooldir_alias[PATH_LEN];    /* alias of spooldir being used */
  1890. + char subscriptions_file[PATH_LEN];
  1891. + char txt_help_bug_report[LEN];    /* address to add send bug reports to */
  1892. + char userid[PATH_LEN];
  1893. X  
  1894. + int unread_art_mark;
  1895. + int hot_art_mark;
  1896. + int return_art_mark;
  1897. X  int xindex_supported = FALSE;
  1898. X  int xuser_supported = FALSE;
  1899. X  int xspooldir_supported = FALSE;
  1900. ! int NOTESLINES;            /* set in set_win_size () */
  1901. ! int RIGHT_POS;            /* set in set_win_size () */
  1902. ! int MORE_POS;            /* set in set_win_size () */
  1903. X  int confirm_action;
  1904. X  int max_subj = 0;
  1905. X  int max_from = 0;
  1906. ! int group_top;            /* one past top of my_group */
  1907. ! int groupname_len = 0;        /* one past top of my_group */
  1908. ! int catchup = FALSE;        /* mark all arts read in all subscribed groups */
  1909. ! int update_fork = FALSE;    /* update index files by forked tin -u */
  1910. ! int verbose = FALSE;        /* update index files only mode */
  1911. ! int start_line_offset;        /* used by invoke_editor for line no. */
  1912. ! int inn_nntp_server = FALSE;    /* read news via INN NNTP */
  1913. ! int read_news_via_nntp = FALSE;    /* read news locally or via NNTP */
  1914. ! int local_index;        /* do private indexing? */
  1915. X  int real_gid;
  1916. X  int real_uid;
  1917. X  int real_umask;
  1918. ***************
  1919. *** 88,102 ****
  1920. X  int top = 0;
  1921. X  int top_base;
  1922. X  int check_any_unread = FALSE;
  1923. - int notify_new_groups = FALSE;
  1924. X  int start_any_unread = FALSE;
  1925. X  
  1926. X  int catchup_read_groups;    /* ask if read groups are to be marked read */
  1927. ! int cmd_line;                /* batch / interactive mode */
  1928. ! int created_rcdir;            /* checks if first time tin is started */
  1929. X  int default_printer;        /* set to false if user give a printer with -p switch */
  1930. X  int default_show_author;    /* show_author value from 'M' menu in tinrc */
  1931. X  int draw_arrow_mark;        /* draw -> or highlighted bar */
  1932. X  int full_page_scroll;        /* page half/full screen of articles/groups */
  1933. X  int killed_articles;        /* killed / auto-selected hot articles */
  1934. X  int mark_saved_read;        /* mark saved article/thread as read */
  1935. --- 91,111 ----
  1936. X  int top = 0;
  1937. X  int top_base;
  1938. X  int check_any_unread = FALSE;
  1939. X  int start_any_unread = FALSE;
  1940. X  
  1941. X  int catchup_read_groups;    /* ask if read groups are to be marked read */
  1942. ! int cmd_line;            /* batch / interactive mode */
  1943. ! int check_for_new_newsgroups;    /* don't check for new newsgroups */
  1944. ! int created_rcdir;        /* checks if first time tin is started */
  1945. ! int default_auto_save;        /* save thread with name from Archive-name: field */
  1946. ! int default_batch_save;        /* save arts if -M/-S command line switch specified */
  1947. X  int default_printer;        /* set to false if user give a printer with -p switch */
  1948. X  int default_show_author;    /* show_author value from 'M' menu in tinrc */
  1949. + int default_show_only_unread;    /* show only new/unread arts or all arts */
  1950. + int default_sort_art_type;    /* sort arts[] array by subject,from or date field */
  1951. + int default_thread_arts;    /* thread/unthread articles for viewing */
  1952. X  int draw_arrow_mark;        /* draw -> or highlighted bar */
  1953. + int force_screen_redraw;    /* force screen redraw after external (shell) commands */
  1954. X  int full_page_scroll;        /* page half/full screen of articles/groups */
  1955. X  int killed_articles;        /* killed / auto-selected hot articles */
  1956. X  int mark_saved_read;        /* mark saved article/thread as read */
  1957. ***************
  1958. *** 105,127 ****
  1959. X  int num_of_tagged_arts;
  1960. X  int process_id;
  1961. X  int pos_first_unread;        /* position cursor at first/last unread article */
  1962. ! int post_proc_type;            /* type of post processing to be performed */
  1963. ! int print_header;            /* print all of mail header or just Subject: & From lines */
  1964. ! int save_archive_name;        /* save thread with name from Archive-name: field */
  1965. ! int mail_news;                /* mail all arts to specified user */
  1966. ! int save_news;                /* save all arts to savedir structure */
  1967. ! int show_author;            /* show Subject & From or only Subject in group menu */
  1968. ! int show_only_unread;        /* show only new/unread arts or all arts */
  1969. ! int spooldir_is_active;            /* set TRUE if current spooldir is active news feed */
  1970. ! int sort_art_type;            /* sort arts[] array by subject,from or date field */
  1971. ! int thread_arts;            /* thread/unthread articles for viewing */
  1972. X  int system_status;
  1973. X  
  1974. - #ifdef INDEX_DAEMON
  1975. - int update = TRUE;                    /* update index files only mode */
  1976. - #else
  1977. - int update = FALSE;                    /* update index files only mode */
  1978. - #endif
  1979. X  
  1980. X  struct passwd *myentry;
  1981. X  
  1982. --- 114,132 ----
  1983. X  int num_of_tagged_arts;
  1984. X  int process_id;
  1985. X  int pos_first_unread;        /* position cursor at first/last unread article */
  1986. ! int default_post_proc_type;        /* type of post processing to be performed */
  1987. ! int print_header;        /* print all of mail header or just Subject: & From lines */
  1988. ! int reread_active_file_secs;    /* reread active file interval in seconds */
  1989. ! int mail_news;            /* mail all arts to specified user */
  1990. ! int save_news;            /* save all arts to savedir structure */
  1991. ! int show_author;
  1992. ! int show_last_line_prev_page;    /* set TRUE to see last line of prev page (ala nn) */
  1993. ! int show_only_unread_groups;    /* set TRUE to see only subscribed groups with new news */
  1994. ! int spooldir_is_active;        /* set TRUE if current spooldir is active news feed */
  1995. X  int system_status;
  1996. + int tab_after_X_selection;    /* set TRUE if you want auto TAB after X */
  1997. + int update;            /* update index files only mode */
  1998. X  
  1999. X  
  2000. X  struct passwd *myentry;
  2001. X  
  2002. ***************
  2003. *** 181,186 ****
  2004. --- 186,194 ----
  2005. X          strcpy (homedir, myentry->pw_dir);
  2006. X      }
  2007. X  
  2008. +     unread_art_mark = UNREAD_ART_MARK;
  2009. +     hot_art_mark = HOT_ART_MARK;
  2010. +     return_art_mark = RETURN_ART_MARK;
  2011. X      catchup_read_groups = FALSE;
  2012. X      confirm_action = TRUE;
  2013. X      created_rcdir = FALSE;
  2014. ***************
  2015. *** 190,196 ****
  2016. --- 198,207 ----
  2017. X  #else
  2018. X      draw_arrow_mark = FALSE;
  2019. X  #endif
  2020. +     default_auto_save = TRUE;
  2021. +     default_batch_save = FALSE;
  2022. X      default_move_group = 0;
  2023. +     default_post_proc_type = POST_PROC_NONE;
  2024. X  #ifdef BSD
  2025. X      default_printer = TRUE;
  2026. X  #else    
  2027. ***************
  2028. *** 197,202 ****
  2029. --- 208,217 ----
  2030. X      default_printer = FALSE;
  2031. X  #endif
  2032. X      default_show_author = SHOW_FROM_NAME;
  2033. +     default_show_only_unread = FALSE;
  2034. +     default_sort_art_type = SORT_BY_DATE_ASCEND;
  2035. +     default_thread_arts = TRUE;
  2036. +     force_screen_redraw = FALSE;
  2037. X      full_page_scroll = TRUE;
  2038. X      killed_articles = FALSE;
  2039. X      mark_saved_read = TRUE;
  2040. ***************
  2041. *** 203,218 ****
  2042. X      num_of_hot_arts = 0;
  2043. X      num_of_killed_arts = 0;
  2044. X      num_of_tagged_arts = 0;
  2045. -     post_proc_type = POST_PROC_NONE;
  2046. X      pos_first_unread = TRUE;
  2047. X      print_header = FALSE;
  2048. !     save_archive_name = TRUE;
  2049. X      save_news = FALSE;
  2050. !     show_only_unread = FALSE;
  2051. X      show_description = TRUE;
  2052. !     sort_art_type = SORT_BY_DATE_ASCEND;
  2053. X      start_editor_offset = TRUE;
  2054. !     thread_arts = TRUE;
  2055. X      
  2056. X      killsubj[0] = '\0';
  2057. X      killfrom[0] = '\0';
  2058. --- 218,241 ----
  2059. X      num_of_hot_arts = 0;
  2060. X      num_of_killed_arts = 0;
  2061. X      num_of_tagged_arts = 0;
  2062. X      pos_first_unread = TRUE;
  2063. X      print_header = FALSE;
  2064. !     reread_active_file_secs = 0;
  2065. X      save_news = FALSE;
  2066. !     show_last_line_prev_page = FALSE;
  2067. X      show_description = TRUE;
  2068. !     show_only_unread_groups = FALSE;
  2069. X      start_editor_offset = TRUE;
  2070. !     tab_after_X_selection = FALSE;
  2071. ! #ifdef INDEX_DAEMON
  2072. !     check_for_new_newsgroups = FALSE;
  2073. !     update = TRUE;
  2074. ! #else
  2075. !     check_for_new_newsgroups = TRUE;
  2076. !     update = FALSE;
  2077. ! #endif
  2078. !     newsrc[0] = '\0';
  2079. X      
  2080. X      killsubj[0] = '\0';
  2081. X      killfrom[0] = '\0';
  2082. ***************
  2083. *** 231,237 ****
  2084. X      default_save_file[0] = '\0';
  2085. X      default_select_pattern[0] = '\0';
  2086. X      default_shell_command[0] = '\0';
  2087. -     nntp_server[0] = '\0';
  2088. X      proc_ch_default = 'n';
  2089. X  
  2090. X      /*
  2091. --- 254,259 ----
  2092. ***************
  2093. *** 243,248 ****
  2094. --- 265,271 ----
  2095. X      set_tindir ();    
  2096. X  
  2097. X      sprintf (active_file, "%s/active", LIBDIR);
  2098. +     sprintf (attributes_file, "%s/attributes", rcdir);
  2099. X      sprintf (article, "%s/.article", homedir);
  2100. X      sprintf (dead_article, "%s/dead.article", homedir);
  2101. X      sprintf (delgroups, "%s/.delgroups", homedir);
  2102. ***************
  2103. *** 256,291 ****
  2104. X  
  2105. X      strcpy (mailer, get_val ("MAILER", DEFAULT_MAILER));
  2106. X      strcpy (printer, DEFAULT_PRINTER);
  2107. X      strcpy (spooldir, SPOOLDIR);
  2108. X      strcpy (bug_addr, BUG_REPORT_ADDRESS);
  2109. X      strcpy (redirect_output, "> /dev/null 2>&1");
  2110. X  
  2111. X  #ifdef INDEX_DAEMON
  2112. !     /*
  2113. !      * Check for lock file to stop multiple copies of tind running and
  2114. !      * if it does not exist create it so this is the only copy running
  2115. !      */
  2116. !     if (stat (LOCK_FILE, &sb) == 0) {
  2117. !         if ((fp = fopen (LOCK_FILE, "r")) != (FILE *) 0) {
  2118. !             fgets (nam, sizeof (nam), fp);
  2119. !             fclose (fp);
  2120. !             fprintf(stderr, "%s: Already started pid=[%d] on %s", 
  2121. !                 progname, atoi(nam), nam+8);
  2122. !             exit (1);
  2123. !         }
  2124. !     } else {
  2125. !         {
  2126. !             long epoch;
  2127. !             
  2128. !             if ((fp = fopen (LOCK_FILE, "w")) != (FILE *) 0) {
  2129. !                 time (&epoch);
  2130. !                 fprintf (fp, "%6d  %s", process_id, ctime (&epoch));
  2131. !                 fclose (fp);
  2132. !                 chmod (LOCK_FILE, 0600);
  2133. !             }
  2134. !         }    
  2135. !     }
  2136. !      
  2137. X      strcpy (newsrc, active_file);    /* so that all groups are indexed */
  2138. X      sprintf (indexdir, "%s/.index", spooldir);
  2139. X  
  2140. --- 279,291 ----
  2141. X  
  2142. X      strcpy (mailer, get_val ("MAILER", DEFAULT_MAILER));
  2143. X      strcpy (printer, DEFAULT_PRINTER);
  2144. +     strcpy (quote_chars, DEFAULT_COMMENT);
  2145. X      strcpy (spooldir, SPOOLDIR);
  2146. X      strcpy (bug_addr, BUG_REPORT_ADDRESS);
  2147. X      strcpy (redirect_output, "> /dev/null 2>&1");
  2148. X  
  2149. X  #ifdef INDEX_DAEMON
  2150. !     strcpy (lock_file, LOCK_FILE);    
  2151. X      strcpy (newsrc, active_file);    /* so that all groups are indexed */
  2152. X      sprintf (indexdir, "%s/.index", spooldir);
  2153. X  
  2154. ***************
  2155. *** 293,298 ****
  2156. --- 293,304 ----
  2157. X          mkdir (indexdir, 0777);
  2158. X      }
  2159. X  #else
  2160. + #    ifdef LONG_FILENAMES
  2161. +         sprintf (lock_file, "/tmp/tin.%s.LCK", userid);    
  2162. + #    else
  2163. +         sprintf (lock_file, "/tmp/%s.LCK", userid);    
  2164. + #endif
  2165. X      if (stat (rcdir, &sb) == -1) {
  2166. X          created_rcdir = TRUE;
  2167. X          mkdir (rcdir, 0755);
  2168. ***************
  2169. *** 313,328 ****
  2170. X              fclose (fp);
  2171. X          }
  2172. X      }
  2173. -     if (stat (unthreadfile, &sb) == -1) {
  2174. -         if ((fp = fopen (unthreadfile, "w")) != NULL) {
  2175. -             fclose (fp);
  2176. -         }
  2177. -     }
  2178. X  
  2179. X      read_rcfile ();
  2180. X  
  2181. -     show_author = default_show_author;
  2182. X  #endif /* INDEX_DAEMON */    
  2183. X  
  2184. X      if (stat (active_file, &sb) >= 0)
  2185. --- 319,327 ----
  2186. ***************
  2187. *** 520,529 ****
  2188. X          sprintf (rcfile,   "%s/%s", rcdir, RCFILE);
  2189. X          sprintf (killfile, "%s/%s", rcdir, KILLFILE);
  2190. X          sprintf (postfile, "%s/%s", rcdir, POSTFILE);
  2191. !         sprintf (unthreadfile, "%s/%s", rcdir, UNTHREADFILE);
  2192. !         sprintf (newsrc, "%s/.newsrc", homedir);
  2193. !         sprintf (newnewsrc, "%s/.newnewsrc", homedir);
  2194. X          spooldir_is_active = TRUE;
  2195. X          reread_active_file = TRUE;
  2196. X      }
  2197. --- 519,528 ----
  2198. X          sprintf (rcfile,   "%s/%s", rcdir, RCFILE);
  2199. X          sprintf (killfile, "%s/%s", rcdir, KILLFILE);
  2200. X          sprintf (postfile, "%s/%s", rcdir, POSTFILE);
  2201. !         if (newsrc[0] == '\0') {
  2202. !             sprintf (newsrc, "%s/.newsrc", homedir);
  2203. !             sprintf (newnewsrc, "%s/.newnewsrc", homedir);
  2204. !         }    
  2205. X          spooldir_is_active = TRUE;
  2206. X          reread_active_file = TRUE;
  2207. X      }
  2208. ***************
  2209. *** 550,552 ****
  2210. --- 549,552 ----
  2211. X      
  2212. X      return (created);
  2213. X  }
  2214. Files ../1.14/kill and ./kill are identical
  2215. diff -rcs ../1.14/kill.c ./kill.c
  2216. *** ../1.14/kill.c    Tue Aug 11 21:23:09 1992
  2217. --- ./kill.c    Wed Aug  5 06:58:05 1992
  2218. ***************
  2219. *** 3,9 ****
  2220. X   *  Module    : kill.c
  2221. X   *  Author    : I.Lea & J.Robinson
  2222. X   *  Created   : 01-04-91
  2223. !  *  Updated   : 20-06-92
  2224. X   *  Notes     : kill & auto select (hot) articles
  2225. X   *  Copyright : (c) Copyright 1991-92 by Iain Lea & Jim Robinson
  2226. X   *              You may  freely  copy or  redistribute  this software,
  2227. SHAR_EOF
  2228. true || echo 'restore of tin-1.15.patch failed'
  2229. fi
  2230. echo 'End of tin-1.15 part 3'
  2231. echo 'File tin-1.15.patch is continued in part 4'
  2232. echo 4 > _shar_seq_.tmp
  2233. exit 0
  2234.  
  2235. --
  2236. NAME   Iain Lea 
  2237. EMAIL  iain%anl433.uucp@Germany.EU.net
  2238. SNAIL  Siemens AG, ANL A433SZ, Gruendlacher Str. 248, 8510 Fuerth, Germany.
  2239. PHONE  +49-911-3089-407 (work) +49-911-331963 (home) +49-911-3089-290 (FAX)  
  2240. exit 0 # Just in case...
  2241.