home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-29 | 53.8 KB | 1,985 lines |
- Newsgroups: comp.sources.misc
- From: iain@estevax.uucp (Iain J. Lea)
- Subject: v26i078: tin - threaded full screen newsreader, Patch06c/5
- Message-ID: <1991Nov30.023959.14553@sparky.imd.sterling.com>
- X-Md4-Signature: e7239bb027bcf169bba9a34181e4b070
- Date: Sat, 30 Nov 1991 02:39:59 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: iain@estevax.uucp (Iain J. Lea)
- Posting-number: Volume 26, Issue 78
- Archive-name: tin/patch06c
- Environment: BSD, SCO, ISC, SUNOS, SYSVR3, SYSVR4, ULTRIX, XENIX
- Patch-To: tin: Volume 23, Issue 15-23
-
- #!/bin/sh
- # this is patch06.shar.03 (part 3 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" != 3; 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 * Notes : reads news locally (/usr/spool/news) or via NNTP
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 240,246 ****
- X
- X /*
- X * Read the article numbers existing in a group's spool directory
- X! * into base[] and sort them. base_top is one past top.
- X */
- X
- X void setup_base (group, group_path)
- X--- 240,246 ----
- X
- X /*
- X * Read the article numbers existing in a group's spool directory
- X! * into base[] and sort them. top_base is one past top.
- X */
- X
- X void setup_base (group, group_path)
- X***************
- X*** 262,270 ****
- X sprintf (buf, "group %s", group);
- X put_server (buf);
- X
- X! if (get_server(line, NNTP_STRLEN) == -1) {
- X! fprintf(stderr, txt_connection_to_server_broken);
- X! tin_done(1);
- X }
- X
- X if (atoi(line) != OK_GROUP) {
- X--- 262,270 ----
- X sprintf (buf, "group %s", group);
- X put_server (buf);
- X
- X! if (get_server (line, NNTP_STRLEN) == -1) {
- X! fprintf (stderr, txt_connection_to_server_broken);
- X! tin_done (1);
- X }
- X
- X if (atoi(line) != OK_GROUP) {
- X***************
- X*** 313,319 ****
- X * get a response code from the server and return it to the caller
- X */
- X
- X! int get_respcode()
- X {
- X #ifdef USE_NNTP
- X char line[NNTP_STRLEN];
- X--- 313,319 ----
- X * get a response code from the server and return it to the caller
- X */
- X
- X! int get_respcode ()
- X {
- X #ifdef USE_NNTP
- X char line[NNTP_STRLEN];
- X***************
- X*** 375,392 ****
- X
- X FILE *nntp_to_fp ()
- X {
- X char fnam[LEN];
- X! FILE *fp;
- X
- X! if (! stuff_nntp (fnam))
- X return NULL;
- X
- X if ((fp = fopen (fnam, "r")) == NULL) {
- X error_message (txt_nntp_to_fp_cannot_reopen, fnam);
- X return NULL;
- X }
- X unlink (fnam);
- X return fp;
- X }
- X
- X
- X--- 375,402 ----
- X
- X FILE *nntp_to_fp ()
- X {
- X+ #ifdef USE_NNTP
- X char fnam[LEN];
- X! static FILE *fp = NULL;
- X
- X! if (fp != NULL) {
- X! fclose (fp);
- X! }
- X!
- X! if (! stuff_nntp (fnam)) {
- X return NULL;
- X+ }
- X
- X if ((fp = fopen (fnam, "r")) == NULL) {
- X error_message (txt_nntp_to_fp_cannot_reopen, fnam);
- X return NULL;
- X }
- X+
- X unlink (fnam);
- X return fp;
- X+ #else
- X+ return NULL;
- X+ #endif
- X }
- X
- X
- X***************
- X*** 394,409 ****
- X {
- X #ifdef USE_NNTP
- X char fnam[LEN];
- X! int fd;
- X
- X! if (! stuff_nntp (fnam))
- X return -1;
- X
- X if ((fd = open (fnam, 0)) == -1) {
- X error_message (txt_nntp_to_fd_cannot_reopen, fnam);
- X return -1;
- X }
- X unlink (fnam);
- X return fd;
- X #endif
- X }
- X--- 404,427 ----
- X {
- X #ifdef USE_NNTP
- X char fnam[LEN];
- X! static int fd = -1;
- X
- X! if (fd != -1) {
- X! close (fd);
- X! }
- X!
- X! if (! stuff_nntp (fnam)) {
- X return -1;
- X+ }
- X
- X if ((fd = open (fnam, 0)) == -1) {
- X error_message (txt_nntp_to_fd_cannot_reopen, fnam);
- X return -1;
- X }
- X+
- X unlink (fnam);
- X return fd;
- X+ #else
- X+ return -1;
- X #endif
- X }
- Xdiff -rcs ../105/page.c ./page.c
- X*** ../105/page.c Thu Oct 10 20:40:47 1991
- X--- ./page.c Mon Nov 4 17:56:18 1991
- X***************
- 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--- 3,9 ----
- X * Module : page.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*** 22,28 ****
- X char note_h_path[LEN]; /* Path: */
- X char note_h_date[LEN]; /* Date: */
- X char note_h_subj[LEN]; /* Subject: */
- X- char note_h_from[LEN]; /* From: */
- X char note_h_org[LEN]; /* Organization: */
- X char note_h_newsgroups[LEN]; /* Newsgroups: */
- X char note_h_messageid[LEN]; /* Message-ID: */
- X--- 22,27 ----
- X***************
- X*** 29,36 ****
- X char note_h_distrib[LEN]; /* Distribution: */
- X char note_h_followup[LEN]; /* Followup-To: */
- X
- X- char note_full_name[100];
- X- char note_from_addr[100];
- X char *glob_page_group;
- X
- X FILE *note_fp; /* the body of the current article */
- X--- 28,33 ----
- X***************
- X*** 417,423 ****
- X if (kill_state == NO_KILLING &&
- X sort_art_type != old_sort_art_type) {
- X make_threads (TRUE);
- X! find_base ();
- X }
- X if (kill_state == KILLING) {
- X old_top = top;
- X--- 414,420 ----
- X if (kill_state == NO_KILLING &&
- X sort_art_type != old_sort_art_type) {
- X make_threads (TRUE);
- X! find_base (show_only_unread);
- X }
- X if (kill_state == KILLING) {
- X old_top = top;
- X***************
- X*** 536,547 ****
- X break;
- X
- X case 'r': /* reply to author through mail */
- X! mail_to_author (FALSE);
- X redraw_page (respnum, group);
- X break;
- X
- X case 'R': /* reply to author, copy text */
- X! mail_to_author (TRUE);
- X redraw_page (respnum, group);
- X break;
- X
- X--- 533,544 ----
- X break;
- X
- X case 'r': /* reply to author through mail */
- X! mail_to_author (respnum, FALSE);
- X redraw_page (respnum, group);
- X break;
- X
- X case 'R': /* reply to author, copy text */
- X! mail_to_author (respnum, TRUE);
- X redraw_page (respnum, group);
- X break;
- X
- X***************
- X*** 639,644 ****
- X--- 636,642 ----
- X int i, j;
- X int ctrl_L; /* form feed character detected */
- X long tmp_pos;
- X+
- X ClearScreen ();
- X
- X note_line = 1;
- X***************
- X*** 657,663 ****
- X
- X ctrl_L = FALSE;
- X while (note_line < LINES) {
- X! if (fgets(buf, sizeof buf, note_fp) == NULL) {
- X note_end = TRUE;
- X break;
- X }
- X--- 655,661 ----
- X
- X ctrl_L = FALSE;
- X while (note_line < LINES) {
- X! if (fgets (buf, sizeof (buf), note_fp) == NULL) {
- X note_end = TRUE;
- X break;
- X }
- X***************
- X*** 664,671 ****
- X
- X buf[LEN-1] = '\0';
- X if (rotate)
- X! for (p = buf, q = buf2;
- X! *p && *p != '\n' && q<&buf2[LEN]; p++) {
- X if (*p == '\b' && q > buf2) {
- X q--;
- X } else if (*p == 12) { /* ^L */
- X--- 662,668 ----
- X
- X buf[LEN-1] = '\0';
- X if (rotate)
- X! for (p = buf, q = buf2; *p && *p != '\n' && q < &buf2[LEN]; p++) {
- X if (*p == '\b' && q > buf2) {
- X q--;
- X } else if (*p == 12) { /* ^L */
- X***************
- X*** 689,696 ****
- X *q++ = *p;
- X }
- X else
- X! for (p = buf, q = buf2;
- X! *p && *p != '\n' && q<&buf2[LEN]; p++) {
- X if (*p == '\b' && q > buf2) {
- X q--;
- X } else if (*p == 12) { /* ^L */
- X--- 686,692 ----
- X *q++ = *p;
- X }
- X else
- X! for (p = buf, q = buf2; *p && *p != '\n' && q < &buf2[LEN]; p++) {
- X if (*p == '\b' && q > buf2) {
- X q--;
- X } else if (*p == 12) { /* ^L */
- X***************
- X*** 814,832 ****
- X printf (txt_x_resp, x_resp);
- X }
- X
- X! if (*note_h_org)
- X! sprintf (tmp, txt_s_at_s, note_full_name, note_h_org);
- X! else
- X! strcpy (tmp, note_full_name);
- X
- X! tmp[LEN] = '\0';
- X
- X! sprintf (buf, "%s ", note_from_addr);
- X
- X pos = COLS - 1 - (int) strlen(tmp);
- X if ((int) strlen (buf) + (int) strlen (tmp) >= COLS - 1) {
- X strncat (buf, tmp, COLS - 1 - (int) strlen(buf));
- X! buf[COLS - 1] = '\0';
- X } else {
- X for (i = strlen(buf); i < pos; i++)
- X buf[i] = ' ';
- X--- 810,833 ----
- X printf (txt_x_resp, x_resp);
- X }
- X
- X! if (*note_h_org) {
- X! if (strcmp (arts[respnum].from, arts[respnum].name) == 0) {
- X! strcpy (tmp, note_h_org);
- X! } else {
- X! sprintf (tmp, txt_s_at_s, arts[respnum].name, note_h_org);
- X! }
- X! } else {
- X! strcpy (tmp, arts[respnum].name);
- X! }
- X
- X! tmp[LEN-1] = '\0';
- X
- X! sprintf (buf, "%s ", arts[respnum].from);
- X
- X pos = COLS - 1 - (int) strlen(tmp);
- X if ((int) strlen (buf) + (int) strlen (tmp) >= COLS - 1) {
- X strncat (buf, tmp, COLS - 1 - (int) strlen(buf));
- X! buf[COLS-1] = '\0';
- X } else {
- X for (i = strlen(buf); i < pos; i++)
- X buf[i] = ' ';
- X***************
- X*** 886,892 ****
- X return;
- X }
- X
- X- note_h_from[0] = '\0';
- X note_h_path[0] = '\0';
- X note_h_subj[0] = '\0';
- X note_h_org[0] = '\0';
- X--- 887,892 ----
- X***************
- X*** 907,915 ****
- X
- X if (*buf == '\0')
- X break;
- X!
- X if (match_header (buf, "From", note_h_from, LEN))
- X continue;
- X if (match_header (buf, "Path", note_h_path, LEN))
- X continue;
- X if (match_header (buf, "Subject", note_h_subj, LEN))
- X--- 907,916 ----
- X
- X if (*buf == '\0')
- X break;
- X! /*
- X if (match_header (buf, "From", note_h_from, LEN))
- X continue;
- X+ */
- X if (match_header (buf, "Path", note_h_path, LEN))
- X continue;
- X if (match_header (buf, "Subject", note_h_subj, LEN))
- X***************
- X*** 933,939 ****
- X--- 934,942 ----
- X note_page = 0;
- X note_mark[0] = ftell (note_fp);
- X
- X+ /*
- X parse_from (note_h_from, note_from_addr, note_full_name);
- X+ */
- X note_end = FALSE;
- X
- X return;
- X***************
- X*** 942,949 ****
- X
- X void art_close ()
- X {
- X! if (note_page != NOTE_UNAVAIL)
- X fclose (note_fp);
- X }
- X
- X
- X--- 945,954 ----
- X
- X void art_close ()
- X {
- X! if (note_fp && note_page != NOTE_UNAVAIL) {
- X fclose (note_fp);
- X+ note_fp = (FILE *) 0;
- X+ }
- X }
- X
- X
- X***************
- X*** 980,1021 ****
- X
- X return j;
- X }
- 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- char *p;
- X-
- X- for (p=str ; *p ; p++) {
- X- if (((*p) & 0xFF) < ' ')
- X- *p = ' ';
- X- }
- X-
- X- while (*str && *str != ' ')
- X- *addr++ = *str++;
- X- *addr = '\0';
- X- if (*str++ == ' ') {
- X- if (*str++ == '(') {
- X- if (*str == '"')
- X- str++; /* Kill "quotes around names" */
- X- /* But don't touch quotes inside the */
- X- /* Name (that's what that nonsense */
- X- /* below is for */
- X- while (*str && *str != ')' && !(*str=='"'&&str[1]==')'))
- X- *name++ = *str++;
- X- }
- X- }
- X- *name = '\0';
- X- }
- X-
- X
- X /*
- X * Find the previous response. Go to the last response in the previous
- X--- 985,990 ----
- Xdiff -rcs ../105/patchlevel.h ./patchlevel.h
- X*** ../105/patchlevel.h Wed Oct 2 20:21:38 1991
- X--- ./patchlevel.h Mon Nov 4 19:12:08 1991
- X***************
- X*** 1 ****
- X! #define PATCHLEVEL 5
- X--- 1 ----
- X! #define PATCHLEVEL 6
- Xdiff -rcs ../105/post.c ./post.c
- X*** ../105/post.c Wed Oct 16 20:32:39 1991
- X--- ./post.c Thu Oct 31 18:21:59 1991
- X***************
- X*** 3,9 ****
- X * Module : post.c
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 16-10-91
- X * Release : 1.0
- X * Notes : mailing/posting/replying/followup & cancel article routines
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X--- 3,9 ----
- X * Module : post.c
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 31-10-91
- X * Release : 1.0
- X * Notes : mailing/posting/replying/followup & cancel article routines
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 17,30 ****
- X
- X extern char note_h_distrib[LEN]; /* Distribution: */
- X extern char note_h_followup[LEN]; /* Followup-To: */
- X- extern char note_h_from[LEN]; /* From: */
- X extern char note_h_messageid[LEN]; /* Message-ID: */
- X extern char note_h_newsgroups[LEN]; /* Newsgroups: */
- X extern char note_h_subj[LEN]; /* Subject: */
- X
- X- extern char note_from_addr[100];
- X- extern char note_full_name[100];
- X-
- X extern FILE *note_fp; /* the body of the current article */
- X
- X extern long note_mark[MAX_PAGES]; /* ftells on beginnings of pages */
- X--- 17,26 ----
- X***************
- X*** 203,208 ****
- X--- 199,205 ----
- X switch (ch) {
- X case 'e':
- X invoke_editor (article);
- X+ set_real_uid_gid ();
- X redraw_screen = TRUE;
- X break;
- X
- X***************
- X*** 321,328 ****
- X fprintf (fp, "\n");
- X
- X if (respnum) { /* if "copy_text" */
- X! if (note_h_from[0]) {
- X! fprintf (fp, txt_writes, note_h_from);
- X }
- X fseek (note_fp, note_mark[0], 0);
- X copy_fp (note_fp, fp, DEFAULT_COMMENT);
- X--- 318,325 ----
- X fprintf (fp, "\n");
- X
- X if (respnum) { /* if "copy_text" */
- X! if (arts[respnum].from != (char *) 0) {
- X! fprintf (fp, txt_writes, arts[respnum].from, arts[respnum].from);
- X }
- X fseek (note_fp, note_mark[0], 0);
- X copy_fp (note_fp, fp, DEFAULT_COMMENT);
- X***************
- X*** 336,341 ****
- X--- 333,339 ----
- X switch (ch) {
- X case 'e':
- X invoke_editor (article);
- X+ set_real_uid_gid ();
- X redraw_screen = TRUE;
- X break;
- X
- X***************
- X*** 485,490 ****
- X--- 483,489 ----
- X {
- X char nam[100];
- X FILE *fp;
- X+ FILE *fp_uname;
- X char ch;
- X char ch_default = 's';
- X char buf[LEN];
- X***************
- X*** 515,523 ****
- X fprintf (fp, "Reply-To: %s\n", reply_to);
- X start_line_offset++;
- X }
- X! fprintf (fp, "\nPlease enter the following information:\n");
- X! fprintf (fp, "1) machine:\n");
- X! fprintf (fp, "2) os type:\n");
- X fprintf (fp, "\nPlease enter bug/gripe/comment report:\n");
- X
- X add_signature (fp, TRUE);
- X--- 514,533 ----
- X fprintf (fp, "Reply-To: %s\n", reply_to);
- X start_line_offset++;
- X }
- X!
- X! if ((fp_uname = popen ("uname -a", "r")) != NULL) {
- X! fgets (buf, sizeof (buf), fp_uname);
- X! fclose (fp_uname);
- X! }
- X!
- X! if (strlen (buf)) {
- X! fprintf (fp, "\n%s", buf);
- X! start_line_offset += 2;
- X! } else {
- X! fprintf (fp, "\nPlease enter the following information:\n");
- X! fprintf (fp, "1) machine:\n");
- X! fprintf (fp, "2) os type:\n");
- X! }
- X fprintf (fp, "\nPlease enter bug/gripe/comment report:\n");
- X
- X add_signature (fp, TRUE);
- X***************
- X*** 569,575 ****
- X }
- X
- X
- X! int mail_to_author (copy_text)
- X int copy_text;
- X {
- X char buf[LEN];
- X--- 579,586 ----
- X }
- X
- X
- X! int mail_to_author (respnum, copy_text)
- X! int respnum;
- X int copy_text;
- X {
- X char buf[LEN];
- X***************
- X*** 593,599 ****
- X }
- X chmod (nam, 0600);
- X
- X! fprintf (fp, "To: %s%s (%s)\n", note_from_addr, add_addr, note_full_name);
- X fprintf (fp, "Subject: Re: %s\n", eat_re(note_h_subj) );
- X fprintf (fp, "Newsgroups: %s\n", note_h_newsgroups);
- X if (*my_org) {
- X--- 604,611 ----
- X }
- X chmod (nam, 0600);
- X
- X! fprintf (fp, "To: %s%s (%s)\n",
- X! arts[respnum].from, add_addr, arts[respnum].name);
- X fprintf (fp, "Subject: Re: %s\n", eat_re(note_h_subj) );
- X fprintf (fp, "Newsgroups: %s\n", note_h_newsgroups);
- X if (*my_org) {
- X***************
- X*** 631,637 ****
- X return (redraw_screen);
- X
- X case 's':
- X! strcpy (mail_to, note_from_addr);
- X find_new_to (nam, mail_to);
- X sprintf (msg, txt_mailing_to, mail_to);
- X wait_message (msg);
- X--- 643,649 ----
- X return (redraw_screen);
- X
- X case 's':
- X! strcpy (mail_to, arts[respnum].from);
- X find_new_to (nam, mail_to);
- X sprintf (msg, txt_mailing_to, mail_to);
- X wait_message (msg);
- X***************
- X*** 766,771 ****
- X--- 778,784 ----
- X switch (ch) {
- X case 'e':
- X invoke_editor (cancel);
- X+ set_real_uid_gid ();
- X redraw_screen = TRUE;
- X break;
- X
- X***************
- X*** 795,803 ****
- X return (redraw_screen);
- X }
- X
- X! int
- X! submit_file(name)
- X! char* name;
- X {
- X char buf[LEN];
- X char* cp = buf;
- X--- 808,815 ----
- X return (redraw_screen);
- X }
- X
- X! int submit_file(name)
- X! char *name;
- X {
- X char buf[LEN];
- X char* cp = buf;
- X***************
- X*** 808,819 ****
- X cp = &buf[strlen(buf)];
- X #endif
- X
- X! if (debug)
- X sprintf (cp, "inews -h < %s", name);
- X! else
- X sprintf (cp, "inews -h < %s > /dev/null 2>&1", name);
- X!
- X! if (invoke_cmd(buf))
- X return TRUE;
- X return FALSE;
- X }
- X--- 820,835 ----
- X cp = &buf[strlen(buf)];
- X #endif
- X
- X! if (debug) {
- X sprintf (cp, "inews -h < %s", name);
- X! } else {
- X sprintf (cp, "inews -h < %s > /dev/null 2>&1", name);
- X! }
- X!
- X! if (invoke_cmd(buf)) {
- X! set_real_uid_gid ();
- X return TRUE;
- X+ }
- X+ set_real_uid_gid ();
- X return FALSE;
- X }
- XFiles ../105/prompt.c and ./prompt.c are identical
- Xdiff -rcs ../105/proto.h ./proto.h
- X*** ../105/proto.h Wed Oct 16 19:52:10 1991
- X--- ./proto.h Thu Oct 31 18:36:04 1991
- X***************
- X*** 2,8 ****
- X
- X /* art.c */
- X long my_atol(char *s, int n);
- X! void find_base(void);
- X int num_of_arts(void);
- X int valid_artnum(long art);
- X int purge_needed(void);
- X--- 2,8 ----
- X
- X /* art.c */
- X long my_atol(char *s, int n);
- X! void find_base(int only_unread);
- X int num_of_arts(void);
- X int valid_artnum(long art);
- X int purge_needed(void);
- X***************
- X*** 28,33 ****
- X--- 28,34 ----
- X /* curses.c */
- X int InitScreen(void);
- X void ScreenSize(int *num_lines, int *num_columns);
- X+ void InitWin(void);
- X void EndWin(void);
- X void ClearScreen(void);
- X void MoveCursor(int row, int col);
- X***************
- X*** 117,122 ****
- X--- 118,124 ----
- X void basename(char *dirname, char *program);
- X void mail_setup(void);
- X int mail_check(void);
- X+ void parse_from(char *str, char *addr, char *name);
- X /* newsrc.c */
- X void backup_newsrc(void);
- X void read_newsrc(int sub_only);
- X***************
- X*** 158,164 ****
- X void art_close(void);
- X int prompt_response(int ch, int respnum);
- X int choose_resp(int i, int n);
- X- void parse_from(char *str, char *addr, char *name);
- X int prev_response(int n);
- X int next_response(int n);
- X int next_basenote(int n);
- X--- 160,165 ----
- X***************
- X*** 172,178 ****
- X int post_response(char *group, int respnum);
- X int mail_to_someone(char *address);
- X int mail_bug_report(void);
- X! int mail_to_author(int copy_text);
- X void find_new_to(char *nam, char *mail_to);
- X int cancel_article(void);
- X int submit_file(char *name);
- X--- 173,179 ----
- X int post_response(char *group, int respnum);
- X int mail_to_someone(char *address);
- X int mail_bug_report(void);
- X! int mail_to_author(int respnum, int copy_text);
- X void find_new_to(char *nam, char *mail_to);
- X int cancel_article(void);
- X int submit_file(char *name);
- X***************
- X*** 187,192 ****
- X--- 188,194 ----
- X void write_rcfile(void);
- X int change_rcfile(char *group, int kill_at_once);
- X void show_rcfile_menu(void);
- X+ void prompt_on_off(int row, int col, int *var, char *help_text, char *prompt_text);
- X void expand_rel_abs_pathname(int line, int col, char *str);
- X void show_menu_help(char *help_message);
- X /* save.c */
- X***************
- X*** 207,213 ****
- X void post_process_sh(void);
- X char *get_archive_file(char *dir, char *ext);
- X void delete_processed_files(void);
- X- void post_process_patch(void);
- X /* screen.c */
- X void info_message(char *str);
- X void wait_message(char *str);
- X--- 209,214 ----
- X***************
- X*** 221,227 ****
- X void search_group(int forward);
- X void search_subject(int forward, char *group);
- X int search_article(int forward);
- X! char *str_str(char *text, char *pattern);
- X void make_lower(char *s, char *t);
- X /* select.c */
- X void selection_index(int start_groupnum);
- X--- 222,228 ----
- X void search_group(int forward);
- X void search_subject(int forward, char *group);
- X int search_article(int forward);
- X! char *str_str(char *text, char *pattern, int patlen);
- X void make_lower(char *s, char *t);
- X /* select.c */
- X void selection_index(int start_groupnum);
- X***************
- X*** 258,264 ****
- X
- X /* art.c */
- X long my_atol(/*char *s, int n*/);
- X! void find_base(/*void*/);
- X int num_of_arts(/*void*/);
- X int valid_artnum(/*long art*/);
- X int purge_needed(/*void*/);
- X--- 259,265 ----
- X
- X /* art.c */
- X long my_atol(/*char *s, int n*/);
- X! void find_base(/*int only_unread*/);
- X int num_of_arts(/*void*/);
- X int valid_artnum(/*long art*/);
- X int purge_needed(/*void*/);
- X***************
- X*** 284,289 ****
- X--- 285,291 ----
- X /* curses.c */
- X int InitScreen(/*void*/);
- X void ScreenSize(/*int *num_lines, int *num_columns*/);
- X+ void InitWin(/*void*/);
- X void EndWin(/*void*/);
- X void ClearScreen(/*void*/);
- X void MoveCursor(/*int row, int col*/);
- X***************
- X*** 373,378 ****
- X--- 375,381 ----
- X void basename(/*char *dirname, char *program*/);
- X void mail_setup(/*void*/);
- X int mail_check(/*void*/);
- X+ void parse_from(/*char *str, char *addr, char *name*/);
- X /* newsrc.c */
- X void backup_newsrc(/*void*/);
- X void read_newsrc(/*int sub_only*/);
- X***************
- X*** 414,420 ****
- X void art_close(/*void*/);
- X int prompt_response(/*int ch, int respnum*/);
- X int choose_resp(/*int i, int n*/);
- X- void parse_from(/*char *str, char *addr, char *name*/);
- X int prev_response(/*int n*/);
- X int next_response(/*int n*/);
- X int next_basenote(/*int n*/);
- X--- 417,422 ----
- X***************
- X*** 428,434 ****
- X int post_response(/*char *group, int respnum*/);
- X int mail_to_someone(/*char *address*/);
- X int mail_bug_report(/*void*/);
- X! int mail_to_author(/*int copy_text*/);
- X void find_new_to(/*char *nam, char *mail_to*/);
- X int cancel_article(/*void*/);
- X int submit_file(/*char *name*/);
- X--- 430,436 ----
- X int post_response(/*char *group, int respnum*/);
- X int mail_to_someone(/*char *address*/);
- X int mail_bug_report(/*void*/);
- X! int mail_to_author(/*int respnum, int copy_text*/);
- X void find_new_to(/*char *nam, char *mail_to*/);
- X int cancel_article(/*void*/);
- X int submit_file(/*char *name*/);
- X***************
- X*** 443,448 ****
- X--- 445,451 ----
- X void write_rcfile(/*void*/);
- X int change_rcfile(/*char *group, int kill_at_once*/);
- X void show_rcfile_menu(/*void*/);
- X+ void prompt_on_off(/*int row, int col, int *var, char *help_text, char *prompt_text*/);
- X void expand_rel_abs_pathname(/*int line, int col, char *str*/);
- X void show_menu_help(/*char *help_message*/);
- X /* save.c */
- X***************
- X*** 463,469 ****
- X void post_process_sh(/*void*/);
- X char *get_archive_file(/*char *dir, char *ext*/);
- X void delete_processed_files(/*void*/);
- X- void post_process_patch(/*void*/);
- X /* screen.c */
- X void info_message(/*char *str*/);
- X void wait_message(/*char *str*/);
- X--- 466,471 ----
- X***************
- X*** 477,483 ****
- X void search_group(/*int forward*/);
- X void search_subject(/*int forward, char *group*/);
- X int search_article(/*int forward*/);
- X! char *str_str(/*char *text, char *pattern*/);
- X void make_lower(/*char *s, char *t*/);
- X /* select.c */
- X void selection_index(/*int start_groupnum*/);
- X--- 479,485 ----
- X void search_group(/*int forward*/);
- X void search_subject(/*int forward, char *group*/);
- X int search_article(/*int forward*/);
- X! char *str_str(/*char *text, char *pattern, int patlen*/);
- X void make_lower(/*char *s, char *t*/);
- X /* select.c */
- X void selection_index(/*int start_groupnum*/);
- Xdiff -rcs ../105/rcfile.c ./rcfile.c
- X*** ../105/rcfile.c Tue Oct 8 10:46:42 1991
- X--- ./rcfile.c Mon Nov 4 16:10:56 1991
- X***************
- X*** 3,9 ****
- X * Module : rcfile.c
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 09-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X--- 3,9 ----
- X * Module : rcfile.c
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 31-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X***************
- X*** 15,24 ****
- X
- X #include "tin.h"
- X
- X- #define COL2 COLS/2
- X-
- X extern char index_file[LEN];
- X
- X /*
- X * read_rcfile - read defaults from ~/.tin/tinrc
- X */
- X--- 15,28 ----
- X
- X #include "tin.h"
- X
- X extern char index_file[LEN];
- X+ extern int index_point;
- X+ extern int space_mode;
- X
- X+ static int COL1;
- X+ static int COL2;
- X+ static int COL3;
- X+
- X /*
- X * read_rcfile - read defaults from ~/.tin/tinrc
- X */
- X***************
- X*** 39,46 ****
- X mark_saved_read = (strncmp (&buf[16], "ON", 2) == 0 ? TRUE : FALSE);
- X } else if (strncmp (buf, "kill_articles=", 14) == 0) {
- X kill_articles = (strncmp (&buf[14], "ON", 2) == 0 ? TRUE : FALSE);
- X- } else if (strncmp (buf, "show_author=", 12) == 0) {
- X- show_author = (strncmp (&buf[12], "ON", 2) == 0 ? TRUE : FALSE);
- X } else if (strncmp (buf, "draw_arrow=", 11) == 0) {
- X draw_arrow_mark = (strncmp (&buf[11], "ON", 2) == 0 ? TRUE : FALSE);
- X if (draw_arrow_mark == FALSE && inverse_okay == FALSE) {
- X--- 43,48 ----
- X***************
- X*** 50,57 ****
- X--- 52,67 ----
- X print_header = (strncmp (&buf[13], "ON", 2) == 0 ? TRUE : FALSE);
- X } else if (strncmp (buf, "pos_first_unread=", 17) == 0) {
- X pos_first_unread = (strncmp (&buf[17], "ON", 2) == 0 ? TRUE : FALSE);
- X+ } else if (strncmp (buf, "full_page_scroll=", 17) == 0) {
- X+ full_page_scroll = (strncmp (&buf[17], "ON", 2) == 0 ? TRUE : FALSE);
- X+ } else if (strncmp (buf, "catchup_read_groups=", 20) == 0) {
- X+ catchup_read_groups = (strncmp (&buf[20], "ON", 2) == 0 ? TRUE : FALSE);
- X } else if (strncmp (buf, "thread_articles=", 16) == 0) {
- X thread_arts = (strncmp (&buf[16], "ON", 2) == 0 ? TRUE : FALSE);
- X+ } else if (strncmp (buf, "show_only_unread=", 17) == 0) {
- X+ show_only_unread = (strncmp (&buf[17], "ON", 2) == 0 ? TRUE : FALSE);
- X+ } else if (strncmp (buf, "show_author=", 12) == 0) {
- X+ show_author = atoi (&buf[12]);
- X } else if (strncmp (buf, "post_process_type=", 18) == 0) {
- X post_proc_type = atoi (&buf[18]);
- X switch (post_proc_type) {
- X***************
- X*** 70,78 ****
- X case POST_PROC_UUD_EXT_ZOO:
- X proc_ch_default = 'U';
- X break;
- X- case POST_PROC_PATCH:
- X- proc_ch_default = 'p';
- X- break;
- X }
- X } else if (strncmp (buf, "sort_article_type=", 18) == 0) {
- X sort_art_type = atoi (&buf[18]);
- X--- 80,85 ----
- X***************
- X*** 132,139 ****
- X fprintf (fp, "save_separate=%s\n\n", (save_separate ? "ON" : "OFF"));
- X fprintf (fp, "# if ON mark articles that are saved as read\n");
- X fprintf (fp, "mark_saved_read=%s\n\n", (mark_saved_read ? "ON" : "OFF"));
- X- fprintf (fp, "# if ON show Subject & From otherwise just Subject\n");
- X- fprintf (fp, "show_author=%s\n\n", (show_author ? "ON" : "OFF"));
- X fprintf (fp, "# if ON use -> otherwise highlighted bar for selection\n");
- X fprintf (fp, "draw_arrow=%s\n\n", (draw_arrow_mark ? "ON" : "OFF"));
- X fprintf (fp, "# if ON kill articles that match kill file\n");
- X--- 139,144 ----
- X***************
- X*** 142,152 ****
- X--- 147,165 ----
- X fprintf (fp, "print_header=%s\n\n", (print_header ? "ON" : "OFF"));
- X fprintf (fp, "# if ON put cursor at first unread art in group otherwise last art\n");
- X fprintf (fp, "pos_first_unread=%s\n\n", (pos_first_unread ? "ON" : "OFF"));
- X+ fprintf (fp, "# if ON scroll full page of groups/articles otherwise half a page\n");
- X+ fprintf (fp, "full_page_scroll=%s\n\n", (full_page_scroll ? "ON" : "OFF"));
- X+ fprintf (fp, "# if ON ask user if read groups should all be marked read\n");
- X+ fprintf (fp, "catchup_read_groups=%s\n\n", (catchup_read_groups ? "ON" : "OFF"));
- X+ fprintf (fp, "# part of from field to display 0) none 1) address 2) full name 3) both\n");
- X+ fprintf (fp, "show_author=%d\n\n", show_author);
- X fprintf (fp, "# type of post processing to perform after saving articles.\n");
- X fprintf (fp, "# 0) none 1) shar 2) uudecode 3) uud & list zoo 4) uud & extract zoo 5) patch.\n");
- X fprintf (fp, "post_process_type=%d\n\n", post_proc_type);
- X fprintf (fp, "# if ON and group not in ~/.tin/unthread articles will be threaded.\n");
- X fprintf (fp, "thread_articles=%s\n\n", (thread_arts ? "ON" : "OFF"));
- X+ fprintf (fp, "# if ON show only new/unread articles otherwise show all.\n");
- X+ fprintf (fp, "show_only_unread=%s\n\n", (show_only_unread ? "ON" : "OFF"));
- X fprintf (fp, "# sort articles by 0) nothing 1) Subject (descending) 2) Subject (ascending)\n");
- X fprintf (fp, "# 3) From (descend) 4) From (ascend) 5) Date (descend) 6) Date (ascend)\n");
- X fprintf (fp, "sort_article_type=%d\n\n", sort_art_type);
- X***************
- X*** 179,189 ****
- X int kill_at_once;
- X {
- X char *str;
- X! int ch;
- X int kill_changed = FALSE;
- X int orig_kill_state;
- X int option;
- X int ret_code = NO_KILLING;
- X #ifdef SIGTSTP
- X void (*susp)();
- X
- X--- 192,205 ----
- X int kill_at_once;
- X {
- X char *str;
- X! int ch, i;
- X int kill_changed = FALSE;
- X int orig_kill_state;
- X+ int orig_show_only_unread;
- X+ int orig_thread_arts;
- X int option;
- X int ret_code = NO_KILLING;
- X+
- X #ifdef SIGTSTP
- X void (*susp)();
- X
- X***************
- X*** 199,204 ****
- X--- 215,224 ----
- X }
- X #endif
- X
- X+ COL1 = 0;
- X+ COL2 = ((COLS / 3) * 1) + 1;
- X+ COL3 = ((COLS / 3) * 2) + 2;
- X+
- X show_rcfile_menu ();
- X
- X while (1) {
- X***************
- X*** 220,226 ****
- X if (ch >= '1' && ch <= '9') {
- X option = parse_num (ch, "Enter option number> ");
- X } else {
- X! option = 0;
- X }
- X #ifdef SIGTSTP
- X if (do_sigtstp) {
- X--- 240,250 ----
- X if (ch >= '1' && ch <= '9') {
- X option = parse_num (ch, "Enter option number> ");
- X } else {
- X! if (ch == 'q' || ch == ESC) {
- X! option = -1;
- X! } else {
- X! option = 0;
- X! }
- X }
- X #ifdef SIGTSTP
- X if (do_sigtstp) {
- X***************
- X*** 235,240 ****
- X--- 259,267 ----
- X }
- X #endif
- X switch (option) {
- X+ case -1:
- X+ return ret_code;
- X+ /*NOTREACHED*/
- X case 0:
- X write_rcfile ();
- X if (kill_changed) {
- X***************
- X*** 266,304 ****
- X return ret_code;
- X
- X case 1: /* auto save */
- X! show_menu_help (txt_help_autosave);
- X! do {
- X! MoveCursor (INDEX_TOP, (int) strlen (txt_opt_autosave));
- X! if ((ch = ReadCh()) == ' ') {
- X! save_archive_name = !save_archive_name;
- X! printf ("%s", (save_archive_name ? "ON " : "OFF"));
- X! fflush(stdout);
- X! }
- X! } while (ch != CR && ch != ESC);
- X break;
- X
- X case 2: /* save sperate */
- X! show_menu_help (txt_help_save_separate);
- X! do {
- X! MoveCursor (INDEX_TOP, COL2 + (int) strlen (txt_opt_save_separate));
- X! if ((ch = ReadCh()) == ' ') {
- X! save_separate = !save_separate;
- X! printf ("%s", (save_separate ? "ON " : "OFF"));
- X! fflush(stdout);
- X! }
- X! } while (ch != CR && ch != ESC);
- X break;
- X
- X case 3: /* mark saved articles read */
- X! show_menu_help (txt_help_mark_saved_read);
- X! do {
- X! MoveCursor (INDEX_TOP+2, (int) strlen (txt_opt_mark_saved_read));
- X! if ((ch = ReadCh()) == ' ') {
- X! mark_saved_read = !mark_saved_read;
- X! printf ("%s", (mark_saved_read ? "ON " : "OFF"));
- X! fflush(stdout);
- X! }
- X! } while (ch != CR && ch != ESC);
- X break;
- X
- X case 4: /* kill articles */
- X--- 293,310 ----
- X return ret_code;
- X
- X case 1: /* auto save */
- X! prompt_on_off (INDEX_TOP, COL1, &save_archive_name,
- X! txt_help_autosave, txt_opt_autosave);
- X break;
- X
- X case 2: /* save sperate */
- X! prompt_on_off (INDEX_TOP, COL2, &save_separate,
- X! txt_help_save_separate, txt_opt_save_separate);
- X break;
- X
- X case 3: /* mark saved articles read */
- X! prompt_on_off (INDEX_TOP, COL3, &mark_saved_read,
- X! txt_help_mark_saved_read, txt_opt_mark_saved_read);
- X break;
- X
- X case 4: /* kill articles */
- X***************
- X*** 305,377 ****
- X orig_kill_state = kill_articles;
- X show_menu_help (txt_help_kill_articles);
- X do {
- X! MoveCursor (INDEX_TOP+2, COL2 + (int) strlen (txt_opt_kill_articles));
- X if ((ch = ReadCh()) == ' ') {
- X kill_articles = !kill_articles;
- X kill_changed = (kill_articles != orig_kill_state ? TRUE : FALSE);
- X printf ("%s", (kill_articles ? "ON " : "OFF"));
- X! fflush(stdout);
- X }
- X } while (ch != CR && ch != ESC);
- X break;
- X
- X! case 5: /* show subject & author / subject only */
- X! show_menu_help (txt_help_show_author);
- X! do {
- X! MoveCursor (INDEX_TOP+4, (int) strlen (txt_opt_show_author));
- X! if ((ch = ReadCh()) == ' ') {
- X! show_author = !show_author;
- X! printf ("%s", (show_author ? "ON " : "OFF"));
- X! fflush(stdout);
- X! }
- X! } while (ch != CR && ch != ESC);
- X! break;
- X!
- X! case 6: /* draw -> / highlighted bar */
- X! show_menu_help (txt_help_draw_arrow);
- X! do {
- X! MoveCursor (INDEX_TOP+4, COL2 + (int) strlen (txt_opt_draw_arrow));
- X! if ((ch = ReadCh()) == ' ') {
- X! draw_arrow_mark = !draw_arrow_mark;
- X! printf ("%s", (draw_arrow_mark ? "ON " : "OFF"));
- X! fflush(stdout);
- X! }
- X! } while (ch != CR && ch != ESC);
- X if (draw_arrow_mark == FALSE && inverse_okay == FALSE) {
- X inverse_okay = TRUE;
- X }
- X break;
- X
- X! case 7: /* print header */
- X! show_menu_help (txt_help_print_header);
- X! do {
- X! MoveCursor (INDEX_TOP+6, (int) strlen (txt_opt_print_header));
- X! if ((ch = ReadCh()) == ' ') {
- X! print_header = !print_header;
- X! printf ("%s", (print_header ? "ON " : "OFF"));
- X! fflush(stdout);
- X! }
- X! } while (ch != CR && ch != ESC);
- X break;
- X
- X! case 8: /* position cursor at first / last unread art */
- X! show_menu_help (txt_help_pos_first_unread);
- X do {
- X! MoveCursor (INDEX_TOP+6, COL2 + (int) strlen (txt_opt_pos_first_unread));
- X! if ((ch = ReadCh()) == ' ') {
- X! pos_first_unread = !pos_first_unread;
- X! printf ("%s", (pos_first_unread ? "ON " : "OFF"));
- X fflush(stdout);
- X }
- X } while (ch != CR && ch != ESC);
- X break;
- X
- X! case 9:
- X show_menu_help (txt_help_post_proc_type);
- X do {
- X! MoveCursor (INDEX_TOP+8, (int) strlen (txt_opt_process_type));
- X if ((ch = ReadCh()) == ' ') {
- X! if (post_proc_type + 1 > POST_PROC_PATCH) {
- X post_proc_type = POST_PROC_NONE;
- X } else {
- X post_proc_type++;
- X--- 311,431 ----
- X orig_kill_state = kill_articles;
- X show_menu_help (txt_help_kill_articles);
- X do {
- X! MoveCursor (INDEX_TOP+2, COL1 + (int) strlen (txt_opt_kill_articles));
- X if ((ch = ReadCh()) == ' ') {
- X kill_articles = !kill_articles;
- X kill_changed = (kill_articles != orig_kill_state ? TRUE : FALSE);
- X printf ("%s", (kill_articles ? "ON " : "OFF"));
- X! fflush (stdout);
- X }
- X } while (ch != CR && ch != ESC);
- X break;
- X
- X! case 5: /* draw -> / highlighted bar */
- X! prompt_on_off (INDEX_TOP+2, COL2, &draw_arrow_mark,
- X! txt_help_draw_arrow, txt_opt_draw_arrow);
- X if (draw_arrow_mark == FALSE && inverse_okay == FALSE) {
- X inverse_okay = TRUE;
- X }
- X break;
- X
- X! case 6: /* print header */
- X! prompt_on_off (INDEX_TOP+2, COL3, &print_header,
- X! txt_help_print_header, txt_opt_print_header);
- X break;
- X
- X! case 7: /* position cursor at first / last unread art */
- X! prompt_on_off (INDEX_TOP+4, COL1, &pos_first_unread,
- X! txt_help_pos_first_unread, txt_opt_pos_first_unread);
- X! break;
- X!
- X! case 8: /* scroll half/full page of groups/articles */
- X! prompt_on_off (INDEX_TOP+4, COL2, &full_page_scroll,
- X! txt_help_page_scroll, txt_opt_page_scroll);
- X! break;
- X!
- X! case 9: /* catchup read groups when quitting */
- X! prompt_on_off (INDEX_TOP+4, COL3, &catchup_read_groups,
- X! txt_help_catchup_groups, txt_opt_catchup_groups);
- X! break;
- X!
- X! case 10: /* thread/unthread all groups except those in ~/.tin/unthreaded */
- X! orig_thread_arts = thread_arts;
- X! prompt_on_off (INDEX_TOP+6, COL1, &thread_arts,
- X! txt_help_thread_arts, txt_opt_thread_arts);
- X! if (thread_arts != orig_thread_arts || group != (char *) 0) {
- X! make_threads (TRUE);
- X! find_base (show_only_unread);
- X! }
- X! break;
- X!
- X! case 11: /* show all arts or just new/unread arts */
- X! orig_show_only_unread = show_only_unread;
- X! prompt_on_off (INDEX_TOP+6, COL2, &show_only_unread,
- X! txt_help_show_only_unread, txt_opt_show_only_unread);
- X! if (show_only_unread != orig_show_only_unread || group != (char *) 0) {
- X! make_threads (TRUE);
- X! find_base (show_only_unread);
- X! if (space_mode) {
- X! for (i = 0; i < top_base; i++) {
- X! if (new_responses (i)) {
- X! break;
- X! }
- X! }
- X! if (i < top_base) {
- X! index_point = i;
- X! } else {
- X! index_point = top_base - 1;
- X! }
- X! } else {
- X! index_point = top_base - 1;
- X! }
- X! }
- X! break;
- X!
- X! case 13: /* show subject & author / subject only */
- X! show_menu_help (txt_help_show_author);
- X do {
- X! MoveCursor (INDEX_TOP+8, COL1 + (int) strlen (txt_opt_show_author));
- X! if ((ch = ReadCh()) == ' ') {
- X! if (show_author + 1 > SHOW_FROM_BOTH) {
- X! show_author = SHOW_FROM_NONE;
- X! } else {
- X! show_author++;
- X! }
- X! switch (show_author) {
- X! case SHOW_FROM_NONE:
- X! str = txt_show_from_none;
- X! break;
- X! case SHOW_FROM_ADDR:
- X! str = txt_show_from_addr;
- X! break;
- X! case SHOW_FROM_NAME:
- X! str = txt_show_from_name;
- X! break;
- X! case SHOW_FROM_BOTH:
- X! str = txt_show_from_both;
- X! break;
- X! }
- X! printf ("%s", str);
- X fflush(stdout);
- X }
- X } while (ch != CR && ch != ESC);
- X+ if (show_author == SHOW_FROM_ADDR ||
- X+ show_author == SHOW_FROM_BOTH) {
- X+ max_subj = (COLS / 2) - 2;
- X+ } else {
- X+ max_subj = (COLS / 2) + 5;
- X+ }
- X+ max_from = (COLS - max_subj) - 17;
- X break;
- X
- X! case 14:
- X show_menu_help (txt_help_post_proc_type);
- X do {
- X! MoveCursor (INDEX_TOP+8, COL2 + (int) strlen (txt_opt_process_type));
- X if ((ch = ReadCh()) == ' ') {
- X! if (post_proc_type + 1 > POST_PROC_UUD_EXT_ZOO) {
- X post_proc_type = POST_PROC_NONE;
- X } else {
- X post_proc_type++;
- X***************
- X*** 397,406 ****
- X str = txt_post_process_uud_ext_zoo;
- X proc_ch_default = 'U';
- X break;
- X- case POST_PROC_PATCH:
- X- str = txt_post_process_patch;
- X- proc_ch_default = 'p';
- X- break;
- X }
- X CleartoEOLN ();
- X printf ("%s", str);
- X--- 451,456 ----
- X***************
- X*** 408,417 ****
- X }
- X } while (ch != CR && ch != ESC);
- X break;
- X! case 10:
- X show_menu_help (txt_help_sort_type);
- X do {
- X! MoveCursor (INDEX_TOP+10, (int) strlen (txt_opt_sort_type));
- X if ((ch = ReadCh()) == ' ') {
- X if (sort_art_type + 1 > SORT_BY_DATE_ASCEND) {
- X sort_art_type = SORT_BY_NOTHING;
- X--- 458,468 ----
- X }
- X } while (ch != CR && ch != ESC);
- X break;
- X!
- X! case 15:
- X show_menu_help (txt_help_sort_type);
- X do {
- X! MoveCursor (INDEX_TOP+10, COL1 + (int) strlen (txt_opt_sort_type));
- X if ((ch = ReadCh()) == ' ') {
- X if (sort_art_type + 1 > SORT_BY_DATE_ASCEND) {
- X sort_art_type = SORT_BY_NOTHING;
- X***************
- X*** 447,466 ****
- X }
- X } while (ch != CR && ch != ESC);
- X break;
- X! case 11:
- X show_menu_help (txt_help_savedir);
- X! parse_menu_string (INDEX_TOP+12, (int) strlen (txt_opt_savedir), savedir);
- X! expand_rel_abs_pathname (INDEX_TOP+12, (int) strlen (txt_opt_savedir), savedir);
- X break;
- X! case 12:
- X show_menu_help (txt_help_maildir);
- X! parse_menu_string (INDEX_TOP+14, (int) strlen (txt_opt_maildir), maildir);
- X! expand_rel_abs_pathname (INDEX_TOP+14, (int) strlen (txt_opt_maildir), maildir);
- X break;
- X! case 13:
- X show_menu_help (txt_help_printer);
- X! parse_menu_string (INDEX_TOP+16, (int) strlen (txt_opt_printer), printer);
- X! expand_rel_abs_pathname (INDEX_TOP+16, (int) strlen (txt_opt_printer), printer);
- X break;
- X }
- X show_menu_help (txt_select_rcfile_option);
- X--- 498,520 ----
- X }
- X } while (ch != CR && ch != ESC);
- X break;
- X!
- X! case 16:
- X show_menu_help (txt_help_savedir);
- X! parse_menu_string (INDEX_TOP+12, COL1 + (int) strlen (txt_opt_savedir), savedir);
- X! expand_rel_abs_pathname (INDEX_TOP+12, COL1 + (int) strlen (txt_opt_savedir), savedir);
- X break;
- X!
- X! case 17:
- X show_menu_help (txt_help_maildir);
- X! parse_menu_string (INDEX_TOP+14, COL1 + (int) strlen (txt_opt_maildir), maildir);
- X! expand_rel_abs_pathname (INDEX_TOP+14, COL1 + (int) strlen (txt_opt_maildir), maildir);
- X break;
- X!
- X! case 18:
- X show_menu_help (txt_help_printer);
- X! parse_menu_string (INDEX_TOP+16, COL1 + (int) strlen (txt_opt_printer), printer);
- X! expand_rel_abs_pathname (INDEX_TOP+16, COL1 + (int) strlen (txt_opt_printer), printer);
- X break;
- X }
- X show_menu_help (txt_select_rcfile_option);
- X***************
- X*** 478,497 ****
- X
- X MoveCursor (INDEX_TOP, 0);
- X printf ("%s%s\r\n\r\n", txt_opt_autosave, (save_archive_name ? "ON " : "OFF"));
- X! printf ("%s%s\r\n\r\n", txt_opt_mark_saved_read, (mark_saved_read ? "ON " : "OFF"));
- X! printf ("%s%s\r\n\r\n", txt_opt_show_author, (show_author ? "ON " : "OFF"));
- X! printf ("%s%s", txt_opt_print_header, (print_header ? "ON " : "OFF"));
- X
- X MoveCursor(INDEX_TOP, COL2);
- X printf ("%s%s", txt_opt_save_separate, (save_separate ? "ON " : "OFF"));
- X MoveCursor(INDEX_TOP+2, COL2);
- X- printf ("%s%s", txt_opt_kill_articles, (kill_articles ? "ON " : "OFF"));
- X- MoveCursor(INDEX_TOP+4, COL2);
- X printf ("%s%s", txt_opt_draw_arrow, (draw_arrow_mark ? "ON " : "OFF"));
- X MoveCursor(INDEX_TOP+6, COL2);
- X! printf ("%s%s", txt_opt_pos_first_unread, (pos_first_unread ? "ON " : "OFF"));
- X
- X! MoveCursor(INDEX_TOP+8, 0);
- X switch (post_proc_type) {
- X case POST_PROC_NONE:
- X str = txt_post_process_none;
- X--- 532,574 ----
- X
- X MoveCursor (INDEX_TOP, 0);
- X printf ("%s%s\r\n\r\n", txt_opt_autosave, (save_archive_name ? "ON " : "OFF"));
- X! printf ("%s%s\r\n\r\n", txt_opt_kill_articles, (kill_articles ? "ON " : "OFF"));
- X! printf ("%s%s\r\n\r\n", txt_opt_pos_first_unread, (pos_first_unread ? "ON " : "OFF"));
- X! printf ("%s%s", txt_opt_thread_arts, (thread_arts ? "ON " : "OFF"));
- X
- X MoveCursor(INDEX_TOP, COL2);
- X printf ("%s%s", txt_opt_save_separate, (save_separate ? "ON " : "OFF"));
- X MoveCursor(INDEX_TOP+2, COL2);
- X printf ("%s%s", txt_opt_draw_arrow, (draw_arrow_mark ? "ON " : "OFF"));
- X+ MoveCursor(INDEX_TOP+4, COL2);
- X+ printf ("%s%s", txt_opt_page_scroll, (full_page_scroll ? "ON " : "OFF"));
- X MoveCursor(INDEX_TOP+6, COL2);
- X! printf ("%s%s", txt_opt_show_only_unread, (show_only_unread ? "ON " : "OFF"));
- X
- X! MoveCursor(INDEX_TOP, COL3);
- X! printf ("%s%s", txt_opt_mark_saved_read, (mark_saved_read ? "ON " : "OFF"));
- X! MoveCursor(INDEX_TOP+2, COL3);
- X! printf ("%s%s", txt_opt_print_header, (print_header ? "ON " : "OFF"));
- X! MoveCursor(INDEX_TOP+4, COL3);
- X! printf ("%s%s", txt_opt_catchup_groups, (catchup_read_groups ? "ON " : "OFF"));
- X!
- X! MoveCursor(INDEX_TOP+8, COL1);
- X! switch (show_author) {
- X! case SHOW_FROM_NONE:
- X! str = txt_show_from_none;
- X! break;
- X! case SHOW_FROM_ADDR:
- X! str = txt_show_from_addr;
- X! break;
- X! case SHOW_FROM_NAME:
- X! str = txt_show_from_name;
- X! break;
- X! case SHOW_FROM_BOTH:
- X! str = txt_show_from_both;
- X! break;
- X! }
- X! printf ("%s%s", txt_opt_show_author, str);
- X! MoveCursor(INDEX_TOP+8, COL2);
- X switch (post_proc_type) {
- X case POST_PROC_NONE:
- X str = txt_post_process_none;
- X***************
- X*** 508,520 ****
- X case POST_PROC_UUD_EXT_ZOO:
- X str = txt_post_process_uud_ext_zoo;
- X break;
- X- case POST_PROC_PATCH:
- X- str = txt_post_process_patch;
- X- break;
- X }
- X printf ("%s%s\r\n\r\n", txt_opt_process_type, str);
- X
- X! MoveCursor(INDEX_TOP+10, 0);
- X switch (sort_art_type) {
- X case SORT_BY_NOTHING:
- X str = txt_sort_by_nothing;
- X--- 585,594 ----
- X case POST_PROC_UUD_EXT_ZOO:
- X str = txt_post_process_uud_ext_zoo;
- X break;
- X }
- X printf ("%s%s\r\n\r\n", txt_opt_process_type, str);
- X
- X! MoveCursor(INDEX_TOP+10, COL1);
- X switch (sort_art_type) {
- X case SORT_BY_NOTHING:
- X str = txt_sort_by_nothing;
- X***************
- X*** 547,552 ****
- X--- 621,647 ----
- X
- X show_menu_help (txt_select_rcfile_option);
- X MoveCursor (LINES, 0);
- X+ }
- X+
- X+
- X+ void prompt_on_off (row, col, var, help_text, prompt_text)
- X+ int row;
- X+ int col;
- X+ int *var;
- X+ char *help_text;
- X+ char *prompt_text;
- X+ {
- X+ int ch;
- X+
- X+ show_menu_help (help_text);
- X+ do {
- X+ MoveCursor (row, col + (int) strlen (prompt_text));
- X+ if ((ch = ReadCh()) == ' ') {
- X+ *var = !*var;
- X+ printf ("%s", (*var ? "ON " : "OFF"));
- X+ fflush (stdout);
- X+ }
- X+ } while (ch != CR && ch != ESC);
- X }
- X
- X /*
- Xdiff -rcs ../105/save.c ./save.c
- X*** ../105/save.c Thu Oct 10 20:48:47 1991
- X--- ./save.c Mon Oct 28 20:18:44 1991
- X***************
- X*** 3,9 ****
- X * Module : save.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 : save.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 28-10-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta, Iain Lea
- X***************
- X*** 112,118 ****
- X
- X set_tin_uid_gid ();
- X
- X! if (! filename) {
- X if (is_mailbox) {
- X sprintf (save_art_info, txt_saved_to_mailbox, get_first_savefile ());
- X } else {
- X--- 112,118 ----
- X
- X set_tin_uid_gid ();
- X
- X! if (filename == (char *) 0) {
- X if (is_mailbox) {
- X sprintf (save_art_info, txt_saved_to_mailbox, get_first_savefile ());
- X } else {
- X***************
- X*** 188,195 ****
- X first_savefile);
- X }
- X }
- X! free (first_savefile);
- X! first_savefile = (char *) 0;
- X }
- X info_message (save_thread_info);
- X }
- X--- 188,197 ----
- X first_savefile);
- X }
- X }
- X! if (first_savefile != (char *) 0) {
- X! free (first_savefile);
- X! first_savefile = (char *) 0;
- X! }
- X }
- X info_message (save_thread_info);
- X }
- X***************
- X*** 249,261 ****
- X if (stat(file, &st) != -1) {
- X sprintf (buf, txt_append_to_file, file);
- X if (! prompt_yn (LINES, buf, 'n')) {
- X! free (file);
- X! file = NULL;
- X return FALSE;
- X }
- X }
- X! free (file);
- X! file = NULL;
- X }
- X
- X return TRUE;
- X--- 251,267 ----
- X if (stat(file, &st) != -1) {
- X sprintf (buf, txt_append_to_file, file);
- X if (! prompt_yn (LINES, buf, 'n')) {
- X! if (file != (char *) 0) {
- X! free (file);
- X! file = (char *) 0;
- X! }
- X return FALSE;
- X }
- X }
- X! if (file != (char *) 0) {
- X! free (file);
- X! file = (char *) 0;
- X! }
- X }
- X
- X return TRUE;
- X***************
- X*** 404,410 ****
- X } else {
- X strcpy (file, glob_group);
- X }
- X! save[save_num].dir = maildir;
- X save[save_num].file = str_dup (file);
- X } else {
- X if (path[0]) {
- X--- 410,416 ----
- X } else {
- X strcpy (file, glob_group);
- X }
- X! save[save_num].dir = str_dup (maildir);
- X save[save_num].file = str_dup (file);
- X } else {
- X if (path[0]) {
- X***************
- X*** 430,436 ****
- X if (path[0]) {
- X save[save_num].file = str_dup (path);
- X } else {
- X! save[save_num].file = save[save_num].archive;
- X }
- X }
- X }
- X--- 436,442 ----
- X if (path[0]) {
- X save[save_num].file = str_dup (path);
- X } else {
- X! save[save_num].file = str_dup (save[save_num].archive);
- X }
- X }
- X }
- X***************
- X*** 618,627 ****
- X post_process_uud (POST_PROC_UUD_LST_ZOO);
- X }
- X break;
- X-
- X- case 'p':
- X- post_process_patch ();
- X- break;
- X }
- X
- X info_message (txt_post_processing_finished);
- X--- 624,629 ----
- X***************
- X*** 767,774 ****
- X printf ("%s %8d bytes\r\n", buf, file_size);
- X fflush (stdout);
- X }
- X! free (file);
- X! file = (char *) 0;
- X }
- X }
- X
- X--- 769,778 ----
- X printf ("%s %8d bytes\r\n", buf, file_size);
- X fflush (stdout);
- X }
- X! if (file != (char *) 0) {
- X! free (file);
- X! file = (char *) 0;
- X! }
- X }
- X }
- X
- X***************
- X*** 787,794 ****
- X printf ("\r\n\r\nExtracting %s archive...\r\n", file);
- X }
- X fflush (stdout);
- X! free (file);
- X! file = (char *) 0;
- X if (! invoke_cmd (buf)) {
- X set_real_uid_gid ();
- X error_message ("Post processing failed", "");
- X--- 791,800 ----
- X printf ("\r\n\r\nExtracting %s archive...\r\n", file);
- X }
- X fflush (stdout);
- X! if (file != (char *) 0) {
- X! free (file);
- X! file = (char *) 0;
- X! }
- X if (! invoke_cmd (buf)) {
- X set_real_uid_gid ();
- X error_message ("Post processing failed", "");
- X***************
- X*** 812,822 ****
- X char file_out[LEN];
- X char file_out_dir[LEN];
- X char *ptr1, *ptr2;
- X FILE *fp_in, *fp_out;
- X int found_header;
- X int i, j;
- X! char sh_pattern_1[16];
- X! char sh_pattern_2[16];
- X
- X strcpy (sh_pattern_1, "#! /bin/sh");
- X strcpy (sh_pattern_2, "#!/bin/sh");
- X--- 818,829 ----
- X char file_out[LEN];
- X char file_out_dir[LEN];
- X char *ptr1, *ptr2;
- X+ char sh_pattern_1[16];
- X+ char sh_pattern_2[16];
- X FILE *fp_in, *fp_out;
- X int found_header;
- X int i, j;
- X! int patlen1, patlen2;
- X
- X strcpy (sh_pattern_1, "#! /bin/sh");
- X strcpy (sh_pattern_2, "#!/bin/sh");
- X***************
- X*** 841,846 ****
- X--- 848,857 ----
- X
- X if ((fp_out = fopen (file_out, "w")) != NULL) {
- X if ((fp_in = fopen (file_in, "r")) != NULL) {
- X+ ptr1 = sh_pattern_1;
- X+ ptr2 = sh_pattern_2;
- X+ patlen1 = strlen (sh_pattern_1);
- X+ patlen2 = strlen (sh_pattern_2);
- X while (! feof (fp_in)) {
- X if (fgets (buf, sizeof buf, fp_in)) {
- X /*
- X***************
- X*** 847,856 ****
- X * find #!/bin/sh or #! /bin/sh pattern
- X */
- X if (!found_header) {
- X! ptr1 = sh_pattern_1;
- X! ptr2 = sh_pattern_2;
- X! if (str_str (buf, ptr1) != 0 ||
- X! str_str (buf, ptr2) != 0) {
- X found_header = TRUE;
- X }
- X }
- X--- 858,865 ----
- X * find #!/bin/sh or #! /bin/sh pattern
- X */
- X if (!found_header) {
- X! if (str_str (buf, ptr1, patlen1) != 0 ||
- X! str_str (buf, ptr2, patlen2) != 0) {
- X found_header = TRUE;
- X }
- X }
- X***************
- X*** 920,928 ****
- X unlink (save_filename (i));
- X }
- X }
- X- }
- X-
- X-
- X- void post_process_patch ()
- X- {
- X }
- X--- 929,932 ----
- Xdiff -rcs ../105/screen.c ./screen.c
- X*** ../105/screen.c Fri Oct 4 08:05:05 1991
- X--- ./screen.c Thu Oct 31 19:17:34 1991
- X***************
- X*** 3,9 ****
- X * Module : screen.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 : screen.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*** 24,32 ****
- X void info_message (str)
- X char *str;
- X {
- X! clear_message(); /* Clear any old messages hanging around */
- X! center_line(LINES, FALSE, str); /* center the message at screen bottom */
- X! MoveCursor(LINES, 0);
- X }
- X
- X
- X--- 24,34 ----
- X void info_message (str)
- X char *str;
- X {
- X! clear_message (); /* Clear any old messages hanging around */
- X! center_line (LINES, FALSE, str); /* center the message at screen bottom */
- X! if (RawState ()) {
- X! MoveCursor (LINES, 0);
- X! }
- X }
- X
- X
- X***************
- X*** 47,53 ****
- X {
- X errno = 0;
- X
- X! if (update == FALSE && RawState ()) {
- X clear_message (); /* Clear any old messages hanging around */
- X }
- X
- X--- 49,55 ----
- X {
- X errno = 0;
- X
- X! if (RawState ()) {
- X clear_message (); /* Clear any old messages hanging around */
- X }
- X
- X***************
- X*** 54,60 ****
- X fprintf (stderr, template, str);
- X fflush (stderr);
- X
- X! if (update == FALSE && RawState ()) {
- X MoveCursor (LINES, 0);
- X sleep (2);
- X } else {
- X--- 56,62 ----
- X fprintf (stderr, template, str);
- X fflush (stderr);
- X
- X! if (RawState ()) {
- X MoveCursor (LINES, 0);
- X sleep (2);
- X } else {
- X***************
- X*** 66,73 ****
- X
- X void clear_message ()
- X {
- X! MoveCursor(LINES, 0);
- X! CleartoEOLN();
- X }
- X
- X
- X--- 68,77 ----
- X
- X void clear_message ()
- X {
- X! if (RawState ()) {
- X! MoveCursor (LINES, 0);
- X! CleartoEOLN ();
- X! }
- X }
- X
- X
- X***************
- X*** 78,91 ****
- X {
- X int pos;
- X
- X! pos = (COLS - (int) strlen (str)) / 2;
- X! MoveCursor (line, pos);
- X! if (inverse) {
- X! StartInverse ();
- X }
- X printf ("%s", str);
- X fflush (stdout);
- X! if (inverse) {
- X EndInverse ();
- X }
- X }
- X--- 82,97 ----
- X {
- X int pos;
- X
- X! if (RawState ()) {
- X! pos = (COLS - (int) strlen (str)) / 2;
- X! MoveCursor (line, pos);
- SHAR_EOF
- echo "End of tin part 3"
- echo "File tin.patch06 is continued in part 4"
- echo "4" > 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.
-