home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume14 / contool / patch1 / patch
Encoding:
Text File  |  1991-08-26  |  8.5 KB  |  280 lines

  1. *** Imakefile.orig    Wed Jul 24 09:15:40 1991
  2. --- Imakefile    Fri May 31 08:03:38 1991
  3. ***************
  4. *** 8,15 ****
  5.   
  6.   LDOPTIONS    = -L$(OPENWINHOME)/lib
  7.   
  8. ! CFLAGS        = -O -I$(OPENWINHOME)/include -DMAILER=\"$(MAILER)\"
  9.   
  10.   SRCS        = about.c busy.c contool.c contool_ui.c error.c expand.c filename_completion.c \
  11.             filters.c getopt.c load.c load_icon.c logging.c misc.c parse.y \
  12.             pinned_menu_notify.c place_dialog.c props.c regexp.c send_mail.c store.c
  13. --- 8,19 ----
  14.   
  15.   LDOPTIONS    = -L$(OPENWINHOME)/lib
  16.   
  17. ! CPPFLAGS    = -I$(OPENWINHOME)/include
  18.   
  19. + CFLAGS        = -O -DMAILER=\"$(MAILER)\"
  20. + EXTRA_INCLUDES    = -I$(OPENWINHOME)/include
  21.   SRCS        = about.c busy.c contool.c contool_ui.c error.c expand.c filename_completion.c \
  22.             filters.c getopt.c load.c load_icon.c logging.c misc.c parse.y \
  23.             pinned_menu_notify.c place_dialog.c props.c regexp.c send_mail.c store.c
  24. ***************
  25. *** 20,24 ****
  26.   
  27.   ComplexProgramTarget(contool)
  28.   
  29. ! install:: install.man
  30.       $(INSTALL) -c $(INSTMANFLAGS) contool.info $(HELPDIR)/contool.info
  31. --- 24,30 ----
  32.   
  33.   ComplexProgramTarget(contool)
  34.   
  35. ! install: install.man install.help
  36. ! install.help:
  37.       $(INSTALL) -c $(INSTMANFLAGS) contool.info $(HELPDIR)/contool.info
  38. *** README.orig    Wed Jul 24 09:15:40 1991
  39. --- README    Wed Jul 24 09:15:33 1991
  40. ***************
  41. *** 16,22 ****
  42.   /*    of Harris Corporation.                        */
  43.   /************************************************************************/
  44.   
  45. !      Contool Version 3.1
  46.        
  47.        Contool will capture and display system console messages with timestamps.
  48.   It is a replacement for the standard Sun console, which is created with 
  49. --- 16,22 ----
  50.   /*    of Harris Corporation.                        */
  51.   /************************************************************************/
  52.   
  53. !      Contool Version 3.1a
  54.        
  55.        Contool will capture and display system console messages with timestamps.
  56.   It is a replacement for the standard Sun console, which is created with 
  57. ***************
  58. *** 198,205 ****
  59.                   Contool now sets its class and name hints.
  60.                   Sending SIGUSR1 (30) to contool stops blinking,
  61.                      suggested by Frank Peters.
  62. !                 Sending SIGHUP (1) closes and reopens the log file.
  63.                   Added "Apply and Save" button to filter dialog.
  64.                   Added individual message logging.
  65.                   Finally fixed overflow handling.
  66.                   Added multi-line filter timeout.
  67. --- 198,213 ----
  68.                   Contool now sets its class and name hints.
  69.                   Sending SIGUSR1 (30) to contool stops blinking,
  70.                      suggested by Frank Peters.
  71. !                 Sending SIGHUP (1) closes and reopens the log
  72. !                    file.
  73.                   Added "Apply and Save" button to filter dialog.
  74.                   Added individual message logging.
  75.                   Finally fixed overflow handling.
  76.                   Added multi-line filter timeout.
  77. +     3.1a    24 Jul 91    Added support for WIN_CMDLINE attribute,
  78. +                    from Tomas Stephanson
  79. +                    (Tomas.Stephanson@eua.ericsson.se)
  80. +                 Fixed handling of messages without trailing
  81. +                    newlines, suggested by Ellery Chan
  82. +                    (ellery@trantor.harris-atd.com)
  83. +                 Fixed typos in the man page
  84. *** contool.man.orig    Wed Jul 24 09:15:41 1991
  85. --- contool.man    Fri Jun 28 11:21:47 1991
  86. ***************
  87. *** 1,8 ****
  88. ! .TH CONTOOL 1 "13 October 1989"
  89.   .SH NAME
  90.   contool \- capture and display console output
  91.   .SH SYNOPSIS
  92. ! contool [\fB\(hyf\fP \fIfile\fP] [\fB\(hyl\fP] [\f3\(hyL\fP \f2logfile\fP] [\f3\(hyn\fP]
  93.   .SH DESCRIPTION
  94.   .LP
  95.   \f2Contool\fP captures and displays any messages sent to the system console.
  96. --- 1,8 ----
  97. ! .TH CONTOOL 1 "28 June 1991"
  98.   .SH NAME
  99.   contool \- capture and display console output
  100.   .SH SYNOPSIS
  101. ! contool [\fB\(hyc\fP \fIfile\fP] [\fB\(hyl\fP] [\f3\(hyL\fP \f2logfile\fP] [\f3\(hyn\fP]
  102.   .SH DESCRIPTION
  103.   .LP
  104.   \f2Contool\fP captures and displays any messages sent to the system console.
  105. *** contool.c.orig    Wed Jul 24 09:15:44 1991
  106. --- contool.c    Mon Jul 22 15:33:22 1991
  107. ***************
  108. *** 499,511 ****
  109.       Filter    *f;
  110.       int    count, do_blink = FALSE, do_open = FALSE;
  111.       static    char    in_buf[INPUT_BUFFER_SIZE + 2];
  112.   
  113. !     while ((count = read(fileno(master), in_buf, INPUT_BUFFER_SIZE)) >= 0) {
  114. !        in_buf[count] = '\0';
  115. !        while (s = index(in_buf, '\015')) {
  116.             strcpy(s, s + 1);
  117. -           count--;
  118. -           }
  119.          for (t = in_buf; *t; *s = old_c, t = s) {
  120.             if (s = index(t, '\n')) {
  121.                old_c = *++s;
  122. --- 499,511 ----
  123.       Filter    *f;
  124.       int    count, do_blink = FALSE, do_open = FALSE;
  125.       static    char    in_buf[INPUT_BUFFER_SIZE + 2];
  126. +     static    int    leftover = 0;
  127.   
  128. !     while ((count = read(fileno(master), in_buf + leftover, INPUT_BUFFER_SIZE - leftover)) >= 0) {
  129. !        in_buf[count + leftover] = '\0';
  130. !        leftover = 0;
  131. !        while (s = index(in_buf, '\015'))
  132.             strcpy(s, s + 1);
  133.          for (t = in_buf; *t; *s = old_c, t = s) {
  134.             if (s = index(t, '\n')) {
  135.                old_c = *++s;
  136. ***************
  137. *** 512,519 ****
  138.                *s = '\0';
  139.                }
  140.             else {
  141. !              s = t + strlen(t);
  142. !              old_c = '\0';
  143.                }
  144.             if (!defaults.log_after)
  145.                write_log(t);
  146. --- 512,520 ----
  147.                *s = '\0';
  148.                }
  149.             else {
  150. !              leftover = strlen(t);
  151. !              strcpy(in_buf, t);
  152. !              break;
  153.                }
  154.             if (!defaults.log_after)
  155.                write_log(t);
  156. ***************
  157. *** 608,627 ****
  158. --- 609,637 ----
  159.   
  160.   {    char    *s, c, path[1024], *log_file = NULL;
  161.       int    log = FALSE;
  162. +     static    char    cmdline[MAXPATHLEN + 10];
  163.   
  164.       sprintf(path, "%s/.contool", getenv("HOME"));
  165.       filter_file = strsave(path);
  166.   
  167. +     cmdline[0] = NULL;
  168.       while ((c = getopt(argc, argv, "c:lL:n?", &s)) != EOF)
  169.          switch (c) {
  170.             case 'c' : filter_file = expand_tilde(s);
  171.                      explicit_filters = TRUE;
  172. +                  strcat(cmdline, " -c ");
  173. +              strcat(cmdline, filter_file);
  174.                      break;
  175.             case 'l' : log = TRUE;
  176. +                  strcat(cmdline, " -l");
  177.                      break;
  178.             case 'L' : log_file = expand_tilde(s);
  179. +                  strcat(cmdline, " -L ");
  180. +              strcat(cmdline, log_file);
  181.                      break;
  182.             case 'n' : no_console = TRUE;
  183. +                  strcat(cmdline, " -n");
  184.                      break;
  185.             case '?' : fprintf(stderr, ct_usage);
  186.                      exit(0);
  187. ***************
  188. *** 629,634 ****
  189. --- 639,647 ----
  190.             default  : fprintf(stderr, ct_usage);
  191.                        exit(1);
  192.             }
  193. +     if (strlen(cmdline) > 0)
  194. +         xv_set(contool_base->base, WIN_CMD_LINE, cmdline, NULL);
  195.   
  196.       if (lex_init(filter_file)) {
  197.          yyparse();
  198. *** contool_ui.c.orig    Wed Jul 24 09:15:46 1991
  199. --- contool_ui.c    Wed Jul 24 09:13:28 1991
  200. ***************
  201. *** 349,355 ****
  202.           XV_KEY_DATA, INSTANCE, ip,
  203.           XV_WIDTH, 575,
  204.           XV_HEIGHT, 246,
  205. !         XV_LABEL, "Contool 3.1",
  206.           FRAME_CLOSED, FALSE,
  207.           FRAME_SHOW_FOOTER, TRUE,
  208.           FRAME_SHOW_RESIZE_CORNER, TRUE,
  209. --- 349,355 ----
  210.           XV_KEY_DATA, INSTANCE, ip,
  211.           XV_WIDTH, 575,
  212.           XV_HEIGHT, 246,
  213. !         XV_LABEL, "Contool 3.1a",
  214.           FRAME_CLOSED, FALSE,
  215.           FRAME_SHOW_FOOTER, TRUE,
  216.           FRAME_SHOW_RESIZE_CORNER, TRUE,
  217. ***************
  218. *** 2133,2143 ****
  219.       obj = xv_create(owner, PANEL_MESSAGE,
  220.           XV_KEY_DATA, INSTANCE, ip,
  221.           XV_HELP_DATA, "contool:message1",
  222. !         XV_X, 217,
  223.           XV_Y, 14,
  224.           XV_WIDTH, 75,
  225.           XV_HEIGHT, 13,
  226. !         PANEL_LABEL_STRING, "Contool 3.1",
  227.           PANEL_LABEL_BOLD, TRUE,
  228.           NULL);
  229.       return obj;
  230. --- 2133,2143 ----
  231.       obj = xv_create(owner, PANEL_MESSAGE,
  232.           XV_KEY_DATA, INSTANCE, ip,
  233.           XV_HELP_DATA, "contool:message1",
  234. !         XV_X, 212,
  235.           XV_Y, 14,
  236.           XV_WIDTH, 75,
  237.           XV_HEIGHT, 13,
  238. !         PANEL_LABEL_STRING, "Contool 3.1a",
  239.           PANEL_LABEL_BOLD, TRUE,
  240.           NULL);
  241.       return obj;
  242. *** filename_completion.c.orig    Wed Jul 24 09:15:50 1991
  243. --- filename_completion.c    Wed Jul 17 15:42:21 1991
  244. ***************
  245. *** 41,47 ****
  246.   
  247.       switch (event_action(event)) {
  248.          case '\n' :
  249. !        case '\r' :
  250.          case ' '  : if ((p = expand_filename((char *) xv_get(item, PANEL_VALUE))) == NULL)
  251.                    window_bell(xv_get(item, XV_OWNER));
  252.                     else
  253. --- 41,47 ----
  254.   
  255.       switch (event_action(event)) {
  256.          case '\n' :
  257. !        case '\r' : 
  258.          case ' '  : if ((p = expand_filename((char *) xv_get(item, PANEL_VALUE))) == NULL)
  259.                    window_bell(xv_get(item, XV_OWNER));
  260.                     else
  261. *** patchlevel.h.orig    Wed Jul 24 09:15:56 1991
  262. --- patchlevel.h    Mon Jul 22 15:35:48 1991
  263. ***************
  264. *** 33,37 ****
  265. --- 33,41 ----
  266.   /*               comp.sources.x: Volume 11, Issue 4        */
  267.   /*                                    */
  268.   /*      4        Release of version 3.1; see README for details    */
  269. + /*               comp.sources.x: Volume 13, Issues 54 & 55    */
  270. + /*                                    */
  271. + /*      5        Bug fixes; see README for details        */
  272. + /*               comp.sources.x: Volume ??, Issue ??        */
  273.   /*                                    */
  274.   /************************************************************************/
  275.