home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume23
/
tin
/
patch04a
< prev
next >
Wrap
Text File
|
1991-10-19
|
50KB
|
1,865 lines
Newsgroups: comp.sources.misc
From: iain@norisc.siemens.de (Iain J. Lea)
Subject: v23i082: tin - threaded full screen newsreader, Patch04a/2
Message-ID: <csm-v23i082=tin.222227@sparky.IMD.Sterling.COM>
X-Md4-Signature: 7a071d53a42a6808654be4c0601be0b5
Date: Sun, 20 Oct 1991 03:22:51 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: iain@norisc.siemens.de (Iain J. Lea)
Posting-number: Volume 23, Issue 82
Archive-name: tin/patch04a
Environment: BSD, SCO, ISC, SUNOS, SYSVR3, SYSVR4, ULTRIX, XENIX
Patch-To: tin: Volume 23, Issue 15-23
This patch updates tin 1.0 PL3 to PL4 (patchlevel 4).
To apply unpack all 2 parts of this patch and then enter:
patch < tin.patch04
Major changes over tin 1.0 PL3 are the following:
o ESC key now aborts most operations.
o added rtin link to tin. rtin aliases to tin -r to read news via NNTP.
o added speedup to screen display for slow baud rate terminals.
Iain
--cut here--
#!/bin/sh
# This is tin1.0, a shell archive (shar 3.24)
# made 10/02/1991 18:50 UTC by iain@estevax.uucp
# Source directory /piez/iain/tin
#
# existing files WILL be overwritten
#
# This is part 1 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
#
# This shar contains:
# length mode name
# ------ ---------- ------------------------------------------
# 58972 -rw------- tin.patch04
#
if touch 2>&1 | fgrep '[-amc]' > /dev/null
then TOUCH=touch
else TOUCH=true
fi
if test -r shar3_seq_.tmp; then
echo "Must unpack archives in sequence!"
next=`cat shar3_seq_.tmp`; echo "Please unpack part $next next"
exit 1
fi
# ============= tin.patch04 ==============
echo "x - extracting tin.patch04 (Text)"
sed 's/^X//' << 'SHAR_EOF' > tin.patch04 &&
Xdiff -rcs 103/CHANGES 104/CHANGES
X*** 103/CHANGES Mon Sep 30 14:52:28 1991
X--- 104/CHANGES Wed Oct 2 19:35:59 1991
X***************
X*** 1,3 ****
X--- 1,31 ----
X+ CHANGES tin v1.0 PL3 -> tin 1.0 PL4
X+ -----------------------------------
X+
X+ 1) iain@estevax.uucp (Iain Lea)
X+ ADD. post.c - added default subject to post_base() routine.
X+
X+ 2) iain@estevax.uucp (Iain Lea)
X+ ADD. prompt.c - added ESC key to data entry routines for easy aborting.
X+
X+ 3) oelhaf@norisc.uucp (Reiner Oelhaf)
X+ BUG. man page said to put add address in file ~/.tin/add_address but
X+ this does not work.
X+ FIX. misc.c - changed ~/.tin/add_addr to ~/.tin/add_address
X+
X+ 4) pgf@cayman.com (Paul Fox)
X+ ADD. add code to tin to recognize if progname was tin / rtin. If
X+ rtin read news via NNTP (ie. like tin -r).
X+ FIX. main.c - check if 1st letter of argv[0] is 'r' and if so read
X+ news via NNTP.
X+
X+ 5) hakanl@lulea.telesoft.se (Hakan Lennestal)
X+ BUG. In some places set_real_uid_gid()/set_tin_uid_gid() are needed
X+ when tin is setuid. Thanx for the supplied patch.
X+ FIX. feed.c save.c - applied supplied patch file.
X+
X+ 6) iain@estevax.uucp (Iain Lea)
X+ ADD. group.c - added speedup when displaying articles over slow line.
X+
X CHANGES tin v1.0 PL2 -> tin 1.0 PL3
X -----------------------------------
X
Xdiff -rcs 103/MANIFEST 104/MANIFEST
X*** 103/MANIFEST Mon Sep 30 07:58:33 1991
X--- 104/MANIFEST Wed Oct 2 19:49:03 1991
X***************
X*** 1,39 ****
X! MANIFEST for tin newsreader (Mon Sep 30 07:55:48 MET 1991)
X! --------------------------------------------------------------
X! 4698 README
X! 17602 CHANGES
X! 2060 TODO
X 530 UPDATE_INDEX
X! 9042 Makefile
X! 27729 tin.1
X 2247 wildmat.3
X! 9798 tin.h
X! 9739 lang.h
X 3720 nntp.h
X! 17303 proto.h
X 21 patchlevel.h
X! 28499 art.c
X 6043 curses.c
X 2631 debug.c
X! 11387 feed.c
X! 19434 group.c
X! 2818 hashstr.c
X! 5150 help.c
X! 10301 kill.c
X! 17947 lang.c
X! 8130 main.c
X 6239 memory.c
X! 20999 misc.c
X! 19676 newsrc.c
X! 6791 open.c
X! 24789 page.c
X! 17279 post.c
X! 3098 prompt.c
X! 18671 rcfile.c
X! 19589 save.c
X! 2171 screen.c
X! 7830 search.c
X! 19856 select.c
X 7531 signal.c
X 4749 wildmat.c
X! 396097 total
X--- 1,40 ----
X! MANIFEST for tin newsreader (Wed Oct 2 19:49:00 MET 1991)
X! ----------------------------------------------------------
X! 4609 README
X! 19208 CHANGES
X! 2347 TODO
X 530 UPDATE_INDEX
X! 9247 Makefile
X! 27771 tin.1
X 2247 wildmat.3
X! 36873 tin.nrf
X! 9785 tin.h
X! 9432 lang.h
X 3720 nntp.h
X! 17299 proto.h
X 21 patchlevel.h
X! 28457 art.c
X 6043 curses.c
X 2631 debug.c
X! 11964 feed.c
X! 19344 group.c
X! 2829 hashstr.c
X! 5149 help.c
X! 10484 kill.c
X! 17723 lang.c
X! 8373 main.c
X 6239 memory.c
X! 21726 misc.c
X! 19741 newsrc.c
X! 6825 open.c
X! 24865 page.c
X! 17675 post.c
X! 4469 prompt.c
X! 17871 rcfile.c
X! 19595 save.c
X! 2168 screen.c
X! 7808 search.c
X! 18951 select.c
X 7531 signal.c
X 4749 wildmat.c
X! 436299 total
Xdiff -rcs 103/Makefile 104/Makefile
X*** 103/Makefile Mon Sep 30 19:07:47 1991
X--- 104/Makefile Wed Oct 2 19:48:41 1991
X***************
X*** 69,76 ****
X #
X EXE=tin
X
X- #BINDIR = /piez/iain/bin
X BINDIR = /usr/local/bin
X STRIP = strip
X ROFF = + drf -F Helvetica -man3
X PRINT= -Pps0
X--- 69,77 ----
X #
X EXE=tin
X
X BINDIR = /usr/local/bin
X+ #BINDIR = /piez/iain/bin
X+
X STRIP = strip
X ROFF = + drf -F Helvetica -man3
X PRINT= -Pps0
X***************
X*** 175,182 ****
X @echo "Installing $(EXE)..."
X @$(STRIP) $(EXE)
X @-mv $(EXE) $(BINDIR)
X! @chmod 755 $(BINDIR)/$(EXE)
X! @ls -l $(BINDIR)/$(EXE)
X
X install_setuid:
X @echo "Installing SETUID $(EXE)..."
X--- 176,185 ----
X @echo "Installing $(EXE)..."
X @$(STRIP) $(EXE)
X @-mv $(EXE) $(BINDIR)
X! @-rm $(BINDIR)/r$(EXE)
X! @ln $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
X! @chmod 755 $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
X! @ls -l $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
X
X install_setuid:
X @echo "Installing SETUID $(EXE)..."
X***************
X*** 183,190 ****
X @$(STRIP) $(EXE)
X @mv $(EXE) $(BINDIR)
X @chown news $(BINDIR)/$(EXE)
X @su news -c "chmod 4755 $(BINDIR)/$(EXE)"
X! @ls -l $(BINDIR)/$(EXE)
X
X proto:
X @echo "Generating function prototypes for proto.h..."
X--- 186,196 ----
X @$(STRIP) $(EXE)
X @mv $(EXE) $(BINDIR)
X @chown news $(BINDIR)/$(EXE)
X+ @-rm $(BINDIR)/r$(EXE)
X+ @ln $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
X @su news -c "chmod 4755 $(BINDIR)/$(EXE)"
X! @su news -c "chmod 755 $(BINDIR)/r$(EXE)"
X! @ls -l $(BINDIR)/$(EXE) $(BINDIR)/r$(EXE)
X
X proto:
X @echo "Generating function prototypes for proto.h..."
X***************
X*** 205,212 ****
X @nroff -man $(EXE).1 > $(EXE).nrf
X @echo "Creating MANIFEST..."
X @echo "MANIFEST for tin newsreader (`date`)" > MANIFEST
X! @echo "--------------------------------------------------------------" >> MANIFEST
X! @wc -c README CHANGES TODO UPDATE_INDEX Makefile *.[13] $(HFILES) $(CFILES) >> MANIFEST
X @shar -a -n $(EXE)1.02 -s iain@estevax.uucp -L50 -o ../$(EXE).shar $(SUPPORT) $(CFILES) $(HFILES)
X
X uuencode:
X--- 211,218 ----
X @nroff -man $(EXE).1 > $(EXE).nrf
X @echo "Creating MANIFEST..."
X @echo "MANIFEST for tin newsreader (`date`)" > MANIFEST
X! @echo "----------------------------------------------------------" >> MANIFEST
X! @wc -c README CHANGES TODO UPDATE_INDEX Makefile *.[13] $(EXE).nrf $(HFILES) $(CFILES) >> MANIFEST
X @shar -a -n $(EXE)1.02 -s iain@estevax.uucp -L50 -o ../$(EXE).shar $(SUPPORT) $(CFILES) $(HFILES)
X
X uuencode:
Xdiff -rcs 103/README 104/README
X*** 103/README Mon Sep 30 14:53:14 1991
X--- 104/README Wed Oct 2 19:44:00 1991
X***************
X*** 1,21 ****
X! This is version 1.0 PL3 (patchlevel 3) of the tin newsreader.
X
X! Major improvements over tin 1.0 PL2 are the following:
X
X! o added -z and -Z options.
X
X! o added 'g' and `G` commands to pager for 'less' users.
X
X! o added option to switch threading off on a group basis.
X
X- o added nroff formatted man page for SCO Unix users without troff.
X-
X- o fixed auto-save articles routine that I broke in PL2.
X-
X- o fixed -U option that was causing char echo if a ^Z was done.
X-
X- o fixed a memory leak in 'W' command.
X-
X For more bugs fixes, other changes & additions read the CHANGES & TODO files.
X
X I am still looking for people to send me ideas/comments & bug reports.
X--- 1,13 ----
X! This is version 1.0 PL4 (patchlevel 4) of the tin newsreader.
X
X! Major improvements over tin 1.0 PL3 are the following:
X
X! o ESC key now aborts most operations
X
X! o added rtin link to tin. rtin aliases to tin -r to read news via NNTP
X
X! o added speedup to screen display for slow baud rate terminals.
X
X For more bugs fixes, other changes & additions read the CHANGES & TODO files.
X
X I am still looking for people to send me ideas/comments & bug reports.
X***************
X*** 111,120 ****
X
X Klaus Arzig, Anton Aylward, Reiner Balling, Volker Beyer, Roger Binns,
X Georg Biehler, Andreas Brosig, Peter Dressler, Gerhard Ermer, Hugh Fader,
X! Joachim Feld, Bernhard Gmelch, Viet Hoang, Torsten Homeyer, Andy Jackson,
X! Joe Johnson, Cyrill Jung, Karl-Koenig Koenigsson, Hans-Juergen Knopp,
X! Hakan Lennestal, Bob Lukas, Clifford Luke, Phillip Molloy, Toni Metz,
X! Greg Miller, Klaus Neuberger, Otto Niesser, Wolf Paul, Nickolay Saukh,
X! Rich Salz, Fredy Schwatz, Bernd Schwerin, Klamer Schutte, Karl-Olav
X! Serrander, Chris Smith, Steve Spearman, Cliff Stanford, Adri Verhoef,
X! Cary Whitney
X--- 103,112 ----
X
X Klaus Arzig, Anton Aylward, Reiner Balling, Volker Beyer, Roger Binns,
X Georg Biehler, Andreas Brosig, Peter Dressler, Gerhard Ermer, Hugh Fader,
X! Joachim Feld, Paul Fox, Bernhard Gmelch, Viet Hoang, Torsten Homeyer,
X! Andy Jackson, Joe Johnson, Cyrill Jung, Karl-Koenig Koenigsson,
X! Hans-Juergen Knopp, Hakan Lennestal, Bob Lukas, Clifford Luke,
X! Phillip Molloy, Toni Metz, Greg Miller, Klaus Neuberger, Otto Niesser,
X! Reiner Oelhaf, Wolf Paul, Nickolay Saukh, Rich Salz, Fredy Schwatz,
X! Bernd Schwerin, Klamer Schutte, Karl-Olav Serrander, Chris Smith,
X! Steve Spearman, Cliff Stanford, Adri Verhoef, Cary Whitney
Xdiff -rcs 103/TODO 104/TODO
X*** 103/TODO Mon Sep 30 18:59:59 1991
X--- 104/TODO Wed Oct 2 19:40:10 1991
X***************
X*** 17,23 ****
X
X o Fix -s <savedir> -S so that an active is constructed when new
X articles are saved to private news dir.
X!
X ADD FEATURES
X ------------
X o Add 2nd page to 'M' Options menu and put on the options:
X--- 17,26 ----
X
X o Fix -s <savedir> -S so that an active is constructed when new
X articles are saved to private news dir.
X!
X! o Fix code to display only groups with unread news and only threads
X! with unread news. (Make settable option).
X!
X ADD FEATURES
X ------------
X o Add 2nd page to 'M' Options menu and put on the options:
X***************
X*** 25,31 ****
X 2) thread/unthread groups (read from ~/.tin/unthread)
X
X o Add elm style print command with %s in it for printing in 'M'.
X-
X
X o Add mail/save to -S option. Selectable by 'M' menu.
X
X--- 28,33 ----
XFiles 103/UPDATE_INDEX and 104/UPDATE_INDEX are identical
Xdiff -rcs 103/art.c 104/art.c
X*** 103/art.c Mon Sep 30 18:33:02 1991
X--- 104/art.c Wed Oct 2 19:29:27 1991
X***************
X*** 281,298 ****
X top++;
X
X if (++count % 10 == 0 && ! update) {
X if (display_groupname) {
X MoveCursor (0, 0);
X CleartoEOLN ();
X center_line (0, TRUE, group);
X display_groupname = FALSE;
X- #ifdef SLOW_SCREEN_UPDATE
X- wait_message (txt_indexing);
X- #endif
X }
X- #ifndef SLOW_SCREEN_UPDATE
X sprintf (msg, txt_indexing_num, count);
X wait_message (msg);
X #endif
X }
X }
X--- 281,297 ----
X top++;
X
X if (++count % 10 == 0 && ! update) {
X+ #ifndef SLOW_SCREEN_UPDATE
X if (display_groupname) {
X MoveCursor (0, 0);
X CleartoEOLN ();
X center_line (0, TRUE, group);
X display_groupname = FALSE;
X }
X sprintf (msg, txt_indexing_num, count);
X wait_message (msg);
X+ #else
X+ wait_message (txt_indexing);
X #endif
X }
X }
XFiles 103/curses.c and 104/curses.c are identical
XFiles 103/debug.c and 104/debug.c are identical
Xdiff -rcs 103/feed.c 104/feed.c
X*** 103/feed.c Mon Sep 30 18:33:52 1991
X--- 104/feed.c Wed Oct 2 19:01:46 1991
X***************
X*** 3,9 ****
X * Module : feed.c
X * Author : I.Lea
X * Created : 31-08-91
X! * Updated : 30-09-91
X * Release : 1.0
X * Notes : provides same interface to mail,pipe,print and save commands
X * Copyright : (c) Copyright 1991 by Iain Lea
X--- 3,9 ----
X * Module : feed.c
X * Author : I.Lea
X * Created : 31-08-91
X! * Updated : 02-10-91
X * Release : 1.0
X * Notes : provides same interface to mail,pipe,print and save commands
X * Copyright : (c) Copyright 1991 by Iain Lea
X***************
X*** 76,89 ****
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != 'a' && ch != 't' && ch != 'T' && ch != 'r' && ch != 'e');
X } else {
X file[0] = '\0';
X ch = ch_default;
X! proc_ch = 's';
X }
X
X! if (ch == 'e') { /* exit */
X clear_message ();
X return;
X }
X--- 76,91 ----
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != ESC && ch != 'a' && ch != 't' && ch != 'T' && ch != 'r' && ch != 'e');
X } else {
X file[0] = '\0';
X ch = ch_default;
X! if (proc_ch == 'n') { /* none so set to unshar */
X! proc_ch = 's';
X! }
X }
X
X! if (ch == 'e' || ch == ESC) { /* exit */
X clear_message ();
X return;
X }
X***************
X*** 140,149 ****
X--- 142,155 ----
X return;
X }
X }
X+ set_real_uid_gid ();
X+
X if ((fp = popen (command, "w")) == NULL) {
X+ set_tin_uid_gid ();
X error_message (txt_command_failed_s, command);
X return;
X }
X+ set_tin_uid_gid ();
X wait_message ("Piping...");
X Raw (FALSE);
X break;
X***************
X*** 154,163 ****
X--- 160,172 ----
X } else {
X sprintf (command, "%s > /dev/null 2>&1", printer);
X }
X+ set_real_uid_gid ();
X if ((fp = popen (command, "w")) == NULL) {
X+ set_tin_uid_gid ();
X error_message (txt_command_failed_s, command);
X return;
X }
X+ set_tin_uid_gid ();
X break;
X case FEED_SAVE: /* ask user for filename */
X free_save_array ();
X***************
X*** 256,265 ****
X--- 265,277 ----
X case 't': /* thread */
X for (i = (int) base[b]; i >= 0; i = arts[i].thread) {
X if (function == FEED_PRINT) {
X+ set_real_uid_gid ();
X if ((fp = popen (command, "w")) == NULL) {
X+ set_tin_uid_gid ();
X error_message (txt_command_failed_s, command);
X return;
X }
X+ set_tin_uid_gid ();
X }
X if (level == PAGE_LEVEL) {
X note_cleanup ();
X***************
X*** 302,311 ****
X--- 314,326 ----
X for (j=0 ; j < top ; j++) {
X if (arts[j].tagged && arts[j].tagged == i) {
X if (function == FEED_PRINT) {
X+ set_real_uid_gid ();
X if ((fp = popen (command, "w")) == NULL) {
X+ set_tin_uid_gid ();
X error_message (txt_command_failed_s, command);
X return;
X }
X+ set_tin_uid_gid ();
X }
X if (level == PAGE_LEVEL) {
X note_cleanup ();
X***************
X*** 352,361 ****
X--- 367,379 ----
X if (wildmat (arts[i].subject, pattern)) {
X #endif
X if (function == FEED_PRINT) {
X+ set_real_uid_gid ();
X if ((fp = popen (command, "w")) == NULL) {
X+ set_tin_uid_gid ();
X error_message (txt_command_failed_s, command);
X return;
X }
X+ set_tin_uid_gid ();
X }
X if (level == PAGE_LEVEL) {
X note_cleanup ();
Xdiff -rcs 103/group.c 104/group.c
X*** 103/group.c Mon Sep 30 18:35:39 1991
X--- 104/group.c Wed Oct 2 19:34:20 1991
X***************
X*** 158,164 ****
X show_group_page(group);
X break;
X
X! case 27: /* common arrow keys */
X ch = ReadCh();
X if (ch == '[' || ch == 'O')
X ch = ReadCh();
X--- 158,164 ----
X show_group_page(group);
X break;
X
X! case ESC: /* common arrow keys */
X ch = ReadCh();
X if (ch == '[' || ch == 'O')
X ch = ReadCh();
X***************
X*** 703,721 ****
X }
X
X if (show_author) {
X- #ifdef RESP_AT_END
X len_from = max_from-BLANK_GROUP_COLS;
X! #else
X! len_from = max_from-BLANK_GROUP_COLS;
X! #endif
X! } else {
X! #ifdef RESP_AT_END
X! len_subj = (max_subj+max_from)-BLANK_GROUP_COLS;
X! #else
X len_subj = (max_subj+max_from+3)-BLANK_GROUP_COLS;
X- #endif
X }
X
X for (j=0, i = first_subj_on_screen; i < last_subj_on_screen; i++, j++) {
X respnum = (int) base[i];
X
X--- 703,717 ----
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 }
X
X+ if (draw_arrow_mark) {
X+ CleartoEOS ();
X+ }
X+
X for (j=0, i = first_subj_on_screen; i < last_subj_on_screen; i++, j++) {
X respnum = (int) base[i];
X
X***************
X*** 736,763 ****
X
X my_strncpy (from, arts[respnum].from, max_from);
X
X! if (show_author) {
X! #ifdef RESP_AT_END
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, max_subj, subject, resps, len_from, from);
X! #else
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! #endif
X } else {
X! #ifdef RESP_AT_END
X! my_strncpy (subject, arts[respnum].subject, max_subj+max_from);
X! sprintf(screen[j].col, " %4d%3s %-*s %s\r\n",
X! i+1, new_resps, len_subj, subject, resps);
X! #else
X! my_strncpy (subject, arts[respnum].subject, max_subj+max_from+3);
X! sprintf(screen[j].col, " %4d%3s %s%-*s\r\n",
X! i+1, new_resps, resps, len_subj, subject);
X! #endif
X }
X- printf("%s", screen[j].col);
X }
X
X #ifndef USE_CLEARSCREEN
X--- 732,759 ----
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! } else {
X! my_strncpy (subject, arts[respnum].subject, max_subj+max_from+3);
X! printf (" %4d%3s %s%-s\r\n",
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! } else {
X! my_strncpy (subject, arts[respnum].subject, max_subj+max_from+3);
X! sprintf (screen[j].col, " %4d%3s %s%-*s\r\n",
X! i+1, new_resps, resps, len_subj, subject);
X! }
X! printf ("%s", screen[j].col);
X }
X }
X
X #ifndef USE_CLEARSCREEN
XFiles 103/hashstr.c and 104/hashstr.c are identical
Xdiff -rcs 103/help.c 104/help.c
X*** 103/help.c Mon Sep 30 12:35:19 1991
X--- 104/help.c Mon Sep 30 20:43:04 1991
X***************
X*** 193,199 ****
X
X ch = ReadCh ();
X switch (ch) {
X! case 27: /* (ESC) common arrow keys */
X ch = ReadCh();
X if (ch == '[' || ch == 'O')
X ch = ReadCh();
X--- 193,199 ----
X
X ch = ReadCh ();
X switch (ch) {
X! case ESC: /* (ESC) common arrow keys */
X ch = ReadCh();
X if (ch == '[' || ch == 'O')
X ch = ReadCh();
Xdiff -rcs 103/kill.c 104/kill.c
X*** 103/kill.c Mon Sep 30 18:14:57 1991
X--- 104/kill.c Mon Sep 30 20:37:10 1991
X***************
X*** 180,186 ****
X
X ClearScreen ();
X
X! center_line (1, TRUE, txt_kill_menu);
X
X MoveCursor(INDEX_TOP, 0);
X printf ("%s\r\n\r\n", txt_kill_text);
X--- 180,186 ----
X
X ClearScreen ();
X
X! center_line (0, TRUE, txt_kill_menu);
X
X MoveCursor(INDEX_TOP, 0);
X printf ("%s\r\n\r\n", txt_kill_text);
X***************
X*** 191,197 ****
X fflush(stdout);
X
X show_menu_help (txt_help_kill_text);
X! parse_menu_string (INDEX_TOP, (int) strlen (txt_kill_text), text);
X
X if (text[0]) {
X show_menu_help (txt_help_kill_text_type);
X--- 191,199 ----
X fflush(stdout);
X
X show_menu_help (txt_help_kill_text);
X! if (! parse_menu_string (INDEX_TOP, (int) strlen (txt_kill_text), text)) {
X! return FALSE;
X! }
X
X if (text[0]) {
X show_menu_help (txt_help_kill_text_type);
X***************
X*** 221,227 ****
X printf ("%s", str);
X fflush(stdout);
X }
X! } while (ch != CR);
X }
X
X if (! text[0]) {
X--- 223,232 ----
X printf ("%s", str);
X fflush(stdout);
X }
X! } while (ch != CR && ch != ESC);
X! if (ch == ESC) {
X! return FALSE;
X! }
X }
X
X if (! text[0]) {
X***************
X*** 252,258 ****
X printf ("%s", str);
X fflush(stdout);
X }
X! } while (ch != CR);
X }
X
X while (1) {
X--- 257,266 ----
X printf ("%s", str);
X fflush(stdout);
X }
X! } while (ch != CR && ch != ESC);
X! if (ch == ESC) {
X! return FALSE;
X! }
X }
X
X while (1) {
X***************
X*** 262,268 ****
X MoveCursor(LINES, (int) strlen (txt_abort_edit_save_killfile));
X if ((ch = ReadCh()) == CR)
X ch = ch_default;
X! } while (ch != 'a' && ch != 'e' && ch != 's');
X switch (ch) {
X case 'e':
X start_line_offset = 2;
X--- 270,276 ----
X MoveCursor(LINES, (int) strlen (txt_abort_edit_save_killfile));
X if ((ch = ReadCh()) == CR)
X ch = ch_default;
X! } while (ch != ESC && ch != 'a' && ch != 'e' && ch != 's');
X switch (ch) {
X case 'e':
X start_line_offset = 2;
X***************
X*** 274,279 ****
X--- 282,288 ----
X goto kill_done;
X
X case 'a':
X+ case ESC:
X killed = FALSE;
X goto kill_done;
X
Xdiff -rcs 103/lang.c 104/lang.c
X*** 103/lang.c Mon Sep 30 18:29:55 1991
X--- 104/lang.c Mon Sep 30 19:33:00 1991
X***************
X*** 70,76 ****
X char txt_author_search_backwards[] = "Author search backwards [%s]> ";
X char txt_no_search_string[] = "No search string";
X char txt_no_match[] = "No match";
X! char txt_post_subject[] = "Post Subject: ";
X char txt_no_subject[] = "No subject";
X char txt_cannot_open[] = "can't open %s";
X char txt_posting[] = "Posting...";
X--- 70,76 ----
X char txt_author_search_backwards[] = "Author search backwards [%s]> ";
X char txt_no_search_string[] = "No search string";
X char txt_no_match[] = "No match";
X! char txt_post_subject[] = "Post Subject [%s]> ";
X char txt_no_subject[] = "No subject";
X char txt_cannot_open[] = "can't open %s";
X char txt_posting[] = "Posting...";
XFiles 103/lang.h and 104/lang.h are identical
Xdiff -rcs 103/main.c 104/main.c
X*** 103/main.c Mon Sep 30 12:35:49 1991
X--- 104/main.c Wed Oct 2 09:50:17 1991
X***************
X*** 3,9 ****
X * Module : main.c
X * Author : R.Skrenta / I.Lea
X * Created : 01-04-91
X! * Updated : 29-09-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 : 02-10-91
X * Release : 1.0
X * Notes :
X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
X***************
X*** 69,74 ****
X--- 69,83 ----
X set_signal_handlers (); /* all except SIGINT ctrl-C */
X
X basename (argv[0], progname);
X+
X+ if (progname[0] == 'r') { /* rtin so read news remotely via NNTP */
X+ #ifdef USE_NNTP
X+ read_news_via_nntp = TRUE;
X+ #else
X+ error_message ("Reading news via NNTP is not enabled. Recompile %s with -DUSE_NNTP.\n", progname);
X+ exit (1);
X+ #endif
X+ }
X
X tin_uid = geteuid ();
X tin_gid = getegid ();
XFiles 103/memory.c and 104/memory.c are identical
Xdiff -rcs 103/misc.c 104/misc.c
X*** 103/misc.c Mon Sep 30 18:42:28 1991
X--- 104/misc.c Wed Oct 2 18:43:09 1991
X***************
X*** 3,9 ****
X * Module : misc.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 : misc.c
X * Author : R.Skrenta / I.Lea
X * Created : 01-04-91
X! * Updated : 02-10-91
X * Release : 1.0
X * Notes :
X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
X***************
X*** 127,132 ****
X--- 127,133 ----
X default_regex_pattern[0] = '\0';
X default_save_file[0] = '\0';
X default_shell_command[0] = '\0';
X+ default_post_subject[0] = '\0';
X
X sprintf (rcdir, "%s/%s", get_val ("TINDIR", homedir), RCDIR);
X sprintf (indexdir, "%s/%s", rcdir, INDEXDIR);
X***************
X*** 292,298 ****
X goto got_add_addr;
X }
X
X! sprintf (nam, "%s/add_addr", rcdir);
X if ((fp = fopen (nam, "r")) != NULL) {
X if (fgets (add_addr, sizeof (add_addr), fp) != NULL) {
X for (p = add_addr; *p && *p != '\n'; p++)
X--- 293,299 ----
X goto got_add_addr;
X }
X
X! sprintf (nam, "%s/add_address", rcdir);
X if ((fp = fopen (nam, "r")) != NULL) {
X if (fgets (add_addr, sizeof (add_addr), fp) != NULL) {
X for (p = add_addr; *p && *p != '\n'; p++)
X***************
X*** 881,886 ****
X--- 882,895 ----
X
X void set_real_uid_gid ()
X {
X+ #ifdef BSD
X+ if (seteuid (real_uid) == -1) {
X+ error_message ("Error seteuid(real) failed", (char *) 0);
X+ }
X+ if (setegid (real_gid) == -1) {
X+ error_message ("Error setegid(real) failed", (char *) 0);
X+ }
X+ #else
X if (setuid (real_uid) == -1) {
X error_message ("Error setuid(real) failed", (char *) 0);
X }
X***************
X*** 887,897 ****
X--- 896,915 ----
X if (setgid (real_gid) == -1) {
X error_message ("Error setgid(real) failed", (char *) 0);
X }
X+ #endif
X }
X
X
X void set_tin_uid_gid ()
X {
X+ #ifdef BSD
X+ if (seteuid (tin_uid) == -1) {
X+ error_message ("Error seteuid(tin) failed", (char *) 0);
X+ }
X+ if (setegid (tin_gid) == -1) {
X+ error_message ("Error setegid(tin) failed", (char *) 0);
X+ }
X+ #else
X if (setuid (tin_uid) == -1) {
X error_message ("Error setuid(tin) failed", (char *) 0);
X }
X***************
X*** 898,903 ****
X--- 916,922 ----
X if (setgid (tin_gid) == -1) {
X error_message ("Error setgid(tin) failed", (char *) 0);
X }
X+ #endif
X }
X
X
XFiles 103/newsrc.c and 104/newsrc.c are identical
XFiles 103/nntp.h and 104/nntp.h are identical
Xdiff -rcs 103/open.c 104/open.c
X*** 103/open.c Mon Sep 30 18:44:17 1991
X--- 104/open.c Wed Oct 2 09:38:15 1991
X***************
X*** 3,9 ****
X * Module : open.c
X * Author : R.Skrenta / I.Lea
X * Created : 01-04-91
X! * Updated : 27-09-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 : 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***************
X*** 90,99 ****
X exit(1);
X }
X
X! wait_message ("Connecting...");
X
X ret = server_init (server);
X! putchar ('\n');
X /*
X handle_server_response (ret, server);
X */
X--- 90,104 ----
X exit(1);
X }
X
X! if (update == FALSE) {
X! printf ("Connecting...");
X! fflush (stdout);
X! }
X
X ret = server_init (server);
X! if (update == FALSE) {
X! putchar ('\n');
X! }
X /*
X handle_server_response (ret, server);
X */
Xdiff -rcs 103/page.c 104/page.c
X*** 103/page.c Mon Sep 30 18:45:06 1991
X--- 104/page.c Mon Sep 30 20:43:13 1991
X***************
X*** 112,118 ****
X }
X
X } else switch (ch) {
X! case 27:
X ch = ReadCh ();
X if (ch == '[' || ch == 'O')
X ch = ReadCh ();
X--- 112,118 ----
X }
X
X } else switch (ch) {
X! case ESC:
X ch = ReadCh ();
X if (ch == '[' || ch == 'O')
X ch = ReadCh ();
Xdiff -rcs 103/patchlevel.h 104/patchlevel.h
X*** 103/patchlevel.h Mon Sep 30 07:58:07 1991
X--- 104/patchlevel.h Mon Sep 30 19:38:32 1991
X***************
X*** 1 ****
X! #define PATCHLEVEL 3
X--- 1 ----
X! #define PATCHLEVEL 4
Xdiff -rcs 103/post.c 104/post.c
X*** 103/post.c Mon Sep 30 18:19:01 1991
X--- 104/post.c Wed Oct 2 08:28:24 1991
X***************
X*** 29,34 ****
X--- 29,36 ----
X
X extern long note_mark[MAX_PAGES]; /* ftells on beginnings of pages */
X
X+ char default_post_subject[LEN]; /* offers user default choice */
X+
X struct posted_t *posted;
X
X
X***************
X*** 150,165 ****
X int redraw_screen = FALSE;
X
X start_line_offset = 4;
X
X! if (! parse_string (txt_post_subject, subj)) {
X clear_message ();
X return (redraw_screen);
X- }
X- if (subj[0] == '\0') {
X- info_message (txt_no_subject);
X- return (redraw_screen);
X }
X
X set_real_uid_gid ();
X
X if ((fp = fopen (article, "w")) == NULL) {
X--- 152,176 ----
X int redraw_screen = FALSE;
X
X start_line_offset = 4;
X+
X+ sprintf (msg, txt_post_subject, default_post_subject);
X
X! if (! parse_string (msg, subj)) {
X clear_message ();
X return (redraw_screen);
X }
X
X+ if (strlen (subj)) {
X+ my_strncpy (default_post_subject, subj, LEN);
X+ } else {
X+ if (default_post_subject[0]) {
X+ my_strncpy (subj, default_post_subject, LEN);
X+ } else {
X+ info_message (txt_no_subject);
X+ return (redraw_screen);
X+ }
X+ }
X+
X set_real_uid_gid ();
X
X if ((fp = fopen (article, "w")) == NULL) {
X***************
X*** 194,199 ****
X--- 205,211 ----
X break;
X
X case 'a':
X+ case ESC:
X unlink (article);
X clear_message ();
X set_tin_uid_gid ();
X***************
X*** 227,233 ****
X MoveCursor (LINES, (int) strlen (txt_abort_edit_post));
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != 'a' && ch != 'e' && ch != 'p');
X }
X
X post_base_done:
X--- 239,245 ----
X MoveCursor (LINES, (int) strlen (txt_abort_edit_post));
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != ESC && ch != 'a' && ch != 'e' && ch != 'p');
X }
X
X post_base_done:
X***************
X*** 332,337 ****
X--- 344,350 ----
X break;
X
X case 'a':
X+ case ESC:
X unlink (article);
X clear_message ();
X set_tin_uid_gid ();
X***************
X*** 365,371 ****
X MoveCursor(LINES, (int) strlen (txt_abort_edit_post));
X if ((ch = ReadCh()) == CR)
X ch = ch_default;
X! } while (ch != 'a' && ch != 'e' && ch != 'p');
X }
X
X post_response_done:
X--- 378,384 ----
X MoveCursor(LINES, (int) strlen (txt_abort_edit_post));
X if ((ch = ReadCh()) == CR)
X ch = ch_default;
X! } while (ch != ESC && ch != 'a' && ch != 'e' && ch != 'p');
X }
X
X post_response_done:
X***************
X*** 406,412 ****
X chmod (nam, 0600);
X
X fprintf (fp, "To: %s\n", mail_to);
X! fprintf (fp, "Subject: %s\n", note_h_subj);
X if (*note_h_followup) {
X fprintf (fp, "Newsgroups: %s\n\n", note_h_followup);
X } else {
X--- 419,425 ----
X chmod (nam, 0600);
X
X fprintf (fp, "To: %s\n", mail_to);
X! fprintf (fp, "Subject: (fwd) %s\n", note_h_subj);
X if (*note_h_followup) {
X fprintf (fp, "Newsgroups: %s\n\n", note_h_followup);
X } else {
X***************
X*** 436,442 ****
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != 'a' && ch != 'e' && ch != 's');
X
X switch (ch) {
X case 'e':
X--- 449,455 ----
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != ESC && ch != 'a' && ch != 'e' && ch != 's');
X
X switch (ch) {
X case 'e':
X***************
X*** 445,450 ****
X--- 458,464 ----
X break;
X
X case 'a':
X+ case ESC:
X unlink (nam);
X clear_message ();
X set_tin_uid_gid ();
X***************
X*** 527,532 ****
X--- 541,547 ----
X break;
X
X case 'a':
X+ case ESC:
X unlink (nam);
X clear_message ();
X set_tin_uid_gid ();
X***************
X*** 553,559 ****
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != 'a' && ch != 'e' && ch != 's');
X }
X
X mail_bug_report_done:
X--- 568,574 ----
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != ESC && ch != 'a' && ch != 'e' && ch != 's');
X }
X
X mail_bug_report_done:
X***************
X*** 619,624 ****
X--- 634,640 ----
X break;
X
X case 'a':
X+ case ESC:
X unlink (nam);
X clear_message ();
X set_tin_uid_gid ();
X***************
X*** 645,651 ****
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != 'a' && ch != 'e' && ch != 's');
X }
X
X mail_to_author_done:
X--- 661,667 ----
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != ESC && ch != 'a' && ch != 'e' && ch != 's');
X }
X
X mail_to_author_done:
X***************
X*** 756,762 ****
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != 'a' && ch != 'e' && ch != 'c');
X
X switch (ch) {
X case 'e':
X--- 772,778 ----
X MoveCursor (LINES, (int) strlen (msg)-1);
X if ((ch = ReadCh ()) == CR)
X ch = ch_default;
X! } while (ch != ESC && ch != 'a' && ch != 'e' && ch != 'c');
X
X switch (ch) {
X case 'e':
X***************
X*** 765,770 ****
X--- 781,787 ----
X break;
X
X case 'a':
X+ case ESC:
X unlink (cancel);
X clear_message ();
X set_tin_uid_gid ();
Xdiff -rcs 103/prompt.c 104/prompt.c
X*** 103/prompt.c Mon Sep 30 07:58:07 1991
X--- 104/prompt.c Mon Sep 30 20:51:37 1991
X***************
X*** 3,9 ****
X * Module : prompt.c
X * Author : R.Skrenta / I.Lea
X * Created : 01-04-91
X! * Updated : 10-08-91
X * Release : 1.0
X * Notes :
X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
X--- 3,9 ----
X * Module : prompt.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***************
X*** 38,43 ****
X--- 38,47 ----
X len = 1;
X ch = ReadCh ();
X while (ch != '\n' && ch != '\r') {
X+ if (ch == ESC) { /* Esc pressed so return */
X+ clear_message ();
X+ return -1;
X+ }
X if (ch == 8 || ch == 127) {
X if (len) {
X len--;
X***************
X*** 89,107 ****
X char *prompt;
X char *buf;
X {
X- int len;
X- int i;
X char ch;
X
X! clear_message();
X! MoveCursor(LINES,0);
X! printf("%s", prompt);
X! fflush(stdout);
X
X buf[0] = '\0';
X len = 0;
X ch = ReadCh();
X while (ch != '\n' && ch != '\r') {
X if (ch == 8 || ch == 127) {
X if (len) {
X len--;
X--- 93,179 ----
X char *prompt;
X char *buf;
X {
X char ch;
X+ int i, len;
X+ int max_len;
X
X! clear_message ();
X! MoveCursor (LINES,0);
X! printf ("%s", prompt);
X! fflush (stdout);
X
X buf[0] = '\0';
X len = 0;
X+ max_len = (COLS - strlen (prompt))-2;
X+ ch = ReadCh ();
X+
X+ while (ch != '\n' && ch != '\r') {
X+ if (ch == ESC) { /* Esc pressed so abort */
X+ clear_message ();
X+ return FALSE;
X+ }
X+ if (ch == 8 || ch == 127) {
X+ if (len) {
X+ len--;
X+ buf[len] = '\0';
X+ putchar ('\b');
X+ putchar (' ');
X+ putchar ('\b');
X+ } else {
X+ MoveCursor (LINES, 0);
X+ CleartoEOLN ();
X+ return (FALSE);
X+ }
X+ } else if (ch == 21) { /* control-U */
X+ for (i = len ; i > 0 ; i--) {
X+ putchar ('\b');
X+ putchar (' ');
X+ putchar ('\b');
X+ }
X+ buf[0] = '\0';
X+ len = 0;
X+ } else if (ch >= ' ' && len < max_len) {
X+ buf[len++] = ch;
X+ buf[len] = '\0';
X+ putchar (ch);
X+ } else {
X+ putchar (7);
X+ }
X+ fflush (stdout);
X+ ch = ReadCh ();
X+ }
X+ MoveCursor (LINES,0);
X+ CleartoEOLN ();
X+
X+ return TRUE;
X+ }
X+
X+ /*
X+ * parse_menu_string
X+ * get a string from the user
X+ * Return TRUE if a valid string was typed, FALSE otherwise
X+ */
X+
X+ int parse_menu_string (line, col, var)
X+ int line;
X+ int col;
X+ char *var;
X+ {
X+ char buf[LEN];
X+ char ch;
X+ int i, len;
X+ int max_len;
X+
X+ MoveCursor (line, col);
X+ buf[0] = '\0';
X+ len = 0;
X+ max_len = (COLS - col)-2;
X ch = ReadCh();
X+
X while (ch != '\n' && ch != '\r') {
X+ if (ch == ESC) { /* Esc pressed so abort */
X+ return FALSE;
X+ }
X if (ch == 8 || ch == 127) {
X if (len) {
X len--;
X***************
X*** 110,118 ****
X putchar(' ');
X putchar('\b');
X } else {
X! MoveCursor(LINES, 0);
X CleartoEOLN();
X- return(FALSE);
X }
X } else if (ch == 21) { /* control-U */
X for (i = len;i>0;i--) {
X--- 182,190 ----
X putchar(' ');
X putchar('\b');
X } else {
X! strcpy (var, buf);
X! MoveCursor(line, col);
X CleartoEOLN();
X }
X } else if (ch == 21) { /* control-U */
X for (i = len;i>0;i--) {
X***************
X*** 122,128 ****
X }
X buf[0] = '\0';
X len = 0;
X! } else if (ch >= ' ' && len < 60) {
X buf[len++] = ch;
X buf[len] = '\0';
X putchar (ch);
X--- 194,200 ----
X }
X buf[0] = '\0';
X len = 0;
X! } else if (ch >= ' ' && len < max_len) {
X buf[len++] = ch;
X buf[len] = '\0';
X putchar (ch);
X***************
X*** 131,139 ****
X fflush(stdout);
X ch = ReadCh();
X }
X- MoveCursor(LINES,0);
X- CleartoEOLN();
X
X return TRUE;
X }
X
X--- 203,212 ----
X fflush(stdout);
X ch = ReadCh();
X }
X
X+ if (buf[0]) {
X+ strcpy (var, buf);
X+ }
X return TRUE;
X }
X
X***************
X*** 159,165 ****
X clear_message();
X } else {
X MoveCursor (line, (int) strlen (prompt));
X! printf ("%c", ch);
X fflush (stdout);
X }
X
X--- 232,242 ----
X clear_message();
X } else {
X MoveCursor (line, (int) strlen (prompt));
X! if (ch == ESC) {
X! printf ("%c", default_ch);
X! } else {
X! printf ("%c", ch);
X! }
X fflush (stdout);
X }
X
Xdiff -rcs 103/proto.h 104/proto.h
X*** 103/proto.h Mon Sep 30 07:58:07 1991
X--- 104/proto.h Mon Sep 30 20:32:10 1991
X***************
X*** 113,119 ****
X void set_real_uid_gid(void);
X void set_tin_uid_gid(void);
X void notify_groups(void);
X! void basename(char *dirname, char *basename);
X void mail_setup(void);
X int mail_check(void);
X /* newsrc.c */
X--- 113,119 ----
X void set_real_uid_gid(void);
X void set_tin_uid_gid(void);
X void notify_groups(void);
X! void basename(char *dirname, char *program);
X void mail_setup(void);
X int mail_check(void);
X /* newsrc.c */
X***************
X*** 176,181 ****
X--- 176,182 ----
X /* prompt.c */
X int parse_num(int ch, char *prompt);
X int parse_string(char *prompt, char *buf);
X+ int parse_menu_string(int line, int col, char *var);
X int prompt_yn(int line, char *prompt, int default_ch);
X void continue_prompt(void);
X /* rcfile.c */
X***************
X*** 183,189 ****
X void write_rcfile(void);
X int change_rcfile(char *group, int kill_at_once);
X void show_rcfile_menu(void);
X- void parse_menu_string(int line, int col, char *var);
X void expand_rel_abs_pathname(int line, int col, char *str);
X void show_menu_help(char *help_message);
X /* save.c */
X--- 184,189 ----
X***************
X*** 206,214 ****
X void delete_processed_files(void);
X void post_process_patch(void);
X /* screen.c */
X! void info_message(char *msg);
X! void wait_message(char *msg);
X! void error_message(char *template, char *msg);
X void clear_message(void);
X void center_line(int line, int inverse, char *str);
X void draw_arrow(int line);
X--- 206,214 ----
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! void error_message(char *template, char *str);
X void clear_message(void);
X void center_line(int line, int inverse, char *str);
X void draw_arrow(int line);
X***************
X*** 366,372 ****
X void set_real_uid_gid(/*void*/);
X void set_tin_uid_gid(/*void*/);
X void notify_groups(/*void*/);
X! void basename(/*char *dirname, char *basename*/);
X void mail_setup(/*void*/);
X int mail_check(/*void*/);
X /* newsrc.c */
X--- 366,372 ----
X void set_real_uid_gid(/*void*/);
X void set_tin_uid_gid(/*void*/);
X void notify_groups(/*void*/);
X! void basename(/*char *dirname, char *program*/);
X void mail_setup(/*void*/);
X int mail_check(/*void*/);
X /* newsrc.c */
X***************
X*** 429,434 ****
X--- 429,435 ----
X /* prompt.c */
X int parse_num(/*int ch, char *prompt*/);
X int parse_string(/*char *prompt, char *buf*/);
X+ int parse_menu_string(/*int line, int col, char *var*/);
X int prompt_yn(/*int line, char *prompt, int default_ch*/);
X void continue_prompt(/*void*/);
X /* rcfile.c */
X***************
X*** 436,442 ****
X void write_rcfile(/*void*/);
X int change_rcfile(/*char *group, int kill_at_once*/);
X void show_rcfile_menu(/*void*/);
X- void parse_menu_string(/*int line, int col, char *var*/);
X void expand_rel_abs_pathname(/*int line, int col, char *str*/);
X void show_menu_help(/*char *help_message*/);
X /* save.c */
X--- 437,442 ----
X***************
X*** 459,467 ****
X void delete_processed_files(/*void*/);
X void post_process_patch(/*void*/);
X /* screen.c */
X! void info_message(/*char *msg*/);
X! void wait_message(/*char *msg*/);
X! void error_message(/*char *template, char *msg*/);
X void clear_message(/*void*/);
X void center_line(/*int line, int inverse, char *str*/);
X void draw_arrow(/*int line*/);
X--- 459,467 ----
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! void error_message(/*char *template, char *str*/);
X void clear_message(/*void*/);
X void center_line(/*int line, int inverse, char *str*/);
X void draw_arrow(/*int line*/);
Xdiff -rcs 103/rcfile.c 104/rcfile.c
X*** 103/rcfile.c Mon Sep 30 12:39:57 1991
X--- 104/rcfile.c Mon Sep 30 20:24:53 1991
X***************
X*** 3,9 ****
X * Module : rcfile.c
X * Author : I.Lea
X * Created : 01-04-91
X! * Updated : 29-09-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 : 30-09-91
X * Release : 1.0
X * Notes :
X * Copyright : (c) Copyright 1991 by Iain Lea
X***************
X*** 274,280 ****
X printf ("%s", (save_archive_name ? "ON " : "OFF"));
X fflush(stdout);
X }
X! } while (ch != CR);
X break;
X
X case 2: /* save sperate */
X--- 274,280 ----
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***************
X*** 286,292 ****
X printf ("%s", (save_separate ? "ON " : "OFF"));
X fflush(stdout);
X }
X! } while (ch != CR);
X break;
X
X case 3: /* mark saved articles read */
X--- 286,292 ----
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***************
X*** 298,304 ****
X printf ("%s", (mark_saved_read ? "ON " : "OFF"));
X fflush(stdout);
X }
X! } while (ch != CR);
X break;
X
X case 4: /* kill articles */
X--- 298,304 ----
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***************
X*** 312,318 ****
X printf ("%s", (kill_articles ? "ON " : "OFF"));
X fflush(stdout);
X }
X! } while (ch != CR);
X break;
X
X case 5: /* show subject & author / subject only */
X--- 312,318 ----
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***************
X*** 324,330 ****
X printf ("%s", (show_author ? "ON " : "OFF"));
X fflush(stdout);
X }
X! } while (ch != CR);
X break;
X
X case 6: /* draw -> / highlighted bar */
X--- 324,330 ----
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***************
X*** 336,342 ****
X printf ("%s", (draw_arrow_mark ? "ON " : "OFF"));
X fflush(stdout);
X }
X! } while (ch != CR);
X if (draw_arrow_mark == FALSE && inverse_okay == FALSE) {
X inverse_okay = TRUE;
X }
X--- 336,342 ----
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***************
X*** 351,357 ****
X printf ("%s", (print_header ? "ON " : "OFF"));
X fflush(stdout);
X }
X! } while (ch != CR);
X break;
X
X case 8: /* position cursor at first / last unread art */
X--- 351,357 ----
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***************
X*** 363,369 ****
X printf ("%s", (pos_first_unread ? "ON " : "OFF"));
X fflush(stdout);
X }
X! } while (ch != CR);
X break;
X
X case 9:
X--- 363,369 ----
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***************
X*** 406,412 ****
X printf ("%s", str);
X fflush(stdout);
X }
X! } while (ch != CR);
X break;
X case 10:
X show_menu_help (txt_help_sort_type);
X--- 406,412 ----
X printf ("%s", str);
X fflush(stdout);
X }
X! } while (ch != CR && ch != ESC);
X break;
X case 10:
X show_menu_help (txt_help_sort_type);
X***************
X*** 445,451 ****
X printf ("%s", str);
X fflush(stdout);
X }
X! } while (ch != CR);
X break;
X case 11:
X show_menu_help (txt_help_savedir);
X--- 445,451 ----
X printf ("%s", str);
X fflush(stdout);
X }
X! } while (ch != CR && ch != ESC);
X break;
X case 11:
X show_menu_help (txt_help_savedir);
X***************
X*** 547,608 ****
X
X show_menu_help (txt_select_rcfile_option);
X MoveCursor (LINES, 0);
X- }
X-
X- /*
X- * parse_menu_string
X- * get a string from the user
X- * Return TRUE if a valid string was typed, FALSE otherwise
X- */
X-
X- void parse_menu_string (line, col, var)
X- int line;
X- int col;
X- char *var;
X- {
X- char buf[LEN];
X- char ch;
X- int len;
X- int i;
X-
X- MoveCursor (line, col);
X- buf[0] = '\0';
X- len = 0;
X- ch = ReadCh();
X- while (ch != '\n' && ch != '\r') {
X- if (ch == 8 || ch == 127) {
X- if (len) {
X- len--;
X- buf[len] = '\0';
X- putchar('\b');
X- putchar(' ');
X- putchar('\b');
X- } else {
X- strcpy (var, buf);
X- MoveCursor(line, col);
X- CleartoEOLN();
X- }
X- } else if (ch == 21) { /* control-U */
X- for (i = len;i>0;i--) {
X- putchar('\b');
X- putchar(' ');
X- putchar('\b');
X- }
X- buf[0] = '\0';
X- len = 0;
X- } else if (ch >= ' ' && len < 60) {
X- buf[len++] = ch;
X- buf[len] = '\0';
X- putchar (ch);
X- } else
X- putchar(7);
X- fflush(stdout);
X- ch = ReadCh();
X- }
X-
X- if (buf[0]) {
X- strcpy (var, buf);
X- }
X }
X
X /*
X--- 547,552 ----
Xdiff -rcs 103/save.c 104/save.c
X*** 103/save.c Mon Sep 30 12:40:22 1991
X--- 104/save.c Wed Oct 2 18:52:25 1991
SHAR_EOF
echo "End of tin1.0 part 1"
echo "File tin.patch04 is continued in part 2"
echo "2" > shar3_seq_.tmp
exit 0
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.