home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-29 | 54.0 KB | 1,826 lines |
- Newsgroups: comp.sources.misc
- From: iain@estevax.uucp (Iain J. Lea)
- Subject: v26i077: tin - threaded full screen newsreader, Patch06b/5
- Message-ID: <1991Nov30.023929.14484@sparky.imd.sterling.com>
- X-Md4-Signature: 48ddf0922bb8e24537680e0e949ed17d
- Date: Sat, 30 Nov 1991 02:39:29 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: iain@estevax.uucp (Iain J. Lea)
- Posting-number: Volume 26, Issue 77
- Archive-name: tin/patch06b
- Environment: BSD, SCO, ISC, SUNOS, SYSVR3, SYSVR4, ULTRIX, XENIX
- Patch-To: tin: Volume 23, Issue 15-23
-
- #!/bin/sh
- # this is patch06.shar.02 (part 2 of tin)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file tin.patch06 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.patch06"
- sed 's/^X//' << 'SHAR_EOF' >> tin.patch06 &&
- X int orig_note_end;
- X int orig_note_page;
- X+ int patlen;
- X int ret1 = FALSE;
- X int ret2 = FALSE;
- X int redraw_screen = FALSE;
- X***************
- X*** 153,160 ****
- X break;
- X case FEED_PRINT:
- X if (default_printer) {
- X! sprintf (command, "%s -P%s > /dev/null 2>&1",
- X! printer, get_val ("PRINTER","ps0"));
- X } else {
- X sprintf (command, "%s > /dev/null 2>&1", printer);
- X }
- X--- 153,165 ----
- X break;
- X case FEED_PRINT:
- X if (default_printer) {
- X! #ifdef SINIX
- X! sprintf (command, "%s -dru=%s > /dev/null 2>&1",
- X! printer, get_val ("PRINTER","ps0"));
- X! #else
- X! sprintf (command, "%s -P%s > /dev/null 2>&1",
- X! printer, get_val ("PRINTER","ps0"));
- X! #endif
- X } else {
- X sprintf (command, "%s > /dev/null 2>&1", printer);
- X }
- X***************
- X*** 214,221 ****
- X if ((proc_ch = ReadCh ()) == CR)
- X proc_ch = proc_ch_default;
- X } while (proc_ch != 'n' && proc_ch != 's' &&
- X! proc_ch != 'u' && proc_ch != 'U' &&
- X! proc_ch != 'p');
- X }
- X }
- X clear_message ();
- X--- 219,225 ----
- X if ((proc_ch = ReadCh ()) == CR)
- X proc_ch = proc_ch_default;
- X } while (proc_ch != 'n' && proc_ch != 's' &&
- X! proc_ch != 'u' && proc_ch != 'U');
- X }
- X }
- X clear_message ();
- X***************
- X*** 240,246 ****
- X if (print_header) {
- 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--- 244,251 ----
- X if (print_header) {
- X fseek(note_fp, 0L, 0);
- X } else {
- X! fprintf (fp, "From: %s (%s)\n",
- X! arts[respnum].from,arts[respnum].name);
- 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*** 251,257 ****
- X case FEED_SAVE:
- X wait_message (txt_saving);
- X add_to_save_list (0, &arts[respnum], is_mailbox, file);
- X! (void) save_art_to_file (respnum, 0, FALSE, "");
- X break;
- X }
- X if (level == GROUP_LEVEL) {
- X--- 256,262 ----
- X case FEED_SAVE:
- X wait_message (txt_saving);
- X add_to_save_list (0, &arts[respnum], is_mailbox, file);
- X! (void) save_art_to_file (respnum, 0, FALSE, (char *) 0);
- X break;
- X }
- X if (level == GROUP_LEVEL) {
- X***************
- X*** 285,291 ****
- X if (print_header) {
- 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--- 290,297 ----
- X if (print_header) {
- X fseek(note_fp, 0L, 0);
- X } else {
- X! fprintf (fp, "From: %s (%s)\n",
- X! arts[respnum].from,arts[respnum].name);
- 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*** 297,302 ****
- X--- 303,309 ----
- X add_to_save_list (i, &arts[i], is_mailbox, file);
- X break;
- X }
- X+ art_close ();
- X }
- X if (function == FEED_SAVE) {
- X sort_save_list ();
- X***************
- X*** 332,338 ****
- X if (print_header) {
- 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--- 339,346 ----
- X if (print_header) {
- X fseek(note_fp, 0L, 0);
- X } else {
- X! fprintf (fp, "From: %s (%s)\n",
- X! arts[respnum].from,arts[respnum].name);
- 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*** 344,349 ****
- X--- 352,358 ----
- X add_to_save_list (j, &arts[j], is_mailbox, file);
- X break;
- X }
- X+ art_close ();
- X }
- X }
- X }
- X***************
- X*** 353,361 ****
- X break;
- X
- X case 'r': /* regex pattern matched articles */
- X for (i=0 ; i < top ; i++) {
- X #ifdef DONT_USE_REGEX
- X! if (str_str (arts[i].subject, pattern) != 0) {
- X #else
- X if (wildmat (arts[i].subject, pattern)) {
- X #endif
- X--- 362,371 ----
- X break;
- X
- X case 'r': /* regex pattern matched articles */
- X+ patlen = strlen (pattern);
- X for (i=0 ; i < top ; i++) {
- X #ifdef DONT_USE_REGEX
- X! if (str_str (arts[i].subject, pattern, patlen) != 0) {
- X #else
- X if (wildmat (arts[i].subject, pattern)) {
- X #endif
- X***************
- X*** 383,389 ****
- X if (print_header) {
- 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--- 393,400 ----
- X if (print_header) {
- X fseek(note_fp, 0L, 0);
- X } else {
- X! fprintf (fp, "From: %s (%s)\n",
- X! arts[respnum].from,arts[respnum].name);
- 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*** 395,400 ****
- X--- 406,412 ----
- X add_to_save_list (i, &arts[i], is_mailbox, file);
- X break;
- X }
- X+ art_close ();
- X }
- X }
- X if (function == FEED_SAVE) {
- Xdiff -rcs ../105/group.c ./group.c
- X*** ../105/group.c Wed Oct 16 20:00:23 1991
- X--- ./group.c Mon Nov 4 18:11:09 1991
- X***************
- 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--- 3,9 ----
- X * Module : group.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 04-11-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 38,43 ****
- X--- 38,44 ----
- X long old_artnum;
- X int old_top;
- X int sav_groupnum;
- X+ int scroll_lines;
- X int thread_marked_unread = FALSE;
- X
- X active[my_group[cur_groupnum]].read = TRUE;
- X***************
- X*** 55,60 ****
- X--- 56,66 ----
- X index_group (group, group_path); /* update index file */
- X read_newsrc_line (group); /* get sequencer information */
- X
- X+ if (show_only_unread) {
- X+ make_threads (FALSE);
- X+ find_base (show_only_unread);
- X+ }
- X+
- X if (space_mode) {
- X for (i = 0; i < top_base; i++) {
- X if (new_responses (i)) {
- X***************
- X*** 69,74 ****
- X--- 75,83 ----
- X } else {
- X index_point = top_base - 1;
- X }
- X+ if (index_point < 0) {
- X+ index_point = 0;
- X+ }
- X
- X clear_note_area ();
- X
- X***************
- X*** 95,101 ****
- X
- X case '-': /* go to last viewed article */
- X if (this_resp < 0) {
- X! info_message(txt_no_last_message);
- X break;
- X }
- X index_point = show_page (this_resp, group, group_path);
- X--- 104,110 ----
- X
- X case '-': /* go to last viewed article */
- X if (this_resp < 0) {
- X! info_message (txt_no_last_message);
- X break;
- X }
- X index_point = show_page (this_resp, group, group_path);
- X***************
- X*** 201,219 ****
- X case ctrl('D'): /* vi style */
- X case ctrl('V'): /* emacs style */
- X group_page_down:
- X! if (!top_base || index_point == top_base - 1)
- X break;
- X
- X! erase_subject_arrow();
- X! index_point += NOTESLINES / 2;
- X! if (index_point >= top_base)
- X! index_point = top_base - 1;
- X!
- X if (index_point < first_subj_on_screen
- X || index_point >= last_subj_on_screen)
- X! show_group_page(group);
- X else
- X! draw_subject_arrow();
- X break;
- X
- X case ctrl('K'): /* kill article */
- X--- 210,232 ----
- X case ctrl('D'): /* vi style */
- X case ctrl('V'): /* emacs style */
- X group_page_down:
- X! if (! top_base || index_point == top_base - 1)
- X break;
- X
- X! erase_subject_arrow ();
- X! scroll_lines = (full_page_scroll ? NOTESLINES : NOTESLINES / 2);
- X! index_point = ((index_point + scroll_lines) / scroll_lines) * scroll_lines;
- X! if (index_point >= top_base) {
- X! index_point = (top_base / scroll_lines) * scroll_lines;
- X! if (index_point < top_base - 1) {
- X! index_point = top_base - 1;
- X! }
- X! }
- X if (index_point < first_subj_on_screen
- X || index_point >= last_subj_on_screen)
- X! show_group_page (group);
- X else
- X! draw_subject_arrow ();
- X break;
- X
- X case ctrl('K'): /* kill article */
- X***************
- X*** 248,254 ****
- X case ctrl('N'):
- X case 'j': /* line down */
- X group_down:
- X! if (!top_base || index_point + 1 >= top_base)
- X break;
- X
- X if (index_point + 1 >= last_subj_on_screen) {
- X--- 261,267 ----
- X case ctrl('N'):
- X case 'j': /* line down */
- X group_down:
- X! if (! top_base || index_point + 1 >= top_base)
- X break;
- X
- X if (index_point + 1 >= last_subj_on_screen) {
- X***************
- X*** 283,309 ****
- X case ctrl('U'): /* page up */
- X case 'b':
- X group_page_up:
- X! if (!top_base)
- X break;
- X
- X #ifndef USE_CLEARSCREEN
- X clear_message ();
- X #endif
- X! erase_subject_arrow();
- X! index_point -= NOTESLINES / 2;
- X! if (index_point < 0)
- X index_point = 0;
- X if (index_point < first_subj_on_screen
- X || index_point >= last_subj_on_screen)
- X! show_group_page(group);
- X else
- X! draw_subject_arrow();
- X break;
- X
- X case 'a': /* author search forward */
- X case 'A': /* author search backward */
- X if (index_point < 0) {
- X! info_message(txt_no_arts);
- X break;
- X }
- X
- X--- 296,328 ----
- X case ctrl('U'): /* page up */
- X case 'b':
- X group_page_up:
- X! if (! top_base)
- X break;
- X
- X #ifndef USE_CLEARSCREEN
- X clear_message ();
- X #endif
- X! erase_subject_arrow ();
- X! scroll_lines = (full_page_scroll ? NOTESLINES : NOTESLINES / 2);
- X! if ((n = index_point % scroll_lines) > 0) {
- X! index_point = index_point - n;
- X! } else {
- X! index_point = ((index_point - scroll_lines) / scroll_lines) * scroll_lines;
- X! }
- X! if (index_point < 0) {
- X index_point = 0;
- X+ }
- X if (index_point < first_subj_on_screen
- X || index_point >= last_subj_on_screen)
- X! show_group_page (group);
- X else
- X! draw_subject_arrow ();
- X break;
- X
- X case 'a': /* author search forward */
- X case 'A': /* author search backward */
- X if (index_point < 0) {
- X! info_message (txt_no_arts);
- X break;
- X }
- X
- X***************
- X*** 426,432 ****
- X kill_state = change_rcfile (group, TRUE);
- X if (kill_state == NO_KILLING && n != sort_art_type) {
- X make_threads (TRUE);
- X! find_base ();
- X }
- X index_point = find_new_pos (old_top, old_artnum, index_point);
- X show_group_page (group);
- X--- 445,451 ----
- X kill_state = change_rcfile (group, TRUE);
- X if (kill_state == NO_KILLING && n != sort_art_type) {
- X make_threads (TRUE);
- X! find_base (show_only_unread);
- X }
- X index_point = find_new_pos (old_top, old_artnum, index_point);
- X show_group_page (group);
- X***************
- X*** 649,654 ****
- X--- 668,674 ----
- X int len_from;
- X int len_subj;
- X int respnum;
- X+ int unread_top = 0;
- X
- X #ifdef SIGTSTP
- X if (do_sigtstp) {
- X***************
- X*** 674,684 ****
- X CleartoEOLN ();
- X #endif
- X
- X! if (active[my_group[cur_groupnum]].thread) {
- X! sprintf (buf, "%s (%d %d)", group, top_base, top);
- X } else {
- X! sprintf (buf, "%s (U %d)", group, top);
- X }
- X center_line (0, TRUE, buf);
- X
- X col = (COLS - (int) strlen (txt_type_h_for_help))+1;
- X--- 694,712 ----
- X CleartoEOLN ();
- X #endif
- X
- X! if (show_only_unread) {
- X! for (i = 0 ; i < top_base ; i++) {
- X! unread_top += 1 + nresp (i);
- X! }
- X } else {
- X! unread_top = top;
- X }
- X+
- X+ if (active[my_group[cur_groupnum]].thread && thread_arts) {
- X+ sprintf (buf, "%s (%d %d)", group, top_base, unread_top);
- X+ } else {
- X+ sprintf (buf, "%s (U %d)", group, unread_top);
- X+ }
- X center_line (0, TRUE, buf);
- X
- X col = (COLS - (int) strlen (txt_type_h_for_help))+1;
- X***************
- X*** 703,726 ****
- X
- X MoveCursor (INDEX_TOP, 0);
- X
- X if (NOTESLINES <= 0) {
- X first_subj_on_screen = 0;
- X } else {
- X first_subj_on_screen = (index_point / NOTESLINES) * NOTESLINES;
- X! if (first_subj_on_screen < 0)
- X first_subj_on_screen = 0;
- X }
- X
- X last_subj_on_screen = first_subj_on_screen + NOTESLINES;
- X if (last_subj_on_screen >= top_base) {
- X last_subj_on_screen = top_base;
- X! first_subj_on_screen = top_base - NOTESLINES;
- X
- X! if (first_subj_on_screen < 0)
- X! first_subj_on_screen = 0;
- X }
- X
- X! if (show_author) {
- X len_from = max_from-BLANK_GROUP_COLS;
- X } else {
- X len_subj = (max_subj+max_from+3)-BLANK_GROUP_COLS;
- X--- 731,771 ----
- X
- X MoveCursor (INDEX_TOP, 0);
- X
- X+ if (index_point >= top_base) {
- X+ index_point = top_base - 1;
- X+ }
- X+
- X if (NOTESLINES <= 0) {
- X first_subj_on_screen = 0;
- X } else {
- X first_subj_on_screen = (index_point / NOTESLINES) * NOTESLINES;
- X! if (first_subj_on_screen < 0) {
- X first_subj_on_screen = 0;
- X+ }
- X }
- X
- X last_subj_on_screen = first_subj_on_screen + NOTESLINES;
- X+
- X if (last_subj_on_screen >= top_base) {
- X last_subj_on_screen = top_base;
- X! first_subj_on_screen = (top_base / NOTESLINES) * NOTESLINES;
- X
- X! if (first_subj_on_screen == last_subj_on_screen ||
- X! first_subj_on_screen < 0) {
- X! if (first_subj_on_screen < 0) {
- X! first_subj_on_screen = 0;
- X! } else {
- X! first_subj_on_screen = last_subj_on_screen - NOTESLINES;
- X! }
- X! }
- X }
- X
- X! if (top_base == 0) {
- X! first_subj_on_screen = 0;
- X! last_subj_on_screen = 0;
- X! }
- X!
- X! if (show_author != SHOW_FROM_NONE) {
- X len_from = max_from-BLANK_GROUP_COLS;
- X } else {
- X len_subj = (max_subj+max_from+3)-BLANK_GROUP_COLS;
- X***************
- X*** 748,757 ****
- X strcpy (resps, " ");
- X }
- X
- X! my_strncpy (from, arts[respnum].from, max_from);
- X
- X if (draw_arrow_mark) {
- X! if (show_author) {
- X my_strncpy (subject, arts[respnum].subject, max_subj);
- X printf (" %4d%3s %s%-*s %-s\r\n",
- X i+1, new_resps, resps, max_subj, subject, from);
- X--- 793,817 ----
- X strcpy (resps, " ");
- X }
- X
- X! switch (show_author) {
- X! case SHOW_FROM_ADDR:
- X! my_strncpy (from, arts[respnum].from, max_from);
- X! break;
- X! case SHOW_FROM_NAME:
- X! my_strncpy (from, arts[respnum].name, max_from);
- X! break;
- X! case SHOW_FROM_BOTH:
- X! if (arts[respnum].name != (char *) 0) {
- X! sprintf (msg, "%s (%s)", arts[respnum].from, arts[respnum].name);
- X! my_strncpy (from, msg, max_from);
- X! } else {
- X! my_strncpy (from, arts[respnum].from, max_from);
- X! }
- X! break;
- X! }
- X
- X if (draw_arrow_mark) {
- X! if (show_author != SHOW_FROM_NONE) {
- X my_strncpy (subject, arts[respnum].subject, max_subj);
- X printf (" %4d%3s %s%-*s %-s\r\n",
- X i+1, new_resps, resps, max_subj, subject, from);
- X***************
- X*** 761,767 ****
- X i+1, new_resps, resps, subject);
- X }
- X } else {
- X! if (show_author) {
- X my_strncpy (subject, arts[respnum].subject, max_subj);
- X sprintf (screen[j].col, " %4d%3s %s%-*s %-*s\r\n",
- X i+1, new_resps, resps, max_subj, subject, len_from, from);
- X--- 821,827 ----
- X i+1, new_resps, resps, subject);
- X }
- X } else {
- X! if (show_author != SHOW_FROM_NONE) {
- X my_strncpy (subject, arts[respnum].subject, max_subj);
- X sprintf (screen[j].col, " %4d%3s %s%-*s %-*s\r\n",
- X i+1, new_resps, resps, max_subj, subject, len_from, from);
- X***************
- X*** 841,849 ****
- X int i;
- X int sum = 0;
- X
- X! for (i = (int) base[thread]; i >= 0; i = arts[i].thread)
- X! if (arts[i].unread)
- X! sum++;
- X
- X return sum;
- X }
- X--- 901,911 ----
- X int i;
- X int sum = 0;
- X
- X! for (i = (int) base[thread]; i >= 0; i = arts[i].thread) {
- X! if (arts[i].unread) {
- X! sum++;
- X! }
- X! }
- X
- X return sum;
- X }
- XFiles ../105/hashstr.c and ./hashstr.c are identical
- Xdiff -rcs ../105/help.c ./help.c
- X*** ../105/help.c Tue Oct 8 14:56:02 1991
- X--- ./help.c Fri Oct 18 09:41:33 1991
- X***************
- X*** 3,9 ****
- X * Module : help.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 26-09-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X--- 3,9 ----
- X * Module : help.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 18-09-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 40,47 ****
- X txt_help_w,
- X txt_help_W,
- X txt_help_g_y,
- X- txt_help_g_z,
- X txt_help_g_dollar,
- X txt_help_g_search,
- X (char *) 0
- X };
- X--- 40,47 ----
- X txt_help_w,
- X txt_help_W,
- X txt_help_g_y,
- X txt_help_g_dollar,
- X+ txt_help_g_z,
- X txt_help_g_search,
- X (char *) 0
- X };
- Xdiff -rcs ../105/kill.c ./kill.c
- X*** ../105/kill.c Thu Oct 10 20:11:20 1991
- X--- ./kill.c Mon Nov 4 11:23:09 1991
- X***************
- X*** 3,9 ****
- X * Module : kill.c
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 30-09-91
- X * Release : 1.0
- X * Notes : kill articles
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X--- 3,9 ----
- X * Module : kill.c
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 04-11-91
- X * Release : 1.0
- X * Notes : kill articles
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X***************
- X*** 174,180 ****
- X sprintf (kill_group, "%s only", group_name);
- X my_strncpy (text, arts[index].subject, COLS-35);
- X sprintf (kill_subj, txt_kill_subject, text);
- X! my_strncpy (text, arts[index].from, COLS-35);
- X sprintf (kill_from, txt_kill_from, text);
- X text[0] = '\0';
- X
- X--- 174,185 ----
- X sprintf (kill_group, "%s only", group_name);
- X my_strncpy (text, arts[index].subject, COLS-35);
- X sprintf (kill_subj, txt_kill_subject, text);
- X! if (arts[index].name != (char *) 0) {
- X! sprintf (msg, "%s (%s)", arts[index].from, arts[index].name);
- X! my_strncpy (text, msg, COLS-35);
- X! } else {
- X! my_strncpy (text, arts[index].from, COLS-35);
- X! }
- X sprintf (kill_from, txt_kill_from, text);
- X text[0] = '\0';
- X
- X***************
- X*** 243,249 ****
- X MoveCursor (INDEX_TOP+10, (int) strlen (txt_kill_group));
- X str = kill_group;
- X printf ("%s", str);
- X! fflush(stdout);
- X do {
- X MoveCursor (INDEX_TOP+10, (int) strlen (txt_kill_group));
- X if ((ch = ReadCh()) == ' ') {
- X--- 248,254 ----
- X MoveCursor (INDEX_TOP+10, (int) strlen (txt_kill_group));
- X str = kill_group;
- X printf ("%s", str);
- X! fflush (stdout);
- X do {
- X MoveCursor (INDEX_TOP+10, (int) strlen (txt_kill_group));
- X if ((ch = ReadCh()) == ' ') {
- X***************
- X*** 317,323 ****
- X }
- X if (kill_from_ok) {
- X killf[kill_num].kill_type |= KILL_FROM;
- X! killf[kill_num].kill_from = str_dup (arts[index].from);
- X }
- X if (killf[kill_num].kill_type) {
- X if (kill_every_group) {
- X--- 322,333 ----
- X }
- X if (kill_from_ok) {
- X killf[kill_num].kill_type |= KILL_FROM;
- X! if (arts[index].name != (char *) 0) {
- X! sprintf (msg, "%s (%s)", arts[index].from, arts[index].name);
- X! } else {
- X! strcpy (msg, arts[index].from);
- X! }
- X! killf[kill_num].kill_from = str_dup (msg);
- X }
- X if (killf[kill_num].kill_type) {
- X if (kill_every_group) {
- X***************
- X*** 401,407 ****
- X switch (killf[j].kill_type) {
- X case KILL_SUBJ:
- X #ifdef DONT_USE_REGEX
- X! if (str_str (arts[i].subject, killf[j].kill_subj) != 0) {
- X #else
- X if (wildmat (arts[i].subject, killf[j].kill_subj)) {
- X #endif
- X--- 411,418 ----
- X switch (killf[j].kill_type) {
- X case KILL_SUBJ:
- X #ifdef DONT_USE_REGEX
- X! if (str_str (arts[i].subject, killf[j].kill_subj,
- X! strlen (killf[j].kill_subj)) != 0) {
- X #else
- X if (wildmat (arts[i].subject, killf[j].kill_subj)) {
- X #endif
- X***************
- X*** 411,420 ****
- X }
- X break;
- X case KILL_FROM:
- X #ifdef DONT_USE_REGEX
- X! if (str_str (arts[i].from, killf[j].kill_from) != 0) {
- X #else
- X! if (wildmat (arts[i].from, killf[j].kill_from)) {
- X #endif
- X arts[i].tagged = TRUE;
- X killed = TRUE;
- X--- 422,437 ----
- X }
- X break;
- X case KILL_FROM:
- X+ if (arts[i].name != (char *) 0) {
- X+ sprintf (msg, "%s (%s)", arts[i].from, arts[i].name);
- X+ } else {
- X+ strcpy (msg, arts[i].from);
- X+ }
- X #ifdef DONT_USE_REGEX
- X! if (str_str (msg, killf[j].kill_from
- X! strlen (killf[j].kill_from)) != 0) {
- X #else
- X! if (wildmat (msg, killf[j].kill_from)) {
- X #endif
- X arts[i].tagged = TRUE;
- X killed = TRUE;
- X***************
- X*** 422,428 ****
- X break;
- X case KILL_BOTH:
- X #ifdef DONT_USE_REGEX
- X! if (str_str (arts[i].subject, killf[j].kill_subj) != 0) {
- X #else
- X if (wildmat (arts[i].subject, killf[j].kill_subj)) {
- X #endif
- X--- 439,446 ----
- X break;
- X case KILL_BOTH:
- X #ifdef DONT_USE_REGEX
- X! if (str_str (arts[i].subject, killf[j].kill_subj,
- X! strlen (killf[j].kill_subj)) != 0) {
- X #else
- X if (wildmat (arts[i].subject, killf[j].kill_subj)) {
- X #endif
- X***************
- X*** 429,438 ****
- X arts[i].tagged = TRUE;
- X killed = TRUE;
- X }
- X #ifdef DONT_USE_REGEX
- X! if (str_str (arts[i].from, killf[j].kill_from) != 0) {
- X #else
- X! if (wildmat (arts[i].from, killf[j].kill_from)) {
- X #endif
- X arts[i].tagged = TRUE;
- X killed = TRUE;
- X--- 447,462 ----
- X arts[i].tagged = TRUE;
- X killed = TRUE;
- X }
- X+ if (arts[i].name != (char *) 0) {
- X+ sprintf (msg, "%s (%s)", arts[i].from, arts[i].name);
- X+ } else {
- X+ strcpy (msg, arts[i].from);
- X+ }
- X #ifdef DONT_USE_REGEX
- X! if (str_str (msg, killf[j].kill_from,
- X! strlen (killf[j].kill_from)) != 0) {
- X #else
- X! if (wildmat (msg, killf[j].kill_from)) {
- X #endif
- X arts[i].tagged = TRUE;
- X killed = TRUE;
- Xdiff -rcs ../105/lang.c ./lang.c
- X*** ../105/lang.c Thu Oct 10 20:27:06 1991
- X--- ./lang.c Thu Oct 31 09:10:16 1991
- X***************
- 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--- 3,9 ----
- X * Module : lang.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 31-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 13,22 ****
- X * right notice, and it must be included in any copy made
- X */
- X
- X- #ifdef LANG_GERMAN
- X-
- X- #else
- X-
- X /*
- X * art.c
- X */
- X--- 13,18 ----
- X***************
- X*** 36,42 ****
- X */
- X
- X char txt_art_thread_regex_tag[] = " a)rticle, t)hread, r)egex pattern, T)agged articles, e)xit: ";
- X! char txt_post_procees_type[] = "Process n)one, s)har, u)udecode, U)udecode & zoo, p)atch: ";
- X #ifdef DONT_USE_REGEX
- X char txt_feed_pattern[] = "Enter pattern [%s]> ";
- X #else
- X--- 32,38 ----
- X */
- X
- X char txt_art_thread_regex_tag[] = " a)rticle, t)hread, r)egex pattern, T)agged articles, e)xit: ";
- X! char txt_post_procees_type[] = "Process n)one, s)har, u)udecode, U)udecode & zoo: ";
- X #ifdef DONT_USE_REGEX
- X char txt_feed_pattern[] = "Enter pattern [%s]> ";
- X #else
- X***************
- X*** 238,244 ****
- X char txt_resp_to_poster[] = "Responses have been directed to the poster. Post anyway? (y/n): ";
- X char txt_resp_redirect[] = "Responses have been directed to the following newsgroups";
- X char txt_continue[] = "Continue? (y/n): ";
- X! char txt_writes[] = "%s writes:\n";
- X char txt_save_filename[] = "Save filename [%s]> ";
- X char txt_art_not_saved[] = "-- Article not saved --";
- X char txt_no_filename[] = "No filename";
- X--- 234,240 ----
- X char txt_resp_to_poster[] = "Responses have been directed to the poster. Post anyway? (y/n): ";
- X char txt_resp_redirect[] = "Responses have been directed to the following newsgroups";
- X char txt_continue[] = "Continue? (y/n): ";
- X! char txt_writes[] = "%s (%s) writes:\n";
- X char txt_save_filename[] = "Save filename [%s]> ";
- X char txt_art_not_saved[] = "-- Article not saved --";
- X char txt_no_filename[] = "No filename";
- X***************
- X*** 273,298 ****
- X * rcfile.c
- X */
- X
- X! char txt_opt_autosave[] = " 1. Auto save : ";
- X! char txt_opt_save_separate[] = " 2. Save separate : ";
- X! char txt_opt_mark_saved_read[] = " 3. Mark saved read : ";
- X! char txt_opt_kill_articles[] = " 4. Kill articles : ";
- X! char txt_opt_show_author[] = " 5. Show Author : ";
- X! char txt_opt_draw_arrow[] = " 6. Draw arrow : ";
- X! char txt_opt_print_header[] = " 7. Print header : ";
- X! char txt_opt_pos_first_unread[] = " 8. Goto 1st unread : ";
- X! char txt_opt_process_type[] = " 9. Process type : ";
- X! char txt_opt_sort_type[] = " 10 Sort article by : ";
- X! char txt_opt_savedir[] = " 11 Save directory : ";
- X! char txt_opt_maildir[] = " 12 Mail directory : ";
- X! char txt_opt_printer[] = " 13 Printer : ";
- X char txt_options_menu[] = "Options Menu";
- X char txt_post_process_none[] = "None";
- X char txt_post_process_sh[] = "Shell archive";
- X char txt_post_process_uudecode[] = "Uudecode";
- X char txt_post_process_uud_lst_zoo[] = "Uudecode & list zoo archive";
- X char txt_post_process_uud_ext_zoo[] = "Uudecode & extract zoo archive";
- X- char txt_post_process_patch[] = "Patch";
- X char txt_sort_by_nothing[] = "Nothing";
- X char txt_sort_by_subj_descend[] = "Subject: field (descending)";
- X char txt_sort_by_subj_ascend[] = "Subject: field (ascending)";
- X--- 269,301 ----
- X * rcfile.c
- X */
- X
- X! char txt_opt_autosave[] = "1. Auto save : ";
- X! char txt_opt_save_separate[] = "2. Save separate : ";
- X! char txt_opt_mark_saved_read[] = "3. Mark saved read : ";
- X! char txt_opt_kill_articles[] = "4. Kill articles : ";
- X! char txt_opt_draw_arrow[] = "5. Draw arrow : ";
- X! char txt_opt_print_header[] = "6. Print header : ";
- X! char txt_opt_pos_first_unread[] = "7. Goto 1st unread : ";
- X! char txt_opt_page_scroll[] = "8. Scroll full page: ";
- X! char txt_opt_catchup_groups[] = "9. Catchup on quit : ";
- X! char txt_opt_thread_arts[] = "10 Thread articles : ";
- X! char txt_opt_show_only_unread[] = "11 Show only unread: ";
- X! char txt_opt_show_author[] = "13 Show author : ";
- X! char txt_opt_process_type[] = "14 Process type : ";
- X! char txt_opt_sort_type[] = "15 Sort article by : ";
- X! char txt_opt_savedir[] = "16 Save directory : ";
- X! char txt_opt_maildir[] = "17 Mail directory : ";
- X! char txt_opt_printer[] = "18 Printer : ";
- X char txt_options_menu[] = "Options Menu";
- X+ char txt_show_from_none[] = "None";
- X+ char txt_show_from_addr[] = "Addr";
- X+ char txt_show_from_name[] = "Name";
- X+ char txt_show_from_both[] = "Both";
- X char txt_post_process_none[] = "None";
- X char txt_post_process_sh[] = "Shell archive";
- X char txt_post_process_uudecode[] = "Uudecode";
- X char txt_post_process_uud_lst_zoo[] = "Uudecode & list zoo archive";
- X char txt_post_process_uud_ext_zoo[] = "Uudecode & extract zoo archive";
- X char txt_sort_by_nothing[] = "Nothing";
- X char txt_sort_by_subj_descend[] = "Subject: field (descending)";
- X char txt_sort_by_subj_ascend[] = "Subject: field (ascending)";
- X***************
- X*** 308,313 ****
- X--- 311,320 ----
- X char txt_help_draw_arrow[] = "Draw -> or highlighted bar for selection. <SPACE> toggles & <CR> sets.";
- X char txt_help_kill_articles[] = "Kill articles that match entries in kill file. <SPACE> toggles & <CR> sets.";
- X char txt_help_mark_saved_read[] = "Mark saved articles/threads as read. <SPACE> toggles & <CR> sets.";
- X+ char txt_help_page_scroll[] = "Scroll half/full page of groups/articles. <SPACE> toggles & <CR> sets.";
- X+ char txt_help_catchup_groups[] = "Ask to mark groups read when quiting. <SPACE> toggles & <CR> sets.";
- X+ char txt_help_thread_arts[] = "Enable/disable threading of articles in all groups. <SPACE> toggles & <CR> sets.";
- X+ char txt_help_show_only_unread[] = "Show all articles or only unread articles. <SPACE> toggles & <CR> sets.";
- X char txt_help_post_proc_type[] = "Post process (ie. unshar) saved article/thread. <SPACE> toggles & <CR> sets.";
- X char txt_help_sort_type[] = "Sort articles by Subject, From or Date fields. <SPACE> toggles & <CR> sets.";
- X char txt_help_savedir[] = "The directory where you want articles/threads saved.";
- X***************
- X*** 379,384 ****
- X */
- X
- X char txt_resizing_window[] = "resizing window";
- X-
- X- #endif
- X
- X--- 386,389 ----
- Xdiff -rcs ../105/lang.h ./lang.h
- X*** ../105/lang.h Thu Oct 10 20:27:16 1991
- X--- ./lang.h Tue Oct 29 19:54:38 1991
- X***************
- 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--- 3,9 ----
- X * Module : lang.h
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 29-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X***************
- X*** 269,282 ****
- X extern char txt_opt_post_process[];
- X extern char txt_opt_print_header[];
- X extern char txt_opt_pos_first_unread[];
- X extern char txt_opt_process_type[];
- X extern char txt_opt_sort_type[];
- X extern char txt_post_process_none[];
- X extern char txt_post_process_sh[];
- X extern char txt_post_process_uudecode[];
- X extern char txt_post_process_uud_lst_zoo[];
- X extern char txt_post_process_uud_ext_zoo[];
- X- extern char txt_post_process_patch[];
- X extern char txt_sort_by_nothing[];
- X extern char txt_sort_by_subj_descend[];
- X extern char txt_sort_by_subj_ascend[];
- X--- 269,289 ----
- X extern char txt_opt_post_process[];
- X extern char txt_opt_print_header[];
- X extern char txt_opt_pos_first_unread[];
- X+ extern char txt_opt_page_scroll[];
- X+ extern char txt_opt_catchup_groups[];
- X+ extern char txt_opt_thread_arts[];
- X+ extern char txt_opt_show_only_unread[];
- X extern char txt_opt_process_type[];
- X extern char txt_opt_sort_type[];
- X+ extern char txt_show_from_none[];
- X+ extern char txt_show_from_addr[];
- X+ extern char txt_show_from_name[];
- X+ extern char txt_show_from_both[];
- X extern char txt_post_process_none[];
- X extern char txt_post_process_sh[];
- X extern char txt_post_process_uudecode[];
- X extern char txt_post_process_uud_lst_zoo[];
- X extern char txt_post_process_uud_ext_zoo[];
- X extern char txt_sort_by_nothing[];
- X extern char txt_sort_by_subj_descend[];
- X extern char txt_sort_by_subj_ascend[];
- X***************
- X*** 296,301 ****
- X--- 303,312 ----
- X extern char txt_help_draw_arrow[];
- X extern char txt_help_kill_articles[];
- X extern char txt_help_mark_saved_read[];
- X+ extern char txt_help_page_scroll[];
- X+ extern char txt_help_catchup_groups[];
- X+ extern char txt_help_thread_arts[];
- X+ extern char txt_help_show_only_unread[];
- X extern char txt_help_post_proc_type[];
- X extern char txt_help_sort_type[];
- X extern char txt_help_savedir[];
- Xdiff -rcs ../105/main.c ./main.c
- X*** ../105/main.c Thu Oct 10 21:00:35 1991
- X--- ./main.c Mon Nov 4 10:01:13 1991
- X***************
- 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--- 3,9 ----
- X * Module : main.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 04-11-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 121,130 ****
- X break;
- X
- X case 'm':
- X- my_strncpy (mailer, optarg, LEN);
- X- break;
- X-
- X- case 'M':
- X my_strncpy (maildir, optarg, LEN);
- X set_real_uid_gid ();
- X if (stat (maildir, &st) == -1) {
- X--- 121,126 ----
- X***************
- X*** 133,138 ****
- X--- 129,140 ----
- X set_tin_uid_gid ();
- X break;
- X
- X+ case 'M': /* mail new news to specified user */
- X+ my_strncpy (mail_news_user, optarg, LEN);
- X+ mail_news = TRUE;
- X+ update = TRUE;
- X+ break;
- X+
- X case 'n':
- X notify_new_groups = TRUE;
- X break;
- X***************
- X*** 224,229 ****
- X--- 226,233 ----
- X read_kill_file ();
- X }
- X
- X+ log_user ();
- X+
- X /*
- X * check/start if any new/unread articles
- X */
- X***************
- X*** 239,252 ****
- X }
- X
- X /*
- X * save any new articles to savedir structure for later reading
- X */
- X! if (save_news) {
- X i = catchup; /* set catchup to FALSE */
- X catchup = FALSE;
- X do_update ();
- X catchup = i; /* set catchup to previous value */
- X! check_start_save_any_news (SAVE_ANY_NEWS);
- X exit (0);
- X }
- X
- X--- 243,262 ----
- X }
- X
- X /*
- X+ * mail any new articles to specified user
- X+ * or
- X * save any new articles to savedir structure for later reading
- X */
- X! if (mail_news || save_news) {
- X i = catchup; /* set catchup to FALSE */
- X catchup = FALSE;
- X do_update ();
- X catchup = i; /* set catchup to previous value */
- X! if (mail_news) {
- X! check_start_save_any_news (MAIL_ANY_NEWS);
- X! } else {
- X! check_start_save_any_news (SAVE_ANY_NEWS);
- X! }
- X exit (0);
- X }
- X
- X***************
- X*** 306,326 ****
- X sprintf (msg, "%s %s PL%d - threaded usenet newsreader. Copyright 1991 Iain Lea.\n", progname, version, PATCHLEVEL);
- X error_message (msg, (char *) 0);
- X error_message ("Usage: %s [options] [newsgroups]", progname);
- X! error_message (" -c mark all articles as read in subscribed newsgroups", (char *) 0);
- X! error_message (" -d dir save articles to directory [default=%s]", savedir);
- X! error_message (" -f file subscribed newsgroups file [default=%s]", newsrc);
- X error_message (" -h help", (char *) 0);
- X! error_message (" -m file mail program [default=%s]", DEFAULT_MAILER);
- X! error_message (" -n notify user of any new newsgroups since last session", (char *) 0);
- X! error_message (" -M dir mailbox directory [default=%s]", maildir);
- X error_message (" -p file print program with options [default=%s]", DEFAULT_PRINTER);
- X error_message (" -r read news remotely from default NNTP server", DEFAULT_PRINTER);
- X error_message (" -s dir spool directory [default=%s]", SPOOLDIR);
- X! error_message (" -S save all new articles for later reading", (char *) 0);
- X! error_message (" -u update index files only", (char *) 0);
- X error_message (" -U fork %s -u to update index files in background", progname);
- X! error_message (" -v update index files only (verbose)", (char *) 0);
- X error_message (" -z start if any unread news", (char *) 0);
- X! error_message (" -Z return status indicating if any unread news", (char *) 0);
- X error_message ("\nMail bug reports/gripes/comments to %s", BUG_REPORT_ADDRESS);
- X }
- X--- 316,337 ----
- X sprintf (msg, "%s %s PL%d - threaded usenet newsreader. Copyright 1991 Iain Lea.\n", progname, version, PATCHLEVEL);
- X error_message (msg, (char *) 0);
- X error_message ("Usage: %s [options] [newsgroups]", progname);
- X! error_message (" -c mark all news as read in subscribed newsgroups (batch mode)", (char *) 0);
- X! error_message (" -d dir directory to use when saving news [default=%s]", savedir);
- X! error_message (" -f file subscribed to newsgroups file [default=%s]", newsrc);
- X error_message (" -h help", (char *) 0);
- X! error_message (" -m dir mailbox directory [default=%s]", maildir);
- X! error_message (" -M user mail new news to specified user (batch mode)", (char *) 0);
- X! error_message (" -n notify user if any new newsgroups were created since last session", (char *) 0);
- X error_message (" -p file print program with options [default=%s]", DEFAULT_PRINTER);
- X error_message (" -r read news remotely from default NNTP server", DEFAULT_PRINTER);
- X+ error_message (" -R read news saved by -S option for later reading", (char *) 0);
- X error_message (" -s dir spool directory [default=%s]", SPOOLDIR);
- X! error_message (" -S save new news for later reading (batch mode)", (char *) 0);
- X! error_message (" -u update index files only (batch mode)", (char *) 0);
- X error_message (" -U fork %s -u to update index files in background", progname);
- X! error_message (" -v verbose output for -c -M -S -u and -Z options (batch mode)", (char *) 0);
- X error_message (" -z start if any unread news", (char *) 0);
- X! error_message (" -Z return status indicating if any unread news (batch mode)", (char *) 0);
- X error_message ("\nMail bug reports/gripes/comments to %s", BUG_REPORT_ADDRESS);
- X }
- Xdiff -rcs ../105/memory.c ./memory.c
- X*** ../105/memory.c Wed Oct 2 20:20:33 1991
- X--- ./memory.c Mon Nov 4 18:40:07 1991
- X***************
- X*** 3,9 ****
- X * Module : memory.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 10-09-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X--- 3,9 ----
- X * Module : memory.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 04-11-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 74,80 ****
- X
- X for (i=0 ; i < top ; i++) {
- X arts[i].artnum = 0L;
- X! arts[i].thread = ART_NORMAL;
- X arts[i].inthread = FALSE;
- X arts[i].unread = ART_UNREAD;
- X arts[i].tagged = FALSE;
- X--- 74,80 ----
- X
- X for (i=0 ; i < top ; i++) {
- X arts[i].artnum = 0L;
- X! arts[i].thread = ART_EXPIRED;
- X arts[i].inthread = FALSE;
- X arts[i].unread = ART_UNREAD;
- X arts[i].tagged = FALSE;
- X***************
- X*** 262,267 ****
- X--- 262,268 ----
- X
- X save_num = 0;
- X }
- X+
- X
- X char *my_malloc (size)
- X unsigned size;
- Xdiff -rcs ../105/misc.c ./misc.c
- X*** ../105/misc.c Tue Oct 15 09:40:50 1991
- X--- ./misc.c Mon Nov 4 13:24:43 1991
- X***************
- 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--- 3,9 ----
- X * Module : misc.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 04-11-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 45,50 ****
- X--- 45,51 ----
- X char page_header[LEN]; /* page header of pgm name and version */
- X char savedir[LEN]; /* directory to save articles to */
- X char spooldir[LEN]; /* directory where new is */
- X+ char mail_news_user[LEN]; /* mail new news to this user address */
- X char mailer[LEN]; /* mail program */
- X char maildir[LEN]; /* mailbox dir where = saves are stored */
- X char mailbox[LEN]; /* system mailbox for each user */
- X***************
- X*** 52,71 ****
- X char article[LEN]; /* ~/.article file */
- X char dead_article[LEN]; /* ~/dead.article file */
- X char progname[LEN]; /* program name */
- X! int sort_art_type; /* sort arts[] array by subject,from or date field */
- X! int save_separate; /* save a each part of a thread to a separate file */
- X! int save_archive_name; /* save thread with name from Archive-name: field */
- X! int print_header; /* print all of mail header or just Subject: & From lines */
- X! int pos_first_unread; /* position cursor at first/last unread article */
- X! int show_author; /* show Subject & From or only Subject in group menu */
- X int draw_arrow_mark; /* draw -> or highlighted bar */
- X int kill_articles; /* kill articles matching kill file contents */
- X int mark_saved_read; /* mark saved article/thread as read */
- X int post_proc_type; /* type of post processing to be performed */
- X! int default_printer; /* set to false if user give a printer with -p switch */
- X int save_news; /* save all arts to savedir structure */
- X int thread_arts; /* thread/unthread articles for viewing */
- X! int num_of_tagged_files;
- X
- X /*
- X * init_selfinfo
- X--- 53,77 ----
- X char article[LEN]; /* ~/.article file */
- X char dead_article[LEN]; /* ~/dead.article file */
- X char progname[LEN]; /* program name */
- X! int catchup_read_groups; /* ask if read groups are to be marked read */
- X! int default_printer; /* set to false if user give a printer with -p switch */
- X int draw_arrow_mark; /* draw -> or highlighted bar */
- X+ int full_page_scroll; /* page half/full screen of articles/groups */
- X int kill_articles; /* kill articles matching kill file contents */
- X int mark_saved_read; /* mark saved article/thread as read */
- X+ int num_of_tagged_files;
- X+ int pos_first_unread; /* position cursor at first/last unread article */
- X int post_proc_type; /* type of post processing to be performed */
- X! int print_header; /* print all of mail header or just Subject: & From lines */
- X! int save_archive_name; /* save thread with name from Archive-name: field */
- X! int mail_news; /* mail all arts to specified user */
- X int save_news; /* save all arts to savedir structure */
- X+ int save_separate; /* save a each part of a thread to a separate file */
- X+ int show_author; /* show Subject & From or only Subject in group menu */
- X+ int show_only_unread; /* show only new/unread arts or all arts */
- X+ int sort_art_type; /* sort arts[] array by subject,from or date field */
- X int thread_arts; /* thread/unthread articles for viewing */
- X! struct passwd *myentry;
- X
- X /*
- X * init_selfinfo
- X***************
- X*** 82,88 ****
- 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--- 88,93 ----
- X***************
- X*** 93,104 ****
- X
- X strcpy (userid, myentry->pw_name);
- X
- X! if ((p = getenv("HOME")) != NULL) {
- X strcpy (homedir, p);
- X } else {
- X strcpy (homedir, myentry->pw_dir);
- X }
- X
- X #ifdef USE_INVERSE_HACK
- X draw_arrow_mark = TRUE;
- X #else
- X--- 98,110 ----
- X
- X strcpy (userid, myentry->pw_name);
- X
- X! if ((p = getenv ("HOME")) != NULL) {
- X strcpy (homedir, p);
- X } else {
- X strcpy (homedir, myentry->pw_dir);
- X }
- X
- X+ catchup_read_groups = TRUE;
- X #ifdef USE_INVERSE_HACK
- X draw_arrow_mark = TRUE;
- X #else
- X***************
- X*** 109,114 ****
- X--- 115,121 ----
- X #else
- X default_printer = FALSE;
- X #endif
- X+ full_page_scroll = TRUE;
- X kill_articles = FALSE;
- X mark_saved_read = TRUE;
- X num_of_tagged_files = 0;
- X***************
- X*** 117,123 ****
- X print_header = FALSE;
- X save_separate = TRUE;
- X save_archive_name = TRUE;
- X! show_author = TRUE;
- X sort_art_type = SORT_BY_NOTHING;
- X save_news = FALSE;
- X thread_arts = TRUE;
- X--- 124,131 ----
- X print_header = FALSE;
- X save_separate = TRUE;
- X save_archive_name = TRUE;
- X! show_author = SHOW_FROM_NAME;
- X! show_only_unread = FALSE;
- X sort_art_type = SORT_BY_NOTHING;
- X save_news = FALSE;
- X thread_arts = TRUE;
- X***************
- X*** 359,365 ****
- X }
- X }
- X
- X! error_message (txt_cannot_find_base_art, (char *) atoi (n));
- X return -1;
- X }
- X
- X--- 367,374 ----
- X }
- X }
- X
- X! sprintf (msg, "%d", n);
- X! error_message (txt_cannot_find_base_art, msg);
- X return -1;
- X }
- X
- X***************
- X*** 503,508 ****
- X--- 512,518 ----
- X center_line (0, TRUE, msg);
- X MoveCursor (INDEX_TOP, 0);
- X
- X+ EndWin ();
- X Raw (FALSE);
- X
- X set_real_uid_gid ();
- X***************
- X*** 522,527 ****
- X--- 532,538 ----
- X set_tin_uid_gid ();
- X
- X Raw (TRUE);
- X+ InitWin ();
- X
- X mail_setup ();
- X
- X***************
- X*** 543,571 ****
- X /*
- X * check if any groups were read & ask if they should marked read
- X */
- X! for (i = 0 ; i < local_top ; i++) {
- X! if (active[my_group[i]].read) {
- X! if (ask) {
- X! if (prompt_yn (LINES, "Catchup all groups entered during this session? (y/n): ", 'n')) {
- X! ask = FALSE;
- X! thread_arts = FALSE; /* speeds up index loading */
- X! } else {
- X! break;
- X }
- X! }
- X! sprintf (msg, "Catchup %s...", active[my_group[i]].name);
- X! wait_message (msg);
- X! strcpy (group_path, active[my_group[i]].name);
- X! for (p = group_path; *p; p++) {
- X! if (*p == '.') {
- X! *p = '/';
- X }
- X }
- X- index_group (active[my_group[i]].name, group_path);
- X- for (j = 0; j < top; j++) {
- X- arts[j].unread = ART_READ;
- X- }
- X- update_newsrc (active[my_group[i]].name, my_group[i], FALSE);
- X }
- X }
- X nntp_finish (); /* disconnect from NNTP server */
- X--- 554,584 ----
- X /*
- X * check if any groups were read & ask if they should marked read
- X */
- X! if (catchup_read_groups) {
- X! for (i = 0 ; i < local_top ; i++) {
- X! if (active[my_group[i]].read) {
- X! if (ask) {
- X! if (prompt_yn (LINES, "Catchup all groups entered during this session? (y/n): ", 'n')) {
- X! ask = FALSE;
- X! thread_arts = FALSE; /* speeds up index loading */
- X! } else {
- X! break;
- X! }
- X }
- X! sprintf (msg, "Catchup %s...", active[my_group[i]].name);
- X! wait_message (msg);
- X! strcpy (group_path, active[my_group[i]].name);
- X! for (p = group_path; *p; p++) {
- X! if (*p == '.') {
- X! *p = '/';
- X! }
- X }
- X+ index_group (active[my_group[i]].name, group_path);
- X+ for (j = 0; j < top; j++) {
- X+ arts[j].unread = ART_READ;
- X+ }
- X+ update_newsrc (active[my_group[i]].name, my_group[i], FALSE);
- X }
- X }
- X }
- X nntp_finish (); /* disconnect from NNTP server */
- X***************
- X*** 844,849 ****
- X--- 857,863 ----
- X void (*susp)();
- X #endif
- X
- X+ EndWin ();
- X Raw (FALSE);
- X set_real_uid_gid ();
- X
- X***************
- X*** 860,866 ****
- X--- 874,882 ----
- X #endif
- X
- X set_tin_uid_gid ();
- X+
- X Raw (TRUE);
- X+ InitWin ();
- X
- X return ret == 0;
- X }
- X***************
- X*** 894,904 ****
- 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! if (setegid (real_gid) == -1) {
- X! error_message ("Error setegid(real) failed", (char *) 0);
- X }
- X #else
- X if (setuid (real_uid) == -1) {
- X--- 910,920 ----
- X void set_real_uid_gid ()
- X {
- X #if defined(BSD) && ! defined(SINIX)
- X! if (setreuid (tin_uid, real_uid) == -1) {
- X! error_message ("Error setreuid(real) failed", (char *) 0);
- X }
- X! if (setregid (tin_gid, real_gid) == -1) {
- X! error_message ("Error setregid(real) failed", (char *) 0);
- X }
- X #else
- X if (setuid (real_uid) == -1) {
- X***************
- X*** 914,924 ****
- 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 }
- X! if (setegid (tin_gid) == -1) {
- X! error_message ("Error setegid(tin) failed", (char *) 0);
- X }
- X #else
- X if (setuid (tin_uid) == -1) {
- X--- 930,940 ----
- X void set_tin_uid_gid ()
- X {
- X #if defined(BSD) && ! defined(SINIX)
- X! if (setreuid (real_uid, tin_uid) == -1) {
- X! error_message ("Error setreuid(tin) failed", (char *) 0);
- X }
- X! if (setregid (real_gid, tin_gid) == -1) {
- X! error_message ("Error setregid(tin) failed", (char *) 0);
- X }
- X #else
- X if (setuid (tin_uid) == -1) {
- X***************
- X*** 1069,1071 ****
- X--- 1085,1260 ----
- X
- X return FALSE;
- X }
- X+
- X+ /*
- X+ * Parse various From: lines into the component mail addresses and
- X+ * real names
- X+ */
- X+
- X+ void parse_from (str, addr, name)
- X+ char *str;
- X+ char *addr;
- X+ char *name;
- X+ {
- X+ register c;
- X+ register char *cp, *ncp;
- X+ int gotlt, lastsp, level;
- X+
- X+ gotlt = 0;
- X+ lastsp = 0;
- X+ cp = addr;
- X+ ncp = name;
- X+ while (*str == ' ')
- X+ ++str;
- X+ while (c = *str++)
- X+ switch (c) {
- X+ case '(':
- X+ ncp = name;
- X+ level = 1;
- X+ while (*str != '\0' && level) {
- X+ switch (c = *str++) {
- X+ case '(':
- X+ *ncp++ = c;
- X+ level++;
- X+ break;
- X+ case ')':
- X+ level--;
- X+ if (level > 0)
- X+ *ncp++ = c;
- X+ break;
- X+ default:
- X+ *ncp++ = c;
- X+ break;
- X+ }
- X+ }
- X+ if (*str)
- X+ str++;
- X+ lastsp = 0;
- X+ break;
- X+ case ' ':
- X+ if (str[0] == 'a' && str[1] == 't' && str[2] == ' ')
- X+ str += 3, *cp++ = '@';
- X+ else if (str[0] == '@' && str[1] == ' ')
- X+ str += 2, *cp++ = '@';
- X+ else
- X+ lastsp = 1;
- X+ if (ncp > name)
- X+ *ncp++ = ' ';
- X+ break;
- X+ case '<':
- X+ cp = addr;
- X+ gotlt++;
- X+ lastsp = 0;
- X+ break;
- X+ case '>':
- X+ if (gotlt)
- X+ goto done;
- X+ /* FALL THROUGH CASE */
- X+ default:
- X+ if (lastsp) {
- X+ lastsp = 0;
- X+ *cp++ = ' ';
- X+ }
- X+ *cp++ = c;
- X+ if (! gotlt)
- X+ *ncp++ = c;
- X+ break;
- X+ }
- X+ done:
- X+ *cp = 0;
- X+ while (ncp>name && ncp[-1]==' ')
- X+ --ncp;
- X+ *ncp = 0;
- X+ if (*addr == '@') {
- X+ char buf [512];
- X+
- X+ strcpy (buf, addr);
- X+ strcpy (addr, "root");
- X+ strcat (addr, buf);
- X+ }
- X+ }
- X+
- X+ /*
- X+ * Convert a string to a long, only look at first n characters
- X+ */
- X+
- X+ long my_atol (s, n)
- X+ char *s;
- X+ int n;
- X+ {
- X+ long ret = 0;
- X+
- X+ while (*s && n--) {
- X+ if (*s >= '0' && *s <= '9')
- X+ ret = ret * 10 + (*s - '0');
- X+ else
- X+ return -1;
- X+ s++;
- X+ }
- X+
- X+ return ret;
- X+ }
- X+
- X+ /*
- X+ * Return a pointer into s eliminating any leading Re:'s. Example:
- X+ *
- X+ * Re: Reorganization of misc.jobs
- X+ * ^ ^
- X+ */
- X+
- X+ char *eat_re (s)
- X+ char *s;
- X+ {
- X+
- X+ while (*s == 'r' || *s == 'R') {
- X+ if ((*(s+1) == 'e' || *(s+1) == 'E')) {
- X+ if (*(s+2) == ':')
- X+ s += 3;
- X+ else if (*(s+2) == '^' && isdigit(*(s+3)) && *(s+4) == ':')
- X+ s += 5; /* hurray nn */
- X+ else
- X+ break;
- X+ } else
- X+ break;
- X+ while (*s == ' ')
- X+ s++;
- X+ }
- X+
- X+ return s;
- X+ }
- X+
- X+ /*
- X+ * Hash the subjects (after eating the Re's off) for a quicker
- X+ * thread search later. We store the hashes for subjects in the
- X+ * index file for speed.
- X+ */
- X+
- X+ long hash_s (s)
- X+ char *s;
- X+ {
- X+ long h = 0;
- X+ unsigned char *t = (unsigned char *) s;
- X+
- X+ while (*t)
- X+ h = h * 64 + *t++;
- X+
- X+ return h;
- X+ }
- X+
- X+ /*
- X+ * strncpy that stops at a newline and null terminates
- X+ */
- X+
- X+ void my_strncpy(p, q, n)
- X+ char *p;
- X+ char *q;
- X+ int n;
- X+ {
- X+ while (n--) {
- X+ if (! *q || *q == '\n')
- X+ break;
- X+ *p++ = *q++;
- X+ }
- X+ *p = '\0';
- X+ }
- X+
- Xdiff -rcs ../105/newsrc.c ./newsrc.c
- X*** ../105/newsrc.c Wed Oct 2 20:20:33 1991
- X--- ./newsrc.c Fri Oct 25 19:47:48 1991
- X***************
- X*** 3,9 ****
- X * Module : newsrc.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 : newsrc.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 25-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 267,273 ****
- X if (c != '\0')
- X *p++ = '\0';
- X
- X! if (c != '!')
- X c = ':';
- X
- X if (strcmp (buf, group) == 0) {
- X--- 267,273 ----
- X if (c != '\0')
- X *p++ = '\0';
- X
- X! if (c != '!' && c != ' ')
- X c = ':';
- X
- X if (strcmp (buf, group) == 0) {
- XFiles ../105/nntp.h and ./nntp.h are identical
- Xdiff -rcs ../105/open.c ./open.c
- X*** ../105/open.c Tue Oct 8 20:14:41 1991
- X--- ./open.c Mon Nov 4 11:26:55 1991
- X***************
- X*** 3,9 ****
- X * Module : open.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 02-10-91
- X * Release : 1.0
- X * Notes : reads news locally (/usr/spool/news) or via NNTP
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X--- 3,9 ----
- X * Module : open.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 25-10-91
- X * Release : 1.0
- SHAR_EOF
- echo "End of tin part 2"
- echo "File tin.patch06 is continued in part 3"
- echo "3" > shar3_seq_.tmp
- exit 0
-
- --
- Dr. med. dipl.-math Dieter Becker Tel.: (0 / +49) 6841 - 16 3046
- Medizinische Universitaets- und Poliklinik Fax.: (0 / +49) 6841 - 16 3369
- Innere Medizin III
- D - 6650 Homburg / Saar Email: becker@med-in.uni-sb.de
- 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.
-