home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-29 | 55.6 KB | 1,957 lines |
- Newsgroups: comp.sources.misc
- From: iain@estevax.uucp (Iain J. Lea)
- Subject: v26i076: tin - threaded full screen newsreader, Patch06a/5
- Message-ID: <csm-v26i076=tin.203815@sparky.IMD.Sterling.COM>
- X-Md4-Signature: df7c32207c302cc3c708ae4076f20ad8
- Date: Sat, 30 Nov 1991 02:39:01 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: iain@estevax.uucp (Iain J. Lea)
- Posting-number: Volume 26, Issue 76
- Archive-name: tin/patch06a
- Environment: BSD, SCO, ISC, SUNOS, SYSVR3, SYSVR4, ULTRIX, XENIX
- Patch-To: tin: Volume 23, Issue 15-23
-
- This is version 1.0 PL6 (patchlevel 6) of the tin newsreader.
-
- To apply this patch type the following in your source directory:
-
- patch < tin.patch06
-
- ************************************
- * Attention: *
- * - install patch06 and patch07 ! *
- * *
- * - a minor bugs has been found: *
- * after installation of the *
- * patches change: *
- * patchlevel.h: *
- * #define VERSION "1.0" *
- * #define PATCHLEVEL 7 *
- ************************************
-
- NOTE: This patch has not been as heavily tested on different machines
- and OS's as I would have liked. On my main development machine
- everything in this patch works OK. Your mileage may vary.
- Therefore please make a copy of your PL5 code before applying
- the following patch.
-
- NOTE: The index file format has changed as an extra field (full name)
- has been added.
- BEFORE RUNNING PL6 DELETE ALL OLD INDEX FILES IN ~/.tin/.index
-
- NOTE: PLEASE READ THE MAN PAGE tin.1 BEFORE SENDING A BUG REPORT/COMMENT.
-
- Major improvements over tin 1.0 PL5 are the following:
-
- o Added support for Minix 386.
-
- o Can now display From: line address part/full name/both format.
-
- o Displays all articles/only unread articles. Configurable by M options menu.
- NOTE: This is a little flakey and will be improved on in the next patch.
-
- o Scroll half/full page of groups/articles. Configurable by M options menu.
-
- o Thread/unthread all groups. Configurable by M options menu.
-
- o Added -M option to mail new news to specified user.
-
- o Fixed (I hope) scrolling in Sun cmdtool windows when invoking a shell.
-
- For more bugs fixes, other changes & additions read the CHANGES & TODO files.
-
- #!/bin/sh
- # This is tin, a shell archive (shar 3.24)
- # made 11/04/1991 18:13 UTC by iain@estevax.uucp
- # Source directory /piez/iain/tin/106
- #
- # 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
- # ------ ---------- ------------------------------------------
- # 228422 -rw------- tin.patch06
- #
- 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.patch06 ==============
- echo "x - extracting tin.patch06 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > tin.patch06 &&
- Xdiff -rcs ../105/CHANGES ./CHANGES
- X*** ../105/CHANGES Wed Oct 16 20:01:50 1991
- X--- ./CHANGES Mon Nov 4 18:14:01 1991
- X***************
- X*** 1,3 ****
- X--- 1,108 ----
- X+ CHANGES tin v1.0 PL5 -> tin 1.0 PL6
- X+ -----------------------------------
- X+
- X+ 1) profile@netcon.com (Tom Czarnik)
- X+ BUG. When in the group selection level the 't' command redraws the
- X+ screen which is not necessary.
- X+ FIX. select.c - removed 't' command that redrew the screen.
- X+
- X+ 2) ted@isgtec.UUCP (Ted Richards)
- X+ BUG. It would be nice if the PgUp PgDn commands could page half/whole page.
- X+ FIX. group.c select.c - added code to allow half/full screen paging.
- X+
- X+ 3) bill@polygen.com (Bill Poitras)
- X+ BUG. The definition of getenv() in curses.c is wrong for ANSI C.
- X+ FIX. curses.c - removed getenv() definition.
- X+
- X+ 4) unido!asd.tds.philips.se!kko (Karl-Koenig Koenigsson)
- X+ BUG. PL5 removed the INEWSDIR define from tin.h which causes post.c
- X+ to not be able to post articles because inews was not in path.
- X+ FIX. tin.h - readded INEWSDIR define.
- X+
- X+ 5) iain@estevax.uucp (Iain Lea)
- X+ ADD. search.c - increased search speed by removing strlen (search_pattern)
- X+ from str_str() routine so that it is only called once and not every
- X+ time through the search loop.
- X+
- X+ 6) iain@estevax.uucp (Iain Lea)
- X+ ADD. post.c - added 'uname -a' to mail_bug_report() so that user does not
- X+ have to enter as much info.
- X+
- X+ 7) iain@estevax.uucp (Iain Lea)
- X+ ADD. rcfile.c - added thread/unthread all groups to Options menu. Default
- X+ action is thread all groups.
- X+
- X+ 8) profile@netcon.com (Tom Czarnik)
- X+ BUG. Things are not consistant when moving to the last page of groups/arts.
- X+ Instead of rearranging the the groups/arts to allow the last page to
- X+ fill the screen, list only the ones that are left.
- X+ FIX. group.c select.c - modified display code when displaying last page.
- X+
- X+ 9) werner@mx321 (Sven Werner)
- X+ BUG. lpr is not found when printing on SNI Sinix machine. Also -P is -dru=.
- X+ FIX. tin.h feed.c - modified printer code to handle SNI Sinix machines.
- X+
- X+ 10) ndd@sunbar.mc.duke.edu (Ned Danieley)
- X+ BUG. In art.c there are 2 places where an array index could be negative.
- X+ FIX. art.c - applied supplied patch. Thanx for the patch.
- X+
- X+ 11) m31z@jupiter.sun.csd.unb.ca (Steven Cogswell)
- X+ BUG. If there are more than 9999 unread articles the screen will be
- X+ screwed up because the line is too long.
- X+ FIX. select.c tin.h - changed to handle > 9999 unread articles.
- X+
- X+ 12) unido!tintin.rivm.nl!a3 (Adri Verhoef)
- X+ BUG. When using tin my options line is turned into a newsgroup.
- X+ FIX. newsrc.c - added supplied patch. Thanx for the patch.
- X+
- X+ 13) unido!tintin.rivm.nl!a3 (Adri Verhoef)
- X+ BUG. NNTP'ed files are not closed.
- X+ FIX. open.c - added supplied patch. Thanx for the patch.
- X+
- X+ 14) uunet!peora!satchmo!bermls!brent (Brent Ermlick)
- X+ BUG. Added support for Minix 386 & also found a few memory problems.
- X+ FIX. Applied supplied patch. Thanx for the patch.
- X+
- X+ 15) admin@summa4.mv.com (Scott Babb)
- X+ BUG. Display authors name from From: line as in nn newsreader.
- X+ FIX. Added code to display From: line address part / full name / all.
- X+ Configurable by M options menu.
- X+
- X+ 16) m31z@jupiter.sun.csd.unb.ca (Steven Cogswell)
- X+ BUG. When in a Sun Cmdtool window and you do a command that leaves tin
- X+ and then comes back, the screen is not reset correctly.
- X+ FIX. misc.c - added ti and te termcap codes to invoke_cmd().
- X+
- X+ 17) teslab.lab.oz.au!andrew (Andrew Phillips)
- X+ BUG. There is a very strange use of atoi() in misc.c
- X+ FIX. misc.c - I totally agree and have changed it to a sprintf().
- X+
- X+ 18) hakanl@lulea.telesoft.se (Hakan Lennestal)
- X+ BUG. post.c - cleanup of setuid() calls.
- X+ FIX. applied the supplied patch. Thanx for the patch.
- X+
- X+ 19) unido!kiae.su!vak
- X+ BUG. Your parse_from() cannot handle From: lines of form
- X+ From: Full Name (user@domain.ext)
- X+ And some other odd formats. Thanx for the supplied patch.
- X+ FIX. misc.c - applied supplied patch.
- X+
- X+ 20) takahasi@tiny.or.jp (Hironobu Takahashi)
- X+ BUG. seteuid() & setegid() are not sufficient on BSD machines.
- X+ FIX. misc.c - changed seteuid() setegid() calls to setreuid()
- X+ and setregid() calls. Thanx for the supplied patch.
- X+
- X+ 21) iain@estevax.uucp (Iain Lea)
- X+ ADD. added code to allow displaying of all articles/only unread articles.
- X+
- X+ 22) teslab.lab.oz.au!andrew (Andrew Phillips)
- X+ BUG. There is a major bug in page.c line 822:
- X+ tmp[LEN] = '\0';
- X+ This causes the saved frame pointer (ebp) to be overwritten
- X+ causing major problems when show_first_header() returns to
- X+ show_note_page().
- X+ FIX. Changed tmp[LEN] = '\0'; to tmp[LEN-1] = '\0';
- X+
- X CHANGES tin v1.0 PL4 -> tin 1.0 PL5
- X -----------------------------------
- X
- Xdiff -rcs ../105/MANIFEST ./MANIFEST
- X*** ../105/MANIFEST Wed Oct 16 20:10:41 1991
- X--- ./MANIFEST Mon Nov 4 19:13:32 1991
- X***************
- X*** 1,40 ****
- X! MANIFEST for tin newsreader (Wed Oct 16 20:10:39 MET 1991)
- X ----------------------------------------------------------
- X! 5316 README
- X! 23382 CHANGES
- X! 2481 TODO
- X 530 UPDATE_INDEX
- X! 10557 Makefile
- X! 27922 tin.1
- X 2247 wildmat.3
- X! 37038 tin.nrf
- X! 10177 tin.h
- X! 9798 lang.h
- X 3720 nntp.h
- X! 17521 proto.h
- X 21 patchlevel.h
- X! 28321 art.c
- X! 6759 curses.c
- X! 2631 debug.c
- X! 11855 feed.c
- X! 19765 group.c
- X 2620 hashstr.c
- X 5227 help.c
- X! 10479 kill.c
- X! 18262 lang.c
- X! 8503 main.c
- X! 6239 memory.c
- X! 22027 misc.c
- X! 19741 newsrc.c
- X! 7000 open.c
- X! 25404 page.c
- X! 17638 post.c
- X 4687 prompt.c
- X! 17897 rcfile.c
- X! 19687 save.c
- X! 2185 screen.c
- X! 7811 search.c
- X! 19137 select.c
- X! 7795 signal.c
- X 4749 wildmat.c
- X! 447129 total
- X--- 1,40 ----
- X! MANIFEST for tin newsreader (Mon Nov 4 19:13:30 MET 1991)
- X ----------------------------------------------------------
- X! 4057 README
- X! 27968 CHANGES
- X! 2291 TODO
- X 530 UPDATE_INDEX
- X! 10905 Makefile
- X! 29528 tin.1
- X 2247 wildmat.3
- X! 39218 tin.nrf
- X! 10754 tin.h
- X! 10196 lang.h
- X 3720 nntp.h
- X! 17743 proto.h
- X 21 patchlevel.h
- X! 29913 art.c
- X! 6944 curses.c
- X! 3170 debug.c
- X! 12187 feed.c
- X! 21400 group.c
- X 2620 hashstr.c
- X 5227 help.c
- X! 11241 kill.c
- X! 18912 lang.c
- X! 8945 main.c
- X! 6241 memory.c
- X! 25183 misc.c
- X! 19753 newsrc.c
- X! 7180 open.c
- X! 24844 page.c
- X! 17973 post.c
- X 4687 prompt.c
- X! 20698 rcfile.c
- X! 19945 save.c
- X! 2244 screen.c
- X! 8185 search.c
- X! 20520 select.c
- X! 7940 signal.c
- X 4749 wildmat.c
- X! 469879 total
- Xdiff -rcs ../105/Makefile ./Makefile
- X*** ../105/Makefile Thu Oct 17 19:22:45 1991
- X--- ./Makefile Mon Nov 4 19:11:30 1991
- X***************
- X*** 78,85 ****
- X STRIP = strip
- X ROFF = + drf -F Helvetica -man3
- X PRINT= -Pps0
- X! BASE_VER = ../104
- X! PATCH_VER = 05
- X
- X HFILES = tin.h lang.h nntp.h proto.h patchlevel.h
- X
- X--- 78,85 ----
- X STRIP = strip
- X ROFF = + drf -F Helvetica -man3
- X PRINT= -Pps0
- X! BASE_VER = ../105
- X! PATCH_VER = 06
- X
- X HFILES = tin.h lang.h nntp.h proto.h patchlevel.h
- X
- X***************
- X*** 95,100 ****
- X--- 95,102 ----
- X
- X LINTFLAGS=-a -c -h -n -x
- X
- X+ CC=cc
- X+
- X .c.o:
- X $(CC) $(CFLAGS) $*.c
- X
- X***************
- X*** 108,113 ****
- X--- 110,116 ----
- X @echo " make xenix (Xenix 386)"
- X @echo " make sinix (SNI SysV)"
- X @echo " make tower (NCR Tower)"
- X+ @echo " make minix (Minix 386)"
- X
- X # For Berkeley systems:
- X # NNTPLIB=clientlib.o \
- X***************
- X*** 133,139 ****
- X #
- X aix:
- X @echo "Compiling for AIX..."
- X! @$(MAKE) CFLAGS='-c -O -DSYSV -DRS6000 -DUSE_LONG_FILENAMES -DAUTO_RESIZE -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
- X LIBS="-lcurses -ltermcap" \
- X EXE=tin linkit
- X
- X--- 136,142 ----
- X #
- X aix:
- X @echo "Compiling for AIX..."
- X! @$(MAKE) CFLAGS='-c -O -DSYSV -DRS6000 -DREAD_CHAR_HACK -DUSE_LONG_FILENAMES -DAUTO_RESIZE -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
- X LIBS="-lcurses -ltermcap" \
- X EXE=tin linkit
- X
- X***************
- X*** 173,179 ****
- X #
- X sinix:
- X @echo "Compiling for SNI Sinix..."
- X! @$(MAKE) CFLAGS='-c -O -DBSD -DSINIX -DUSE_MKDIR -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
- X LIBS="-lcurses" \
- X EXE=tin linkit
- X
- X--- 176,182 ----
- X #
- X sinix:
- X @echo "Compiling for SNI Sinix..."
- X! @$(MAKE) CFLAGS='-c -O -DBSD -DSINIX -DLOG_USER -DUSE_MKDIR -DAUTO_RESIZE -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
- X LIBS="-lcurses" \
- X EXE=tin linkit
- X
- X***************
- X*** 187,196 ****
- X LIBS="-lcurses -ltermcap" \
- X EXE=tin linkit
- X
- X # SITE SPECIFIC - IGNORE
- X norisc:
- X @echo "Compiling for NORISC with NNTP..."
- X! @$(MAKE) CFLAGS='-c -g -DREAD_CHAR_HACK -DBSD -DUSE_NNTP -DAUTO_RESIZE -DLIBDIR=\"/news/lib\" -DSPOOLDIR=\"/news/spool\"' \
- X NNTPLIB=/news/nntp/clientlib.o \
- X LIBS="-lcurses -ltermcap" \
- X EXE=tin linkit
- X--- 190,208 ----
- X LIBS="-lcurses -ltermcap" \
- X EXE=tin linkit
- X
- X+ # For Minix 386:
- X+ #
- X+ minix:
- X+ @echo "Compiling for Minix 386..."
- X+ @$(MAKE) CFLAGS='-c -O -DMINIX -D_POSIX_SOURCE -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
- X+ LIBS="-lcurses" \
- X+ EXE=tin linkit
- X+ chmem +131072 $(EXE)
- X+
- X # SITE SPECIFIC - IGNORE
- X norisc:
- X @echo "Compiling for NORISC with NNTP..."
- X! @$(MAKE) CFLAGS='-c -g -DBSD -DLOG_USER -DUSE_NNTP -DAUTO_RESIZE -DLIBDIR=\"/news/lib\" -DSPOOLDIR=\"/news/spool\"' \
- X NNTPLIB=/news/nntp/clientlib.o \
- X LIBS="-lcurses -ltermcap" \
- X EXE=tin linkit
- X***************
- X*** 270,275 ****
- X--- 282,289 ----
- X
- X diff:
- X @echo "Generating diffs against $(BASE_VER)..."
- X+ @make nroff
- X+ @make manifest
- X @-mv -f $(EXE).diff $(EXE).diff-
- X @-diff -rcs $(BASE_VER) . > $(EXE).diff
- X @ls -l $(EXE).diff
- X***************
- X*** 278,284 ****
- X @make diff
- X @echo "Generating patch against $(BASE_VER)..."
- X @-mv $(EXE).diff $(EXE).patch$(PATCH_VER)
- X! @shar -a -n $(EXE) -s iain@estevax.uucp -L50 -o patch$(PATCH_VER).shar $(EXE).patch$(PATCH_VER)
- X @ls -l patch$(PATCH_VER).shar*
- X
- X tar:
- X--- 292,298 ----
- X @make diff
- X @echo "Generating patch against $(BASE_VER)..."
- X @-mv $(EXE).diff $(EXE).patch$(PATCH_VER)
- X! @shar -a -n $(EXE) -s iain@estevax.uucp -L55 -o patch$(PATCH_VER).shar $(EXE).patch$(PATCH_VER)
- X @ls -l patch$(PATCH_VER).shar*
- X
- X tar:
- Xdiff -rcs ../105/README ./README
- X*** ../105/README Wed Oct 16 19:57:54 1991
- X--- ./README Mon Nov 4 18:04:28 1991
- X***************
- X*** 1,66 ****
- X! This is version 1.0 PL5 (patchlevel 5) of the tin newsreader.
- X
- X! NOTE: Due to a number of things (i.e., department change, lose of
- X! main net connection) this patch has not been as heavily tested
- X! on different machines and OS's. On my main development machine
- X everything in this patch works OK. Your mileage may vary.
- X! Therefore please make a copy of your PL4 code before applying
- X the following patch.
- X
- X! Major improvements over tin 1.0 PL4 are the following:
- X
- X! o Added support for IBM RS/6000, NCR Tower, AT&T UNIXPC & SNI Sinix.
- X
- X! o Fixed -U option when reading news via NNTP.
- X
- X! o Fixed highlighted bar operation on some terminals.
- X
- X! o Fixed cursor movement & inverse video in cmdtool window on SunOS.
- X
- X! o Fixed setuid() & setgid() problems.
- X
- X! o Fixed handling of 8 bit problems.
- 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! And now for a bit of blurb from the original version...
- X
- X! Tin is a full screen threaded newsreader that uses the tass newsreader as
- X! its base. Tass was developed by Rich Skrenta (skrenta@blekko.commodore.com).
- X! Tin can read news locally and also via an NNTP server (-r option). Tin
- X! contains more features than tass but they are still accessable to the
- X! beginner and expert alike. I tried to follow the tass UI conventions as
- X! much as possible.
- X
- X! This is the only newsreader that I know of that threads on the Archive-name:
- X! field as used in comp.sources.* groups as well as on the more normal Subject:
- X! field. Before anyone comments on Subject: threading not being right and I
- X! should look at trn, I have and its threads are neat but I get more done with
- X! tin than trn. It is especially good at saving and processing saved articles
- X! & threads.
- X
- X! o Organizes articles by threads. Displays a really nice article selection
- X! page.
- X!
- X! o Group selection page makes it easy to scan newsgroups, subscribe,
- X! unsubscribe, reorder your .newsrc.
- X!
- X! o If you've ever used tass/notes, this is the program for you.
- X! Tin looks a lot like tass, but has many improvements.
- X!
- X! Newsreading style under tin tends to be different than with rn. Instead of
- X! plowing through each group reading everything unread, you may find yourself
- X! reading fewer articles in more groups. It's easier to skip about and only
- X! read interesting threads with tin.
- X!
- X! Tin keeps an index file for each group. The first time you enter a group,
- X! it will be a bit slow creating this file. After that it will incrementally
- X! update the index file and there should be little delay.
- X!
- X! I may be off the net for a couple of months at the end of September, but
- X! will be contactable at the following address:
- X Iain J. Lea
- X BrueckenStr. 12
- X 8500 Nuernberg 90
- X--- 1,39 ----
- X! This is version 1.0 PL6 (patchlevel 6) of the tin newsreader.
- X
- X! NOTE: This patch has not been as heavily tested on different machines
- X! and OS's as I would have liked. On my main development machine
- X everything in this patch works OK. Your mileage may vary.
- X! Therefore please make a copy of your PL5 code before applying
- X the following patch.
- X
- X! NOTE: The index file format has changed as an extra field (full name)
- X! has been added.
- X! BEFORE RUNNING PL6 DELETE ALL OLD INDEX FILES IN ~/.tin/.index
- X
- X! NOTE: PLEASE READ THE MAN PAGE tin.1 BEFORE SENDING A BUG REPORT/COMMENT.
- X
- X! Major improvements over tin 1.0 PL5 are the following:
- X
- X! o Added support for Minix 386.
- X
- X! o Can now display From: line address part/full name/both format.
- X
- X! o Displays all articles/only unread articles. Configurable by M options menu.
- X! NOTE: This is a little flakey and will be improved on in the next patch.
- X
- X! o Scroll half/full page of groups/articles. Configurable by M options menu.
- X
- X! o Thread/unthread all groups. Configurable by M options menu.
- X
- X! o Added -M option to mail new news to specified user.
- X
- X! o Fixed (I hope) scrolling in Sun cmdtool windows when invoking a shell.
- 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! I am off the net for a couple of months, but am contactable at this address:
- X Iain J. Lea
- X BrueckenStr. 12
- X 8500 Nuernberg 90
- X***************
- X*** 67,74 ****
- X Germany.
- X Phone. +49-911-331963 (home)
- X Phone. +49-911-3089-407 (work)
- X! Email. iain@estevax.uucp (will only be reading mailbox weekly)
- X
- X Built & used on the following machines
- X --------------------------------------
- X 1) Vax 8850 & Ultrix 4.1 (Developed on & most tested platform)
- X--- 40,58 ----
- X Germany.
- X Phone. +49-911-331963 (home)
- X Phone. +49-911-3089-407 (work)
- X! Email. iain@estevax.uucp (only reading mailbox weekly)
- X
- X+ Building Tin
- X+ ------------
- X+ 1) type 'make' and a few system types will be displayed
- X+ 2) edit Makefile if you want to add/change -D DEFINES
- X+ 3) type 'make <system type>' to compile for your system
- X+ 4) type 'make install' / 'make install_setuid' to install
- X+
- X+ NB. NNTP (NetNews Transport Protocol RFC 977) is required if you
- X+ wish to read news remotely. It is a seperate package that is
- X+ available from many FTP and mailserver sites.
- X+
- X Built & used on the following machines
- X --------------------------------------
- X 1) Vax 8850 & Ultrix 4.1 (Developed on & most tested platform)
- X***************
- X*** 90,110 ****
- X 17) IBM RS/6000 & AIX 3.1.5
- X 18) SNI MX300 & Sinix 5.22
- X 19) NCR Tower & SysV
- X
- X- Building Tin
- X- ------------
- X- 1) type 'make' and a few system types will be displayed
- X- 2) edit Makefile if you want to add/change -D DEFINES
- X- 3) type 'make <system type>' to compile for your system
- X- 4) type 'make install' / 'make install_setuid' to install
- X-
- X- Note: the supplied Makefile will not run directly on BSD. It
- X- requires a little work (Any takers to write a good Makefile?)
- X-
- X- NB. NNTP (NetNews Transport Protocol RFC 977) is required if you
- X- wish to read news remotely. It is a seperate package that is
- X- available from many FTP and mailserver sites.
- X-
- X Credits
- X -------
- X I wish to give credit to the following people for the routines
- X--- 74,81 ----
- X 17) IBM RS/6000 & AIX 3.1.5
- X 18) SNI MX300 & Sinix 5.22
- X 19) NCR Tower & SysV
- X+ 20) 386 PC & Minix 386
- X
- X Credits
- X -------
- X I wish to give credit to the following people for the routines
- X***************
- X*** 117,133 ****
- X
- X I wish to thank the following people for supplying patchs:
- X
- X! Anton Aylward, Carl Hage, Ed Hanway, Karl-Koenig Koenigsson, Kris Kugel,
- X! Hakan Lennestal, Clifford Luke, Bill Poitras, Nickolay Saukh, Rich Salz,
- X! Bart Sears, Karl-Olav Serrander, Doug Sewell, Cliff Stanford, Adri Verhoef,
- X! Cary Whitney
- X
- X I wish to thank the following people for bug reports/comments:
- X
- X! Klaus Arzig, Reiner Balling, Volker Beyer, Roger Binns, Georg Biehler,
- X! Ian Brown, Andreas Brosig, David Donovan, Peter Dressler, Gerhard Ermer,
- X! Hugh Fader, Joachim Feld, Paul Fox, Bernhard Gmelch, Viet Hoang,
- X! Torsten Homeyer, Andy Jackson, Joe Johnson, Cyrill Jung, Hans-Juergen
- X! Knopp, Bob Lukas, Phillip Molloy, Toni Metz, Greg Miller, Klaus Neuberger,
- X! Otto Niesser, Reiner Oelhaf, Wolf Paul, Fredy Schwatz, Bernd Schwerin,
- X! Klamer Schutte, Chris Smith, Steve Spearman
- X--- 88,105 ----
- X
- X I wish to thank the following people for supplying patchs:
- X
- X! Anton Aylward, Ned Danieley, Brent Ermlick, Carl Hage, Ed Hanway,
- X! Karl-Koenig Koenigsson, Kris Kugel, Hakan Lennestal, Clifford Luke,
- X! Bill Poitras, Nickolay Saukh, Rich Salz, Bart Sears, Karl-Olav Serrander,
- X! Doug Sewell, Cliff Stanford, Adri Verhoef, Cary Whitney
- X
- X I wish to thank the following people for bug reports/comments:
- X
- X! Klaus Arzig, Scott Babb, Reiner Balling, Volker Beyer, Roger Binns, Georg Biehler,
- X! Ian Brown, Andreas Brosig, Steven Cogswell, Tom Czarnik, David Donovan,
- X! Peter Dressler, Gerhard Ermer, Hugh Fader, Joachim Feld, Paul Fox,
- X! Bernhard Gmelch, Viet Hoang, Torsten Homeyer, Andy Jackson, Joe Johnson,
- X! Cyrill Jung, Hans-Juergen Knopp, Bob Lukas, Phillip Molloy, Toni Metz,
- X! Greg Miller, Klaus Neuberger, Otto Niesser, Reiner Oelhaf, Wolf Paul,
- X! Andrew Phillips, Ted Richards, Fredy Schwatz, Bernd Schwerin, Klamer Schutte,
- X! Chris Smith, Steve Spearman, Hironobu Takahashi, Sven Werner
- Xdiff -rcs ../105/TODO ./TODO
- X*** ../105/TODO Wed Oct 16 19:58:46 1991
- X--- ./TODO Thu Oct 31 13:38:42 1991
- X***************
- X*** 1,5 ****
- X--- 1,7 ----
- X FIX FEATURES
- X ------------
- X+ o Fix -M option to mail new news to specified user
- X+
- X o Fix uuscram code in uudecode.
- X
- X o Fix code to sort arts. At page level funny things happen.
- X***************
- X*** 19,25 ****
- 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--- 21,27 ----
- 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. look at top_base and setup_base() also for killing.
- X
- X ADD FEATURES
- X ------------
- X***************
- X*** 29,42 ****
- X o Add code to reread Subject: & To: line before posting. Make
- X Find_new_to() more flexible (ie. func("Subject:", string) ).
- X
- X- o Add 2nd page to 'M' Options menu and put on the options:
- X- 1) ask user if to update read groups on exits (al a vn)
- 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- o Add mail/save to -S option. Selectable by 'M' menu.
- X-
- X o Add crossposting of articles so that read ones are marked read in
- X other groups. in rn it uses Xref: line to do this. Perhaps just
- X use update_group() to do it?
- X--- 31,38 ----
- X***************
- X*** 49,56 ****
- X o Add 'H' context senstive level help screens
- X
- X o Sort .newsrc according to preference. (sort active file as it is read)
- X-
- X- o Add code to do unpack patches
- X
- X o Add time period kill article
- X
- X--- 45,50 ----
- XFiles ../105/UPDATE_INDEX and ./UPDATE_INDEX are identical
- Xdiff -rcs ../105/art.c ./art.c
- X*** ../105/art.c Thu Oct 10 20:10:50 1991
- X--- ./art.c Mon Nov 4 18:41:45 1991
- X***************
- X*** 3,9 ****
- X * Module : art.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 : art.c
- X * Author : R.Skrenta / I.Lea
- X * Created : 01-04-91
- X! * Updated : 04-11-91
- X * Release : 1.0
- X * Notes :
- X * Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
- X***************
- X*** 26,53 ****
- X
- X
- X /*
- X- * Convert a string to a long, only look at first n characters
- X- */
- X-
- X- long my_atol (s, n)
- X- char *s;
- X- int n;
- X- {
- X- long ret = 0;
- X-
- X- while (*s && n--) {
- X- if (*s >= '0' && *s <= '9')
- X- ret = ret * 10 + (*s - '0');
- X- else
- X- return -1;
- X- s++;
- X- }
- X-
- X- return ret;
- X- }
- X-
- X-
- X- /*
- X * Construct the pointers to the basenotes of each thread
- X * arts[] contains every article in the group. inthread is
- X * set on each article that is after the first article in the
- X--- 26,31 ----
- X***************
- X*** 55,72 ****
- X * set to -2 (ART_EXPIRED).
- X */
- X
- X! void find_base ()
- X {
- X! int i;
- X
- X top_base = 0;
- X
- X! for (i = 0; i < top; i++)
- X! if (! arts[i].inthread && arts[i].thread != ART_EXPIRED) {
- X! if (top_base >= max_art)
- X! expand_art ();
- X! base[top_base++] = i;
- X }
- X }
- X
- X /*
- X--- 33,76 ----
- X * set to -2 (ART_EXPIRED).
- X */
- X
- X! void find_base (only_unread)
- X! int only_unread;
- X {
- X! register int i;
- X! register int j;
- X
- X top_base = 0;
- X
- X! debug_print_arts ();
- X!
- X! if (only_unread) {
- X! for (i = 0; i < top; i++) {
- X! if (arts[i].thread != ART_EXPIRED && arts[i].inthread == FALSE) {
- X! if (top_base >= max_art) {
- X! expand_art ();
- X! }
- X! if (arts[i].unread == ART_UNREAD) {
- X! base[top_base++] = i;
- X! } else {
- X! for (j = i ; j >= 0 ; j = arts[j].thread) {
- X! if (arts[j].unread) {
- X! base[top_base++] = i;
- X! break;
- X! }
- X! }
- X! }
- X! }
- X }
- X+ } else {
- X+ for (i = 0; i < top; i++) {
- X+ if (! arts[i].inthread && arts[i].thread != ART_EXPIRED) {
- X+ if (top_base >= max_art) {
- X+ expand_art ();
- X+ }
- X+ base[top_base++] = i;
- X+ }
- X+ }
- X+ }
- X }
- X
- X /*
- X***************
- X*** 103,109 ****
- X return -1;
- X }
- X
- X-
- X /*
- X * Return TRUE if arts[] contains any expired articles
- X * (articles we have an entry for which don't have a corresponding
- X--- 107,112 ----
- X***************
- X*** 121,127 ****
- X return FALSE;
- X }
- X
- X-
- X /*
- X * Main group indexing routine. Group should be the name of the
- X * newsgroup, i.e. "comp.unix.amiga". group_path should be the
- X--- 124,129 ----
- X***************
- X*** 203,209 ****
- X } else {
- X dump_index (group, FALSE);
- X make_threads (FALSE);
- X! find_base ();
- X }
- X
- X if (local_index) {
- X--- 205,211 ----
- X } else {
- X dump_index (group, FALSE);
- X make_threads (FALSE);
- X! find_base (show_only_unread);
- X }
- X
- X if (local_index) {
- X***************
- X*** 211,221 ****
- X }
- X } else {
- X make_threads (FALSE);
- X! find_base ();
- X }
- X
- X if ((modified || killed) && ! update) {
- X! clear_message();
- X }
- X }
- X
- X--- 213,223 ----
- X }
- X } else {
- X make_threads (FALSE);
- X! find_base (show_only_unread);
- X }
- X
- X if ((modified || killed) && ! update) {
- X! clear_message ();
- X }
- X }
- X
- X***************
- X*** 318,325 ****
- X /*
- X * .thread & .inthread need to be reset if re-threading arts[]
- X */
- X! if (rethread && thread_arts &&
- X! active[my_group[cur_groupnum]].thread) {
- X for (i=0 ; i < top ; i++) {
- X arts[i].thread = ART_NORMAL;
- X arts[i].inthread = FALSE;
- X--- 320,326 ----
- X /*
- X * .thread & .inthread need to be reset if re-threading arts[]
- X */
- X! if (rethread && active[my_group[cur_groupnum]].thread) {
- X for (i=0 ; i < top ; i++) {
- X arts[i].thread = ART_NORMAL;
- X arts[i].inthread = FALSE;
- X***************
- X*** 364,416 ****
- X }
- X }
- X
- X- /*
- X- * Return a pointer into s eliminating any leading Re:'s. Example:
- X- *
- X- * Re: Reorganization of misc.jobs
- X- * ^ ^
- X- */
- X
- X- char *eat_re (s)
- X- char *s;
- X- {
- X-
- X- while (*s == 'r' || *s == 'R') {
- X- if ((*(s+1) == 'e' || *(s+1) == 'E')) {
- X- if (*(s+2) == ':')
- X- s += 3;
- X- else if (*(s+2) == '^' && isdigit(*(s+3)) && *(s+4) == ':')
- X- s += 5; /* hurray nn */
- X- else
- X- break;
- X- } else
- X- break;
- X- while (*s == ' ')
- X- s++;
- X- }
- X-
- X- return s;
- X- }
- X-
- X- /*
- X- * Hash the subjects (after eating the Re's off) for a quicker
- X- * thread search later. We store the hashes for subjects in the
- X- * index file for speed.
- X- */
- X-
- X- long hash_s (s)
- X- char *s;
- X- {
- X- long h = 0;
- X- unsigned char *t = (unsigned char *) s;
- X-
- X- while (*t)
- X- h = h * 64 + *t++;
- X-
- X- return h;
- X- }
- X-
- X-
- X int parse_headers (fd, h)
- X int fd;
- X struct header *h;
- X--- 365,371 ----
- X***************
- X*** 417,422 ****
- X--- 372,379 ----
- X {
- X char buf[HEADER_LEN];
- X char buf2[HEADER_LEN];
- X+ char art_from_addr[LEN];
- X+ char art_full_name[LEN];
- X char *ptr, *ptrline, *s;
- X int n = 0, len = 0, lineno = 0;
- X int flag;
- X***************
- X*** 444,450 ****
- X lineno++;
- X
- X if (! got_from && match_header(ptrline, "From", buf2, HEADER_LEN)) {
- X! h->from = hash_str (buf2);
- X got_from = TRUE;
- X } else if (! got_subject && match_header(ptrline, "Subject", buf2, HEADER_LEN)) {
- X s = eat_re (buf2);
- X--- 401,409 ----
- X lineno++;
- X
- X if (! got_from && match_header(ptrline, "From", buf2, HEADER_LEN)) {
- X! parse_from (buf2, art_from_addr, art_full_name);
- X! h->from = hash_str (art_from_addr);
- X! h->name = hash_str (art_full_name);
- X got_from = TRUE;
- X } else if (! got_subject && match_header(ptrline, "Subject", buf2, HEADER_LEN)) {
- X s = eat_re (buf2);
- X***************
- X*** 523,534 ****
- X if (sort_art_type != SORT_BY_NOTHING) {
- X qsort (arts, top, sizeof (struct header), artnum_comp);
- X }
- X! fprintf(fp, "%s\n", group);
- X! fprintf(fp, "%d\n", num_of_arts ());
- X! if (last_read_article > arts[top-1].artnum) {
- X! fprintf(fp, "%ld\n", last_read_article);
- X } else {
- X! fprintf(fp, "%ld\n", arts[top-1].artnum);
- X }
- X if (index_file_killed && killed) {
- X fprintf (fp, "KILLED\n");
- X--- 482,497 ----
- X if (sort_art_type != SORT_BY_NOTHING) {
- X qsort (arts, top, sizeof (struct header), artnum_comp);
- X }
- X! fprintf (fp, "%s\n", group);
- X! fprintf (fp, "%d\n", num_of_arts ());
- X! if (top <= 0) {
- X! fprintf (fp, "0\n");
- X } else {
- X! if (last_read_article > arts[top-1].artnum) {
- X! fprintf (fp, "%ld\n", last_read_article);
- X! } else {
- X! fprintf (fp, "%ld\n", arts[top-1].artnum);
- X! }
- X }
- X if (index_file_killed && killed) {
- X fprintf (fp, "KILLED\n");
- X***************
- X*** 554,565 ****
- X } else if (*iptr < 0 || *iptr > top) {
- X fprintf(fp, " %s\n", arts[i].subject);
- X *iptr = realnum;
- X- /*
- X- } else if (arts[*iptr].tagged) {
- X- fprintf(fp, " %s\n", arts[i].subject);
- X- *iptr = realnum;
- X- } else if (killed && *iptr == i) {
- X- */
- X } else if (killed || *iptr == i) {
- X fprintf(fp, " %s\n", arts[i].subject);
- X } else {
- X--- 517,522 ----
- X***************
- X*** 574,587 ****
- X } else if (*iptr < 0 || *iptr > top) {
- X fprintf (fp, " %s\n", arts[i].from);
- X *iptr = realnum;
- X! /*
- X! } else if (arts[*iptr].tagged) {
- X fprintf(fp, " %s\n", arts[i].from);
- X *iptr = realnum;
- X- } else if (killed && *iptr == i) {
- X- */
- X } else if (killed || *iptr == i) {
- X! fprintf(fp, " %s\n", arts[i].from);
- X } else {
- X fprintf(fp, "%%%d\n", *iptr);
- X }
- X--- 531,552 ----
- X } else if (*iptr < 0 || *iptr > top) {
- X fprintf (fp, " %s\n", arts[i].from);
- X *iptr = realnum;
- X! } else if (killed || *iptr == i) {
- X fprintf(fp, " %s\n", arts[i].from);
- X+ } else {
- X+ fprintf(fp, "%%%d\n", *iptr);
- X+ }
- X+
- X+ iptr = (int *) arts[i].name;
- X+ iptr--;
- X+
- X+ if (! arts[i].name) {
- X+ fprintf (fp, " \n");
- X+ } else if (*iptr < 0 || *iptr > top) {
- X+ fprintf (fp, " %s\n", arts[i].name);
- X *iptr = realnum;
- X } else if (killed || *iptr == i) {
- X! fprintf(fp, " %s\n", arts[i].name);
- X } else {
- X fprintf(fp, "%%%d\n", *iptr);
- X }
- X***************
- X*** 596,610 ****
- X } else if (*iptr < 0 || *iptr > top) {
- X fprintf (fp, " %s\n", arts[i].archive);
- X *iptr = realnum;
- X- /*
- X- } else if (arts[*iptr].tagged) {
- X- fprintf (fp, " %s\n", arts[i].archive);
- X- *iptr = realnum;
- X- */
- X } else if (arts[i].part || arts[i].patch) {
- X- /*
- X- if (killed && *iptr == i) {
- X- */
- X if (killed || *iptr == i) {
- X fprintf(fp, " %s\n", arts[i].archive);
- X } else {
- X--- 561,567 ----
- X***************
- X*** 633,661 ****
- X chmod (index_file, 0644);
- X rename_file (nam, index_file);
- X if (debug) {
- X! sprintf (msg, "/bin/cp %s INDEX", index_file);
- X system (msg);
- X }
- X }
- X
- X /*
- X- * strncpy that stops at a newline and null terminates
- X- */
- X-
- X- void my_strncpy(p, q, n)
- X- char *p;
- X- char *q;
- X- int n;
- X- {
- X- while (n--) {
- X- if (! *q || *q == '\n')
- X- break;
- X- *p++ = *q++;
- X- }
- X- *p = '\0';
- X- }
- X-
- X- /*
- X * Read in an index file.
- X *
- X * index file header
- X--- 590,601 ----
- X chmod (index_file, 0644);
- X rename_file (nam, index_file);
- X if (debug) {
- X! sprintf (msg, "cp %s INDEX", index_file);
- X system (msg);
- X }
- X }
- X
- X /*
- X * Read in an index file.
- X *
- X * index file header
- X***************
- X*** 664,676 ****
- X * 3. number of last read article (ie. 210)
- X * 4. Is this a complete/killed index file (ie. COMPLETE/KILLED)
- X * index file record
- X! * 1. article number (ie. 183) [mandatory]
- X! * 2. Subject: line (ie. Which newsreader?) [mandatory]
- X! * 3. From: line (ie. iain@norisc) [mandatory]
- X! * 4. Date: of posting (ie. 911231125959) [mandatory]
- X! * 5. Archive: name (ie. compiler) [optional]
- X! * 6. Part number of Archive: name (ie. 01) [optional]
- X! * 7. Patch number of Archive: name (ie. 01) [optional]
- X */
- X
- X int load_index ()
- X--- 604,617 ----
- X * 3. number of last read article (ie. 210)
- X * 4. Is this a complete/killed index file (ie. COMPLETE/KILLED)
- X * index file record
- X! * 1. article number (ie. 183) [mandatory]
- X! * 2. Subject: line (ie. Which newsreader?) [mandatory]
- X! * 3. From: line (addr) (ie. iain@norisc) [mandatory]
- X! * 4. From: line (name) (ie. Iain Lea) [mandatory]
- X! * 5. Date: of posting (ie. 911231125959) [mandatory]
- X! * 6. Archive: name (ie. compiler) [optional]
- X! * 7. Part number of Archive: name (ie. 01) [optional]
- X! * 8. Patch number of Archive: name (ie. 01) [optional]
- X */
- X
- X int load_index ()
- X***************
- X*** 763,769 ****
- X }
- X
- X /*
- X! * From:
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X error = 7;
- X--- 704,710 ----
- X }
- X
- X /*
- X! * From: (addr part)
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X error = 7;
- X***************
- X*** 788,794 ****
- X }
- X
- X /*
- X! * Date:
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X error = 10;
- X--- 729,735 ----
- X }
- X
- X /*
- X! * From: (full name)
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X error = 10;
- X***************
- X*** 795,800 ****
- X--- 736,766 ----
- X goto corrupt_index;
- X }
- X
- X+ if (buf[0] == '%') {
- X+ n = atoi (&buf[1]);
- X+ if (n >= top || n < 0) {
- X+ error = 11;
- X+ goto corrupt_index;
- X+ }
- X+ arts[top].name = arts[n].name;
- X+ } else if (buf[0] == ' ') {
- X+ for (p = &buf[1]; *p && *p != '\n'; p++)
- X+ continue;
- X+ *p = '\0';
- X+ arts[top].name = hash_str (&buf[1]);
- X+ } else {
- X+ error = 12;
- X+ goto corrupt_index;
- X+ }
- X+
- X+ /*
- X+ * Date:
- X+ */
- X+ if (fgets(buf, sizeof buf, fp) == NULL) {
- X+ error = 13;
- X+ goto corrupt_index;
- X+ }
- X+
- X buf[strlen (buf)-1] = '\0';
- X my_strncpy (arts[top].date, buf, 12);
- X
- X***************
- X*** 802,808 ****
- X * Archive-name:
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X! error = 11;
- X goto corrupt_index;
- X }
- X
- X--- 768,774 ----
- X * Archive-name:
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X! error = 14;
- X goto corrupt_index;
- X }
- X
- X***************
- X*** 811,817 ****
- X } else if (buf[0] == '%') {
- X n = atoi (&buf[1]);
- X if (n > top || n < 0) {
- X! error = 12;
- X goto corrupt_index;
- X }
- X arts[top].archive = arts[n].archive;
- X--- 777,783 ----
- X } else if (buf[0] == '%') {
- X n = atoi (&buf[1]);
- X if (n > top || n < 0) {
- X! error = 15;
- X goto corrupt_index;
- X }
- X arts[top].archive = arts[n].archive;
- X***************
- X*** 821,827 ****
- X *p = '\0';
- X arts[top].archive = hash_str (&buf[1]);
- X } else {
- X! error = 13;
- X goto corrupt_index;
- X }
- X
- X--- 787,793 ----
- X *p = '\0';
- X arts[top].archive = hash_str (&buf[1]);
- X } else {
- X! error = 16;
- X goto corrupt_index;
- X }
- X
- X***************
- X*** 829,835 ****
- X * part no.
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X! error = 14;
- X goto corrupt_index;
- X }
- X
- X--- 795,801 ----
- X * part no.
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X! error = 17;
- X goto corrupt_index;
- X }
- X
- X***************
- X*** 842,848 ****
- X * patch no.
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X! error = 15;
- X goto corrupt_index;
- X }
- X
- X--- 808,814 ----
- X * patch no.
- X */
- X if (fgets(buf, sizeof buf, fp) == NULL) {
- X! error = 18;
- X goto corrupt_index;
- X }
- X
- X***************
- X*** 970,975 ****
- X--- 936,944 ----
- X * or
- X * Save any new articles to savedir and mark arts read and mail user
- X * and inform how many arts in which groups were saved.
- X+ * or
- X+ * Mail any new articles to specified user and mark arts read and mail
- X+ * user and inform how many arts in which groups were mailed.
- X */
- X
- X int check_start_save_any_news (check_start_save)
- X***************
- X*** 997,1002 ****
- X--- 966,972 ----
- X case START_ANY_NEWS:
- X wait_message (txt_checking_for_news);
- X break;
- X+ case MAIL_ANY_NEWS:
- X case SAVE_ANY_NEWS:
- X sprintf (log, "%s/log", rcdir);
- X if ((fp_log = fopen (log, "w")) == NULL) {
- X***************
- X*** 1037,1042 ****
- X--- 1007,1013 ----
- X case START_ANY_NEWS:
- X return i; /* return first group with unread news */
- X /* NOTREACHED */
- X+ case MAIL_ANY_NEWS:
- X case SAVE_ANY_NEWS:
- X if (print_group) {
- X sprintf (msg, "Saved %s...\n", active[my_group[i]].name);
- X***************
- X*** 1056,1062 ****
- X }
- X saved_arts++;
- X
- X! sprintf (buf, "%s/%s/%ld", savedir, group_path, arts[j].artnum);
- X if ((fp = fopen (buf, "w")) == NULL) {
- X fprintf (fp_log, txt_cannot_open, buf);
- X error_message (txt_cannot_open, buf);
- X--- 1027,1039 ----
- X }
- X saved_arts++;
- X
- X! if (check_start_save == MAIL_ANY_NEWS) {
- X! sprintf (buf, "/tmp/tin.%d", getpid ());
- X! } else {
- X! sprintf (buf, "%s/%s/%ld", savedir,
- X! group_path, arts[j].artnum);
- X! }
- X!
- X if ((fp = fopen (buf, "w")) == NULL) {
- X fprintf (fp_log, txt_cannot_open, buf);
- X error_message (txt_cannot_open, buf);
- X***************
- X*** 1063,1079 ****
- X continue;
- X }
- X
- X art_open (arts[j].artnum, group_path);
- X fseek (note_fp, 0L, 0);
- X copy_fp (note_fp, fp, (char *) 0);
- X art_close ();
- X fclose (fp);
- X break;
- X }
- X }
- X }
- X
- X! if (check_start_save == SAVE_ANY_NEWS) {
- X if (catchup) {
- X for (j = 0; j < top; j++) {
- X arts[j].unread = ART_READ;
- X--- 1040,1069 ----
- X continue;
- X }
- X
- X+ if (check_start_save == MAIL_ANY_NEWS) {
- X+ fprintf (fp, "To: %s\n", mail_news_user);
- X+ }
- X+
- X art_open (arts[j].artnum, group_path);
- X fseek (note_fp, 0L, 0);
- X copy_fp (note_fp, fp, (char *) 0);
- X art_close ();
- X fclose (fp);
- X+
- X+ if (check_start_save == MAIL_ANY_NEWS) {
- X+ sprintf (msg, "%s \"%s\" < %s", mailer,
- X+ mail_news_user, buf);
- X+ if (! invoke_cmd (msg)) {
- X+ error_message (txt_command_failed_s, msg);
- X+ }
- X+ }
- X break;
- X }
- X }
- X }
- X
- X! if (check_start_save == MAIL_ANY_NEWS ||
- X! check_start_save == SAVE_ANY_NEWS) {
- X if (catchup) {
- X for (j = 0; j < top; j++) {
- X arts[j].unread = ART_READ;
- X***************
- X*** 1106,1113 ****
- X wait_message (txt_there_is_no_news);
- X return -1;
- X /* NOTREACHED */
- X case SAVE_ANY_NEWS:
- X! sprintf (msg, "\nSaved %d article(s) from %d group(s)\n", saved_arts, saved_groups);
- X fprintf (fp_log, "%s", msg);
- X if (verbose) {
- X wait_message (msg);
- X--- 1096,1124 ----
- X wait_message (txt_there_is_no_news);
- X return -1;
- X /* NOTREACHED */
- X+ case MAIL_ANY_NEWS:
- X+ unlink (buf);
- X+ sprintf (msg, "\nMailed %d article(s) from %d group(s)\n",
- X+ saved_arts, saved_groups);
- X+ fprintf (fp_log, "%s", msg);
- X+ if (verbose) {
- X+ wait_message (msg);
- X+ }
- X+ if (log_opened) {
- X+ fclose (fp_log);
- X+ if (verbose) {
- X+ sprintf (msg, "Mailing log to %s\n", mail_news_user);
- X+ wait_message (msg);
- X+ }
- X+ sprintf (buf, "%s \"%s\" < %s", mailer, mail_news_user, log);
- X+ if (! invoke_cmd (buf)) {
- X+ error_message (txt_command_failed_s, buf);
- X+ }
- X+ }
- X+ break;
- X case SAVE_ANY_NEWS:
- X! sprintf (msg, "\nSaved %d article(s) from %d group(s)\n",
- X! saved_arts, saved_groups);
- X fprintf (fp_log, "%s", msg);
- X if (verbose) {
- X wait_message (msg);
- X***************
- X*** 1123,1129 ****
- X error_message (txt_command_failed_s, buf);
- X }
- X }
- X! /* NOTREACHED */
- X }
- X return 0;
- X }
- X--- 1134,1140 ----
- X error_message (txt_command_failed_s, buf);
- X }
- X }
- X! break;
- X }
- X return 0;
- X }
- X***************
- X*** 1177,1183 ****
- X }
- X
- X make_threads (TRUE);
- X! find_base ();
- X
- X if (local_index) {
- X set_tin_uid_gid ();
- X--- 1188,1194 ----
- X }
- X
- X make_threads (TRUE);
- X! find_base (show_only_unread);
- X
- X if (local_index) {
- X set_tin_uid_gid ();
- X***************
- X*** 1323,1336 ****
- X struct header *s1 = (struct header *) p1;
- X struct header *s2 = (struct header *) p2;
- X
- X! /* s1->from less than s2->from */
- X! if (strcmp (s1->from, s2->from) < 0) {
- X! return (sort_art_type == SORT_BY_FROM_DESCEND ? -1 : 1);
- X }
- X- /* s1->from greater than s2->from */
- X- if (strcmp (s1->from, s2->from) > 0) {
- X- return (sort_art_type == SORT_BY_FROM_DESCEND ? 1 : -1);
- X- }
- X return 0;
- X }
- X
- X--- 1334,1358 ----
- X struct header *s1 = (struct header *) p1;
- X struct header *s2 = (struct header *) p2;
- X
- X! if (show_author == SHOW_FROM_NAME) {
- X! /* s1->name less than s2->name */
- X! if (strcmp (s1->name, s2->name) < 0) {
- X! return (sort_art_type == SORT_BY_FROM_DESCEND ? -1 : 1);
- X! }
- X! /* s1->name greater than s2->name */
- X! if (strcmp (s1->name, s2->name) > 0) {
- X! return (sort_art_type == SORT_BY_FROM_DESCEND ? 1 : -1);
- X! }
- X! } else { /* SHOW_FROM_ADDR */
- X! /* s1->from less than s2->from */
- X! if (strcmp (s1->from, s2->from) < 0) {
- X! return (sort_art_type == SORT_BY_FROM_DESCEND ? -1 : 1);
- X! }
- X! /* s1->from greater than s2->from */
- X! if (strcmp (s1->from, s2->from) > 0) {
- X! return (sort_art_type == SORT_BY_FROM_DESCEND ? 1 : -1);
- X! }
- X }
- X return 0;
- X }
- X
- X***************
- X*** 1359,1364 ****
- X--- 1381,1387 ----
- X {
- X art->subject = (char *) 0;
- X art->from = (char *) 0;
- X+ art->name = (char *) 0;
- X art->date[0] = '\0';
- X art->archive = (char *) 0;
- X art->part = (char *) 0;
- Xdiff -rcs ../105/curses.c ./curses.c
- X*** ../105/curses.c Tue Oct 15 09:39:34 1991
- X--- ./curses.c Thu Oct 31 15:23:00 1991
- X***************
- X*** 3,9 ****
- X * Module : curses.c
- X * Author : Dave Taylor
- X * Created : ??-??-86
- X! * Updated : 14-10-91
- X * Release : 2.1
- X * Notes : This is a screen management library borrowed with permission
- X * from the Elm mail system (a great mailer--I highly recommend
- X--- 3,9 ----
- X * Module : curses.c
- X * Author : Dave Taylor
- X * Created : ??-??-86
- X! * Updated : 28-10-91
- X * Release : 2.1
- X * Notes : This is a screen management library borrowed with permission
- X * from the Elm mail system (a great mailer--I highly recommend
- X***************
- X*** 14,29 ****
- X
- X #include <stdio.h>
- X #include <curses.h>
- X! #include <sys/ioctl.h>
- X
- X #ifdef TRUE
- X! #undef TRUE
- X! #define TRUE 1
- X #endif
- X
- X #ifdef FALSE
- X! #undef FALSE
- X! #define FALSE 0
- X #endif
- X
- X #define BACKSPACE '\b'
- X--- 14,35 ----
- X
- X #include <stdio.h>
- X #include <curses.h>
- X! #ifndef MINIX
- X! # include <sys/ioctl.h>
- X! #endif
- X
- X #ifdef TRUE
- X! # undef TRUE
- X! # define TRUE 1
- X! #else
- X! # define TRUE 1
- X #endif
- X
- X #ifdef FALSE
- X! # undef FALSE
- X! # define FALSE 0
- X! #else
- X! # define FALSE 0
- X #endif
- X
- X #define BACKSPACE '\b'
- X***************
- X*** 35,49 ****
- X int inverse_okay = TRUE;
- X
- X #ifdef BSD
- X! # ifndef BSD4_1
- X! # include <sgtty.h>
- X! # else
- X! # include <termio.h>
- X! # endif
- X #else
- X! # ifndef SYSV
- X! # include <termio.h>
- X! # endif
- X #endif
- X
- X #include <ctype.h>
- X--- 41,59 ----
- X int inverse_okay = TRUE;
- X
- X #ifdef BSD
- X! # ifndef BSD4_1
- X! # include <sgtty.h>
- X! # else
- X! # include <termio.h>
- X! # endif
- X #else
- X! # ifndef SYSV
- X! # ifndef MINIX
- X! # include <termio.h>
- X! # else
- X! # include <sgtty.h>
- X! # endif
- X! # endif
- X #endif
- X
- X #include <ctype.h>
- X***************
- X*** 58,66 ****
- X # define _cleartoeos _clr2eos
- X #endif
- X
- X! #ifdef BSD
- X! #define TCGETA TIOCGETP
- X! #define TCSETAW TIOCSETP
- X
- X struct sgttyb _raw_tty,
- X _original_tty;
- X--- 68,76 ----
- X # define _cleartoeos _clr2eos
- X #endif
- X
- X! #if defined(BSD) || defined(MINIX)
- X! # define TCGETA TIOCGETP
- X! # define TCSETAW TIOCSETP
- X
- X struct sgttyb _raw_tty,
- X _original_tty;
- X***************
- X*** 69,75 ****
- X _original_tty;
- X #endif
- X
- X! static int _inraw = 0; /* are we IN rawmode? */
- X
- X #define DEFAULT_LINES_ON_TERMINAL 24
- X #define DEFAULT_COLUMNS_ON_TERMINAL 80
- X--- 79,85 ----
- X _original_tty;
- X #endif
- X
- X! static int _inraw = FALSE; /* are we IN rawmode? */
- X
- X #define DEFAULT_LINES_ON_TERMINAL 24
- X #define DEFAULT_COLUMNS_ON_TERMINAL 80
- X***************
- X*** 78,85 ****
- X *_setinverse, *_clearinverse, *_setunderline, *_clearunderline,
- X *_terminalinit, *_terminalend;
- X
- X! static
- X! int _lines,_columns;
- X
- X static char _terminal[1024]; /* Storage for terminal entry */
- X static char _capabilities[1024]; /* String for cursor motion */
- X--- 88,94 ----
- X *_setinverse, *_clearinverse, *_setunderline, *_clearunderline,
- X *_terminalinit, *_terminalend;
- X
- X! static int _lines,_columns;
- X
- X static char _terminal[1024]; /* Storage for terminal entry */
- X static char _capabilities[1024]; /* String for cursor motion */
- X***************
- X*** 86,105 ****
- X
- X static char *ptr = _capabilities; /* for buffering */
- X
- X! int outchar(); /* char output for tputs */
- X! char *tgetstr(), /* Get termcap capability */
- X! *tgoto(); /* and the goto stuff */
- X
- X! int InitScreen()
- X {
- X int tgetent(); /* get termcap entry */
- X char termname[40], *p;
- X- char *strcpy(), *getenv();
- X
- X if ((p = getenv ("TERM")) == NULL) {
- X! fprintf (stderr,
- X! "%s: TERM variable must be set to use screen capabilities\n",
- X! progname);
- X return (FALSE);
- X }
- X if (strcpy (termname, p) == NULL) {
- X--- 95,111 ----
- X
- X static char *ptr = _capabilities; /* for buffering */
- X
- X! int outchar (); /* char output for tputs */
- X! char *tgetstr (), /* Get termcap capability */
- X! *tgoto (); /* and the goto stuff */
- X
- X! int InitScreen ()
- X {
- X int tgetent(); /* get termcap entry */
- X char termname[40], *p;
- X
- X if ((p = getenv ("TERM")) == NULL) {
- X! fprintf (stderr, "%s: TERM variable must be set to use screen capabilities\n", progname);
- X return (FALSE);
- X }
- X if (strcpy (termname, p) == NULL) {
- X***************
- X*** 125,133 ****
- X _terminalinit = tgetstr ("ti", &ptr);
- X _terminalend = tgetstr ("te", &ptr);
- X
- X! if (_terminalinit) {
- X! tputs (_terminalinit, 1, outchar);
- X! }
- X
- X if (!_clearscreen) {
- X fprintf (stderr,
- X--- 131,137 ----
- X _terminalinit = tgetstr ("ti", &ptr);
- X _terminalend = tgetstr ("te", &ptr);
- X
- X! InitWin ();
- X
- X if (!_clearscreen) {
- X fprintf (stderr,
- X***************
- X*** 172,177 ****
- X--- 176,189 ----
- X *num_columns = _columns; /* assume index from one */
- X }
- X
- X+ void InitWin ()
- X+ {
- X+ if (_terminalinit) {
- X+ tputs (_terminalinit, 1, outchar);
- X+ fflush (stdout);
- X+ }
- X+ }
- X+
- X void EndWin ()
- X {
- X if (_terminalend) {
- X***************
- X*** 269,275 ****
- X (void) ioctl(TTYIN, TCGETA, &_original_tty); /** current setting **/
- X
- X (void) ioctl(TTYIN, TCGETA, &_raw_tty); /** again! **/
- X! #ifdef BSD
- X _raw_tty.sg_flags &= ~(ECHO | CRMOD); /* echo off */
- X _raw_tty.sg_flags |= CBREAK; /* raw on */
- X #else
- X--- 281,287 ----
- X (void) ioctl(TTYIN, TCGETA, &_original_tty); /** current setting **/
- X
- X (void) ioctl(TTYIN, TCGETA, &_raw_tty); /** again! **/
- X! #if defined(BSD) || defined(MINIX)
- X _raw_tty.sg_flags &= ~(ECHO | CRMOD); /* echo off */
- X _raw_tty.sg_flags |= CBREAK; /* raw on */
- X #else
- Xdiff -rcs ../105/debug.c ./debug.c
- X*** ../105/debug.c Wed Oct 2 20:20:32 1991
- X--- ./debug.c Mon Nov 4 15:03:25 1991
- X***************
- X*** 3,9 ****
- X * Module : debug.c
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 29-09-91
- X * Release : 1.0
- X * Notes : debug routines
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X--- 3,9 ----
- X * Module : debug.c
- X * Author : I.Lea
- X * Created : 01-04-91
- X! * Updated : 04-11-91
- X * Release : 1.0
- X * Notes : debug routines
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X***************
- X*** 15,20 ****
- X--- 15,22 ----
- X
- X #include "tin.h"
- X
- X+ #define LOG_USER_FILE "/tmp/.tin"
- X+
- X int debug;
- X
- X
- X***************
- X*** 42,67 ****
- X if ((fp = fopen ("/tmp/DUMP","a+")) != NULL) {
- X fprintf (fp,"art=[%5ld] killed=[%s]\n", s->artnum,
- X (s->tagged ? "TRUE" : "FALSE"));
- X! fprintf (fp,"subj=[%-38s] from=[%-20s]\n", s->subject, s->from);
- X if (s->archive) {
- X fprintf (fp, "arch=[%-38s] ", s->archive);
- X } else {
- X! fprintf (fp, "arch=[%-38s] ", "");
- X }
- X if (s->part) {
- X fprintf (fp, "part=[%s] ", s->part);
- X } else {
- X! fprintf (fp, "part=[%s] ", "");
- X }
- X if (s->patch) {
- X fprintf (fp, "patch=[%s]\n", s->patch);
- X } else {
- X! fprintf (fp, "patch=[%s]\n", "");
- X }
- X! fprintf (fp,"thread=[%s] inthread=[%s] unread=[%s]\n",
- X! (s->thread == ART_NORMAL ? "ART_NORMAL" : "ART_EXPIRED"),
- X! (s->inthread ? "TRUE" : "FALSE"),
- X! (s->unread ? "TRUE" : "FALSE"));
- X fflush (fp);
- X fclose (fp);
- X chmod ("/tmp/DUMP", 0666);
- X--- 44,73 ----
- X if ((fp = fopen ("/tmp/DUMP","a+")) != NULL) {
- X fprintf (fp,"art=[%5ld] killed=[%s]\n", s->artnum,
- X (s->tagged ? "TRUE" : "FALSE"));
- X! fprintf (fp,"subj=[%-38s]\n", s->subject);
- X! fprintf (fp,"from=[%s] name=[%s]\n", s->from, s->name);
- X if (s->archive) {
- X fprintf (fp, "arch=[%-38s] ", s->archive);
- X } else {
- X! fprintf (fp, "arch=[] ");
- X }
- X if (s->part) {
- X fprintf (fp, "part=[%s] ", s->part);
- X } else {
- X! fprintf (fp, "part=[] ");
- X }
- X if (s->patch) {
- X fprintf (fp, "patch=[%s]\n", s->patch);
- X } else {
- X! fprintf (fp, "patch=[]\n");
- X }
- X! fprintf (fp,"thread=[%d] inthread=[%d] unread=[%d]\n",
- X! s->thread, s->inthread, s->unread);
- X! /* fprintf (fp,"thread=[%s] inthread=[%s] unread=[%s]\n",
- X! (s->thread == ART_NORMAL ? "ART_NORMAL" : "ART_EXPIRED"),
- X! (s->inthread ? "TRUE" : "FALSE"),
- X! (s->unread ? "TRUE" : "FALSE"));
- X! */
- X fflush (fp);
- X fclose (fp);
- X chmod ("/tmp/DUMP", 0666);
- X***************
- X*** 122,125 ****
- X--- 128,152 ----
- X fclose (fp);
- X chmod ("/tmp/ACTIVE", 0666);
- X }
- X+ }
- X+
- X+
- X+ void log_user ()
- X+ {
- X+ #ifdef LOG_USER
- X+ char buf[33];
- X+ FILE *fp;
- X+ long epoch;
- X+ extern struct passwd *myentry;
- X+
- X+ time (&epoch);
- X+
- X+ if ((fp = fopen (LOG_USER_FILE, "a+")) != NULL) {
- X+ my_strncpy (buf, myentry->pw_gecos, 32);
- X+ fprintf (fp, "%s%d: %-32s (%-8s) %s", version, PATCHLEVEL,
- X+ buf, myentry->pw_name, ctime (&epoch));
- X+ fclose (fp);
- X+ chmod (LOG_USER_FILE, 0666);
- X+ }
- X+ #endif
- X }
- Xdiff -rcs ../105/feed.c ./feed.c
- X*** ../105/feed.c Thu Oct 10 20:11:05 1991
- X--- ./feed.c Tue Oct 29 19:17:51 1991
- X***************
- X*** 3,9 ****
- X * Module : feed.c
- X * Author : I.Lea
- X * Created : 31-08-91
- X! * Updated : 04-10-91
- X * Release : 1.0
- X * Notes : provides same interface to mail,pipe,print and save commands
- X * Copyright : (c) Copyright 1991 by Iain Lea
- X--- 3,9 ----
- X * Module : feed.c
- X * Author : I.Lea
- X * Created : 31-08-91
- X! * Updated : 28-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*** 17,23 ****
- X
- X extern char *glob_group; /* Group name */
- X extern char note_h_date[LEN]; /* Date: */
- X- extern char note_h_from[LEN]; /* From: */
- X extern char note_h_subj[LEN]; /* Subject: */
- X extern FILE *note_fp; /* the body of the current article */
- X extern int note_end; /* end of article ? */
- X--- 17,22 ----
- X***************
- X*** 50,55 ****
- X--- 49,55 ----
- X int is_mailbox = FALSE;
- SHAR_EOF
- echo "End of tin part 1"
- echo "File tin.patch06 is continued in part 2"
- echo "2" > 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.
-