home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3956 < prev    next >
Encoding:
Internet Message Format  |  1991-09-04  |  40.2 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.0 Patchlevel 1 Newsreader (part 08/08)
  5. Message-ID: <606@norisc.UUCP>
  6. Date: 3 Sep 91 11:03:18 GMT
  7. Sender: iain@norisc.UUCP (Iain Lea)
  8. Organization: What organization?
  9. Lines: 1488
  10.  
  11. Submitted-by: iain@estevax.uucp
  12. Archive-name: tin1.0/part08
  13.  
  14. #!/bin/sh
  15. # this is tin.shar.08 (part 8 of tin1.0)
  16. # do not concatenate these parts, unpack them in order with /bin/sh
  17. # file time.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" != 8; 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 time.c"
  36. sed 's/^X//' << 'SHAR_EOF' >> time.c &&
  37. X{
  38. X    int hours;
  39. X    char dayornite[3];
  40. X
  41. X    if (timestr[11] == ' ')
  42. X        hours = timestr[12] - '0';
  43. X    else
  44. X        hours = (timestr[11]-'0')*10 + (timestr[12]-'0');
  45. X    if (hours < 12)
  46. X        strcpy(dayornite, "am");
  47. X    else
  48. X        strcpy(dayornite, "pm");
  49. X    if (hours >= 13)
  50. X        hours -= 12;
  51. X    if (!hours)
  52. X        hours = 12;
  53. X    sprintf(newstr, "%d:%c%c%s", hours, timestr[14],
  54. X                    timestr[15], dayornite);
  55. X}
  56. X
  57. Xchar *nice_time() {
  58. X    char *timestr;
  59. X    char the_date[17];
  60. X    char the_time[8];
  61. X    extern char *ctime();
  62. X    long time_now;
  63. X    static char buf[25];
  64. X
  65. X    time(&time_now);
  66. X    timestr = ctime(&time_now);
  67. X    nicedate(timestr, the_date);
  68. X    nicetime(timestr, the_time);
  69. X    sprintf(buf,"%s  %s", the_date, the_time);
  70. X    return(buf);
  71. X}
  72. X
  73. SHAR_EOF
  74. echo "File time.c is complete" &&
  75. $TOUCH -am 0903095091 time.c &&
  76. chmod 0600 time.c ||
  77. echo "restore of time.c failed"
  78. set `wc -c time.c`;Wc_c=$1
  79. if test "$Wc_c" != "1611"; then
  80.     echo original size 1611, current size $Wc_c
  81. fi
  82. # ============= tin.h ==============
  83. echo "x - extracting tin.h (Text)"
  84. sed 's/^X//' << 'SHAR_EOF' > tin.h &&
  85. X/*
  86. X *  Project   : tin - a visual threaded usenet newsreader
  87. X *  Module    : tin.h
  88. X *  Author    : R.Skrenta / I.Lea
  89. X *  Created   : 01-04-91
  90. X *  Updated   : 03-09-91
  91. X *  Release   : 1.0
  92. X *  Notes     :
  93. X *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  94. X *                You may  freely  copy or  redistribute  this software,
  95. X *              so  long as there is no profit made from its use, sale
  96. X *              trade or  reproduction.  You may not change this copy-
  97. X *              right notice, and it must be included in any copy made
  98. X */
  99. X
  100. X#include    <stdio.h>
  101. X#include    <signal.h>
  102. X#include    <pwd.h>
  103. X#include    <sys/types.h>
  104. X#include    <memory.h>
  105. X#include    <ctype.h>
  106. X#include    <time.h>
  107. X#include    <sys/stat.h>
  108. X
  109. X#ifdef BSD
  110. X#include    <strings.h>
  111. X#else
  112. X#include    <string.h>
  113. X#include    <malloc.h>
  114. X#endif
  115. X
  116. X#ifdef SCO_UNIX
  117. X#include    <sys/streams.h>
  118. X#include    <sys/ptem.h>
  119. X#endif
  120. X
  121. X#ifdef SIGWINCH
  122. X#include    <sys/ioctl.h>
  123. X#endif
  124. X
  125. X#include    "patchlevel.h"
  126. X
  127. X
  128. X#define BUG_REPORT_ADDRESS    "iain@estevax.uucp"
  129. X
  130. X#ifndef SPOOLDIR
  131. X#define        SPOOLDIR        "/usr/spool/news"
  132. X#endif
  133. X#ifndef LIBDIR
  134. X#define        LIBDIR            "/usr/lib/news"
  135. X#endif
  136. X#ifndef INEWSDIR
  137. X#define        INEWSDIR        LIBDIR
  138. X#endif
  139. X
  140. X#define        RCDIR            ".tin"
  141. X#define        RCFILE            "tinrc"
  142. X#define        INDEXDIR        "index"
  143. X#define        KILLFILE        "kill"
  144. X#define        POSTFILE        "posted"
  145. X
  146. X#define        DEFAULT_SHELL    "/bin/sh"
  147. X#define        DEFAULT_MAILDIR    "Mail"
  148. X
  149. X#ifdef BSD
  150. X#define     DEFAULT_EDITOR    "/usr/ucb/vi"
  151. X#define        DEFAULT_MAILER    "/bin/rmail"
  152. X#define        DEFAULT_MAILBOX    "/usr/spool/mail"
  153. X#define        DEFAULT_PRINTER    "/usr/ucb/lpr"
  154. X#define        DEFAULT_SUM        "sum"
  155. X#ifndef USE_LONG_FILENAMES
  156. X#define USE_LONG_FILENAMES
  157. X#endif
  158. X#else
  159. X#ifdef M_XENIX
  160. X#define     DEFAULT_EDITOR    "/bin/vi"
  161. X#define        DEFAULT_MAILBOX    "/usr/spool/mail"
  162. X#else
  163. X#define     DEFAULT_EDITOR    "/usr/bin/vi"
  164. X#endif
  165. X#define        DEFAULT_MAILER    "/usr/bin/rmail"
  166. X#define        DEFAULT_MAILBOX    "/usr/mail"
  167. X#define        DEFAULT_PRINTER    "/usr/bin/lp"
  168. X#define        DEFAULT_SUM        "sum -r"
  169. X#endif
  170. X
  171. X#define        DEFAULT_ACTIVE_NUM    100        /* initial size of active array */
  172. X#define        DEFAULT_ARTICLE_NUM    400        /* initial size of art array */ 
  173. X#define        DEFAULT_KILL_NUM    10        /* initial size of kill array */ 
  174. X#define        DEFAULT_SAVE_NUM    10        /* initial size of save array */ 
  175. X
  176. X#define        TRUE        1
  177. X#define        FALSE        0
  178. X
  179. X#define        LEN        200
  180. X
  181. X#ifdef USE_LONG_FILENAMES
  182. X#define        LONG_PATH_PART    "part"
  183. X#define        LONG_PATH_PATCH    "patch"
  184. X#else
  185. X#define        LONG_PATH_PART    ""
  186. X#define        LONG_PATH_PATCH    "p"
  187. X#endif
  188. X
  189. X/*
  190. X *  used by feed.c - feed_articles()
  191. X */
  192. X#define        SELECT_LEVEL            1
  193. X#define        GROUP_LEVEL                2
  194. X#define        PAGE_LEVEL                3
  195. X
  196. X#define        FEED_MAIL                1
  197. X#define        FEED_PIPE                2
  198. X#define        FEED_PRINT                3
  199. X#define        FEED_SAVE                4
  200. X
  201. X
  202. X#ifdef USE_INVERSE_HACK
  203. X#define        BLANK_SELECT_COLS        59
  204. X#define        BLANK_GROUP_COLS        2
  205. X#define        BLANK_PAGE_COLS            2
  206. X#else
  207. X#define        BLANK_SELECT_COLS        57
  208. X#define        BLANK_GROUP_COLS        0
  209. X#define        BLANK_PAGE_COLS            0
  210. X#endif
  211. X
  212. X#define        DEFAULT_COLS    132        /* used when updating indexes */
  213. X#define        INDEX_TOP        3
  214. X
  215. X#define        SORT_BY_NONE    0        /* sort types on arts[] array */
  216. X#define        SORT_BY_SUBJ    1
  217. X#define        SORT_BY_FROM    2
  218. X#define        SORT_BY_DATE    3
  219. X
  220. Xextern int sort_art_type;
  221. X
  222. Xextern int NOTESLINES;
  223. Xextern int RIGHT_POS;
  224. Xextern int MORE_POS;
  225. X
  226. Xextern int max_subj;
  227. Xextern int max_from;
  228. X
  229. X#define        MAX_ARCH        38
  230. X#define        TABLE_SIZE        1409
  231. X
  232. X#define        MAX_PAGES        1000
  233. X
  234. X#ifdef BSD
  235. X#define CR    '\r'
  236. X#else
  237. X#define CR    10
  238. X#endif
  239. X
  240. X/*
  241. X * return codes for change_rcfile ()
  242. X */
  243. X
  244. X#define        NO_KILLING        0
  245. X#define        KILLING            1
  246. X
  247. X/*
  248. X *  art.thread
  249. X */
  250. X
  251. X#define        ART_NORMAL        -1
  252. X#define        ART_EXPIRED        -2
  253. X
  254. X/*
  255. X *  art.unread
  256. X */
  257. X
  258. X#define        ART_READ        0
  259. X#define        ART_UNREAD        1
  260. X#define        ART_WILL_RETURN    2
  261. X
  262. Xstruct header {
  263. X    long artnum;
  264. X    char *subject;    /* Subject: line from mail header */
  265. X    char *from;        /* From: line from mail header */
  266. X    int thread;
  267. X    int inthread;
  268. X    int unread;        /* 0 = read, 1 = unread, 2 = will return */
  269. X    char date[16];    /* Date: line from mail header */
  270. X    char *archive;    /* Archive-name: line from mail header */
  271. X    char *part;        /* part no. of archive */
  272. X    char *patch;    /* patch no. of archive */
  273. X    int tagged;        /* 0 = not killed/tagged, 1 = killed/tagged */
  274. X};
  275. X
  276. X/*
  277. X *  header.artnum:
  278. X *    article number in spool directory for group
  279. X *
  280. X *  header.thread:
  281. X *    initially -1
  282. X *    points to another arts[] (struct header): zero and up
  283. X *    -2 means article has expired (wasn't found in file search
  284. X *    of spool directory for the group)
  285. X *
  286. X *  header.inthread:
  287. X *    FALSE for the first article in a thread, TRUE for all
  288. X *    following articles in thread
  289. X *
  290. X *  header.read:
  291. X *    boolean, has this article been read or not
  292. X *
  293. X *  header.date
  294. X *  date: line used for sorting articles by date order
  295. X *
  296. X *  header.archive:
  297. X *    archive name used in *source* groups
  298. X *
  299. X *  header.part:
  300. X *    part no. of archive
  301. X *
  302. X *  header.patch:
  303. X *    patch no. of archive
  304. X *
  305. X *  header.tagged:
  306. X *    boolean, has this article been killed/tagged for saving or not
  307. X */
  308. X
  309. Xstruct group_ent {
  310. X    char *name;
  311. X    long max;
  312. X    long min;
  313. X    int next;        /* next active entry in hash chain */
  314. X    int flag;
  315. X};
  316. X
  317. X#define        NOTGOT            0x01    /* haven't put in my_group yet */
  318. X#define        SUBS            0x02    /* subscribed to */
  319. X
  320. X#define KILL_SUBJ    1
  321. X#define KILL_FROM    2
  322. X#define KILL_BOTH    3
  323. X
  324. Xstruct kill_t {
  325. X    int kill_type;
  326. X    long kill_group;
  327. X    char *kill_subj;
  328. X    char *kill_from;
  329. X};
  330. X
  331. Xextern struct kill_t *killf;
  332. Xextern int kill_num;
  333. Xextern int max_kill;
  334. X
  335. X#define POST_PROC_SH        1
  336. X#define POST_PROC_UUD        2
  337. X#define POST_PROC_UUD_ZOO    3
  338. X#define POST_PROC_UUD_LZH    4
  339. X#define POST_PROC_UUD_ARC    5
  340. X#define POST_PROC_UUD_ZIP    6
  341. X#define POST_PROC_PATCH        7
  342. X
  343. Xstruct save_t {
  344. X    char *subject;
  345. X    char *dir;
  346. X    char *file;
  347. X    char *archive;
  348. X    char *part;
  349. X    char *patch;
  350. X    int index;    
  351. X    int saved;    
  352. X    int is_mailbox;    
  353. X};
  354. X
  355. Xextern struct save_t *save;
  356. Xextern int save_num;
  357. Xextern int max_save;
  358. X
  359. Xstruct screen_t {
  360. X    char *col;
  361. X};
  362. X
  363. Xextern struct screen_t *screen;
  364. X
  365. X#ifdef POSIX_JOB_CONTROL
  366. Xextern struct sigaction art_act;
  367. Xextern struct sigaction group_act;
  368. Xextern struct sigaction main_act;
  369. Xextern struct sigaction page_act;
  370. Xextern struct sigaction select_act;
  371. Xextern struct sigaction rcfile_act;
  372. Xextern struct sigaction old_act;
  373. X#endif
  374. X
  375. Xextern int debug;
  376. Xextern int active_num;
  377. Xextern int article_num;
  378. Xextern int start_line_offset;
  379. X
  380. Xextern int read_news_via_nntp;
  381. Xextern char nntp_server[LEN+1];
  382. Xextern int top;
  383. Xextern struct header *arts;
  384. Xextern long *base;
  385. Xextern int max_art;
  386. X
  387. Xextern int index_file_killed;
  388. Xextern int save_separate;
  389. Xextern int save_archive_name;
  390. Xextern int show_author;
  391. Xextern int draw_arrow_mark;
  392. Xextern int kill_articles;
  393. Xextern int post_process;
  394. Xextern int mark_saved_read;
  395. Xextern int post_proc_type;
  396. Xextern int default_printer;
  397. Xextern int print_header;
  398. Xextern int num_of_tagged_files;
  399. Xextern int compiled_with_nntp;
  400. X
  401. Xextern char rcdir[LEN+1];
  402. Xextern char rcfile[LEN+1];
  403. Xextern char indexdir[LEN+1];
  404. Xextern char killfile[LEN+1];
  405. Xextern char postfile[LEN+1];
  406. X
  407. Xextern char msg[LEN+1];
  408. Xextern char userid[LEN+1];
  409. Xextern char homedir[LEN+1];
  410. Xextern char add_addr[LEN+1];
  411. Xextern char bug_addr[LEN+1];
  412. Xextern char txt_help_bug_report[LEN+1];
  413. Xextern char reply_to[LEN+1];
  414. Xextern char my_org[LEN+1];
  415. Xextern char active_file[LEN+1];
  416. Xextern char newsrc[LEN+1];
  417. Xextern char newnewsrc[LEN+1];
  418. Xextern char delgroups[LEN+1];
  419. X
  420. Xextern char *version;
  421. Xextern char cvers[LEN+1];
  422. Xextern char progname[LEN+1];
  423. Xextern char dead_article[LEN+1];
  424. Xextern char mailer[LEN+1];
  425. Xextern char printer[LEN+1];
  426. Xextern char spooldir[LEN+1];
  427. Xextern char savedir[LEN+1];
  428. Xextern char maildir[LEN+1];
  429. Xextern char mailbox[LEN+1];
  430. Xextern char page_header[LEN+1];
  431. Xextern char signature[LEN+1];
  432. Xextern char sig[LEN+1];
  433. Xextern char killsubj[LEN+1];
  434. Xextern char killfrom[LEN+1];
  435. Xextern char author_search_string[LEN+1];
  436. Xextern char group_search_string[LEN+1];
  437. Xextern char subject_search_string[LEN+1];
  438. Xextern char art_search_string[LEN+1];
  439. Xextern char default_regex_pattern[LEN+1];
  440. X
  441. Xextern char *help_select[];
  442. Xextern char *help_group[];
  443. Xextern char *help_page[];
  444. X
  445. Xextern int top_base;
  446. Xextern int LINES, COLS;
  447. Xextern int group_hash[TABLE_SIZE];
  448. Xextern int num_active;
  449. Xextern struct group_ent *active;
  450. Xextern int *my_group;
  451. Xextern int *unread;
  452. Xextern int max_active;
  453. X
  454. Xextern int local_top;
  455. Xextern int catchup;
  456. Xextern int update;
  457. Xextern int verbose;
  458. Xextern int inverse_okay;
  459. X
  460. Xextern int tin_uid;
  461. Xextern int tin_gid;
  462. Xextern int real_uid;
  463. Xextern int real_gid;
  464. Xextern int local_index;
  465. X
  466. Xextern char *strcpy();
  467. Xextern char *strncat();
  468. Xextern char *strncpy();
  469. Xextern long atol();
  470. X
  471. X#ifdef SIGTSTP
  472. Xextern int do_sigtstp;
  473. X#endif
  474. X
  475. X#define        ctrl(c)            ((c) & 0x1F)
  476. X
  477. X/*
  478. X *  Assertion verifier
  479. X */
  480. X
  481. X#ifdef __STDC__
  482. X#define    assert(p)    if(! (p)) asfail(__FILE__, __LINE__, #p); else
  483. X#else
  484. X#define    assert(p)    if(! (p)) asfail(__FILE__, __LINE__, "p"); else
  485. X#endif
  486. X
  487. X/*
  488. X *  function prototypes    & language definitions    
  489. X */ 
  490. X
  491. X#include    "proto.h"
  492. X#include    "lang.h"
  493. X
  494. SHAR_EOF
  495. $TOUCH -am 0903095091 tin.h &&
  496. chmod 0600 tin.h ||
  497. echo "restore of tin.h failed"
  498. set `wc -c tin.h`;Wc_c=$1
  499. if test "$Wc_c" != "8685"; then
  500.     echo original size 8685, current size $Wc_c
  501. fi
  502. # ============= wildmat.c ==============
  503. echo "x - extracting wildmat.c (Text)"
  504. sed 's/^X//' << 'SHAR_EOF' > wildmat.c &&
  505. X/*  $Revision: 1.5 $
  506. X**
  507. X**  Do shell-style pattern matching for ?, \, [], and * characters.
  508. X**  Might not be robust in face of malformed patterns; e.g., "foo[a-"
  509. X**  could cause a segmentation violation.  It is 8bit clean.
  510. X**
  511. X**  Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
  512. X**  Rich $alz is now <rsalz@bbn.com>.
  513. X**  April, 1991:  Replaced mutually-recursive calls with in-line code
  514. X**  for the star character.
  515. X**
  516. X**  Special thanks to Lars Mathiesen <thorinn@diku.dk> for the ABORT code.
  517. X**  This can greatly speed up failing wildcard patterns.  For example:
  518. X**    pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-*
  519. X**    text 1:     -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1
  520. X**    text 2:     -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1
  521. X**  Text 1 matches with 51 calls, while text 2 fails with 54 calls.  Without
  522. X**  the ABORT, then it takes 22310 calls to fail.  Ugh.  The following
  523. X**  explanation is from Lars:
  524. X**  The precondition that must be fulfilled is that DoMatch will consume
  525. X**  at least one character in text.  This is true if *p is neither '*' nor
  526. X**  '\0'.)  The last return has ABORT instead of FALSE to avoid quadratic
  527. X**  behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx".  With
  528. X**  FALSE, each star-loop has to run to the end of the text; with ABORT
  529. X**  only the last one does.
  530. X**
  531. X**  Once the control of one instance of DoMatch enters the star-loop, that
  532. X**  instance will return either TRUE or ABORT, and any calling instance
  533. X**  will therefore return immediately after (without calling recursively
  534. X**  again).  In effect, only one star-loop is ever active.  It would be
  535. X**  possible to modify the code to maintain this context explicitly,
  536. X**  eliminating all recursive calls at the cost of some complication and
  537. X**  loss of clarity (and the ABORT stuff seems to be unclear enough by
  538. X**  itself).  I think it would be unwise to try to get this into a
  539. X**  released version unless you have a good test data base to try it out
  540. X**  on.
  541. X*/
  542. X
  543. X#define TRUE            1
  544. X#define FALSE            0
  545. X#define ABORT            -1
  546. X
  547. X
  548. X    /* What character marks an inverted character class? */
  549. X#define NEGATE_CLASS        '^'
  550. X    /* Is "*" a common pattern? */
  551. X#define OPTIMIZE_JUST_STAR
  552. X    /* Do tar(1) matching rules, which ignore a trailing slash? */
  553. X#undef MATCH_TAR_PATTERN
  554. X
  555. X
  556. X/*
  557. X**  Match text and p, return TRUE, FALSE, or ABORT.
  558. X*/
  559. Xstatic int
  560. XDoMatch(text, p)
  561. X    register char    *text;
  562. X    register char    *p;
  563. X{
  564. X    register int    last;
  565. X    register int    matched;
  566. X    register int    reverse;
  567. X
  568. X    for ( ; *p; text++, p++) {
  569. X    if (*text == '\0' && *p != '*')
  570. X        return ABORT;
  571. X    switch (*p) {
  572. X    case '\\':
  573. X        /* Literal match with following character. */
  574. X        p++;
  575. X        /* FALLTHROUGH */
  576. X    default:
  577. X        if (*text != *p)
  578. X        return FALSE;
  579. X        continue;
  580. X    case '?':
  581. X        /* Match anything. */
  582. X        continue;
  583. X    case '*':
  584. X        while (*++p == '*')
  585. X        /* Consecutive stars act just like one. */
  586. X        continue;
  587. X        if (*p == '\0')
  588. X        /* Trailing star matches everything. */
  589. X        return TRUE;
  590. X        while (*text)
  591. X        if ((matched = DoMatch(text++, p)) != FALSE)
  592. X            return matched;
  593. X        return ABORT;
  594. X    case '[':
  595. X        reverse = p[1] == NEGATE_CLASS ? TRUE : FALSE;
  596. X        if (reverse)
  597. X        /* Inverted character class. */
  598. X        p++;
  599. X        matched = FALSE;
  600. X        if (p[1] == ']' || p[1] == '-')
  601. X        if (*++p == *text)
  602. X            matched = TRUE;
  603. X        for (last = *p; *++p && *p != ']'; last = *p)
  604. X        /* This next line requires a good C compiler. */
  605. X        if (*p == '-' && p[1] != ']'
  606. X            ? *text <= *++p && *text >= last : *text == *p)
  607. X            matched = TRUE;
  608. X        if (matched == reverse)
  609. X        return FALSE;
  610. X        continue;
  611. X    }
  612. X    }
  613. X
  614. X#ifdef    MATCH_TAR_PATTERN
  615. X    if (*text == '/')
  616. X    return TRUE;
  617. X#endif    /* MATCH_TAR_ATTERN */
  618. X    return *text == '\0';
  619. X}
  620. X
  621. X
  622. X/*
  623. X**  User-level routine.  Returns TRUE or FALSE.
  624. X*/
  625. Xint
  626. Xwildmat(text, p)
  627. X    char    *text;
  628. X    char    *p;
  629. X{
  630. X#ifdef    OPTIMIZE_JUST_STAR
  631. X    if (p[0] == '*' && p[1] == '\0')
  632. X    return TRUE;
  633. X#endif    /* OPTIMIZE_JUST_STAR */
  634. X    return DoMatch(text, p) == TRUE;
  635. X}
  636. X
  637. X
  638. X
  639. X#ifdef    TEST
  640. X#include <stdio.h>
  641. X
  642. X/* Yes, we use gets not fgets.  Sue me. */
  643. Xextern char    *gets();
  644. X
  645. X
  646. Xmain()
  647. X{
  648. X    char     p[80];
  649. X    char     text[80];
  650. X
  651. X    printf("Wildmat tester.  Enter pattern, then strings to test.\n");
  652. X    printf("A blank line gets prompts for a new pattern; a blank pattern\n");
  653. X    printf("exits the program.\n");
  654. X
  655. X    for ( ; ; ) {
  656. X    printf("\nEnter pattern:  ");
  657. X    (void)fflush(stdout);
  658. X    if (gets(p) == NULL || p[0] == '\0')
  659. X        break;
  660. X    for ( ; ; ) {
  661. X        printf("Enter text:  ");
  662. X        (void)fflush(stdout);
  663. X        if (gets(text) == NULL)
  664. X        exit(0);
  665. X        if (text[0] == '\0')
  666. X        /* Blank line; go back and get a new pattern. */
  667. X        break;
  668. X        printf("      %s\n", wildmat(text, p) ? "YES" : "NO");
  669. X    }
  670. X    }
  671. X
  672. X    exit(0);
  673. X    /* NOTREACHED */
  674. X}
  675. X#endif    /* TEST */
  676. SHAR_EOF
  677. $TOUCH -am 0903095091 wildmat.c &&
  678. chmod 0600 wildmat.c ||
  679. echo "restore of wildmat.c failed"
  680. set `wc -c wildmat.c`;Wc_c=$1
  681. if test "$Wc_c" != "4749"; then
  682.     echo original size 4749, current size $Wc_c
  683. fi
  684. # ============= tin.1 ==============
  685. echo "x - extracting tin.1 (Text)"
  686. sed 's/^X//' << 'SHAR_EOF' > tin.1 &&
  687. X.TH TIN 1 "Version 1.0 PL1"
  688. X.SH NAME
  689. Xtin \- Visual threaded Usenet news reader
  690. X.SH SYNOPSIS
  691. X.nf
  692. Xtin [options] [newsgroups]
  693. X.fi
  694. X.SH DESCRIPTION
  695. XTin is a full screen threaded Usenet newsreader. It can read news
  696. Xlocally (ie. \fI/usr/spool/news\fP) or remotely (-r option) via
  697. Xa NNTP (Network News Transport Protocol) server. 
  698. X.PP
  699. XTin has three newsreading levels:
  700. Xthe newsgroup selection page, the group index page and the article viewer.
  701. XUse the 'h' (help) command to view a list of the commands available at a
  702. Xparticular level, or the 'H' command to view context sensitive help.
  703. X.PP
  704. XOn startup Tin will show a list of the newsgroups found in \fI$HOME/.newsrc\fP.
  705. XAn arrow '->' or highlighted bar will point to the first newsgroup.
  706. XMove to a group by using the terminal arrow keys (ansi/at386/vt100 only) or
  707. X'j' and 'k'. Use PgUp/PgDn (ansi/at386/vt100 only) or Ctrl-U and Ctrl-D to 
  708. Xpage up/down. Enter a newsgroup by pressing RETURN.
  709. X.PP
  710. XThe TAB key may be used to advance to the next newsgroup with unread articles
  711. Xand enter it.
  712. X.SH OPTIONS
  713. X.TP 10
  714. X\fB-c\fP
  715. Xcreate/update index files for every group in \fI$HOME/.newsrc\fP or 
  716. Xfile specified by -f option and mark all articles as read.
  717. X.TP
  718. X\fB-d dir\fP
  719. Xsave articles to directory. Default is \fI$HOME/News\fP.
  720. X.TP
  721. X\fB-f file\fP
  722. XUse the indicated file in place of \fI$HOME/.newsrc\fP.
  723. X.TP
  724. X\fB-h\fP
  725. Xhelp.
  726. X.TP
  727. X\fB-m file\fP
  728. Xmail program to use for sending mail. Default is \fI/usr/ucb/mail\fP.
  729. X.TP
  730. X\fB-M dir\fP
  731. Xmailbox directory to use. Default is \fI$HOME/Mail\fP.
  732. X.TP
  733. X\fB-p file\fP
  734. Xprint program with options. Default is \fI/usr/ucb/lpr\fP.
  735. X.TP
  736. X\fB-r\fP
  737. Xread news remotely from the default NNTP server specified in the
  738. Xenvironment variable NNTPSERVER or contained in the file
  739. X\fI/etc/nntpserver\fP.
  740. X.TP
  741. X\fB-S dir\fP
  742. Xspool directory where news is stored. Default is \fI/usr/spool/news\fP.
  743. X.TP
  744. X\fB-u\fP
  745. Xcreate/update index files for every group in \fI$HOME/.newsrc\fP or 
  746. Xfile specified by -f option.
  747. X.TP
  748. X\fB-v\fP
  749. Xcreate/update index files for every group in \fI$HOME/.newsrc\fP or 
  750. Xfile specified by -f option. Each group name is printed to stdout as
  751. Xit is updated.
  752. X.PP
  753. XTin can also dynamically change its options by the 'M' menu command. 
  754. XAny changes are written to \fI$HOME/.tin/tinrc\fP.
  755. X.SH INDEX FILES
  756. XIn order to keep track of threads, Tin maintains an index for each group.
  757. XIf Tin is made setuid to news, the indexes will be stored in the news spool
  758. Xdirectory (typically \fI/usr/spool/news\fP). If Tin is not setuid, it
  759. Xwill store index files in the subdirectory \fI$HOME/.tin/index\fP.
  760. XDo not make Tin setuid news if news will be obtained via NNTP and not
  761. Xfrom \fI/usr/spool/news\fP.
  762. X.PP
  763. XEntering a group the first time tends to be slow because the index file must
  764. Xbe built from scratch.  Subsequent readings of a group will cause
  765. XTin to incrementally update the index file, adding or removing entries as new
  766. Xarticles come in or as news expires. If reading news remotely indexing
  767. Xwill be somewhat slower because the articles must be retrieved via the
  768. XNNTP.
  769. X.PP
  770. XA good way to keep Tin index files current is to run tin -u from cron:
  771. X
  772. X.nf
  773. X20 6 * * *    /usr/local/bin/tin -u -f /usr/lib/news/tin_groups
  774. X.fi
  775. X
  776. XThis would update the index files for those groups appearing in
  777. X\fI/usr/lib/news/tin_groups\fP.  To index all of the groups on the
  778. Xsystem, run tin -u with -f indicating the active file:
  779. X
  780. X.nf
  781. X20 6 * * *    /usr/local/bin/tin -u -f /usr/lib/news/active
  782. X.fi
  783. X.SH SCREEN FORMAT
  784. XTin has three separate levels of operation: Selection Group level, Group level
  785. Xand Article level.
  786. X.PP
  787. XAt the Selection Group level the newsgroups are displayed on the left
  788. Xof the screen with the number of unread articles displayed on the same 
  789. Xline in the middle of the screen.
  790. X
  791. X    <Selection Num>    <Newsgroup>    <Num of unread articles>
  792. X.br
  793. Xie.
  794. X.br
  795. X    1    alt.sources            10
  796. X.br
  797. X    2    comp.sources.misc        3
  798. X.br
  799. X    3    news.software.readers        12
  800. X
  801. X.PP
  802. XAt the Group level the following formats are possible:
  803. X
  804. X    <Selection Num>    <Unread>    <Subject>    <Responses>    <Author>
  805. X.br
  806. Xor
  807. X.br
  808. X    <Selection Num>    <Unread>    <Subject (longer)>    <Responses>
  809. X.br
  810. Xie.
  811. X.br
  812. X    1    +    Bnews sources?    3    iain@estevax
  813. X.br
  814. X    2        This question has    1    ether@net
  815. X.br
  816. Xor
  817. X.br
  818. X    1    +    Bnews sources?            3
  819. X.br
  820. X    2        This question has a long subject line    1
  821. X.PP  
  822. XAt the Article level the page header has the following format:
  823. X
  824. X    <Date posted>        <Newsgroup>        <Thread 1 of n>
  825. X.br
  826. X    <Article Num>        <Subject>        <Num of responses in thread>
  827. X.br
  828. X    <Author>                    <Organization>
  829. X.br
  830. X
  831. X    <Article body>
  832. X.br
  833. Xie.
  834. X.br
  835. X    24 Jul 15:20:03 GMT    alt.sources        Note 1 of 2
  836. X.br
  837. X    Article 452        Bnews sources?    3 responses
  838. X.br
  839. X    iain@estevax                    Siemens AG, Germany
  840. X.br
  841. X
  842. X    <Article boby>
  843. X.SH COMMON MOVING KEYS
  844. XThis table shows the common keys/commands for moving at all three levels 
  845. Xwithin Tin.
  846. X                ansi/at386/vt100    Other Terminals
  847. X.br
  848. XBeginning of list/article        \fBHome\fP            \fB1\fP (\fB^R\fP at article level)
  849. X.br
  850. XEnd of list/article        \fBEnd\fP            \fB$\fP
  851. X.br
  852. XPage Up            \fBPgUp\fP            \fB^U\fP or \fBb\fP
  853. X.br
  854. XPage Down            \fBPgDn\fP            \fB^D\fP or \fB<SPACE>\fP
  855. X.br
  856. XLine Up                \fBUp arrow\fP        \fBk\fP (not at article level)
  857. X.br
  858. XLine Down            \fBDown arrow\fP        \fBj\fP (not at article level)
  859. X.SH NEWSGROUP SELECTION COMMANDS
  860. X.TP 10
  861. X\fB4\fP
  862. XSelect group 4.
  863. X.TP
  864. X\fB^K\fP
  865. XDelete current group from \fI$HOME/.newsrc\fP file.
  866. X.TP
  867. X\fB^L\fP
  868. XRedraw page.
  869. X.TP
  870. X\fB^R\fP
  871. XReset \fI$HOME/.newsrc\fP file.
  872. X.TP
  873. X\fB<CR>\fP
  874. XRead current group.
  875. X.TP
  876. X\fB<TAB>\fP
  877. XView next unread group.
  878. X.TP
  879. X\fBB\fP
  880. XMail a bug/gripe/comment to the author of tin. This is the best way
  881. Xof getting bugs fixed and features add/changed.
  882. X.TP
  883. X\fBc\fP
  884. XMark current group as all read and goto next group in group selection list.
  885. X.TP
  886. X\fBC\fP
  887. XMark current group as all read and goto next unread group in group selection
  888. Xlist.
  889. X.TP
  890. X\fBg\fP
  891. XChoose a new group by name. The position of the group within the group
  892. Xlist will also be asked for. By entering '1' the new group will be the
  893. Xfirst group in the displayed list, by entering '8' the group will be
  894. Xthe eighth group in the list etc. By entering '$' the group will be the
  895. Xlast group displayed.
  896. X.TP
  897. X\fBh\fP
  898. Xhelp screen of newsgroup selection commands.
  899. X.TP
  900. X\fBH\fP
  901. Xhelp screen of context sensitive help about newsgroup selection level.
  902. X.TP
  903. X\fBI\fP
  904. XToggle inverse video.
  905. X.TP
  906. X\fBj\fP
  907. XDown a line.
  908. X.TP
  909. X\fBk\fP
  910. XUp a line.
  911. X.TP
  912. X\fBm\fP
  913. XMove the current group within the group selection list.
  914. XBy entering '1' the group will become the first displayed group in
  915. Xthe list, by entering '8' the eighth group in the list etc. By
  916. Xentering '$' the group will be the last group displayed.
  917. X.TP
  918. X\fBM\fP
  919. XUser configurable options menu (for more information see section Options Menu). 
  920. X.TP
  921. X\fBq\fP
  922. XQuit tin.
  923. X.TP
  924. X\fBs\fP
  925. XSubscribe to current group.
  926. X.TP
  927. X\fBS\fP
  928. XSubscribe to groups matching user specified pattern.
  929. X.TP
  930. X\fBu\fP
  931. XUnsubscribe to current group.
  932. X.TP
  933. X\fBU\fP
  934. XUnsubscribe to groups matching user specified pattern.
  935. X.TP
  936. X\fBW\fP
  937. XList articles posted by user. The date posted, the newsgroup and the
  938. Xsubject are listed.
  939. X.TP
  940. X\fBy\fP
  941. XThe first time this command is called it will yank in all groups from
  942. X\fI/usr/local/news/active\fP that are not in \fI$HOME/.newsrc\fP.
  943. XAfter any groups have been subscribed/unsubscribed to, this command
  944. Xif pressed again will reread \fI$HOME/.newsrc\fP and display only
  945. Xsubscribed groups.
  946. X.TP
  947. X\fBY\fP
  948. XReread group list from \fI$HOME/.newsrc\fP file.
  949. X.TP
  950. X\fBz\fP
  951. XUndelete previously delete group from \fI$HOME/.newsrc\fP file.
  952. X.TP
  953. X\fB/\fP
  954. XGroup forward search.
  955. X.TP
  956. X\fB?\fP
  957. XGroup backward search.
  958. X.SH GROUP INDEX COMMANDS
  959. X.TP 10
  960. X\fB4\fP
  961. XSelect article 4.
  962. X.TP
  963. X\fB^K\fP
  964. XKill current article (for more information read section Kill Article Menu).
  965. X.TP
  966. X\fB^L\fP
  967. XRedraw page.
  968. X.TP
  969. X\fB<CR>\fP
  970. XRead current article.
  971. X.TP
  972. X\fB<TAB>\fP
  973. XView next unread article or group.
  974. X.TP
  975. X\fBa\fP
  976. XAuthor forward search.
  977. X.TP
  978. X\fBA\fP
  979. XAuthor backward search.
  980. X.TP
  981. X\fBB\fP
  982. XMail a bug/gripe/comment to the author of tin. This is the best way
  983. Xof getting bugs fixed and features add/changed.
  984. X.TP
  985. X\fBc\fP
  986. XMark all articles as read.
  987. X.TP
  988. X\fBg\fP
  989. XChoose a new group by name.
  990. X.TP
  991. X\fBh\fP
  992. Xhelp screen of group index commands.
  993. X.TP
  994. X\fBH\fP
  995. Xhelp screen of context sensitive help about group index level.
  996. X.TP
  997. X\fBI\fP
  998. XToggle inverse video.
  999. X.TP
  1000. X\fBj\fP
  1001. XDown a line.
  1002. X.TP
  1003. X\fBk\fP
  1004. XUp a line.
  1005. X.TP
  1006. X\fBK\fP
  1007. XMark article/thread as read and advance to next unread article/thread. 
  1008. X.TP
  1009. X\fBm\fP
  1010. XMail current article / thread / articles matching pattern / tagged articles
  1011. Xto someone.
  1012. X.TP
  1013. X\fBM\fP
  1014. XUser configurable options menu (for more information see section Options Menu). 
  1015. X.TP
  1016. X\fBn\fP
  1017. XGo to next group.
  1018. X.TP
  1019. X\fBN\fP
  1020. XGo to next unread group.
  1021. X.TP
  1022. X\fBo\fP
  1023. XOutput current article / thread / articles matching pattern / tagged articles
  1024. Xto printer.
  1025. X.TP
  1026. X\fBp\fP
  1027. XGo to previous group.
  1028. X.TP
  1029. X\fBP\fP
  1030. XGo to previous unread group.
  1031. X.TP
  1032. X\fBq\fP
  1033. XQuit tin.
  1034. X.TP
  1035. X\fBs\fP
  1036. XSave current article / thread / articles matching pattern / tagged articles
  1037. Xto file / files / mailbox. To save to a mailbox enter '=' or '=mailbox' when
  1038. Xasked for filename to save to. 
  1039. X.TP
  1040. X\fBT\fP
  1041. XTag current article for mailing ('m') / piping ('|') / printing ('o') / saving ('s').
  1042. X.TP
  1043. X\fBt\fP
  1044. XReturn to group selection index.
  1045. X.TP
  1046. X\fBU\fP
  1047. XUntag all articles that were tagged for saving.
  1048. X.TP
  1049. X\fBw\fP
  1050. XPost an article.
  1051. X.TP
  1052. X\fBW\fP
  1053. XList articles posted by user. The date posted, the newsgroup and the
  1054. Xsubject are listed.
  1055. X.TP
  1056. X\fBz\fP
  1057. XMark current article as unread.
  1058. X.TP
  1059. X\fBZ\fP
  1060. XMark current thread as unread.
  1061. X.TP
  1062. X\fB/\fP
  1063. XSearch forward for specified subject.
  1064. X.TP
  1065. X\fB?\fP
  1066. XSearch backward for specified subject.
  1067. X.TP
  1068. X\fB-\fP
  1069. XShow last message.
  1070. X.TP
  1071. X\fB|\fP
  1072. XPipe current article / thread / articles matching pattern / tagged articles
  1073. Xinto command.
  1074. X.SH ARTICLE COMMANDS
  1075. X.TP 10
  1076. X\fB0\fP
  1077. XRead the base article in this thread. 
  1078. X.TP
  1079. X\fB4\fP
  1080. XRead response 4 in this thread.
  1081. X.TP
  1082. X\fB^H\fP
  1083. XShow all of the articles mail header.
  1084. X.TP
  1085. X\fB^K\fP
  1086. XKill current article (for more information read section Kill Article Menu).
  1087. X.TP
  1088. X\fB^L\fP
  1089. XRedraw page.
  1090. X.TP
  1091. X\fB<CR>\fP
  1092. XSkip to next base article.
  1093. X.TP
  1094. X\fB<TAB>\fP
  1095. XAdvance to next page or unread article.
  1096. X.TP
  1097. X\fBa\fP
  1098. XAuthor forward search.
  1099. X.TP
  1100. X\fBA\fP
  1101. XAuthor backward search.
  1102. X.TP
  1103. X\fBB\fP
  1104. XMail a bug/gripe/comment to the author of tin. This is the best way
  1105. Xof getting bugs fixed and features add/changed.
  1106. X.TP
  1107. X\fBc\fP
  1108. XMark all articles as read.
  1109. X.TP
  1110. X\fBd\fP
  1111. XToggle rot-13 decoding for this article.
  1112. X.TP
  1113. X\fBf\fP
  1114. XPost a followup.
  1115. X.TP
  1116. X\fBF\fP
  1117. XPost a followup with a copy of the article included.
  1118. X.TP
  1119. X\fBh\fP
  1120. Xhelp screen of article page commands.
  1121. X.TP
  1122. X\fBH\fP
  1123. Xhelp screen of context sensitive help about article page level.
  1124. X.TP
  1125. X\fBi\fP
  1126. XReturn to index page.
  1127. X.TP
  1128. X\fBI\fP
  1129. XToggle inverse video.
  1130. X.TP
  1131. X\fBk\fP
  1132. XMark article as read and advance to next unread article.
  1133. X.TP
  1134. X\fBK\fP
  1135. XMark thread as read and advance to next unread thread.
  1136. X.TP
  1137. X\fBm\fP
  1138. XMail current article / thread / articles matching pattern / tagged articles
  1139. Xto someone.
  1140. X.TP
  1141. X\fBM\fP
  1142. XUser configurable options menu (for more information see section Options Menu). 
  1143. X.TP
  1144. X\fBn\fP
  1145. XGo to to the next article.
  1146. X.TP
  1147. X\fBN\fP
  1148. XGo to to the next unread article.
  1149. X.TP
  1150. X\fBo\fP
  1151. XOutput current article / thread / articles matching pattern / tagged articles
  1152. Xto printer.
  1153. X.TP
  1154. X\fBo\fP
  1155. XOutput article/thread/tagged articles to printer.
  1156. X.TP
  1157. X\fBp\fP
  1158. XGo to the previous article.
  1159. X.TP
  1160. X\fBP\fP
  1161. XGo to the previous unread article.
  1162. X.TP
  1163. X\fBq\fP
  1164. XQuit tin.
  1165. X.TP
  1166. X\fBr\fP
  1167. XReply through mail to author.
  1168. X.TP
  1169. X\fBR\fP
  1170. XReply through mail to author with a copy of the article included.
  1171. X.TP
  1172. X\fBs\fP
  1173. XSave current article / thread / articles matching pattern / tagged articles
  1174. Xto file / files / mailbox. To save to a mailbox enter '=' or '=mailbox' when
  1175. Xasked for filename to save to. 
  1176. X.TP
  1177. X\fBt\fP
  1178. XReturn to group selection index.
  1179. X.TP
  1180. X\fBw\fP
  1181. XPost an article.
  1182. X.TP
  1183. X\fBW\fP
  1184. XList articles posted by user. The date posted, the newsgroup and the
  1185. Xsubject are listed.
  1186. X.TP
  1187. X\fBz\fP
  1188. XMark article as unread.
  1189. X.TP
  1190. X\fB|\fP
  1191. XPipe article/thread/tagged articles into command.
  1192. X.TP
  1193. X\fB/\fP
  1194. XArticle forward search.
  1195. X.TP
  1196. X\fB?\fP
  1197. XArticle backward search
  1198. X.TP
  1199. X\fB|\fP
  1200. XPipe current article / thread / articles matching pattern / tagged articles
  1201. Xinto command.
  1202. X.SH OPTIONS MENU
  1203. XThis menu is accessed by pressing 'M' at all levels. It allows the user
  1204. Xto customize the behaviour of tin. The options are saved to the file
  1205. X\fI$HOME/.tin/tinrc\fP. The following options are settable:
  1206. X.TP 4
  1207. X\fBAuto save\fP
  1208. XAutomatically save articles/threads by Archive-name: line in article
  1209. Xheader. This is useful to set ON in conjunction with 'Save separate'
  1210. Xand 'Save to subdir'. Use <SPACE> to set ON/OFF.
  1211. X.TP
  1212. X\fBSave separate\fP
  1213. XSave articles/threads to separate files. Set ON if saving source code.
  1214. XSet OFF if saving a coversational thread. Use <SPACE> to set ON/OFF.
  1215. X.TP
  1216. X\fBMark saved read\fP
  1217. XThis allows saved articles/threads to be automatically marked as
  1218. Xhaving been read. Use <SPACE> to set ON/OFF.
  1219. X.TP
  1220. X\fBKill articles\fP
  1221. XThis allows the user to kill articles that match entries in the kill
  1222. Xfile \fI$HOME/.tin/kill\fP. Use <SPACE> to set ON/OFF.
  1223. X.TP
  1224. X\fBShow Author\fP
  1225. XIf set ON the Subject: & From: (author) lines from the articles header
  1226. Xare displayed. If set OFF only the Subject: line is displayed which 
  1227. Xallows more of it to be displayed. Use <SPACE> to set ON/OFF.
  1228. X.TP
  1229. X\fBDraw arrow\fP
  1230. XAllows groups/articles to be selected by an arrow '->' if set ON or
  1231. Xby an highlighted bar if set OFF. Use <SPACE> to set ON/OFF.
  1232. X.TP
  1233. X\fBPost process\fP
  1234. XThis allows post processing (ie. unsharing of a shell archive, uudecoding
  1235. Xof multi-part source files) of a saved article/thread. Use <SPACE> to
  1236. Xset ON/OFF.
  1237. X.TP
  1238. X\fBPrint header\fP
  1239. XThis allows the complete mail header or only the Siubject: and From:
  1240. Xfields to be output when printing an article 'o'/thread 'O'. Use
  1241. X<SPACE> to set ON/OFF.
  1242. X.TP
  1243. X\fBProcess type\fP
  1244. XThis specifies the type of post processing to perform on a saved
  1245. Xarticle/thread. The following types of processing are allowed:
  1246. X.(S
  1247. X.**
  1248. Xunpacking of multi-part shell archives. 
  1249. X.**
  1250. Xunpacking of multi-part uuencoded files.
  1251. X.**
  1252. Xunpacking of multi-part uuencoded files that produce a *.zoo archive.
  1253. XThe contents of the *.zoo archive can be listed or extracted.
  1254. X.**
  1255. Xunpacking of multi-part uuencoded files that produce a *.lzh archive.
  1256. XThe contents of the *.lzh archive can be listed or extracted.
  1257. X.**
  1258. Xunpacking of multi-part uuencoded files that produce a *.arc archive.
  1259. XThe contents of the *.arc archive can be listed or extracted.
  1260. X.**
  1261. Xunpacking of multi-part uuencoded files that produce a *.zip archive.
  1262. XThe contents of the *.zip archive can be listed or extracted.
  1263. X.**
  1264. Xunpacking of multi-part patches for use by \fIpatch\fP and applying 
  1265. Xthem to specified source files.
  1266. X.)S
  1267. XUse <SPACE> to set the required type.
  1268. X.TP
  1269. X\fBSort articles by\fP
  1270. XThis specifies how articles should be sorted. The following sort
  1271. Xtypes are allowed:
  1272. X.(S
  1273. X.**
  1274. Xdon't sort articles (default).
  1275. X.**
  1276. Xsort articles by Subject: field.
  1277. X.**
  1278. Xsort articles by From: field.
  1279. X.**
  1280. Xsort articles by Date: field.
  1281. X.)S
  1282. XUse <SPACE> to set the required type.
  1283. X.TP
  1284. X\fBSave directory\fP
  1285. XThe directory where articles/threads are to be saved. Default is
  1286. X\fI$HOME/News\fP.
  1287. X.TP
  1288. X\fBMail directory\fP
  1289. XThe directory where articles/threads are to be saved in mailbox format.
  1290. XThis feature is mainly for use with the Elm mail program. It allows
  1291. Xthe user to save articles/threads/groups simply by giving '=' as
  1292. Xthe filename to save to.
  1293. X.TP
  1294. X\fBPrinter\fP
  1295. XThe printer program with options that is to be used to print
  1296. Xarticles/threads. Default is lpr for BSD machines and lp for SysV 
  1297. Xmachines.  
  1298. X.SH KILL ARTICLE MENU
  1299. XThis menu is accessed by pressing '^K' at the group and page levels. It
  1300. Xallows the user to kill an article that matches the current Subject:
  1301. Xline, From: line or a string entered by the user. The user entered string
  1302. Xcan be applied to the Subject: or From: lines of an article. The kill
  1303. Xdescription can be limited to the current newsgroup or it can apply to all newsgroups.
  1304. XOnce entered the user can abort the command and not save the kill
  1305. Xdescription, edit the kill file or save the kill description.
  1306. X.PP
  1307. XOn starting tin the users killfile \fI$HOME/.tin/kill\fP is read and
  1308. Xon entering a newsgroup any kill descriptions are applied. Articles
  1309. Xthat match a kill description are marked killed and are not displayed. 
  1310. X.PP
  1311. XThe 'Kill articles' option needs to be set ON in the Options Menu
  1312. X(selected by 'M' at any level) to activate this command.
  1313. X.SH POSTING ARTICLES
  1314. XTin allows posting of articles, follow-up to already posted articles 
  1315. Xand replying direct through mail to the author of an article.
  1316. X.br
  1317. XUse the 'w' command to post an article to a newsgroup. After entering
  1318. Xthe post subject the default editor (ie. vi) or the editor specified
  1319. Xby the EDITOR enviroment variable will be started and the article can
  1320. Xbe entered. To crosspost articles simply add a comma and the name of
  1321. Xthe newsgroup(s) to the end of the Newsgroups: line at the beginning of
  1322. Xthe article. After saving and exiting the editor you are asked if you
  1323. Xwish to a)bort posting the article, e)dit the article again or p)ost
  1324. Xthe article to the specified newsgroup(s).
  1325. X.br
  1326. XUse the 'W' command to display a history of the articles you have posted.
  1327. XThe date the article was posted, which newsgroups the article was
  1328. Xposted to and the articles subject line are displayed.
  1329. X.br
  1330. XUse the 'f' / 'F' command to post a follow-up article to an already
  1331. Xposted article. The 'F' command will copy the text of the original
  1332. Xarticle into the editor. The editing procedure is the same as when
  1333. Xposting an article with the 'w' command.
  1334. X.br
  1335. XUse the 'r' / 'R' command to reply direct through mail to the author
  1336. Xof an already posted article. The 'R' command will copy the text of
  1337. Xthe original article into the editor. The editing procedure is the
  1338. Xsame as when posting an article with the 'w' command. After saving
  1339. Xand exiting the editor you are asked if you wish to a)bort sending
  1340. Xthe article, e)dit the article again or s)end the article to the
  1341. Xauthor.
  1342. X.SH MAILING PIPING PRINTING AND SAVING ARTICLES
  1343. XThe command interface to mail ('m'), pipe ('|'), print ('o') and save
  1344. X('s') articles is the same for ease of use.
  1345. X.br
  1346. XThe initial command will ask you to select which a)rticle, t)hread,
  1347. Xr)egex pattern, t)agged articles you wish to mail, pipe etc.
  1348. X.br
  1349. XTagged articles must have already been tagged with the 'T' command.
  1350. XAll tagged articles can be untagged by the 'U' untag command.
  1351. X.br
  1352. XIf regex pattern matching is selected you are asked to enter a regular
  1353. Xexpression (ie. to match all articles subject lines containing 'net News'
  1354. Xyou must enter '*net News*'). Any articles that match the 
  1355. Xentered expression will be mailed, piped etc.
  1356. X.br
  1357. XTo save articles to a mailbox enter '=' or '=mailbox name' when asked
  1358. Xfor the save filename.
  1359. X.br
  1360. XWhen saving articles you can specify whether the saved files should be
  1361. Xpost processed (ie. unshar shell archive, uudecode multiple parts etc).
  1362. XThis option is enabled/disabled by the 'M' options menu. The options
  1363. Xthat need setting are 'Post process:' and 'Process type:'. 
  1364. X.SH SIGNATURES
  1365. XTin will recognize a signature in either \fI$HOME/.signature\fP or
  1366. X\fI$HOME/.Sig\fP. If \fI$HOME/.signature\fP exists, then the signature
  1367. Xwill be pulled into the editor for Tin mail commands.  A signature in
  1368. X\fI$HOME/.signature\fP will not be pulled into the editor for posting
  1369. Xcommands since the inews program will append the signature itself.
  1370. X.PP
  1371. XA signature in \fI$HOME/.Sig\fP will be pulled into the editor for both
  1372. Xposting and mailing commands.
  1373. X.PP
  1374. XThe following is an example of a \fI$HOME/.Sig\fP file:
  1375. X.PP
  1376. X.br
  1377. X    EMAIL  norisc!iain@estevax.UUCP  ...!unido!estevax!norisc!iain
  1378. X.br
  1379. X    SNAIL  Siemens AG, AUT 922C, Postfach 4848, Nuernberg, Germany
  1380. X.br
  1381. X    PHONE  +49-911-895-3853
  1382. X.SH ENVIROMENT VARIABLES
  1383. X.TP 18
  1384. X\fBNNTPSERVER\fP
  1385. XThe default NNTP server to remotely read news from. This variable only
  1386. Xneeds to be set if the -r command line option is specified and the file
  1387. X\fI/etc/nntpserver\fP does not exist.
  1388. X.TP
  1389. X\fBORGANIZATION\fP
  1390. XSet the mail header field Organization: to the contents of the
  1391. Xvariable instead of the system default. This variable has precedence
  1392. Xover the file \fI$HOME/.tin/organization\fP that may also contain an
  1393. Xorganization string.
  1394. X.TP
  1395. X\fBREPLY_TO\fP
  1396. XSet the mail header field Reply-To: to the return address specified 
  1397. Xby the variable.
  1398. XThis is useful if the machine is not registered in the UUCP mail maps
  1399. Xor if you wish to recieve replies at a different machine.
  1400. XThis variable has precedence over the file \fI$HOME/.tin/reply_to\fP
  1401. Xthat may also contain a return address.
  1402. X.TP
  1403. X\fBADD_ADDRESS\fP
  1404. XThis can contain an address to append to the return address when replying
  1405. Xdirectly through mail to somebody whose mail address is not directly 
  1406. Xrecognized by the local host. For example say the return address is
  1407. X\fIuser@bigvax\fP, but \fIbigvax\fP is not recognized by your host, so
  1408. Xtherfore the mail will not reach \fIuser\fP. But the host \fIlittevax\fP
  1409. Xis known to recognize your host and \fIbigvax\fP, so if ADD_ADDRESS is set
  1410. X(ie. 'setenv ADD_ADDRESS @littevax' for csh or 'set ADD_ADDRESS @littevax' 
  1411. Xand 'export ADD_ADDRESS' for sh) the address \fIuser@bigvax@littlevax\fP will
  1412. Xbe used and the mail will reach \fIuser@bigvax\fP.
  1413. XThis variable has precedence over the file \fI$HOME/.tin/add_address\fP
  1414. Xthat may also contain an address.
  1415. X.TP
  1416. X\fBBUG_ADDRESS\fP
  1417. XIf the 'B' command bug report address is not correct this variable should be
  1418. Xset to the correct mail address. This variable has precedence over the file
  1419. X\fI$HOME/.tin/bug_address\fP that may also contain an address.
  1420. X.SH FILES
  1421. X\fI$HOME/.newsrc\fP        newgroups subscribed to by user.
  1422. X.br
  1423. X\fI$HOME/.tin/tinrc\fP        options set by user.
  1424. X.br
  1425. X\fI$HOME/.tin/index\fP        newsgroup index files directory.
  1426. X.br
  1427. X\fI$HOME/.tin/kill\fP            kill file.
  1428. X.br
  1429. X\fI$HOME/.tin/posted\fP        history of articles posted by user.   
  1430. X.br
  1431. X\fI$HOME/.tin/organization\fP    user specified string to replace 
  1432. Xdefault organization.
  1433. X.br
  1434. X\fI$HOME/.tin/reply_to\fP        user specified host address to use in
  1435. XReply-To: mail header.
  1436. X.br
  1437. X\fI$HOME/.tin/add_address\fP    user specified address to add to when
  1438. Xreplying through mail.
  1439. X.br
  1440. X\fI$HOME/.tin/bug_address\fP    user specified address to send bug reports
  1441. Xif different than default bug report address compiled into tin.
  1442. X.br
  1443. X\fI$HOME/.signature\fP        signature file.
  1444. X.br
  1445. X\fI$HOME/.Sig\fP            signature file.
  1446. X.SH BUGS
  1447. XThere somewhere among the creeping featurism. Any bugs found should be
  1448. Xreported by the 'B' (bug report) command.
  1449. X.br
  1450. XThere is a bug when article killing is switched ON/OFF at article
  1451. Xpage level and the 't' command is used to return to group selection
  1452. Xindex.
  1453. X.br
  1454. XWhen articles have been unkilled, all articles will be marked
  1455. Xunread even if they have already been read.
  1456. X.br
  1457. XKilling articles when tin is setuid causes strange behaviour.
  1458. X.br
  1459. XVery very occasional malloc error when indexing group from NNTP server.
  1460. X.br
  1461. XWill not uudecode some of the images in alt.binaries.pictures because
  1462. Xmore than one image is in the multi-part file to uudecode. Only the
  1463. Xfirst image will be uudecoded.
  1464. X.SH HISTORY
  1465. XBased on the tass newsreader that was developed by Rich Skrenta and posted
  1466. Xto alt.sources in March 1991. Tass was itself heavily infleuenced by NOTES
  1467. Xwhich was developed at the University of Illinois in the 1970's.
  1468. X.SH CREDITS
  1469. XRich Skrenta    author of tass v3.2 which this newsreader used as its base.
  1470. X.br
  1471. XSyd Weinstein    curses.c is taken from the elm mailreader
  1472. X.br
  1473. XRich Salz    author of wildmat.c pattern matching routines.
  1474. X.br
  1475. XChris Smith    author of multi-part uudecode routine.
  1476. X.br
  1477. X.SH AUTHOR
  1478. XIain Lea        (iain@estevax.uucp or ...!unido!estevax!iain)
  1479. SHAR_EOF
  1480. $TOUCH -am 0903095691 tin.1 &&
  1481. chmod 0600 tin.1 ||
  1482. echo "restore of tin.1 failed"
  1483. set `wc -c tin.1`;Wc_c=$1
  1484. if test "$Wc_c" != "23350"; then
  1485.     echo original size 23350, current size $Wc_c
  1486. fi
  1487. rm -f shar3_seq_.tmp
  1488. echo "You have unpacked the last part"
  1489. exit 0
  1490.  
  1491.  
  1492. --
  1493. NAME   Iain Lea
  1494. EMAIL  norisc!iain@estevax.UUCP  ...!unido!estevax!norisc!iain
  1495. SNAIL  Siemens AG, AUT 922C, Postfach 4848, Nuernberg, Germany
  1496. PHONE  +49-911-895-3853, +49-911-895-3877, +49-911-331963
  1497.