Xref: utzoo news.software.b:6685 comp.sources.bugs:2804 Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!csun!kithrup!borla!davison From: davison%borla@kithrup.com Newsgroups: news.software.b,comp.sources.bugs Subject: Trn patch #2 (part 2 of 2) Message-ID: Date: 20 Jan 91 09:11:22 GMT References: Organization: Borland International Lines: 2261 Here is patch #2 for trn (producing v1.0.2). Part 2 of 2 ** Please apply ** To extract this from trn, type "e dir" where dir is the directory you want the patch placed. Otherwise, delete everything through the first cut line and run it through sh. Be sure to unpack part 1 of this patch in a similar manner and then follow the directions in the file patch2a. -- \ /| / /|\/ /| /(_) Wayne Davison (_)/ |/ /\|/ / |/ \ 0004475895@mcimail.com (preferred) (W A Y N e) davison@dri.com (...!uunet!drivax!davison) ----8<------8<------8<------8<-----cut here----->8------>8------>8------>8---- #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # patch2b # This archive created: Fri Jan 19 20:02:31 1991 export PATH; PATH=/bin:/usr/bin:$PATH echo shar: "extracting 'patch2b'" '(63583 characters)' if test -f 'patch2b' then echo shar: "will not over-write existing file 'patch2b'" else cat << \SHAR_EOF > 'patch2b' Trn patch #2 PART 2 OF 2. See the file patch2a for instructions on how to install this patch and for a brief list of what has changed. Index: rn.c Prereq: v1.0.1 @@ -10,8 +10,11 @@ =*/ = -static char rnid[] = "@(#)$Header: rn.c,v 4.3.3.2 90/08/20 16:48:19 davison Trn $"; -static char patchlevel[] = "Trn v1.0.1 based on Rn patchlevel 47"; +static char rnid[] = "@(#)$Header: rn.c,v 4.3.3.3 91/01/16 03:28:42 davison Trn $"; +static char patchlevel[] = "Trn v1.0.2 based on Rn patchlevel 54"; = =/* $Log: rn.c,v $ + * Revision 4.3.3.3 91/01/16 03:28:42 davison + * Integrated rn patches 48-54. Fixed in_char and verify interaction. + * = * Revision 4.3.3.2 90/08/20 16:48:19 davison = * Changed unthreaded group's default action, version #, email address. @@ -20,4 +23,25 @@ = * Initial Trn Release = * + * Revision 4.3.2.11 91/01/04 22:58:24 sob + * Checkpoint for patch 54 + * + * Revision 4.3.2.10 90/12/30 22:58:24 sob + * Checkpoint for patch 53 + * + * Revision 4.3.2.9 90/12/13 22:58:24 sob + * Checkpoint for patch 52 + * + * Revision 4.3.2.8 90/12/10 01:35:43 sob + * Checkpoint for patch 51 + * + * Revision 4.3.2.7 90/11/23 20:30:43 sob + * Checkpoint for patch 50 + * + * Revision 4.3.2.6 90/11/22 13:55:23 sob + * Checkpoint for patch #49 + * + * Revision 4.3.2.5 90/11/06 01:19:43 sob + * Checkpoint for patch 48 + * = * Revision 4.3.2.4 90/04/03 23:11:33 sob = * Added more information to the version command. @@ -215,6 +239,6 @@ = IF(verbose) = sprintf(promptbuf, - "\n******** %3ld unread article%c in %s--read now? [%s] ", - (long)toread[ng], (toread[ng]==TR_ONE ? ' ' : 's'), + "\n******** %3ld unread article%s in %s--read now? [%s] ", + (long)toread[ng], (toread[ng]==TR_ONE ? nullstr : "s"), = ngname, dfltcmd); /* format prompt string */ = ELSE @@ -385,6 +409,9 @@ = in_char("\nReally? [ynh] ", 'C'); =#endif - putchar('\n') FLUSH; = setdef(buf,"y"); +#ifdef VERIFY + printcmd(); +#endif + putchar('\n') FLUSH; = if (*buf == 'h') { =#ifdef VERBOSE @@ -590,3 +617,2 @@ = return myngdir; =} - Index: mthreads.c @@ -1,5 +1,9 @@ -/* $Header: mthreads.c,v 4.3.3.2 90/08/20 16:43:19 davison Trn $ +/* $Header: mthreads.c,v 4.3.3.3 91/01/18 19:05:00 davison Trn $ =** =** $Log: mthreads.c,v $ +** Revision 4.3.3.3 91/01/18 19:05:00 davison +** Modified the way signals are handled to avoid endless loops. Added -s & -z +** options. Fixed a truncate bug and a problem with new groups not processing. +** =** Revision 4.3.3.2 90/08/20 16:43:19 davison =** Implemented new command-line interface and database upgrading. @@ -68,6 +72,6 @@ = =bool force_flag = FALSE, kill_mthreads = FALSE, no_processing = FALSE; -bool add_new = FALSE, rebuild = FALSE, grevious_error; -int daemon_delay = 0, log_verbosity = 0, debug = 0; +bool add_new = FALSE, rebuild = FALSE, zap_thread = FALSE, grevious_error; +int daemon_delay = 0, log_verbosity = 0, debug = 0, slow_down = 0; =long expire_time = 0; =char *hierarchy_list = NULL; @@ -99,6 +103,6 @@ =#endif = -char *thread_name(), *file_exp(); -void makethreads(), interrupt(), alarm_handler(), wrap_it_up(); +SIGRET alarm_handler(), int_handler(), severe_handler(); +void makethreads(), wrap_it_up(); = =main( argc, argv ) @@ -168,7 +172,13 @@ = no_processing = TRUE; = break; + case 's': + slow_down++; + break; = case 'v': = log_verbosity++; = break; + case 'z': + zap_thread = TRUE; + break; = default: = fprintf( stderr, "Unknown option: '%c'\n", **argv ); @@ -226,5 +236,6 @@ = } = fclose( fp_lock ); - if( kill( otherpid, kill_mthreads ? SIGTERM : 0 ) == -1 ) { + if( kill( otherpid, kill_mthreads ? SIGTERM : 0 ) == -1 + && errno == ESRCH ) { = if( unlink( filename ) == -1 ) { = fprintf( stderr, "unable to unlink lockfile %s\n", filename ); @@ -260,16 +271,22 @@ = } = +#ifdef SIGHUP = if( sigset( SIGHUP, SIG_IGN ) != SIG_IGN ) { - sigset( SIGHUP, interrupt ); + sigset( SIGHUP, int_handler ); = } +#endif = if( sigset( SIGINT, SIG_IGN ) != SIG_IGN ) { - sigset( SIGINT, interrupt ); + sigset( SIGINT, int_handler ); = } +#ifdef SIGQUIT = if( sigset( SIGQUIT, SIG_IGN ) != SIG_IGN ) { - sigset( SIGQUIT, interrupt ); + sigset( SIGQUIT, int_handler ); = } - sigset( SIGTERM, interrupt ); - sigset( SIGBUS, interrupt ); - sigset( SIGSEGV, interrupt ); +#endif + sigset( SIGTERM, int_handler ); +#ifdef SIGBUS + sigset( SIGBUS, severe_handler ); +#endif + sigset( SIGSEGV, severe_handler ); =#ifdef SIGTTIN = sigset( SIGTTIN, SIG_IGN ); @@ -279,5 +296,6 @@ =#ifdef lint = alarm_handler(); /* foolishness for lint's sake */ - interrupt( 14 ); + int_handler( SIGINT ); + severe_handler( SIGSEGV ); =#endif = @@ -284,5 +302,5 @@ = /* Ensure this machine has the right byte-order for the database */ = filename = file_exp( "%X/db.init" ); - if( (fp_lock = fopen( filename, "r")) == Nullfp + if( (fp_lock = fopen( filename, FOPEN_RB )) == Nullfp = || fread( &mt_bmap, 1, sizeof (BMAP), fp_lock ) < sizeof (BMAP)-1 ) { = if( fp_lock != Nullfp ) { @@ -291,5 +309,5 @@ = write_db_init: = mybytemap( &mt_bmap ); - if( (fp_lock = fopen( filename, "w" )) == Nullfp ) { + if( (fp_lock = fopen( filename, FOPEN_WB )) == Nullfp ) { = log_entry( "Unable to create file: `%s'.\n", filename ); = exit( 1 ); @@ -388,5 +406,5 @@ = for( ;; ) { = if( caught_interrupt ) { - wrap_it_up(); + wrap_it_up( 0 ); = /* NORETURN */ = } @@ -393,5 +411,5 @@ = pause(); /* let alarm go off */ = if( caught_interrupt ) { - wrap_it_up(); + wrap_it_up( 0 ); = /* NORETURN */ = } @@ -400,5 +418,5 @@ = /* Re-open our log file, if needed */ = if( !fp_log && !(fp_log = fopen( file_exp( "%X/mt.log" ), "a" )) ) { - exit( 1 ); + wrap_it_up( 1 ); = } =#ifndef SERVER @@ -405,5 +423,5 @@ = if( stat( file_exp( ACTIVE ), &filestat ) < 0 ) { = log_entry( "Unable to stat active file -- quitting.\n" ); - exit( 1 ); + wrap_it_up( 1 ); = } =#endif @@ -426,8 +444,8 @@ = }/* if */ = - wrap_it_up(); + wrap_it_up( 0 ); =} = -void +SIGRET =alarm_handler() ={ @@ -435,8 +453,12 @@ =} = -void -interrupt( sig ) +SIGRET +int_handler( sig ) =int sig; ={ + /* Flag interrupt occurred -- main loop attempts an orderly retreat. */ + if( ++caught_interrupt >= 3 ) { + wrap_it_up( 1 ); + } = /* Re-open our log file, if needed */ = if( fp_log || (fp_log = fopen( file_exp( "%X/mt.log" ), "a" )) ) { @@ -444,5 +466,5 @@ = log_entry( "mthreads halted.\n", sig); = } else { - log_entry( "** interrupt %d **\n", sig); + log_entry( "Interrupt %d received.\n", sig); = } = } @@ -450,14 +472,46 @@ = printf( "interrupt %d!\n", sig ); = } - /* Flag interrupt occurred -- main loop attempts an orderly retreat. */ - caught_interrupt = TRUE; +} + +/* Severe interrupts require severe action -- abort immediately, possibly +** removing the thread file on the way. +*/ +SIGRET +severe_handler( sig ) +int sig; +{ + /* Let's be a bit paranoid here -- avoid any possibility of looping. */ + if( caught_interrupt >= 10 ) { + wrap_it_up( 1 ); + } + caught_interrupt = 10; + + /* Destroy offending thread file if requested to do so. */ + if( zap_thread ) { + unlink( thread_name( line ) ); + } + /* Re-open our log file, if needed */ + if( fp_log || (fp_log = fopen( file_exp( "%X/mt.log" ), "a" )) ) { + log_error( "** Severe signal: %s **\n", sig ); + if( zap_thread ) { + log_entry( "Destroyed thread file for %s\n", line ); + } + } + if( !daemon_delay ) { + printf( "Severe signal: %s!\n", sig); + if( zap_thread ) { + printf( "Destroyed thread file for %s\n", line ); + } + } + wrap_it_up( 1 ); =} = =void -wrap_it_up() +wrap_it_up( ret ) +int ret; ={ = unlink( file_exp( "%X/LOCKmthreads" ) ); /* remove lock */ = - exit( 0 ); + exit( ret ); =} = @@ -483,5 +537,5 @@ = case ERR_ACCESS: = log_entry( "Server %s rejected connection -- quitting.\n", server ); - exit( 1 ); + wrap_it_up( 1 ); = default: = log_entry( "Couldn't connect with server %s -- sleeping.\n", server ); @@ -497,9 +551,9 @@ = if( (fp_active = fopen( file_exp( ACTIVE1 ), "w+" )) == Nullfp ) { = log_entry( "Unable to write the active1 file.\n" ); - exit( 1 ); + wrap_it_up( 1 ); = } = while( 1 ) { = if( caught_interrupt ) { - wrap_it_up(); + wrap_it_up( 0 ); = /* NORETURN */ = } @@ -520,5 +574,5 @@ = if( (fp_active = fopen( file_exp( ACTIVE ), "r" )) == Nullfp ) { = log_entry( "Unable to open the active file.\n" ); - exit( 1 ); + wrap_it_up( 1 ); = } =#endif @@ -527,5 +581,5 @@ = if( (fp_active3 = fopen( filename, "w" )) == Nullfp ) { = log_entry( "Unable to open the active2 file for update.\n" ); - exit( 1 ); + wrap_it_up( 1 ); = } = } @@ -532,8 +586,8 @@ = if( (fp_active2 = fopen( filename, "r" )) == Nullfp ) { = log_entry( "Unable to open the active2 file.\n" ); - exit( 1 ); + wrap_it_up( 1 ); = } = if( caught_interrupt ) { - wrap_it_up(); + wrap_it_up( 0 ); = /* NORETURN */ = } @@ -564,4 +618,7 @@ = } = } + if( debug || log_verbosity > 3 ) { + log_entry( "Processing %s:\n", line ); + } = data_file_open = 0; = /* If we've allocated some lines in memory while searching for @@ -605,10 +662,11 @@ = ch2 = 'y'; = } else { - total.last = last2 = last; = total.first = first2 = first; = if( add_new ) { + total.last = last2 = first - 1; = ch2 = (ch == '=' ? 'x' : ch); = added_groups++; = } else { + total.last = last2 = last; = ch2 = (ch == '=' ? 'X' : toupper( ch )); = } @@ -677,5 +735,5 @@ = case NG_MATCH: /* add if unthreaded */ = if( ch2 < 'a' ) { - last2 = first2 - 1; + total.last = last2 = first2 - 1; = added_groups++; = } @@ -796,5 +854,5 @@ = update_successful = TRUE; = } else { - strcpy( cp, ".new" ); /* write data as .new */ + strcpy( cp, NEW_THREAD ); /* write data as .new */ = if( write_data( line2 ) && !grevious_error ) { = rename( line2, filename ); @@ -826,4 +884,8 @@ = fprintf( fp_active3, fmt_active2, line, last2, first2, ch2 ); = } + /* If we're not out of sync, keep active2 file flushed. */ + if( !line_root ) { + fflush( fp_active3 ); + } = }/* for */ = @@ -873,4 +935,5 @@ =#endif /* not XENIX */ =#endif /* not TRUNCATE */ + truncate_len = -1; = } = @@ -1063,4 +1126,5 @@ ={ = time_t now; + char *ctime(); = = (void) time( &now ); Index: ndir.h @@ -1,5 +1,8 @@ -/* $Header: ndir.h,v 4.3.2.1 90/04/17 15:28:13 sob Exp $ +/* $Header: ndir.h,v 4.3.3.1 91/01/16 03:18:04 davison Trn $ = * = * $Log: ndir.h,v $ + * Revision 4.3.3.1 91/01/16 03:18:04 davison + * Added optional prototyping. + * = * Revision 4.3.2.1 90/04/17 15:28:13 sob = * Altered to include correct directory include file. @@ -52,10 +55,10 @@ =#define NULL 0 =#endif -extern DIR *opendir(); -extern struct direct *readdir(); -extern long telldir(); -extern void seekdir(); +extern DIR *opendir ANSI((char *)); +extern struct direct *readdir ANSI((DIR *)); +extern long telldir ANSI((DIR *)); +extern void seekdir ANSI((DIR *)); =#define rewinddir(dirp) seekdir((dirp), (long)0) -extern void closedir(); +extern void closedir ANSI((DIR *)); = =# endif Index: newsetup.SH @@ -6,7 +6,13 @@ =$startsh = -# $Header: newsetup.SH,v 4.3.2.7 90/03/17 20:34:48 sob Exp $ +# $Header: newsetup.SH,v 4.3.3.1 91/01/16 03:18:11 davison Trn $ =# =# $Log: newsetup.SH,v $ +# Revision 4.3.3.1 91/01/16 03:18:11 davison +# Integrated rn patches 48-54. +# +# Revision 4.3.2.8 90/11/22 13:26:55 sob +# Purged unneeded code. +# =# Revision 4.3.2.7 90/03/17 20:34:48 sob =# Remove the /tmp/n.* files created when generating the .newsrc. @@ -69,82 +75,4 @@ =#NORMALesac = -: NOTE: SED WILL NOT TAKE MORE THAN 9 WFILES, SO BEWARE - -$sort <\$active | $sed >/tmp/n.tmp\$\$ \\ - -e 's/^\([^ ]*\) .*\$/\1:/' \\ - -e '/^control:/{' \\ - -e " s/:/!/" \\ - -e " w /tmp/n.test\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e '/^junk:/{' \\ - -e " s/:/!/" \\ - -e " w /tmp/n.test\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e '/test:/{' \\ - -e " s/:/!/" \\ - -e " w /tmp/n.test\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^\$locorg\./{" \\ - -e " w /tmp/n.\$locorg\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^\$organization\./{" \\ - -e " w /tmp/n.\$organization\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^\$city\./{" \\ - -e " w /tmp/n.\$city\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^\$cntry\./{" \\ - -e " w /tmp/n.\$cntry\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^\$state\./{" \\ - -e " w /tmp/n.\$state\$\$" \\ - -e ' d' \\ - -e '}' - -$sed /tmp/n.local\$\$ \\ - -e "/^\$cont\./{" \\ - -e " w /tmp/n.\$cont\$\$" \\ - -e ' d' \\ - -e '}' - -$sed /tmp/n.local\$\$ \\ - -e "/^to\./{" \\ - -e " s/:/!/" \\ - -e " w /tmp/n.to\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^comp\./{" \\ - -e " w /tmp/n.comp\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^news\./{" \\ - -e " w /tmp/n.news\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^rec\./{" \\ - -e " w /tmp/n.rec\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^sci\./{" \\ - -e " w /tmp/n.sci\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/^soc\./{" \\ - -e " w /tmp/n.soc\$\$" \\ - -e ' d' \\ - -e '}' \\ - -e "/\./{" \\ - -e " w /tmp/n.misc\$\$" \\ - -e ' d' \\ - -e '}' - - =if $test -s \$dotdir/.newsrc ; then = $echo "Saving your current .newsrc as .oldnewsrc..." @@ -156,4 +84,5 @@ =$sed <\$active ' = /^to\./d + / [^mny][^ ]*$/d = s/ .*// = s/^/ / Index: newsgroups.SH @@ -5,7 +5,10 @@ =$spitshell >newsgroups <root] & (unread_selector+1))) { - selected_roots[p_art->root] |= (unread_selector+1); + if (p_art && !(selected_roots[p_art->root] & mask)) { + register int r = p_art->root; + selected_roots[r] |= mask; = selected_root_cnt++; = if (mode == 't') { - selected_count += root_article_cnts[p_art->root]; + selected_count += root_article_cnts[r]; = } else { - selected_count += count_one_root(p_art->root); + selected_count += count_one_root(r); =#ifdef VERBOSE = IF(verbose) @@ -376,13 +381,15 @@ = } = else if (ch == '-') { + register char mask = unread_selector+1; = find_article(art); = if (p_art && selected_root_cnt - && (selected_roots[p_art->root] & (unread_selector+1))) { - selected_roots[p_art->root] &= ~(unread_selector+1); + && (selected_roots[p_art->root] & mask)) { + register int r = p_art->root; + selected_roots[r] &= ~mask; = selected_root_cnt--; = if (mode == 't') { - selected_count -= root_article_cnts[p_art->root]; + selected_count -= root_article_cnts[r]; = } else { - selected_count -= count_one_root(p_art->root); + selected_count -= count_one_root(r); =#ifdef VERBOSE = IF(verbose) Index: ngstuff.h @@ -1,5 +1,8 @@ -/* $Header: ngstuff.h,v 4.3.3.1 90/06/20 22:39:07 davison Trn $ +/* $Header: ngstuff.h,v 4.3.3.2 91/01/16 03:18:27 davison Trn $ = * = * $Log: ngstuff.h,v $ + * Revision 4.3.3.2 91/01/16 03:18:27 davison + * Added optional prototyping. + * = * Revision 4.3.3.1 90/06/20 22:39:07 davison = * Initial Trn Release @@ -17,7 +20,10 @@ =EXT bool one_command INIT(FALSE); /* no ':' processing in perform() */ = -void ngstuff_init(); -int escapade(); -int switcheroo(); -int numnum(); -int perform(); +void ngstuff_init ANSI((void)); +int escapade ANSI((void)); +int switcheroo ANSI((void)); +int numnum ANSI((void)); +int perform ANSI((char *,int)); +#ifdef USETHREADS +int use_selected ANSI((void)); +#endif Index: norm.saver.SH @@ -5,7 +5,10 @@ =$spitshell >norm.saver <0 => # of entries in ngtodo */ = -void only_init(); -bool inlist(); /* return TRUE if ngname is in command line list */ +void only_init ANSI((void)); +bool inlist ANSI((char *)); /* return TRUE if ngname is in command line list */ = /* or if there was no list */ -void setngtodo(); +void setngtodo ANSI((char *)); =#ifdef ONLY - void end_only(); + void end_only ANSI((void)); =#endif Index: Pnews.SH @@ -5,7 +5,10 @@ =$spitshell >Pnews </dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/"` - fi + if $test "$ypmatch" != ""; then + fullname=`$ypmatch $logname passwd 2>/dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/"` + elif $test "$nidump" != ""; then + fullname=`$nidump passwd / | $sed -e "/^$logname:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^,:;]*\).*"'$'"/\1/" -e "q" -e "}" -e "d"` + fi = if $test "$fullname" = ""; then - fullname=`$sed /dev/null | $sed "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^(:]*\).*"'$'"/\1/" -e "s/^.*-//" -e "q"` - fi + if $test "$ypmatch" != ""; then + fullname=`$ypmatch $logname passwd 2>/dev/null | $sed -e "s/^[^:]*:[^:]*:[^:]*:[^:]*:\([^(:]*\).*"'$'"/\1/" -e "s/^.*-//" -e "q"` + fi = if $test "$fullname" = ""; then = fullname=`$sed @@ -166,5 +172,5 @@ = || strnEQ(art_buf, "cat ", 4) = || strnEQ(art_buf, "echo ", 5)) { - fseek(artfp,(long)-strlen(art_buf),1); + fseek(artfp,(long)-strlen(art_buf)-NL_SIZE+1,1); = savefrom = ftell(artfp); = if (cmdstr) { @@ -202,5 +208,5 @@ = extractprog = savestr("-"); = cnt = 0; - fseek(artfp,(long)-strlen(art_buf),1); + fseek(artfp,(long)-strlen(art_buf)-NL_SIZE+1,1); = savefrom = ftell(artfp); = uud_start(s); Index: respond.h @@ -1,5 +1,8 @@ -/* $Header: respond.h,v 4.3.3.1 90/06/20 22:39:54 davison Trn $ +/* $Header: respond.h,v 4.3.3.2 91/01/16 03:28:41 davison Trn $ = * = * $Log: respond.h,v $ + * Revision 4.3.3.2 91/01/16 03:28:41 davison + * Added optional prototyping. + * = * Revision 4.3.3.1 90/06/20 22:39:54 davison = * Initial Trn Release @@ -18,8 +21,8 @@ =#define SAVE_DONE 1 = -void respond_init(); -int save_article(); -int cancel_article(); -void reply(); -void followup(); -void invoke(); +void respond_init ANSI((void)); +int save_article ANSI((void)); +int cancel_article ANSI((void)); +void reply ANSI((void)); +void followup ANSI((void)); +void invoke ANSI((char *,char *)); Index: rn.h @@ -1,5 +1,8 @@ -/* $Header: rn.h,v 4.3 85/05/01 11:48:19 lwall Exp $ +/* $Header: rn.h,v 4.3.3.1 91/01/16 03:28:44 davison Trn $ = * = * $Log: rn.h,v $ + * Revision 4.3.3.1 91/01/16 03:28:44 davison + * Added optional prototyping. + * = * Revision 4.3 85/05/01 11:48:19 lwall = * Baseline for release with 4.3bsd. @@ -17,6 +20,6 @@ =EXT char *spool INIT(Nullch); /* public news spool directory */ = -void rn_init(); -void main(); -void set_ngname(); -char *getngdir(); +void rn_init ANSI((void)); +void main ANSI((int,char **)); +void set_ngname ANSI((char *)); +char *getngdir ANSI((char *)); Index: Rnmail.SH @@ -5,7 +5,10 @@ =$spitshell >Rnmail <> $tmpart + $echo "-- " >> $tmpart = cat $dotdir/.signature >> $tmpart = ;; Index: rt-select.c @@ -1,5 +1,9 @@ -/* $Header: rt-select.c,v 4.3.3.2 90/08/20 18:32:33 davison Trn $ +/* $Header: rt-select.c,v 4.3.3.3 91/01/16 03:28:50 davison Trn $ =** =** $Log: rt-select.c,v $ +** Revision 4.3.3.3 91/01/16 03:28:50 davison +** Changed %d --> %ld. +** Changed some expressions to registers to bypass a compiler problem. +** =** Revision 4.3.3.2 90/08/20 18:32:33 davison =** Reset scan_all_roots while selecting. @@ -280,7 +284,8 @@ = strcpy( promptbuf, "-- Select threads -- " ); = if( i != max_root ) { - sprintf( promptbuf+21, "%s%d%% [%c%c] --", + sprintf( promptbuf+21, "%s%ld%% [%c%c] --", = (!page_root? "Top " : nullstr), - running_total*100 / article_count, page_char, end_char ); + (long)(running_total*100 / article_count), + page_char, end_char ); = } else { = sprintf( promptbuf+21, "%s [%c%c] --", @@ -423,4 +428,7 @@ = } = do { + register int r; + register char maskr = mask; + r = root_hold[cur_root]; = if( can_home ) { = goto_line( screen_line, root_line[cur_root] ); @@ -429,5 +437,5 @@ = putchar( select_chars[cur_root] ); = if( action == '@' ) { - if( selected_roots[root_hold[cur_root]] & 4 ) { + if( selected_roots[r] & 4 ) { = ch = (unread_selector ? '+' : ' '); = } else if( unread_selector ) { @@ -434,5 +442,5 @@ = ch = 'k'; = } else - if( selected_roots[root_hold[cur_root]] & mask ) { + if( selected_roots[r] & maskr ) { = ch = '-'; = } else { @@ -444,9 +452,8 @@ = switch( ch ) { = case '+': - if( !(selected_roots[root_hold[cur_root]] & mask) ) { - selected_roots[root_hold[cur_root]] |= mask; + if( !(selected_roots[r] & maskr) ) { + selected_roots[r] |= maskr; = selected_root_cnt++; - selected_count - += root_article_cnts[root_hold[cur_root]]; + selected_count += root_article_cnts[r]; = putchar( '+' ); = } @@ -453,6 +460,6 @@ = /* FALL THROUGH */ = case 'm': - if( selected_roots[root_hold[cur_root]] & 4 ) { - selected_roots[root_hold[cur_root]] &= ~4; + if( selected_roots[r] & 4 ) { + selected_roots[r] &= ~4; = if( ch == 'm' ) { = putchar( ' ' ); @@ -463,6 +470,6 @@ = break; = case 'k': - if( !(selected_roots[root_hold[cur_root]] & 4) ) { - selected_roots[root_hold[cur_root]] |= 4; + if( !(selected_roots[r] & 4) ) { + selected_roots[r] |= 4; = putchar( '-' ); = } @@ -470,9 +477,8 @@ = case '-': = unsel: - if( selected_roots[root_hold[cur_root]] & mask ) { - selected_roots[root_hold[cur_root]] &= ~mask; + if( selected_roots[r] & maskr ) { + selected_roots[r] &= ~maskr; = selected_root_cnt--; - selected_count - -= root_article_cnts[root_hold[cur_root]]; + selected_count -= root_article_cnts[r]; = if( ch != 'k' ) { = putchar( ' ' ); @@ -662,7 +668,8 @@ = } else if( ch == '\r' || ch == '\n' ) { = if( !selected_root_cnt ) { - selected_roots[root_hold[cur_root]] = mask; + register r = root_hold[cur_root]; + selected_roots[r] = mask; = selected_root_cnt++; - selected_count += root_article_cnts[root_hold[cur_root]]; + selected_count += root_article_cnts[r]; = } = } @@ -880,5 +887,6 @@ = } = if( ++artp == root_limit ) { - int root_num = artp[-1].root; + register int root_num = artp[-1].root; + register char maskr = mask; = = root_article_cnts[root_num] = count; @@ -885,5 +893,5 @@ = if( count ) { = article_count += count; - if( selected_roots[root_num] & mask ) { + if( selected_roots[root_num] & maskr ) { = selected_roots[root_num] &= ~4; = selected_root_cnt++; @@ -892,6 +900,6 @@ = last_root = root_num; = } else if( do_unselect ) { - selected_roots[root_num] &= ~mask; - } else if( selected_roots[root_num] & mask ) { + selected_roots[root_num] &= ~maskr; + } else if( selected_roots[root_num] & maskr ) { = selected_roots[root_num] &= ~4; = selected_root_cnt++; Index: rthreads.c @@ -1,5 +1,8 @@ -/* $Header: rthreads.c,v 4.3.3.2 90/08/20 16:58:14 davison Trn $ +/* $Header: rthreads.c,v 4.3.3.3 91/01/16 03:28:53 davison Trn $ =** =** $Log: rthreads.c,v $ +** Revision 4.3.3.3 91/01/16 03:28:53 davison +** Changed Free to safefree. Tweaked fopen for possible binary open mode. +** =** Revision 4.3.3.2 90/08/20 16:58:14 davison =** Added message for missing/bad db.init file. @@ -24,5 +27,5 @@ =static int read_item(); =static void wp_bmap(), lp_bmap(); -static void Free(); +static void safefree(); = =/* Initialize our thread code by determining the byte-order of the thread @@ -38,5 +41,5 @@ = word_same = long_same = TRUE; = filename = filexp( "%X/db.init" ); - if( (fp_in = fopen( filename, "r" )) != Nullfp ) { + if( (fp_in = fopen( filename, FOPEN_RB )) != Nullfp ) { = if( fread( &mt_bmap, 1, sizeof (BMAP), fp_in ) >= sizeof (BMAP)-1 ) { = if( mt_bmap.version != DB_VERSION ) { @@ -77,5 +80,5 @@ = register char *ptr; = - if( (fp_in = fopen( threadname, "r" )) == Nullfp ) { + if( (fp_in = fopen( threadname, FOPEN_RB )) == Nullfp ) { = if (errno != ENOENT) { = printf( "\n\nOpen failed for thread data -- continuing unthreaded.\n" ); @@ -151,5 +154,5 @@ = } = count_roots( !saved_selections ); - Free( &saved_selections ); + safefree( &saved_selections ); = select_page = 0; = return 1; @@ -178,5 +181,5 @@ =*/ =static void -Free( pp ) +safefree( pp ) =char **pp; ={ @@ -213,14 +216,14 @@ = selected_root_cnt = selected_count = 0; = } - Free( &p_roots ); - Free( &root_subjects ); - Free( &author_cnts ); - Free( &subject_cnts ); - Free( &author_ptrs ); - Free( &subject_ptrs ); - Free( &root_article_cnts ); - Free( &selected_roots ); - Free( &p_articles ); - Free( &strings ); + safefree( &p_roots ); + safefree( &root_subjects ); + safefree( &author_cnts ); + safefree( &subject_cnts ); + safefree( &author_ptrs ); + safefree( &subject_ptrs ); + safefree( &root_article_cnts ); + safefree( &selected_roots ); + safefree( &p_articles ); + safefree( &strings ); = = p_art = curr_p_art = Nullart; Index: rthreads.h @@ -1,5 +1,8 @@ -/* $Header: rthreads.h,v 4.3.3.1 90/06/20 22:56:01 davison Trn $ +/* $Header: rthreads.h,v 4.3.3.2 91/01/16 03:28:54 davison Trn $ =** =** $Log: rthreads.h,v $ +** Revision 4.3.3.2 91/01/16 03:28:54 davison +** Added optional prototyping. +** =** Revision 4.3.3.1 90/06/20 22:56:01 davison =** Initial Trn Release @@ -36,14 +39,23 @@ =EXT BMAP my_bmap, mt_bmap; = -void thread_init(), mybytemap(); -char *thread_name(), *safemalloc(); -int use_data(); -void unuse_data(); -void find_article(), init_tree(), entire_tree(); -int tree_puts(), finish_tree(); -void first_art(), follow_thread(), next_root(), prev_root(); -char select_thread(); -int count_roots(), count_one_root(); -PACKED_ARTICLE *upper_limit(); +void thread_init ANSI((void)); +void mybytemap ANSI((BMAP *)); +char *thread_name ANSI((char *)); +char *safemalloc ANSI((MEM_SIZE)); +int use_data ANSI((char *)); +void unuse_data ANSI((bool)); +void find_article ANSI((ART_NUM)); +void init_tree ANSI((void)); +void entire_tree ANSI((void)); +int tree_puts ANSI((char *,ART_LINE,int)); +int finish_tree ANSI((ART_LINE)); +void first_art ANSI((void)); +void follow_thread ANSI((char)); +void next_root ANSI((void)); +void prev_root ANSI((void)); +char select_thread ANSI((char)); +int count_roots ANSI((bool)); +int count_one_root ANSI((int)); +PACKED_ARTICLE *upper_limit ANSI((PACKED_ARTICLE *,bool)); = =#define Nullart Null(PACKED_ARTICLE*) Index: search.h @@ -1,5 +1,8 @@ -/* $Header: search.h,v 4.3 85/05/01 11:50:46 lwall Exp $ +/* $Header: search.h,v 4.3.3.1 91/01/16 03:37:37 davison Trn $ = * = * $Log: search.h,v $ + * Revision 4.3.3.1 91/01/16 03:37:37 davison + * Added optional prototyping. + * = * Revision 4.3 85/05/01 11:50:46 lwall = * Baseline for release with 4.3bsd. @@ -24,14 +27,14 @@ =} COMPEX; = -void search_init(); -void init_compex(); -void free_compex(); -char *getbracket(); -void case_fold(); -char *compile(); -void grow_eb(); -char *execute(); -bool advance(); -bool backref(); -bool cclass(); +void search_init ANSI((void)); +void init_compex ANSI((COMPEX *)); +void free_compex ANSI((COMPEX *)); +char *getbracket ANSI((COMPEX *,int)); +void case_fold ANSI((int)); +char *compile ANSI((COMPEX *,char *,int,int)); +void grow_eb ANSI((COMPEX *)); +char *execute ANSI((COMPEX *,char *)); +bool advance ANSI((COMPEX *,char *,char *)); +bool backref ANSI((COMPEX *,int,char *)); +bool cclass ANSI((char *,int,int)); =#endif Index: sw.c @@ -1,7 +1,13 @@ -/* $Header: sw.c,v 4.3.3.1 90/06/20 22:40:11 davison Trn $ +/* $Header: sw.c,v 4.3.3.2 91/01/16 03:37:38 davison Trn $ = * = * $Log: sw.c,v $ + * Revision 4.3.3.2 91/01/16 03:37:38 davison + * Integrated rn patches 48-54. + * = * Revision 4.3.3.1 90/06/20 22:40:11 davison = * Initial Trn Release + * + * Revision 4.3.2.4 90/11/22 16:09:19 sob + * Added changes to accomodate pickly C preprocessors = * = * Revision 4.3.2.3 90/05/08 22:06:00 sob Index: sw.h @@ -1,5 +1,8 @@ -/* $Header: sw.h,v 4.3 85/05/01 11:51:07 lwall Exp $ +/* $Header: sw.h,v 4.3.3.1 91/01/16 03:37:39 davison Trn $ = * = * $Log: sw.h,v $ + * Revision 4.3.3.1 91/01/16 03:37:39 davison + * Added optional prototyping. + * = * Revision 4.3 85/05/01 11:51:07 lwall = * Baseline for release with 4.3bsd. @@ -11,8 +14,8 @@ =#endif = -void sw_init(); -void sw_file(); -void sw_list(); -void decode_switch(); -void pr_switches(); -void cwd_check(); +void sw_init ANSI((int,char **,char **)); +void sw_file ANSI((char **,bool)); +void sw_list ANSI((char *)); +void decode_switch ANSI((char *)); +void pr_switches ANSI((void)); +void cwd_check ANSI((void)); Index: term.c @@ -1,8 +1,29 @@ -/* $Header: term.c,v 4.3.3.1 90/07/28 18:09:09 davison Trn $ +/* $Header: term.c,v 4.3.3.2 91/01/16 03:38:36 davison Trn $ = * = * $Log: term.c,v $ + * Revision 4.3.3.2 91/01/16 03:38:36 davison + * Integrated rn patches 48-54. Revised 8-bit character support. + * = * Revision 4.3.3.1 90/07/28 18:09:09 davison = * Initial Trn Release = * + * Revision 4.3.2.13 90/12/12 03:03:28 sob + * Lost a closing paren in circfill() + * + * Revision 4.3.2.12 90/12/10 01:33:54 sob + * First attempts to make rn "8 bit clean" + * + * Revision 4.3.2.11 90/11/22 13:34:06 sob + * Added a change to circfill to make it work with POSIX-compliant OSes. + * + * Revision 4.3.2.10 90/11/05 23:41:29 sob + * Now it's gone. + * + * Revision 4.3.2.9 90/11/05 23:30:07 sob + * moved the winsize struct in anticipation of removing it. + * + * Revision 4.3.2.8 90/10/01 01:43:59 sob + * Fixed syntax error pointed out by stealth@m-net.ann-arbor.mi.us. + * = * Revision 4.3.2.7 90/04/21 16:54:29 sob = * Installed patches provided by SCO for SCO Xenix @@ -52,9 +73,4 @@ =#include "term.h" = -#ifdef SYS_PTEM -#include -#include -#endif - =char ERASECH; /* rubout character */ =char KILLCH; /* line delete character */ @@ -159,12 +175,4 @@ = int status; =#ifdef TIOCGWINSZ -#ifdef u3b2 -struct winsize { - unsigned short ws_row; /* rows, in characters*/ - unsigned short ws_col; /* columns, in character */ - unsigned short ws_xpixel; /* horizontal size, pixels */ - unsigned short ws_ypixel; /* vertical size, pixels */ -}; -#endif = struct winsize winsize; =#endif @@ -222,4 +230,5 @@ = if (!*CE || !*CD || !can_home) /* can we CE, CD, and home? */ = can_home_clear = FALSE; /* no, so disable use of clear eol */ + if (!*CE) CE = CD; =#endif /* CLEAREOL */ =#ifdef USETHREADS @@ -463,5 +472,5 @@ = do { = top: - if ((unsigned char)*s < ' ') { + if (*(unsigned char *)s < ' ') { = putchar('^'); = putchar(*s | 64); @@ -525,5 +534,5 @@ = rubout(); = s--; /* discount the char rubbed out */ - if ((unsigned char)*s < ' ' || *s == '\177') + if (*(unsigned char *)s < ' ' || *s == '\177') = rubout(); = if (s == buf) { /* entire string gone? */ @@ -537,5 +546,5 @@ = while (s-- != buf) { /* emulate that many ERASEs */ = rubout(); - if ((unsigned char)*s < ' ' || *s == '\177') + if (*(unsigned char *)s < ' ' || *s == '\177') = rubout(); = } @@ -552,5 +561,5 @@ = return FALSE; /* return to single char mode */ = } - if ((unsigned char)*s < ' ' || *s == '\177') + if (*(unsigned char *)s < ' ' || *s == '\177') = rubout(); = } @@ -640,6 +649,11 @@ =circfill() ={ - register int Howmany = read(devtty,circlebuf+nextin,1); + register int Howmany; = + errno = 0; + Howmany = read(devtty,circlebuf+nextin,1); + + if (Howmany < 0 && (errno == EAGAIN || errno == EINTR)) + Howmany = 0; = if (Howmany) { = nextin += Howmany; @@ -699,5 +713,5 @@ = if (*UC) { /* char by char underline? */ = while (*s) { - if ((unsigned char)*s < ' ') { + if (*(unsigned char *)s < ' ') { = putchar('^'); = backspace();/* back up over it */ @@ -718,5 +732,5 @@ = underline(); /* start underlining */ = while (*s) { - if ((unsigned char)*s < ' ') { + if (*(unsigned char *)s < ' ') { = putchar('^'); = putchar(*s+64); @@ -776,8 +790,9 @@ = int_count = 0; = errno = 0; - if (read_tty(whatbuf,1) < 0) + if (read_tty(whatbuf,1) < 0){ = if (!errno) = errno = EINTR; - else { + if (errno == EINTR) + return; = perror(readerr); = sig_catcher(0); @@ -1002,5 +1017,5 @@ = if (!*s) = break; - if ((unsigned char)*s >= ' ') + if (*(unsigned char *)s >= ' ') = putchar(*s); = else if (*s == '\t') { @@ -1060,5 +1075,5 @@ ={ = if (verify && buf[1] == FINISHCMD) { - if ((unsigned char)*buf < ' ') { + if (*(unsigned char *)buf < ' ') { = putchar('^'); = putchar(*buf | 64); @@ -1090,5 +1105,5 @@ = fputs("^R\n",stdout) FLUSH; = for (s = buf; *s; s++) { - if ((unsigned char)*s < ' ') { + if (*(unsigned char *)s < ' ') { = putchar('^'); = putchar(*s | 64); Index: term.h @@ -1,8 +1,23 @@ -/* $Header: term.h,v 4.3.3.1 90/06/20 22:40:34 davison Trn $ +/* $Header: term.h,v 4.3.3.2 91/01/16 03:38:39 davison Trn $ = * = * $Log: term.h,v $ + * Revision 4.3.3.2 91/01/16 03:38:39 davison + * Integrated rn patches 48-54. Added optional prototyping. + * = * Revision 4.3.3.1 90/06/20 22:40:34 davison = * Initial Trn Release = * + * Revision 4.3.2.6 90/12/10 01:32:08 sob + * Hopefully, the rn -e -L problem is now fixed. + * + * Revision 4.3.2.5 90/11/22 13:48:09 sob + * Backed out change in Patch 48. + * + * Revision 4.3.2.4 90/11/05 23:54:49 sob + * changed maybe_eol to test when erase_screen is FALSE intstead of TRUE. + * + * Revision 4.3.2.3 90/10/01 01:49:39 sob + * Changed ospeed from short to long. + * = * Revision 4.3.2.2 90/04/06 20:35:34 sob = * Added fixes for SCO Xenix sent by ronald@robobar.co.uk. @@ -161,8 +176,10 @@ =EXT char *CL INIT(Nullch); /* home and clear screen */ =EXT char *CE INIT(Nullch); /* clear to end of line */ +#if defined(CLEAREOL) || defined(USETHREADS) +EXT char *CM INIT(Nullch); /* cursor motion */ +EXT char *HO INIT(Nullch); /* home cursor */ +#endif =#ifdef CLEAREOL -EXT char *CM INIT(Nullch); /* cursor motion -- PWP */ -EXT char *HO INIT(Nullch); /* home cursor -- PWP */ -EXT char *CD INIT(Nullch); /* clear to end of display -- PWP */ +EXT char *CD INIT(Nullch); /* clear to end of display */ =#endif /* CLEAREOL */ =EXT char *SO INIT(Nullch); /* begin standout mode */ @@ -176,5 +193,5 @@ =EXT bool XN INIT(FALSE); /* does it eat 1st newline after automatic wrap? */ =EXT char PC INIT(0); /* pad character for use by tputs() */ -EXT short ospeed INIT(0); /* terminal output speed, for use by tputs() */ +EXT long ospeed INIT(0); /* terminal output speed, for use by tputs() */ =EXT int LINES INIT(0), COLS INIT(0); /* size of screen */ =EXT int just_a_sec INIT(960); /* 1 sec at current baud rate */ @@ -187,5 +204,5 @@ =#define erase_eol() tputs(CE,1,putchr) FLUSH =#ifdef CLEAREOL -#define clear_rest() tputs(CD,LINES,putchr) FLUSH /* PWP */ +#define clear_rest() tputs(CD,LINES,putchr) FLUSH =#define maybe_eol() if(erase_screen&&can_home_clear)tputs(CE,1,putchr) FLUSH =#endif /* CLEAREOL */ @@ -204,40 +221,40 @@ =EXT int page_line INIT(1); /* line number for paging in print_line (origin 1) */ = -void term_init(); -void term_set(); +void term_init ANSI((void)); +void term_set ANSI((char *)); =#ifdef PUSHBACK -void pushchar(); -void mac_init(); -void mac_line(); -void show_macros(); +void pushchar ANSI((char)); +void mac_init ANSI((char *)); +void mac_line ANSI((char *,char *,int)); +void show_macros ANSI((void)); =#endif -char putchr(); /* routine for tputs to call */ -bool finish_command(); -void eat_typeahead(); -void settle_down(); +char putchr ANSI((char)); /* routine for tputs to call */ +bool finish_command ANSI((int)); +void eat_typeahead ANSI((void)); +void settle_down ANSI((void)); =#ifndef read_tty - int read_tty(); + int read_tty ANSI((char *,int)); =#endif -void underprint(); +void underprint ANSI((char *)); =#ifdef NOFIREWORKS - void no_sofire(); - void no_ulfire(); + void no_sofire ANSI((void)); + void no_ulfire ANSI((void)); =#endif -void getcmd(); -int get_anything(); -void in_char(); -int print_lines(); -void page_init(); -void pad(); -void printcmd(); -void rubout(); -void reprint(); +void getcmd ANSI((char *)); +int get_anything ANSI((void)); +void in_char ANSI((char *,char)); +int print_lines ANSI((char *,int)); +void page_init ANSI((void)); +void pad ANSI((int)); +void printcmd ANSI((void)); +void rubout ANSI((void)); +void reprint ANSI((void)); =#if defined(CLEAREOL) || defined(USETHREADS) -void home_cursor(); +void home_cursor ANSI((void)); =#endif =#ifdef USETHREADS -void goto_line(); +void goto_line ANSI((int,int)); =#endif =#ifdef SIGWINCH -int winch_catcher(); +int winch_catcher ANSI((void)); =#endif /* SIGWINCH */ Index: trn.1 @@ -1,5 +1,8 @@ -''' $Header: trn.1,v 4.3.3.2 90/08/20 16:50:51 davison Trn $ +''' $Header: trn.1,v 4.3.3.3 91/01/16 03:38:44 davison Trn $ =''' =''' $Log: trn.1,v $ +''' Revision 4.3.3.3 91/01/16 03:38:44 davison +''' Integrated rn patches 48-54. +''' =''' Revision 4.3.3.2 90/08/20 16:50:51 davison =''' Changed email address. @@ -8,4 +11,14 @@ =''' Initial Trn Release =''' +''' Revision 4.3.2.2 90/12/12 03:48:54 sob +''' Added documentation for the new "N" command at startup newsgroup +''' selection. +''' +''' Revision 4.3.2.1 90/11/26 02:12:34 sob +''' Added information about environmental variables NEWSRC and NNTPSERVER. +''' +''' Revision 4.3.1.10 90/11/06 01:17:29 sob +''' Added text about new Y response when adding newsgroups. +''' =''' Revision 4.3.1.9 90/05/08 22:05:11 sob =''' Added documentation for new -q flag @@ -348,5 +361,9 @@ =not, will not be listed. =If any new newsgroups are found, you will be asked for each one whether -you would like to add it. +you would like to add it. If you want to add all new newsgroups, you can +type \*(L'Y\*(R' and they will be added the the end of the +.I .newsrc +file and as groups you want to read. If you don't want to subscribe, all +the new groups can be added by typing \*(L'N\*(R'. =After any new newsgroups have been added, the \*(L'a\*(R' command also =restricts the current set of newsgroups just like the \*(L'o\*(R' command @@ -1895,4 +1912,14 @@ =.Sp =Default: Pnews \-h %h +.Ip NEWSRC 8 +Your newsgroup subscription list. +.Sp +Default: $HOME/.newsrc +.Ip NNTPSERVER 8 +The hostname of your NNTPSERVER. [This does not apply unless you are running +the NNTP version of rn.] +.Sp +Default: the hostname listed in the server file, usually +/usr/local/lib/rn/server. =.Ip NOPOSTRING 8 =The string to insert in the group summary line, which heads each article, Index: util.c @@ -1,5 +1,8 @@ -/* $Header: util.c,v 4.3.3.2 90/08/20 16:51:44 davison Trn $ +/* $Header: util.c,v 4.3.3.3 91/01/16 03:41:50 davison Trn $ = * = * $Log: util.c,v $ + * Revision 4.3.3.3 91/01/16 03:41:50 davison + * Integrated rn patches 48-54. + * = * Revision 4.3.3.2 90/08/20 16:51:44 davison = * Fixed getcwd call to not overflow any buffers. @@ -8,4 +11,11 @@ = * Initial Trn Release = * + * Revision 4.3.2.8 90/11/22 13:54:06 sob + * Made changes to keep more preprocessors happy. + * + * Revision 4.3.2.7 90/10/01 01:52:18 sob + * Altered the preprocessor defines on GETWD/GETCWD per suggestion by + * rsm@math.arizona.edu. + * = * Revision 4.3.2.6 90/04/23 00:24:42 sob = * A bit of clean up. @@ -57,5 +67,4 @@ ={ = int status, pid, w; - SIGRET (*signal())(); = char *shell; = @@ -86,5 +95,7 @@ = } = signal(SIGINT, SIG_IGN); +#ifdef SIGQUIT = signal(SIGQUIT, SIG_IGN); +#endif = waiting = TRUE; = while ((w = wait(&status)) != pid && w != -1) @@ -94,5 +105,7 @@ = waiting = FALSE; = sigset(SIGINT, int_catcher); /* always catch interrupts */ +#ifdef SIGQUIT = signal(SIGQUIT, SIG_DFL); +#endif =#ifdef SIGTSTP = sigset(SIGTSTP,stop_catcher); @@ -258,4 +271,5 @@ = * Get working directory = */ +#ifndef GETWD =#ifdef GETCWD =char * @@ -269,5 +283,4 @@ =} =#else -#ifndef GETWD =char * =getwd(np) /* shorter but slower */ Index: util.h @@ -1,5 +1,8 @@ -/* $Header: util.h,v 4.3 85/05/01 11:51:58 lwall Exp $ +/* $Header: util.h,v 4.3.3.1 91/01/16 03:41:51 davison Trn $ = * = * $Log: util.h,v $ + * Revision 4.3.3.1 91/01/16 03:41:51 davison + * Added optional prototyping. + * = * Revision 4.3 85/05/01 11:51:58 lwall = * Baseline for release with 4.3bsd. @@ -17,25 +20,23 @@ =#define MD_FILE 1 = -void util_init(); -int doshell(); -char *safemalloc(); -char *saferealloc(); -char *safecpy(); -char *safecat(); -char *cpytill(); -char *instr(); +void util_init ANSI((void)); +int doshell ANSI((char *,char *)); +char *safemalloc ANSI((MEM_SIZE)); +char *saferealloc ANSI((char *,MEM_SIZE)); +char *safecpy ANSI((char *,char *,int)); +char *safecat ANSI((char *,char *,int)); +char *cpytill ANSI((char *,char *,int)); +char *instr ANSI((char *,char *)); =#ifdef SETUIDGID - int eaccess(); + int eaccess ANSI((char *,int)); =#endif -char *getwd(); -void cat(); -void prexit(); -char *get_a_line(); -char *savestr(); -int makedir(); -void setenv(); -int envix(); -void notincl(); -char *getval(); -void growstr(); -void setdef(); +char *getwd ANSI((char *)); +char *get_a_line ANSI((char *,int,FILE *)); +char *savestr ANSI((char *)); +int makedir ANSI((char *,int)); +void setenv ANSI((char *,char *)); +int envix ANSI((char *)); +void notincl ANSI((char *)); +char *getval ANSI((char *,char *)); +void growstr ANSI((char **,int *,int)); +void setdef ANSI((char *,char *)); Index: uudecode.c @@ -1,5 +1,8 @@ -/* $Header: uudecode.c,v 4.3.3.1 90/06/20 22:48:21 davison Trn $ +/* $Header: uudecode.c,v 4.3.3.2 91/01/16 03:41:52 davison Trn $ =** =** $Log: uudecode.c,v $ +** Revision 4.3.3.2 91/01/16 03:41:52 davison +** Tweaked fopen for possible binary open mode. +** =** Revision 4.3.3.1 90/06/20 22:48:21 davison =** Initial Trn Release @@ -126,5 +129,5 @@ = strcpy(dest, uu_fname); = - if ((uu_out = fopen(dest, "w")) == Nullfp) { + if ((uu_out = fopen(dest, FOPEN_WB)) == Nullfp) { = printf("Cannot create file: %s\n", dest); = goto err; Index: uudecode.h @@ -1,5 +1,8 @@ -/* $Header: uudecode.h,v 4.3.3.1 90/06/20 22:49:08 davison Trn $ +/* $Header: uudecode.h,v 4.3.3.2 91/01/16 03:41:53 davison Trn $ =** =** $Log: uudecode.h,v $ +** Revision 4.3.3.2 91/01/16 03:41:53 davison +** Added optional prototyping. +** =** Revision 4.3.3.1 90/06/20 22:49:08 davison =** Initial Trn Release @@ -9,2 +12,6 @@ =EXT FILE *uu_out INIT(NULL); =EXT char uu_fname[MAXFILENAME]; + +int uud_start ANSI((char *)); +int uud_send ANSI((void)); +int uudecode ANSI((FILE *)); SHAR_EOF fi exit 0 # End of shell archive ----8<------8<------8<------8<-----the end------>8------>8------>8------>8----