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

  1. Newsgroups: comp.sources.misc
  2. From: iain@norisc.siemens.de (Iain J. Lea)
  3. Subject:  v23i085:  tin - threaded full screen newsreader, Patch05b/4
  4. Message-ID: <1991Oct20.032546.25101@sparky.imd.sterling.com>
  5. X-Md4-Signature: fde0dab21a553c25768184aca328c395
  6. Date: Sun, 20 Oct 1991 03:25:46 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 85
  11. Archive-name: tin/patch05b
  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 patch05.shar.02 (part 2 of tin)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file tin.patch05 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.patch05"
  37. sed 's/^X//' << 'SHAR_EOF' >> tin.patch05 &&
  38. X!         return(FALSE);
  39. X      }
  40. X      if (!_moveto) {
  41. X!         fprintf(stderr,
  42. X!             "Terminal must have cursor motion (cm)\n");
  43. X!         return(FALSE);
  44. X      }
  45. X      if (!_cleartoeoln) {
  46. X!         fprintf(stderr,
  47. X!             "Terminal must have clear to end-of-line (ce)\n");
  48. X!         return(FALSE);
  49. X      }
  50. X      if (!_cleartoeos) {
  51. X!         fprintf(stderr,
  52. X!             "Terminal must have clear to end-of-screen (cd)\n");
  53. X!         return(FALSE);
  54. X      }
  55. X      if (_lines == -1)
  56. X          _lines = DEFAULT_LINES_ON_TERMINAL;
  57. X      if (_columns == -1)
  58. X          _columns = DEFAULT_COLUMNS_ON_TERMINAL;
  59. X!     return(TRUE);
  60. X  }
  61. X  
  62. X  void ScreenSize(num_lines, num_columns)
  63. X--- 96,163 ----
  64. X      char termname[40], *p;
  65. X      char *strcpy(), *getenv();
  66. X      
  67. X!     if ((p = getenv ("TERM")) == NULL) {
  68. X!         fprintf (stderr,
  69. X!           "%s: TERM variable must be set to use screen capabilities\n",
  70. X!           progname);
  71. X!         return (FALSE);
  72. X      }
  73. X!     if (strcpy (termname, p) == NULL) {
  74. X!         fprintf (stderr,"%s: Can't get TERM variable\n", progname);
  75. X!         return (FALSE);
  76. X      }
  77. X!     if (tgetent (_terminal, termname) != 1) {
  78. X!         fprintf (stderr,"%s: Can't get entry for TERM\n", progname);
  79. X!         return (FALSE);
  80. X      }
  81. X  
  82. X      /* load in all those pesky values */
  83. X!     _clearscreen    = tgetstr ("cl", &ptr);
  84. X!     _moveto         = tgetstr ("cm", &ptr);
  85. X!     _cleartoeoln    = tgetstr ("ce", &ptr);
  86. X!     _cleartoeos     = tgetstr ("cd", &ptr);
  87. X!     _lines          = tgetnum ("li");
  88. X!     _columns        = tgetnum ("co");
  89. X!     _setinverse     = tgetstr ("so", &ptr);
  90. X!     _clearinverse   = tgetstr ("se", &ptr);
  91. X!     _setunderline   = tgetstr ("us", &ptr);
  92. X!     _clearunderline = tgetstr ("ue", &ptr);
  93. X!     _terminalinit   = tgetstr ("ti", &ptr);
  94. X!     _terminalend    = tgetstr ("te", &ptr);
  95. X  
  96. X+     if (_terminalinit) {
  97. X+         tputs (_terminalinit, 1, outchar);
  98. X+     }
  99. X+ 
  100. X      if (!_clearscreen) {
  101. X!         fprintf (stderr,
  102. X!             "%s: Terminal must have clearscreen (cl) capability\n",progname);
  103. X!         return (FALSE);
  104. X      }
  105. X      if (!_moveto) {
  106. X!         fprintf (stderr,
  107. X!             "%s: Terminal must have cursor motion (cm)\n", progname);
  108. X!         return (FALSE);
  109. X      }
  110. X      if (!_cleartoeoln) {
  111. X!         fprintf (stderr,
  112. X!             "%s: Terminal must have clear to end-of-line (ce)\n", progname);
  113. X!         return (FALSE);
  114. X      }
  115. X      if (!_cleartoeos) {
  116. X!         fprintf (stderr,
  117. X!             "%s: terminal does not have clear to end-of-screen (ce). Simulating\n", progname);
  118. X! /*
  119. X!         fprintf (stderr,
  120. X!             "%s: Terminal must have clear to end-of-screen (cd)\n", progname);
  121. X!         return (FALSE);
  122. X! */        
  123. X      }
  124. X      if (_lines == -1)
  125. X          _lines = DEFAULT_LINES_ON_TERMINAL;
  126. X      if (_columns == -1)
  127. X          _columns = DEFAULT_COLUMNS_ON_TERMINAL;
  128. X!     return (TRUE);
  129. X  }
  130. X  
  131. X  void ScreenSize(num_lines, num_columns)
  132. X***************
  133. X*** 171,176 ****
  134. X--- 172,185 ----
  135. X      *num_columns = _columns;        /* assume index from one */
  136. X  }
  137. X  
  138. X+ void EndWin ()
  139. X+ {
  140. X+     if (_terminalend) {
  141. X+         tputs (_terminalend, 1, outchar);
  142. X+         fflush (stdout);
  143. X+     }
  144. X+ }
  145. X+ 
  146. X  void ClearScreen()
  147. X  {
  148. X      /* clear the screen: returns -1 if not capable */
  149. X***************
  150. X*** 202,210 ****
  151. X  
  152. X  void CleartoEOS()
  153. X  {
  154. X      /** clear to end of screen **/
  155. X  
  156. X!     tputs(_cleartoeos, 1, outchar);
  157. X      fflush(stdout);  /* clear the output buffer */
  158. X  }
  159. X  
  160. X--- 211,228 ----
  161. X  
  162. X  void CleartoEOS()
  163. X  {
  164. X+     int i;
  165. X+     
  166. X      /** clear to end of screen **/
  167. X  
  168. X!     if (_cleartoeos) {
  169. X!         tputs(_cleartoeos, 1, outchar);
  170. X!     } else {
  171. X!         for (i=_lines ; i < _lines ; i++) {
  172. X!             MoveCursor (i, 0);
  173. X!             CleartoEOLN ();
  174. X!         }
  175. X!     }
  176. X      fflush(stdout);  /* clear the output buffer */
  177. X  }
  178. X  
  179. X***************
  180. X*** 273,280 ****
  181. X  
  182. X      register int result;
  183. X      char ch;
  184. X      result = read(0, &ch, 1);
  185. X!         return((result <= 0 ) ? EOF : ch & 0x7F);
  186. X  }
  187. X  
  188. X  
  189. X--- 291,305 ----
  190. X  
  191. X      register int result;
  192. X      char ch;
  193. X+     
  194. X+ #ifdef READ_CHAR_HACK
  195. X+ #undef getc
  196. X+     ch = getc (stdin);
  197. X+     return ((ch == EOF) ? EOF : ch & 0xFF);
  198. X+ #else
  199. X      result = read(0, &ch, 1);
  200. X!         return((result <= 0 ) ? EOF : ch & 0xFF);
  201. X! #endif        
  202. X  }
  203. X  
  204. X  
  205. X***************
  206. X*** 286,289 ****
  207. X  
  208. X      putc(c, stdout);
  209. X  }
  210. X- 
  211. X--- 311,313 ----
  212. XFiles ../104/debug.c and ./debug.c are identical
  213. Xdiff -rcs ../104/feed.c ./feed.c
  214. X*** ../104/feed.c    Wed Oct  2 19:01:46 1991
  215. X--- ./feed.c    Thu Oct 10 20:11:05 1991
  216. X***************
  217. X*** 3,9 ****
  218. X   *  Module    : feed.c
  219. X   *  Author    : I.Lea
  220. X   *  Created   : 31-08-91
  221. X!  *  Updated   : 02-10-91
  222. X   *  Release   : 1.0
  223. X   *  Notes     : provides same interface to mail,pipe,print and save commands
  224. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  225. X--- 3,9 ----
  226. X   *  Module    : feed.c
  227. X   *  Author    : I.Lea
  228. X   *  Created   : 31-08-91
  229. X!  *  Updated   : 04-10-91
  230. X   *  Release   : 1.0
  231. X   *  Notes     : provides same interface to mail,pipe,print and save commands
  232. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  233. X***************
  234. X*** 16,23 ****
  235. X  #include    "tin.h"
  236. X  
  237. X  extern char *glob_group;            /* Group name */
  238. X! extern char note_h_subj[LEN];        /* Subject:    */
  239. X  extern char note_h_from[LEN];        /* From:    */
  240. X  extern FILE *note_fp;                /* the body of the current article */
  241. X  extern int note_end;                /* end of article ? */
  242. X  extern int note_page;                /* what page we're on */
  243. X--- 16,24 ----
  244. X  #include    "tin.h"
  245. X  
  246. X  extern char *glob_group;            /* Group name */
  247. X! extern char note_h_date[LEN];        /* Date:    */
  248. X  extern char note_h_from[LEN];        /* From:    */
  249. X+ extern char note_h_subj[LEN];        /* Subject:    */
  250. X  extern FILE *note_fp;                /* the body of the current article */
  251. X  extern int note_end;                /* end of article ? */
  252. X  extern int note_page;                /* what page we're on */
  253. X***************
  254. X*** 142,156 ****
  255. X                      return;
  256. X                  }
  257. X              }
  258. X-             set_real_uid_gid ();
  259. X  
  260. X              if ((fp = popen (command, "w")) == NULL) {
  261. X-                 set_tin_uid_gid ();
  262. X                  error_message (txt_command_failed_s, command);
  263. X                  return;
  264. X              }
  265. X!             set_tin_uid_gid ();
  266. X!             wait_message ("Piping...");
  267. X              Raw (FALSE);
  268. X              break;
  269. X          case FEED_PRINT:    
  270. X--- 143,154 ----
  271. X                      return;
  272. X                  }
  273. X              }
  274. X  
  275. X              if ((fp = popen (command, "w")) == NULL) {
  276. X                  error_message (txt_command_failed_s, command);
  277. X                  return;
  278. X              }
  279. X!             wait_message (txt_piping);
  280. X              Raw (FALSE);
  281. X              break;
  282. X          case FEED_PRINT:    
  283. X***************
  284. X*** 160,172 ****
  285. X              } else {
  286. X                  sprintf (command, "%s > /dev/null 2>&1", printer);
  287. X              }
  288. X-             set_real_uid_gid ();
  289. X              if ((fp = popen (command, "w")) == NULL) {
  290. X-                 set_tin_uid_gid ();
  291. X                  error_message (txt_command_failed_s, command);
  292. X                  return;
  293. X              }
  294. X-             set_tin_uid_gid ();
  295. X              break;
  296. X          case FEED_SAVE:        /* ask user for filename */
  297. X              free_save_array ();
  298. X--- 158,167 ----
  299. X***************
  300. X*** 197,203 ****
  301. X                      info_message (txt_no_filename);
  302. X                      return;
  303. X                  }
  304. X!                 if (is_mailbox = create_path (file)) {
  305. X                      if ((int) strlen (file) > 1) {
  306. X                          my_strncpy (mailbox, file+1, LEN);        
  307. X                      } else {
  308. X--- 192,199 ----
  309. X                      info_message (txt_no_filename);
  310. X                      return;
  311. X                  }
  312. X!                 is_mailbox = create_path (file);
  313. X!                 if (is_mailbox) {
  314. X                      if ((int) strlen (file) > 1) {
  315. X                          my_strncpy (mailbox, file+1, LEN);        
  316. X                      } else {
  317. X***************
  318. X*** 229,235 ****
  319. X      switch (ch) {
  320. X          case 'a':        /* article */
  321. X              if (level == GROUP_LEVEL) {
  322. X!                 open_note (arts[respnum].artnum, group_path);    
  323. X              }
  324. X              switch (function) {
  325. X                  case FEED_MAIL:
  326. X--- 225,231 ----
  327. X      switch (ch) {
  328. X          case 'a':        /* article */
  329. X              if (level == GROUP_LEVEL) {
  330. X!                 art_open (arts[respnum].artnum, group_path);    
  331. X              }
  332. X              switch (function) {
  333. X                  case FEED_MAIL:
  334. X***************
  335. X*** 245,251 ****
  336. X                          fseek(note_fp, 0L, 0);
  337. X                      } else {
  338. X                          fprintf (fp, "From: %s\n", note_h_from);
  339. X!                         fprintf (fp, "Subject: %s\n\n", note_h_subj);
  340. X                          fseek (note_fp, note_mark[0], 0);
  341. X                      }
  342. X                      copy_fp(note_fp, fp, "");
  343. X--- 241,248 ----
  344. X                          fseek(note_fp, 0L, 0);
  345. X                      } else {
  346. X                          fprintf (fp, "From: %s\n", note_h_from);
  347. X!                         fprintf (fp, "Subject: %s\n", note_h_subj);
  348. X!                         fprintf (fp, "Date: %s\n\n", note_h_date);
  349. X                          fseek (note_fp, note_mark[0], 0);
  350. X                      }
  351. X                      copy_fp(note_fp, fp, "");
  352. X***************
  353. X*** 258,264 ****
  354. X                      break;
  355. X              }
  356. X              if (level == GROUP_LEVEL) {
  357. X!                 note_cleanup ();
  358. X              }
  359. X              break;
  360. X              
  361. X--- 255,261 ----
  362. X                      break;
  363. X              }
  364. X              if (level == GROUP_LEVEL) {
  365. X!                 art_close ();
  366. X              }
  367. X              break;
  368. X              
  369. X***************
  370. X*** 265,282 ****
  371. X          case 't':         /* thread */
  372. X              for (i = (int) base[b]; i >= 0; i = arts[i].thread) {
  373. X                  if (function == FEED_PRINT) {
  374. X-                     set_real_uid_gid ();
  375. X                      if ((fp = popen (command, "w")) == NULL) {
  376. X-                         set_tin_uid_gid ();
  377. X                          error_message (txt_command_failed_s, command);
  378. X                          return;
  379. X                      }
  380. X-                     set_tin_uid_gid ();
  381. X                  }
  382. X                  if (level == PAGE_LEVEL) {
  383. X!                     note_cleanup ();
  384. X                  }
  385. X!                 open_note (arts[i].artnum, group_path);    
  386. X                  switch (function) {
  387. X                      case FEED_MAIL:
  388. X                          mail_to_someone (address);
  389. X--- 262,276 ----
  390. X          case 't':         /* thread */
  391. X              for (i = (int) base[b]; i >= 0; i = arts[i].thread) {
  392. X                  if (function == FEED_PRINT) {
  393. X                      if ((fp = popen (command, "w")) == NULL) {
  394. X                          error_message (txt_command_failed_s, command);
  395. X                          return;
  396. X                      }
  397. X                  }
  398. X                  if (level == PAGE_LEVEL) {
  399. X!                     art_close ();
  400. X                  }
  401. X!                 art_open (arts[i].artnum, group_path);    
  402. X                  switch (function) {
  403. X                      case FEED_MAIL:
  404. X                          mail_to_someone (address);
  405. X***************
  406. X*** 292,298 ****
  407. X                              fseek(note_fp, 0L, 0);
  408. X                          } else {
  409. X                              fprintf (fp, "From: %s\n", note_h_from);
  410. X!                             fprintf (fp, "Subject: %s\n\n", note_h_subj);
  411. X                              fseek (note_fp, note_mark[0], 0);
  412. X                          }
  413. X                          copy_fp(note_fp, fp, "");
  414. X--- 286,293 ----
  415. X                              fseek(note_fp, 0L, 0);
  416. X                          } else {
  417. X                              fprintf (fp, "From: %s\n", note_h_from);
  418. X!                             fprintf (fp, "Subject: %s\n", note_h_subj);
  419. X!                             fprintf (fp, "Date: %s\n\n", note_h_date);
  420. X                              fseek (note_fp, note_mark[0], 0);
  421. X                          }
  422. X                          copy_fp(note_fp, fp, "");
  423. X***************
  424. X*** 314,331 ****
  425. X                  for (j=0 ; j < top ; j++) {
  426. X                      if (arts[j].tagged && arts[j].tagged == i) { 
  427. X                          if (function == FEED_PRINT) {
  428. X-                             set_real_uid_gid ();
  429. X                              if ((fp = popen (command, "w")) == NULL) {
  430. X-                                 set_tin_uid_gid ();
  431. X                                  error_message (txt_command_failed_s, command);
  432. X                                  return;
  433. X                              }
  434. X-                             set_tin_uid_gid ();
  435. X                          }
  436. X                          if (level == PAGE_LEVEL) {
  437. X!                             note_cleanup ();
  438. X                          }
  439. X!                         open_note (arts[j].artnum, group_path);    
  440. X                          switch (function) {
  441. X                              case FEED_MAIL:
  442. X                                  mail_to_someone (address);
  443. X--- 309,323 ----
  444. X                  for (j=0 ; j < top ; j++) {
  445. X                      if (arts[j].tagged && arts[j].tagged == i) { 
  446. X                          if (function == FEED_PRINT) {
  447. X                              if ((fp = popen (command, "w")) == NULL) {
  448. X                                  error_message (txt_command_failed_s, command);
  449. X                                  return;
  450. X                              }
  451. X                          }
  452. X                          if (level == PAGE_LEVEL) {
  453. X!                             art_close ();
  454. X                          }
  455. X!                         art_open (arts[j].artnum, group_path);    
  456. X                          switch (function) {
  457. X                              case FEED_MAIL:
  458. X                                  mail_to_someone (address);
  459. X***************
  460. X*** 341,347 ****
  461. X                                      fseek(note_fp, 0L, 0);
  462. X                                  } else {
  463. X                                      fprintf (fp, "From: %s\n", note_h_from);
  464. X!                                     fprintf (fp, "Subject: %s\n\n", note_h_subj);
  465. X                                      fseek (note_fp, note_mark[0], 0);
  466. X                                  }
  467. X                                  copy_fp(note_fp, fp, "");
  468. X--- 333,340 ----
  469. X                                      fseek(note_fp, 0L, 0);
  470. X                                  } else {
  471. X                                      fprintf (fp, "From: %s\n", note_h_from);
  472. X!                                     fprintf (fp, "Subject: %s\n", note_h_subj);
  473. X!                                     fprintf (fp, "Date: %s\n\n", note_h_date);
  474. X                                      fseek (note_fp, note_mark[0], 0);
  475. X                                  }
  476. X                                  copy_fp(note_fp, fp, "");
  477. X***************
  478. X*** 367,384 ****
  479. X                  if (wildmat (arts[i].subject, pattern)) {
  480. X  #endif        
  481. X                      if (function == FEED_PRINT) {
  482. X-                         set_real_uid_gid ();
  483. X                          if ((fp = popen (command, "w")) == NULL) {
  484. X-                             set_tin_uid_gid ();
  485. X                              error_message (txt_command_failed_s, command);
  486. X                              return;
  487. X                          }
  488. X-                         set_tin_uid_gid ();
  489. X                      }
  490. X                      if (level == PAGE_LEVEL) {
  491. X!                         note_cleanup ();
  492. X                      }
  493. X!                     open_note (arts[i].artnum, group_path);    
  494. X                      switch (function) {
  495. X                          case FEED_MAIL:
  496. X                              mail_to_someone (address);
  497. X--- 360,374 ----
  498. X                  if (wildmat (arts[i].subject, pattern)) {
  499. X  #endif        
  500. X                      if (function == FEED_PRINT) {
  501. X                          if ((fp = popen (command, "w")) == NULL) {
  502. X                              error_message (txt_command_failed_s, command);
  503. X                              return;
  504. X                          }
  505. X                      }
  506. X                      if (level == PAGE_LEVEL) {
  507. X!                         art_close ();
  508. X                      }
  509. X!                     art_open (arts[i].artnum, group_path);    
  510. X                      switch (function) {
  511. X                          case FEED_MAIL:
  512. X                              mail_to_someone (address);
  513. X***************
  514. X*** 394,400 ****
  515. X                                  fseek(note_fp, 0L, 0);
  516. X                              } else {
  517. X                                  fprintf (fp, "From: %s\n", note_h_from);
  518. X!                                 fprintf (fp, "Subject: %s\n\n", note_h_subj);
  519. X                                  fseek (note_fp, note_mark[0], 0);
  520. X                              }
  521. X                              copy_fp(note_fp, fp, "");
  522. X--- 384,391 ----
  523. X                                  fseek(note_fp, 0L, 0);
  524. X                              } else {
  525. X                                  fprintf (fp, "From: %s\n", note_h_from);
  526. X!                                 fprintf (fp, "Subject: %s\n", note_h_subj);
  527. X!                                 fprintf (fp, "Date: %s\n\n", note_h_date);
  528. X                                  fseek (note_fp, note_mark[0], 0);
  529. X                              }
  530. X                              copy_fp(note_fp, fp, "");
  531. X***************
  532. X*** 413,418 ****
  533. X--- 404,411 ----
  534. X              break;
  535. X      }
  536. X  
  537. X+     redraw_screen = mail_check ();    /* in case of sending to oneself */
  538. X+ 
  539. X      switch (function) {
  540. X          case FEED_PIPE:
  541. X              pclose (fp);        
  542. X***************
  543. X*** 422,428 ****
  544. X              break;
  545. X          case FEED_PRINT:    
  546. X              info_message (txt_printed);
  547. X-             redraw_screen = mail_check ();    /* in case of sending to oneself */
  548. X              break;
  549. X          case FEED_SAVE:
  550. X              if (level == GROUP_LEVEL) {
  551. X--- 415,420 ----
  552. X***************
  553. X*** 440,446 ****
  554. X  
  555. X      if (level == PAGE_LEVEL) {
  556. X          if (ch != 'a') {
  557. X!             open_note (arts[respnum].artnum, group_path);
  558. X          }
  559. X          note_end = orig_note_end;
  560. X          note_page = orig_note_page;
  561. X--- 432,438 ----
  562. X  
  563. X      if (level == PAGE_LEVEL) {
  564. X          if (ch != 'a') {
  565. X!             art_open (arts[respnum].artnum, group_path);
  566. X          }
  567. X          note_end = orig_note_end;
  568. X          note_page = orig_note_page;
  569. X***************
  570. X*** 452,458 ****
  571. X                  redraw_page (respnum, glob_group);
  572. X              }
  573. X          } else {
  574. X!             clear_message ();
  575. X          }
  576. X      } else {
  577. X          if (redraw_screen) {
  578. X--- 444,452 ----
  579. X                  redraw_page (respnum, glob_group);
  580. X              }
  581. X          } else {
  582. X!             if (function != FEED_PRINT) {
  583. X!                 clear_message ();
  584. X!             }
  585. X          }
  586. X      } else {
  587. X          if (redraw_screen) {
  588. Xdiff -rcs ../104/group.c ./group.c
  589. X*** ../104/group.c    Wed Oct  2 19:34:20 1991
  590. X--- ./group.c    Wed Oct 16 20:00:23 1991
  591. X***************
  592. X*** 3,9 ****
  593. X   *  Module    : group.c
  594. X   *  Author    : R.Skrenta / I.Lea
  595. X   *  Created   : 01-04-91
  596. X!  *  Updated   : 28-09-91
  597. X   *  Release   : 1.0
  598. X   *  Notes     :
  599. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  600. X--- 3,9 ----
  601. X   *  Module    : group.c
  602. X   *  Author    : R.Skrenta / I.Lea
  603. X   *  Created   : 01-04-91
  604. X!  *  Updated   : 16-10-91
  605. X   *  Release   : 1.0
  606. X   *  Notes     :
  607. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  608. X***************
  609. X*** 109,116 ****
  610. X--- 109,118 ----
  611. X  
  612. X              case '|':    /* pipe article/thread/tagged arts to command */
  613. X                  if (index_point >= 0) {
  614. X+                     set_real_uid_gid ();
  615. X                      feed_articles (FEED_PIPE, GROUP_LEVEL, "Pipe",
  616. X                          (int) base[index_point], group_path);
  617. X+                     set_tin_uid_gid ();
  618. X                  }
  619. X                  break;
  620. X  
  621. X***************
  622. X*** 173,182 ****
  623. X--- 175,186 ----
  624. X  
  625. X                  case 'G':        /* ansi  PgDn */
  626. X                  case 'U':        /* at386 PgDn */
  627. X+                 case 'T':        /* 97801 PgDn */
  628. X                      goto group_page_down;
  629. X  
  630. X                  case 'I':        /* ansi  PgUp */
  631. X                  case 'V':        /* at386 PgUp */
  632. X+                 case 'S':        /* 97801 PgUp */
  633. X                  case 'v':        /* emacs style */
  634. X                      goto group_page_up;
  635. X  
  636. X***************
  637. X*** 407,414 ****
  638. X--- 411,420 ----
  639. X  
  640. X              case 'm':    /* mail article to somebody */
  641. X                  if (index_point >= 0) {
  642. X+                     set_real_uid_gid ();
  643. X                      feed_articles (FEED_MAIL, GROUP_LEVEL, "Mail",
  644. X                          (int) base[index_point], group_path);
  645. X+                     set_tin_uid_gid ();
  646. X                  }
  647. X                  break;
  648. X  
  649. X***************
  650. X*** 460,467 ****
  651. X--- 466,475 ----
  652. X  
  653. X              case 'o':    /* output art/thread/tagged arts to printer */
  654. X                  if (index_point >= 0) {
  655. X+                     set_real_uid_gid ();
  656. X                      feed_articles (FEED_PRINT, GROUP_LEVEL, "Print",
  657. X                          (int) base[index_point], group_path);
  658. X+                     set_tin_uid_gid ();
  659. X                  }
  660. X                  break;
  661. X  
  662. X***************
  663. X*** 504,511 ****
  664. X--- 512,521 ----
  665. X  
  666. X              case 's':    /* save regex pattern to file/s */
  667. X                  if (index_point >= 0) {
  668. X+                     set_real_uid_gid ();
  669. X                      feed_articles (FEED_SAVE, GROUP_LEVEL, "Save",
  670. X                          (int) base[index_point], group_path);
  671. X+                     set_tin_uid_gid ();
  672. X                  }
  673. X                  break;
  674. X              
  675. X***************
  676. X*** 526,531 ****
  677. X--- 536,542 ----
  678. X                          info_message (txt_tagged_art);
  679. X                      }
  680. X                      mark_screen (SCREEN_READ_UNREAD, msg);
  681. X+                     goto group_down;    /* advance an article */
  682. X                  }
  683. X                  break;
  684. X  
  685. X***************
  686. X*** 541,546 ****
  687. X--- 552,563 ----
  688. X                  break;
  689. X  
  690. X              case 'w':    /* post a basenote */
  691. X+ #ifdef USE_NNTP
  692. X+                 if (! can_post) {
  693. X+                     info_message (txt_cannot_post);
  694. X+                     break;
  695. X+                 }
  696. X+ #endif
  697. X                  if (post_base (group)) {
  698. X                      update_newsrc (group, my_group[cur_groupnum], FALSE);
  699. X                      index_group (group, group_path);
  700. X***************
  701. X*** 664,670 ****
  702. X      }
  703. X      center_line (0, TRUE, buf);
  704. X  
  705. X!     if (col = (COLS - (int) strlen (txt_type_h_for_help))+1) {
  706. X          MoveCursor (0, 0);
  707. X          if (kill_articles) {        /* display KILL on screen */
  708. X              printf ("KILL ON");
  709. X--- 681,688 ----
  710. X      }
  711. X      center_line (0, TRUE, buf);
  712. X  
  713. X!     col = (COLS - (int) strlen (txt_type_h_for_help))+1;
  714. X!     if (col) {
  715. X          MoveCursor (0, 0);
  716. X          if (kill_articles) {        /* display KILL on screen */
  717. X              printf ("KILL ON");
  718. Xdiff -rcs ../104/hashstr.c ./hashstr.c
  719. X*** ../104/hashstr.c    Mon Sep 30 19:24:24 1991
  720. X--- ./hashstr.c    Tue Oct  8 19:08:31 1991
  721. X***************
  722. X*** 3,9 ****
  723. X   *  Module    : hashstr.c
  724. X   *  Author    : R.Skrenta
  725. X   *  Created   : 01-04-91
  726. X!  *  Updated   : 05-09-91
  727. X   *  Release   : 1.0
  728. X   *  Notes     :
  729. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta
  730. X--- 3,9 ----
  731. X   *  Module    : hashstr.c
  732. X   *  Author    : R.Skrenta
  733. X   *  Created   : 01-04-91
  734. X!  *  Updated   : 09-10-91
  735. X   *  Release   : 1.0
  736. X   *  Notes     :
  737. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta
  738. X***************
  739. X*** 13,26 ****
  740. X   *              right notice, and it must be included in any copy made
  741. X   */
  742. X  
  743. X! #include    <stdio.h>
  744. X! #ifdef BSD
  745. X! #include    <strings.h>
  746. X! #else
  747. X! #include    <string.h>
  748. X! #include    <malloc.h>
  749. X! #endif
  750. X! #include    "proto.h"
  751. X  
  752. X  /*
  753. X   *  Maintain a table of all strings we have seen.
  754. X--- 13,19 ----
  755. X   *              right notice, and it must be included in any copy made
  756. X   */
  757. X  
  758. X! #include    "tin.h"
  759. X  
  760. X  /*
  761. X   *  Maintain a table of all strings we have seen.
  762. X***************
  763. X*** 40,58 ****
  764. X   *  Arbitrary table size, but make sure it's prime!
  765. X   */
  766. X  
  767. X! /* #define        TABLE_SIZE    1409    */
  768. X  
  769. X! #define        TABLE_SIZE    2411
  770. X  
  771. X  
  772. X- struct hashnode {
  773. X-     char *s;            /* the string we're saving */
  774. X-     struct hashnode *next;        /* chain for spillover */
  775. X- };
  776. X- 
  777. X- struct hashnode *table[TABLE_SIZE];
  778. X- 
  779. X- 
  780. X  char *hash_str (s)
  781. X      char *s;
  782. X  {
  783. X--- 33,43 ----
  784. X   *  Arbitrary table size, but make sure it's prime!
  785. X   */
  786. X  
  787. X! #define        HASHNODE_TABLE_SIZE    2411
  788. X  
  789. X! struct hashnode *table[HASHNODE_TABLE_SIZE];
  790. X  
  791. X  
  792. X  char *hash_str (s)
  793. X      char *s;
  794. X  {
  795. X***************
  796. X*** 68,74 ****
  797. X  
  798. X          h = *t++;
  799. X          while (*t)
  800. X!             h = ((h << 1) ^ *t++) % (long) TABLE_SIZE;
  801. X      }
  802. X  
  803. X      p = table[h];
  804. X--- 53,59 ----
  805. X  
  806. X          h = *t++;
  807. X          while (*t)
  808. X!             h = ((h << 1) ^ *t++) % (long) HASHNODE_TABLE_SIZE;
  809. X      }
  810. X  
  811. X      p = table[h];
  812. X***************
  813. X*** 114,120 ****
  814. X  {
  815. X      int i;
  816. X  
  817. X!     for (i = 0; i < TABLE_SIZE; i++) {
  818. X          table[i] = (struct hashnode *) 0;
  819. X      }
  820. X  }
  821. X--- 99,105 ----
  822. X  {
  823. X      int i;
  824. X  
  825. X!     for (i = 0; i < HASHNODE_TABLE_SIZE; i++) {
  826. X          table[i] = (struct hashnode *) 0;
  827. X      }
  828. X  }
  829. X***************
  830. X*** 126,132 ****
  831. X      struct hashnode *p, *next;
  832. X      int *iptr;
  833. X  
  834. X!     for (i = 0; i < TABLE_SIZE; i++)
  835. X          if (table[i] != (struct hashnode *) 0) {
  836. X              p = table[i];
  837. X              while (p != (struct hashnode *) 0) {
  838. X--- 111,117 ----
  839. X      struct hashnode *p, *next;
  840. X      int *iptr;
  841. X  
  842. X!     for (i = 0; i < HASHNODE_TABLE_SIZE; i++)
  843. X          if (table[i] != (struct hashnode *) 0) {
  844. X              p = table[i];
  845. X              while (p != (struct hashnode *) 0) {
  846. Xdiff -rcs ../104/help.c ./help.c
  847. X*** ../104/help.c    Mon Sep 30 20:43:04 1991
  848. X--- ./help.c    Tue Oct  8 14:56:02 1991
  849. X***************
  850. X*** 198,207 ****
  851. X                  if (ch == '[' || ch == 'O')
  852. X                      ch = ReadCh();
  853. X                  switch (ch) {
  854. X!                     case 'B':        /* page down */
  855. X                      case 'C':
  856. X!                     case 'G':        /* ansi  */
  857. X!                     case 'U':        /* at386 */
  858. X                          if (cur_page < max_page) {
  859. X                              pos_help = cur_page*NOTESLINES;
  860. X                              cur_page++;
  861. X--- 198,208 ----
  862. X                  if (ch == '[' || ch == 'O')
  863. X                      ch = ReadCh();
  864. X                  switch (ch) {
  865. X!                     case 'B':        /* PgDn */
  866. X                      case 'C':
  867. X!                     case 'G':        /* ansi  PgDn */
  868. X!                     case 'U':        /* at386 PgDn */
  869. X!                     case 'T':        /* at386 PgDn */
  870. X                          if (cur_page < max_page) {
  871. X                              pos_help = cur_page*NOTESLINES;
  872. X                              cur_page++;
  873. X***************
  874. X*** 208,218 ****
  875. X                          }
  876. X                          break;
  877. X  
  878. X!                     case 'A':        /* page up */
  879. X                      case 'D':
  880. X                      case 'i':
  881. X!                     case 'I':        /* ansi  */
  882. X!                     case 'V':        /* at386 */
  883. X                          if (cur_page > 1) {
  884. X                              cur_page--;
  885. X                              pos_help = (cur_page-1)*NOTESLINES;
  886. X--- 209,220 ----
  887. X                          }
  888. X                          break;
  889. X  
  890. X!                     case 'A':        /* PgUp */
  891. X                      case 'D':
  892. X                      case 'i':
  893. X!                     case 'I':        /* ansi  PgUp */
  894. X!                     case 'V':        /* at386 PgUp */
  895. X!                     case 'S':        /* 97801 PgUp */
  896. X                          if (cur_page > 1) {
  897. X                              cur_page--;
  898. X                              pos_help = (cur_page-1)*NOTESLINES;
  899. Xdiff -rcs ../104/kill.c ./kill.c
  900. X*** ../104/kill.c    Mon Sep 30 20:37:10 1991
  901. X--- ./kill.c    Thu Oct 10 20:11:20 1991
  902. X***************
  903. X*** 392,398 ****
  904. X              return (killed);
  905. X          }
  906. X          if (debug && ! update) {
  907. X!             wait_message ("Killing articles...");
  908. X          }
  909. X          for (i=0 ; i < top ; i++) {
  910. X              for (j=0 ; j < kill_num && ! arts[i].tagged ; j++) {
  911. X--- 392,398 ----
  912. X              return (killed);
  913. X          }
  914. X          if (debug && ! update) {
  915. X!             wait_message (txt_killing_arts);
  916. X          }
  917. X          for (i=0 ; i < top ; i++) {
  918. X              for (j=0 ; j < kill_num && ! arts[i].tagged ; j++) {
  919. Xdiff -rcs ../104/lang.c ./lang.c
  920. X*** ../104/lang.c    Mon Sep 30 19:33:00 1991
  921. X--- ./lang.c    Thu Oct 10 20:27:06 1991
  922. X***************
  923. X*** 3,9 ****
  924. X   *  Module    : lang.c
  925. X   *  Author    : R.Skrenta / I.Lea
  926. X   *  Created   : 01-04-91
  927. X!  *  Updated   : 30-09-91
  928. X   *  Release   : 1.0
  929. X   *  Notes     :
  930. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  931. X--- 3,9 ----
  932. X   *  Module    : lang.c
  933. X   *  Author    : R.Skrenta / I.Lea
  934. X   *  Created   : 01-04-91
  935. X!  *  Updated   : 10-10-91
  936. X   *  Release   : 1.0
  937. X   *  Notes     :
  938. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  939. X***************
  940. X*** 21,31 ****
  941. X   *  art.c
  942. X   */
  943. X  
  944. X! char txt_group[] = "Group %s...    ";
  945. X  char txt_cannot_open_art[] = "can't open article %s: ";
  946. X  char txt_indexing[] = "Indexing...";
  947. X  char txt_indexing_num[] = "Indexing...%4d";
  948. X  char txt_corrupt_index[] = "Index file %s corrupted. error %d on article %d";
  949. X  
  950. X  /*
  951. X   *  feed.c
  952. X--- 21,35 ----
  953. X   *  art.c
  954. X   */
  955. X  
  956. X! char txt_group[] = "Group %s...";
  957. X  char txt_cannot_open_art[] = "can't open article %s: ";
  958. X  char txt_indexing[] = "Indexing...";
  959. X  char txt_indexing_num[] = "Indexing...%4d";
  960. X  char txt_corrupt_index[] = "Index file %s corrupted. error %d on article %d";
  961. X+ char txt_checking_for_news[] = "Checking for news...";
  962. X+ char txt_there_is_no_news[] = "There is no news\n";
  963. X+ char txt_killing_arts[] = "Killing articles...";
  964. X+ char txt_unkilling_arts[] = "Unkilling articles...";
  965. X  
  966. X  /*
  967. X   *  feed.c
  968. X***************
  969. X*** 39,49 ****
  970. X--- 43,55 ----
  971. X  char txt_feed_pattern[] = "Enter regex pattern [%s]> ";
  972. X  #endif
  973. X  char txt_no_command[] = "No command";
  974. X+ char txt_piping[] = "Piping...";
  975. X  
  976. X  /*
  977. X   *  group.c
  978. X   */
  979. X  
  980. X+ char txt_cannot_post[] = "*** Posting not allowed ***";
  981. X  char txt_tagged_art[] = "tagged article";
  982. X  char txt_untagged_art[] = "untagged article";
  983. X  char txt_inverse_on[] = "Inverse video enabled";
  984. X***************
  985. X*** 92,99 ****
  986. X  char txt_help_I[] = "I        Toggle inverse video\r\n";
  987. X  char txt_help_K[] = "K        Mark article/thread as read & goto next unread\r\n";
  988. X  char txt_help_j[] = "jk       Down (k=up) a line\r\n";
  989. X! char txt_help_i_n[] = "nN       Goto next (N=next unread) group\r\n";
  990. X! char txt_help_i_p[] = "pP       Goto previous (P=previous unread) group\r\n";
  991. X  char txt_help_q[] = "q        Quit\r\n";
  992. X  char txt_help_s[] = "su       Subscribe (u=unsubscribe) to current group\r\n";
  993. X  char txt_help_S[] = "SU       Subscribe (U=unsubscribe) to groups that match pattern\r\n";
  994. X--- 98,105 ----
  995. X  char txt_help_I[] = "I        Toggle inverse video\r\n";
  996. X  char txt_help_K[] = "K        Mark article/thread as read & goto next unread\r\n";
  997. X  char txt_help_j[] = "jk       Down (k=up) a line\r\n";
  998. X! char txt_help_i_n[] = "np       Goto next (p=previous) group\r\n";
  999. X! char txt_help_i_p[] = "NP       Goto next (P=previous) unread article\r\n";
  1000. X  char txt_help_q[] = "q        Quit\r\n";
  1001. X  char txt_help_s[] = "su       Subscribe (u=unsubscribe) to current group\r\n";
  1002. X  char txt_help_S[] = "SU       Subscribe (U=unsubscribe) to groups that match pattern\r\n";
  1003. X***************
  1004. X*** 147,153 ****
  1005. X   */
  1006. X  
  1007. X  char txt_not_in_active_file[] = "Group %s not found in active file";
  1008. X! char txt_screen_init_failed[] = "Screen initialization failed";
  1009. X  char txt_bad_active_file[] = "Active file corrupt";
  1010. X  
  1011. X  /*
  1012. X--- 153,159 ----
  1013. X   */
  1014. X  
  1015. X  char txt_not_in_active_file[] = "Group %s not found in active file";
  1016. X! char txt_screen_init_failed[] = "%s: Screen initialization failed";
  1017. X  char txt_bad_active_file[] = "Active file corrupt";
  1018. X  
  1019. X  /*
  1020. X***************
  1021. X*** 252,257 ****
  1022. X--- 258,267 ----
  1023. X   */
  1024. X  
  1025. X  char txt_no_arts_posted[] = "No articles have been posted";
  1026. X+ char txt_post_an_article[] = "Post an article...";
  1027. X+ char txt_post_a_followup[] = "Post a followup...";
  1028. X+ char txt_mail_bug_report[] = "Mail bug report...";
  1029. X+ char txt_reply_to_author[] = "Reply to author...";
  1030. X  
  1031. X  /*
  1032. X   *  prompt.c
  1033. X***************
  1034. X*** 312,317 ****
  1035. X--- 322,328 ----
  1036. X  char txt_post_processing[] = "Post processing...";
  1037. X  char txt_post_processing_finished[] = "-- post processing completed --";
  1038. X  char txt_deleting[] = "Deleting...";
  1039. X+ char txt_uudecoding[] = "Uudecoding...";
  1040. X  
  1041. X  /*
  1042. X   *  search.c
  1043. X***************
  1044. X*** 351,357 ****
  1045. X  char txt_select_group[] = "Select group> ";
  1046. X  char txt_help_g_4[] = "4$       Select group 4 ($=select last group)\r\n";
  1047. X  char txt_help_g_ctrl_r[] = "^R       Reset .newsrc\r\n";
  1048. X! char txt_help_g_ctrl_k[] = "^KZ     Delete (Z=undelete) group from .newsrc\r\n";
  1049. X  char txt_help_g_cr[] = "<CR>     Read current group\r\n";
  1050. X  char txt_help_g_tab[] = "<TAB>    View next unread group\r\n";
  1051. X  char txt_help_g_c[] = "c        Mark group as all read\r\n";
  1052. X--- 362,368 ----
  1053. X  char txt_select_group[] = "Select group> ";
  1054. X  char txt_help_g_4[] = "4$       Select group 4 ($=select last group)\r\n";
  1055. X  char txt_help_g_ctrl_r[] = "^R       Reset .newsrc\r\n";
  1056. X! char txt_help_g_ctrl_k[] = "^KZ      Delete (Z=undelete) group from .newsrc\r\n";
  1057. X  char txt_help_g_cr[] = "<CR>     Read current group\r\n";
  1058. X  char txt_help_g_tab[] = "<TAB>    View next unread group\r\n";
  1059. X  char txt_help_g_c[] = "c        Mark group as all read\r\n";
  1060. Xdiff -rcs ../104/lang.h ./lang.h
  1061. X*** ../104/lang.h    Mon Sep 30 19:24:25 1991
  1062. X--- ./lang.h    Thu Oct 10 20:27:16 1991
  1063. X***************
  1064. X*** 3,9 ****
  1065. X   *  Module    : lang.h
  1066. X   *  Author    : I.Lea
  1067. X   *  Created   : 01-04-91
  1068. X!  *  Updated   : 30-09-91
  1069. X   *  Release   : 1.0
  1070. X   *  Notes     :
  1071. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  1072. X--- 3,9 ----
  1073. X   *  Module    : lang.h
  1074. X   *  Author    : I.Lea
  1075. X   *  Created   : 01-04-91
  1076. X!  *  Updated   : 10-10-91
  1077. X   *  Release   : 1.0
  1078. X   *  Notes     :
  1079. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  1080. X***************
  1081. X*** 22,27 ****
  1082. X--- 22,31 ----
  1083. X  extern char txt_indexing[];
  1084. X  extern char txt_indexing_num[];
  1085. X  extern char txt_corrupt_index[];
  1086. X+ extern char txt_checking_for_news[];
  1087. X+ extern char txt_there_is_no_news[];
  1088. X+ extern char txt_killing_arts[];
  1089. X+ extern char txt_unkilling_arts[];
  1090. X  
  1091. X  /*
  1092. X   *  feed.c
  1093. X***************
  1094. X*** 31,41 ****
  1095. X--- 35,47 ----
  1096. X  extern char txt_post_procees_type[];
  1097. X  extern char txt_feed_pattern[];
  1098. X  extern char txt_no_command[];
  1099. X+ extern char txt_piping[];
  1100. X  
  1101. X  /*
  1102. X   *  group.c
  1103. X   */
  1104. X  
  1105. X+ extern char txt_cannot_post[];
  1106. X  extern char txt_tagged_art[];
  1107. X  extern char txt_untagged_art[];
  1108. X  extern char txt_inverse_on[];
  1109. X***************
  1110. X*** 245,250 ****
  1111. X--- 251,260 ----
  1112. X   */
  1113. X  
  1114. X  extern char txt_no_arts_posted[];
  1115. X+ extern char txt_post_an_article[];
  1116. X+ extern char txt_post_a_followup[];
  1117. X+ extern char txt_mail_bug_report[];
  1118. X+ extern char txt_reply_to_author[];
  1119. X  
  1120. X  /*
  1121. X   *  rcfile.c
  1122. X***************
  1123. X*** 300,305 ****
  1124. X--- 310,316 ----
  1125. X  extern char txt_post_processing[];
  1126. X  extern char txt_post_processing_finished[];
  1127. X  extern char txt_deleting[];
  1128. X+ extern char txt_uudecoding[];
  1129. X  
  1130. X  /*
  1131. X   *  search.c
  1132. Xdiff -rcs ../104/main.c ./main.c
  1133. X*** ../104/main.c    Wed Oct  2 09:50:17 1991
  1134. X--- ./main.c    Thu Oct 10 21:00:35 1991
  1135. X***************
  1136. X*** 3,9 ****
  1137. X   *  Module    : main.c
  1138. X   *  Author    : R.Skrenta / I.Lea
  1139. X   *  Created   : 01-04-91
  1140. X!  *  Updated   : 02-10-91
  1141. X   *  Release   : 1.0
  1142. X   *  Notes     :
  1143. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1144. X--- 3,9 ----
  1145. X   *  Module    : main.c
  1146. X   *  Author    : R.Skrenta / I.Lea
  1147. X   *  Created   : 01-04-91
  1148. X!  *  Updated   : 04-10-91
  1149. X   *  Release   : 1.0
  1150. X   *  Notes     :
  1151. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1152. X***************
  1153. X*** 259,266 ****
  1154. X--- 259,268 ----
  1155. X              catchup = FALSE;            /* turn off msgs when running forked */ 
  1156. X              verbose = FALSE;
  1157. X              if (fork () == 0) {            /* fork child to update indexes in background */
  1158. X+                 nntp_startup ();        /* connect server if we are using nntp */
  1159. X                  thread_arts = FALSE;    /* stop threading to run faster */
  1160. X                  do_update ();
  1161. X+                 nntp_finish ();            /* connect server if we are using nntp */
  1162. X                  exit (0);
  1163. X              }
  1164. X              update = FALSE;
  1165. X***************
  1166. X*** 272,278 ****
  1167. X      }
  1168. X  
  1169. X      if (! InitScreen ()) {
  1170. X!         error_message (txt_screen_init_failed, "");
  1171. X          exit (1);
  1172. X      }
  1173. X  
  1174. X--- 274,280 ----
  1175. X      }
  1176. X  
  1177. X      if (! InitScreen ()) {
  1178. X!         error_message (txt_screen_init_failed, progname);
  1179. X          exit (1);
  1180. X      }
  1181. X  
  1182. X***************
  1183. X*** 285,291 ****
  1184. X          notify_groups ();
  1185. X      }
  1186. X       
  1187. X!     signal (SIGINT, signal_handler);    /* catch ctrl-C */
  1188. X  
  1189. X      selection_index (start_groupnum);
  1190. X  
  1191. X--- 287,295 ----
  1192. X          notify_groups ();
  1193. X      }
  1194. X       
  1195. X! #ifdef READ_CHAR_HACK
  1196. X!     setbuf (stdin, 0);
  1197. X! #endif
  1198. X  
  1199. X      selection_index (start_groupnum);
  1200. X  
  1201. XFiles ../104/memory.c and ./memory.c are identical
  1202. Xdiff -rcs ../104/misc.c ./misc.c
  1203. X*** ../104/misc.c    Wed Oct  2 18:43:09 1991
  1204. X--- ./misc.c    Tue Oct 15 09:40:50 1991
  1205. X***************
  1206. X*** 3,9 ****
  1207. X   *  Module    : misc.c
  1208. X   *  Author    : R.Skrenta / I.Lea
  1209. X   *  Created   : 01-04-91
  1210. X!  *  Updated   : 02-10-91
  1211. X   *  Release   : 1.0
  1212. X   *  Notes     :
  1213. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1214. X--- 3,9 ----
  1215. X   *  Module    : misc.c
  1216. X   *  Author    : R.Skrenta / I.Lea
  1217. X   *  Created   : 01-04-91
  1218. X!  *  Updated   : 15-10-91
  1219. X   *  Release   : 1.0
  1220. X   *  Notes     :
  1221. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1222. X***************
  1223. X*** 75,89 ****
  1224. X  
  1225. X  void init_selfinfo ()
  1226. X  {
  1227. X      char nam[LEN];
  1228. X      char *p;
  1229. X-     extern char *getenv();
  1230. X-     extern struct passwd *getpwuid();
  1231. X      FILE *fp;
  1232. X      struct passwd *myentry;
  1233. X      struct stat sb;
  1234. X  
  1235. X!     myentry = getpwuid (getuid ());
  1236. X      strcpy (userid, myentry->pw_name);
  1237. X  
  1238. X      if ((p = getenv("HOME")) != NULL) {
  1239. X--- 75,96 ----
  1240. X  
  1241. X  void init_selfinfo ()
  1242. X  {
  1243. X+     extern char *getenv ();
  1244. X+     extern char *getlogin ();
  1245. X+     extern struct passwd *getpwuid ();
  1246. X+     extern struct passwd *getpwnam ();
  1247. X      char nam[LEN];
  1248. X      char *p;
  1249. X      FILE *fp;
  1250. X      struct passwd *myentry;
  1251. X      struct stat sb;
  1252. X  
  1253. X!     if ((p = getlogin ()) != (char *) 0) {
  1254. X!         myentry = getpwnam (p);
  1255. X!     } else {
  1256. X!         myentry = getpwuid (getuid ());
  1257. X!     }
  1258. X! 
  1259. X      strcpy (userid, myentry->pw_name);
  1260. X  
  1261. X      if ((p = getenv("HOME")) != NULL) {
  1262. X***************
  1263. X*** 446,452 ****
  1264. X      static int first = TRUE;
  1265. X  
  1266. X      if (first) {
  1267. X!         strcpy (editor, get_val ("EDITOR", DEFAULT_EDITOR));
  1268. X          first = FALSE;
  1269. X      }
  1270. X  
  1271. X--- 453,461 ----
  1272. X      static int first = TRUE;
  1273. X  
  1274. X      if (first) {
  1275. X!         char *my_editor = getenv ("VISUAL");
  1276. X! 
  1277. X!         strcpy (editor, my_editor != NULL ? my_editor : get_val ("EDITOR", DEFAULT_EDITOR));
  1278. X          first = FALSE;
  1279. X      }
  1280. X  
  1281. X***************
  1282. X*** 562,567 ****
  1283. X--- 571,577 ----
  1284. X      nntp_finish ();            /* disconnect from NNTP server */
  1285. X      free_all_arrays ();        /* deallocate all arrays */
  1286. X      ClearScreen ();
  1287. X+     EndWin ();
  1288. X      Raw (FALSE);
  1289. X      exit (ret);
  1290. X  }
  1291. X***************
  1292. X*** 586,591 ****
  1293. X--- 596,602 ----
  1294. X                  active_file, progname);
  1295. X          } else {
  1296. X              printf (txt_cannot_open, active_file);
  1297. X+             putchar ('\n');
  1298. X          }
  1299. X          fflush (stdout);
  1300. X          exit (1);
  1301. X***************
  1302. X*** 882,888 ****
  1303. X  
  1304. X  void set_real_uid_gid ()
  1305. X  {
  1306. X! #ifdef BSD
  1307. X      if (seteuid (real_uid) == -1) {
  1308. X          error_message ("Error seteuid(real) failed", (char *) 0);
  1309. X      }
  1310. X--- 893,899 ----
  1311. X  
  1312. X  void set_real_uid_gid ()
  1313. X  {
  1314. X! #if defined(BSD) && ! defined(SINIX)
  1315. X      if (seteuid (real_uid) == -1) {
  1316. X          error_message ("Error seteuid(real) failed", (char *) 0);
  1317. X      }
  1318. X***************
  1319. X*** 902,908 ****
  1320. X  
  1321. X  void set_tin_uid_gid ()
  1322. X  {
  1323. X! #ifdef BSD
  1324. X      if (seteuid (tin_uid) == -1) {
  1325. X          error_message ("Error seteuid(tin) failed", (char *) 0);
  1326. X      }
  1327. X--- 913,919 ----
  1328. X  
  1329. X  void set_tin_uid_gid ()
  1330. X  {
  1331. X! #if defined(BSD) && ! defined(SINIX)
  1332. X      if (seteuid (tin_uid) == -1) {
  1333. X          error_message ("Error seteuid(tin) failed", (char *) 0);
  1334. X      }
  1335. XFiles ../104/newsrc.c and ./newsrc.c are identical
  1336. XFiles ../104/nntp.h and ./nntp.h are identical
  1337. Xdiff -rcs ../104/open.c ./open.c
  1338. X*** ../104/open.c    Wed Oct  2 09:38:15 1991
  1339. X--- ./open.c    Tue Oct  8 20:14:41 1991
  1340. X***************
  1341. X*** 15,27 ****
  1342. X  
  1343. X  #include    "tin.h"
  1344. X  #ifdef USE_NNTP
  1345. X! #include    "nntp.h"
  1346. X  #endif
  1347. X  
  1348. X  /* Hopefully one of these is right for you. */
  1349. X  
  1350. X  #ifdef BSD
  1351. X! #    include <sys/dir.h>
  1352. X  #    define        DIR_BUF        struct direct
  1353. X  #    define        D_LENGTH    d_namlen
  1354. X  #endif
  1355. X--- 15,31 ----
  1356. X  
  1357. X  #include    "tin.h"
  1358. X  #ifdef USE_NNTP
  1359. X! #    include    "nntp.h"
  1360. X  #endif
  1361. X  
  1362. X  /* Hopefully one of these is right for you. */
  1363. X  
  1364. X  #ifdef BSD
  1365. X! #    ifdef SINIX
  1366. X! #        include <dir.h>
  1367. X! #    else
  1368. X! #        include <sys/dir.h>
  1369. X! #    endif
  1370. X  #    define        DIR_BUF        struct direct
  1371. X  #    define        D_LENGTH    d_namlen
  1372. X  #endif
  1373. X***************
  1374. X*** 31,41 ****
  1375. X  #    define        D_LENGTH    d_namlen
  1376. X  #endif
  1377. X  #ifndef DIR_BUF
  1378. X! #ifdef sorix960
  1379. X! #    include    <sys/dirent.h>
  1380. X! #else
  1381. X! #    include    <dirent.h>
  1382. X! #endif
  1383. X  #    define        DIR_BUF        struct dirent
  1384. X  #    define        D_LENGTH    d_reclen
  1385. X  #endif
  1386. X--- 35,45 ----
  1387. X  #    define        D_LENGTH    d_namlen
  1388. X  #endif
  1389. X  #ifndef DIR_BUF
  1390. X! #    ifdef sorix960
  1391. X! #        include    <sys/dirent.h>
  1392. X! #    else
  1393. X! #        include    <dirent.h>
  1394. X! #    endif
  1395. X  #    define        DIR_BUF        struct dirent
  1396. X  #    define        D_LENGTH    d_reclen
  1397. X  #endif
  1398. X***************
  1399. X*** 46,51 ****
  1400. X--- 50,59 ----
  1401. X  int compiled_with_nntp = FALSE;
  1402. X  #endif
  1403. X  
  1404. X+ #ifdef USE_NNTP
  1405. X+ int    can_post = TRUE;
  1406. X+ #endif
  1407. X+ 
  1408. X  char server_name[LEN];
  1409. X  
  1410. X  
  1411. X***************
  1412. X*** 104,110 ****
  1413. X--- 112,122 ----
  1414. X  */        
  1415. X          switch (ret) {
  1416. X          case OK_CANPOST:
  1417. X+             can_post = TRUE;
  1418. X+             break;
  1419. X+ 
  1420. X          case OK_NOPOST:
  1421. X+             can_post = FALSE;
  1422. X              break;    
  1423. X  
  1424. X          case -1:
  1425. X***************
  1426. X*** 120,136 ****
  1427. X  }
  1428. X  
  1429. X  
  1430. X! void nntp_finish()
  1431. X  {
  1432. X  #ifdef USE_NNTP
  1433. X      if (read_news_via_nntp) {
  1434. X!         close_server();
  1435. X      }
  1436. X  #endif    
  1437. X  }
  1438. X  
  1439. X  
  1440. X! FILE *open_active_fp()
  1441. X  {
  1442. X      if (read_news_via_nntp) {
  1443. X  #ifdef USE_NNTP
  1444. X--- 132,148 ----
  1445. X  }
  1446. X  
  1447. X  
  1448. X! void nntp_finish ()
  1449. X  {
  1450. X  #ifdef USE_NNTP
  1451. X      if (read_news_via_nntp) {
  1452. X!         close_server ();
  1453. X      }
  1454. X  #endif    
  1455. X  }
  1456. X  
  1457. X  
  1458. X! FILE *open_active_fp ()
  1459. X  {
  1460. X      if (read_news_via_nntp) {
  1461. X  #ifdef USE_NNTP
  1462. X***************
  1463. X*** 354,359 ****
  1464. X--- 366,373 ----
  1465. X      else
  1466. X          note_size = sb.st_size;
  1467. X  
  1468. X+     return TRUE;
  1469. X+ #else
  1470. X      return TRUE;
  1471. X  #endif
  1472. X  }
  1473. Xdiff -rcs ../104/page.c ./page.c
  1474. X*** ../104/page.c    Mon Sep 30 20:43:13 1991
  1475. X--- ./page.c    Thu Oct 10 20:40:47 1991
  1476. X***************
  1477. X*** 3,9 ****
  1478. X   *  Module    : page.c
  1479. X   *  Author    : R.Skrenta / I.Lea
  1480. X   *  Created   : 01-04-91
  1481. X!  *  Updated   : 30-09-91
  1482. X   *  Release   : 1.0
  1483. X   *  Notes     :
  1484. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1485. X--- 3,9 ----
  1486. X   *  Module    : page.c
  1487. X   *  Author    : R.Skrenta / I.Lea
  1488. X   *  Created   : 01-04-91
  1489. X!  *  Updated   : 10-10-91
  1490. X   *  Release   : 1.0
  1491. X   *  Notes     :
  1492. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1493. X***************
  1494. X*** 90,96 ****
  1495. X      rotate = 0;            /* normal mode, not rot13 */
  1496. X      art = arts[respnum].artnum;
  1497. X      arts[respnum].unread = ART_READ;    /* mark article as read */
  1498. X!     open_note (art, group_path);
  1499. X  
  1500. X      if (note_page == NOTE_UNAVAIL) {
  1501. X          ClearScreen ();
  1502. X--- 90,96 ----
  1503. X      rotate = 0;            /* normal mode, not rot13 */
  1504. X      art = arts[respnum].artnum;
  1505. X      arts[respnum].unread = ART_READ;    /* mark article as read */
  1506. X!     art_open (art, group_path);
  1507. X  
  1508. X      if (note_page == NOTE_UNAVAIL) {
  1509. X          ClearScreen ();
  1510. X***************
  1511. X*** 119,128 ****
  1512. X--- 119,130 ----
  1513. X                  switch (ch) {
  1514. X                  case 'G':        /* ansi  PgDn */
  1515. X                  case 'U':        /* at386 PgDn */
  1516. X+                 case 'T':        /* 97801 PgDn */
  1517. X                      goto page_down;
  1518. X  
  1519. X                  case 'I':        /* ansi  PgUp */
  1520. X                  case 'V':        /* at386 PgUp */
  1521. X+                 case 'S':        /* 97801 PgUp */
  1522. X                  case 'v':        /* emacs style */
  1523. X                      goto page_up;
  1524. X  
  1525. X***************
  1526. X*** 153,164 ****
  1527. X                      info_message(txt_no_last_message);
  1528. X                      break;
  1529. X                  }
  1530. X!                 note_cleanup();
  1531. X                  respnum = last_resp;
  1532. X                  goto restart;
  1533. X  
  1534. X              case '|':    /* pipe article/thread/tagged arts to command */
  1535. X                  feed_articles (FEED_PIPE, PAGE_LEVEL, "Pipe", respnum, group_path);
  1536. X                  break;
  1537. X  
  1538. X              case '/':    /* search forwards in article */
  1539. X--- 155,168 ----
  1540. X                      info_message(txt_no_last_message);
  1541. X                      break;
  1542. X                  }
  1543. X!                 art_close();
  1544. X                  respnum = last_resp;
  1545. X                  goto restart;
  1546. X  
  1547. X              case '|':    /* pipe article/thread/tagged arts to command */
  1548. X+                 set_real_uid_gid ();
  1549. X                  feed_articles (FEED_PIPE, PAGE_LEVEL, "Pipe", respnum, group_path);
  1550. X+                 set_tin_uid_gid ();
  1551. X                  break;
  1552. X  
  1553. X              case '/':    /* search forwards in article */
  1554. X***************
  1555. X*** 171,177 ****
  1556. X                  n = which_base (respnum);
  1557. X                  if (n != respnum && n >= 0) {
  1558. X                      respnum = n;
  1559. X!                     note_cleanup ();
  1560. X                      goto restart;
  1561. X                  }
  1562. X                  break;
  1563. X--- 175,181 ----
  1564. X                  n = which_base (respnum);
  1565. X                  if (n != respnum && n >= 0) {
  1566. X                      respnum = n;
  1567. X!                     art_close ();
  1568. X                      goto restart;
  1569. X                  }
  1570. X                  break;
  1571. X***************
  1572. X*** 182,188 ****
  1573. X                  }
  1574. X                  if (n != respnum) {
  1575. X                      respnum = n;
  1576. X!                     note_cleanup ();
  1577. X                      goto restart;
  1578. X                  }
  1579. X                  break;
  1580. X--- 186,192 ----
  1581. X                  }
  1582. X                  if (n != respnum) {
  1583. X                      respnum = n;
  1584. X!                     art_close ();
  1585. X                      goto restart;
  1586. X                  }
  1587. X                  break;
  1588. X***************
  1589. X*** 199,205 ****
  1590. X                      respnum = n;
  1591. X                      goto restart;
  1592. X                  } else if (note_end) {
  1593. X!                     note_cleanup ();
  1594. X                      n = next_response (respnum);
  1595. X                      if (n == -1) {
  1596. X                          return (which_base (respnum));
  1597. X--- 203,209 ----
  1598. X                      respnum = n;
  1599. X                      goto restart;
  1600. X                  } else if (note_end) {
  1601. X!                     art_close ();
  1602. X                      n = next_response (respnum);
  1603. X                      if (n == -1) {
  1604. X                          return (which_base (respnum));
  1605. X***************
  1606. X*** 212,218 ****
  1607. X  
  1608. X              case '\r':
  1609. X              case '\n':    /* go to start of next thread */
  1610. X!                 note_cleanup ();
  1611. X                  n = next_basenote (respnum);
  1612. X                  if (n == -1)
  1613. X                      return (which_base (respnum));
  1614. X--- 216,222 ----
  1615. X  
  1616. X              case '\r':
  1617. X              case '\n':    /* go to start of next thread */
  1618. X!                 art_close ();
  1619. X                  n = next_basenote (respnum);
  1620. X                  if (n == -1)
  1621. X                      return (which_base (respnum));
  1622. X***************
  1623. X*** 230,236 ****
  1624. X                      goto restart;
  1625. X  
  1626. X                  } else if (note_end) {
  1627. X!                     note_cleanup();
  1628. X                      n = next_unread(next_response(respnum));
  1629. X                      if (n == -1)
  1630. X                          return (which_base (respnum));
  1631. X--- 234,240 ----
  1632. X                      goto restart;
  1633. X  
  1634. X                  } else if (note_end) {
  1635. X!                     art_close();
  1636. X                      n = next_unread(next_response(respnum));
  1637. X                      if (n == -1)
  1638. X                          return (which_base (respnum));
  1639. X***************
  1640. X*** 314,320 ****
  1641. X              case 'b':        /* back a page */
  1642. X  page_up:
  1643. X                  if (note_page == NOTE_UNAVAIL) {
  1644. X!                     note_cleanup();
  1645. X                      n = prev_response (respnum);
  1646. X                      if (n == -1)
  1647. X                          return (which_resp (respnum));
  1648. X--- 318,324 ----
  1649. X              case 'b':        /* back a page */
  1650. X  page_up:
  1651. X                  if (note_page == NOTE_UNAVAIL) {
  1652. X!                     art_close();
  1653. X                      n = prev_response (respnum);
  1654. X                      if (n == -1)
  1655. X                          return (which_resp (respnum));
  1656. X***************
  1657. X*** 348,354 ****
  1658. X                      if (cur_groupnum + 1 < local_top) {
  1659. X                          cur_groupnum++;
  1660. X                      }
  1661. X!                     note_cleanup();
  1662. X                      return -1;
  1663. X                  }
  1664. X                  break;
  1665. X--- 352,358 ----
  1666. X                      if (cur_groupnum + 1 < local_top) {
  1667. X                          cur_groupnum++;
  1668. X                      }
  1669. X!                     art_close();
  1670. X                      return -1;
  1671. X                  }
  1672. X                  break;
  1673. X***************
  1674. X*** 360,369 ****
  1675. X                  break;
  1676. X      
  1677. X              case 'f':    /* post a followup to this article */
  1678. X                  if (post_response (group, FALSE)) {
  1679. X                      update_newsrc (group, my_group[cur_groupnum], FALSE);
  1680. X                      n = which_base (respnum);
  1681. X!                     note_cleanup ();
  1682. X                      index_group (group, group_path);
  1683. X                      read_newsrc_line (group);
  1684. X                      respnum = choose_resp (n, nresp(n));
  1685. X--- 364,379 ----
  1686. X                  break;
  1687. X      
  1688. X              case 'f':    /* post a followup to this article */
  1689. X+ #ifdef USE_NNTP
  1690. X+                 if (! can_post) {
  1691. X+                     info_message (txt_cannot_post);
  1692. X+                     break;
  1693. X+                 }
  1694. X+ #endif
  1695. X                  if (post_response (group, FALSE)) {
  1696. X                      update_newsrc (group, my_group[cur_groupnum], FALSE);
  1697. X                      n = which_base (respnum);
  1698. X!                     art_close ();
  1699. X                      index_group (group, group_path);
  1700. X                      read_newsrc_line (group);
  1701. X                      respnum = choose_resp (n, nresp(n));
  1702. X***************
  1703. X*** 373,382 ****
  1704. X                  break;
  1705. X  
  1706. X              case 'F':    /* post a followup to this article */
  1707. X                  if (post_response (group, TRUE)) {
  1708. X                      update_newsrc (group, my_group[cur_groupnum], FALSE);
  1709. X                      n = which_base (respnum);
  1710. X!                     note_cleanup ();
  1711. X                      index_group (group, group_path);
  1712. X                      read_newsrc_line (group);
  1713. X                      respnum = choose_resp (n, nresp(n));
  1714. X--- 383,398 ----
  1715. X                  break;
  1716. X  
  1717. X              case 'F':    /* post a followup to this article */
  1718. X+ #ifdef USE_NNTP
  1719. X+                 if (! can_post) {
  1720. X+                     info_message (txt_cannot_post);
  1721. X+                     break;
  1722. X+                 }
  1723. X+ #endif
  1724. X                  if (post_response (group, TRUE)) {
  1725. X                      update_newsrc (group, my_group[cur_groupnum], FALSE);
  1726. X                      n = which_base (respnum);
  1727. X!                     art_close ();
  1728. X                      index_group (group, group_path);
  1729. X                      read_newsrc_line (group);
  1730. X                      respnum = choose_resp (n, nresp(n));
  1731. X***************
  1732. X*** 397,403 ****
  1733. X  
  1734. X              case 'i':    /* return to index page */
  1735. X  return_to_index:
  1736. X!                 note_cleanup ();
  1737. X                  if (kill_state == NO_KILLING &&
  1738. X                      sort_art_type != old_sort_art_type) {
  1739. X                      make_threads (TRUE);
  1740. X--- 413,419 ----
  1741. X  
  1742. X              case 'i':    /* return to index page */
  1743. X  return_to_index:
  1744. X!                 art_close ();
  1745. X                  if (kill_state == NO_KILLING &&
  1746. X                      sort_art_type != old_sort_art_type) {
  1747. X                      make_threads (TRUE);
  1748. X***************
  1749. X*** 433,439 ****
  1750. X                      if (n == -1)
  1751. X                          return (which_base (respnum));
  1752. X                  } else {
  1753. X!                     note_cleanup ();
  1754. X                      n = next_unread (next_response (respnum));
  1755. X                      if (n == -1)
  1756. X                          return (which_base (respnum));
  1757. X--- 449,455 ----
  1758. X                      if (n == -1)
  1759. X                          return (which_base (respnum));
  1760. X                  } else {
  1761. X!                     art_close ();
  1762. X                      n = next_unread (next_response (respnum));
  1763. X                      if (n == -1)
  1764. X                          return (which_base (respnum));
  1765. X***************
  1766. X*** 448,460 ****
  1767. X                  n = next_unread (next_response (respnum));
  1768. X                  if (n == -1)
  1769. X                      goto return_to_index;
  1770. X!                 note_cleanup ();
  1771. X                  respnum = n;
  1772. X                  goto restart;
  1773. X                  /* NOTREACHED */
  1774. X  
  1775. X              case 'm':    /* mail article/thread/tagged articles to somebody */
  1776. X                  feed_articles (FEED_MAIL, PAGE_LEVEL, "Mail", respnum, group_path);
  1777. X                  break;
  1778. X  
  1779. X              case 'M':    /* options menu */
  1780. X--- 464,478 ----
  1781. X                  n = next_unread (next_response (respnum));
  1782. X                  if (n == -1)
  1783. X                      goto return_to_index;
  1784. X!                 art_close ();
  1785. X                  respnum = n;
  1786. X                  goto restart;
  1787. X                  /* NOTREACHED */
  1788. X  
  1789. X              case 'm':    /* mail article/thread/tagged articles to somebody */
  1790. X+                 set_real_uid_gid ();
  1791. X                  feed_articles (FEED_MAIL, PAGE_LEVEL, "Mail", respnum, group_path);
  1792. X+                 set_tin_uid_gid ();
  1793. X                  break;
  1794. X  
  1795. X              case 'M':    /* options menu */
  1796. X***************
  1797. X*** 465,471 ****
  1798. X                  break;
  1799. X  
  1800. X              case 'n':    /* skip to next article */
  1801. X!                 note_cleanup ();
  1802. X                  n = next_response (respnum);
  1803. X                  if (n == -1)
  1804. X                      return (which_base(respnum));
  1805. X--- 483,489 ----
  1806. X                  break;
  1807. X  
  1808. X              case 'n':    /* skip to next article */
  1809. X!                 art_close ();
  1810. X                  n = next_response (respnum);
  1811. X                  if (n == -1)
  1812. X                      return (which_base(respnum));
  1813. X***************
  1814. X*** 479,485 ****
  1815. X                  if (n == -1)
  1816. X                      info_message(txt_no_next_unread_art);
  1817. X                  else {
  1818. X!                     note_cleanup();
  1819. X                      respnum = n;
  1820. X                      goto restart;
  1821. X                  }
  1822. X--- 497,503 ----
  1823. X                  if (n == -1)
  1824. X                      info_message(txt_no_next_unread_art);
  1825. X                  else {
  1826. X!                     art_close();
  1827. X                      respnum = n;
  1828. X                      goto restart;
  1829. X                  }
  1830. X***************
  1831. X*** 486,496 ****
  1832. X                  break;
  1833. X  
  1834. X              case 'o':    /* output art/thread/tagged arts to printer */
  1835. X                  feed_articles (FEED_PRINT, PAGE_LEVEL, "Print", respnum, group_path);
  1836. X                  break;
  1837. X  
  1838. X              case 'p':    /* previous article */
  1839. X!                 note_cleanup ();
  1840. X                  n = prev_response (respnum);
  1841. X                  if (n == -1)
  1842. X                      return (which_resp (respnum));
  1843. X--- 504,516 ----
  1844. X                  break;
  1845. X  
  1846. X              case 'o':    /* output art/thread/tagged arts to printer */
  1847. X+                 set_real_uid_gid ();
  1848. X                  feed_articles (FEED_PRINT, PAGE_LEVEL, "Print", respnum, group_path);
  1849. X+                 set_tin_uid_gid ();
  1850. X                  break;
  1851. X  
  1852. X              case 'p':    /* previous article */
  1853. X!                 art_close ();
  1854. X                  n = prev_response (respnum);
  1855. X                  if (n == -1)
  1856. X                      return (which_resp (respnum));
  1857. X***************
  1858. X*** 503,509 ****
  1859. X                  if (n == -1)
  1860. X                      info_message (txt_no_prev_unread_art);
  1861. X                  else {
  1862. X!                     note_cleanup ();
  1863. X                      respnum = n;
  1864. X                      goto restart;
  1865. X                  }
  1866. X--- 523,529 ----
  1867. X                  if (n == -1)
  1868. X                      info_message (txt_no_prev_unread_art);
  1869. X                  else {
  1870. X!                     art_close ();
  1871. X                      respnum = n;
  1872. X                      goto restart;
  1873. X                  }
  1874. X***************
  1875. X*** 526,536 ****
  1876. X                  break;
  1877. X  
  1878. X              case 's':    /* save article/thread/tagged articles */
  1879. X                  feed_articles (FEED_SAVE, PAGE_LEVEL, "Save", respnum, group_path);
  1880. X                  break;
  1881. X  
  1882. X              case 't':    /* return to group selection page */
  1883. X!                 note_cleanup ();
  1884. X                  if (kill_state == KILLING) {
  1885. X                      if (kill_articles) {
  1886. X                          kill_any_articles (group);
  1887. X--- 546,558 ----
  1888. X                  break;
  1889. X  
  1890. X              case 's':    /* save article/thread/tagged articles */
  1891. X+                 set_real_uid_gid ();
  1892. X                  feed_articles (FEED_SAVE, PAGE_LEVEL, "Save", respnum, group_path);
  1893. SHAR_EOF
  1894. echo "End of tin part 2"
  1895. echo "File tin.patch05 is continued in part 3"
  1896. echo "3" > shar3_seq_.tmp
  1897. exit 0
  1898.  
  1899. --
  1900. NAME   Iain Lea
  1901. EMAIL  iain@estevax.uucp    ...!unido!estevax!iain
  1902. SNAIL  Bruecken Str. 12, 8500 Nuernberg, Germany
  1903. PHONE  +49-911-3089-407 (work)  +49-911-331963 (home)
  1904.  
  1905. exit 0 # Just in case...
  1906. -- 
  1907. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1908. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1909. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1910. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1911.