home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-10-19 | 48.9 KB | 1,911 lines |
- Newsgroups: comp.sources.misc
- From: iain@norisc.siemens.de (Iain J. Lea)
- Subject: v23i085: tin - threaded full screen newsreader, Patch05b/4
- Message-ID: <1991Oct20.032546.25101@sparky.imd.sterling.com>
- X-Md4-Signature: fde0dab21a553c25768184aca328c395
- Date: Sun, 20 Oct 1991 03:25:46 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: iain@norisc.siemens.de (Iain J. Lea)
- Posting-number: Volume 23, Issue 85
- Archive-name: tin/patch05b
- Environment: BSD, SCO, ISC, SUNOS, SYSVR3, SYSVR4, ULTRIX, XENIX
- Patch-To: tin: Volume 23, Issue 15-23
-
- #!/bin/sh
- # this is patch05.shar.02 (part 2 of tin)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file tin.patch05 continued
- #
- if touch 2>&1 | fgrep '[-amc]' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- if test ! -r shar3_seq_.tmp; then
- echo "Please unpack part 1 first!"
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 2; then
- echo "Please unpack part $Scheck next!"
- exit 1
- else
- exit 0
- fi
- ) < shar3_seq_.tmp || exit 1
- echo "x - Continuing file tin.patch05"
- sed 's/^X//' << 'SHAR_EOF' >> tin.patch05 &&
- X! return(FALSE);
- X }
- X if (!_moveto) {
- X! fprintf(stderr,
- X! "Terminal must have cursor motion (cm)\n");
- X! return(FALSE);
- X }
- X if (!_cleartoeoln) {
- X! fprintf(stderr,
- X! "Terminal must have clear to end-of-line (ce)\n");
- X! return(FALSE);
- X }
- X if (!_cleartoeos) {
- X! fprintf(stderr,
- X! "Terminal must have clear to end-of-screen (cd)\n");
- X! return(FALSE);
- X }
- X if (_lines == -1)
- X _lines = DEFAULT_LINES_ON_TERMINAL;
- X if (_columns == -1)
- X _columns = DEFAULT_COLUMNS_ON_TERMINAL;
- X! return(TRUE);
- X }
- X
- X void ScreenSize(num_lines, num_columns)
- X--- 96,163 ----
- X char termname[40], *p;
- X char *strcpy(), *getenv();
- X
- X! if ((p = getenv ("TERM")) == NULL) {
- X! fprintf (stderr,
- X! "%s: TERM variable must be set to use screen capabilities\n",
- X! progname);
- X! return (FALSE);
- X }
- X! if (strcpy (termname, p) == NULL) {
- X! fprintf (stderr,"%s: Can't get TERM variable\n", progname);
- X! return (FALSE);
- X }
- X! if (tgetent (_terminal, termname) != 1) {
- X! fprintf (stderr,"%s: Can't get entry for TERM\n", progname);
- X! return (FALSE);
- X }
- X
- X /* load in all those pesky values */
- X! _clearscreen = tgetstr ("cl", &ptr);
- X! _moveto = tgetstr ("cm", &ptr);
- X! _cleartoeoln = tgetstr ("ce", &ptr);
- X! _cleartoeos = tgetstr ("cd", &ptr);
- X! _lines = tgetnum ("li");
- X! _columns = tgetnum ("co");
- X! _setinverse = tgetstr ("so", &ptr);
- X! _clearinverse = tgetstr ("se", &ptr);
- X! _setunderline = tgetstr ("us", &ptr);
- X! _clearunderline = tgetstr ("ue", &ptr);
- X! _terminalinit = tgetstr ("ti", &ptr);
- X! _terminalend = tgetstr ("te", &ptr);
- X
- X+ if (_terminalinit) {
- X+ tputs (_terminalinit, 1, outchar);
- X+ }
- X+
- X if (!_clearscreen) {
- X! fprintf (stderr,
- X! "%s: Terminal must have clearscreen (cl) capability\n",progname);
- X! return (FALSE);
- X }
- X if (!_moveto) {
- X! fprintf (stderr,
- X! "%s: Terminal must have cursor motion (cm)\n", progname);
- X! return (FALSE);
- X }
- X if (!_cleartoeoln) {
- X! fprintf (stderr,
- X! "%s: Terminal must have clear to end-of-line (ce)\n", progname);
- X! return (FALSE);
- X }
- X if (!_cleartoeos) {
- X! fprintf (stderr,
- X! "%s: terminal does not have clear to end-of-screen (ce). Simulating\n", progname);
- X! /*
- X! fprintf (stderr,
- X! "%s: Terminal must have clear to end-of-screen (cd)\n", progname);
- X! return (FALSE);
- X! */
- X }
- X if (_lines == -1)
- X _lines = DEFAULT_LINES_ON_TERMINAL;
- X if (_columns == -1)
- X _columns = DEFAULT_COLUMNS_ON_TERMINAL;
- X! return (TRUE);
- X }
- X
- X void ScreenSize(num_lines, num_columns)
- X***************
- X*** 171,176 ****
- X--- 172,185 ----
- X *num_columns = _columns; /* assume index from one */
- X }
- X
- X+ void EndWin ()
- X+ {
- X+ if (_terminalend) {
- X+ tputs (_terminalend, 1, outchar);
- X+ fflush (stdout);
- X+ }
- X+ }
- X+
- X void ClearScreen()
- X {
- X /* clear the screen: returns -1 if not capable */
- X***************
- X*** 202,210 ****
- X
- X void CleartoEOS()
- X {
- X /** clear to end of screen **/
- X
- X! tputs(_cleartoeos, 1, outchar);
- X fflush(stdout); /* clear the output buffer */
- X }
- X
- X--- 211,228 ----
- X
- X void CleartoEOS()
- X {
- X+ int i;
- X+
- X /** clear to end of screen **/
- X
- X! if (_cleartoeos) {
- X! tputs(_cleartoeos, 1, outchar);
- X! } else {
- X! for (i=_lines ; i < _lines ; i++) {
- X! MoveCursor (i, 0);
- X! CleartoEOLN ();
- X! }
- X! }
- X fflush(stdout); /* clear the output buffer */
- X }
- X
- X***************
- X*** 273,280 ****
- X
- X register int result;
- X char ch;
- X result = read(0, &ch, 1);
- X! return((result <= 0 ) ? EOF : ch & 0x7F);
- X }
- X
- X
- X--- 291,305 ----
- X
- X register int result;
- X char ch;
- X+
- X+ #ifdef READ_CHAR_HACK
- X+ #undef getc
- X+ ch = getc (stdin);
- X+ return ((ch == EOF) ? EOF : ch & 0xFF);
- X+ #else
- X result = read(0, &ch, 1);
- X! return((result <= 0 ) ? EOF : ch & 0xFF);
- X! #endif
- X }
- X
- X
- X***************
- X*** 286,289 ****
- X
- X putc(c, stdout);
- X }
- X-
- X--- 311,313 ----
- XFiles ../104/debug.c and ./debug.c are identical
- Xdiff -rcs ../104/feed.c ./feed.c
- X*** ../104/feed.c Wed Oct 2 19:01:46 1991
- X--- ./feed.c Thu Oct 10 20:11:05 1991
- X***************
- X*** 3,9 ****
- X * Module : feed.c
- X * Author : I.Lea
- X * Created : 31-08-91
- X! * Updated : 02-10-91
- X * Release : 1.0
- X * Notes : provides same interface to mail,pipe,print and save commands
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X--- 3,9 ----
- X * Module : feed.c
- X * Author : I.Lea
- X * Created : 31-08-91
- X! * Updated : 04-10-91
- X * Release : 1.0
- X * Notes : provides same interface to mail,pipe,print and save commands
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X***************
- X*** 16,23 ****
- X #include "tin.h"
- X
- X extern char *glob_group; /* Group name */
- X! extern char note_h_subj[LEN]; /* Subject: */
- X extern char note_h_from[LEN]; /* From: */
- X extern FILE *note_fp; /* the body of the current article */
- X extern int note_end; /* end of article ? */
- X extern int note_page; /* what page we're on */
- X--- 16,24 ----
- X #include "tin.h"
- X
- X extern char *glob_group; /* Group name */
- X! extern char note_h_date[LEN]; /* Date: */
- X extern char note_h_from[LEN]; /* From: */
- X+ extern char note_h_subj[LEN]; /* Subject: */
- X extern FILE *note_fp; /* the body of the current article */
- X extern int note_end; /* end of article ? */
- X extern int note_page; /* what page we're on */
- X***************
- X*** 142,156 ****
- X return;
- X }
- X }
- X- set_real_uid_gid ();
- X
- X if ((fp = popen (command, "w")) == NULL) {
- X- set_tin_uid_gid ();
- X error_message (txt_command_failed_s, command);
- X return;
- X }
- X! set_tin_uid_gid ();
- X! wait_message ("Piping...");
- X Raw (FALSE);
- X break;
- X case FEED_PRINT:
- X--- 143,154 ----
- X return;
- X }
- X }
- X
- X if ((fp = popen (command, "w")) == NULL) {
- X error_message (txt_command_failed_s, command);
- X return;
- X }
- X! wait_message (txt_piping);
- X Raw (FALSE);
- X break;
- X case FEED_PRINT:
- X***************
- X*** 160,172 ****
- X } else {
- X sprintf (command, "%s > /dev/null 2>&1", printer);
- X }
- X- set_real_uid_gid ();
- X if ((fp = popen (command, "w")) == NULL) {
- X- set_tin_uid_gid ();
- X error_message (txt_command_failed_s, command);
- X return;
- X }
- X- set_tin_uid_gid ();
- X break;
- X case FEED_SAVE: /* ask user for filename */
- X free_save_array ();
- X--- 158,167 ----
- X***************
- X*** 197,203 ****
- X info_message (txt_no_filename);
- X return;
- X }
- X! if (is_mailbox = create_path (file)) {
- X if ((int) strlen (file) > 1) {
- X my_strncpy (mailbox, file+1, LEN);
- X } else {
- X--- 192,199 ----
- X info_message (txt_no_filename);
- X return;
- X }
- X! is_mailbox = create_path (file);
- X! if (is_mailbox) {
- X if ((int) strlen (file) > 1) {
- X my_strncpy (mailbox, file+1, LEN);
- X } else {
- X***************
- X*** 229,235 ****
- X switch (ch) {
- X case 'a': /* article */
- X if (level == GROUP_LEVEL) {
- X! open_note (arts[respnum].artnum, group_path);
- X }
- X switch (function) {
- X case FEED_MAIL:
- X--- 225,231 ----
- X switch (ch) {
- X case 'a': /* article */
- X if (level == GROUP_LEVEL) {
- X! art_open (arts[respnum].artnum, group_path);
- X }
- X switch (function) {
- X case FEED_MAIL:
- X***************
- X*** 245,251 ****
- X fseek(note_fp, 0L, 0);
- X } else {
- X fprintf (fp, "From: %s\n", note_h_from);
- X! fprintf (fp, "Subject: %s\n\n", note_h_subj);
- X fseek (note_fp, note_mark[0], 0);
- X }
- X copy_fp(note_fp, fp, "");
- X--- 241,248 ----
- X fseek(note_fp, 0L, 0);
- X } else {
- X fprintf (fp, "From: %s\n", note_h_from);
- X! fprintf (fp, "Subject: %s\n", note_h_subj);
- X! fprintf (fp, "Date: %s\n\n", note_h_date);
- X fseek (note_fp, note_mark[0], 0);
- X }
- X copy_fp(note_fp, fp, "");
- X***************
- X*** 258,264 ****
- X break;
- X }
- X if (level == GROUP_LEVEL) {
- X! note_cleanup ();
- X }
- X break;
- X
- X--- 255,261 ----
- X break;
- X }
- X if (level == GROUP_LEVEL) {
- X! art_close ();
- X }
- X break;
- X
- X***************
- X*** 265,282 ****
- X case 't': /* thread */
- X for (i = (int) base[b]; i >= 0; i = arts[i].thread) {
- X if (function == FEED_PRINT) {
- X- set_real_uid_gid ();
- X if ((fp = popen (command, "w")) == NULL) {
- X- set_tin_uid_gid ();
- X error_message (txt_command_failed_s, command);
- X return;
- X }
- X- set_tin_uid_gid ();
- X }
- X if (level == PAGE_LEVEL) {
- X! note_cleanup ();
- X }
- X! open_note (arts[i].artnum, group_path);
- X switch (function) {
- X case FEED_MAIL:
- X mail_to_someone (address);
- X--- 262,276 ----
- X case 't': /* thread */
- X for (i = (int) base[b]; i >= 0; i = arts[i].thread) {
- X if (function == FEED_PRINT) {
- X if ((fp = popen (command, "w")) == NULL) {
- X error_message (txt_command_failed_s, command);
- X return;
- X }
- X }
- X if (level == PAGE_LEVEL) {
- X! art_close ();
- X }
- X! art_open (arts[i].artnum, group_path);
- X switch (function) {
- X case FEED_MAIL:
- X mail_to_someone (address);
- X***************
- X*** 292,298 ****
- X fseek(note_fp, 0L, 0);
- X } else {
- X fprintf (fp, "From: %s\n", note_h_from);
- X! fprintf (fp, "Subject: %s\n\n", note_h_subj);
- X fseek (note_fp, note_mark[0], 0);
- X }
- X copy_fp(note_fp, fp, "");
- X--- 286,293 ----
- X fseek(note_fp, 0L, 0);
- X } else {
- X fprintf (fp, "From: %s\n", note_h_from);
- X! fprintf (fp, "Subject: %s\n", note_h_subj);
- X! fprintf (fp, "Date: %s\n\n", note_h_date);
- X fseek (note_fp, note_mark[0], 0);
- X }
- X copy_fp(note_fp, fp, "");
- X***************
- X*** 314,331 ****
- X for (j=0 ; j < top ; j++) {
- X if (arts[j].tagged && arts[j].tagged == i) {
- X if (function == FEED_PRINT) {
- X- set_real_uid_gid ();
- X if ((fp = popen (command, "w")) == NULL) {
- X- set_tin_uid_gid ();
- X error_message (txt_command_failed_s, command);
- X return;
- X }
- X- set_tin_uid_gid ();
- X }
- X if (level == PAGE_LEVEL) {
- X! note_cleanup ();
- X }
- X! open_note (arts[j].artnum, group_path);
- X switch (function) {
- X case FEED_MAIL:
- X mail_to_someone (address);
- X--- 309,323 ----
- X for (j=0 ; j < top ; j++) {
- X if (arts[j].tagged && arts[j].tagged == i) {
- X if (function == FEED_PRINT) {
- X if ((fp = popen (command, "w")) == NULL) {
- X error_message (txt_command_failed_s, command);
- X return;
- X }
- X }
- X if (level == PAGE_LEVEL) {
- X! art_close ();
- X }
- X! art_open (arts[j].artnum, group_path);
- X switch (function) {
- X case FEED_MAIL:
- X mail_to_someone (address);
- X***************
- X*** 341,347 ****
- X fseek(note_fp, 0L, 0);
- X } else {
- X fprintf (fp, "From: %s\n", note_h_from);
- X! fprintf (fp, "Subject: %s\n\n", note_h_subj);
- X fseek (note_fp, note_mark[0], 0);
- X }
- X copy_fp(note_fp, fp, "");
- X--- 333,340 ----
- X fseek(note_fp, 0L, 0);
- X } else {
- X fprintf (fp, "From: %s\n", note_h_from);
- X! fprintf (fp, "Subject: %s\n", note_h_subj);
- X! fprintf (fp, "Date: %s\n\n", note_h_date);
- X fseek (note_fp, note_mark[0], 0);
- X }
- X copy_fp(note_fp, fp, "");
- X***************
- X*** 367,384 ****
- X if (wildmat (arts[i].subject, pattern)) {
- X #endif
- X if (function == FEED_PRINT) {
- X- set_real_uid_gid ();
- X if ((fp = popen (command, "w")) == NULL) {
- X- set_tin_uid_gid ();
- X error_message (txt_command_failed_s, command);
- X return;
- X }
- X- set_tin_uid_gid ();
- X }
- X if (level == PAGE_LEVEL) {
- X! note_cleanup ();
- X }
- X! open_note (arts[i].artnum, group_path);
- X switch (function) {
- X case FEED_MAIL:
- X mail_to_someone (address);
- X--- 360,374 ----
- X if (wildmat (arts[i].subject, pattern)) {
- X #endif
- X if (function == FEED_PRINT) {
- X if ((fp = popen (command, "w")) == NULL) {
- X error_message (txt_command_failed_s, command);
- X return;
- X }
- X }
- X if (level == PAGE_LEVEL) {
- X! art_close ();
- X }
- X! art_open (arts[i].artnum, group_path);
- X switch (function) {
- X case FEED_MAIL:
- X mail_to_someone (address);
- X***************
- X*** 394,400 ****
- X fseek(note_fp, 0L, 0);
- X } else {
- X fprintf (fp, "From: %s\n", note_h_from);
- X! fprintf (fp, "Subject: %s\n\n", note_h_subj);
- X fseek (note_fp, note_mark[0], 0);
- X }
- X copy_fp(note_fp, fp, "");
- X--- 384,391 ----
- X fseek(note_fp, 0L, 0);
- X } else {
- X fprintf (fp, "From: %s\n", note_h_from);
- X! fprintf (fp, "Subject: %s\n", note_h_subj);
- X! fprintf (fp, "Date: %s\n\n", note_h_date);
- X fseek (note_fp, note_mark[0], 0);
- X }
- X copy_fp(note_fp, fp, "");
- X***************
- X*** 413,418 ****
- X--- 404,411 ----
- X break;
- X }
- X
- X+ redraw_screen = mail_check (); /* in case of sending to oneself */
- X+
- X switch (function) {
- X case FEED_PIPE:
- X pclose (fp);
- X***************
- X*** 422,428 ****
- X break;
- X case FEED_PRINT:
- X info_message (txt_printed);
- X- redraw_screen = mail_check (); /* in case of sending to oneself */
- X break;
- X case FEED_SAVE:
- X if (level == GROUP_LEVEL) {
- X--- 415,420 ----
- X***************
- X*** 440,446 ****
- X
- X if (level == PAGE_LEVEL) {
- X if (ch != 'a') {
- X! open_note (arts[respnum].artnum, group_path);
- X }
- X note_end = orig_note_end;
- X note_page = orig_note_page;
- X--- 432,438 ----
- X
- X if (level == PAGE_LEVEL) {
- X if (ch != 'a') {
- X! art_open (arts[respnum].artnum, group_path);
- X }
- X note_end = orig_note_end;
- X note_page = orig_note_page;
- X***************
- X*** 452,458 ****
- X redraw_page (respnum, glob_group);
- X }
- X } else {
- X! clear_message ();
- X }
- X } else {
- X if (redraw_screen) {
- X--- 444,452 ----
- X redraw_page (respnum, glob_group);
- X }
- X } else {
- X! if (function != FEED_PRINT) {
- X! clear_message ();
- X! }
- X }
- X } else {
- X if (redraw_screen) {
- Xdiff -rcs ../104/group.c ./group.c
- X*** ../104/group.c Wed Oct 2 19:34:20 1991
- X--- ./group.c Wed Oct 16 20:00:23 1991
- X***************
- X*** 3,9 ****
- X * Module : group.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 28-09-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X--- 3,9 ----
- X * Module : group.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 16-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 109,116 ****
- X--- 109,118 ----
- X
- X case '|': /* pipe article/thread/tagged arts to command */
- X if (index_point >= 0) {
- X+ set_real_uid_gid ();
- X feed_articles (FEED_PIPE, GROUP_LEVEL, "Pipe",
- X (int) base[index_point], group_path);
- X+ set_tin_uid_gid ();
- X }
- X break;
- X
- X***************
- X*** 173,182 ****
- X--- 175,186 ----
- X
- X case 'G': /* ansi PgDn */
- X case 'U': /* at386 PgDn */
- X+ case 'T': /* 97801 PgDn */
- X goto group_page_down;
- X
- X case 'I': /* ansi PgUp */
- X case 'V': /* at386 PgUp */
- X+ case 'S': /* 97801 PgUp */
- X case 'v': /* emacs style */
- X goto group_page_up;
- X
- X***************
- X*** 407,414 ****
- X--- 411,420 ----
- X
- X case 'm': /* mail article to somebody */
- X if (index_point >= 0) {
- X+ set_real_uid_gid ();
- X feed_articles (FEED_MAIL, GROUP_LEVEL, "Mail",
- X (int) base[index_point], group_path);
- X+ set_tin_uid_gid ();
- X }
- X break;
- X
- X***************
- X*** 460,467 ****
- X--- 466,475 ----
- X
- X case 'o': /* output art/thread/tagged arts to printer */
- X if (index_point >= 0) {
- X+ set_real_uid_gid ();
- X feed_articles (FEED_PRINT, GROUP_LEVEL, "Print",
- X (int) base[index_point], group_path);
- X+ set_tin_uid_gid ();
- X }
- X break;
- X
- X***************
- X*** 504,511 ****
- X--- 512,521 ----
- X
- X case 's': /* save regex pattern to file/s */
- X if (index_point >= 0) {
- X+ set_real_uid_gid ();
- X feed_articles (FEED_SAVE, GROUP_LEVEL, "Save",
- X (int) base[index_point], group_path);
- X+ set_tin_uid_gid ();
- X }
- X break;
- X
- X***************
- X*** 526,531 ****
- X--- 536,542 ----
- X info_message (txt_tagged_art);
- X }
- X mark_screen (SCREEN_READ_UNREAD, msg);
- X+ goto group_down; /* advance an article */
- X }
- X break;
- X
- X***************
- X*** 541,546 ****
- X--- 552,563 ----
- X break;
- X
- X case 'w': /* post a basenote */
- X+ #ifdef USE_NNTP
- X+ if (! can_post) {
- X+ info_message (txt_cannot_post);
- X+ break;
- X+ }
- X+ #endif
- X if (post_base (group)) {
- X update_newsrc (group, my_group[cur_groupnum], FALSE);
- X index_group (group, group_path);
- X***************
- X*** 664,670 ****
- X }
- X center_line (0, TRUE, buf);
- X
- X! if (col = (COLS - (int) strlen (txt_type_h_for_help))+1) {
- X MoveCursor (0, 0);
- X if (kill_articles) { /* display KILL on screen */
- X printf ("KILL ON");
- X--- 681,688 ----
- X }
- X center_line (0, TRUE, buf);
- X
- X! col = (COLS - (int) strlen (txt_type_h_for_help))+1;
- X! if (col) {
- X MoveCursor (0, 0);
- X if (kill_articles) { /* display KILL on screen */
- X printf ("KILL ON");
- Xdiff -rcs ../104/hashstr.c ./hashstr.c
- X*** ../104/hashstr.c Mon Sep 30 19:24:24 1991
- X--- ./hashstr.c Tue Oct 8 19:08:31 1991
- X***************
- X*** 3,9 ****
- X * Module : hashstr.c
- X * Author : R.Skrenta
- X * Created : 01-04-91
- X! * Updated : 05-09-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta
- X--- 3,9 ----
- X * Module : hashstr.c
- X * Author : R.Skrenta
- X * Created : 01-04-91
- X! * Updated : 09-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta
- X***************
- X*** 13,26 ****
- X * right notice, and it must be included in any copy made
- X */
- X
- X! #include <stdio.h>
- X! #ifdef BSD
- X! #include <strings.h>
- X! #else
- X! #include <string.h>
- X! #include <malloc.h>
- X! #endif
- X! #include "proto.h"
- X
- X /*
- X * Maintain a table of all strings we have seen.
- X--- 13,19 ----
- X * right notice, and it must be included in any copy made
- X */
- X
- X! #include "tin.h"
- X
- X /*
- X * Maintain a table of all strings we have seen.
- X***************
- X*** 40,58 ****
- X * Arbitrary table size, but make sure it's prime!
- X */
- X
- X! /* #define TABLE_SIZE 1409 */
- X
- X! #define TABLE_SIZE 2411
- X
- X
- X- struct hashnode {
- X- char *s; /* the string we're saving */
- X- struct hashnode *next; /* chain for spillover */
- X- };
- X-
- X- struct hashnode *table[TABLE_SIZE];
- X-
- X-
- X char *hash_str (s)
- X char *s;
- X {
- X--- 33,43 ----
- X * Arbitrary table size, but make sure it's prime!
- X */
- X
- X! #define HASHNODE_TABLE_SIZE 2411
- X
- X! struct hashnode *table[HASHNODE_TABLE_SIZE];
- X
- X
- X char *hash_str (s)
- X char *s;
- X {
- X***************
- X*** 68,74 ****
- X
- X h = *t++;
- X while (*t)
- X! h = ((h << 1) ^ *t++) % (long) TABLE_SIZE;
- X }
- X
- X p = table[h];
- X--- 53,59 ----
- X
- X h = *t++;
- X while (*t)
- X! h = ((h << 1) ^ *t++) % (long) HASHNODE_TABLE_SIZE;
- X }
- X
- X p = table[h];
- X***************
- X*** 114,120 ****
- X {
- X int i;
- X
- X! for (i = 0; i < TABLE_SIZE; i++) {
- X table[i] = (struct hashnode *) 0;
- X }
- X }
- X--- 99,105 ----
- X {
- X int i;
- X
- X! for (i = 0; i < HASHNODE_TABLE_SIZE; i++) {
- X table[i] = (struct hashnode *) 0;
- X }
- X }
- X***************
- X*** 126,132 ****
- X struct hashnode *p, *next;
- X int *iptr;
- X
- X! for (i = 0; i < TABLE_SIZE; i++)
- X if (table[i] != (struct hashnode *) 0) {
- X p = table[i];
- X while (p != (struct hashnode *) 0) {
- X--- 111,117 ----
- X struct hashnode *p, *next;
- X int *iptr;
- X
- X! for (i = 0; i < HASHNODE_TABLE_SIZE; i++)
- X if (table[i] != (struct hashnode *) 0) {
- X p = table[i];
- X while (p != (struct hashnode *) 0) {
- Xdiff -rcs ../104/help.c ./help.c
- X*** ../104/help.c Mon Sep 30 20:43:04 1991
- X--- ./help.c Tue Oct 8 14:56:02 1991
- X***************
- X*** 198,207 ****
- X if (ch == '[' || ch == 'O')
- X ch = ReadCh();
- X switch (ch) {
- X! case 'B': /* page down */
- X case 'C':
- X! case 'G': /* ansi */
- X! case 'U': /* at386 */
- X if (cur_page < max_page) {
- X pos_help = cur_page*NOTESLINES;
- X cur_page++;
- X--- 198,208 ----
- X if (ch == '[' || ch == 'O')
- X ch = ReadCh();
- X switch (ch) {
- X! case 'B': /* PgDn */
- X case 'C':
- X! case 'G': /* ansi PgDn */
- X! case 'U': /* at386 PgDn */
- X! case 'T': /* at386 PgDn */
- X if (cur_page < max_page) {
- X pos_help = cur_page*NOTESLINES;
- X cur_page++;
- X***************
- X*** 208,218 ****
- X }
- X break;
- X
- X! case 'A': /* page up */
- X case 'D':
- X case 'i':
- X! case 'I': /* ansi */
- X! case 'V': /* at386 */
- X if (cur_page > 1) {
- X cur_page--;
- X pos_help = (cur_page-1)*NOTESLINES;
- X--- 209,220 ----
- X }
- X break;
- X
- X! case 'A': /* PgUp */
- X case 'D':
- X case 'i':
- X! case 'I': /* ansi PgUp */
- X! case 'V': /* at386 PgUp */
- X! case 'S': /* 97801 PgUp */
- X if (cur_page > 1) {
- X cur_page--;
- X pos_help = (cur_page-1)*NOTESLINES;
- Xdiff -rcs ../104/kill.c ./kill.c
- X*** ../104/kill.c Mon Sep 30 20:37:10 1991
- X--- ./kill.c Thu Oct 10 20:11:20 1991
- X***************
- X*** 392,398 ****
- X return (killed);
- X }
- X if (debug && ! update) {
- X! wait_message ("Killing articles...");
- X }
- X for (i=0 ; i < top ; i++) {
- X for (j=0 ; j < kill_num && ! arts[i].tagged ; j++) {
- X--- 392,398 ----
- X return (killed);
- X }
- X if (debug && ! update) {
- X! wait_message (txt_killing_arts);
- X }
- X for (i=0 ; i < top ; i++) {
- X for (j=0 ; j < kill_num && ! arts[i].tagged ; j++) {
- Xdiff -rcs ../104/lang.c ./lang.c
- X*** ../104/lang.c Mon Sep 30 19:33:00 1991
- X--- ./lang.c Thu Oct 10 20:27:06 1991
- X***************
- X*** 3,9 ****
- X * Module : lang.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 30-09-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X--- 3,9 ----
- X * Module : lang.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 10-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 21,31 ****
- X * art.c
- X */
- X
- X! char txt_group[] = "Group %s... ";
- X char txt_cannot_open_art[] = "can't open article %s: ";
- X char txt_indexing[] = "Indexing...";
- X char txt_indexing_num[] = "Indexing...%4d";
- X char txt_corrupt_index[] = "Index file %s corrupted. error %d on article %d";
- X
- X /*
- X * feed.c
- X--- 21,35 ----
- X * art.c
- X */
- X
- X! char txt_group[] = "Group %s...";
- X char txt_cannot_open_art[] = "can't open article %s: ";
- X char txt_indexing[] = "Indexing...";
- X char txt_indexing_num[] = "Indexing...%4d";
- X char txt_corrupt_index[] = "Index file %s corrupted. error %d on article %d";
- X+ char txt_checking_for_news[] = "Checking for news...";
- X+ char txt_there_is_no_news[] = "There is no news\n";
- X+ char txt_killing_arts[] = "Killing articles...";
- X+ char txt_unkilling_arts[] = "Unkilling articles...";
- X
- X /*
- X * feed.c
- X***************
- X*** 39,49 ****
- X--- 43,55 ----
- X char txt_feed_pattern[] = "Enter regex pattern [%s]> ";
- X #endif
- X char txt_no_command[] = "No command";
- X+ char txt_piping[] = "Piping...";
- X
- X /*
- X * group.c
- X */
- X
- X+ char txt_cannot_post[] = "*** Posting not allowed ***";
- X char txt_tagged_art[] = "tagged article";
- X char txt_untagged_art[] = "untagged article";
- X char txt_inverse_on[] = "Inverse video enabled";
- X***************
- X*** 92,99 ****
- X char txt_help_I[] = "I Toggle inverse video\r\n";
- X char txt_help_K[] = "K Mark article/thread as read & goto next unread\r\n";
- X char txt_help_j[] = "jk Down (k=up) a line\r\n";
- X! char txt_help_i_n[] = "nN Goto next (N=next unread) group\r\n";
- X! char txt_help_i_p[] = "pP Goto previous (P=previous unread) group\r\n";
- X char txt_help_q[] = "q Quit\r\n";
- X char txt_help_s[] = "su Subscribe (u=unsubscribe) to current group\r\n";
- X char txt_help_S[] = "SU Subscribe (U=unsubscribe) to groups that match pattern\r\n";
- X--- 98,105 ----
- X char txt_help_I[] = "I Toggle inverse video\r\n";
- X char txt_help_K[] = "K Mark article/thread as read & goto next unread\r\n";
- X char txt_help_j[] = "jk Down (k=up) a line\r\n";
- X! char txt_help_i_n[] = "np Goto next (p=previous) group\r\n";
- X! char txt_help_i_p[] = "NP Goto next (P=previous) unread article\r\n";
- X char txt_help_q[] = "q Quit\r\n";
- X char txt_help_s[] = "su Subscribe (u=unsubscribe) to current group\r\n";
- X char txt_help_S[] = "SU Subscribe (U=unsubscribe) to groups that match pattern\r\n";
- X***************
- X*** 147,153 ****
- X */
- X
- X char txt_not_in_active_file[] = "Group %s not found in active file";
- X! char txt_screen_init_failed[] = "Screen initialization failed";
- X char txt_bad_active_file[] = "Active file corrupt";
- X
- X /*
- X--- 153,159 ----
- X */
- X
- X char txt_not_in_active_file[] = "Group %s not found in active file";
- X! char txt_screen_init_failed[] = "%s: Screen initialization failed";
- X char txt_bad_active_file[] = "Active file corrupt";
- X
- X /*
- X***************
- X*** 252,257 ****
- X--- 258,267 ----
- X */
- X
- X char txt_no_arts_posted[] = "No articles have been posted";
- X+ char txt_post_an_article[] = "Post an article...";
- X+ char txt_post_a_followup[] = "Post a followup...";
- X+ char txt_mail_bug_report[] = "Mail bug report...";
- X+ char txt_reply_to_author[] = "Reply to author...";
- X
- X /*
- X * prompt.c
- X***************
- X*** 312,317 ****
- X--- 322,328 ----
- X char txt_post_processing[] = "Post processing...";
- X char txt_post_processing_finished[] = "-- post processing completed --";
- X char txt_deleting[] = "Deleting...";
- X+ char txt_uudecoding[] = "Uudecoding...";
- X
- X /*
- X * search.c
- X***************
- X*** 351,357 ****
- X char txt_select_group[] = "Select group> ";
- X char txt_help_g_4[] = "4$ Select group 4 ($=select last group)\r\n";
- X char txt_help_g_ctrl_r[] = "^R Reset .newsrc\r\n";
- X! char txt_help_g_ctrl_k[] = "^KZ Delete (Z=undelete) group from .newsrc\r\n";
- X char txt_help_g_cr[] = "<CR> Read current group\r\n";
- X char txt_help_g_tab[] = "<TAB> View next unread group\r\n";
- X char txt_help_g_c[] = "c Mark group as all read\r\n";
- X--- 362,368 ----
- X char txt_select_group[] = "Select group> ";
- X char txt_help_g_4[] = "4$ Select group 4 ($=select last group)\r\n";
- X char txt_help_g_ctrl_r[] = "^R Reset .newsrc\r\n";
- X! char txt_help_g_ctrl_k[] = "^KZ Delete (Z=undelete) group from .newsrc\r\n";
- X char txt_help_g_cr[] = "<CR> Read current group\r\n";
- X char txt_help_g_tab[] = "<TAB> View next unread group\r\n";
- X char txt_help_g_c[] = "c Mark group as all read\r\n";
- Xdiff -rcs ../104/lang.h ./lang.h
- X*** ../104/lang.h Mon Sep 30 19:24:25 1991
- X--- ./lang.h Thu Oct 10 20:27:16 1991
- X***************
- X*** 3,9 ****
- X * Module : lang.h
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 30-09-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X--- 3,9 ----
- X * Module : lang.h
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 10-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X***************
- X*** 22,27 ****
- X--- 22,31 ----
- X extern char txt_indexing[];
- X extern char txt_indexing_num[];
- X extern char txt_corrupt_index[];
- X+ extern char txt_checking_for_news[];
- X+ extern char txt_there_is_no_news[];
- X+ extern char txt_killing_arts[];
- X+ extern char txt_unkilling_arts[];
- X
- X /*
- X * feed.c
- X***************
- X*** 31,41 ****
- X--- 35,47 ----
- X extern char txt_post_procees_type[];
- X extern char txt_feed_pattern[];
- X extern char txt_no_command[];
- X+ extern char txt_piping[];
- X
- X /*
- X * group.c
- X */
- X
- X+ extern char txt_cannot_post[];
- X extern char txt_tagged_art[];
- X extern char txt_untagged_art[];
- X extern char txt_inverse_on[];
- X***************
- X*** 245,250 ****
- X--- 251,260 ----
- X */
- X
- X extern char txt_no_arts_posted[];
- X+ extern char txt_post_an_article[];
- X+ extern char txt_post_a_followup[];
- X+ extern char txt_mail_bug_report[];
- X+ extern char txt_reply_to_author[];
- X
- X /*
- X * rcfile.c
- X***************
- X*** 300,305 ****
- X--- 310,316 ----
- X extern char txt_post_processing[];
- X extern char txt_post_processing_finished[];
- X extern char txt_deleting[];
- X+ extern char txt_uudecoding[];
- X
- X /*
- X * search.c
- Xdiff -rcs ../104/main.c ./main.c
- X*** ../104/main.c Wed Oct 2 09:50:17 1991
- X--- ./main.c Thu Oct 10 21:00:35 1991
- X***************
- X*** 3,9 ****
- X * Module : main.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 02-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X--- 3,9 ----
- X * Module : main.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 04-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 259,266 ****
- X--- 259,268 ----
- X catchup = FALSE; /* turn off msgs when running forked */
- X verbose = FALSE;
- X if (fork () == 0) { /* fork child to update indexes in background */
- X+ nntp_startup (); /* connect server if we are using nntp */
- X thread_arts = FALSE; /* stop threading to run faster */
- X do_update ();
- X+ nntp_finish (); /* connect server if we are using nntp */
- X exit (0);
- X }
- X update = FALSE;
- X***************
- X*** 272,278 ****
- X }
- X
- X if (! InitScreen ()) {
- X! error_message (txt_screen_init_failed, "");
- X exit (1);
- X }
- X
- X--- 274,280 ----
- X }
- X
- X if (! InitScreen ()) {
- X! error_message (txt_screen_init_failed, progname);
- X exit (1);
- X }
- X
- X***************
- X*** 285,291 ****
- X notify_groups ();
- X }
- X
- X! signal (SIGINT, signal_handler); /* catch ctrl-C */
- X
- X selection_index (start_groupnum);
- X
- X--- 287,295 ----
- X notify_groups ();
- X }
- X
- X! #ifdef READ_CHAR_HACK
- X! setbuf (stdin, 0);
- X! #endif
- X
- X selection_index (start_groupnum);
- X
- XFiles ../104/memory.c and ./memory.c are identical
- Xdiff -rcs ../104/misc.c ./misc.c
- X*** ../104/misc.c Wed Oct 2 18:43:09 1991
- X--- ./misc.c Tue Oct 15 09:40:50 1991
- X***************
- X*** 3,9 ****
- X * Module : misc.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 02-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X--- 3,9 ----
- X * Module : misc.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 15-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 75,89 ****
- X
- X void init_selfinfo ()
- X {
- X char nam[LEN];
- X char *p;
- X- extern char *getenv();
- X- extern struct passwd *getpwuid();
- X FILE *fp;
- X struct passwd *myentry;
- X struct stat sb;
- X
- X! myentry = getpwuid (getuid ());
- X strcpy (userid, myentry->pw_name);
- X
- X if ((p = getenv("HOME")) != NULL) {
- X--- 75,96 ----
- X
- X void init_selfinfo ()
- X {
- X+ extern char *getenv ();
- X+ extern char *getlogin ();
- X+ extern struct passwd *getpwuid ();
- X+ extern struct passwd *getpwnam ();
- X char nam[LEN];
- X char *p;
- X FILE *fp;
- X struct passwd *myentry;
- X struct stat sb;
- X
- X! if ((p = getlogin ()) != (char *) 0) {
- X! myentry = getpwnam (p);
- X! } else {
- X! myentry = getpwuid (getuid ());
- X! }
- X!
- X strcpy (userid, myentry->pw_name);
- X
- X if ((p = getenv("HOME")) != NULL) {
- X***************
- X*** 446,452 ****
- X static int first = TRUE;
- X
- X if (first) {
- X! strcpy (editor, get_val ("EDITOR", DEFAULT_EDITOR));
- X first = FALSE;
- X }
- X
- X--- 453,461 ----
- X static int first = TRUE;
- X
- X if (first) {
- X! char *my_editor = getenv ("VISUAL");
- X!
- X! strcpy (editor, my_editor != NULL ? my_editor : get_val ("EDITOR", DEFAULT_EDITOR));
- X first = FALSE;
- X }
- X
- X***************
- X*** 562,567 ****
- X--- 571,577 ----
- X nntp_finish (); /* disconnect from NNTP server */
- X free_all_arrays (); /* deallocate all arrays */
- X ClearScreen ();
- X+ EndWin ();
- X Raw (FALSE);
- X exit (ret);
- X }
- X***************
- X*** 586,591 ****
- X--- 596,602 ----
- X active_file, progname);
- X } else {
- X printf (txt_cannot_open, active_file);
- X+ putchar ('\n');
- X }
- X fflush (stdout);
- X exit (1);
- X***************
- X*** 882,888 ****
- X
- X void set_real_uid_gid ()
- X {
- X! #ifdef BSD
- X if (seteuid (real_uid) == -1) {
- X error_message ("Error seteuid(real) failed", (char *) 0);
- X }
- X--- 893,899 ----
- X
- X void set_real_uid_gid ()
- X {
- X! #if defined(BSD) && ! defined(SINIX)
- X if (seteuid (real_uid) == -1) {
- X error_message ("Error seteuid(real) failed", (char *) 0);
- X }
- X***************
- X*** 902,908 ****
- X
- X void set_tin_uid_gid ()
- X {
- X! #ifdef BSD
- X if (seteuid (tin_uid) == -1) {
- X error_message ("Error seteuid(tin) failed", (char *) 0);
- X }
- X--- 913,919 ----
- X
- X void set_tin_uid_gid ()
- X {
- X! #if defined(BSD) && ! defined(SINIX)
- X if (seteuid (tin_uid) == -1) {
- X error_message ("Error seteuid(tin) failed", (char *) 0);
- X }
- XFiles ../104/newsrc.c and ./newsrc.c are identical
- XFiles ../104/nntp.h and ./nntp.h are identical
- Xdiff -rcs ../104/open.c ./open.c
- X*** ../104/open.c Wed Oct 2 09:38:15 1991
- X--- ./open.c Tue Oct 8 20:14:41 1991
- X***************
- X*** 15,27 ****
- X
- X #include "tin.h"
- X #ifdef USE_NNTP
- X! #include "nntp.h"
- X #endif
- X
- X /* Hopefully one of these is right for you. */
- X
- X #ifdef BSD
- X! # include <sys/dir.h>
- X # define DIR_BUF struct direct
- X # define D_LENGTH d_namlen
- X #endif
- X--- 15,31 ----
- X
- X #include "tin.h"
- X #ifdef USE_NNTP
- X! # include "nntp.h"
- X #endif
- X
- X /* Hopefully one of these is right for you. */
- X
- X #ifdef BSD
- X! # ifdef SINIX
- X! # include <dir.h>
- X! # else
- X! # include <sys/dir.h>
- X! # endif
- X # define DIR_BUF struct direct
- X # define D_LENGTH d_namlen
- X #endif
- X***************
- X*** 31,41 ****
- X # define D_LENGTH d_namlen
- X #endif
- X #ifndef DIR_BUF
- X! #ifdef sorix960
- X! # include <sys/dirent.h>
- X! #else
- X! # include <dirent.h>
- X! #endif
- X # define DIR_BUF struct dirent
- X # define D_LENGTH d_reclen
- X #endif
- X--- 35,45 ----
- X # define D_LENGTH d_namlen
- X #endif
- X #ifndef DIR_BUF
- X! # ifdef sorix960
- X! # include <sys/dirent.h>
- X! # else
- X! # include <dirent.h>
- X! # endif
- X # define DIR_BUF struct dirent
- X # define D_LENGTH d_reclen
- X #endif
- X***************
- X*** 46,51 ****
- X--- 50,59 ----
- X int compiled_with_nntp = FALSE;
- X #endif
- X
- X+ #ifdef USE_NNTP
- X+ int can_post = TRUE;
- X+ #endif
- X+
- X char server_name[LEN];
- X
- X
- X***************
- X*** 104,110 ****
- X--- 112,122 ----
- X */
- X switch (ret) {
- X case OK_CANPOST:
- X+ can_post = TRUE;
- X+ break;
- X+
- X case OK_NOPOST:
- X+ can_post = FALSE;
- X break;
- X
- X case -1:
- X***************
- X*** 120,136 ****
- X }
- X
- X
- X! void nntp_finish()
- X {
- X #ifdef USE_NNTP
- X if (read_news_via_nntp) {
- X! close_server();
- X }
- X #endif
- X }
- X
- X
- X! FILE *open_active_fp()
- X {
- X if (read_news_via_nntp) {
- X #ifdef USE_NNTP
- X--- 132,148 ----
- X }
- X
- X
- X! void nntp_finish ()
- X {
- X #ifdef USE_NNTP
- X if (read_news_via_nntp) {
- X! close_server ();
- X }
- X #endif
- X }
- X
- X
- X! FILE *open_active_fp ()
- X {
- X if (read_news_via_nntp) {
- X #ifdef USE_NNTP
- X***************
- X*** 354,359 ****
- X--- 366,373 ----
- X else
- X note_size = sb.st_size;
- X
- X+ return TRUE;
- X+ #else
- X return TRUE;
- X #endif
- X }
- Xdiff -rcs ../104/page.c ./page.c
- X*** ../104/page.c Mon Sep 30 20:43:13 1991
- X--- ./page.c Thu Oct 10 20:40:47 1991
- X***************
- X*** 3,9 ****
- X * Module : page.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 30-09-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X--- 3,9 ----
- X * Module : page.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 10-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 90,96 ****
- X rotate = 0; /* normal mode, not rot13 */
- X art = arts[respnum].artnum;
- X arts[respnum].unread = ART_READ; /* mark article as read */
- X! open_note (art, group_path);
- X
- X if (note_page == NOTE_UNAVAIL) {
- X ClearScreen ();
- X--- 90,96 ----
- X rotate = 0; /* normal mode, not rot13 */
- X art = arts[respnum].artnum;
- X arts[respnum].unread = ART_READ; /* mark article as read */
- X! art_open (art, group_path);
- X
- X if (note_page == NOTE_UNAVAIL) {
- X ClearScreen ();
- X***************
- X*** 119,128 ****
- X--- 119,130 ----
- X switch (ch) {
- X case 'G': /* ansi PgDn */
- X case 'U': /* at386 PgDn */
- X+ case 'T': /* 97801 PgDn */
- X goto page_down;
- X
- X case 'I': /* ansi PgUp */
- X case 'V': /* at386 PgUp */
- X+ case 'S': /* 97801 PgUp */
- X case 'v': /* emacs style */
- X goto page_up;
- X
- X***************
- X*** 153,164 ****
- X info_message(txt_no_last_message);
- X break;
- X }
- X! note_cleanup();
- X respnum = last_resp;
- X goto restart;
- X
- X case '|': /* pipe article/thread/tagged arts to command */
- X feed_articles (FEED_PIPE, PAGE_LEVEL, "Pipe", respnum, group_path);
- X break;
- X
- X case '/': /* search forwards in article */
- X--- 155,168 ----
- X info_message(txt_no_last_message);
- X break;
- X }
- X! art_close();
- X respnum = last_resp;
- X goto restart;
- X
- X case '|': /* pipe article/thread/tagged arts to command */
- X+ set_real_uid_gid ();
- X feed_articles (FEED_PIPE, PAGE_LEVEL, "Pipe", respnum, group_path);
- X+ set_tin_uid_gid ();
- X break;
- X
- X case '/': /* search forwards in article */
- X***************
- X*** 171,177 ****
- X n = which_base (respnum);
- X if (n != respnum && n >= 0) {
- X respnum = n;
- X! note_cleanup ();
- X goto restart;
- X }
- X break;
- X--- 175,181 ----
- X n = which_base (respnum);
- X if (n != respnum && n >= 0) {
- X respnum = n;
- X! art_close ();
- X goto restart;
- X }
- X break;
- X***************
- X*** 182,188 ****
- X }
- X if (n != respnum) {
- X respnum = n;
- X! note_cleanup ();
- X goto restart;
- X }
- X break;
- X--- 186,192 ----
- X }
- X if (n != respnum) {
- X respnum = n;
- X! art_close ();
- X goto restart;
- X }
- X break;
- X***************
- X*** 199,205 ****
- X respnum = n;
- X goto restart;
- X } else if (note_end) {
- X! note_cleanup ();
- X n = next_response (respnum);
- X if (n == -1) {
- X return (which_base (respnum));
- X--- 203,209 ----
- X respnum = n;
- X goto restart;
- X } else if (note_end) {
- X! art_close ();
- X n = next_response (respnum);
- X if (n == -1) {
- X return (which_base (respnum));
- X***************
- X*** 212,218 ****
- X
- X case '\r':
- X case '\n': /* go to start of next thread */
- X! note_cleanup ();
- X n = next_basenote (respnum);
- X if (n == -1)
- X return (which_base (respnum));
- X--- 216,222 ----
- X
- X case '\r':
- X case '\n': /* go to start of next thread */
- X! art_close ();
- X n = next_basenote (respnum);
- X if (n == -1)
- X return (which_base (respnum));
- X***************
- X*** 230,236 ****
- X goto restart;
- X
- X } else if (note_end) {
- X! note_cleanup();
- X n = next_unread(next_response(respnum));
- X if (n == -1)
- X return (which_base (respnum));
- X--- 234,240 ----
- X goto restart;
- X
- X } else if (note_end) {
- X! art_close();
- X n = next_unread(next_response(respnum));
- X if (n == -1)
- X return (which_base (respnum));
- X***************
- X*** 314,320 ****
- X case 'b': /* back a page */
- X page_up:
- X if (note_page == NOTE_UNAVAIL) {
- X! note_cleanup();
- X n = prev_response (respnum);
- X if (n == -1)
- X return (which_resp (respnum));
- X--- 318,324 ----
- X case 'b': /* back a page */
- X page_up:
- X if (note_page == NOTE_UNAVAIL) {
- X! art_close();
- X n = prev_response (respnum);
- X if (n == -1)
- X return (which_resp (respnum));
- X***************
- X*** 348,354 ****
- X if (cur_groupnum + 1 < local_top) {
- X cur_groupnum++;
- X }
- X! note_cleanup();
- X return -1;
- X }
- X break;
- X--- 352,358 ----
- X if (cur_groupnum + 1 < local_top) {
- X cur_groupnum++;
- X }
- X! art_close();
- X return -1;
- X }
- X break;
- X***************
- X*** 360,369 ****
- X break;
- X
- X case 'f': /* post a followup to this article */
- X if (post_response (group, FALSE)) {
- X update_newsrc (group, my_group[cur_groupnum], FALSE);
- X n = which_base (respnum);
- X! note_cleanup ();
- X index_group (group, group_path);
- X read_newsrc_line (group);
- X respnum = choose_resp (n, nresp(n));
- X--- 364,379 ----
- X break;
- X
- X case 'f': /* post a followup to this article */
- X+ #ifdef USE_NNTP
- X+ if (! can_post) {
- X+ info_message (txt_cannot_post);
- X+ break;
- X+ }
- X+ #endif
- X if (post_response (group, FALSE)) {
- X update_newsrc (group, my_group[cur_groupnum], FALSE);
- X n = which_base (respnum);
- X! art_close ();
- X index_group (group, group_path);
- X read_newsrc_line (group);
- X respnum = choose_resp (n, nresp(n));
- X***************
- X*** 373,382 ****
- X break;
- X
- X case 'F': /* post a followup to this article */
- X if (post_response (group, TRUE)) {
- X update_newsrc (group, my_group[cur_groupnum], FALSE);
- X n = which_base (respnum);
- X! note_cleanup ();
- X index_group (group, group_path);
- X read_newsrc_line (group);
- X respnum = choose_resp (n, nresp(n));
- X--- 383,398 ----
- X break;
- X
- X case 'F': /* post a followup to this article */
- X+ #ifdef USE_NNTP
- X+ if (! can_post) {
- X+ info_message (txt_cannot_post);
- X+ break;
- X+ }
- X+ #endif
- X if (post_response (group, TRUE)) {
- X update_newsrc (group, my_group[cur_groupnum], FALSE);
- X n = which_base (respnum);
- X! art_close ();
- X index_group (group, group_path);
- X read_newsrc_line (group);
- X respnum = choose_resp (n, nresp(n));
- X***************
- X*** 397,403 ****
- X
- X case 'i': /* return to index page */
- X return_to_index:
- X! note_cleanup ();
- X if (kill_state == NO_KILLING &&
- X sort_art_type != old_sort_art_type) {
- X make_threads (TRUE);
- X--- 413,419 ----
- X
- X case 'i': /* return to index page */
- X return_to_index:
- X! art_close ();
- X if (kill_state == NO_KILLING &&
- X sort_art_type != old_sort_art_type) {
- X make_threads (TRUE);
- X***************
- X*** 433,439 ****
- X if (n == -1)
- X return (which_base (respnum));
- X } else {
- X! note_cleanup ();
- X n = next_unread (next_response (respnum));
- X if (n == -1)
- X return (which_base (respnum));
- X--- 449,455 ----
- X if (n == -1)
- X return (which_base (respnum));
- X } else {
- X! art_close ();
- X n = next_unread (next_response (respnum));
- X if (n == -1)
- X return (which_base (respnum));
- X***************
- X*** 448,460 ****
- X n = next_unread (next_response (respnum));
- X if (n == -1)
- X goto return_to_index;
- X! note_cleanup ();
- X respnum = n;
- X goto restart;
- X /* NOTREACHED */
- X
- X case 'm': /* mail article/thread/tagged articles to somebody */
- X feed_articles (FEED_MAIL, PAGE_LEVEL, "Mail", respnum, group_path);
- X break;
- X
- X case 'M': /* options menu */
- X--- 464,478 ----
- X n = next_unread (next_response (respnum));
- X if (n == -1)
- X goto return_to_index;
- X! art_close ();
- X respnum = n;
- X goto restart;
- X /* NOTREACHED */
- X
- X case 'm': /* mail article/thread/tagged articles to somebody */
- X+ set_real_uid_gid ();
- X feed_articles (FEED_MAIL, PAGE_LEVEL, "Mail", respnum, group_path);
- X+ set_tin_uid_gid ();
- X break;
- X
- X case 'M': /* options menu */
- X***************
- X*** 465,471 ****
- X break;
- X
- X case 'n': /* skip to next article */
- X! note_cleanup ();
- X n = next_response (respnum);
- X if (n == -1)
- X return (which_base(respnum));
- X--- 483,489 ----
- X break;
- X
- X case 'n': /* skip to next article */
- X! art_close ();
- X n = next_response (respnum);
- X if (n == -1)
- X return (which_base(respnum));
- X***************
- X*** 479,485 ****
- X if (n == -1)
- X info_message(txt_no_next_unread_art);
- X else {
- X! note_cleanup();
- X respnum = n;
- X goto restart;
- X }
- X--- 497,503 ----
- X if (n == -1)
- X info_message(txt_no_next_unread_art);
- X else {
- X! art_close();
- X respnum = n;
- X goto restart;
- X }
- X***************
- X*** 486,496 ****
- X break;
- X
- X case 'o': /* output art/thread/tagged arts to printer */
- X feed_articles (FEED_PRINT, PAGE_LEVEL, "Print", respnum, group_path);
- X break;
- X
- X case 'p': /* previous article */
- X! note_cleanup ();
- X n = prev_response (respnum);
- X if (n == -1)
- X return (which_resp (respnum));
- X--- 504,516 ----
- X break;
- X
- X case 'o': /* output art/thread/tagged arts to printer */
- X+ set_real_uid_gid ();
- X feed_articles (FEED_PRINT, PAGE_LEVEL, "Print", respnum, group_path);
- X+ set_tin_uid_gid ();
- X break;
- X
- X case 'p': /* previous article */
- X! art_close ();
- X n = prev_response (respnum);
- X if (n == -1)
- X return (which_resp (respnum));
- X***************
- X*** 503,509 ****
- X if (n == -1)
- X info_message (txt_no_prev_unread_art);
- X else {
- X! note_cleanup ();
- X respnum = n;
- X goto restart;
- X }
- X--- 523,529 ----
- X if (n == -1)
- X info_message (txt_no_prev_unread_art);
- X else {
- X! art_close ();
- X respnum = n;
- X goto restart;
- X }
- X***************
- X*** 526,536 ****
- X break;
- X
- X case 's': /* save article/thread/tagged articles */
- X feed_articles (FEED_SAVE, PAGE_LEVEL, "Save", respnum, group_path);
- X break;
- X
- X case 't': /* return to group selection page */
- X! note_cleanup ();
- X if (kill_state == KILLING) {
- X if (kill_articles) {
- X kill_any_articles (group);
- X--- 546,558 ----
- X break;
- X
- X case 's': /* save article/thread/tagged articles */
- X+ set_real_uid_gid ();
- X feed_articles (FEED_SAVE, PAGE_LEVEL, "Save", respnum, group_path);
- SHAR_EOF
- echo "End of tin part 2"
- echo "File tin.patch05 is continued in part 3"
- echo "3" > shar3_seq_.tmp
- exit 0
-
- --
- NAME Iain Lea
- EMAIL iain@estevax.uucp ...!unido!estevax!iain
- SNAIL Bruecken Str. 12, 8500 Nuernberg, Germany
- PHONE +49-911-3089-407 (work) +49-911-331963 (home)
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-