home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3897 < prev    next >
Encoding:
Internet Message Format  |  1991-08-24  |  49.1 KB

  1. Path: wupost!uunet!mcsun!unido!estevax!norisc!iain
  2. From: iain@norisc.UUCP (Iain Lea)
  3. Newsgroups: alt.sources
  4. Subject: tin v1.00 - YAN (Yet Another Newsreader) Part 07/08
  5. Message-ID: <588@norisc.UUCP>
  6. Date: 23 Aug 91 13:56:49 GMT
  7. Sender: iain@norisc.UUCP (Iain Lea)
  8. Organization: What organization?
  9. Lines: 1991
  10.  
  11. Submitted-by: iain@estevax.uucp
  12. Archive-name: tin/part07
  13.  
  14. #!/bin/sh
  15. # this is tin.shar.07 (part 7 of tin)
  16. # do not concatenate these parts, unpack them in order with /bin/sh
  17. # file select.c continued
  18. #
  19. if touch 2>&1 | fgrep '[-amc]' > /dev/null
  20.  then TOUCH=touch
  21.  else TOUCH=true
  22. fi
  23. if test ! -r shar3_seq_.tmp; then
  24.     echo "Please unpack part 1 first!"
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 7; then
  29.     echo "Please unpack part $Scheck next!"
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < shar3_seq_.tmp || exit 1
  35. echo "x - Continuing file select.c"
  36. sed 's/^X//' << 'SHAR_EOF' >> select.c &&
  37. X                break;
  38. X
  39. X            case '\r':    /* go into group */
  40. X            case '\n':
  41. X                space_mode = FALSE;
  42. Xgo_into_group:
  43. X                clear_message();
  44. X                index_point = -1;
  45. X                do {
  46. X                    group_page (active[my_group[cur_groupnum]].name);
  47. X                } while (index_point == -3);
  48. X                group_selection_page();
  49. X                break;
  50. X
  51. X            case '\t':
  52. X                for (i = cur_groupnum; i < local_top; i++)
  53. X                    if (unread[i] != 0)
  54. X                        break;
  55. X                if (i >= local_top) {
  56. X                    info_message(txt_no_groups_to_read);
  57. X                    break;
  58. X                }
  59. X
  60. X                erase_group_arrow();
  61. X                cur_groupnum = i;
  62. X                if (cur_groupnum >= last_group_on_screen)
  63. X                    group_selection_page();
  64. X                else
  65. X                    draw_group_arrow();
  66. X                space_mode = TRUE;
  67. X                goto go_into_group;
  68. X
  69. X            case 27:    /* (ESC) common arrow keys */
  70. X                ch = ReadCh();
  71. X                if (ch == '[' || ch == 'O')
  72. X                    ch = ReadCh();
  73. X                switch (ch) {
  74. X                case 'A':
  75. X                case 'D':
  76. X                case 'i':
  77. X                    goto select_up;
  78. X
  79. X                case 'B':
  80. X                case 'C':
  81. X                    goto select_down;
  82. X
  83. X                case 'G':        /* ansi  PgDn */
  84. X                case 'U':        /* at386 PgDn */
  85. X                    goto select_page_down;
  86. X
  87. X                case 'I':        /* ansi  PgUp */
  88. X                case 'V':        /* at386 PgUp */
  89. X                    goto select_page_up;
  90. X
  91. X                case 'H':        /* at386  Home */
  92. X                    cur_groupnum = 0;
  93. X                    group_selection_page ();
  94. X                    break;
  95. X                    
  96. X                case 'F':        /* ansi  End */
  97. X                case 'Y':        /* at386  End */
  98. X                    goto end_of_list;
  99. X                }
  100. X                break;
  101. X
  102. X            case ctrl('D'):        /* page down */
  103. X            case ' ':
  104. Xselect_page_down:
  105. X                erase_group_arrow();
  106. X                cur_groupnum += NOTESLINES / 2;
  107. X                if (cur_groupnum >= local_top)
  108. X                    cur_groupnum = local_top - 1;
  109. X
  110. X                if (cur_groupnum <= first_group_on_screen
  111. X                ||  cur_groupnum >= last_group_on_screen)
  112. X                    group_selection_page();
  113. X                else
  114. X                    draw_group_arrow();
  115. X                break;
  116. X
  117. X            case ctrl('K'):
  118. X                if (local_top <= 0) {
  119. X                    info_message(txt_no_groups_to_delete);
  120. X                    break;
  121. X                }
  122. X
  123. X                if (prompt_yn (LINES, txt_del_group_in_newsrc, 'y')) {
  124. X                    delete_group(active[my_group[cur_groupnum]].name);
  125. X                    active[my_group[cur_groupnum]].flag = NOTGOT;    
  126. X
  127. X                    local_top--;
  128. X                    for (i = cur_groupnum; i < local_top; i++) {
  129. X                        my_group[i] = my_group[i+1];
  130. X                        unread[i] = unread[i+1];
  131. X                    }
  132. X                    if (cur_groupnum >= local_top)
  133. X                        cur_groupnum = local_top - 1;    
  134. X
  135. X                    group_selection_page();
  136. X                    info_message(txt_group_deleted);
  137. X                }
  138. X                break;
  139. X
  140. X            case ctrl('L'):        /* redraw */
  141. X            case 't':
  142. X#ifndef USE_CLEARSCREEN
  143. X                ClearScreen ();
  144. X#endif
  145. X                group_selection_page();
  146. X                break;
  147. X
  148. X            case ctrl('N'):        /* line down */
  149. X            case 'j':
  150. Xselect_down:
  151. X                if (cur_groupnum + 1 >= local_top)
  152. X                    break;
  153. X
  154. X                if (cur_groupnum + 1 >= last_group_on_screen) {
  155. X#ifndef USE_CLEARSCREEN
  156. X                    erase_group_arrow();
  157. X#endif                    
  158. X                    cur_groupnum++;
  159. X                    group_selection_page();
  160. X                } else {
  161. X                    erase_group_arrow();
  162. X                    cur_groupnum++;
  163. X                    draw_group_arrow();
  164. X                }
  165. X                break;
  166. X
  167. X            case ctrl('P'):        /* line up */
  168. X            case 'k':
  169. Xselect_up:
  170. X                if (!cur_groupnum)
  171. X                    break;
  172. X
  173. X                if (cur_groupnum <= first_group_on_screen) {
  174. X                    cur_groupnum--;
  175. X                    group_selection_page();
  176. X                } else {
  177. X                    erase_group_arrow();
  178. X                    cur_groupnum--;
  179. X                    draw_group_arrow();
  180. X                }
  181. X                break;
  182. X
  183. X            case ctrl('R'):    /* reset .newsrc */
  184. X                if (prompt_yn (LINES, txt_reset_newsrc, 'n')) {
  185. X                    reset_newsrc();
  186. X                    cur_groupnum = 0;
  187. X                    group_selection_page();
  188. X                }
  189. X                break;
  190. X
  191. X            case ctrl('U'):        /* page up */
  192. X            case 'b':
  193. Xselect_page_up:
  194. X                erase_group_arrow();
  195. X                cur_groupnum -= NOTESLINES / 2;
  196. X                if (cur_groupnum < 0)
  197. X                    cur_groupnum = 0;
  198. X                if (cur_groupnum < first_group_on_screen
  199. X                ||  cur_groupnum >= last_group_on_screen)
  200. X                    group_selection_page();
  201. X                else
  202. X                    draw_group_arrow();
  203. X                break;
  204. X
  205. X            case 'B':    /* bug/gripe/comment mailed to author */
  206. X                mail_bug_report ();
  207. X#ifndef USE_CLEARSCREEN
  208. X                ClearScreen ();
  209. X#endif
  210. X                group_selection_page();
  211. X                break;
  212. X                
  213. X            case 'c':    /* catchup--mark all articles as read */
  214. X                if (prompt_yn (LINES, txt_mark_group_read, 'y')) {
  215. X                    unread[cur_groupnum] = 0;
  216. X                    mark_group_read(
  217. X                        active[my_group[cur_groupnum]].name,
  218. X                        my_group[cur_groupnum]);
  219. X                    if (draw_arrow_mark) {    
  220. X                        MoveCursor (INDEX_TOP +
  221. X                            (cur_groupnum - first_group_on_screen), 47);
  222. X                        printf ("     ");
  223. X                        MoveCursor (LINES, 0);
  224. X                        fflush (stdout);
  225. X                    } else {
  226. X                        i = cur_groupnum - first_group_on_screen;
  227. X                        screen[i].col[47] = ' ';
  228. X                        screen[i].col[48] = ' ';
  229. X                        screen[i].col[49] = ' ';
  230. X                        screen[i].col[50] = ' ';
  231. X                    }
  232. X                    erase_group_arrow ();
  233. X                    if (cur_groupnum+1 < last_group_on_screen) {
  234. X                        cur_groupnum++;
  235. X                    }
  236. X                    draw_group_arrow ();
  237. X                }
  238. X                break;
  239. X
  240. X            case 'g':    /* prompt for a new group name */
  241. X                if ((n = choose_new_group ()) >= 0) {
  242. X                    if (active[my_group[n]].flag != SUBS) {
  243. X                        subscribe (active[my_group[n]].name, ':',
  244. X                            my_group[n], FALSE);
  245. X                    }
  246. X                    erase_group_arrow();
  247. X                    cur_groupnum = reposition_group (active[my_group[n]].name,
  248. X                                                    (n ? n : cur_groupnum));
  249. X                    if (cur_groupnum < first_group_on_screen ||
  250. X                        cur_groupnum >= last_group_on_screen ||
  251. X                        cur_groupnum != n) {
  252. X                        group_selection_page();
  253. X                    } else {
  254. X                        clear_message ();
  255. X                        draw_group_arrow();
  256. X                    }
  257. X                }
  258. X                break;
  259. X
  260. X            case 'h':
  261. X                help_select_commands ();
  262. X                group_selection_page ();
  263. X                break;
  264. X
  265. X            case 'H':
  266. X                help_select_info ();
  267. X                group_selection_page ();
  268. X                break;
  269. X
  270. X            case 'I':        /* toggle inverse video */
  271. X                inverse_okay = !inverse_okay;
  272. X                if (inverse_okay)
  273. X                    info_message(txt_inverse_on);
  274. X                else
  275. X                    info_message(txt_inverse_off);
  276. X                group_selection_page();
  277. X                break;
  278. X
  279. X            case 'm':    /* reposition group within group list */
  280. X                if (active[my_group[cur_groupnum]].flag == SUBS) {
  281. X                    n = cur_groupnum;
  282. X                    erase_group_arrow ();
  283. X                    cur_groupnum = reposition_group (active[my_group[n]].name, n);
  284. X                    if (cur_groupnum < first_group_on_screen ||
  285. X                        cur_groupnum >= last_group_on_screen ||
  286. X                        cur_groupnum != n) {
  287. X                        group_selection_page();
  288. X                    } else {
  289. X                        clear_message ();
  290. X                        draw_group_arrow();
  291. X                    }
  292. X                }
  293. X                break;
  294. X
  295. X            case 'M':    /* options menu */
  296. X                change_rcfile ("", TRUE);
  297. X                group_selection_page ();
  298. X                break;
  299. X
  300. X            case 'q':    /* quit */
  301. X                tin_done (0);
  302. X
  303. X            case 's':    /* subscribe to current group */
  304. X                if (active[my_group[cur_groupnum]].flag != SUBS) {
  305. X                    MoveCursor (INDEX_TOP + (cur_groupnum-first_group_on_screen), 3);
  306. X                    if (draw_arrow_mark) {
  307. X                        putchar (' ');
  308. X                    } else {
  309. X                        screen[cur_groupnum-first_group_on_screen].col[3] = ' ';
  310. X                        draw_group_arrow ();
  311. X                    }
  312. X                    fflush (stdout);
  313. X                    MoveCursor (LINES, 0);    
  314. X
  315. X                    subscribe (active[my_group[cur_groupnum]].name,
  316. X                        ':', my_group[cur_groupnum], FALSE);
  317. X                    sprintf (buf, txt_subscribed_to, active[my_group[cur_groupnum]].name);
  318. X                    info_message (buf);
  319. X                }
  320. X                break;
  321. X
  322. X            case 'S':    /* subscribe to groups matching pattern */
  323. X                if (parse_string (txt_subscribe_pattern, buf) && buf[0]) {
  324. X                    wait_message (txt_subscribing);
  325. X                    for (subscribe_num=0, i=0 ; i < local_top ; i++) {
  326. X#ifdef DONT_USE_REGEX 
  327. X                        if (str_str (active[my_group[i]].name, buf)) {
  328. X#else        
  329. X                        if (wildmat (active[my_group[i]].name, buf)) {
  330. X#endif        
  331. X                                if (active[my_group[i]].flag != SUBS) {
  332. X                                sprintf (msg, txt_subscribing_to, active[my_group[i]].name);
  333. X                                wait_message (msg);
  334. X                                subscribe (active[my_group[i]].name,
  335. X                                    ':', my_group[i], FALSE);
  336. X                            }
  337. X                            subscribe_num++;
  338. X                        }
  339. X                    }
  340. X                    if (subscribe_num) {
  341. X                        group_selection_page ();    
  342. X                        sprintf (buf, txt_subscribed_num_groups, subscribe_num);
  343. X                        info_message (buf);
  344. X                    } else {
  345. X                        info_message (txt_no_match);
  346. X                    }
  347. X                } else {
  348. X                    clear_message ();
  349. X                }
  350. X                break;
  351. X
  352. X            case 'u':    /* unsubscribe to current group */
  353. X                if (active[my_group[cur_groupnum]].flag == SUBS) {
  354. X                    MoveCursor(INDEX_TOP + (cur_groupnum-first_group_on_screen), 3);
  355. X                    if (draw_arrow_mark) {
  356. X                        putchar('u');
  357. X                    } else {
  358. X                        screen[cur_groupnum-first_group_on_screen].col[3] = 'u';
  359. X                        draw_group_arrow ();
  360. X                    }
  361. X                    fflush(stdout);
  362. X                    MoveCursor(LINES, 0);
  363. X
  364. X                    subscribe(active[my_group[cur_groupnum]].name,
  365. X                        '!', my_group[cur_groupnum], FALSE);
  366. X                    sprintf(buf, txt_unsubscribed_to,active[my_group[cur_groupnum]].name);
  367. X                    info_message(buf);
  368. X                }
  369. X                break;
  370. X
  371. X            case 'U':    /* unsubscribe to groups matching pattern */
  372. X                if (parse_string (txt_unsubscribe_pattern, buf) && buf[0]) {    
  373. X                    wait_message (txt_unsubscribing);
  374. X                    for (subscribe_num=0, i=0 ; i < local_top ; i++) {        
  375. X#ifdef DONT_USE_REGEX 
  376. X                        if (str_str (active[my_group[i]].name, buf)) {
  377. X#else        
  378. X                        if (wildmat (active[my_group[i]].name, buf)) {
  379. X#endif        
  380. X                                if (active[my_group[i]].flag == SUBS) {
  381. X                                sprintf (msg, txt_unsubscribing_from, active[my_group[i]].name);
  382. X                                wait_message (msg);
  383. X                                subscribe (active[my_group[i]].name,
  384. X                                    '!', my_group[i], FALSE);
  385. X                            }
  386. X                            subscribe_num++;
  387. X                        }
  388. X                    }
  389. X                    if (subscribe_num) {
  390. X                        group_selection_page ();    
  391. X                        sprintf (buf, txt_unsubscribed_num_groups, subscribe_num);
  392. X                        info_message (buf);
  393. X                    } else {
  394. X                        info_message (txt_no_match);
  395. X                    }
  396. X                } else {
  397. X                    clear_message ();
  398. X                }
  399. X                break;
  400. X
  401. X            case 'v':    /* show tin version */
  402. X                info_message (cvers);
  403. X                break;
  404. X
  405. X            case 'W':    /* display messages posted by user */
  406. X                if (user_posted_messages ()) {
  407. X                    group_selection_page ();
  408. X                }
  409. X                break;
  410. X
  411. X            case 'y':    /* pull in rest of groups from active */
  412. X                if (reread_active_file) {
  413. X                    n = local_top;
  414. X                    for (i = 0; i < num_active; i++) {
  415. X                        active[i].flag = NOTGOT;
  416. X                    }
  417. X                    read_newsrc (FALSE);
  418. X                    for (i = 0; i < num_active; i++) {
  419. X                        if (active[i].flag & NOTGOT) {
  420. X                            active[i].flag &= ~NOTGOT;
  421. X                            my_group[local_top] = i;
  422. X                            unread[local_top] = -1;
  423. X                            local_top++;
  424. X                        }
  425. X                    }
  426. X                    if (n < local_top) {
  427. X                        sprintf(buf, txt_added_groups, local_top - n,
  428. X                            local_top - n == 1 ? "" : txt_plural);
  429. X                        group_selection_page();
  430. X                        info_message(buf);
  431. X                    } else {
  432. X                        info_message(txt_no_groups_to_yank_in);
  433. X                    }
  434. X                    reread_active_file = FALSE;
  435. X                } else {
  436. X                    read_newsrc (TRUE);
  437. X                    cur_groupnum = local_top - 1;
  438. X                    group_selection_page();
  439. X                    reread_active_file = TRUE;
  440. X                }
  441. X                break;
  442. X
  443. X            case 'Y':    /* reread .newsrc, no unsub groups */
  444. X                cur_groupnum = 0;
  445. X                local_top = 0;
  446. X                for (i = 0; i < num_active; i++)
  447. X                    active[i].flag = NOTGOT;
  448. X                read_newsrc(TRUE);
  449. X                group_selection_page();
  450. X                break;
  451. X
  452. X            case 'z':
  453. X                undel_group();
  454. X                group_selection_page();
  455. X                break;
  456. X
  457. X            default:
  458. X                info_message(txt_bad_command);
  459. X        }
  460. X    }
  461. X}
  462. X
  463. X
  464. Xvoid group_selection_page ()
  465. X{
  466. X    int i,j;
  467. X    int n;
  468. X    char new[10];
  469. X    char subs;
  470. X
  471. X#ifdef SIGTSTP
  472. X    signal(SIGTSTP, select_susp);
  473. X#endif
  474. X
  475. X#ifdef USE_CLEARSCREEN
  476. X    ClearScreen ();
  477. X#else
  478. X    MoveCursor (0, 0);        /* top left corner */
  479. X    CleartoEOLN ();
  480. X#endif
  481. X
  482. X    printf("%s\r\n", nice_time());        /* print time in upper left */
  483. X
  484. X    MoveCursor (0, (COLS - (int) strlen (txt_type_h_for_help))+1);    /* in upper middle */
  485. X    if (mail_check ()) {            /* you have mail message */
  486. X        printf(txt_you_have_mail);
  487. X    } else {
  488. X        printf(txt_type_h_for_help);
  489. X    }
  490. X
  491. X#ifndef USE_CLEARSCREEN
  492. X    MoveCursor (1, 0);
  493. X    CleartoEOLN ();
  494. X    MoveCursor (2, 0);
  495. X    CleartoEOLN ();
  496. X#endif
  497. X
  498. X    StartInverse();
  499. X    center_line(1, txt_group_selection);
  500. X    EndInverse();
  501. X    
  502. X    MoveCursor(1, (COLS - (int) strlen (txt_type_h_for_help))+1);    /* in upper middle */
  503. X    if (kill_articles) {        /* display KILL on screen */
  504. X        printf("KILL ON   ");
  505. X    } else {
  506. X        printf("          ");
  507. X    }
  508. X    if (post_process) {        /* display POST on screen */
  509. X        printf("POST ON");
  510. X    } else {
  511. X        printf("       ");
  512. X    }
  513. X        
  514. X    MoveCursor(INDEX_TOP, 0);
  515. X
  516. X    first_group_on_screen = (cur_groupnum / NOTESLINES) * NOTESLINES;
  517. X
  518. X    last_group_on_screen = first_group_on_screen + NOTESLINES;
  519. X    if (last_group_on_screen >= local_top)
  520. X        last_group_on_screen = local_top;
  521. X
  522. X    for (j=0, i = first_group_on_screen; i < last_group_on_screen; i++,j++) {
  523. X        switch (unread[i]) {
  524. X            case -2:
  525. X                sprintf(new, "?   ");
  526. X                break;
  527. X
  528. X            case -1:
  529. X                sprintf (new, "-   ");
  530. X                break;
  531. X
  532. X            case 0:
  533. X                sprintf (new, "    ");
  534. X                break;
  535. X
  536. X            default:
  537. X                sprintf (new, "%-4d", unread[i]);
  538. X        }
  539. X        
  540. X        n = my_group[i];
  541. X        if (active[n].flag & SUBS)    /* subscribed? */
  542. X            subs = ' ';
  543. X        else
  544. X            subs = 'u';    /* u next to unsubscribed groups */
  545. X
  546. X        if (draw_arrow_mark) {
  547. X            printf ("   %c %4d  %-35s %s\r\n",
  548. X                   subs, i+1, active[n].name, new);
  549. X        } else {
  550. X            sprintf (screen[j].col, "   %c %4d  %-35s %s% *s\r\n",
  551. X                subs, i+1, active[n].name, new, COLS-52, " ");
  552. X            printf ("%s", screen[j].col);
  553. X        }
  554. X    }
  555. X#ifndef USE_CLEARSCREEN
  556. X    CleartoEOS ();
  557. X#endif
  558. X
  559. X    draw_group_arrow();
  560. X}
  561. X
  562. X
  563. Xint prompt_group_num(ch)
  564. X    char ch;
  565. X{
  566. X    int num;
  567. X
  568. X    clear_message();
  569. X
  570. X    if ((num = parse_num(ch, txt_select_group)) == -1) {
  571. X        clear_message();
  572. X        return FALSE;
  573. X    }
  574. X    num--;        /* index from 0 (internal) vs. 1 (user) */
  575. X
  576. X    if (num >= local_top)
  577. X        num = local_top - 1;
  578. X
  579. X    if (num >= first_group_on_screen
  580. X    &&  num < last_group_on_screen) {
  581. X        erase_group_arrow();
  582. X        cur_groupnum = num;
  583. X        draw_group_arrow();
  584. X    } else {
  585. X#ifndef USE_CLEARSCREEN
  586. X        erase_group_arrow();
  587. X#endif        
  588. X        cur_groupnum = num;
  589. X        group_selection_page();
  590. X    }
  591. X
  592. X    return TRUE;
  593. X}
  594. X
  595. X
  596. Xvoid erase_group_arrow()
  597. X{
  598. X    erase_arrow(INDEX_TOP + (cur_groupnum-first_group_on_screen) );
  599. X}
  600. X
  601. X
  602. Xvoid draw_group_arrow()
  603. X{
  604. X    draw_arrow(INDEX_TOP + (cur_groupnum-first_group_on_screen) );
  605. X}
  606. X
  607. X
  608. Xint choose_new_group ()
  609. X{
  610. X    char buf[LEN+1];
  611. X    char *p;
  612. X    int ret;
  613. X
  614. X    if (! parse_string (txt_newsgroup, buf))
  615. X        return -1;
  616. X
  617. X    for (p = buf; *p && (*p == ' ' || *p == '\t'); p++) ;
  618. X    if (*p == '\0')
  619. X        return -1;
  620. X
  621. X    clear_message ();
  622. X
  623. X    if ((ret = add_group (p, TRUE)) < 0) {
  624. X        sprintf (msg, txt_not_in_active_file, p);
  625. X        info_message (msg);
  626. X    }
  627. X
  628. X    return ret;
  629. X}
  630. X
  631. X
  632. X/*
  633. X *  Add a group to the selection list (my_group[])
  634. X *  Return the index of my_group[] if group is added or was already
  635. X *  there.  Return -1 if named group is not in active[].
  636. X */
  637. X
  638. Xint add_group (s, get_unread)
  639. X    char *s;
  640. X    int get_unread;            /* look in .newsrc for sequencer unread info? */
  641. X{
  642. X    long h;
  643. X    int i, j;
  644. X
  645. X    h = hash_groupname (s);
  646. X
  647. X    for (i = group_hash[h]; i >= 0; i = active[i].next) {
  648. X        if (strcmp (s, active[i].name) == 0) {
  649. X            for (j = 0; j < local_top; j++) {
  650. X                if (my_group[j] == i) {
  651. X                    return j;
  652. X                }
  653. X            }
  654. X
  655. X            active[i].flag &= ~NOTGOT;   /* mark that we got it */
  656. X            my_group[local_top] = i;
  657. X
  658. X            if (get_unread)
  659. X                unread[local_top] = get_line_unread (s, i);
  660. X            else
  661. X                unread[local_top] = -2;
  662. X
  663. X            local_top++;
  664. X            return local_top - 1;
  665. X        }
  666. X    }
  667. X
  668. X    return -1;
  669. X}
  670. X
  671. X/*
  672. X *  Find the next unread response in this group 
  673. X */
  674. X
  675. Xint next_unread(n)
  676. X    int n;
  677. X{
  678. X    while (n >= 0) {
  679. X        if (arts[n].unread == ART_UNREAD)
  680. X            return n;
  681. X        n = next_response (n);
  682. X    }
  683. X
  684. X    return -1;
  685. X}
  686. X
  687. X
  688. X/*
  689. X *  Find the previous unread response in this thread
  690. X */
  691. X
  692. Xint prev_unread(n)
  693. X    int n;
  694. X{
  695. X    while (n >= 0) {
  696. X        if (arts[n].unread == ART_UNREAD)
  697. X            return n;
  698. X        n = prev_response(n);
  699. X    }
  700. X
  701. X    return -1;
  702. X}
  703. X
  704. X
  705. Xint reposition_group (group, default_num)
  706. X    char *group;
  707. X    int default_num;
  708. X{
  709. X    char buf[LEN+1];
  710. X    char pos[LEN+1];
  711. X    int pos_num = 0;
  712. X
  713. X    sprintf (buf, txt_newsgroup_position, group);
  714. X    
  715. X    if (! parse_string (buf, pos)) 
  716. X        return default_num;
  717. X
  718. X    if (pos[0] == '\0')
  719. X        return default_num;
  720. X        
  721. X    if (pos[0] == '$') {
  722. X        pos_num = local_top;
  723. X    } else {
  724. X        pos_num = atoi (pos);
  725. X        if (pos_num > local_top) {
  726. X            pos_num = local_top;
  727. X        } else if (pos_num <= 0) {
  728. X            pos_num = 1;
  729. X        }
  730. X    }
  731. X
  732. X    wait_message (txt_moving);
  733. X    
  734. X    if (pos_group_in_newsrc (group, pos_num)) {
  735. X        read_newsrc (TRUE);
  736. X        return (pos_num-1);
  737. X    } else {
  738. X        return (default_num);
  739. X    }
  740. X}
  741. SHAR_EOF
  742. echo "File select.c is complete" &&
  743. $TOUCH -am 0821133491 select.c &&
  744. chmod 0600 select.c ||
  745. echo "restore of select.c failed"
  746. set `wc -c select.c`;Wc_c=$1
  747. if test "$Wc_c" != "17154"; then
  748.     echo original size 17154, current size $Wc_c
  749. fi
  750. # ============= time.c ==============
  751. echo "x - extracting time.c (Text)"
  752. sed 's/^X//' << 'SHAR_EOF' > time.c &&
  753. X/*
  754. X *  Project   : tin - a visual threaded usenet newsreader
  755. X *  Module    : time.c
  756. X *  Author    : R.Skrenta
  757. X *  Created   : 01-04-91
  758. X *  Updated   : 10-08-91
  759. X *  Release   : 1.0
  760. X *  Notes     :
  761. X *  Copyright : (c) Copyright 1991 by Rich Skrenta
  762. X *                You may  freely  copy or  redistribute  this software,
  763. X *              so  long as there is no profit made from its use, sale
  764. X *              trade or  reproduction.  You may not change this copy-
  765. X *              right notice, and it must be included in any copy made
  766. X */
  767. X
  768. X#include    <sys/types.h>
  769. X#include    <time.h>
  770. X
  771. X
  772. Xvoid nicedate(timestr, newstr)
  773. X    char *timestr, *newstr;
  774. X{
  775. X    int i;
  776. X
  777. X    for (i = 0; i <= 7; i++)
  778. X        *newstr++ = timestr[i];
  779. X    if (timestr[8] != ' ')
  780. X        *newstr++ = timestr[8];
  781. X    *newstr++ = timestr[9];
  782. X    *newstr++ = ',';
  783. X    *newstr++ = ' ';
  784. X    for (i = 20;i <= 23; i++)
  785. X        *newstr++ = timestr[i];
  786. X    *newstr++ = '\0';
  787. X}
  788. X
  789. Xvoid nicetime(timestr, newstr)
  790. X    char *timestr, *newstr;
  791. X{
  792. X    int hours;
  793. X    char dayornite[3];
  794. X
  795. X    if (timestr[11] == ' ')
  796. X        hours = timestr[12] - '0';
  797. X    else
  798. X        hours = (timestr[11]-'0')*10 + (timestr[12]-'0');
  799. X    if (hours < 12)
  800. X        strcpy(dayornite, "am");
  801. X    else
  802. X        strcpy(dayornite, "pm");
  803. X    if (hours >= 13)
  804. X        hours -= 12;
  805. X    if (!hours)
  806. X        hours = 12;
  807. X    sprintf(newstr, "%d:%c%c%s", hours, timestr[14],
  808. X                    timestr[15], dayornite);
  809. X}
  810. X
  811. Xchar *nice_time() {
  812. X    char *timestr;
  813. X    char the_date[17];
  814. X    char the_time[8];
  815. X    extern char *ctime();
  816. X    long time_now;
  817. X    static char buf[25];
  818. X
  819. X    time(&time_now);
  820. X    timestr = ctime(&time_now);
  821. X    nicedate(timestr, the_date);
  822. X    nicetime(timestr, the_time);
  823. X    sprintf(buf,"%s  %s", the_date, the_time);
  824. X    return(buf);
  825. X}
  826. X
  827. SHAR_EOF
  828. $TOUCH -am 0819091291 time.c &&
  829. chmod 0600 time.c ||
  830. echo "restore of time.c failed"
  831. set `wc -c time.c`;Wc_c=$1
  832. if test "$Wc_c" != "1611"; then
  833.     echo original size 1611, current size $Wc_c
  834. fi
  835. # ============= tin.h ==============
  836. echo "x - extracting tin.h (Text)"
  837. sed 's/^X//' << 'SHAR_EOF' > tin.h &&
  838. X/*
  839. X *  Project   : tin - a visual threaded usenet newsreader
  840. X *  Module    : tin.h
  841. X *  Author    : R.Skrenta / I.Lea
  842. X *  Created   : 01-04-91
  843. X *  Updated   : 20-08-91
  844. X *  Release   : 1.0
  845. X *  Notes     :
  846. X *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  847. X *                You may  freely  copy or  redistribute  this software,
  848. X *              so  long as there is no profit made from its use, sale
  849. X *              trade or  reproduction.  You may not change this copy-
  850. X *              right notice, and it must be included in any copy made
  851. X */
  852. X
  853. X#include    <stdio.h>
  854. X#include    <signal.h>
  855. X#include    <pwd.h>
  856. X#include    <sys/types.h>
  857. X#include    <memory.h>
  858. X#include    <ctype.h>
  859. X#include    <time.h>
  860. X#include    <sys/stat.h>
  861. X#ifdef BSD
  862. X#include    <strings.h>
  863. X#else
  864. X#include    <string.h>
  865. X#include    <malloc.h>
  866. X#endif /* BSD */
  867. X#ifdef SCO_UNIX
  868. X#include    <sys/streams.h>
  869. X#include    <sys/ptem.h>
  870. X#endif /* SCO_UNIX */
  871. X
  872. X#define BUG_REPORT_ADDRESS    "iain@estevax.uucp"
  873. X
  874. X#ifndef LIBDIR
  875. X#define        LIBDIR        "/usr/lib/news"
  876. X#endif
  877. X#ifndef SPOOLDIR
  878. X#define        SPOOLDIR    "/usr/spool/news"
  879. X#endif
  880. X
  881. X#define        RCDIR        ".tin"
  882. X#define        RCFILE        "tinrc"
  883. X#define        INDEXDIR    "index"
  884. X#define        KILLFILE    "kill"
  885. X#define        POSTFILE    "posted"
  886. X
  887. X#define        DEFAULT_SHELL    "/bin/sh"
  888. X#define        DEFAULT_MAILBOX    "Mail"
  889. X
  890. X#ifdef BSD
  891. X#define     DEFAULT_EDITOR    "/usr/ucb/vi"
  892. X#define        DEFAULT_MAILER    "/bin/rmail"
  893. X#define        DEFAULT_PRINTER    "/usr/ucb/lpr"
  894. X#define        DEFAULT_SUM        "sum"
  895. X#ifndef USE_LONG_FILENAMES
  896. X#define USE_LONG_FILENAMES
  897. X#endif
  898. X#else
  899. X#define     DEFAULT_EDITOR    "/usr/bin/vi"
  900. X#define        DEFAULT_MAILER    "/usr/bin/rmail"
  901. X#define        DEFAULT_PRINTER    "/usr/bin/lp"
  902. X#define        DEFAULT_SUM        "sum -r"
  903. X#endif
  904. X
  905. X#define        DEFAULT_ACTIVE_NUM    100        /* initial size of active array */
  906. X#define        DEFAULT_ARTICLE_NUM    400        /* initial size of art array */ 
  907. X#define        DEFAULT_KILL_NUM    10        /* initial size of kill array */ 
  908. X#define        DEFAULT_SAVE_NUM    10        /* initial size of save array */ 
  909. X
  910. X#define        TRUE        1
  911. X#define        FALSE        0
  912. X
  913. X#define        LEN        200
  914. X
  915. X#ifdef USE_LONG_FILENAMES
  916. X#define        LONG_PATH_PART    "part"
  917. X#define        LONG_PATH_PATCH    "patch"
  918. X#else
  919. X#define        LONG_PATH_PART    ""
  920. X#define        LONG_PATH_PATCH    "p"
  921. X#endif
  922. X
  923. X#define        INDEX_TOP        3
  924. X#define        NOTESLINES        (LINES - INDEX_TOP - 1)
  925. X#define        RIGHT_POS        (COLS - 16)
  926. X#define        MORE_POS        (COLS - 15)
  927. X
  928. X#define        SORT_BY_NONE    0        /* sort types on arts[] array */
  929. X#define        SORT_BY_SUBJ    1
  930. X#define        SORT_BY_FROM    2
  931. X#define        SORT_BY_DATE    3
  932. X
  933. Xextern int sort_art_type;
  934. X
  935. Xextern int max_subj;
  936. Xextern int max_from;
  937. X
  938. X#define        MAX_ARCH        38
  939. X#define        TABLE_SIZE        1409
  940. X
  941. X#define        MAX_PAGES        1000
  942. X
  943. X#ifdef BSD
  944. X#define CR    '\r'
  945. X#else
  946. X#define CR    10
  947. X#endif
  948. X
  949. X/*
  950. X * return codes for change_rcfile ()
  951. X */
  952. X
  953. X#define        NO_KILLING        0
  954. X#define        KILLING            1
  955. X
  956. X/*
  957. X *  art.thread
  958. X */
  959. X
  960. X#define        ART_NORMAL        -1
  961. X#define        ART_EXPIRED        -2
  962. X
  963. X/*
  964. X *  art.unread
  965. X */
  966. X
  967. X#define        ART_READ        0
  968. X#define        ART_UNREAD        1
  969. X#define        ART_WILL_RETURN    2
  970. X
  971. Xstruct header {
  972. X    long artnum;
  973. X    char *subject;    /* Subject: line from mail header */
  974. X    char *from;        /* From: line from mail header */
  975. X    int thread;
  976. X    int inthread;
  977. X    int unread;        /* 0 = read, 1 = unread, 2 = will return */
  978. X    char date[16];    /* Date: line from mail header */
  979. X    char *archive;    /* Archive-name: line from mail header */
  980. X    char *part;        /* part no. of archive */
  981. X    char *patch;    /* patch no. of archive */
  982. X    int tagged;        /* 0 = not killed/tagged, 1 = killed/tagged */
  983. X};
  984. X
  985. X/*
  986. X *  header.artnum:
  987. X *    article number in spool directory for group
  988. X *
  989. X *  header.thread:
  990. X *    initially -1
  991. X *    points to another arts[] (struct header): zero and up
  992. X *    -2 means article has expired (wasn't found in file search
  993. X *    of spool directory for the group)
  994. X *
  995. X *  header.inthread:
  996. X *    FALSE for the first article in a thread, TRUE for all
  997. X *    following articles in thread
  998. X *
  999. X *  header.read:
  1000. X *    boolean, has this article been read or not
  1001. X *
  1002. X *  header.date
  1003. X *  date: line used for sorting articles by date order
  1004. X *
  1005. X *  header.archive:
  1006. X *    archive name used in *source* groups
  1007. X *
  1008. X *  header.part:
  1009. X *    part no. of archive
  1010. X *
  1011. X *  header.patch:
  1012. X *    patch no. of archive
  1013. X *
  1014. X *  header.tagged:
  1015. X *    boolean, has this article been killed/tagged for saving or not
  1016. X */
  1017. X
  1018. Xstruct group_ent {
  1019. X    char *name;
  1020. X    long max;
  1021. X    long min;
  1022. X    int next;        /* next active entry in hash chain */
  1023. X    int flag;
  1024. X};
  1025. X
  1026. X#define        NOTGOT            0x01    /* haven't put in my_group yet */
  1027. X#define        SUBS            0x02    /* subscribed to */
  1028. X
  1029. X#define KILL_SUBJ    1
  1030. X#define KILL_FROM    2
  1031. X#define KILL_BOTH    3
  1032. X
  1033. Xstruct kill_t {
  1034. X    int kill_type;
  1035. X    long kill_group;
  1036. X    char *kill_subj;
  1037. X    char *kill_from;
  1038. X};
  1039. X
  1040. Xextern struct kill_t *killf;
  1041. Xextern int kill_num;
  1042. Xextern int max_kill;
  1043. X
  1044. X#define POST_PROC_SH        1
  1045. X#define POST_PROC_UUD        2
  1046. X#define POST_PROC_UUD_ZOO    3
  1047. X#define POST_PROC_UUD_LZH    4
  1048. X#define POST_PROC_UUD_ARC    5
  1049. X#define POST_PROC_UUD_ZIP    6
  1050. X#define POST_PROC_PATCH        7
  1051. X
  1052. Xstruct save_t {
  1053. X    char *subject;
  1054. X    char *dir;
  1055. X    char *file;
  1056. X    char *archive;
  1057. X    char *part;
  1058. X    char *patch;
  1059. X    int index;    
  1060. X    int saved;    
  1061. X    int is_mailbox;    
  1062. X};
  1063. X
  1064. Xextern struct save_t *save;
  1065. Xextern int save_num;
  1066. Xextern int max_save;
  1067. X
  1068. Xstruct screen_t {
  1069. X    char *col;
  1070. X};
  1071. X
  1072. Xextern struct screen_t *screen;
  1073. X
  1074. Xextern int debug;
  1075. Xextern int active_num;
  1076. Xextern int article_num;
  1077. Xextern int start_line_offset;
  1078. X
  1079. Xextern int read_news_via_nntp;
  1080. Xextern char nntp_server[LEN+1];
  1081. Xextern int top;
  1082. Xextern struct header *arts;
  1083. Xextern long *base;
  1084. Xextern int max_art;
  1085. X
  1086. Xextern int index_file_killed;
  1087. Xextern int save_separate;
  1088. Xextern int save_archive_name;
  1089. Xextern int show_author;
  1090. Xextern int draw_arrow_mark;
  1091. Xextern int kill_articles;
  1092. Xextern int post_process;
  1093. Xextern int mark_saved_read;
  1094. Xextern int post_proc_type;
  1095. Xextern int default_printer;
  1096. Xextern int print_header;
  1097. Xextern int num_of_tagged_files;
  1098. X
  1099. Xextern char rcdir[LEN+1];
  1100. Xextern char rcfile[LEN+1];
  1101. Xextern char indexdir[LEN+1];
  1102. Xextern char killfile[LEN+1];
  1103. Xextern char postfile[LEN+1];
  1104. X
  1105. Xextern char msg[LEN+1];
  1106. Xextern char userid[LEN+1];
  1107. Xextern char homedir[LEN+1];
  1108. Xextern char add_addr[LEN+1];
  1109. Xextern char reply_to[LEN+1];
  1110. Xextern char my_org[LEN+1];
  1111. Xextern char active_file[LEN+1];
  1112. Xextern char newsrc[LEN+1];
  1113. Xextern char newnewsrc[LEN+1];
  1114. Xextern char delgroups[LEN+1];
  1115. Xextern int top_base;
  1116. Xextern int LINES, COLS;
  1117. Xextern int group_hash[TABLE_SIZE];
  1118. X
  1119. Xextern char *version;
  1120. Xextern char cvers[LEN+1];
  1121. Xextern char progname[LEN+1];
  1122. Xextern char mailer[LEN+1];
  1123. Xextern char printer[LEN+1];
  1124. Xextern char spooldir[LEN+1];
  1125. Xextern char savedir[LEN+1];
  1126. Xextern char maildir[LEN+1];
  1127. Xextern char page_header[LEN+1];
  1128. Xextern char signature[LEN+1];
  1129. Xextern char sig[LEN+1];
  1130. Xextern char killsubj[LEN+1];
  1131. Xextern char killfrom[LEN+1];
  1132. Xextern char author_search_string[LEN+1];
  1133. Xextern char group_search_string[LEN+1];
  1134. Xextern char subject_search_string[LEN+1];
  1135. Xextern char art_search_string[LEN+1];
  1136. Xextern char default_regex_pattern[LEN+1];
  1137. X
  1138. Xextern int num_active;
  1139. Xextern struct group_ent *active;
  1140. Xextern int *my_group;
  1141. Xextern int *unread;
  1142. Xextern int max_active;
  1143. X
  1144. Xextern int local_top;
  1145. Xextern int catchup;
  1146. Xextern int update;
  1147. Xextern int verbose;
  1148. Xextern int inverse_okay;
  1149. X
  1150. Xextern int tin_uid;
  1151. Xextern int tin_gid;
  1152. Xextern int real_uid;
  1153. Xextern int real_gid;
  1154. Xextern int local_index;
  1155. X
  1156. Xextern char *strcpy();
  1157. Xextern char *strncat();
  1158. Xextern char *strncpy();
  1159. Xextern long atol();
  1160. X
  1161. X
  1162. X#define        ctrl(c)            ((c) & 0x1F)
  1163. X
  1164. X/*
  1165. X *  Assertion verifier
  1166. X */
  1167. X
  1168. X#ifdef __STDC__
  1169. X#define    assert(p)    if(! (p)) asfail(__FILE__, __LINE__, #p); else
  1170. X#else
  1171. X#define    assert(p)    if(! (p)) asfail(__FILE__, __LINE__, "p"); else
  1172. X#endif
  1173. X
  1174. X/*
  1175. X *  function prototypes    & language definitions    
  1176. X */ 
  1177. X
  1178. X#include    "proto.h"
  1179. X#include    "lang.h"
  1180. SHAR_EOF
  1181. $TOUCH -am 0822123191 tin.h &&
  1182. chmod 0600 tin.h ||
  1183. echo "restore of tin.h failed"
  1184. set `wc -c tin.h`;Wc_c=$1
  1185. if test "$Wc_c" != "7369"; then
  1186.     echo original size 7369, current size $Wc_c
  1187. fi
  1188. # ============= wildmat.c ==============
  1189. echo "x - extracting wildmat.c (Text)"
  1190. sed 's/^X//' << 'SHAR_EOF' > wildmat.c &&
  1191. X/*  $Revision: 1.4 $
  1192. X**
  1193. X**  Do shell-style pattern matching for ?, \, [], and * characters.
  1194. X**  Might not be robust in face of malformed patterns; e.g., "foo[a-"
  1195. X**  could cause a segmentation violation.  It is 8bit clean.
  1196. X**
  1197. X**  Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
  1198. X**  Rich $alz is now <rsalz@bbn.com>.
  1199. X**  April, 1991:  Replaced mutually-recursive calls with in-line code
  1200. X**  for the star character.
  1201. X**
  1202. X**  Special thanks to Lars Mathiesen <thorinn@diku.dk> for the ABORT code.
  1203. X**  This can greatly speed up failing wildcard patterns.  For example:
  1204. X**    pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-*
  1205. X**    text 1:     -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1
  1206. X**    text 2:     -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1
  1207. X**  Text 1 matches with 51 calls, while text 2 fails with 54 calls.  Without
  1208. X**  the ABORT, then it takes 22310 calls to fail.  Ugh.  The following
  1209. X**  explanation is from Lars:
  1210. X**  The precondition that must be fulfilled is that DoMatch will consume
  1211. X**  at least one character in text.  This is true if *p is neither '*' nor
  1212. X**  '\0'.)  The last return has ABORT instead of FALSE to avoid quadratic
  1213. X**  behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx".  With
  1214. X**  FALSE, each star-loop has to run to the end of the text; with ABORT
  1215. X**  only the last one does.
  1216. X**
  1217. X**  Once the control of one instance of DoMatch enters the star-loop, that
  1218. X**  instance will return either TRUE or ABORT, and any calling instance
  1219. X**  will therefore return immediately after (without calling recursively
  1220. X**  again).  In effect, only one star-loop is ever active.  It would be
  1221. X**  possible to modify the code to maintain this context explicitly,
  1222. X**  eliminating all recursive calls at the cost of some complication and
  1223. X**  loss of clarity (and the ABORT stuff seems to be unclear enough by
  1224. X**  itself).  I think it would be unwise to try to get this into a
  1225. X**  released version unless you have a good test data base to try it out
  1226. X**  on.
  1227. X*/
  1228. X
  1229. X#define TRUE            1
  1230. X#define FALSE            0
  1231. X#define ABORT            -1
  1232. X
  1233. X
  1234. X    /* What character marks an inverted character class? */
  1235. X#define NEGATE_CLASS        '^'
  1236. X    /* Is "*" a common pattern? */
  1237. X#define OPTIMIZE_JUST_STAR
  1238. X    /* Do tar(1) matching rules, which ignore a trailing slash? */
  1239. X#undef MATCH_TAR_PATTERN
  1240. X
  1241. X
  1242. X/*
  1243. X**  Match text and p, return TRUE, FALSE, or ABORT.
  1244. X*/
  1245. Xstatic int
  1246. XDoMatch(text, p)
  1247. X    register char    *text;
  1248. X    register char    *p;
  1249. X{
  1250. X    register int    last;
  1251. X    register int    matched;
  1252. X    register int    reverse;
  1253. X
  1254. X    for ( ; *p; text++, p++) {
  1255. X    if (*text == '\0' && *p != '*')
  1256. X        return ABORT;
  1257. X    switch (*p) {
  1258. X    case '\\':
  1259. X        /* Literal match with following character. */
  1260. X        p++;
  1261. X        /* FALLTHROUGH */
  1262. X    default:
  1263. X        if (*text != *p)
  1264. X        return FALSE;
  1265. X        continue;
  1266. X    case '?':
  1267. X        /* Match anything. */
  1268. X        continue;
  1269. X    case '*':
  1270. X        while (*++p == '*')
  1271. X        /* Consecutive stars act just like one. */
  1272. X        continue;
  1273. X        if (*p == '\0')
  1274. X        /* Trailing star matches everything. */
  1275. X        return TRUE;
  1276. X        while (*text)
  1277. X        if ((matched = DoMatch(text++, p)) != FALSE)
  1278. X            return matched;
  1279. X        return ABORT;
  1280. X    case '[':
  1281. X        reverse = p[1] == NEGATE_CLASS ? TRUE : FALSE;
  1282. X        if (reverse)
  1283. X        /* Inverted character class. */
  1284. X        p++;
  1285. X        for (last = 0400, matched = FALSE; *++p && *p != ']'; last = *p)
  1286. X        /* This next line requires a good C compiler. */
  1287. X        if (*p == '-' ? *text <= *++p && *text >= last : *text == *p)
  1288. X            matched = TRUE;
  1289. X        if (matched == reverse)
  1290. X        return FALSE;
  1291. X        continue;
  1292. X    }
  1293. X    }
  1294. X
  1295. X#ifdef    MATCH_TAR_PATTERN
  1296. X    if (*text == '/')
  1297. X    return TRUE;
  1298. X#endif    /* MATCH_TAR_ATTERN */
  1299. X    return *text == '\0';
  1300. X}
  1301. X
  1302. X
  1303. X/*
  1304. X**  User-level routine.  Returns TRUE or FALSE.
  1305. X*/
  1306. Xint
  1307. Xwildmat(text, p)
  1308. X    char    *text;
  1309. X    char    *p;
  1310. X{
  1311. X#ifdef    OPTIMIZE_JUST_STAR
  1312. X    if (p[0] == '*' && p[1] == '\0')
  1313. X    return TRUE;
  1314. X#endif    /* OPTIMIZE_JUST_STAR */
  1315. X    return DoMatch(text, p) == TRUE;
  1316. X}
  1317. SHAR_EOF
  1318. $TOUCH -am 0822180791 wildmat.c &&
  1319. chmod 0600 wildmat.c ||
  1320. echo "restore of wildmat.c failed"
  1321. set `wc -c wildmat.c`;Wc_c=$1
  1322. if test "$Wc_c" != "3866"; then
  1323.     echo original size 3866, current size $Wc_c
  1324. fi
  1325. # ============= tin.1 ==============
  1326. echo "x - extracting tin.1 (Text)"
  1327. sed 's/^X//' << 'SHAR_EOF' > tin.1 &&
  1328. X.TH TIN 1 "Version 1.00"
  1329. X.SH NAME
  1330. Xtin \- Visual threaded Usenet news reader
  1331. X.SH SYNOPSIS
  1332. X.nf
  1333. Xtin [options] [newsgroups]
  1334. X.fi
  1335. X.SH DESCRIPTION
  1336. XTin is a full screen threaded Usenet newsreader. It can read news
  1337. Xlocally (ie. \fI/usr/spool/news\fP) or remotely by interacting with
  1338. XNNTP (Network News Transport Protocol). 
  1339. X.PP
  1340. XTin has three newsreading levels:
  1341. Xthe newsgroup selection page, the group index page and the article viewer.
  1342. XUse the 'h' (help) command to view a list of the commands available at a
  1343. Xparticular level, or the 'H' command to view context sensitive help.
  1344. X.PP
  1345. XOn startup Tin will show a list of the newsgroups found in \fI$HOME/.newsrc\fP.
  1346. XAn arrow '->' or highlighted bar will point to the first newsgroup.
  1347. XMove to a group by using the terminal arrow keys (ansi/at386/vt100 only) or
  1348. X'j' and 'k'. Use PgUp/PgDn (ansi/at386/vt100 only) or Ctrl-U and Ctrl-D to 
  1349. Xpage up/down. Enter a newsgroup by pressing RETURN.
  1350. X.PP
  1351. XThe TAB key may be used to advance to the next newsgroup with unread articles
  1352. Xand enter it.
  1353. X.SH OPTIONS
  1354. X.TP 10
  1355. X\fB-c\fP
  1356. Xcreate/update index files for every group in \fI$HOME/.newsrc\fP or 
  1357. Xfile specified by -f option and mark all articles as read.
  1358. X.TP
  1359. X\fB-d dir\fP
  1360. Xsave articles to directory. Default is \fI$HOME/News\fP.
  1361. X.TP
  1362. X\fB-f file\fP
  1363. XUse the indicated file in place of \fI$HOME/.newsrc\fP.
  1364. X.TP
  1365. X\fB-h\fP
  1366. Xhelp.
  1367. X.TP
  1368. X\fB-m file\fP
  1369. Xmail program to use for sending mail. Default is \fI/usr/ucb/mail\fP.
  1370. X.TP
  1371. X\fB-M dir\fP
  1372. Xmailbox directory to use. Default is \fI$HOME/Mail\fP.
  1373. X.TP
  1374. X\fB-p file\fP
  1375. Xprint program with options. Default is \fI/usr/ucb/lpr\fP.
  1376. X.TP
  1377. X\fB-r\fP
  1378. Xread news remotely from the default NNTP server specified in the
  1379. Xenvironment variable NNTPSERVER or contained in the file
  1380. X\fI/etc/nntpserver\fP.
  1381. X.TP
  1382. X\fB-S dir\fP
  1383. Xspool directory where news is stored. Default is \fI/usr/spool/news\fP.
  1384. X.TP
  1385. X\fB-u\fP
  1386. Xcreate/update index files for every group in \fI$HOME/.newsrc\fP or 
  1387. Xfile specified by -f option.
  1388. X.TP
  1389. X\fB-v\fP
  1390. Xcreate/update index files for every group in \fI$HOME/.newsrc\fP or 
  1391. Xfile specified by -f option. Each group name is printed to stdout as
  1392. Xit is updated.
  1393. X.PP
  1394. XTin can also dynamically change its options by the 'M' menu command. 
  1395. XAny changes are written to \fI$HOME/.tin/tinrc\fP.
  1396. X.SH INDEX FILES
  1397. XIn order to keep track of threads, Tin maintains an index for each group.
  1398. XIf Tin is made setuid to news, the indexes will be stored in the news spool
  1399. Xdirectory (typically \fI/usr/spool/news\fP). If Tin is not setuid, it
  1400. Xwill store index files in the subdirectory \fI$HOME/.tin/index\fP.
  1401. XDo not make Tin setuid news if news will be obtained via NNTP and not
  1402. Xfrom \fI/usr/spool/news\fP.
  1403. X.PP
  1404. XEntering a group the first time tends to be slow because the index file must
  1405. Xbe built from scratch.  Subsequent readings of a group will cause
  1406. XTin to incrementally update the index file, adding or removing entries as new
  1407. Xarticles come in or as news expires. If reading news remotely indexing
  1408. Xwill be somewhat slower because the articles must be retrieved via the
  1409. XNNTP.
  1410. X.PP
  1411. XA good way to keep Tin index files current is to run tin -u from cron:
  1412. X
  1413. X.nf
  1414. X20 6 * * *    /usr/local/bin/tin -u -f /usr/lib/news/tin_groups
  1415. X.fi
  1416. X
  1417. XThis would update the index files for those groups appearing in
  1418. X\fI/usr/lib/news/tin_groups\fP.  To index all of the groups on the
  1419. Xsystem, run tin -u with -f indicating the active file:
  1420. X
  1421. X.nf
  1422. X20 6 * * *    /usr/local/bin/tin -u -f /usr/lib/news/active
  1423. X.fi
  1424. X.SH SCREEN FORMAT
  1425. XTin has three separate levels of operation: Selection Group level, Group level
  1426. Xand Article level.
  1427. X.PP
  1428. XAt the Selection Group level the newsgroups are displayed on the left
  1429. Xof the screen with the number of unread articles displayed on the same 
  1430. Xline in the middle of the screen.
  1431. X
  1432. X    <Selection Num>    <Newsgroup>    <Num of unread articles>
  1433. X.br
  1434. Xie.
  1435. X.br
  1436. X    1    alt.sources            10
  1437. X.br
  1438. X    2    comp.sources.misc        3
  1439. X.br
  1440. X    3    news.software.readers        12
  1441. X
  1442. X.PP
  1443. XAt the Group level the following formats are possible:
  1444. X
  1445. X    <Selection Num>    <Unread>    <Subject>    <Responses>    <Author>
  1446. X.br
  1447. Xor
  1448. X.br
  1449. X    <Selection Num>    <Unread>    <Subject (longer)>    <Responses>
  1450. X.br
  1451. Xie.
  1452. X.br
  1453. X    1    +    Bnews sources?    3    iain@estevax
  1454. X.br
  1455. X    2        This question has    1    ether@net
  1456. X.br
  1457. Xor
  1458. X.br
  1459. X    1    +    Bnews sources?            3
  1460. X.br
  1461. X    2        This question has a long subject line    1
  1462. X.PP  
  1463. XAt the Article level the page header has the following format:
  1464. X
  1465. X    <Date posted>        <Newsgroup>        <Note 1 of n>
  1466. X.br
  1467. X    <Article Num>        <Subject>        <Num of responses in thread>
  1468. X.br
  1469. X    <Author>                    <Organization>
  1470. X.br
  1471. X
  1472. X    <Article body>
  1473. X.br
  1474. Xie.
  1475. X.br
  1476. X    24 Jul 15:20:03 GMT    alt.sources        Note 1 of 2
  1477. X.br
  1478. X    Article 452        Bnews sources?    3 responses
  1479. X.br
  1480. X    iain@estevax                    Siemens AG, Germany
  1481. X.br
  1482. X
  1483. X    <Article boby>
  1484. X.SH COMMON MOVING KEYS
  1485. XThis table shows the common keys/commands for moving at all three levels 
  1486. Xwithin Tin.
  1487. X                ansi/at386/vt100    Other Terminals
  1488. X.br
  1489. XBeginning of list/article        \fBHome\fP            \fB1\fP (\fB^R\fP at article level)
  1490. X.br
  1491. XEnd of list/article        \fBEnd\fP            \fB$\fP
  1492. X.br
  1493. XPage Up            \fBPgUp\fP            \fB^U\fP or \fBb\fP
  1494. X.br
  1495. XPage Down            \fBPgDn\fP            \fB^D\fP or \fB<SPACE>\fP
  1496. X.br
  1497. XLine Up                \fBUp arrow\fP        \fBk\fP (not at article level)
  1498. X.br
  1499. XLine Down            \fBDown arrow\fP        \fBj\fP (not at article level)
  1500. X.SH NEWSGROUP SELECTION COMMANDS
  1501. X.TP 10
  1502. X\fB4\fP
  1503. XSelect group 4.
  1504. X.TP
  1505. X\fB^K\fP
  1506. XDelete current group from \fI$HOME/.newsrc\fP file.
  1507. X.TP
  1508. X\fB^L\fP
  1509. XRedraw page.
  1510. X.TP
  1511. X\fB^R\fP
  1512. XReset \fI$HOME/.newsrc\fP file.
  1513. X.TP
  1514. X\fB<CR>\fP
  1515. XRead current group.
  1516. X.TP
  1517. X\fB<TAB>\fP
  1518. XView next unread group.
  1519. X.TP
  1520. X\fBB\fP
  1521. XMail a bug/gripe/comment to the author of tin. This is the best way
  1522. Xof getting bugs fixed and features add/changed.
  1523. X.TP
  1524. X\fBc\fP
  1525. XMark current group as all read.
  1526. X.TP
  1527. X\fBg\fP
  1528. XChoose a new group by name. The position of the group within the group
  1529. Xlist will also be asked for. By entering '1' the new group will be the
  1530. Xfirst group in the displayed list, by entering '8' the group will be
  1531. Xthe eighth group in the list etc. By entering '$' the group will be the
  1532. Xlast group displayed.
  1533. X.TP
  1534. X\fBh\fP
  1535. Xhelp screen of newsgroup selection commands.
  1536. X.TP
  1537. X\fBH\fP
  1538. Xhelp screen of context sensitive help about newsgroup selection level.
  1539. X.TP
  1540. X\fBI\fP
  1541. XToggle inverse video.
  1542. X.TP
  1543. X\fBj\fP
  1544. XDown a line.
  1545. X.TP
  1546. X\fBk\fP
  1547. XUp a line.
  1548. X.TP
  1549. X\fBm\fP
  1550. XMove the current group within the group selection list.
  1551. XBy entering '1' the group will become the first displayed group in
  1552. Xthe list, by entering '8' the eighth group in the list etc. By
  1553. Xentering '$' the group will be the last group displayed.
  1554. X.TP
  1555. X\fBM\fP
  1556. XUser configurable options menu (for more information see section Options Menu). 
  1557. X.TP
  1558. X\fBq\fP
  1559. XQuit tin.
  1560. X.TP
  1561. X\fBs\fP
  1562. XSubscribe to current group.
  1563. X.TP
  1564. X\fBS\fP
  1565. XSubscribe to groups matching user specified pattern.
  1566. X.TP
  1567. X\fBu\fP
  1568. XUnsubscribe to current group.
  1569. X.TP
  1570. X\fBU\fP
  1571. XUnsubscribe to groups matching user specified pattern.
  1572. X.TP
  1573. X\fBW\fP
  1574. XList articles posted by user. The date posted, the newsgroup and the
  1575. Xsubject are listed.
  1576. X.TP
  1577. X\fBy\fP
  1578. XThe first time this command is called it will yank in all groups from
  1579. X\fI/usr/local/news/active\fP that are not in \fI$HOME/.newsrc\fP.
  1580. XAfter any groups have been subscribed/unsubscribed to, this command
  1581. Xif pressed again will reread \fI$HOME/.newsrc\fP and display only
  1582. Xsubscribed groups.
  1583. X.TP
  1584. X\fBY\fP
  1585. XReread group list from \fI$HOME/.newsrc\fP file.
  1586. X.TP
  1587. X\fBz\fP
  1588. XUndelete previously delete group from \fI$HOME/.newsrc\fP file.
  1589. X.TP
  1590. X\fB/\fP
  1591. XGroup forward search.
  1592. X.TP
  1593. X\fB?\fP
  1594. XGroup backward search.
  1595. X.SH GROUP INDEX COMMANDS
  1596. X.TP 10
  1597. X\fB4\fP
  1598. XSelect article 4.
  1599. X.TP
  1600. X\fB^K\fP
  1601. XKill current article (for more information read section Kill Article Menu).
  1602. X.TP
  1603. X\fB^L\fP
  1604. XRedraw page.
  1605. X.TP
  1606. X\fB<CR>\fP
  1607. XRead current article.
  1608. X.TP
  1609. X\fB<TAB>\fP
  1610. XView next unread article or group.
  1611. X.TP
  1612. X\fBa\fP
  1613. XAuthor forward search.
  1614. X.TP
  1615. X\fBA\fP
  1616. XAuthor backward search.
  1617. X.TP
  1618. X\fBB\fP
  1619. XMail a bug/gripe/comment to the author of tin. This is the best way
  1620. Xof getting bugs fixed and features add/changed.
  1621. X.TP
  1622. X\fBc\fP
  1623. XMark all articles as read.
  1624. X.TP
  1625. X\fBg\fP
  1626. XChoose a new group by name.
  1627. X.TP
  1628. X\fBh\fP
  1629. Xhelp screen of group index commands.
  1630. X.TP
  1631. X\fBH\fP
  1632. Xhelp screen of context sensitive help about group index level.
  1633. X.TP
  1634. X\fBI\fP
  1635. XToggle inverse video.
  1636. X.TP
  1637. X\fBj\fP
  1638. XDown a line.
  1639. X.TP
  1640. X\fBk\fP
  1641. XUp a line.
  1642. X.TP
  1643. X\fBK\fP
  1644. XMark article/thread as read and advance to next unread article/thread. 
  1645. X.TP
  1646. X\fBM\fP
  1647. XUser configurable options menu (for more information see section Options Menu). 
  1648. X.TP
  1649. X\fBn\fP
  1650. XGo to next group.
  1651. X.TP
  1652. X\fBN\fP
  1653. XGo to next unread group.
  1654. X.TP
  1655. X\fBp\fP
  1656. XGo to previous group.
  1657. X.TP
  1658. X\fBP\fP
  1659. XGo to previous unread group.
  1660. X.TP
  1661. X\fBq\fP
  1662. XQuit tin.
  1663. X.TP
  1664. X\fBs\fP
  1665. XSubscribe to this group.
  1666. X.TP
  1667. X\fBS\fP
  1668. XSave articles matching a user specifed regular expression pattern
  1669. X(i.e., "Test*" matches "Test subject", but not "A Test subject"). 
  1670. X.TP
  1671. X\fBT\fP
  1672. XTag current article for saving in a set order by 'S' command.
  1673. X.TP
  1674. X\fBt\fP
  1675. XReturn to group selection index.
  1676. X.TP
  1677. X\fBu\fP
  1678. XUnsubscribe to this group.
  1679. X.TP
  1680. X\fBU\fP
  1681. XUntag all articles that were tagged for saving.
  1682. X.TP
  1683. X\fBw\fP
  1684. XPost an article.
  1685. X.TP
  1686. X\fBW\fP
  1687. XList articles posted by user. The date posted, the newsgroup and the
  1688. Xsubject are listed.
  1689. X.TP
  1690. X\fBz\fP
  1691. XMark current article as unread.
  1692. X.TP
  1693. X\fBZ\fP
  1694. XMark current thread as unread.
  1695. X.TP
  1696. X\fB/\fP
  1697. XSearch forward for specified subject.
  1698. X.TP
  1699. X\fB?\fP
  1700. XSearch backward for specified subject.
  1701. X.TP
  1702. X\fB-\fP
  1703. XShow last message.
  1704. X.SH ARTICLE COMMANDS
  1705. X.TP 10
  1706. X\fB0\fP
  1707. XRead the base article in this thread. 
  1708. X.TP
  1709. X\fB4\fP
  1710. XRead response 4 in this thread.
  1711. X.TP
  1712. X\fB^H\fP
  1713. XShow all of the articles mail header.
  1714. X.TP
  1715. X\fB^K\fP
  1716. XKill current article (for more information read section Kill Article Menu).
  1717. X.TP
  1718. X\fB^L\fP
  1719. XRedraw page.
  1720. X.TP
  1721. X\fB<CR>\fP
  1722. XSkip to next base article.
  1723. X.TP
  1724. X\fB<TAB>\fP
  1725. XAdvance to next page or unread article.
  1726. X.TP
  1727. X\fBa\fP
  1728. XAuthor forward search.
  1729. X.TP
  1730. X\fBA\fP
  1731. XAuthor backward search.
  1732. X.TP
  1733. X\fBB\fP
  1734. XMail a bug/gripe/comment to the author of tin. This is the best way
  1735. Xof getting bugs fixed and features add/changed.
  1736. X.TP
  1737. X\fBc\fP
  1738. XMark all articles as read.
  1739. X.TP
  1740. X\fBd\fP
  1741. XToggle rot-13 decoding for this article.
  1742. X.TP
  1743. X\fBf\fP
  1744. XPost a followup.
  1745. X.TP
  1746. X\fBF\fP
  1747. XPost a followup with a copy of the article included.
  1748. X.TP
  1749. X\fBh\fP
  1750. Xhelp screen of article page commands.
  1751. X.TP
  1752. X\fBH\fP
  1753. Xhelp screen of context sensitive help about article page level.
  1754. X.TP
  1755. X\fBi\fP
  1756. XReturn to index page.
  1757. X.TP
  1758. X\fBI\fP
  1759. XToggle inverse video.
  1760. X.TP
  1761. X\fBk\fP
  1762. XMark article as read and advance to next unread article.
  1763. X.TP
  1764. X\fBK\fP
  1765. XMark thread as read and advance to next unread thread.
  1766. X.TP
  1767. X\fBm\fP
  1768. XMail this article to someone.
  1769. X.TP
  1770. X\fBM\fP
  1771. XUser configurable options menu (for more information see section Options Menu). 
  1772. X.TP
  1773. X\fBn\fP
  1774. XGo to to the next article.
  1775. X.TP
  1776. X\fBN\fP
  1777. XGo to to the next unread article.
  1778. X.TP
  1779. X\fBo\fP
  1780. XOutput article to printer.
  1781. X.TP
  1782. X\fBO\fP
  1783. XOutput thread to printer.
  1784. X.TP
  1785. X\fBp\fP
  1786. XGo to the previous article.
  1787. X.TP
  1788. X\fBP\fP
  1789. XGo to the previous unread article.
  1790. X.TP
  1791. X\fBq\fP
  1792. XQuit tin.
  1793. X.TP
  1794. X\fBr\fP
  1795. XReply through mail to author.
  1796. X.TP
  1797. X\fBR\fP
  1798. XReply through mail to author with a copy of the article included.
  1799. X.TP
  1800. X\fBs\fP
  1801. XSave article to file.
  1802. X.TP
  1803. X\fBS\fP
  1804. XSave thread to file.
  1805. X.TP
  1806. X\fBt\fP
  1807. XReturn to group selection index.
  1808. X.TP
  1809. X\fBw\fP
  1810. XPost an article.
  1811. X.TP
  1812. X\fBW\fP
  1813. XList articles posted by user. The date posted, the newsgroup and the
  1814. Xsubject are listed.
  1815. X.TP
  1816. X\fBz\fP
  1817. XMark article as unread.
  1818. X.TP
  1819. X\fB|\fP
  1820. XPipe article into command.
  1821. X.TP
  1822. X\fB/\fP
  1823. XArticle forward search.
  1824. X.TP
  1825. X\fB?\fP
  1826. XArticle backward search
  1827. X.SH OPTIONS MENU
  1828. XThis menu is accessed by pressing 'M' at all levels. It allows the user
  1829. Xto customize the behaviour of tin. The options are saved to the file
  1830. X\fI$HOME/.tin/tinrc\fP. The following options are settable:
  1831. X.TP 4
  1832. X\fBAuto save\fP
  1833. XAutomatically save articles/threads by Archive-name: line in article
  1834. Xheader. This is useful to set ON in conjunction with 'Save separate'
  1835. Xand 'Save to subdir'. Use <SPACE> to set ON/OFF.
  1836. X.TP
  1837. X\fBSave separate\fP
  1838. XSave articles/threads to separate files. Set ON if saving source code.
  1839. XSet OFF if saving a coversational thread. Use <SPACE> to set ON/OFF.
  1840. X.TP
  1841. X\fBMark saved read\fP
  1842. XThis allows saved articles/threads to be automatically marked as
  1843. Xhaving been read. Use <SPACE> to set ON/OFF.
  1844. X.TP
  1845. X\fBKill articles\fP
  1846. XThis allows the user to kill articles that match entries in the kill
  1847. Xfile \fI$HOME/.tin/kill\fP. Use <SPACE> to set ON/OFF.
  1848. X.TP
  1849. X\fBShow Author\fP
  1850. XIf set ON the Subject: & From: (author) lines from the articles header
  1851. Xare displayed. If set OFF only the Subject: line is displayed which 
  1852. Xallows more of it to be displayed. Use <SPACE> to set ON/OFF.
  1853. X.TP
  1854. X\fBDraw arrow\fP
  1855. XAllows groups/articles to be selected by an arrow '->' if set ON or
  1856. Xby an highlighted bar if set OFF. Use <SPACE> to set ON/OFF.
  1857. X.TP
  1858. X\fBPost process\fP
  1859. XThis allows post processing (ie. unsharing of a shell archive, uudecoding
  1860. Xof multi-part source files) of a saved article/thread. Use <SPACE> to
  1861. Xset ON/OFF.
  1862. X.TP
  1863. X\fBPrint header\fP
  1864. XThis allows the complete mail header or only the Siubject: and From:
  1865. Xfields to be output when printing an article 'o'/thread 'O'. Use
  1866. X<SPACE> to set ON/OFF.
  1867. X.TP
  1868. X\fBProcess type\fP
  1869. XThis specifies the type of post processing to perform on a saved
  1870. Xarticle/thread. The following types of processing are allowed:
  1871. X.(S
  1872. X.**
  1873. Xunpacking of multi-part shell archives. 
  1874. X.**
  1875. Xunpacking of multi-part uuencoded files.
  1876. X.**
  1877. Xunpacking of multi-part uuencoded files that produce a *.zoo archive.
  1878. XThe contents of the *.zoo archive can be listed or extracted.
  1879. X.**
  1880. Xunpacking of multi-part uuencoded files that produce a *.lzh archive.
  1881. XThe contents of the *.lzh archive can be listed or extracted.
  1882. X.**
  1883. Xunpacking of multi-part uuencoded files that produce a *.arc archive.
  1884. XThe contents of the *.arc archive can be listed or extracted.
  1885. X.**
  1886. Xunpacking of multi-part uuencoded files that produce a *.zip archive.
  1887. XThe contents of the *.zip archive can be listed or extracted.
  1888. X.**
  1889. Xunpacking of multi-part patches for use by \fIpatch\fP and applying 
  1890. Xthem to specified source files.
  1891. X.)S
  1892. XUse <SPACE> to set the required type.
  1893. X.TP
  1894. X\fBSort articles by\fP
  1895. XThis specifies how articles should be sorted. The following sort
  1896. Xtypes are allowed:
  1897. X.(S
  1898. X.**
  1899. Xdon't sort articles (default).
  1900. X.**
  1901. Xsort articles by Subject: field.
  1902. X.**
  1903. Xsort articles by From: field.
  1904. X.**
  1905. Xsort articles by Date: field.
  1906. X.)S
  1907. XUse <SPACE> to set the required type.
  1908. X.TP
  1909. X\fBSave directory\fP
  1910. XThe directory where articles/threads are to be saved. Default is
  1911. X\fI$HOME/News\fP.
  1912. X.TP
  1913. X\fBMail directory\fP
  1914. XThe directory where articles/threads are to be saved in mailbox format.
  1915. XThis feature is mainly for use with the Elm mail program. It allows
  1916. Xthe user to save articles/threads/groups simply by giving '=' as
  1917. Xthe filename to save to.
  1918. X.TP
  1919. X\fBPrinter\fP
  1920. XThe printer program with options that is to be used to print
  1921. Xarticles/threads. Default is lpr for BSD machines and lp for SysV 
  1922. Xmachines.  
  1923. X.SH KILL ARTICLE MENU
  1924. XThis menu is accessed by pressing '^K' at the group and page levels. It
  1925. Xallows the user to kill an article that matches the current Subject:
  1926. Xline, From: line or a string entered by the user. The user entered string
  1927. Xcan be applied to the Subject: or From: lines of an article. The kill
  1928. Xdescription can be limited to the current newsgroup or it can apply to all newsgroups.
  1929. XOnce entered the user can abort the command and not save the kill
  1930. Xdescription, edit the kill file or save the kill description.
  1931. X.PP
  1932. XOn starting tin the users killfile \fI$HOME/.tin/kill\fP is read and
  1933. Xon entering a newsgroup any kill descriptions are applied. Articles
  1934. Xthat match a kill description are marked killed and are not displayed. 
  1935. X.PP
  1936. XThe 'Kill articles' option needs to be set ON in the Options Menu
  1937. X(selected by 'M' at any level) to activate this command.
  1938. X.SH POSTING ARTICLES
  1939. X<to be written>
  1940. X.SH SAVING AND POST PROCESSING
  1941. X<to be written>
  1942. X.SH SIGNATURES
  1943. XTin will recognize a signature in either \fI$HOME/.signature\fP or
  1944. X\fI$HOME/.Sig\fP. If \fI$HOME/.signature\fP exists, then the signature
  1945. Xwill be pulled into the editor for Tin mail commands.  A signature in
  1946. X\fI$HOME/.signature\fP will not be pulled into the editor for posting
  1947. Xcommands since the inews program will append the signature itself.
  1948. X.PP
  1949. XA signature in \fI$HOME/.Sig\fP will be pulled into the editor for both
  1950. Xposting and mailing commands.
  1951. X.PP
  1952. XThe following is an example of a \fI$HOME/.Sig\fP file:
  1953. X.PP
  1954. X.br
  1955. X    EMAIL  norisc!iain@estevax.UUCP  ...!unido!estevax!norisc!iain
  1956. X.br
  1957. X    SNAIL  Siemens AG, AUT 922C, Postfach 4848, Nuernberg, Germany
  1958. X.br
  1959. X    PHONE  +49-911-895-3853
  1960. X.SH ENVIROMENT VARIABLES
  1961. X.TP 18
  1962. X\fBNNTPSERVER\fP
  1963. XThe default NNTP server to remotely read news from. This variable only
  1964. Xneeds to be set if the -r command line option is specified and the file
  1965. X\fI/etc/nntpserver\fP does not exist.
  1966. X.TP
  1967. X\fBORGANIZATION\fP
  1968. XSet the mail header field Organization: to the contents of the
  1969. Xvariable instead of the system default. This variable has precedence
  1970. Xover the file \fI$HOME/.tin/organization\fP that may also contain an
  1971. Xorganization string.
  1972. X.TP
  1973. X\fBREPLY_TO\fP
  1974. XSet the mail header field Reply-To: to the return address specified 
  1975. Xby the variable.
  1976. XThis is useful if the machine is not registered in the UUCP mail maps
  1977. Xor if you wish to recieve replies at a different machine.
  1978. XThis variable has precedence over the file \fI$HOME/.tin/reply_to\fP
  1979. Xthat may also contain a return address.
  1980. X.TP
  1981. X\fBADD_ADDR\fP
  1982. XThis can contain an address to append to the return address when replying
  1983. Xdirectly through mail to somebody whose mail address is not directly 
  1984. Xrecognized by the local host. For example say the return address is
  1985. X\fIuser@bigvax\fP, but \fIbigvax\fP is not recognized by your host, so
  1986. Xtherfore the mail will not reach \fIuser\fP. But the host \fIlittevax\fP
  1987. Xis known to recognize your host and \fIbigvax\fP, so if ADD_ADDR is set
  1988. X(ie. 'setenv ADD_ADDR @littevax' for csh or 'set ADD_ADDR @littevax' 
  1989. Xand 'export ADD_ADDR' for sh) the address \fIuser@bigvax@littlevax\fP will
  1990. SHAR_EOF
  1991. echo "End of tin part 7"
  1992. echo "File tin.1 is continued in part 8"
  1993. echo "8" > shar3_seq_.tmp
  1994. exit 0
  1995.  
  1996. --
  1997. NAME   Iain Lea
  1998. EMAIL  norisc!iain@estevax.UUCP  ...!unido!estevax!norisc!iain
  1999. SNAIL  Siemens AG, AUT 922C, Postfach 4848, Nuernberg, Germany
  2000. PHONE  +49-911-895-3853, +49-911-895-3877, +49-911-331963
  2001.