home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume26 / tin / patch06a next >
Encoding:
Text File  |  1991-11-29  |  55.6 KB  |  1,957 lines

  1. Newsgroups: comp.sources.misc
  2. From: iain@estevax.uucp (Iain J. Lea)
  3. Subject:  v26i076:  tin - threaded full screen newsreader, Patch06a/5
  4. Message-ID: <csm-v26i076=tin.203815@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: df7c32207c302cc3c708ae4076f20ad8
  6. Date: Sat, 30 Nov 1991 02:39:01 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: iain@estevax.uucp (Iain J. Lea)
  10. Posting-number: Volume 26, Issue 76
  11. Archive-name: tin/patch06a
  12. Environment: BSD, SCO, ISC, SUNOS, SYSVR3, SYSVR4, ULTRIX, XENIX
  13. Patch-To: tin: Volume 23, Issue 15-23
  14.  
  15. This is version 1.0 PL6 (patchlevel 6) of the tin newsreader.
  16.  
  17. To apply this patch type the following in your source directory:
  18.  
  19.     patch < tin.patch06
  20.  
  21.                                     ************************************
  22.                                     * Attention:                       *
  23.                                     * - install patch06 and patch07 !  *
  24.                                     *                                  *
  25.                                     * - a minor bugs has been found:   *
  26.                                     *   after installation of the      *
  27.                                     *   patches change:                *
  28.                                     *   patchlevel.h:                  *
  29.                                     *     #define VERSION "1.0"        *
  30.                                     *     #define PATCHLEVEL 7         *
  31.                                     ************************************
  32.  
  33. NOTE: This patch has not been as heavily tested on different machines
  34.       and OS's as I would have liked. On my main development machine
  35.       everything in this patch works OK. Your mileage may vary.
  36.       Therefore please make a copy of your PL5 code before applying
  37.       the following patch.
  38.  
  39. NOTE: The index file format has changed as an extra field (full name)
  40.       has been added.
  41.       BEFORE RUNNING PL6 DELETE ALL OLD INDEX FILES IN ~/.tin/.index
  42.  
  43. NOTE: PLEASE READ THE MAN PAGE tin.1 BEFORE SENDING A BUG REPORT/COMMENT.
  44.  
  45. Major improvements over tin 1.0 PL5 are the following:
  46.  
  47. o  Added support for Minix 386.
  48.  
  49. o  Can now display From: line address part/full name/both format.
  50.  
  51. o  Displays all articles/only unread articles. Configurable by M options menu.
  52.    NOTE: This is a little flakey and will be improved on in the next patch.
  53.  
  54. o  Scroll half/full page of groups/articles. Configurable by M options menu.
  55.  
  56. o  Thread/unthread all groups. Configurable by M options menu.
  57.  
  58. o  Added -M option to mail new news to specified user.
  59.  
  60. o  Fixed (I hope) scrolling in Sun cmdtool windows when invoking a shell.
  61.  
  62. For more bugs fixes, other changes & additions read the CHANGES & TODO files.
  63.  
  64. #!/bin/sh
  65. # This is tin, a shell archive (shar 3.24)
  66. # made 11/04/1991 18:13 UTC by iain@estevax.uucp
  67. # Source directory /piez/iain/tin/106
  68. #
  69. # existing files WILL be overwritten
  70. #
  71. # This is part 1 of a multipart archive                                    
  72. # do not concatenate these parts, unpack them in order with /bin/sh        
  73. #
  74. # This shar contains:
  75. # length  mode       name
  76. # ------ ---------- ------------------------------------------
  77. # 228422 -rw------- tin.patch06
  78. #
  79. if touch 2>&1 | fgrep '[-amc]' > /dev/null
  80.  then TOUCH=touch
  81.  else TOUCH=true
  82. fi
  83. if test -r shar3_seq_.tmp; then
  84.     echo "Must unpack archives in sequence!"
  85.     next=`cat shar3_seq_.tmp`; echo "Please unpack part $next next"
  86.     exit 1
  87. fi
  88. # ============= tin.patch06 ==============
  89. echo "x - extracting tin.patch06 (Text)"
  90. sed 's/^X//' << 'SHAR_EOF' > tin.patch06 &&
  91. Xdiff -rcs ../105/CHANGES ./CHANGES
  92. X*** ../105/CHANGES    Wed Oct 16 20:01:50 1991
  93. X--- ./CHANGES    Mon Nov  4 18:14:01 1991
  94. X***************
  95. X*** 1,3 ****
  96. X--- 1,108 ----
  97. X+ CHANGES tin v1.0 PL5 -> tin 1.0 PL6
  98. X+ -----------------------------------
  99. X+ 
  100. X+ 1)  profile@netcon.com (Tom Czarnik)
  101. X+     BUG. When in the group selection level the 't' command redraws the 
  102. X+          screen which is not necessary.
  103. X+     FIX. select.c - removed 't' command that redrew the screen.
  104. X+ 
  105. X+ 2)  ted@isgtec.UUCP (Ted Richards)
  106. X+     BUG. It would be nice if the PgUp PgDn commands could page half/whole page.
  107. X+     FIX. group.c select.c - added code to allow half/full screen paging.
  108. X+ 
  109. X+ 3)  bill@polygen.com (Bill Poitras)
  110. X+     BUG. The definition of getenv() in curses.c is wrong for ANSI C.
  111. X+     FIX. curses.c - removed getenv() definition.
  112. X+ 
  113. X+ 4)  unido!asd.tds.philips.se!kko (Karl-Koenig Koenigsson)
  114. X+     BUG. PL5 removed the INEWSDIR define from tin.h which causes post.c
  115. X+          to not be able to post articles because inews was not in path.
  116. X+     FIX. tin.h - readded INEWSDIR define. 
  117. X+ 
  118. X+ 5)  iain@estevax.uucp (Iain Lea)
  119. X+     ADD. search.c - increased search speed by removing strlen (search_pattern)
  120. X+          from str_str() routine so that it is only called once and not every 
  121. X+          time through the search loop.
  122. X+ 
  123. X+ 6)  iain@estevax.uucp (Iain Lea)
  124. X+     ADD. post.c - added 'uname -a' to mail_bug_report() so that user does not
  125. X+          have to enter as much info.
  126. X+    
  127. X+ 7)  iain@estevax.uucp (Iain Lea)
  128. X+     ADD. rcfile.c - added thread/unthread all groups to Options menu. Default
  129. X+          action is thread all groups.
  130. X+ 
  131. X+ 8)  profile@netcon.com (Tom Czarnik)
  132. X+     BUG. Things are not consistant when moving to the last page of groups/arts.
  133. X+          Instead of rearranging the  the groups/arts to allow the last page to
  134. X+          fill the screen, list only the ones that are left.
  135. X+     FIX. group.c select.c - modified display code when displaying last page. 
  136. X+ 
  137. X+ 9)  werner@mx321 (Sven Werner)
  138. X+     BUG. lpr is not found when printing on SNI Sinix machine. Also -P is -dru=.
  139. X+     FIX. tin.h feed.c - modified printer code to handle SNI Sinix machines.
  140. X+ 
  141. X+ 10) ndd@sunbar.mc.duke.edu (Ned Danieley)
  142. X+     BUG. In art.c there are 2 places where an array index could be negative.
  143. X+     FIX. art.c - applied supplied patch. Thanx for the patch.
  144. X+ 
  145. X+ 11) m31z@jupiter.sun.csd.unb.ca (Steven Cogswell)
  146. X+     BUG. If there are more than 9999 unread articles the screen will be
  147. X+          screwed up because the line is too long.
  148. X+     FIX. select.c tin.h - changed to handle > 9999 unread articles. 
  149. X+  
  150. X+ 12) unido!tintin.rivm.nl!a3 (Adri Verhoef)
  151. X+     BUG. When using tin my options line is turned into a newsgroup.
  152. X+     FIX. newsrc.c - added supplied patch. Thanx for the patch.
  153. X+ 
  154. X+ 13) unido!tintin.rivm.nl!a3 (Adri Verhoef)
  155. X+     BUG. NNTP'ed files are not closed.
  156. X+     FIX. open.c - added supplied patch. Thanx for the patch.
  157. X+ 
  158. X+ 14) uunet!peora!satchmo!bermls!brent (Brent Ermlick)
  159. X+     BUG. Added support for Minix 386 & also found a few memory problems.
  160. X+     FIX. Applied supplied patch. Thanx for the patch.
  161. X+ 
  162. X+ 15) admin@summa4.mv.com (Scott Babb)
  163. X+     BUG. Display authors name from From: line as in nn newsreader.
  164. X+     FIX. Added code to display From: line address part / full name / all.
  165. X+          Configurable by M options menu.
  166. X+ 
  167. X+ 16) m31z@jupiter.sun.csd.unb.ca (Steven Cogswell)
  168. X+     BUG. When in a Sun Cmdtool window and you do a command that leaves tin
  169. X+          and then comes back, the screen is not reset correctly.
  170. X+     FIX. misc.c - added ti and te termcap codes to invoke_cmd().
  171. X+ 
  172. X+ 17) teslab.lab.oz.au!andrew (Andrew Phillips)
  173. X+     BUG. There is a very strange use of atoi() in misc.c
  174. X+     FIX. misc.c - I totally agree and have changed it to a sprintf().
  175. X+ 
  176. X+ 18) hakanl@lulea.telesoft.se (Hakan Lennestal)
  177. X+     BUG. post.c - cleanup of setuid() calls.
  178. X+     FIX. applied the supplied patch. Thanx for the patch.
  179. X+ 
  180. X+ 19) unido!kiae.su!vak
  181. X+     BUG. Your parse_from() cannot handle From: lines of form
  182. X+          From: Full Name (user@domain.ext) 
  183. X+          And some other odd formats. Thanx for the supplied patch.
  184. X+     FIX. misc.c - applied supplied patch.
  185. X+ 
  186. X+ 20) takahasi@tiny.or.jp (Hironobu Takahashi)
  187. X+     BUG. seteuid() & setegid() are not sufficient on BSD machines.
  188. X+     FIX. misc.c - changed seteuid() setegid() calls to setreuid()
  189. X+          and setregid() calls. Thanx for the supplied patch. 
  190. X+ 
  191. X+ 21) iain@estevax.uucp (Iain Lea)
  192. X+     ADD. added code to allow displaying of all articles/only unread articles.
  193. X+ 
  194. X+ 22) teslab.lab.oz.au!andrew (Andrew Phillips)
  195. X+     BUG. There is a major bug in page.c line 822: 
  196. X+          tmp[LEN] = '\0';
  197. X+          This causes the saved frame pointer (ebp) to be overwritten
  198. X+          causing major problems when show_first_header() returns to
  199. X+          show_note_page().
  200. X+     FIX. Changed tmp[LEN] = '\0'; to tmp[LEN-1] = '\0';
  201. X+ 
  202. X  CHANGES tin v1.0 PL4 -> tin 1.0 PL5
  203. X  -----------------------------------
  204. X  
  205. Xdiff -rcs ../105/MANIFEST ./MANIFEST
  206. X*** ../105/MANIFEST    Wed Oct 16 20:10:41 1991
  207. X--- ./MANIFEST    Mon Nov  4 19:13:32 1991
  208. X***************
  209. X*** 1,40 ****
  210. X! MANIFEST for tin newsreader (Wed Oct 16 20:10:39 MET 1991)
  211. X  ----------------------------------------------------------
  212. X!     5316 README
  213. X!    23382 CHANGES
  214. X!     2481 TODO
  215. X       530 UPDATE_INDEX
  216. X!    10557 Makefile
  217. X!    27922 tin.1
  218. X      2247 wildmat.3
  219. X!    37038 tin.nrf
  220. X!    10177 tin.h
  221. X!     9798 lang.h
  222. X      3720 nntp.h
  223. X!    17521 proto.h
  224. X        21 patchlevel.h
  225. X!    28321 art.c
  226. X!     6759 curses.c
  227. X!     2631 debug.c
  228. X!    11855 feed.c
  229. X!    19765 group.c
  230. X      2620 hashstr.c
  231. X      5227 help.c
  232. X!    10479 kill.c
  233. X!    18262 lang.c
  234. X!     8503 main.c
  235. X!     6239 memory.c
  236. X!    22027 misc.c
  237. X!    19741 newsrc.c
  238. X!     7000 open.c
  239. X!    25404 page.c
  240. X!    17638 post.c
  241. X      4687 prompt.c
  242. X!    17897 rcfile.c
  243. X!    19687 save.c
  244. X!     2185 screen.c
  245. X!     7811 search.c
  246. X!    19137 select.c
  247. X!     7795 signal.c
  248. X      4749 wildmat.c
  249. X!   447129 total
  250. X--- 1,40 ----
  251. X! MANIFEST for tin newsreader (Mon Nov  4 19:13:30 MET 1991)
  252. X  ----------------------------------------------------------
  253. X!     4057 README
  254. X!    27968 CHANGES
  255. X!     2291 TODO
  256. X       530 UPDATE_INDEX
  257. X!    10905 Makefile
  258. X!    29528 tin.1
  259. X      2247 wildmat.3
  260. X!    39218 tin.nrf
  261. X!    10754 tin.h
  262. X!    10196 lang.h
  263. X      3720 nntp.h
  264. X!    17743 proto.h
  265. X        21 patchlevel.h
  266. X!    29913 art.c
  267. X!     6944 curses.c
  268. X!     3170 debug.c
  269. X!    12187 feed.c
  270. X!    21400 group.c
  271. X      2620 hashstr.c
  272. X      5227 help.c
  273. X!    11241 kill.c
  274. X!    18912 lang.c
  275. X!     8945 main.c
  276. X!     6241 memory.c
  277. X!    25183 misc.c
  278. X!    19753 newsrc.c
  279. X!     7180 open.c
  280. X!    24844 page.c
  281. X!    17973 post.c
  282. X      4687 prompt.c
  283. X!    20698 rcfile.c
  284. X!    19945 save.c
  285. X!     2244 screen.c
  286. X!     8185 search.c
  287. X!    20520 select.c
  288. X!     7940 signal.c
  289. X      4749 wildmat.c
  290. X!   469879 total
  291. Xdiff -rcs ../105/Makefile ./Makefile
  292. X*** ../105/Makefile    Thu Oct 17 19:22:45 1991
  293. X--- ./Makefile    Mon Nov  4 19:11:30 1991
  294. X***************
  295. X*** 78,85 ****
  296. X  STRIP = strip
  297. X  ROFF = + drf -F Helvetica -man3 
  298. X  PRINT= -Pps0
  299. X! BASE_VER = ../104
  300. X! PATCH_VER = 05
  301. X  
  302. X  HFILES    =    tin.h lang.h nntp.h proto.h patchlevel.h
  303. X  
  304. X--- 78,85 ----
  305. X  STRIP = strip
  306. X  ROFF = + drf -F Helvetica -man3 
  307. X  PRINT= -Pps0
  308. X! BASE_VER = ../105
  309. X! PATCH_VER = 06
  310. X  
  311. X  HFILES    =    tin.h lang.h nntp.h proto.h patchlevel.h
  312. X  
  313. X***************
  314. X*** 95,100 ****
  315. X--- 95,102 ----
  316. X  
  317. X  LINTFLAGS=-a -c -h -n -x 
  318. X  
  319. X+ CC=cc
  320. X+ 
  321. X  .c.o:
  322. X      $(CC) $(CFLAGS) $*.c
  323. X  
  324. X***************
  325. X*** 108,113 ****
  326. X--- 110,116 ----
  327. X      @echo "    make xenix     (Xenix 386)"
  328. X      @echo "    make sinix     (SNI SysV)"
  329. X      @echo "    make tower     (NCR Tower)"
  330. X+     @echo "    make minix     (Minix 386)"
  331. X  
  332. X  # For Berkeley systems:
  333. X  #             NNTPLIB=clientlib.o \
  334. X***************
  335. X*** 133,139 ****
  336. X  #
  337. X  aix:
  338. X      @echo "Compiling for AIX..."
  339. X!     @$(MAKE) CFLAGS='-c -O -DSYSV -DRS6000 -DUSE_LONG_FILENAMES -DAUTO_RESIZE -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
  340. X               LIBS="-lcurses -ltermcap" \
  341. X               EXE=tin linkit
  342. X  
  343. X--- 136,142 ----
  344. X  #
  345. X  aix:
  346. X      @echo "Compiling for AIX..."
  347. X!     @$(MAKE) CFLAGS='-c -O -DSYSV -DRS6000 -DREAD_CHAR_HACK -DUSE_LONG_FILENAMES -DAUTO_RESIZE -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
  348. X               LIBS="-lcurses -ltermcap" \
  349. X               EXE=tin linkit
  350. X  
  351. X***************
  352. X*** 173,179 ****
  353. X  #
  354. X  sinix:
  355. X      @echo "Compiling for SNI Sinix..."
  356. X!     @$(MAKE) CFLAGS='-c -O -DBSD -DSINIX -DUSE_MKDIR -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
  357. X               LIBS="-lcurses" \
  358. X               EXE=tin linkit
  359. X  
  360. X--- 176,182 ----
  361. X  #
  362. X  sinix:
  363. X      @echo "Compiling for SNI Sinix..."
  364. X!     @$(MAKE) CFLAGS='-c -O -DBSD -DSINIX -DLOG_USER -DUSE_MKDIR -DAUTO_RESIZE -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
  365. X               LIBS="-lcurses" \
  366. X               EXE=tin linkit
  367. X  
  368. X***************
  369. X*** 187,196 ****
  370. X               LIBS="-lcurses -ltermcap" \
  371. X               EXE=tin linkit
  372. X  
  373. X  # SITE SPECIFIC - IGNORE
  374. X  norisc:
  375. X      @echo "Compiling for NORISC with NNTP..."
  376. X!     @$(MAKE) CFLAGS='-c -g -DREAD_CHAR_HACK -DBSD -DUSE_NNTP -DAUTO_RESIZE -DLIBDIR=\"/news/lib\" -DSPOOLDIR=\"/news/spool\"' \
  377. X              NNTPLIB=/news/nntp/clientlib.o \
  378. X              LIBS="-lcurses -ltermcap" \
  379. X              EXE=tin linkit
  380. X--- 190,208 ----
  381. X               LIBS="-lcurses -ltermcap" \
  382. X               EXE=tin linkit
  383. X  
  384. X+ # For Minix 386:
  385. X+ #
  386. X+ minix:
  387. X+     @echo "Compiling for Minix 386..."
  388. X+     @$(MAKE) CFLAGS='-c -O -DMINIX -D_POSIX_SOURCE -DLIBDIR=\"/usr/lib/news\" -DSPOOLDIR=\"/usr/spool/news\"' \
  389. X+              LIBS="-lcurses" \
  390. X+              EXE=tin linkit
  391. X+     chmem +131072 $(EXE) 
  392. X+ 
  393. X  # SITE SPECIFIC - IGNORE
  394. X  norisc:
  395. X      @echo "Compiling for NORISC with NNTP..."
  396. X!     @$(MAKE) CFLAGS='-c -g -DBSD -DLOG_USER -DUSE_NNTP -DAUTO_RESIZE -DLIBDIR=\"/news/lib\" -DSPOOLDIR=\"/news/spool\"' \
  397. X              NNTPLIB=/news/nntp/clientlib.o \
  398. X              LIBS="-lcurses -ltermcap" \
  399. X              EXE=tin linkit
  400. X***************
  401. X*** 270,275 ****
  402. X--- 282,289 ----
  403. X   
  404. X  diff:
  405. X      @echo "Generating diffs against $(BASE_VER)..."
  406. X+     @make nroff
  407. X+     @make manifest
  408. X      @-mv -f $(EXE).diff $(EXE).diff-
  409. X      @-diff -rcs $(BASE_VER) . > $(EXE).diff
  410. X      @ls -l $(EXE).diff
  411. X***************
  412. X*** 278,284 ****
  413. X      @make diff
  414. X      @echo "Generating patch against $(BASE_VER)..."
  415. X      @-mv $(EXE).diff $(EXE).patch$(PATCH_VER)
  416. X!     @shar -a -n $(EXE) -s iain@estevax.uucp -L50 -o patch$(PATCH_VER).shar $(EXE).patch$(PATCH_VER)
  417. X      @ls -l patch$(PATCH_VER).shar*
  418. X  
  419. X  tar:
  420. X--- 292,298 ----
  421. X      @make diff
  422. X      @echo "Generating patch against $(BASE_VER)..."
  423. X      @-mv $(EXE).diff $(EXE).patch$(PATCH_VER)
  424. X!     @shar -a -n $(EXE) -s iain@estevax.uucp -L55 -o patch$(PATCH_VER).shar $(EXE).patch$(PATCH_VER)
  425. X      @ls -l patch$(PATCH_VER).shar*
  426. X  
  427. X  tar:
  428. Xdiff -rcs ../105/README ./README
  429. X*** ../105/README    Wed Oct 16 19:57:54 1991
  430. X--- ./README    Mon Nov  4 18:04:28 1991
  431. X***************
  432. X*** 1,66 ****
  433. X! This is version 1.0 PL5 (patchlevel 5) of the tin newsreader.
  434. X  
  435. X! NOTE: Due to a number of things (i.e., department change, lose of
  436. X!       main net connection) this patch has not been as heavily tested
  437. X!       on different machines and OS's. On my main development machine
  438. X        everything in this patch works OK. Your mileage may vary.
  439. X!       Therefore please make a copy of your PL4 code before applying
  440. X        the following patch.
  441. X  
  442. X! Major improvements over tin 1.0 PL4 are the following:
  443. X  
  444. X! o  Added support for IBM RS/6000, NCR Tower, AT&T UNIXPC & SNI Sinix.
  445. X  
  446. X! o  Fixed -U option when reading news via NNTP.
  447. X  
  448. X! o  Fixed highlighted bar operation on some terminals.
  449. X  
  450. X! o  Fixed cursor movement & inverse video in cmdtool window on SunOS.
  451. X  
  452. X! o  Fixed setuid() & setgid() problems.
  453. X  
  454. X! o  Fixed handling of 8 bit problems.
  455. X  
  456. X! For more bugs fixes, other changes & additions read the CHANGES & TODO files.
  457. X  
  458. X! I am still looking for people to send me ideas/comments & bug reports.
  459. X  
  460. X! And now for a bit of blurb from the original version...
  461. X  
  462. X! Tin is a full screen threaded newsreader that uses the tass newsreader as 
  463. X! its base. Tass was developed by Rich Skrenta (skrenta@blekko.commodore.com).
  464. X! Tin can read news locally and also via an NNTP server (-r option). Tin 
  465. X! contains more features than tass but they are still accessable to the
  466. X! beginner and expert alike. I tried to follow the tass UI conventions as 
  467. X! much as possible.
  468. X  
  469. X! This is the only newsreader that I know of that threads on the Archive-name:
  470. X! field as used in comp.sources.* groups as well as on the more normal Subject:
  471. X! field. Before anyone comments on Subject: threading not being right and I 
  472. X! should look at trn, I have and its threads are neat but I get more done with
  473. X! tin than trn. It is especially good at saving and processing saved articles
  474. X! & threads.
  475. X  
  476. X! o Organizes articles by threads.  Displays a really nice article selection
  477. X!   page.
  478. X! 
  479. X! o Group selection page makes it easy to scan newsgroups, subscribe,
  480. X!   unsubscribe, reorder your .newsrc.
  481. X! 
  482. X! o If you've ever used tass/notes, this is the program for you.
  483. X!   Tin looks a lot like tass, but has many improvements.
  484. X! 
  485. X! Newsreading style under tin tends to be different than with rn.  Instead of
  486. X! plowing through each group reading everything unread, you may find yourself
  487. X! reading fewer articles in more groups.  It's easier to skip about and only
  488. X! read interesting threads with tin.
  489. X! 
  490. X! Tin keeps an index file for each group.  The first time you enter a group,
  491. X! it will be a bit slow creating this file.  After that it will incrementally
  492. X! update the index file and there should be little delay.
  493. X! 
  494. X! I may be off the net for a couple of months at the end of September, but
  495. X! will be contactable at the following address:
  496. X      Iain J. Lea
  497. X      BrueckenStr. 12
  498. X      8500 Nuernberg 90
  499. X--- 1,39 ----
  500. X! This is version 1.0 PL6 (patchlevel 6) of the tin newsreader.
  501. X  
  502. X! NOTE: This patch has not been as heavily tested on different machines
  503. X!       and OS's as I would have liked. On my main development machine
  504. X        everything in this patch works OK. Your mileage may vary.
  505. X!       Therefore please make a copy of your PL5 code before applying
  506. X        the following patch.
  507. X  
  508. X! NOTE: The index file format has changed as an extra field (full name)
  509. X!       has been added.
  510. X!       BEFORE RUNNING PL6 DELETE ALL OLD INDEX FILES IN ~/.tin/.index
  511. X  
  512. X! NOTE: PLEASE READ THE MAN PAGE tin.1 BEFORE SENDING A BUG REPORT/COMMENT.
  513. X  
  514. X! Major improvements over tin 1.0 PL5 are the following:
  515. X  
  516. X! o  Added support for Minix 386.
  517. X  
  518. X! o  Can now display From: line address part/full name/both format.
  519. X  
  520. X! o  Displays all articles/only unread articles. Configurable by M options menu.
  521. X!    NOTE: This is a little flakey and will be improved on in the next patch.
  522. X  
  523. X! o  Scroll half/full page of groups/articles. Configurable by M options menu.
  524. X  
  525. X! o  Thread/unthread all groups. Configurable by M options menu.
  526. X  
  527. X! o  Added -M option to mail new news to specified user.
  528. X  
  529. X! o  Fixed (I hope) scrolling in Sun cmdtool windows when invoking a shell.
  530. X  
  531. X! For more bugs fixes, other changes & additions read the CHANGES & TODO files.
  532. X  
  533. X! I am still looking for people to send me ideas/comments & bug reports.
  534. X  
  535. X! I am off the net for a couple of months, but am contactable at this address:
  536. X      Iain J. Lea
  537. X      BrueckenStr. 12
  538. X      8500 Nuernberg 90
  539. X***************
  540. X*** 67,74 ****
  541. X      Germany.
  542. X      Phone. +49-911-331963   (home)
  543. X      Phone. +49-911-3089-407 (work)
  544. X!     Email. iain@estevax.uucp (will only be reading mailbox weekly)
  545. X  
  546. X  Built & used on the following machines
  547. X  --------------------------------------
  548. X      1)  Vax 8850 & Ultrix 4.1 (Developed on & most tested platform)
  549. X--- 40,58 ----
  550. X      Germany.
  551. X      Phone. +49-911-331963   (home)
  552. X      Phone. +49-911-3089-407 (work)
  553. X!     Email. iain@estevax.uucp (only reading mailbox weekly)
  554. X  
  555. X+ Building Tin
  556. X+ ------------
  557. X+     1)  type 'make' and a few system types will be displayed
  558. X+     2)  edit Makefile if you want to add/change -D DEFINES
  559. X+     3)  type 'make <system type>' to compile for your system
  560. X+     4)  type 'make install' / 'make install_setuid' to install
  561. X+     
  562. X+ NB. NNTP (NetNews Transport Protocol RFC 977) is required if you 
  563. X+     wish to read news remotely. It is a seperate package that is
  564. X+     available from many FTP and mailserver sites. 
  565. X+ 
  566. X  Built & used on the following machines
  567. X  --------------------------------------
  568. X      1)  Vax 8850 & Ultrix 4.1 (Developed on & most tested platform)
  569. X***************
  570. X*** 90,110 ****
  571. X      17) IBM RS/6000 & AIX 3.1.5
  572. X      18) SNI MX300 & Sinix 5.22
  573. X      19) NCR Tower & SysV
  574. X          
  575. X- Building Tin
  576. X- ------------
  577. X-     1)  type 'make' and a few system types will be displayed
  578. X-     2)  edit Makefile if you want to add/change -D DEFINES
  579. X-     3)  type 'make <system type>' to compile for your system
  580. X-     4)  type 'make install' / 'make install_setuid' to install
  581. X-     
  582. X-     Note: the supplied Makefile will not run directly on BSD. It 
  583. X-     requires a little work (Any takers to write a good Makefile?)
  584. X- 
  585. X- NB. NNTP (NetNews Transport Protocol RFC 977) is required if you 
  586. X-     wish to read news remotely. It is a seperate package that is
  587. X-     available from many FTP and mailserver sites. 
  588. X- 
  589. X  Credits
  590. X  -------
  591. X  I wish to give credit to the following people for the routines
  592. X--- 74,81 ----
  593. X      17) IBM RS/6000 & AIX 3.1.5
  594. X      18) SNI MX300 & Sinix 5.22
  595. X      19) NCR Tower & SysV
  596. X+     20) 386 PC & Minix 386
  597. X          
  598. X  Credits
  599. X  -------
  600. X  I wish to give credit to the following people for the routines
  601. X***************
  602. X*** 117,133 ****
  603. X  
  604. X  I wish to thank the following people for supplying patchs:
  605. X  
  606. X! Anton Aylward, Carl Hage, Ed Hanway, Karl-Koenig Koenigsson, Kris Kugel,
  607. X! Hakan Lennestal, Clifford Luke, Bill Poitras, Nickolay Saukh, Rich Salz,
  608. X! Bart Sears, Karl-Olav Serrander, Doug Sewell, Cliff Stanford, Adri Verhoef,
  609. X! Cary Whitney
  610. X  
  611. X  I wish to thank the following people for bug reports/comments:
  612. X  
  613. X! Klaus Arzig, Reiner Balling, Volker Beyer, Roger Binns, Georg Biehler,
  614. X! Ian Brown, Andreas Brosig, David Donovan, Peter Dressler, Gerhard Ermer,
  615. X! Hugh Fader, Joachim Feld, Paul Fox, Bernhard Gmelch, Viet Hoang, 
  616. X! Torsten Homeyer, Andy Jackson, Joe Johnson, Cyrill Jung, Hans-Juergen
  617. X! Knopp, Bob Lukas, Phillip Molloy, Toni Metz, Greg Miller, Klaus Neuberger,
  618. X! Otto Niesser, Reiner Oelhaf, Wolf Paul, Fredy Schwatz, Bernd Schwerin,
  619. X! Klamer Schutte, Chris Smith, Steve Spearman
  620. X--- 88,105 ----
  621. X  
  622. X  I wish to thank the following people for supplying patchs:
  623. X  
  624. X! Anton Aylward, Ned Danieley, Brent Ermlick, Carl Hage, Ed Hanway,
  625. X! Karl-Koenig Koenigsson, Kris Kugel, Hakan Lennestal, Clifford Luke,
  626. X! Bill Poitras, Nickolay Saukh, Rich Salz, Bart Sears, Karl-Olav Serrander,
  627. X! Doug Sewell, Cliff Stanford, Adri Verhoef, Cary Whitney
  628. X  
  629. X  I wish to thank the following people for bug reports/comments:
  630. X  
  631. X! Klaus Arzig, Scott Babb, Reiner Balling, Volker Beyer, Roger Binns, Georg Biehler,
  632. X! Ian Brown, Andreas Brosig, Steven Cogswell, Tom Czarnik, David Donovan,
  633. X! Peter Dressler, Gerhard Ermer, Hugh Fader, Joachim Feld, Paul Fox,
  634. X! Bernhard Gmelch, Viet Hoang, Torsten Homeyer, Andy Jackson, Joe Johnson,
  635. X! Cyrill Jung, Hans-Juergen Knopp, Bob Lukas, Phillip Molloy, Toni Metz,
  636. X! Greg Miller, Klaus Neuberger, Otto Niesser, Reiner Oelhaf, Wolf Paul,
  637. X! Andrew Phillips, Ted Richards, Fredy Schwatz, Bernd Schwerin, Klamer Schutte,
  638. X! Chris Smith, Steve Spearman, Hironobu Takahashi, Sven Werner
  639. Xdiff -rcs ../105/TODO ./TODO
  640. X*** ../105/TODO    Wed Oct 16 19:58:46 1991
  641. X--- ./TODO    Thu Oct 31 13:38:42 1991
  642. X***************
  643. X*** 1,5 ****
  644. X--- 1,7 ----
  645. X  FIX FEATURES
  646. X  ------------
  647. X+ o  Fix -M option to mail new news to specified user
  648. X+ 
  649. X  o  Fix uuscram code in uudecode.
  650. X  
  651. X  o  Fix code to sort arts. At page level funny things happen.
  652. X***************
  653. X*** 19,25 ****
  654. X     articles are saved to private news dir.
  655. X  
  656. X  o  Fix code to display only groups with unread news and only threads
  657. X!    with unread news. (Make settable option).
  658. X  
  659. X  ADD FEATURES
  660. X  ------------
  661. X--- 21,27 ----
  662. X     articles are saved to private news dir.
  663. X  
  664. X  o  Fix code to display only groups with unread news and only threads
  665. X!    with unread news. look at top_base and setup_base() also for killing.
  666. X  
  667. X  ADD FEATURES
  668. X  ------------
  669. X***************
  670. X*** 29,42 ****
  671. X  o  Add code to reread Subject: & To: line before posting. Make
  672. X     Find_new_to() more flexible (ie. func("Subject:", string) ).
  673. X  
  674. X- o  Add 2nd page to 'M' Options menu and put on the options:
  675. X-      1) ask user if to update read groups on exits (al a vn)
  676. X-      2) thread/unthread groups (read from ~/.tin/unthread)
  677. X- 
  678. X  o  Add elm style print command with %s in it for printing in 'M'.
  679. X  
  680. X- o  Add mail/save to -S option. Selectable by 'M' menu.
  681. X- 
  682. X  o  Add crossposting of articles so that read ones are marked read in 
  683. X     other groups. in rn it uses Xref: line to do this. Perhaps just
  684. X     use update_group() to do it?
  685. X--- 31,38 ----
  686. X***************
  687. X*** 49,56 ****
  688. X  o  Add 'H' context senstive level help screens
  689. X  
  690. X  o  Sort .newsrc according to preference. (sort active file as it is read)
  691. X- 
  692. X- o  Add code to do unpack patches
  693. X  
  694. X  o  Add time period kill article
  695. X  
  696. X--- 45,50 ----
  697. XFiles ../105/UPDATE_INDEX and ./UPDATE_INDEX are identical
  698. Xdiff -rcs ../105/art.c ./art.c
  699. X*** ../105/art.c    Thu Oct 10 20:10:50 1991
  700. X--- ./art.c    Mon Nov  4 18:41:45 1991
  701. X***************
  702. X*** 3,9 ****
  703. X   *  Module    : art.c
  704. X   *  Author    : R.Skrenta / I.Lea
  705. X   *  Created   : 01-04-91
  706. X!  *  Updated   : 29-09-91
  707. X   *  Release   : 1.0
  708. X   *  Notes     :
  709. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  710. X--- 3,9 ----
  711. X   *  Module    : art.c
  712. X   *  Author    : R.Skrenta / I.Lea
  713. X   *  Created   : 01-04-91
  714. X!  *  Updated   : 04-11-91
  715. X   *  Release   : 1.0
  716. X   *  Notes     :
  717. X   *  Copyright : (c) Copyright 1991 by Rich Skrenta & Iain Lea
  718. X***************
  719. X*** 26,53 ****
  720. X  
  721. X  
  722. X  /*
  723. X-  *  Convert a string to a long, only look at first n characters
  724. X-  */
  725. X- 
  726. X- long my_atol (s, n)
  727. X-     char *s;
  728. X-     int n;
  729. X- {
  730. X-     long ret = 0;
  731. X- 
  732. X-     while (*s && n--) {
  733. X-         if (*s >= '0' && *s <= '9')
  734. X-             ret = ret * 10 + (*s - '0');
  735. X-         else
  736. X-             return -1;
  737. X-         s++;
  738. X-     }
  739. X- 
  740. X-     return ret;
  741. X- }
  742. X- 
  743. X- 
  744. X- /*
  745. X   *  Construct the pointers to the basenotes of each thread
  746. X   *  arts[] contains every article in the group.  inthread is
  747. X   *  set on each article that is after the first article in the
  748. X--- 26,31 ----
  749. X***************
  750. X*** 55,72 ****
  751. X   *  set to -2 (ART_EXPIRED).
  752. X   */
  753. X  
  754. X! void find_base ()
  755. X  {
  756. X!     int i;
  757. X  
  758. X      top_base = 0;
  759. X  
  760. X!     for (i = 0; i < top; i++)
  761. X!         if (! arts[i].inthread && arts[i].thread != ART_EXPIRED) {
  762. X!             if (top_base >= max_art)
  763. X!                 expand_art ();
  764. X!             base[top_base++] = i;
  765. X          }
  766. X  }
  767. X  
  768. X  /* 
  769. X--- 33,76 ----
  770. X   *  set to -2 (ART_EXPIRED).
  771. X   */
  772. X  
  773. X! void find_base (only_unread)
  774. X!     int only_unread;
  775. X  {
  776. X!     register int i;
  777. X!     register int j;
  778. X  
  779. X      top_base = 0;
  780. X  
  781. X! debug_print_arts ();
  782. X! 
  783. X!     if (only_unread) {
  784. X!         for (i = 0; i < top; i++) {
  785. X!             if (arts[i].thread != ART_EXPIRED && arts[i].inthread == FALSE) {
  786. X!                 if (top_base >= max_art) {
  787. X!                     expand_art ();
  788. X!                 }
  789. X!                 if (arts[i].unread == ART_UNREAD) {
  790. X!                     base[top_base++] = i;
  791. X!                 } else {
  792. X!                     for (j = i ; j >= 0 ; j = arts[j].thread) {
  793. X!                         if (arts[j].unread) {
  794. X!                             base[top_base++] = i;
  795. X!                             break;
  796. X!                         }
  797. X!                     }
  798. X!                 }
  799. X!             }
  800. X          }
  801. X+     } else {
  802. X+         for (i = 0; i < top; i++) {
  803. X+             if (! arts[i].inthread && arts[i].thread != ART_EXPIRED) {
  804. X+                 if (top_base >= max_art) {
  805. X+                     expand_art ();
  806. X+                 }
  807. X+                 base[top_base++] = i;
  808. X+             }
  809. X+         }
  810. X+     }
  811. X  }
  812. X  
  813. X  /* 
  814. X***************
  815. X*** 103,109 ****
  816. X      return -1;
  817. X  }
  818. X  
  819. X- 
  820. X  /*
  821. X   *  Return TRUE if arts[] contains any expired articles
  822. X   *  (articles we have an entry for which don't have a corresponding
  823. X--- 107,112 ----
  824. X***************
  825. X*** 121,127 ****
  826. X      return FALSE;
  827. X  }
  828. X  
  829. X- 
  830. X  /*
  831. X   *  Main group indexing routine.  Group should be the name of the
  832. X   *  newsgroup, i.e. "comp.unix.amiga".  group_path should be the
  833. X--- 124,129 ----
  834. X***************
  835. X*** 203,209 ****
  836. X          } else {
  837. X              dump_index (group, FALSE);
  838. X              make_threads (FALSE);
  839. X!             find_base ();
  840. X          }
  841. X  
  842. X          if (local_index) {
  843. X--- 205,211 ----
  844. X          } else {
  845. X              dump_index (group, FALSE);
  846. X              make_threads (FALSE);
  847. X!             find_base (show_only_unread);
  848. X          }
  849. X  
  850. X          if (local_index) {
  851. X***************
  852. X*** 211,221 ****
  853. X          }
  854. X      } else {
  855. X          make_threads (FALSE);
  856. X!         find_base ();
  857. X      }
  858. X      
  859. X      if ((modified || killed) && ! update) {
  860. X!         clear_message();
  861. X      }
  862. X  }
  863. X  
  864. X--- 213,223 ----
  865. X          }
  866. X      } else {
  867. X          make_threads (FALSE);
  868. X!         find_base (show_only_unread);
  869. X      }
  870. X      
  871. X      if ((modified || killed) && ! update) {
  872. X!         clear_message ();
  873. X      }
  874. X  }
  875. X  
  876. X***************
  877. X*** 318,325 ****
  878. X      /*
  879. X       *  .thread & .inthread need to be reset if re-threading arts[]
  880. X       */
  881. X!     if (rethread && thread_arts &&
  882. X!         active[my_group[cur_groupnum]].thread) {
  883. X          for (i=0 ; i < top ; i++) {
  884. X              arts[i].thread = ART_NORMAL;
  885. X              arts[i].inthread = FALSE;
  886. X--- 320,326 ----
  887. X      /*
  888. X       *  .thread & .inthread need to be reset if re-threading arts[]
  889. X       */
  890. X!     if (rethread && active[my_group[cur_groupnum]].thread) {
  891. X          for (i=0 ; i < top ; i++) {
  892. X              arts[i].thread = ART_NORMAL;
  893. X              arts[i].inthread = FALSE;
  894. X***************
  895. X*** 364,416 ****
  896. X      }
  897. X  }
  898. X  
  899. X- /*
  900. X-  *  Return a pointer into s eliminating any leading Re:'s.  Example:
  901. X-  *
  902. X-  *      Re: Reorganization of misc.jobs
  903. X-  *      ^   ^
  904. X-  */
  905. X  
  906. X- char *eat_re (s)
  907. X-     char *s;
  908. X- {
  909. X- 
  910. X-     while (*s == 'r' || *s == 'R') {
  911. X-         if ((*(s+1) == 'e' || *(s+1) == 'E')) {
  912. X-             if (*(s+2) == ':')
  913. X-                 s += 3;
  914. X-             else if (*(s+2) == '^' && isdigit(*(s+3)) && *(s+4) == ':')
  915. X-                 s += 5;            /* hurray nn */
  916. X-             else
  917. X-                 break;
  918. X-         } else
  919. X-             break;
  920. X-         while (*s == ' ')
  921. X-             s++;
  922. X-     }
  923. X- 
  924. X-     return s;
  925. X- }
  926. X- 
  927. X- /*
  928. X-  *  Hash the subjects (after eating the Re's off) for a quicker
  929. X-  *  thread search later.  We store the hashes for subjects in the
  930. X-  *  index file for speed.
  931. X-  */
  932. X- 
  933. X- long hash_s (s)
  934. X-     char *s;
  935. X- {
  936. X-     long h = 0;
  937. X-     unsigned char *t = (unsigned char *) s;
  938. X- 
  939. X-     while (*t)
  940. X-         h = h * 64 + *t++;
  941. X- 
  942. X-     return h;
  943. X- }
  944. X- 
  945. X- 
  946. X  int parse_headers (fd, h)
  947. X      int fd;
  948. X      struct header *h;
  949. X--- 365,371 ----
  950. X***************
  951. X*** 417,422 ****
  952. X--- 372,379 ----
  953. X  {
  954. X      char buf[HEADER_LEN];
  955. X      char buf2[HEADER_LEN];
  956. X+     char art_from_addr[LEN];
  957. X+     char art_full_name[LEN];
  958. X      char *ptr, *ptrline, *s;
  959. X      int n = 0, len = 0, lineno = 0;
  960. X      int flag;
  961. X***************
  962. X*** 444,450 ****
  963. X          lineno++;
  964. X  
  965. X          if (! got_from && match_header(ptrline, "From", buf2, HEADER_LEN)) {
  966. X!             h->from = hash_str (buf2);
  967. X              got_from = TRUE;
  968. X          } else if (! got_subject && match_header(ptrline, "Subject", buf2, HEADER_LEN)) {
  969. X              s = eat_re (buf2);
  970. X--- 401,409 ----
  971. X          lineno++;
  972. X  
  973. X          if (! got_from && match_header(ptrline, "From", buf2, HEADER_LEN)) {
  974. X!             parse_from (buf2, art_from_addr, art_full_name); 
  975. X!             h->from = hash_str (art_from_addr);
  976. X!             h->name = hash_str (art_full_name);
  977. X              got_from = TRUE;
  978. X          } else if (! got_subject && match_header(ptrline, "Subject", buf2, HEADER_LEN)) {
  979. X              s = eat_re (buf2);
  980. X***************
  981. X*** 523,534 ****
  982. X      if (sort_art_type != SORT_BY_NOTHING) {
  983. X          qsort (arts, top, sizeof (struct header), artnum_comp);
  984. X      }
  985. X!     fprintf(fp, "%s\n", group);
  986. X!     fprintf(fp, "%d\n", num_of_arts ());
  987. X!     if (last_read_article > arts[top-1].artnum) {
  988. X!         fprintf(fp, "%ld\n", last_read_article);
  989. X      } else {
  990. X!         fprintf(fp, "%ld\n", arts[top-1].artnum);
  991. X      }
  992. X      if (index_file_killed && killed) {
  993. X          fprintf (fp, "KILLED\n");
  994. X--- 482,497 ----
  995. X      if (sort_art_type != SORT_BY_NOTHING) {
  996. X          qsort (arts, top, sizeof (struct header), artnum_comp);
  997. X      }
  998. X!     fprintf (fp, "%s\n", group);
  999. X!     fprintf (fp, "%d\n", num_of_arts ());
  1000. X!     if (top <= 0) {
  1001. X!         fprintf (fp, "0\n");
  1002. X      } else {
  1003. X!         if (last_read_article > arts[top-1].artnum) {
  1004. X!             fprintf (fp, "%ld\n", last_read_article);
  1005. X!         } else {
  1006. X!             fprintf (fp, "%ld\n", arts[top-1].artnum);
  1007. X!         }
  1008. X      }
  1009. X      if (index_file_killed && killed) {
  1010. X          fprintf (fp, "KILLED\n");
  1011. X***************
  1012. X*** 554,565 ****
  1013. X              } else if (*iptr < 0 || *iptr > top) {
  1014. X                  fprintf(fp, " %s\n", arts[i].subject);
  1015. X                  *iptr = realnum;
  1016. X- /*
  1017. X-             } else if (arts[*iptr].tagged) {
  1018. X-                 fprintf(fp, " %s\n", arts[i].subject);
  1019. X-                 *iptr = realnum;
  1020. X-             } else if (killed && *iptr == i) {
  1021. X- */
  1022. X              } else if (killed || *iptr == i) {
  1023. X                  fprintf(fp, " %s\n", arts[i].subject);
  1024. X              } else {
  1025. X--- 517,522 ----
  1026. X***************
  1027. X*** 574,587 ****
  1028. X              } else if (*iptr < 0 || *iptr > top) {
  1029. X                  fprintf (fp, " %s\n", arts[i].from);
  1030. X                  *iptr = realnum;
  1031. X! /*
  1032. X!             } else if (arts[*iptr].tagged) {
  1033. X                  fprintf(fp, " %s\n", arts[i].from);
  1034. X                  *iptr = realnum;
  1035. X-             } else if (killed && *iptr == i) {
  1036. X- */            
  1037. X              } else if (killed || *iptr == i) {
  1038. X!                 fprintf(fp, " %s\n", arts[i].from);
  1039. X              } else {
  1040. X                  fprintf(fp, "%%%d\n", *iptr);
  1041. X              }
  1042. X--- 531,552 ----
  1043. X              } else if (*iptr < 0 || *iptr > top) {
  1044. X                  fprintf (fp, " %s\n", arts[i].from);
  1045. X                  *iptr = realnum;
  1046. X!             } else if (killed || *iptr == i) {
  1047. X                  fprintf(fp, " %s\n", arts[i].from);
  1048. X+             } else {
  1049. X+                 fprintf(fp, "%%%d\n", *iptr);
  1050. X+             }
  1051. X+ 
  1052. X+             iptr = (int *) arts[i].name;
  1053. X+             iptr--;
  1054. X+ 
  1055. X+             if (! arts[i].name) {
  1056. X+                 fprintf (fp, " \n");
  1057. X+             } else if (*iptr < 0 || *iptr > top) {
  1058. X+                 fprintf (fp, " %s\n", arts[i].name);
  1059. X                  *iptr = realnum;
  1060. X              } else if (killed || *iptr == i) {
  1061. X!                 fprintf(fp, " %s\n", arts[i].name);
  1062. X              } else {
  1063. X                  fprintf(fp, "%%%d\n", *iptr);
  1064. X              }
  1065. X***************
  1066. X*** 596,610 ****
  1067. X              } else if (*iptr < 0 || *iptr > top) {
  1068. X                  fprintf (fp, " %s\n", arts[i].archive);
  1069. X                  *iptr = realnum;
  1070. X- /*
  1071. X-             } else if (arts[*iptr].tagged) {
  1072. X-                 fprintf (fp, " %s\n", arts[i].archive);
  1073. X-                 *iptr = realnum;
  1074. X- */                
  1075. X              } else if (arts[i].part || arts[i].patch) {
  1076. X- /*
  1077. X-                 if (killed && *iptr == i) {
  1078. X- */                
  1079. X                  if (killed || *iptr == i) {
  1080. X                      fprintf(fp, " %s\n", arts[i].archive);
  1081. X                  } else {
  1082. X--- 561,567 ----
  1083. X***************
  1084. X*** 633,661 ****
  1085. X      chmod (index_file, 0644);
  1086. X      rename_file (nam, index_file);
  1087. X      if (debug) {
  1088. X!         sprintf (msg, "/bin/cp %s INDEX", index_file);
  1089. X          system (msg);
  1090. X      }
  1091. X  }
  1092. X  
  1093. X  /*
  1094. X-  *  strncpy that stops at a newline and null terminates
  1095. X-  */
  1096. X- 
  1097. X- void my_strncpy(p, q, n)
  1098. X-     char *p;
  1099. X-     char *q;
  1100. X-     int n;
  1101. X- {
  1102. X-     while (n--) {
  1103. X-         if (! *q || *q == '\n')
  1104. X-             break;
  1105. X-         *p++ = *q++;
  1106. X-     }
  1107. X-     *p = '\0';
  1108. X- }
  1109. X- 
  1110. X- /*
  1111. X   *  Read in an index file.
  1112. X   *
  1113. X   *  index file header 
  1114. X--- 590,601 ----
  1115. X      chmod (index_file, 0644);
  1116. X      rename_file (nam, index_file);
  1117. X      if (debug) {
  1118. X!         sprintf (msg, "cp %s INDEX", index_file);
  1119. X          system (msg);
  1120. X      }
  1121. X  }
  1122. X  
  1123. X  /*
  1124. X   *  Read in an index file.
  1125. X   *
  1126. X   *  index file header 
  1127. X***************
  1128. X*** 664,676 ****
  1129. X   *    3.  number of last read article (ie. 210)
  1130. X   *    4.  Is this a complete/killed index file (ie. COMPLETE/KILLED)
  1131. X   *  index file record
  1132. X!  *    1.  article number   (ie. 183)                [mandatory]
  1133. X!  *    2.  Subject: line    (ie. Which newsreader?)  [mandatory]
  1134. X!  *    3.  From: line       (ie. iain@norisc)        [mandatory]
  1135. X!  *    4.  Date: of posting (ie. 911231125959)       [mandatory]
  1136. X!  *    5.  Archive: name    (ie. compiler)           [optional]
  1137. X!  *    6.  Part number of Archive: name  (ie. 01)    [optional]
  1138. X!  *    7.  Patch number of Archive: name (ie. 01)    [optional]
  1139. X   */
  1140. X  
  1141. X  int load_index ()
  1142. X--- 604,617 ----
  1143. X   *    3.  number of last read article (ie. 210)
  1144. X   *    4.  Is this a complete/killed index file (ie. COMPLETE/KILLED)
  1145. X   *  index file record
  1146. X!  *    1.  article number    (ie. 183)               [mandatory]
  1147. X!  *    2.  Subject: line     (ie. Which newsreader?) [mandatory]
  1148. X!  *    3.  From: line (addr) (ie. iain@norisc)       [mandatory]
  1149. X!  *    4.  From: line (name) (ie. Iain Lea)          [mandatory]
  1150. X!  *    5.  Date: of posting  (ie. 911231125959)      [mandatory]
  1151. X!  *    6.  Archive: name     (ie. compiler)          [optional]
  1152. X!  *    7.  Part number of Archive: name  (ie. 01)    [optional]
  1153. X!  *    8.  Patch number of Archive: name (ie. 01)    [optional]
  1154. X   */
  1155. X  
  1156. X  int load_index ()
  1157. X***************
  1158. X*** 763,769 ****
  1159. X          }
  1160. X              
  1161. X          /*
  1162. X!          * From:
  1163. X           */
  1164. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1165. X              error = 7;
  1166. X--- 704,710 ----
  1167. X          }
  1168. X              
  1169. X          /*
  1170. X!          * From: (addr part)
  1171. X           */
  1172. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1173. X              error = 7;
  1174. X***************
  1175. X*** 788,794 ****
  1176. X          }
  1177. X  
  1178. X          /*
  1179. X!          * Date:
  1180. X           */
  1181. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1182. X              error = 10;
  1183. X--- 729,735 ----
  1184. X          }
  1185. X  
  1186. X          /*
  1187. X!          * From: (full name)
  1188. X           */
  1189. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1190. X              error = 10;
  1191. X***************
  1192. X*** 795,800 ****
  1193. X--- 736,766 ----
  1194. X              goto corrupt_index;
  1195. X          }
  1196. X  
  1197. X+         if (buf[0] == '%') {
  1198. X+             n = atoi (&buf[1]);
  1199. X+             if (n >= top || n < 0) {
  1200. X+                 error = 11;
  1201. X+                 goto corrupt_index;
  1202. X+             }
  1203. X+             arts[top].name = arts[n].name;
  1204. X+         } else if (buf[0] == ' ') {
  1205. X+             for (p = &buf[1];  *p && *p != '\n'; p++)
  1206. X+                 continue;
  1207. X+             *p = '\0';
  1208. X+             arts[top].name = hash_str (&buf[1]);
  1209. X+         } else {
  1210. X+             error = 12;
  1211. X+             goto corrupt_index;
  1212. X+         }
  1213. X+ 
  1214. X+         /*
  1215. X+          * Date:
  1216. X+          */
  1217. X+         if (fgets(buf, sizeof buf, fp) == NULL) {
  1218. X+             error = 13;
  1219. X+             goto corrupt_index;
  1220. X+         }
  1221. X+ 
  1222. X          buf[strlen (buf)-1] = '\0';
  1223. X          my_strncpy (arts[top].date, buf, 12);
  1224. X  
  1225. X***************
  1226. X*** 802,808 ****
  1227. X           * Archive-name:
  1228. X           */
  1229. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1230. X!             error = 11;
  1231. X              goto corrupt_index;
  1232. X          }
  1233. X  
  1234. X--- 768,774 ----
  1235. X           * Archive-name:
  1236. X           */
  1237. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1238. X!             error = 14;
  1239. X              goto corrupt_index;
  1240. X          }
  1241. X  
  1242. X***************
  1243. X*** 811,817 ****
  1244. X          } else if (buf[0] == '%') {
  1245. X              n = atoi (&buf[1]);
  1246. X              if (n > top || n < 0) {
  1247. X!                 error = 12;
  1248. X                  goto corrupt_index;
  1249. X              }
  1250. X              arts[top].archive = arts[n].archive;
  1251. X--- 777,783 ----
  1252. X          } else if (buf[0] == '%') {
  1253. X              n = atoi (&buf[1]);
  1254. X              if (n > top || n < 0) {
  1255. X!                 error = 15;
  1256. X                  goto corrupt_index;
  1257. X              }
  1258. X              arts[top].archive = arts[n].archive;
  1259. X***************
  1260. X*** 821,827 ****
  1261. X              *p = '\0';
  1262. X              arts[top].archive = hash_str (&buf[1]);
  1263. X          } else {
  1264. X!             error = 13;
  1265. X              goto corrupt_index;
  1266. X          }
  1267. X  
  1268. X--- 787,793 ----
  1269. X              *p = '\0';
  1270. X              arts[top].archive = hash_str (&buf[1]);
  1271. X          } else {
  1272. X!             error = 16;
  1273. X              goto corrupt_index;
  1274. X          }
  1275. X  
  1276. X***************
  1277. X*** 829,835 ****
  1278. X           * part no.
  1279. X           */
  1280. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1281. X!             error = 14;
  1282. X              goto corrupt_index;
  1283. X          }
  1284. X  
  1285. X--- 795,801 ----
  1286. X           * part no.
  1287. X           */
  1288. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1289. X!             error = 17;
  1290. X              goto corrupt_index;
  1291. X          }
  1292. X  
  1293. X***************
  1294. X*** 842,848 ****
  1295. X           * patch no.
  1296. X           */
  1297. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1298. X!             error = 15;
  1299. X              goto corrupt_index;
  1300. X          }
  1301. X  
  1302. X--- 808,814 ----
  1303. X           * patch no.
  1304. X           */
  1305. X          if (fgets(buf, sizeof buf, fp) == NULL) {
  1306. X!             error = 18;
  1307. X              goto corrupt_index;
  1308. X          }
  1309. X  
  1310. X***************
  1311. X*** 970,975 ****
  1312. X--- 936,944 ----
  1313. X   *  or
  1314. X   *  Save any new articles to savedir and mark arts read and mail user
  1315. X   *  and inform how many arts in which groups were saved.
  1316. X+  *  or
  1317. X+  *  Mail any new articles to specified user and mark arts read and mail
  1318. X+  *  user and inform how many arts in which groups were mailed.
  1319. X   */
  1320. X  
  1321. X  int check_start_save_any_news (check_start_save)
  1322. X***************
  1323. X*** 997,1002 ****
  1324. X--- 966,972 ----
  1325. X          case START_ANY_NEWS:
  1326. X              wait_message (txt_checking_for_news);
  1327. X              break;
  1328. X+         case MAIL_ANY_NEWS:
  1329. X          case SAVE_ANY_NEWS:
  1330. X              sprintf (log, "%s/log", rcdir);
  1331. X              if ((fp_log = fopen (log, "w")) == NULL) {
  1332. X***************
  1333. X*** 1037,1042 ****
  1334. X--- 1007,1013 ----
  1335. X                      case START_ANY_NEWS:
  1336. X                          return i;    /* return first group with unread news */ 
  1337. X                          /* NOTREACHED */
  1338. X+                     case MAIL_ANY_NEWS:
  1339. X                      case SAVE_ANY_NEWS:
  1340. X                          if (print_group) {    
  1341. X                              sprintf (msg, "Saved %s...\n", active[my_group[i]].name);
  1342. X***************
  1343. X*** 1056,1062 ****
  1344. X                          }
  1345. X                          saved_arts++;
  1346. X  
  1347. X!                         sprintf (buf, "%s/%s/%ld", savedir, group_path, arts[j].artnum);
  1348. X                          if ((fp = fopen (buf, "w")) == NULL) {
  1349. X                              fprintf (fp_log, txt_cannot_open, buf);
  1350. X                              error_message (txt_cannot_open, buf);
  1351. X--- 1027,1039 ----
  1352. X                          }
  1353. X                          saved_arts++;
  1354. X  
  1355. X!                         if (check_start_save == MAIL_ANY_NEWS) {
  1356. X!                             sprintf (buf, "/tmp/tin.%d", getpid ());
  1357. X!                         } else {
  1358. X!                             sprintf (buf, "%s/%s/%ld", savedir,
  1359. X!                                      group_path, arts[j].artnum);
  1360. X!                         }
  1361. X! 
  1362. X                          if ((fp = fopen (buf, "w")) == NULL) {
  1363. X                              fprintf (fp_log, txt_cannot_open, buf);
  1364. X                              error_message (txt_cannot_open, buf);
  1365. X***************
  1366. X*** 1063,1079 ****
  1367. X                              continue;
  1368. X                          }
  1369. X                  
  1370. X                          art_open (arts[j].artnum, group_path);    
  1371. X                          fseek (note_fp, 0L, 0);
  1372. X                          copy_fp (note_fp, fp, (char *) 0);
  1373. X                          art_close ();
  1374. X                          fclose (fp);
  1375. X                          break;
  1376. X                  }
  1377. X              }
  1378. X          }
  1379. X          
  1380. X!         if (check_start_save == SAVE_ANY_NEWS) {
  1381. X              if (catchup) {
  1382. X                  for (j = 0; j < top; j++) {
  1383. X                      arts[j].unread = ART_READ;
  1384. X--- 1040,1069 ----
  1385. X                              continue;
  1386. X                          }
  1387. X                  
  1388. X+                         if (check_start_save == MAIL_ANY_NEWS) {
  1389. X+                             fprintf (fp, "To: %s\n", mail_news_user);
  1390. X+                         }
  1391. X+ 
  1392. X                          art_open (arts[j].artnum, group_path);    
  1393. X                          fseek (note_fp, 0L, 0);
  1394. X                          copy_fp (note_fp, fp, (char *) 0);
  1395. X                          art_close ();
  1396. X                          fclose (fp);
  1397. X+ 
  1398. X+                         if (check_start_save == MAIL_ANY_NEWS) {
  1399. X+                             sprintf (msg, "%s \"%s\" < %s", mailer,
  1400. X+                                     mail_news_user, buf);
  1401. X+                             if (! invoke_cmd (msg)) {
  1402. X+                                 error_message (txt_command_failed_s, msg);
  1403. X+                             }
  1404. X+                         }
  1405. X                          break;
  1406. X                  }
  1407. X              }
  1408. X          }
  1409. X          
  1410. X!         if (check_start_save == MAIL_ANY_NEWS ||
  1411. X!             check_start_save == SAVE_ANY_NEWS) {
  1412. X              if (catchup) {
  1413. X                  for (j = 0; j < top; j++) {
  1414. X                      arts[j].unread = ART_READ;
  1415. X***************
  1416. X*** 1106,1113 ****
  1417. X              wait_message (txt_there_is_no_news);
  1418. X              return -1;
  1419. X              /* NOTREACHED */ 
  1420. X          case SAVE_ANY_NEWS:
  1421. X!             sprintf (msg, "\nSaved %d article(s) from %d group(s)\n", saved_arts, saved_groups);
  1422. X              fprintf (fp_log, "%s", msg);
  1423. X              if (verbose) {
  1424. X                  wait_message (msg);
  1425. X--- 1096,1124 ----
  1426. X              wait_message (txt_there_is_no_news);
  1427. X              return -1;
  1428. X              /* NOTREACHED */ 
  1429. X+         case MAIL_ANY_NEWS:
  1430. X+             unlink (buf);
  1431. X+             sprintf (msg, "\nMailed %d article(s) from %d group(s)\n", 
  1432. X+                     saved_arts, saved_groups);
  1433. X+             fprintf (fp_log, "%s", msg);
  1434. X+             if (verbose) {
  1435. X+                 wait_message (msg);
  1436. X+             }
  1437. X+             if (log_opened) {
  1438. X+                 fclose (fp_log);
  1439. X+                 if (verbose) {
  1440. X+                     sprintf (msg, "Mailing log to %s\n", mail_news_user);
  1441. X+                     wait_message (msg);
  1442. X+                 }
  1443. X+                 sprintf (buf, "%s \"%s\" < %s", mailer, mail_news_user, log);
  1444. X+                 if (! invoke_cmd (buf)) {
  1445. X+                     error_message (txt_command_failed_s, buf);
  1446. X+                 }
  1447. X+             }
  1448. X+             break;
  1449. X          case SAVE_ANY_NEWS:
  1450. X!             sprintf (msg, "\nSaved %d article(s) from %d group(s)\n",
  1451. X!                     saved_arts, saved_groups);
  1452. X              fprintf (fp_log, "%s", msg);
  1453. X              if (verbose) {
  1454. X                  wait_message (msg);
  1455. X***************
  1456. X*** 1123,1129 ****
  1457. X                      error_message (txt_command_failed_s, buf);
  1458. X                  }
  1459. X              }
  1460. X!             /* NOTREACHED */ 
  1461. X      }
  1462. X      return 0;
  1463. X  }
  1464. X--- 1134,1140 ----
  1465. X                      error_message (txt_command_failed_s, buf);
  1466. X                  }
  1467. X              }
  1468. X!             break; 
  1469. X      }
  1470. X      return 0;
  1471. X  }
  1472. X***************
  1473. X*** 1177,1183 ****
  1474. X      }
  1475. X  
  1476. X      make_threads (TRUE);
  1477. X!     find_base ();
  1478. X  
  1479. X      if (local_index) {
  1480. X          set_tin_uid_gid ();
  1481. X--- 1188,1194 ----
  1482. X      }
  1483. X  
  1484. X      make_threads (TRUE);
  1485. X!     find_base (show_only_unread);
  1486. X  
  1487. X      if (local_index) {
  1488. X          set_tin_uid_gid ();
  1489. X***************
  1490. X*** 1323,1336 ****
  1491. X      struct header *s1 = (struct header *) p1;
  1492. X      struct header *s2 = (struct header *) p2;
  1493. X  
  1494. X!     /* s1->from less than s2->from */
  1495. X!     if (strcmp (s1->from, s2->from) < 0) {
  1496. X!         return (sort_art_type == SORT_BY_FROM_DESCEND ? -1 : 1);
  1497. X      }
  1498. X-     /* s1->from greater than s2->from */
  1499. X-     if (strcmp (s1->from, s2->from) > 0) {
  1500. X-         return (sort_art_type == SORT_BY_FROM_DESCEND ? 1 : -1);
  1501. X-     }
  1502. X      return 0;
  1503. X  }
  1504. X  
  1505. X--- 1334,1358 ----
  1506. X      struct header *s1 = (struct header *) p1;
  1507. X      struct header *s2 = (struct header *) p2;
  1508. X  
  1509. X!     if (show_author == SHOW_FROM_NAME) {
  1510. X!         /* s1->name less than s2->name */
  1511. X!         if (strcmp (s1->name, s2->name) < 0) {
  1512. X!             return (sort_art_type == SORT_BY_FROM_DESCEND ? -1 : 1);
  1513. X!         }
  1514. X!         /* s1->name greater than s2->name */
  1515. X!         if (strcmp (s1->name, s2->name) > 0) {
  1516. X!             return (sort_art_type == SORT_BY_FROM_DESCEND ? 1 : -1);
  1517. X!         }
  1518. X!     } else {    /* SHOW_FROM_ADDR */
  1519. X!         /* s1->from less than s2->from */
  1520. X!         if (strcmp (s1->from, s2->from) < 0) {
  1521. X!             return (sort_art_type == SORT_BY_FROM_DESCEND ? -1 : 1);
  1522. X!         }
  1523. X!         /* s1->from greater than s2->from */
  1524. X!         if (strcmp (s1->from, s2->from) > 0) {
  1525. X!             return (sort_art_type == SORT_BY_FROM_DESCEND ? 1 : -1);
  1526. X!         }
  1527. X      }
  1528. X      return 0;
  1529. X  }
  1530. X  
  1531. X***************
  1532. X*** 1359,1364 ****
  1533. X--- 1381,1387 ----
  1534. X  {    
  1535. X      art->subject = (char *) 0;
  1536. X      art->from = (char *) 0;
  1537. X+     art->name = (char *) 0;
  1538. X      art->date[0] = '\0';
  1539. X      art->archive = (char *) 0;
  1540. X      art->part = (char *) 0;
  1541. Xdiff -rcs ../105/curses.c ./curses.c
  1542. X*** ../105/curses.c    Tue Oct 15 09:39:34 1991
  1543. X--- ./curses.c    Thu Oct 31 15:23:00 1991
  1544. X***************
  1545. X*** 3,9 ****
  1546. X   *  Module    : curses.c
  1547. X   *  Author    : Dave Taylor
  1548. X   *  Created   : ??-??-86
  1549. X!  *  Updated   : 14-10-91
  1550. X   *  Release   : 2.1
  1551. X   *  Notes     : This is a screen management library borrowed with permission
  1552. X   *              from the Elm mail system (a great mailer--I highly recommend
  1553. X--- 3,9 ----
  1554. X   *  Module    : curses.c
  1555. X   *  Author    : Dave Taylor
  1556. X   *  Created   : ??-??-86
  1557. X!  *  Updated   : 28-10-91
  1558. X   *  Release   : 2.1
  1559. X   *  Notes     : This is a screen management library borrowed with permission
  1560. X   *              from the Elm mail system (a great mailer--I highly recommend
  1561. X***************
  1562. X*** 14,29 ****
  1563. X  
  1564. X  #include <stdio.h>
  1565. X  #include <curses.h>
  1566. X! #include <sys/ioctl.h>
  1567. X  
  1568. X  #ifdef TRUE
  1569. X! #undef TRUE
  1570. X! #define        TRUE        1
  1571. X  #endif
  1572. X  
  1573. X  #ifdef FALSE
  1574. X! #undef FALSE
  1575. X! #define        FALSE        0
  1576. X  #endif
  1577. X  
  1578. X  #define        BACKSPACE    '\b'
  1579. X--- 14,35 ----
  1580. X  
  1581. X  #include <stdio.h>
  1582. X  #include <curses.h>
  1583. X! #ifndef MINIX
  1584. X! #    include <sys/ioctl.h>
  1585. X! #endif
  1586. X  
  1587. X  #ifdef TRUE
  1588. X! #    undef TRUE
  1589. X! #    define        TRUE        1
  1590. X! #else    
  1591. X! #    define        TRUE        1
  1592. X  #endif
  1593. X  
  1594. X  #ifdef FALSE
  1595. X! #    undef FALSE
  1596. X! #    define        FALSE        0
  1597. X! #else    
  1598. X! #    define        FALSE        0
  1599. X  #endif
  1600. X  
  1601. X  #define        BACKSPACE    '\b'
  1602. X***************
  1603. X*** 35,49 ****
  1604. X  int inverse_okay = TRUE;
  1605. X  
  1606. X  #ifdef BSD
  1607. X! #  ifndef BSD4_1
  1608. X! #    include <sgtty.h>
  1609. X! #  else
  1610. X! #    include <termio.h>
  1611. X! #  endif
  1612. X  #else
  1613. X! #  ifndef SYSV
  1614. X! #    include <termio.h>
  1615. X! #  endif
  1616. X  #endif
  1617. X  
  1618. X  #include <ctype.h>
  1619. X--- 41,59 ----
  1620. X  int inverse_okay = TRUE;
  1621. X  
  1622. X  #ifdef BSD
  1623. X! #    ifndef BSD4_1
  1624. X! #        include <sgtty.h>
  1625. X! #    else
  1626. X! #        include <termio.h>
  1627. X! #    endif
  1628. X  #else
  1629. X! #    ifndef SYSV
  1630. X! #        ifndef MINIX
  1631. X! #            include <termio.h>
  1632. X! #        else
  1633. X! #            include <sgtty.h>
  1634. X! #        endif
  1635. X! #    endif
  1636. X  #endif
  1637. X  
  1638. X  #include <ctype.h>
  1639. X***************
  1640. X*** 58,66 ****
  1641. X  # define _cleartoeos    _clr2eos
  1642. X  #endif
  1643. X  
  1644. X! #ifdef BSD
  1645. X! #define TCGETA    TIOCGETP
  1646. X! #define TCSETAW    TIOCSETP
  1647. X  
  1648. X  struct sgttyb _raw_tty,
  1649. X            _original_tty;
  1650. X--- 68,76 ----
  1651. X  # define _cleartoeos    _clr2eos
  1652. X  #endif
  1653. X  
  1654. X! #if defined(BSD) || defined(MINIX)
  1655. X! #    define TCGETA    TIOCGETP
  1656. X! #    define TCSETAW    TIOCSETP
  1657. X  
  1658. X  struct sgttyb _raw_tty,
  1659. X            _original_tty;
  1660. X***************
  1661. X*** 69,75 ****
  1662. X                _original_tty;
  1663. X  #endif
  1664. X  
  1665. X! static int _inraw = 0;                  /* are we IN rawmode?    */
  1666. X  
  1667. X  #define DEFAULT_LINES_ON_TERMINAL    24
  1668. X  #define DEFAULT_COLUMNS_ON_TERMINAL    80
  1669. X--- 79,85 ----
  1670. X                _original_tty;
  1671. X  #endif
  1672. X  
  1673. X! static int _inraw = FALSE;                  /* are we IN rawmode?    */
  1674. X  
  1675. X  #define DEFAULT_LINES_ON_TERMINAL    24
  1676. X  #define DEFAULT_COLUMNS_ON_TERMINAL    80
  1677. X***************
  1678. X*** 78,85 ****
  1679. X              *_setinverse, *_clearinverse, *_setunderline, *_clearunderline,
  1680. X              *_terminalinit, *_terminalend;
  1681. X  
  1682. X! static
  1683. X! int _lines,_columns;
  1684. X  
  1685. X  static char _terminal[1024];              /* Storage for terminal entry */
  1686. X  static char _capabilities[1024];           /* String for cursor motion */
  1687. X--- 88,94 ----
  1688. X              *_setinverse, *_clearinverse, *_setunderline, *_clearunderline,
  1689. X              *_terminalinit, *_terminalend;
  1690. X  
  1691. X! static int _lines,_columns;
  1692. X  
  1693. X  static char _terminal[1024];              /* Storage for terminal entry */
  1694. X  static char _capabilities[1024];           /* String for cursor motion */
  1695. X***************
  1696. X*** 86,105 ****
  1697. X  
  1698. X  static char *ptr = _capabilities;    /* for buffering         */
  1699. X  
  1700. X! int    outchar();            /* char output for tputs */
  1701. X! char  *tgetstr(),                    /* Get termcap capability */
  1702. X!       *tgoto();                /* and the goto stuff    */
  1703. X  
  1704. X! int InitScreen()
  1705. X  {
  1706. X      int  tgetent();      /* get termcap entry */
  1707. X      char termname[40], *p;
  1708. X-     char *strcpy(), *getenv();
  1709. X      
  1710. X      if ((p = getenv ("TERM")) == NULL) {
  1711. X!         fprintf (stderr,
  1712. X!           "%s: TERM variable must be set to use screen capabilities\n",
  1713. X!           progname);
  1714. X          return (FALSE);
  1715. X      }
  1716. X      if (strcpy (termname, p) == NULL) {
  1717. X--- 95,111 ----
  1718. X  
  1719. X  static char *ptr = _capabilities;    /* for buffering         */
  1720. X  
  1721. X! int    outchar ();            /* char output for tputs */
  1722. X! char  *tgetstr (),            /* Get termcap capability */
  1723. X!       *tgoto ();            /* and the goto stuff    */
  1724. X  
  1725. X! int InitScreen ()
  1726. X  {
  1727. X      int  tgetent();      /* get termcap entry */
  1728. X      char termname[40], *p;
  1729. X      
  1730. X      if ((p = getenv ("TERM")) == NULL) {
  1731. X!         fprintf (stderr, "%s: TERM variable must be set to use screen capabilities\n", progname);
  1732. X          return (FALSE);
  1733. X      }
  1734. X      if (strcpy (termname, p) == NULL) {
  1735. X***************
  1736. X*** 125,133 ****
  1737. X      _terminalinit   = tgetstr ("ti", &ptr);
  1738. X      _terminalend    = tgetstr ("te", &ptr);
  1739. X  
  1740. X!     if (_terminalinit) {
  1741. X!         tputs (_terminalinit, 1, outchar);
  1742. X!     }
  1743. X  
  1744. X      if (!_clearscreen) {
  1745. X          fprintf (stderr,
  1746. X--- 131,137 ----
  1747. X      _terminalinit   = tgetstr ("ti", &ptr);
  1748. X      _terminalend    = tgetstr ("te", &ptr);
  1749. X  
  1750. X!     InitWin ();
  1751. X  
  1752. X      if (!_clearscreen) {
  1753. X          fprintf (stderr,
  1754. X***************
  1755. X*** 172,177 ****
  1756. X--- 176,189 ----
  1757. X      *num_columns = _columns;        /* assume index from one */
  1758. X  }
  1759. X  
  1760. X+ void InitWin ()
  1761. X+ {
  1762. X+     if (_terminalinit) {
  1763. X+         tputs (_terminalinit, 1, outchar);
  1764. X+         fflush (stdout);
  1765. X+     }
  1766. X+ }
  1767. X+ 
  1768. X  void EndWin ()
  1769. X  {
  1770. X      if (_terminalend) {
  1771. X***************
  1772. X*** 269,275 ****
  1773. X        (void) ioctl(TTYIN, TCGETA, &_original_tty);    /** current setting **/
  1774. X  
  1775. X        (void) ioctl(TTYIN, TCGETA, &_raw_tty);    /** again! **/
  1776. X! #ifdef BSD
  1777. X        _raw_tty.sg_flags &= ~(ECHO | CRMOD);    /* echo off */
  1778. X        _raw_tty.sg_flags |= CBREAK;    /* raw on    */
  1779. X  #else
  1780. X--- 281,287 ----
  1781. X        (void) ioctl(TTYIN, TCGETA, &_original_tty);    /** current setting **/
  1782. X  
  1783. X        (void) ioctl(TTYIN, TCGETA, &_raw_tty);    /** again! **/
  1784. X! #if defined(BSD) || defined(MINIX)
  1785. X        _raw_tty.sg_flags &= ~(ECHO | CRMOD);    /* echo off */
  1786. X        _raw_tty.sg_flags |= CBREAK;    /* raw on    */
  1787. X  #else
  1788. Xdiff -rcs ../105/debug.c ./debug.c
  1789. X*** ../105/debug.c    Wed Oct  2 20:20:32 1991
  1790. X--- ./debug.c    Mon Nov  4 15:03:25 1991
  1791. X***************
  1792. X*** 3,9 ****
  1793. X   *  Module    : debug.c
  1794. X   *  Author    : I.Lea
  1795. X   *  Created   : 01-04-91
  1796. X!  *  Updated   : 29-09-91
  1797. X   *  Release   : 1.0
  1798. X   *  Notes     : debug routines
  1799. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  1800. X--- 3,9 ----
  1801. X   *  Module    : debug.c
  1802. X   *  Author    : I.Lea
  1803. X   *  Created   : 01-04-91
  1804. X!  *  Updated   : 04-11-91
  1805. X   *  Release   : 1.0
  1806. X   *  Notes     : debug routines
  1807. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  1808. X***************
  1809. X*** 15,20 ****
  1810. X--- 15,22 ----
  1811. X  
  1812. X  #include "tin.h"
  1813. X  
  1814. X+ #define LOG_USER_FILE    "/tmp/.tin"
  1815. X+ 
  1816. X  int debug;
  1817. X  
  1818. X  
  1819. X***************
  1820. X*** 42,67 ****
  1821. X      if ((fp = fopen ("/tmp/DUMP","a+")) != NULL) {
  1822. X          fprintf (fp,"art=[%5ld] killed=[%s]\n", s->artnum,
  1823. X              (s->tagged ? "TRUE" : "FALSE"));
  1824. X!         fprintf (fp,"subj=[%-38s]  from=[%-20s]\n", s->subject, s->from);
  1825. X           if (s->archive) {
  1826. X               fprintf (fp, "arch=[%-38s]  ", s->archive);
  1827. X           } else {
  1828. X!              fprintf (fp, "arch=[%-38s]  ", "");
  1829. X           }
  1830. X           if (s->part) {
  1831. X               fprintf (fp, "part=[%s]  ", s->part);
  1832. X           } else {
  1833. X!              fprintf (fp, "part=[%s]  ", "");
  1834. X           }
  1835. X           if (s->patch) {
  1836. X               fprintf (fp, "patch=[%s]\n", s->patch);
  1837. X          } else {
  1838. X!              fprintf (fp, "patch=[%s]\n", "");
  1839. X           }
  1840. X!         fprintf (fp,"thread=[%s]  inthread=[%s]  unread=[%s]\n",
  1841. X!         (s->thread == ART_NORMAL ? "ART_NORMAL" : "ART_EXPIRED"),
  1842. X!         (s->inthread ? "TRUE" : "FALSE"),
  1843. X!         (s->unread ? "TRUE" : "FALSE"));
  1844. X          fflush (fp);
  1845. X          fclose (fp);
  1846. X          chmod ("/tmp/DUMP", 0666);
  1847. X--- 44,73 ----
  1848. X      if ((fp = fopen ("/tmp/DUMP","a+")) != NULL) {
  1849. X          fprintf (fp,"art=[%5ld] killed=[%s]\n", s->artnum,
  1850. X              (s->tagged ? "TRUE" : "FALSE"));
  1851. X!         fprintf (fp,"subj=[%-38s]\n", s->subject);
  1852. X!         fprintf (fp,"from=[%s]  name=[%s]\n", s->from, s->name);
  1853. X           if (s->archive) {
  1854. X               fprintf (fp, "arch=[%-38s]  ", s->archive);
  1855. X           } else {
  1856. X!              fprintf (fp, "arch=[]  ");
  1857. X           }
  1858. X           if (s->part) {
  1859. X               fprintf (fp, "part=[%s]  ", s->part);
  1860. X           } else {
  1861. X!              fprintf (fp, "part=[]  ");
  1862. X           }
  1863. X           if (s->patch) {
  1864. X               fprintf (fp, "patch=[%s]\n", s->patch);
  1865. X          } else {
  1866. X!              fprintf (fp, "patch=[]\n");
  1867. X           }
  1868. X!         fprintf (fp,"thread=[%d]  inthread=[%d]  unread=[%d]\n",
  1869. X!             s->thread, s->inthread, s->unread);
  1870. X! /*        fprintf (fp,"thread=[%s]  inthread=[%s]  unread=[%s]\n",
  1871. X!             (s->thread == ART_NORMAL ? "ART_NORMAL" : "ART_EXPIRED"),
  1872. X!             (s->inthread ? "TRUE" : "FALSE"),
  1873. X!             (s->unread ? "TRUE" : "FALSE"));
  1874. X! */
  1875. X          fflush (fp);
  1876. X          fclose (fp);
  1877. X          chmod ("/tmp/DUMP", 0666);
  1878. X***************
  1879. X*** 122,125 ****
  1880. X--- 128,152 ----
  1881. X          fclose (fp);
  1882. X          chmod ("/tmp/ACTIVE", 0666);
  1883. X      }
  1884. X+ }
  1885. X+ 
  1886. X+ 
  1887. X+ void log_user ()
  1888. X+ {
  1889. X+ #ifdef LOG_USER
  1890. X+     char buf[33];
  1891. X+     FILE *fp;
  1892. X+     long epoch;
  1893. X+     extern struct passwd *myentry;
  1894. X+ 
  1895. X+     time (&epoch);
  1896. X+ 
  1897. X+     if ((fp = fopen (LOG_USER_FILE, "a+")) != NULL) {
  1898. X+         my_strncpy (buf, myentry->pw_gecos, 32);
  1899. X+         fprintf (fp, "%s%d: %-32s (%-8s) %s", version, PATCHLEVEL,
  1900. X+                 buf, myentry->pw_name, ctime (&epoch));
  1901. X+         fclose (fp);
  1902. X+         chmod (LOG_USER_FILE, 0666);
  1903. X+     }
  1904. X+ #endif
  1905. X  }
  1906. Xdiff -rcs ../105/feed.c ./feed.c
  1907. X*** ../105/feed.c    Thu Oct 10 20:11:05 1991
  1908. X--- ./feed.c    Tue Oct 29 19:17:51 1991
  1909. X***************
  1910. X*** 3,9 ****
  1911. X   *  Module    : feed.c
  1912. X   *  Author    : I.Lea
  1913. X   *  Created   : 31-08-91
  1914. X!  *  Updated   : 04-10-91
  1915. X   *  Release   : 1.0
  1916. X   *  Notes     : provides same interface to mail,pipe,print and save commands
  1917. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  1918. X--- 3,9 ----
  1919. X   *  Module    : feed.c
  1920. X   *  Author    : I.Lea
  1921. X   *  Created   : 31-08-91
  1922. X!  *  Updated   : 28-10-91
  1923. X   *  Release   : 1.0
  1924. X   *  Notes     : provides same interface to mail,pipe,print and save commands
  1925. X   *  Copyright : (c) Copyright 1991 by Iain Lea
  1926. X***************
  1927. X*** 17,23 ****
  1928. X  
  1929. X  extern char *glob_group;            /* Group name */
  1930. X  extern char note_h_date[LEN];        /* Date:    */
  1931. X- extern char note_h_from[LEN];        /* From:    */
  1932. X  extern char note_h_subj[LEN];        /* Subject:    */
  1933. X  extern FILE *note_fp;                /* the body of the current article */
  1934. X  extern int note_end;                /* end of article ? */
  1935. X--- 17,22 ----
  1936. X***************
  1937. X*** 50,55 ****
  1938. X--- 49,55 ----
  1939. X      int is_mailbox = FALSE;
  1940. SHAR_EOF
  1941. echo "End of tin part 1"
  1942. echo "File tin.patch06 is continued in part 2"
  1943. echo "2" > shar3_seq_.tmp
  1944. exit 0
  1945.  
  1946. -- 
  1947.  Dr. med. dipl.-math Dieter Becker           Tel.: (0 / +49) 6841 - 16 3046
  1948.  Medizinische Universitaets- und Poliklinik  Fax.: (0 / +49) 6841 - 16 3369
  1949.  Innere Medizin III                         
  1950.  D - 6650 Homburg / Saar                     Email: becker@med-in.uni-sb.de
  1951. exit 0 # Just in case...
  1952. -- 
  1953. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1954. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1955. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1956. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1957.