chuck@trantor.harris-atd.com (Chuck Musciano) (11/24/88)
Here is a patch to fix a little contool bug. It seems that if you get a message, and then do a "Clear Messages", and another message arrives before it is time for another time stamp, the next message will not be stamped. This patch fixes the problem, bringing contool up to version 2.0c. Chuck Musciano Advanced Technology Department Harris Corporation (407) 727-6131 ARPA: chuck@trantor.harris-atd.com [[ I also have the patch to take 2.0a to 2.0b, but I have lost the text of the message announcing it. I will include both patches in the shar file. I have patched up the contool source in the archives, so retrieving "contool.shar" will now get you version 2.0c. --wnl ]] #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: patchb patchc # Wrapped by chuck@melmac on Fri Nov 11 08:07:03 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'patchb' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'patchb'\" else echo shar: Extracting \"'patchb'\" \(2542 characters\) sed "s/^X//" >'patchb' <<'END_OF_FILE' X*** contool.c.orig Thu Oct 20 09:30:11 1988 X--- contool.c Thu Oct 20 09:38:54 1988 X*************** X*** 61,67 **** X X /*************** End of site dependencies ******************************/ X X! #define TOOL_LABEL "<< Console Tool 2.0a >>" X X #define MAX_FILTERS 64 X X--- 61,67 ---- X X /*************** End of site dependencies ******************************/ X X! #define TOOL_LABEL "<< Console Tool 2.0b >>" X X #define MAX_FILTERS 64 X X*************** X*** 174,179 **** X--- 174,191 ---- X /************************************************************************/ X X /************************************************************************/ X+ static internal_message(a, b, c, d, e, f) X+ X+ int a, b, c, d, e, f; X+ X+ { char buf[512]; X+ X+ sprintf(buf, a, b, c, d, e, f); X+ time_stamp(); X+ do_insertion(buf, strlen(buf)); X+ } X+ X+ /************************************************************************/ X static internal_error(a, b, c, d, e, f) X X int a, b, c, d, e, f; X*************** X*** 183,189 **** X sprintf(buf, a, b, c, d, e, f); X time_stamp(); X fprintf(stderr, buf); X- do_insertion(buf, strlen(buf)); X } X X /************************************************************************/ X--- 195,200 ---- X*************** X*** 206,212 **** X X { char *msg; X X- internal_error("*** %s: ", program); X switch (val) { X case 11 : msg = "range endpoint too large"; X case 16 : msg = "bad number"; X--- 217,222 ---- X*************** X*** 222,228 **** X case 50 : msg = "regular expression overflow"; X default : msg = "regular expression compilation error"; X } X! internal_error("%s in %s\n", msg, string); X } X X /************************************************************************/ X--- 232,238 ---- X case 50 : msg = "regular expression overflow"; X default : msg = "regular expression compilation error"; X } X! internal_error("*** %s: %s in '%s'\n", program, msg, string); X } X X /************************************************************************/ X*************** X*** 288,294 **** X internal_error("*** %s: invalid contool filter:\n\t%s\n", program, buf); X } X fclose(f); X! internal_error("*** filters loaded from %s\n", filter_path); X load_time = sb.st_mtime; X } X else X--- 298,304 ---- X internal_error("*** %s: invalid contool filter:\n\t%s\n", program, buf); X } X fclose(f); X! internal_message("*** filters loaded from %s\n", filter_path); X load_time = sb.st_mtime; X } X else END_OF_FILE if test 2542 -ne `wc -c <'patchb'`; then echo shar: \"'patchb'\" unpacked with wrong size! fi # end of 'patchb' fi if test -f 'patchc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'patchc'\" else echo shar: Extracting \"'patchc'\" \(1242 characters\) sed "s/^X//" >'patchc' <<'END_OF_FILE' X*** contool.c.orig Fri Nov 11 08:00:33 1988 X--- contool.c Fri Nov 11 08:01:57 1988 X*************** X*** 61,67 **** X X /*************** End of site dependencies ******************************/ X X! #define TOOL_LABEL "<< Console Tool 2.0b >>" X X #define MAX_FILTERS 64 X X--- 61,67 ---- X X /*************** End of site dependencies ******************************/ X X! #define TOOL_LABEL "<< Console Tool 2.0c >>" X X #define MAX_FILTERS 64 X X*************** X*** 131,136 **** X--- 131,137 ---- X static int icon_height; X static int icon_width; X static FILE *master = NULL; X+ static int old_time = 0; X static char *program; X static FILE *slave = NULL; X X*************** X*** 157,162 **** X--- 158,164 ---- X X { X textsw_reset(text, 0, 0); X+ old_time = 0; X } X X /************************************************************************/ X*************** X*** 416,423 **** X /************************************************************************/ X static time_stamp() X X! { static int old_time = 0; X! int t, pos; X char buf[5]; X X t = time(0); X--- 418,424 ---- X /************************************************************************/ X static time_stamp() X X! { int t, pos; X char buf[5]; X X t = time(0); END_OF_FILE if test 1242 -ne `wc -c <'patchc'`; then echo shar: \"'patchc'\" unpacked with wrong size! fi # end of 'patchc' fi echo shar: End of shell archive. exit 0