home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3960 < prev    next >
Internet Message Format  |  1991-09-03  |  51KB

  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 03/08)
  5. Message-ID: <601@norisc.UUCP>
  6. Date: 3 Sep 91 10:58:23 GMT
  7. Sender: iain@norisc.UUCP (Iain Lea)
  8. Organization: What organization?
  9. Lines: 1769
  10.  
  11. Submitted-by: iain@estevax.uucp
  12. Archive-name: tin1.0/part03
  13.  
  14. #!/bin/sh
  15. # this is tin.shar.03 (part 3 of tin1.0)
  16. # do not concatenate these parts, unpack them in order with /bin/sh
  17. # file group.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" != 3; 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 group.c"
  36. sed 's/^X//' << 'SHAR_EOF' >> group.c &&
  37. X}
  38. X
  39. Xvoid erase_subject_arrow()
  40. X{
  41. X    erase_arrow (INDEX_TOP + (index_point-first_subj_on_screen));
  42. X}
  43. X
  44. X
  45. Xint prompt_subject_num (ch, group)
  46. X    char ch;
  47. X    char *group;
  48. X{
  49. X    int num;
  50. X
  51. X    clear_message();
  52. X
  53. X    if ((num = parse_num(ch, txt_read_art)) == -1) {
  54. X        clear_message();
  55. X        return FALSE;
  56. X    }
  57. X    num--;        /* index from 0 (internal) vs. 1 (user) */
  58. X
  59. X    if (num >= top_base)
  60. X        num = top_base - 1;
  61. X
  62. X    if (num >= first_subj_on_screen
  63. X    &&  num < last_subj_on_screen) {
  64. X        erase_subject_arrow();
  65. X        index_point = num;
  66. X        draw_subject_arrow();
  67. X    } else {
  68. X#ifndef USE_CLEARSCREEN
  69. X        erase_subject_arrow();
  70. X#endif        
  71. X        index_point = num;
  72. X        show_group_page(group);
  73. X    }
  74. X    return TRUE;
  75. X}
  76. X
  77. X/*
  78. X *  Return the number of unread articles there are within a thread
  79. X */
  80. X
  81. Xint new_responses (thread)
  82. X    int thread;
  83. X{
  84. X    int i;
  85. X    int sum = 0;
  86. X
  87. X    for (i = base[thread]; i >= 0; i = arts[i].thread)
  88. X            if (arts[i].unread)
  89. X                sum++;
  90. X    
  91. X    return sum;
  92. X}
  93. X
  94. X
  95. Xvoid clear_note_area ()
  96. X{
  97. X#ifndef USE_CLEARSCREEN
  98. X    MoveCursor (3, 0);        /* top left corner */
  99. X    CleartoEOS ();
  100. X#endif
  101. X}
  102. X
  103. X
  104. Xint find_new_pos (old_top, old_artnum, cur_pos)
  105. X    int old_top;
  106. X    long old_artnum;
  107. X    int cur_pos;
  108. X{
  109. X    int pos;
  110. X    
  111. X    if (top != old_top) {
  112. X        if ((pos = valid_artnum (old_artnum)) >= 0) {
  113. X            if ((pos = which_base (pos)) >= 0) {
  114. X                return pos;
  115. X            } else {
  116. X                return top_base - 1;
  117. X            }
  118. X        } else {
  119. X            return top_base - 1;
  120. X        }
  121. X    }
  122. X
  123. X    return cur_pos;
  124. X}
  125. X
  126. SHAR_EOF
  127. echo "File group.c is complete" &&
  128. $TOUCH -am 0903095091 group.c &&
  129. chmod 0600 group.c ||
  130. echo "restore of group.c failed"
  131. set `wc -c group.c`;Wc_c=$1
  132. if test "$Wc_c" != "18741"; then
  133.     echo original size 18741, current size $Wc_c
  134. fi
  135. # ============= hashstr.c ==============
  136. echo "x - extracting hashstr.c (Text)"
  137. sed 's/^X//' << 'SHAR_EOF' > hashstr.c &&
  138. X/*
  139. X *  Project   : tin - a visual threaded usenet newsreader
  140. X *  Module    : hashstr.c
  141. X *  Author    : R.Skrenta
  142. X *  Created   : 01-04-91
  143. X *  Updated   : 10-08-91
  144. X *  Release   : 1.0
  145. X *  Notes     :
  146. X *  Copyright : (c) Copyright 1991 by Rich Skrenta
  147. X *                You may  freely  copy or  redistribute  this software,
  148. X *              so  long as there is no profit made from its use, sale
  149. X *              trade or  reproduction.  You may not change this copy-
  150. X *              right notice, and it must be included in any copy made
  151. X */
  152. X
  153. X#include    <stdio.h>
  154. X#ifdef BSD
  155. X#include    <strings.h>
  156. X#else
  157. X#include    <string.h>
  158. X#include    <malloc.h>
  159. X#endif
  160. X
  161. X/*
  162. X *  Maintain a table of all strings we have seen.
  163. X *  If a new string comes in, add it to the table and return a pointer
  164. X *  to it.  If we've seen it before, just return the pointer to it.
  165. X *
  166. X *  Usage:  hash_str("some string") returns char *
  167. X *
  168. X *  Spillovers are chained on the end
  169. X *
  170. X *  !!! NOTE: CHECK OUT add_string FOR THE *iptr TRICK THAT IS LATER !!!
  171. X *  !!! USED IN dump_index (art.c)                                   !!!
  172. X *
  173. X */
  174. X
  175. X
  176. X/*
  177. X *  Arbitrary table size, but make sure it's prime!
  178. X */
  179. X
  180. X/* #define        TABLE_SIZE    1409    */
  181. X
  182. X#define        TABLE_SIZE    2411
  183. X
  184. X
  185. X
  186. Xstruct hashnode {
  187. X    char *s;            /* the string we're saving */
  188. X    struct hashnode *next;        /* chain for spillover */
  189. X};
  190. X
  191. Xstruct hashnode *table[TABLE_SIZE];
  192. X
  193. Xextern char *my_malloc();
  194. Xstruct hashnode *add_string();
  195. X
  196. X
  197. Xchar *hash_str(s)
  198. Xchar *s;
  199. X{
  200. X    struct hashnode *p;    /* used to descend the spillover structs */
  201. X    long h;            /* result of hash:  index into hash table */
  202. X
  203. X    if (s == NULL)
  204. X        return(NULL);
  205. X
  206. X    {
  207. X        char *t = s;
  208. X
  209. X        h = *t++;
  210. X        while (*t)
  211. X            h = ((h << 1) ^ *t++) % TABLE_SIZE;
  212. X    /*        h = (h * 128 + *t++) % TABLE_SIZE;    */
  213. X    }
  214. X
  215. X    p = table[h];
  216. X
  217. X    if (p == NULL) {
  218. X        table[h] = add_string(s);
  219. X        return table[h]->s;
  220. X    }
  221. X
  222. X    while (1) {
  223. X        if (strcmp(s, p->s) == 0)
  224. X            return(p->s);
  225. X
  226. X        if (p->next == NULL) {
  227. X            p->next = add_string(s);
  228. X            return p->next->s;
  229. X        } else
  230. X            p = p->next;
  231. X    }
  232. X}
  233. X
  234. X
  235. Xstruct hashnode *add_string(s)
  236. Xchar *s;
  237. X{
  238. X    struct hashnode *p;
  239. X    extern char *strcpy();
  240. X    int *iptr;
  241. X
  242. X    p = (struct hashnode *) my_malloc(sizeof(*p));
  243. X
  244. X    p->next = NULL;
  245. X    iptr = (int *) my_malloc((unsigned) strlen(s) + sizeof(int) + 1);
  246. X    *iptr++ = -1;
  247. X    p->s = (char *) iptr;
  248. X    strcpy(p->s, s);
  249. X    return(p);
  250. X}
  251. X
  252. X
  253. Xvoid hash_init ()
  254. X{
  255. X    int i;
  256. X
  257. X    for (i = 0; i < TABLE_SIZE; i++)
  258. X        table[i] = NULL;
  259. X}
  260. X
  261. X
  262. Xvoid hash_reclaim ()
  263. X{
  264. X    int i;
  265. X    struct hashnode *p, *next;
  266. X    int *iptr;
  267. X
  268. X    for (i = 0; i < TABLE_SIZE; i++)
  269. X        if (table[i] != NULL) {
  270. X            p = table[i];
  271. X            while (p != NULL) {
  272. X                next = p->next;
  273. X                iptr = (int *) p->s;
  274. X                free(--iptr);
  275. X                free(p);
  276. X                p = next;
  277. X            }
  278. X            table[i] = NULL;
  279. X        }
  280. X}
  281. X
  282. X
  283. SHAR_EOF
  284. $TOUCH -am 0903095091 hashstr.c &&
  285. chmod 0600 hashstr.c ||
  286. echo "restore of hashstr.c failed"
  287. set `wc -c hashstr.c`;Wc_c=$1
  288. if test "$Wc_c" != "2673"; then
  289.     echo original size 2673, current size $Wc_c
  290. fi
  291. # ============= help.c ==============
  292. echo "x - extracting help.c (Text)"
  293. sed 's/^X//' << 'SHAR_EOF' > help.c &&
  294. X/*
  295. X *  Project   : tin - a visual threaded usenet newsreader
  296. X *  Module    : help.c
  297. X *  Author    : R.Skrenta / I.Lea
  298. X *  Created   : 01-04-91
  299. X *  Updated   : 03-09-91
  300. X *  Release   : 1.0
  301. X *  Notes     :
  302. X *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  303. X *                You may  freely  copy or  redistribute  this software,
  304. X *              so  long as there is no profit made from its use, sale
  305. X *              trade or  reproduction.  You may not change this copy-
  306. X *              right notice, and it must be included in any copy made
  307. X */
  308. X
  309. X#include    "tin.h"
  310. X#include    "nntp.h"
  311. X
  312. Xchar *help_select[] = {
  313. X    txt_help_g_4,
  314. X    txt_help_ctrl_d,
  315. X    txt_help_ctrl_l,
  316. X    txt_help_g_ctrl_k,
  317. X    txt_help_g_ctrl_r,
  318. X    txt_help_g_cr,
  319. X    txt_help_g_tab,
  320. X    txt_help_b,
  321. X    txt_help_bug_report,
  322. X    txt_help_sel_c,
  323. X    txt_help_g,
  324. X    txt_help_j,
  325. X    txt_help_h,
  326. X    txt_help_m,
  327. X    txt_help_M,
  328. X    txt_help_q,
  329. X    txt_help_s,
  330. X    txt_help_S,
  331. X    txt_help_W,
  332. X    txt_help_g_y,
  333. X    txt_help_g_dollar,
  334. X    txt_help_g_search,
  335. X    (char *) 0
  336. X};
  337. X
  338. Xchar *help_group[] = {
  339. X    txt_help_i_4,
  340. X    txt_help_ctrl_d,
  341. X    txt_help_ctrl_k,
  342. X    txt_help_ctrl_l,
  343. X    txt_help_i_cr,
  344. X    txt_help_i_tab,
  345. X    txt_help_a,
  346. X    txt_help_b,
  347. X    txt_help_bug_report,
  348. X    txt_help_c,
  349. X    txt_help_g,
  350. X    txt_help_h,
  351. X    txt_help_I,
  352. X    txt_help_j,
  353. X    txt_help_K,
  354. X    txt_help_p_m,
  355. X    txt_help_M,
  356. X    txt_help_o,
  357. X    txt_help_i_n,
  358. X    txt_help_i_p,
  359. X    txt_help_q,
  360. X    txt_help_p_s,
  361. X    txt_help_t,
  362. X    txt_help_T,
  363. X    txt_help_U,
  364. X    txt_help_w,
  365. X    txt_help_W,
  366. X    txt_help_p_z,
  367. X    txt_help_i_search,
  368. X    txt_help_dash,
  369. X    txt_help_pipe,
  370. X    (char *) 0
  371. X};
  372. X
  373. Xchar *help_page[] = {
  374. X    txt_help_p_0,
  375. X    txt_help_p_4,
  376. X    txt_help_ctrl_h,
  377. X    txt_help_ctrl_k,
  378. X    txt_help_ctrl_l,
  379. X    txt_help_p_ctrl_r,
  380. X    txt_help_p_cr,
  381. X    txt_help_p_tab,
  382. X    txt_help_b,
  383. X    txt_help_a,
  384. X    txt_help_bug_report,
  385. X    txt_help_c,
  386. X    txt_help_p_d,
  387. X    txt_help_p_f,
  388. X    txt_help_h,
  389. X    txt_help_p_i,
  390. X    txt_help_I,
  391. X    txt_help_p_k,
  392. X    txt_help_p_m,
  393. X    txt_help_M,
  394. X    txt_help_p_n,
  395. X    txt_help_o,
  396. X    txt_help_p_p,
  397. X    txt_help_q,
  398. X    txt_help_p_r,
  399. X    txt_help_p_s,
  400. X    txt_help_t,
  401. X    txt_help_T,
  402. X    txt_help_w,
  403. X    txt_help_W,
  404. X    txt_help_p_z,
  405. X    txt_help_p_search,
  406. X    txt_help_dash,
  407. X    txt_help_pipe,
  408. X    (char *) 0
  409. X};
  410. X
  411. X
  412. Xvoid show_help_page (help, title)
  413. X    char *help[];
  414. X    char *title;
  415. X{
  416. X    char buf[LEN+1];
  417. X    char ch;
  418. X    int i;
  419. X    int cur_page = 1;
  420. X    int max_page = 1;
  421. X    int pos_help = 0;
  422. X
  423. X    for (i=0 ; help[i] ; i++) {        /* find how many elements in array */
  424. X        ;
  425. X    }
  426. X
  427. X    max_page = i / NOTESLINES;
  428. X    if (i % NOTESLINES) {
  429. X        max_page++;
  430. X    }
  431. X
  432. X    while (1) {
  433. X        ClearScreen ();
  434. X        sprintf (buf, title, cur_page, max_page);
  435. X        center_line (0, FALSE, page_header);
  436. X        center_line (1, TRUE, buf);
  437. X        MoveCursor (3, 0);
  438. X
  439. X        for (i=pos_help ; i < (pos_help + NOTESLINES) && help[i] ; i++) {
  440. X            printf (help[i]);
  441. X        }
  442. X
  443. X        center_line (LINES, FALSE, txt_hit_space_for_more);
  444. X        ch = ReadCh ();
  445. X        switch (ch) {
  446. X            case 27:    /* (ESC) common arrow keys */
  447. X                ch = ReadCh();
  448. X                if (ch == '[' || ch == 'O')
  449. X                    ch = ReadCh();
  450. X                switch (ch) {
  451. X                    case 'B':        /* page down */
  452. X                    case 'C':
  453. X                    case 'G':        /* ansi  PgDn */
  454. X                    case 'U':        /* at386 PgDn */
  455. X                        if (cur_page < max_page) {
  456. X                            pos_help = cur_page*NOTESLINES;
  457. X                            cur_page++;
  458. X                        }
  459. X                        break;
  460. X
  461. X                    case 'A':        /* page up */
  462. X                    case 'D':
  463. X                    case 'i':
  464. X                    case 'I':        /* ansi  PgUp */
  465. X                    case 'V':        /* at386 PgUp */
  466. X                        if (cur_page > 1) {
  467. X                            cur_page--;
  468. X                            pos_help = (cur_page-1)*NOTESLINES;
  469. X                        }
  470. X                        break;
  471. X
  472. X                    case 'H':        /* at386  Home */
  473. X                        cur_page = 1;
  474. X                        pos_help = 0;
  475. X                        break;
  476. X                    
  477. X                    case 'F':        /* ansi  End */
  478. X                    case 'Y':        /* at386  End */
  479. X                        cur_page = max_page;
  480. X                        pos_help = (max_page-1) * NOTESLINES;
  481. X                        break;
  482. X                }
  483. X                break;
  484. X
  485. X            case ctrl('D'):            /* page down */
  486. X            case ' ':
  487. X                if (cur_page < max_page) {
  488. X                    pos_help = cur_page*NOTESLINES;
  489. X                    cur_page++;
  490. X                }
  491. X                break;
  492. X            
  493. X            case ctrl('U'):            /* page up */
  494. X            case 'b':
  495. X                if (cur_page > 1) {
  496. X                    cur_page--;
  497. X                    pos_help = (cur_page-1)*NOTESLINES;
  498. X                }
  499. X                break;
  500. X
  501. X            default:
  502. X#ifndef USE_CLEARSCREEN
  503. X                ClearScreen ();
  504. X#endif    
  505. X                return;
  506. X        }    
  507. X    }
  508. X}
  509. X
  510. X
  511. Xvoid help_select_info ()
  512. X{
  513. X}
  514. X
  515. X
  516. Xvoid help_group_info ()
  517. X{
  518. X}
  519. X
  520. X
  521. Xvoid help_page_info ()
  522. X{
  523. X}
  524. SHAR_EOF
  525. $TOUCH -am 0903095091 help.c &&
  526. chmod 0600 help.c ||
  527. echo "restore of help.c failed"
  528. set `wc -c help.c`;Wc_c=$1
  529. if test "$Wc_c" != "4017"; then
  530.     echo original size 4017, current size $Wc_c
  531. fi
  532. # ============= kill.c ==============
  533. echo "x - extracting kill.c (Text)"
  534. sed 's/^X//' << 'SHAR_EOF' > kill.c &&
  535. X/*
  536. X *  Project   : tin - a visual threaded usenet newsreader
  537. X *  Module    : kill.c
  538. X *  Author    : I.Lea
  539. X *  Created   : 01-04-91
  540. X *  Updated   : 28-08-91
  541. X *  Release   : 1.0
  542. X *  Notes     : kill articles
  543. X *  Copyright : (c) Copyright 1991 by Iain Lea
  544. X *                You may  freely  copy or  redistribute  this software,
  545. X *              so  long as there is no profit made from its use, sale
  546. X *              trade or  reproduction.  You may not change this copy-
  547. X *              right notice, and it must be included in any copy made
  548. X */
  549. X
  550. X#include    "tin.h"
  551. X
  552. Xextern char index_file[LEN+1];
  553. X
  554. Xstruct kill_t *killf;
  555. Xint kill_num = 0;
  556. Xint max_kill;
  557. X
  558. X/*
  559. X *  read_kill_file - read ~/.tin/kill file contents into kill array
  560. X */
  561. X
  562. Xint read_kill_file ()
  563. X{
  564. X    char buf[LEN+1];
  565. X    FILE *fp;
  566. X
  567. X    free_kill_array ();
  568. X    
  569. X    set_real_uid_gid ();
  570. X
  571. X    if ((fp = fopen (killfile, "r")) != NULL) {
  572. X        kill_num=0;
  573. X        while (fgets (buf, LEN, fp) != NULL) {
  574. X            if (buf[0] != '#') {
  575. X                if (kill_num == max_kill-1) {
  576. X                    expand_kill ();
  577. X                }
  578. X                killf[kill_num].kill_type = atoi (buf);
  579. X                if (fgets (buf, LEN, fp) != NULL) {
  580. X                    killf[kill_num].kill_group = atol (buf);
  581. X                } else {    
  582. X                    goto corrupt_killfile;
  583. X                }    
  584. X                switch (killf[kill_num].kill_type) {
  585. X                    case KILL_SUBJ:
  586. X                        if (fgets (buf, LEN, fp) != NULL) {
  587. X                            buf[strlen (buf)-1] = '\0';
  588. X                            killf[kill_num].kill_subj = str_dup (buf);
  589. X                        }
  590. X                        break;
  591. X                    case KILL_FROM:
  592. X                        if (fgets (buf, LEN, fp) != NULL) {
  593. X                            buf[strlen (buf)-1] = '\0';
  594. X                            killf[kill_num].kill_from = str_dup (buf);
  595. X                        }
  596. X                        break;
  597. X                    case KILL_BOTH:
  598. X                        if (fgets (buf, LEN, fp) != NULL) {
  599. X                            buf[strlen (buf)-1] = '\0';
  600. X                            killf[kill_num].kill_subj = str_dup (buf);
  601. X                        }
  602. X                        if (fgets (buf, LEN, fp) != NULL) {
  603. X                            buf[strlen (buf)-1] = '\0';
  604. X                            killf[kill_num].kill_from = str_dup (buf);
  605. X                        }
  606. X                        break;
  607. X                    default:
  608. X                        goto corrupt_killfile;
  609. X                }
  610. X                kill_num++;
  611. X            }
  612. X        }
  613. X        fclose (fp);
  614. X        set_tin_uid_gid ();
  615. X        return TRUE;        
  616. X    } else {
  617. X        set_tin_uid_gid ();
  618. X        return FALSE;
  619. X    }
  620. X
  621. Xcorrupt_killfile:
  622. X    fclose (fp);
  623. X    killf[kill_num].kill_type = 0;
  624. X    error_message ("corrupt kill file %s", killfile);
  625. X    set_tin_uid_gid ();
  626. X    return FALSE;
  627. X}
  628. X
  629. X/*
  630. X *  write_kill_file - write kill strings to ~/.tin/kill
  631. X */
  632. X
  633. Xvoid write_kill_file ()
  634. X{
  635. X    FILE *fp;
  636. X    int i;
  637. X    
  638. X    set_real_uid_gid ();
  639. X
  640. X    if (kill_num && (fp = fopen (killfile, "w")) != NULL) {
  641. X        wait_message (txt_saving);
  642. X        fprintf (fp, "# 1st line  1=(Subject: only)  2=(From: only)  3=(Subject: & From:)\n");
  643. X        fprintf (fp, "# 2nd line  0=(kill on all newsgroups)  >0=(kill on specific newsgroup)\n");
  644. X        for (i=0 ; i < kill_num ; i++) {
  645. X            if (killf[i].kill_type && (killf[i].kill_subj || killf[i].kill_from)) {
  646. X                fprintf (fp, "#\n# kill description %d\n", i+1);
  647. X                fprintf (fp, "%d\n", killf[i].kill_type);
  648. X                fprintf (fp, "%ld\n", killf[i].kill_group);
  649. X                switch (killf[i].kill_type) {
  650. X                    case KILL_SUBJ:
  651. X                        fprintf (fp, "%s\n", killf[i].kill_subj);
  652. X                        break;
  653. X                    case KILL_FROM:
  654. X                        fprintf (fp, "%s\n", killf[i].kill_from);
  655. X                        break;
  656. X                    case KILL_BOTH:
  657. X                        fprintf (fp, "%s\n", killf[i].kill_subj);
  658. X                        fprintf (fp, "%s\n", killf[i].kill_from);
  659. X                        break;
  660. X                }
  661. X            }
  662. X        }
  663. X        fclose (fp);
  664. X        chmod (killfile, 0600);
  665. X    }
  666. X    set_tin_uid_gid ();
  667. X}
  668. X
  669. X/*
  670. X *  options menu so that the user can dynamically change parameters
  671. X */
  672. Xint kill_art_menu (group_name, index)
  673. X    char *group_name;
  674. X    int index;
  675. X{
  676. X    char text[LEN+1];
  677. X    char kill_from[LEN+1];
  678. X    char kill_subj[LEN+1];
  679. X    char kill_group[LEN+1];
  680. X    char ch_default = 's';
  681. X    char *str;    
  682. X    int ch;
  683. X    int counter;
  684. X    int kill_from_ok = FALSE;
  685. X    int kill_subj_ok = FALSE;
  686. X    int kill_every_group;
  687. X    
  688. X    sprintf (kill_group, "%s only", group_name);
  689. X    my_strncpy (text, arts[index].subject, 45);
  690. X    sprintf (kill_subj, txt_kill_subject, text);
  691. X    my_strncpy (text, arts[index].from, 45);
  692. X    sprintf (kill_from, txt_kill_from, text);
  693. X    text[0] = '\0';
  694. X    
  695. X    ClearScreen ();
  696. X    printf("%s\r\n", nice_time());    /* time in upper left */
  697. X
  698. X    center_line (1, TRUE, txt_kill_menu);
  699. X    
  700. X    MoveCursor(INDEX_TOP, 0);
  701. X    printf ("%s\r\n\r\n", txt_kill_text);
  702. X    printf ("%s\r\n\r\n\r\n", txt_kill_text_type);
  703. X    printf ("%s\r\n\r\n", kill_subj);
  704. X    printf ("%s\r\n\r\n\r\n", kill_from);
  705. X    printf ("%s%s", txt_kill_group, kill_group);
  706. X    fflush(stdout);
  707. X
  708. X    show_menu_help (txt_help_kill_text);
  709. X    parse_menu_string (INDEX_TOP, strlen (txt_kill_text), text);
  710. X
  711. X    if (text[0]) {
  712. X        show_menu_help (txt_help_kill_text_type);
  713. X        counter = 1;
  714. X        MoveCursor (INDEX_TOP+2, strlen (txt_kill_text_type));
  715. X        str = "Subject: line only    ";
  716. X        printf ("%s", str);
  717. X        fflush(stdout);
  718. X        do {
  719. X            MoveCursor (INDEX_TOP+2, strlen (txt_kill_text_type));
  720. X            if ((ch    = ReadCh()) == ' ') {
  721. X                counter++;
  722. X                if (counter == KILL_BOTH+1) {
  723. X                    counter = KILL_SUBJ;
  724. X                }
  725. X                switch (counter) {
  726. X                    case KILL_SUBJ:
  727. X                        str = "Subject: line only    ";
  728. X                        break;
  729. X                    case KILL_FROM:
  730. X                        str = "From: line only       ";
  731. X                        break;
  732. X                    case KILL_BOTH:
  733. X                        str = "Subject: & From: lines";
  734. X                        break;
  735. X                }
  736. X                printf ("%s", str);
  737. X                fflush(stdout);
  738. X            }
  739. X        } while (ch != CR);
  740. X    }
  741. X
  742. X    if (! text[0]) {
  743. X        show_menu_help (txt_help_kill_subject);
  744. X        kill_subj_ok = prompt_yn (INDEX_TOP+5, kill_subj, 'y');
  745. X
  746. X        show_menu_help (txt_help_kill_from);
  747. X        kill_from_ok = prompt_yn (INDEX_TOP+7, kill_from, 'n');
  748. X    }
  749. X
  750. X    if (text[0] || kill_subj_ok || kill_from_ok) {
  751. X        show_menu_help (txt_help_kill_group);
  752. X        kill_every_group = FALSE;
  753. X        MoveCursor (INDEX_TOP+10, strlen (txt_kill_group));
  754. X        str = kill_group;
  755. X        printf ("%s", str);
  756. X        fflush(stdout);
  757. X        do {
  758. X            MoveCursor (INDEX_TOP+10, strlen (txt_kill_group));
  759. X            if ((ch    = ReadCh()) == ' ') {
  760. X                kill_every_group = !kill_every_group;
  761. X                if (kill_every_group) {
  762. X                    str = "All groups";
  763. X                } else {
  764. X                    str = kill_group;
  765. X                }
  766. X                CleartoEOLN (); 
  767. X                printf ("%s", str);
  768. X                fflush(stdout);
  769. X            }
  770. X        } while (ch != CR);
  771. X    }
  772. X
  773. X    while (1) {
  774. X        do {
  775. X            sprintf (msg, "%s%c", txt_abort_edit_save_killfile, ch_default);
  776. X            wait_message (msg);
  777. X            MoveCursor(LINES, strlen (txt_abort_edit_save_killfile));
  778. X            if ((ch = ReadCh()) == CR)
  779. X                ch = ch_default;
  780. X        } while (ch != 'a' && ch != 'e' && ch != 's');
  781. X        switch (ch) {
  782. X            case 'e':
  783. X                start_line_offset = 2;
  784. X                invoke_editor (killfile);
  785. X                untag_all_articles ();
  786. X                read_kill_file ();
  787. X                reload_index_file (group_name, FALSE);
  788. X                return TRUE;
  789. X
  790. X            case 'a':
  791. X                return FALSE;
  792. X            
  793. X            case 's':
  794. X                if (kill_num > max_kill-1) {
  795. X                    expand_kill ();
  796. X                }
  797. X                if (text[0]) {
  798. X                    switch (counter) {
  799. X                        case KILL_SUBJ:
  800. X                            killf[kill_num].kill_subj = str_dup (text);
  801. X                            break;
  802. X                        case KILL_FROM:
  803. X                            killf[kill_num].kill_from = str_dup (text);
  804. X                            break;
  805. X                        case KILL_BOTH:
  806. X                            killf[kill_num].kill_subj = str_dup (text);
  807. X                            killf[kill_num].kill_from = str_dup (text);
  808. X                            break;
  809. X                    }
  810. X                    killf[kill_num].kill_type = counter;
  811. X                    if (kill_every_group) {
  812. X                        killf[kill_num].kill_group= 0L;
  813. X                    } else {
  814. X                        killf[kill_num].kill_group= hash_s (group_name);
  815. X                    }
  816. X                    kill_num++;
  817. X                } else {
  818. X                    if (kill_subj_ok) {
  819. X                        killf[kill_num].kill_type = KILL_SUBJ;
  820. X                        killf[kill_num].kill_subj = str_dup (arts[index].subject);
  821. X                    }
  822. X                    if (kill_from_ok) {
  823. X                        killf[kill_num].kill_type |= KILL_FROM;
  824. X                        killf[kill_num].kill_from = str_dup (arts[index].from);
  825. X                    }
  826. X                    if (killf[kill_num].kill_type) {        
  827. X                        if (kill_every_group) {
  828. X                            killf[kill_num].kill_group= 0L;
  829. X                        } else {
  830. X                            killf[kill_num].kill_group= hash_s (group_name);
  831. X                        }
  832. X                        kill_num++;
  833. X                    }
  834. X                }
  835. X                write_kill_file ();
  836. X                return TRUE;
  837. X        }    
  838. X    }
  839. X}
  840. X
  841. X
  842. Xint untag_all_articles ()
  843. X{
  844. X    int untagged = FALSE;
  845. X    register int i;
  846. X
  847. X    for (i=0 ; i < top ; i++) {
  848. X        if (arts[i].tagged) {
  849. X            arts[i].tagged = FALSE;
  850. X            untagged = TRUE;
  851. X        }
  852. X    }
  853. X    num_of_tagged_files = 0;
  854. X
  855. X    return (untagged);
  856. X}
  857. X
  858. X
  859. Xint kill_any_articles (group)
  860. X    char *group;
  861. X{
  862. X    int killed = FALSE;
  863. X    int run_ok = FALSE;
  864. X    long group_hash;
  865. X    register int i, j;
  866. X
  867. X    if (! kill_articles) {
  868. X        return killed;
  869. X    }
  870. X
  871. X    if (kill_num) {
  872. X        group_hash = hash_s (group);
  873. X        for (i=0 ; i < kill_num ; i++) {
  874. X                if (killf[i].kill_group == 0L ||
  875. X                    killf[i].kill_group == group_hash) {
  876. X                    run_ok = TRUE;    
  877. X                }
  878. X        }
  879. X        if (! run_ok) {
  880. X            return (killed);
  881. X        }
  882. X        if (debug && ! update) {
  883. X            wait_message ("Killing articles...");
  884. X        }
  885. X        for (i=0 ; i < top ; i++) {
  886. X            for (j=0 ; j < kill_num && ! arts[i].tagged ; j++) {
  887. X                if (killf[j].kill_group == 0L ||
  888. X                    killf[j].kill_group == group_hash) {
  889. X                    switch (killf[j].kill_type) {
  890. X                        case KILL_SUBJ:
  891. X                            if (str_str (arts[i].subject, killf[j].kill_subj) != 0) {
  892. X                                arts[i].tagged = TRUE;
  893. X                                killed = TRUE;
  894. X                            }
  895. X                            break;
  896. X                        case KILL_FROM:
  897. X                            if (str_str (arts[i].from, killf[j].kill_from) != 0) {
  898. X                                arts[i].tagged = TRUE;
  899. X                                killed = TRUE;
  900. X                            }
  901. X                            break;
  902. X                        case KILL_BOTH:
  903. X                            if (str_str (arts[i].subject, killf[j].kill_subj) != 0) {
  904. X                                arts[i].tagged = TRUE;
  905. X                                killed = TRUE;
  906. X                            }
  907. X                            if (str_str (arts[i].from, killf[j].kill_from) != 0) {
  908. X                                arts[i].tagged = TRUE;
  909. X                                killed = TRUE;
  910. X                            }
  911. X                            break;
  912. X                    }
  913. X                }
  914. X            }
  915. X        }
  916. X    }
  917. X    return (killed);
  918. X}
  919. SHAR_EOF
  920. $TOUCH -am 0903095091 kill.c &&
  921. chmod 0600 kill.c ||
  922. echo "restore of kill.c failed"
  923. set `wc -c kill.c`;Wc_c=$1
  924. if test "$Wc_c" != "9118"; then
  925.     echo original size 9118, current size $Wc_c
  926. fi
  927. # ============= lang.c ==============
  928. echo "x - extracting lang.c (Text)"
  929. sed 's/^X//' << 'SHAR_EOF' > lang.c &&
  930. X/*
  931. X *  Project   : tin - a visual threaded usenet newsreader
  932. X *  Module    : lang.c
  933. X *  Author    : R.Skrenta / I.Lea
  934. X *  Created   : 01-04-91
  935. X *  Updated   : 01-09-91
  936. X *  Release   : 1.0
  937. X *  Notes     :
  938. X *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  939. X *                You may  freely  copy or  redistribute  this software,
  940. X *              so  long as there is no profit made from its use, sale
  941. X *              trade or  reproduction.  You may not change this copy-
  942. X *              right notice, and it must be included in any copy made
  943. X */
  944. X
  945. X#ifdef LANG_GERMAN
  946. X
  947. X#else
  948. X
  949. X/*
  950. X *  art.c
  951. X */
  952. X
  953. Xchar txt_group[] = "Group %s...    ";
  954. Xchar txt_cannot_open_dir[] = "can't open dir %s\n";
  955. Xchar txt_cannot_open_art[] = "can't open article %s: ";
  956. Xchar txt_indexing[] = "Indexing...%4d";
  957. Xchar txt_corrupt_index[] = "Index file %s corrupted. error %d on article %d";
  958. X
  959. X/*
  960. X *  feed.c
  961. X */
  962. X
  963. Xchar txt_art_thread_regex_tag[] = " a)rticle, t)hread, r)egex pattern T)agged articles: ";
  964. X#ifdef DONT_USE_REGEX 
  965. Xchar txt_feed_pattern[] = "Enter pattern [%s]> ";
  966. X#else
  967. Xchar txt_feed_pattern[] = "Enter regex pattern [%s]> ";
  968. X#endif
  969. Xchar txt_no_command[] = "No command";
  970. X
  971. X/*
  972. X *  group.c
  973. X */
  974. X
  975. Xchar txt_tagged_art[] = "tagged article";
  976. Xchar txt_untagged_art[] = "untagged article";
  977. Xchar txt_inverse_on[] = "Inverse video enabled";
  978. Xchar txt_inverse_off[] = "Inverse video disabled";
  979. Xchar txt_subscribed_to[] = "subscribed to %s";
  980. Xchar txt_unsubscribed_to[] = "unsubscribed from %s";
  981. Xchar txt_mark_all_read[] = "Mark everything as read? (y/n): ";
  982. Xchar txt_marked_as_read[] = "All articles marked as read";
  983. Xchar txt_no_more_groups[] = "No more groups";
  984. Xchar txt_no_prev_group[] = "No previous group";
  985. Xchar txt_no_arts[] = "*** No Articles ***";
  986. Xchar txt_no_groups[] = "*** No Groups ***";
  987. Xchar txt_end_of_arts[] = "*** End of Articles ***";
  988. Xchar txt_end_of_groups[] = "*** End of Groups ***";
  989. Xchar txt_no_next_unread_art[] = "No next unread article";
  990. Xchar txt_no_prev_unread_art[] = "No previous unread article";
  991. Xchar txt_no_last_message[] = "No last message";
  992. Xchar txt_bad_command[] = "Bad command.  Type 'h' for help.";
  993. Xchar txt_you_have_mail[] = "    You have mail\n";
  994. Xchar txt_type_h_for_help[] = "Type 'h' for help\n";
  995. Xchar txt_read_art[] = "Read article> ";
  996. Xchar txt_search_forwards[] = "Search forwards [%s]> ";
  997. Xchar txt_search_backwards[] = "Search backwards [%s]> ";
  998. Xchar txt_author_search_forwards[] = "Author search forwards [%s]> ";
  999. Xchar txt_author_search_backwards[] = "Author search backwards [%s]> ";
  1000. Xchar txt_no_search_string[] = "No search string";
  1001. Xchar txt_no_match[] = "No match";
  1002. Xchar txt_post_subject[] = "Post Subject: ";
  1003. Xchar txt_no_subject[] = "No subject";
  1004. Xchar txt_cannot_open[] = "can't open %s";
  1005. Xchar txt_posting[] = "Posting...";
  1006. Xchar txt_art_posted[] = "-- Article posted --";
  1007. Xchar txt_art_rejected[] = "-- Article rejected (saved to %s) --";
  1008. Xchar txt_abort_edit_post[] = "a)bort, e)dit, p)ost: ";
  1009. Xchar txt_help_i_4[] = "4$       Select article 4 ($=select last article)\r\n";
  1010. Xchar txt_help_ctrl_k[] = "^K       Kill current article\r\n";
  1011. Xchar txt_help_ctrl_l[] = "^L       Redraw page\r\n";
  1012. Xchar txt_help_ctrl_d[] = "^D^U     Down (^U=up) a page\r\n";
  1013. Xchar txt_help_i_cr[] = "<CR>     Read current article\r\n";
  1014. Xchar txt_help_i_tab[] = "<TAB>    View next unread article or group\r\n";
  1015. Xchar txt_help_m[] = "m        Move current group within group selection list\r\n";
  1016. Xchar txt_help_M[] = "M        Menu of configurable options\r\n";
  1017. Xchar txt_help_a[] = "aA       Author forward (A=backward) search\r\n";
  1018. Xchar txt_help_sel_c[] = "cC       Mark group read (C=and goto next unread group)\r\n";
  1019. Xchar txt_help_c[] = "c        Mark all articles as read and goto group selection menu\r\n";
  1020. Xchar txt_help_g[] = "g        Choose a new group by name\r\n";
  1021. Xchar txt_help_I[] = "I        Toggle inverse video\r\n";
  1022. Xchar txt_help_K[] = "K        Mark article/thread as read & goto next unread\r\n";
  1023. Xchar txt_help_j[] = "jk       Down (k=up) a line\r\n";
  1024. Xchar txt_help_i_n[] = "nN       Goto next (N=next unread) group\r\n";
  1025. Xchar txt_help_i_p[] = "pP       Goto previous (P=previous unread) group\r\n";
  1026. Xchar txt_help_q[] = "q        Quit\r\n";
  1027. Xchar txt_help_s[] = "su       Subscribe (u=unsubscribe) to this group\r\n";
  1028. Xchar txt_help_S[] = "SU       Subscribe (U=unsubscribe) groups that match pattern\r\n";
  1029. Xchar txt_help_t[] = "t        Return to group selection index\r\n";
  1030. Xchar txt_help_T[] = "T        Tag current article for mailing/piping/printing/saving\r\n";
  1031. Xchar txt_help_U[] = "U        Untag all tagged articles\r\n";
  1032. Xchar txt_help_w[] = "w        Post an article\r\n";
  1033. Xchar txt_help_i_search[] = "/?       Subject forward (?=backward) search\r\n";
  1034. Xchar txt_help_dash[] = "-        Show last message\r\n";
  1035. X#ifdef DONT_USE_REGEX 
  1036. Xchar txt_save_pattern[] = "Enter save pattern [%s]> ";
  1037. X#else
  1038. Xchar txt_save_pattern[] = "Enter regex save pattern [%s]> ";
  1039. X#endif
  1040. Xchar txt_base_subdir[] = "Enter sub directory name> ";
  1041. Xchar txt_saved_pattern_to[] = "-- Saved pattern to %s - %s --";
  1042. Xchar txt_saved_to_mailbox[] = "-- Saved to mailbox %s --";
  1043. Xchar txt_switch_on_kill_art_menu[] = "Kill Article Menu is switched OFF. Select Options Menu to switch it ON.";
  1044. X
  1045. X/* 
  1046. X *  help.c:
  1047. X */
  1048. X
  1049. Xchar txt_group_select_com[] = "Group Selection Commands (page %d of %d)";
  1050. Xchar txt_index_page_com[] = "Index Page Commands (page %d of %d)";
  1051. Xchar txt_art_pager_com[] = "Article Pager Commands (page %d of %d)";
  1052. Xchar txt_hit_space_for_more[] = "PgDn,End,<SPACE>,^D - page down. PgUp,Home,b,^U - page up. <CR>,q - quit";
  1053. X
  1054. X/* 
  1055. X *  kill.c:
  1056. X */
  1057. X
  1058. Xchar txt_kill_menu[] = "Kill Article Menu";
  1059. Xchar txt_kill_subject[] = "Kill Subject [%-45s] (y/n): ";
  1060. Xchar txt_kill_from[] =    "Kill From    [%-45s] (y/n): ";
  1061. Xchar txt_kill_text[] = "Kill text pattern : ";
  1062. Xchar txt_kill_text_type[] = "Apply pattern to  : ";
  1063. Xchar txt_kill_group[] =     "Kill pattern scope: ";
  1064. Xchar txt_help_kill_subject[] = "Subject: line to add to kill file. Press backspace key to clear field.";
  1065. Xchar txt_help_kill_from[] = "From: line to add to kill file. Press backspace key to clear field.";
  1066. Xchar txt_help_kill_text[] = "Enter text pattern to kill if Subject: & From: lines are not what you want.";
  1067. Xchar txt_help_kill_text_type[] = "Select where text pattern should be applied. <SPACE> toggles & <CR> sets.";
  1068. Xchar txt_help_kill_group[] = "Apply kill to current group only or all groups. <SPACE> toggles & <CR> sets.";
  1069. Xchar txt_abort_edit_save_killfile[] = "a)bort e)dit s)ave killfile: ";
  1070. X
  1071. X
  1072. X/* 
  1073. X *  main.c:
  1074. X */
  1075. X
  1076. Xchar txt_not_in_active_file[] = "Group %s not found in active file";
  1077. Xchar txt_screen_init_failed[] = "Screen initialization failed\n";
  1078. Xchar txt_bad_active_file[] = "Active file corrupt\n";
  1079. X
  1080. X/*
  1081. X *  misc.c
  1082. X */
  1083. X
  1084. Xchar txt_cannot_find_base_art[] = "Cannot find base article %s";
  1085. Xchar txt_out_of_memory[] = "%s: out of memory\n";
  1086. Xchar txt_rename_error[] = "Error: rename %s to %s";
  1087. Xchar txt_shell_escape[] = "Enter shell command> ";
  1088. X
  1089. X/*
  1090. X *  nntp_open.c
  1091. X */
  1092. X
  1093. Xchar txt_cannot_get_nntp_server_name[] = "Cannot get nntp server name\n";
  1094. Xchar txt_server_name_in_file_env_var[] = "Either put the name in the file %s,\nor put it in the environment variable NNTPSERVER\n";
  1095. Xchar txt_failed_to_connect_to_server[] = "failed to connect to (%s) server\n";
  1096. Xchar txt_rejected_by_nntpserver[] = "rejected by server, nntp error %d\n";
  1097. Xchar txt_connection_to_server_broken[] = "connection to server broken\n";
  1098. Xchar txt_stuff_nntp_cannot_open[] = "stuff_nntp: can't open %s: ";
  1099. Xchar txt_nntp_to_fp_cannot_reopen[] = "nntp_to_fp: can't reopen %s: ";
  1100. Xchar txt_nntp_to_fd_cannot_reopen[] = "nntp_to_fd: can't reopen %s: ";
  1101. X
  1102. X/*
  1103. X *  page.c
  1104. X */
  1105. X
  1106. Xchar txt_quit[] = "Do you really want to quit? (y/n): ";
  1107. Xchar txt_art_unavailable[] = "[Article %ld unvailable]\r\r";
  1108. Xchar txt_art_marked_as_unread[] = "Article marked as unread";
  1109. Xchar txt_thread_marked_as_unread[] = "Thread marked as unread";
  1110. Xchar txt_begin_of_art[] = "*** Beginning of article ***";
  1111. Xchar txt_next_resp[] = "-- Next response --";
  1112. Xchar txt_last_resp[] = "-- Last response --";
  1113. Xchar txt_more[] = "--More--";
  1114. Xchar txt_more_percent[] = "--More--(%d%%) [%ld/%ld]";
  1115. Xchar txt_thread_x_of_n[] = "%sThread %3d of %3d\r\n";
  1116. Xchar txt_art[] = "Article %ld  ";
  1117. Xchar txt_resp_x_of_n[] = "Respno %3d of %3d\r\n";
  1118. Xchar txt_no_resp[] = "No responses\r\n";
  1119. Xchar txt_1_resp[] = "1 Response\r\n";
  1120. Xchar txt_x_resp[] = "%d Responses\r\n";
  1121. Xchar txt_s_at_s[] = "%s at %s";
  1122. Xchar txt_thread_resp_page[] = "Thread %d of %d, Resp %d (page %d):  %s";
  1123. Xchar txt_thread_page[] = "Thread %d of %d (page %d):  %s";
  1124. Xchar txt_read_resp[] = "Read response> ";
  1125. Xchar txt_help_p_0[] = "0        Read the base article in current thread\r\n";
  1126. Xchar txt_help_p_4[] = "4        Read response 4 in current thread\r\n";
  1127. Xchar txt_help_p_cr[] = "<CR>     Goto to next thread\r\n";
  1128. Xchar txt_help_p_tab[] = "<TAB>    Advance to next page or unread article\r\n";
  1129. Xchar txt_help_b[] = "b<SPACE> Back (<SPACE>=forward) a page\r\n";
  1130. Xchar txt_help_bug[] = "B        Mail bug/gripe/comment to %s\r\n";
  1131. Xchar txt_help_p_f[] = "fF       Post (F=copy text) a followup\r\n";
  1132. Xchar txt_help_ctrl_h[] = "^H       Show articles header\r\n";
  1133. Xchar txt_help_h[] =      "hH       Command (H=context sensitive) help\r\n";
  1134. Xchar txt_help_p_i[] = "i        Return to index page\r\n";
  1135. Xchar txt_help_p_k[] = "kK       Mark article (K=thread) as read & advance to next unread\r\n";
  1136. Xchar txt_help_p_m[] = "m        Mail article/thread/pattern/tagged articles to someone\r\n";
  1137. Xchar txt_help_p_n[] = "nN       Goto to the next (N=unread) article\r\n";
  1138. Xchar txt_help_o[] = "o        Output article/thread/pattern/tagged articles to printer\r\n";
  1139. Xchar txt_help_p_p[] = "pP       Goto the previous (P=unread) article\r\n";
  1140. Xchar txt_help_p_r[] = "rR       Reply through mail (R=copy text) to author\r\n";
  1141. Xchar txt_help_p_s[] = "s        Save article/thread/pattern/tagged articles to file\r\n";
  1142. Xchar txt_help_p_z[] = "zZ       Mark article (Z=thread) as unread\r\n";
  1143. Xchar txt_help_p_ctrl_r[] = "^R$      Redisplay first page ($=last page) of article\r\n";
  1144. Xchar txt_help_p_d[] = "d        Toggle rot-13 decoding for this article\r\n";
  1145. Xchar txt_help_pipe[] = "|        Pipe article/thread/pattern/tagged articles into command\r\n";
  1146. Xchar txt_help_p_search[] = "/        Article forward search\r\n";
  1147. Xchar txt_mail_art_to[] = "Mail article to: ";
  1148. Xchar txt_no_mail_address[] = "No mail address";
  1149. Xchar txt_abort_edit_send[] = "a)bort, e)dit, s)end";
  1150. Xchar txt_mailing_to[] = "Mailing to %s...";
  1151. Xchar txt_message_sent[] = "-- Mailed --";
  1152. Xchar txt_command_failed_s[] = "Command failed: %s\n";
  1153. Xchar txt_in_art_you_write[] = "In article %s you write:\n";
  1154. Xchar txt_resp_to_poster[] = "Responses have been directed to the poster. Post anyway? (y/n): ";
  1155. Xchar txt_resp_redirect[] = "Responses have been directed to the following newsgroups";
  1156. Xchar txt_continue[] = "Continue? (y/n): ";
  1157. Xchar txt_writes[] = "%s writes:\n";
  1158. Xchar txt_save_filename[] = "Save filename> ";
  1159. Xchar txt_art_not_saved[] = "-- Article not saved --";
  1160. Xchar txt_print_yn[] = "Do you really want to print? (y/n): ";
  1161. Xchar txt_no_filename[] = "No filename";
  1162. Xchar txt_saving[] = "Saving...";
  1163. Xchar txt_art_saved_to[] = "-- Article saved to %s --";
  1164. Xchar txt_thread_not_saved[] = "-- Thread not saved --";
  1165. Xchar txt_thread_saved_to_many[] = "-- Thread saved to %s - %s --";
  1166. Xchar txt_thread_saved_to[] = "-- Thread saved to %s --";
  1167. Xchar txt_pipe_to_command[] = "Pipe to command: ";
  1168. Xchar txt_error_printing_art[] = "-- Error printing article --";
  1169. Xchar txt_printing[] = "Printing...";
  1170. Xchar txt_printed[] = "-- Articles printed --";
  1171. Xchar txt_append_to_file[] = "File %s exists. Append? (y/n): ";
  1172. Xchar txt_toggled_rot13[] = "Toggled rot13 encoding";
  1173. X
  1174. X/*
  1175. X *  posted.c
  1176. X */
  1177. X
  1178. Xchar txt_post_history_menu[] = "Posted articles history";
  1179. Xchar txt_no_arts_posted[] = "No articles have been posted";
  1180. X
  1181. X/*
  1182. X *  prompt.c
  1183. X */
  1184. X
  1185. Xchar txt_hit_any_key[] = "-- Hit any key to continue --";
  1186. X
  1187. X/*
  1188. X *  rcfile.c
  1189. X */
  1190. Xchar txt_opt_autosave[] =        "    1. Auto save       : ";
  1191. Xchar txt_opt_save_separate[] =   "    2. Save separate   : ";
  1192. Xchar txt_opt_mark_saved_read[] = "    3. Mark saved read : ";
  1193. Xchar txt_opt_kill_articles[] =   "    4. Kill articles   : ";
  1194. Xchar txt_opt_show_author[] =     "    5. Show Author     : ";
  1195. Xchar txt_opt_draw_arrow[] =      "    6. Draw arrow      : ";
  1196. Xchar txt_opt_post_process[] =    "    7. Post process    : ";
  1197. Xchar txt_opt_print_header[] =    "    8. Print header    : ";
  1198. Xchar txt_opt_process_type[] = "    9. Process type    : ";
  1199. Xchar txt_opt_sort_type[] = "    10 Sort article by : ";
  1200. Xchar txt_opt_savedir[] = "    11 Save directory  : ";
  1201. Xchar txt_opt_maildir[] = "    12 Mail directory  : ";
  1202. Xchar txt_opt_printer[] = "    13 Printer         : ";
  1203. Xchar txt_options_menu[] = "Options Menu";
  1204. Xchar txt_post_process_sh[] = "shell archive";
  1205. Xchar txt_post_process_uud[] = "uudecode";
  1206. Xchar txt_post_process_uud_zoo[] = "uudecode & zoo";
  1207. Xchar txt_post_process_uud_lzh[] = "uudecode & lharc";
  1208. Xchar txt_post_process_uud_arc[] = "uudecode & arc";
  1209. Xchar txt_post_process_uud_zip[] = "uudecode & zip";
  1210. Xchar txt_post_process_patch[] = "patch";
  1211. Xchar txt_sort_by_none[] = "Nothing";
  1212. Xchar txt_sort_by_subj[] = "Subject: field";
  1213. Xchar txt_sort_by_from[] = "From: field";
  1214. Xchar txt_sort_by_date[] = "Date: field";
  1215. Xchar txt_help_autosave[] = "Auto save article/thread by Archive-name: header. <SPACE> toggles & <CR> sets.";
  1216. Xchar txt_help_save_separate[] = "Save articles/threads to separate files. <SPACE> toggles & <CR> sets.";
  1217. Xchar txt_help_print_header[] = "Print complete mail header or Subject: & From:. <SPACE> toggles & <CR> sets.";
  1218. Xchar txt_help_show_author[] = "Show Subject & From (author) fields in group menu. <SPACE> toggles & <CR> sets.";
  1219. Xchar txt_help_draw_arrow[] = "Draw -> or highlighted bar for selection. <SPACE> toggles & <CR> sets.";
  1220. Xchar txt_help_kill_articles[] = "Kill articles that match entries in kill file. <SPACE> toggles & <CR> sets.";
  1221. Xchar txt_help_post_process[] = "Post process (ie. unshar) saved article/thread. <SPACE> toggles & <CR> sets."; 
  1222. Xchar txt_help_mark_saved_read[] = "Mark saved articles/threads as read. <SPACE> toggles & <CR> sets."; 
  1223. Xchar txt_help_post_proc_type[] = "Post processing to apply to articles/threads. <SPACE> toggles & <CR> sets.";
  1224. Xchar txt_help_sort_type[] = "Sort articles by Subject, From or Date fields. <SPACE> toggles & <CR> sets.";
  1225. Xchar txt_help_savedir[] = "The directory where you want articles/threads saved.";
  1226. Xchar txt_help_maildir[] = "The directory where articles/threads are to be saved in mailbox format.";
  1227. Xchar txt_help_printer[] = "The printer program with options that is to be used to print articles/threads.";
  1228. Xchar txt_select_rcfile_option[] = "Select option by entering number before text. Enter '0' to save/quit.";
  1229. Xchar txt_save_options[] = "Save options? (y/n): ";
  1230. X
  1231. X/*
  1232. X *  save.c
  1233. X */
  1234. X
  1235. Xchar txt_post_processing[] = "Post processing...";
  1236. Xchar txt_deleting[] = "Deleting...";
  1237. X
  1238. X/*
  1239. X *  search.c
  1240. X */
  1241. X
  1242. Xchar txt_searching[] = "Searching...";
  1243. X
  1244. X/*
  1245. X *  select.c
  1246. X */
  1247. X
  1248. Xchar txt_moving[] = "Moving...";
  1249. X#ifdef DONT_USE_REGEX 
  1250. Xchar txt_subscribe_pattern[] = "Enter subscribe pattern> ";
  1251. Xchar txt_unsubscribe_pattern[] = "Enter subscribe pattern> ";
  1252. X#else
  1253. Xchar txt_subscribe_pattern[] = "Enter regex subscribe pattern> ";
  1254. Xchar txt_unsubscribe_pattern[] = "Enter regex subscribe pattern> ";
  1255. X#endif
  1256. Xchar txt_subscribing[] = "Subscribing...";
  1257. Xchar txt_subscribing_to[] = "Subscribing to %s...";
  1258. Xchar txt_unsubscribing[] = "Unsubscribing...";
  1259. Xchar txt_unsubscribing_from[] = "Unsubscribing from %s...";
  1260. Xchar txt_subscribed_num_groups[] = "subscribed to %d groups";
  1261. Xchar txt_unsubscribed_num_groups[] = "unsubscribed from %d groups";
  1262. Xchar txt_del_group_in_newsrc[] = "Delete current group from .newsrc? (y/n): ";
  1263. Xchar txt_group_deleted[] = "Group deleted";
  1264. Xchar txt_mark_group_read[] = "Mark group as read? (y/n): ";
  1265. Xchar txt_no_groups_to_delete[] = "No groups to delete";
  1266. Xchar txt_reset_newsrc[] = "Reset newsrc? (y/n): ";
  1267. Xchar txt_no_groups_to_read[] = "No more groups to read";
  1268. Xchar txt_added_groups[] = "Added %d group%s";
  1269. Xchar txt_plural[] = "s";
  1270. Xchar txt_no_groups_to_yank_in[] = "No more groups to yank in";
  1271. Xchar txt_group_selection[] = "Group Selection";
  1272. Xchar txt_select_group[] = "Select group> ";
  1273. Xchar txt_help_g_4[] = "4$       Select group 4 ($=select last group)\r\n";
  1274. Xchar txt_help_g_ctrl_r[] = "^R       Reset .newsrc\r\n";
  1275. Xchar txt_help_g_ctrl_k[] = "^Kz      Delete (z=undelete) group from .newsrc\r\n";
  1276. Xchar txt_help_g_cr[] = "<CR>     Read current group\r\n";
  1277. Xchar txt_help_g_tab[] = "<TAB>    View next unread group\r\n";
  1278. Xchar txt_help_g_c[] = "c        Mark group as all read\r\n";
  1279. Xchar txt_help_W[] = "W        List articles posted by user\r\n";
  1280. Xchar txt_help_g_y[] = "y        Yank in groups that are not in the .newsrc\r\n";
  1281. Xchar txt_help_g_dollar[] = "Y        Reread group list from .newsrc\r\n";
  1282. Xchar txt_help_g_search[] = "/?       Group forward (?=backward) search\r\n";
  1283. Xchar txt_newsgroup[] = "Newsgroup> ";
  1284. Xchar txt_newsgroup_position[] = "Position %s in group list [1,2,..,$]> ";
  1285. X
  1286. X/*
  1287. X *  signal.c
  1288. X */
  1289. X
  1290. Xchar txt_resizing_window[] = "resizing window";
  1291. X
  1292. X#endif
  1293. X
  1294. SHAR_EOF
  1295. $TOUCH -am 0903095091 lang.c &&
  1296. chmod 0600 lang.c ||
  1297. echo "restore of lang.c failed"
  1298. set `wc -c lang.c`;Wc_c=$1
  1299. if test "$Wc_c" != "16989"; then
  1300.     echo original size 16989, current size $Wc_c
  1301. fi
  1302. # ============= lang.h ==============
  1303. echo "x - extracting lang.h (Text)"
  1304. sed 's/^X//' << 'SHAR_EOF' > lang.h &&
  1305. X/*
  1306. X *  Project   : tin - a visual threaded usenet newsreader
  1307. X *  Module    : lang.h
  1308. X *  Author    : I.Lea
  1309. X *  Created   : 01-04-91
  1310. X *  Updated   : 31-08-91
  1311. X *  Release   : 1.0
  1312. X *  Notes     :
  1313. X *  Copyright : (c) Copyright 1991 by Iain Lea
  1314. X *                You may  freely  copy or  redistribute  this software,
  1315. X *              so  long as there is no profit made from its use, sale
  1316. X *              trade or  reproduction.  You may not change this copy-
  1317. X *              right notice, and it must be included in any copy made
  1318. X */
  1319. X
  1320. X/*
  1321. X *  art.c
  1322. X */
  1323. X
  1324. Xextern char txt_group[];
  1325. Xextern char txt_cannot_open_dir[];
  1326. Xextern char txt_cannot_open_art[];
  1327. Xextern char txt_indexing[];
  1328. Xextern char txt_corrupt_index[];
  1329. X
  1330. X/*
  1331. X *  feed.c
  1332. X */
  1333. X
  1334. Xextern char txt_art_thread_regex_tag[];
  1335. Xextern char txt_feed_pattern[];
  1336. Xextern char txt_no_command[];
  1337. X
  1338. X/*
  1339. X *  group.c
  1340. X */
  1341. X
  1342. Xextern char txt_tagged_art[];
  1343. Xextern char txt_untagged_art[];
  1344. Xextern char txt_inverse_on[];
  1345. Xextern char txt_inverse_off[];
  1346. Xextern char txt_subscribed_to[];
  1347. Xextern char txt_unsubscribed_to[];
  1348. Xextern char txt_mark_all_read[];
  1349. Xextern char txt_marked_as_read[];
  1350. Xextern char txt_no_more_groups[];
  1351. Xextern char txt_no_prev_group[];
  1352. Xextern char txt_no_arts[];
  1353. Xextern char txt_no_groups[];
  1354. Xextern char txt_end_of_arts[];
  1355. Xextern char txt_end_of_groups[];
  1356. Xextern char txt_no_next_unread_art[];
  1357. Xextern char txt_no_prev_unread_art[];
  1358. Xextern char txt_no_last_message[];
  1359. Xextern char txt_bad_command[];
  1360. Xextern char txt_you_have_mail[];
  1361. Xextern char txt_type_h_for_help[];
  1362. Xextern char txt_read_art[];
  1363. Xextern char txt_author_search_forwards[];
  1364. Xextern char txt_author_search_backwards[];
  1365. Xextern char txt_search_forwards[];
  1366. Xextern char txt_search_backwards[];
  1367. Xextern char txt_no_search_string[];
  1368. Xextern char txt_no_match[];
  1369. Xextern char txt_post_subject[];
  1370. Xextern char txt_no_subject[];
  1371. Xextern char txt_cannot_open[];
  1372. Xextern char txt_posting[];
  1373. Xextern char txt_art_posted[];
  1374. Xextern char txt_art_rejected[];
  1375. Xextern char txt_abort_edit_post[];
  1376. Xextern char txt_index_page_com[];
  1377. Xextern char txt_help_i_4[];
  1378. Xextern char txt_help_ctrl_k[];
  1379. Xextern char txt_help_ctrl_l[];
  1380. Xextern char txt_help_ctrl_d[];
  1381. Xextern char txt_help_i_cr[];
  1382. Xextern char txt_help_i_tab[];
  1383. Xextern char txt_help_m[];
  1384. Xextern char txt_help_M[];
  1385. Xextern char txt_help_a[];
  1386. Xextern char txt_help_sel_c[];
  1387. Xextern char txt_help_c[];
  1388. Xextern char txt_help_g[];
  1389. Xextern char txt_help_I[];
  1390. Xextern char txt_help_K[];
  1391. Xextern char txt_help_j[];
  1392. Xextern char txt_help_i_n[];
  1393. Xextern char txt_help_i_p[];
  1394. Xextern char txt_help_q[];
  1395. Xextern char txt_help_s[];
  1396. Xextern char txt_help_S[];
  1397. Xextern char txt_help_t[];
  1398. Xextern char txt_help_T[];
  1399. Xextern char txt_help_U[];
  1400. Xextern char txt_help_i_u[];
  1401. Xextern char txt_help_w[];
  1402. Xextern char txt_help_i_search[];
  1403. Xextern char txt_help_dash[];
  1404. Xextern char txt_save_pattern[];
  1405. Xextern char txt_base_subdir[];
  1406. Xextern char txt_saved_pattern_to[];
  1407. Xextern char txt_saved_to_mailbox[];
  1408. Xextern char txt_switch_on_kill_art_menu[];
  1409. X
  1410. X/* 
  1411. X *  help.c:
  1412. X */
  1413. X
  1414. Xextern char txt_hit_space_for_more[];
  1415. X
  1416. X/* 
  1417. X *  kill.c:
  1418. X */
  1419. X
  1420. Xextern char txt_kill_menu[];
  1421. Xextern char txt_kill_subject[];
  1422. Xextern char txt_kill_from[];
  1423. Xextern char txt_kill_text[];
  1424. Xextern char txt_kill_text_type[];
  1425. Xextern char txt_kill_group[];
  1426. Xextern char txt_help_kill_subject[];
  1427. Xextern char txt_help_kill_from[];
  1428. Xextern char txt_help_kill_text[];
  1429. Xextern char txt_help_kill_text_type[];
  1430. Xextern char txt_help_kill_group[];
  1431. Xextern char txt_abort_edit_save_killfile[];
  1432. X
  1433. X/*
  1434. X *  page.c
  1435. X */
  1436. X
  1437. Xextern char txt_quit[];
  1438. Xextern char txt_art_unavailable[];
  1439. Xextern char txt_art_marked_as_unread[];
  1440. Xextern char txt_thread_marked_as_unread[];
  1441. Xextern char txt_begin_of_art[];
  1442. Xextern char txt_next_resp[];
  1443. Xextern char txt_last_resp[];
  1444. Xextern char txt_more_percent[];
  1445. Xextern char txt_more[];
  1446. Xextern char txt_thread_x_of_n[];
  1447. Xextern char txt_art[];
  1448. Xextern char txt_resp_x_of_n[];
  1449. Xextern char txt_no_resp[];
  1450. Xextern char txt_1_resp[];
  1451. Xextern char txt_x_resp[];
  1452. Xextern char txt_s_at_s[];
  1453. Xextern char txt_thread_resp_page[];
  1454. Xextern char txt_thread_page[];
  1455. Xextern char txt_read_resp[];
  1456. Xextern char txt_art_pager_com[];
  1457. Xextern char txt_help_p_0[];
  1458. Xextern char txt_help_p_4[];
  1459. Xextern char txt_help_p_cr[];
  1460. Xextern char txt_help_p_tab[];
  1461. Xextern char txt_help_b[];
  1462. Xextern char txt_help_bug[];
  1463. Xextern char txt_help_p_f[];
  1464. Xextern char txt_help_ctrl_h[];
  1465. Xextern char txt_help_h[];
  1466. Xextern char txt_help_p_i[];
  1467. Xextern char txt_help_p_k[];
  1468. Xextern char txt_help_p_m[];
  1469. Xextern char txt_help_p_n[];
  1470. Xextern char txt_help_o[];
  1471. Xextern char txt_help_p_p[];
  1472. Xextern char txt_help_p_r[];
  1473. Xextern char txt_help_p_s[];
  1474. Xextern char txt_help_p_z[];
  1475. Xextern char txt_help_p_ctrl_r[];
  1476. Xextern char txt_help_p_d[];
  1477. Xextern char txt_help_pipe[];
  1478. Xextern char txt_help_p_search[];
  1479. Xextern char txt_mail_art_to[];
  1480. Xextern char txt_no_mail_address[];
  1481. Xextern char txt_abort_edit_send[];
  1482. Xextern char txt_mailing_to[];
  1483. Xextern char txt_message_sent[];
  1484. Xextern char txt_command_failed_s[];
  1485. Xextern char txt_in_art_you_write[];
  1486. Xextern char txt_resp_to_poster[];
  1487. Xextern char txt_resp_redirect[];
  1488. Xextern char txt_continue[];
  1489. Xextern char txt_writes[];
  1490. Xextern char txt_save_filename[];
  1491. Xextern char txt_art_not_saved[];
  1492. Xextern char txt_print_yn[];
  1493. Xextern char txt_no_filename[];
  1494. Xextern char txt_saving[];
  1495. Xextern char txt_art_saved_to[];
  1496. Xextern char txt_thread_not_saved[];
  1497. Xextern char txt_thread_saved_to_many[];
  1498. Xextern char txt_thread_saved_to[];
  1499. Xextern char txt_pipe_to_command[];
  1500. Xextern char txt_command_failed[];
  1501. Xextern char txt_error_printing_art[];
  1502. Xextern char txt_printing[];
  1503. Xextern char txt_printed[];
  1504. Xextern char txt_append_to_file[];
  1505. X
  1506. X/*
  1507. X *  prompt.c
  1508. X */
  1509. X
  1510. Xextern char txt_hit_any_key[];
  1511. X/* 
  1512. X *  main.c:
  1513. X */
  1514. X
  1515. Xextern char txt_not_in_active_file[];
  1516. Xextern char txt_screen_init_failed[];
  1517. Xextern char txt_bad_active_file[];
  1518. X
  1519. X/*
  1520. X *  misc.c
  1521. X */
  1522. X
  1523. Xextern char txt_cannot_find_base_art[];
  1524. Xextern char txt_out_of_memory[];
  1525. Xextern char txt_rename_error[];
  1526. Xextern char txt_shell_escape[];
  1527. X
  1528. X/*
  1529. X *  nntp.c
  1530. X */
  1531. X
  1532. Xextern char txt_cannot_get_nntp_server_name[];
  1533. Xextern char txt_server_name_in_file_env_var[];
  1534. Xextern char txt_failed_to_connect_to_server[];
  1535. Xextern char txt_rejected_by_nntpserver[];
  1536. Xextern char txt_connection_to_server_broken[];
  1537. Xextern char txt_stuff_nntp_cannot_open[];
  1538. Xextern char txt_nntp_to_fp_cannot_reopen[];
  1539. Xextern char txt_nntp_to_fd_cannot_reopen[];
  1540. Xextern char txt_toggled_rot13[];
  1541. X
  1542. X/*
  1543. X *  posted.c
  1544. X */
  1545. X
  1546. Xextern char txt_post_history_menu[];
  1547. Xextern char txt_no_arts_posted[];
  1548. X
  1549. X/*
  1550. X *  rcfile.c
  1551. X */
  1552. X
  1553. Xextern char txt_opt_autosave[];
  1554. Xextern char txt_opt_save_separate[];
  1555. Xextern char txt_opt_mark_saved_read[];
  1556. Xextern char txt_opt_kill_articles[];
  1557. Xextern char txt_opt_show_author[];
  1558. Xextern char txt_opt_draw_arrow[];
  1559. Xextern char txt_opt_post_process[];
  1560. Xextern char txt_opt_print_header[];
  1561. Xextern char txt_opt_process_type[];
  1562. Xextern char txt_opt_sort_type[];
  1563. Xextern char txt_post_process_sh[];
  1564. Xextern char txt_post_process_uud[];
  1565. Xextern char txt_post_process_uud_zoo[];
  1566. Xextern char txt_post_process_uud_lzh[];
  1567. Xextern char txt_post_process_uud_arc[];
  1568. Xextern char txt_post_process_uud_zip[];
  1569. Xextern char txt_post_process_patch[];
  1570. Xextern char txt_sort_by_none[];
  1571. Xextern char txt_sort_by_subj[];
  1572. Xextern char txt_sort_by_from[];
  1573. Xextern char txt_sort_by_date[];
  1574. Xextern char txt_opt_savedir[];
  1575. Xextern char txt_opt_maildir[];
  1576. Xextern char txt_opt_printer[];
  1577. Xextern char txt_opt_kill_subj[];
  1578. Xextern char txt_opt_kill_from[];
  1579. Xextern char txt_options_menu[];
  1580. Xextern char txt_help_autosave[];
  1581. Xextern char txt_help_save_separate[];
  1582. Xextern char txt_help_print_header[];
  1583. Xextern char txt_help_show_author[];
  1584. Xextern char txt_help_draw_arrow[];
  1585. Xextern char txt_help_kill_articles[];
  1586. Xextern char txt_help_post_process[];
  1587. Xextern char txt_help_mark_saved_read[];
  1588. Xextern char txt_help_post_proc_type[];
  1589. Xextern char txt_help_sort_type[];
  1590. Xextern char txt_help_savedir[];
  1591. Xextern char txt_help_maildir[];
  1592. Xextern char txt_help_printer[];
  1593. Xextern char txt_select_rcfile_option[];
  1594. Xextern char txt_save_options[];
  1595. X
  1596. X/*
  1597. X *  save.c
  1598. X */
  1599. X
  1600. Xextern char txt_post_processing[];
  1601. Xextern char txt_deleting[];
  1602. X
  1603. X/*
  1604. X *  search.c
  1605. X */
  1606. X
  1607. Xextern char txt_searching[];
  1608. X
  1609. X/*
  1610. X *  select.c
  1611. X */
  1612. X
  1613. Xextern char txt_moving[];
  1614. Xextern char txt_subscribe_pattern[];
  1615. Xextern char txt_unsubscribe_pattern[];
  1616. Xextern char txt_subscribing[];
  1617. Xextern char txt_subscribing_to[];
  1618. Xextern char txt_unsubscribing[];
  1619. Xextern char txt_unsubscribing_from[];
  1620. Xextern char txt_subscribed_num_groups[];
  1621. Xextern char txt_unsubscribed_num_groups[];
  1622. Xextern char txt_del_group_in_newsrc[];
  1623. Xextern char txt_group_deleted[];
  1624. Xextern char txt_mark_group_read[];
  1625. Xextern char txt_no_groups_to_delete[];
  1626. Xextern char txt_reset_newsrc[];
  1627. Xextern char txt_no_groups_to_read[];
  1628. Xextern char txt_added_groups[];
  1629. Xextern char txt_rewriting_newsrc_file[];
  1630. Xextern char txt_plural[];
  1631. Xextern char txt_no_groups_to_yank_in[];
  1632. Xextern char txt_group_selection[];
  1633. Xextern char txt_select_group[];
  1634. Xextern char txt_group_select_com[];
  1635. Xextern char txt_help_g_4[];
  1636. Xextern char txt_help_g_ctrl_r[];
  1637. Xextern char txt_help_g_ctrl_k[];
  1638. Xextern char txt_help_g_cr[];
  1639. Xextern char txt_help_g_tab[];
  1640. Xextern char txt_help_g_c[];
  1641. Xextern char txt_help_W[];
  1642. Xextern char txt_help_g_y[];
  1643. Xextern char txt_help_g_dollar[];
  1644. Xextern char txt_help_g_search[];
  1645. Xextern char txt_newsgroup[];
  1646. Xextern char txt_newsgroup_position[];
  1647. X
  1648. X/*
  1649. X *  signal.c
  1650. X */
  1651. X
  1652. Xextern char txt_resizing_window[];
  1653. SHAR_EOF
  1654. $TOUCH -am 0903095091 lang.h &&
  1655. chmod 0600 lang.h ||
  1656. echo "restore of lang.h failed"
  1657. set `wc -c lang.h`;Wc_c=$1
  1658. if test "$Wc_c" != "9222"; then
  1659.     echo original size 9222, current size $Wc_c
  1660. fi
  1661. # ============= mail.c ==============
  1662. echo "x - extracting mail.c (Text)"
  1663. sed 's/^X//' << 'SHAR_EOF' > mail.c &&
  1664. X/*
  1665. X *  Project   : tin - a visual threaded usenet newsreader
  1666. X *  Module    : mail.c
  1667. X *  Author    : R.Skrenta
  1668. X *  Created   : 01-04-91
  1669. X *  Updated   : 01-09-91
  1670. X *  Release   : 1.0
  1671. X *  Notes     :
  1672. X *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1673. X *                You may  freely  copy or  redistribute  this software,
  1674. X *              so  long as there is no profit made from its use, sale
  1675. X *              trade or  reproduction.  You may not change this copy-
  1676. X *              right notice, and it must be included in any copy made
  1677. X */
  1678. X
  1679. X#include    "tin.h"
  1680. X
  1681. Xchar *mailbox_name = (char *) 0;
  1682. Xint  mailbox_size;
  1683. X
  1684. X
  1685. X/*
  1686. X *  Record size of mailbox so we can detect if new mail has arrived
  1687. X */
  1688. X
  1689. Xvoid mail_setup ()
  1690. X{
  1691. X    struct stat buf;
  1692. X    extern char *getenv();
  1693. X
  1694. X    mailbox_name = get_val ("MAIL", mailbox);
  1695. X
  1696. X    if (stat(mailbox_name, &buf) >= 0) {
  1697. X        mailbox_size = buf.st_size;
  1698. X    } else {
  1699. X        mailbox_size = 0;
  1700. X    }
  1701. X}
  1702. X
  1703. X/*
  1704. X *  Return TRUE if new mail has arrived
  1705. X */
  1706. X
  1707. Xint mail_check ()
  1708. X{
  1709. X    struct stat buf;
  1710. X
  1711. X    if (mailbox_name != NULL
  1712. X    &&  stat(mailbox_name, &buf) >= 0
  1713. X    &&  mailbox_size < buf.st_size)
  1714. X        return TRUE;
  1715. X
  1716. X    return FALSE;
  1717. X}
  1718. X
  1719. SHAR_EOF
  1720. $TOUCH -am 0903095091 mail.c &&
  1721. chmod 0600 mail.c ||
  1722. echo "restore of mail.c failed"
  1723. set `wc -c mail.c`;Wc_c=$1
  1724. if test "$Wc_c" != "1121"; then
  1725.     echo original size 1121, current size $Wc_c
  1726. fi
  1727. # ============= main.c ==============
  1728. echo "x - extracting main.c (Text)"
  1729. sed 's/^X//' << 'SHAR_EOF' > main.c &&
  1730. X/*
  1731. X *  Project   : tin - a visual threaded usenet newsreader
  1732. X *  Module    : main.c
  1733. X *  Author    : R.Skrenta / I.Lea
  1734. X *  Created   : 01-04-91
  1735. X *  Updated   : 30-08-91
  1736. X *  Release   : 1.0
  1737. X *  Notes     :
  1738. X *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  1739. X *                You may  freely  copy or  redistribute  this software,
  1740. X *              so  long as there is no profit made from its use, sale
  1741. X *              trade or  reproduction.  You may not change this copy-
  1742. X *              right notice, and it must be included in any copy made
  1743. X */
  1744. X
  1745. X#include    "tin.h"
  1746. X
  1747. Xchar *version = "v1.0";
  1748. Xchar cvers[LEN+1];
  1749. Xchar nntp_server[LEN+1];
  1750. X
  1751. Xint NOTESLINES;                        /* set in set_win_size () */
  1752. Xint RIGHT_POS;                        /* set in set_win_size () */
  1753. Xint MORE_POS;                        /* set in set_win_size () */
  1754. Xint max_subj = 0;
  1755. Xint max_from = 0;
  1756. Xint max_active;
  1757. Xint group_hash[TABLE_SIZE];            /* group name --> active[] */
  1758. Xint *my_group;                        /* .newsrc --> active[] */
  1759. Xint *unread;                        /* highest art read in group */
  1760. Xint num_active;                        /* one past top of active */
  1761. Xint local_top;                        /* one past top of my_group */
  1762. Xint catchup = FALSE;                /* mark all arts read in all subscribed groups */
  1763. Xint update = FALSE;                    /* update index files only mode */
  1764. Xint verbose = FALSE;                /* update index files only mode */
  1765. SHAR_EOF
  1766. echo "End of tin1.0 part 3"
  1767. echo "File main.c is continued in part 4"
  1768. echo "4" > shar3_seq_.tmp
  1769. exit 0
  1770.  
  1771.  
  1772. --
  1773. NAME   Iain Lea
  1774. EMAIL  norisc!iain@estevax.UUCP  ...!unido!estevax!norisc!iain
  1775. SNAIL  Siemens AG, AUT 922C, Postfach 4848, Nuernberg, Germany
  1776. PHONE  +49-911-895-3853, +49-911-895-3877, +49-911-331963
  1777.