home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume16 / contol3a / part06 < prev    next >
Encoding:
Text File  |  1992-03-04  |  45.2 KB  |  1,215 lines

  1. Newsgroups: comp.sources.x
  2. Path: uunet!think.com!mips!msi!dcmartin
  3. From: Chuck Musciano <chuck@trantor.harris-atd.com>
  4. Subject: v16i105: contool 3.2A (Final Release), Part06/07
  5. Message-ID: <1992Mar5.214840.9715@msi.com>
  6. Originator: dcmartin@fascet
  7. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  8. Organization: Molecular Simulations, Inc.
  9. References: <csx-16i100-contool-3.2a@uunet.UU.NET>
  10. Date: Thu, 5 Mar 1992 21:48:40 GMT
  11. Approved: dcmartin@msi.com
  12.  
  13. Submitted-by: Chuck Musciano <chuck@trantor.harris-atd.com>
  14. Posting-number: Volume 16, Issue 105
  15. Archive-name: contool-3.2a/part06
  16.  
  17. # this is Part.06 (part 6 of a multipart archive)
  18. # do not concatenate these parts, unpack them in order with /bin/sh
  19. # file contool_ui.h continued
  20. #
  21. if test ! -r _shar_seq_.tmp; then
  22.     echo 'Please unpack part 1 first!'
  23.     exit 1
  24. fi
  25. (read Scheck
  26.  if test "$Scheck" != 6; then
  27.     echo Please unpack part "$Scheck" next!
  28.     exit 1
  29.  else
  30.     exit 0
  31.  fi
  32. ) < _shar_seq_.tmp || exit 1
  33. if test ! -f _shar_wnt_.tmp; then
  34.     echo 'x - still skipping contool_ui.h'
  35. else
  36. echo 'x - continuing file contool_ui.h'
  37. sed 's/^X//' << 'SHAR_EOF' >> 'contool_ui.h' &&
  38. extern Xv_opaque    contool_props_log_file_create();
  39. extern Xv_opaque    contool_props_log_style_create();
  40. extern Xv_opaque    contool_props_archive_style_create();
  41. extern Xv_opaque    contool_props_print_filter_create();
  42. extern Xv_opaque    contool_props_good_icon_create();
  43. extern Xv_opaque    contool_props_bad_icon_create();
  44. extern Xv_opaque    contool_props_flash_icon_create();
  45. extern Xv_opaque    contool_props_stamp_resolution_create();
  46. extern Xv_opaque    contool_props_message2_create();
  47. extern Xv_opaque    contool_props_max_message_create();
  48. extern Xv_opaque    contool_props_message3_create();
  49. extern Xv_opaque    contool_props_delete_amount_create();
  50. extern Xv_opaque    contool_props_message4_create();
  51. extern Xv_opaque    contool_props_props_apply_create();
  52. extern Xv_opaque    contool_props_props_reset_create();
  53. X
  54. typedef struct {
  55. X    Xv_opaque    filters;
  56. X    Xv_opaque    filter_controls;
  57. X    Xv_opaque    filter_list;
  58. X    Xv_opaque    filter_insert;
  59. X    Xv_opaque    filter_edit;
  60. X    Xv_opaque    filter_update;
  61. X    Xv_opaque    filter_type;
  62. X    Xv_opaque    start;
  63. X    Xv_opaque    stop;
  64. X    Xv_opaque    filter_timeout;
  65. X    Xv_opaque    filter_timeout_units;
  66. X    Xv_opaque    comment;
  67. X    Xv_opaque    ignore;
  68. X    Xv_opaque    action;
  69. X    Xv_opaque    filter_beep_count;
  70. X    Xv_opaque    filter_beep_times;
  71. X    Xv_opaque    filter_command;
  72. X    Xv_opaque    filters_apply;
  73. X    Xv_opaque    filters_apply_and_save;
  74. X    Xv_opaque    filters_reset;
  75. } contool_filters_objects;
  76. X
  77. extern contool_filters_objects    *contool_filters_objects_initialize();
  78. X
  79. extern Xv_opaque    contool_filters_filters_create();
  80. extern Xv_opaque    contool_filters_filter_controls_create();
  81. extern Xv_opaque    contool_filters_filter_list_create();
  82. extern Xv_opaque    contool_filters_filter_insert_create();
  83. extern Xv_opaque    contool_filters_filter_edit_create();
  84. extern Xv_opaque    contool_filters_filter_update_create();
  85. extern Xv_opaque    contool_filters_filter_type_create();
  86. extern Xv_opaque    contool_filters_start_create();
  87. extern Xv_opaque    contool_filters_stop_create();
  88. extern Xv_opaque    contool_filters_filter_timeout_create();
  89. extern Xv_opaque    contool_filters_filter_timeout_units_create();
  90. extern Xv_opaque    contool_filters_comment_create();
  91. extern Xv_opaque    contool_filters_ignore_create();
  92. extern Xv_opaque    contool_filters_action_create();
  93. extern Xv_opaque    contool_filters_filter_beep_count_create();
  94. extern Xv_opaque    contool_filters_filter_beep_times_create();
  95. extern Xv_opaque    contool_filters_filter_command_create();
  96. extern Xv_opaque    contool_filters_filters_apply_create();
  97. extern Xv_opaque    contool_filters_filters_apply_and_save_create();
  98. extern Xv_opaque    contool_filters_filters_reset_create();
  99. X
  100. typedef struct {
  101. X    Xv_opaque    load;
  102. X    Xv_opaque    load_controls;
  103. X    Xv_opaque    load_type;
  104. X    Xv_opaque    load_file;
  105. X    Xv_opaque    accept_load;
  106. } contool_load_objects;
  107. X
  108. extern contool_load_objects    *contool_load_objects_initialize();
  109. X
  110. extern Xv_opaque    contool_load_load_create();
  111. extern Xv_opaque    contool_load_load_controls_create();
  112. extern Xv_opaque    contool_load_load_type_create();
  113. extern Xv_opaque    contool_load_load_file_create();
  114. extern Xv_opaque    contool_load_accept_load_create();
  115. X
  116. typedef struct {
  117. X    Xv_opaque    store;
  118. X    Xv_opaque    store_controls;
  119. X    Xv_opaque    store_type;
  120. X    Xv_opaque    store_file;
  121. X    Xv_opaque    accept_store;
  122. } contool_store_objects;
  123. X
  124. extern contool_store_objects    *contool_store_objects_initialize();
  125. X
  126. extern Xv_opaque    contool_store_store_create();
  127. extern Xv_opaque    contool_store_store_controls_create();
  128. extern Xv_opaque    contool_store_store_type_create();
  129. extern Xv_opaque    contool_store_store_file_create();
  130. extern Xv_opaque    contool_store_accept_store_create();
  131. X
  132. typedef struct {
  133. X    Xv_opaque    about;
  134. X    Xv_opaque    about_controls;
  135. X    Xv_opaque    message1;
  136. X    Xv_opaque    message5;
  137. X    Xv_opaque    message6;
  138. X    Xv_opaque    message7;
  139. X    Xv_opaque    message8;
  140. X    Xv_opaque    message9;
  141. X    Xv_opaque    message10;
  142. X    Xv_opaque    message11;
  143. X    Xv_opaque    message12;
  144. X    Xv_opaque    message13;
  145. X    Xv_opaque    message14;
  146. X    Xv_opaque    message16;
  147. X    Xv_opaque    message17;
  148. X    Xv_opaque    message18;
  149. X    Xv_opaque    message19;
  150. X    Xv_opaque    message20;
  151. X    Xv_opaque    send_mail;
  152. } contool_about_objects;
  153. X
  154. extern contool_about_objects    *contool_about_objects_initialize();
  155. X
  156. extern Xv_opaque    contool_about_about_create();
  157. extern Xv_opaque    contool_about_about_controls_create();
  158. extern Xv_opaque    contool_about_message1_create();
  159. extern Xv_opaque    contool_about_message5_create();
  160. extern Xv_opaque    contool_about_message6_create();
  161. extern Xv_opaque    contool_about_message7_create();
  162. extern Xv_opaque    contool_about_message8_create();
  163. extern Xv_opaque    contool_about_message9_create();
  164. extern Xv_opaque    contool_about_message10_create();
  165. extern Xv_opaque    contool_about_message11_create();
  166. extern Xv_opaque    contool_about_message12_create();
  167. extern Xv_opaque    contool_about_message13_create();
  168. extern Xv_opaque    contool_about_message14_create();
  169. extern Xv_opaque    contool_about_message16_create();
  170. extern Xv_opaque    contool_about_message17_create();
  171. extern Xv_opaque    contool_about_message18_create();
  172. extern Xv_opaque    contool_about_message19_create();
  173. extern Xv_opaque    contool_about_message20_create();
  174. extern Xv_opaque    contool_about_send_mail_create();
  175. X
  176. typedef struct {
  177. X    Xv_opaque    mail;
  178. X    Xv_opaque    mail_controls;
  179. X    Xv_opaque    message21;
  180. X    Xv_opaque    message22;
  181. X    Xv_opaque    address;
  182. X    Xv_opaque    fixed_address;
  183. X    Xv_opaque    other_address;
  184. X    Xv_opaque    message;
  185. X    Xv_opaque    mail_controls1;
  186. X    Xv_opaque    accept_send;
  187. } contool_mail_objects;
  188. X
  189. extern contool_mail_objects    *contool_mail_objects_initialize();
  190. X
  191. extern Xv_opaque    contool_mail_mail_create();
  192. extern Xv_opaque    contool_mail_mail_controls_create();
  193. extern Xv_opaque    contool_mail_message21_create();
  194. extern Xv_opaque    contool_mail_message22_create();
  195. extern Xv_opaque    contool_mail_address_create();
  196. extern Xv_opaque    contool_mail_fixed_address_create();
  197. extern Xv_opaque    contool_mail_other_address_create();
  198. extern Xv_opaque    contool_mail_message_create();
  199. extern Xv_opaque    contool_mail_mail_controls1_create();
  200. extern Xv_opaque    contool_mail_accept_send_create();
  201. X
  202. typedef struct {
  203. X    Xv_opaque    message_archive;
  204. X    Xv_opaque    archive_controls;
  205. X    Xv_opaque    clear;
  206. X    Xv_opaque    print;
  207. X    Xv_opaque    archive;
  208. } contool_message_archive_objects;
  209. X
  210. extern contool_message_archive_objects    *contool_message_archive_objects_initialize();
  211. X
  212. extern Xv_opaque    contool_message_archive_message_archive_create();
  213. extern Xv_opaque    contool_message_archive_archive_controls_create();
  214. extern Xv_opaque    contool_message_archive_clear_create();
  215. extern Xv_opaque    contool_message_archive_print_create();
  216. extern Xv_opaque    contool_message_archive_archive_create();
  217. #endif
  218. SHAR_EOF
  219. echo 'File contool_ui.h is complete' &&
  220. chmod 0644 contool_ui.h ||
  221. echo 'restore of contool_ui.h failed'
  222. Wc_c="`wc -c < 'contool_ui.h'`"
  223. test 8425 -eq "$Wc_c" ||
  224.     echo 'contool_ui.h: original size 8425, current size' "$Wc_c"
  225. rm -f _shar_wnt_.tmp
  226. fi
  227. # ============= manifest.h ==============
  228. if test -f 'manifest.h' -a X"$1" != X"-c"; then
  229.     echo 'x - skipping manifest.h (File already exists)'
  230.     rm -f _shar_wnt_.tmp
  231. else
  232. > _shar_wnt_.tmp
  233. echo 'x - extracting manifest.h (Text)'
  234. sed 's/^X//' << 'SHAR_EOF' > 'manifest.h' &&
  235. /************************************************************************/
  236. /*    Copyright 1987-1992 by Chuck Musciano and Harris Corporation     */
  237. /*                                    */
  238. /*    Full ownership of this software, and all rights pertaining to     */
  239. /*    the for-profit distribution of this software, are retained by     */
  240. /*    Chuck Musciano and Harris Corporation.  You are permitted to     */
  241. /*    use this software without fee.  This software is provided "as     */
  242. /*    is" without express or implied warranty.  You may redistribute     */
  243. /*    this software, provided that this copyright notice is retained,    */
  244. /*    and that the software is not distributed for profit.  If you     */
  245. /*    wish to use this software in a profit-making venture, you must     */
  246. /*    first license this code and its underlying technology from     */
  247. /*    Harris Corporation.                         */
  248. /*                                    */
  249. /*    Bottom line: you can have this software, you can use it, you     */
  250. /*    can give it away.  You just can't sell any or all parts of it     */
  251. /*    without prior permission from Harris Corporation.         */
  252. /************************************************************************/
  253. X
  254. /************************************************************************/
  255. /*                                    */
  256. /*    manifest.h    simple manifest constants            */
  257. /*                                    */
  258. /************************************************************************/
  259. X
  260. #define        TRUE            1
  261. #define        FALSE            0
  262. X
  263. #define        PRIVATE            static
  264. #define        PUBLIC            extern
  265. #define        EXPORT
  266. X
  267. #ifndef    NULL
  268. #define        NULL            0
  269. #endif
  270. X
  271. #define        strsave(x)        (((x) == NULL)? NULL : (char *) strcpy((char *) malloc(strlen(x) + 1), x))
  272. #define        cond_free(x)        ((x)? free(x) : 0)
  273. X
  274. PUBLIC    int    errno;
  275. PUBLIC    char    *sys_errlist[];
  276. SHAR_EOF
  277. chmod 0644 manifest.h ||
  278. echo 'restore of manifest.h failed'
  279. Wc_c="`wc -c < 'manifest.h'`"
  280. test 1647 -eq "$Wc_c" ||
  281.     echo 'manifest.h: original size 1647, current size' "$Wc_c"
  282. rm -f _shar_wnt_.tmp
  283. fi
  284. # ============= patchlevel.h ==============
  285. if test -f 'patchlevel.h' -a X"$1" != X"-c"; then
  286.     echo 'x - skipping patchlevel.h (File already exists)'
  287.     rm -f _shar_wnt_.tmp
  288. else
  289. > _shar_wnt_.tmp
  290. echo 'x - extracting patchlevel.h (Text)'
  291. sed 's/^X//' << 'SHAR_EOF' > 'patchlevel.h' &&
  292. /************************************************************************/
  293. /*    Copyright 1987-1992 by Chuck Musciano and Harris Corporation     */
  294. /*                                    */
  295. /*    Full ownership of this software, and all rights pertaining to     */
  296. /*    the for-profit distribution of this software, are retained by     */
  297. /*    Chuck Musciano and Harris Corporation.  You are permitted to     */
  298. /*    use this software without fee.  This software is provided "as     */
  299. /*    is" without express or implied warranty.  You may redistribute     */
  300. /*    this software, provided that this copyright notice is retained,    */
  301. /*    and that the software is not distributed for profit.  If you     */
  302. /*    wish to use this software in a profit-making venture, you must     */
  303. /*    first license this code and its underlying technology from     */
  304. /*    Harris Corporation.                         */
  305. /*                                    */
  306. /*    Bottom line: you can have this software, you can use it, you     */
  307. /*    can give it away.  You just can't sell any or all parts of it     */
  308. /*    without prior permission from Harris Corporation.         */
  309. /************************************************************************/
  310. X
  311. /************************************************************************/
  312. /*                                    */
  313. /*    Patch        Comments                    */
  314. /*      0        Release of version 3.2a; see README for details    */
  315. /*               comp.sources.x: Volume ?, Issue ?        */
  316. /*                                    */
  317. /************************************************************************/
  318. SHAR_EOF
  319. chmod 0644 patchlevel.h ||
  320. echo 'restore of patchlevel.h failed'
  321. Wc_c="`wc -c < 'patchlevel.h'`"
  322. test 1402 -eq "$Wc_c" ||
  323.     echo 'patchlevel.h: original size 1402, current size' "$Wc_c"
  324. rm -f _shar_wnt_.tmp
  325. fi
  326. # ============= parse.y ==============
  327. if test -f 'parse.y' -a X"$1" != X"-c"; then
  328.     echo 'x - skipping parse.y (File already exists)'
  329.     rm -f _shar_wnt_.tmp
  330. else
  331. > _shar_wnt_.tmp
  332. echo 'x - extracting parse.y (Text)'
  333. sed 's/^X//' << 'SHAR_EOF' > 'parse.y' &&
  334. /************************************************************************/
  335. /*    Copyright 1987-1992 by Chuck Musciano and Harris Corporation     */
  336. /*                                    */
  337. /*    Full ownership of this software, and all rights pertaining to     */
  338. /*    the for-profit distribution of this software, are retained by     */
  339. /*    Chuck Musciano and Harris Corporation.  You are permitted to     */
  340. /*    use this software without fee.  This software is provided "as     */
  341. /*    is" without express or implied warranty.  You may redistribute     */
  342. /*    this software, provided that this copyright notice is retained,    */
  343. /*    and that the software is not distributed for profit.  If you     */
  344. /*    wish to use this software in a profit-making venture, you must     */
  345. /*    first license this code and its underlying technology from     */
  346. /*    Harris Corporation.                         */
  347. /*                                    */
  348. /*    Bottom line: you can have this software, you can use it, you     */
  349. /*    can give it away.  You just can't sell any or all parts of it     */
  350. /*    without prior permission from Harris Corporation.         */
  351. /************************************************************************/
  352. X
  353. %{
  354. X
  355. #include    <stdio.h>
  356. #include    <ctype.h>
  357. X
  358. #include    "manifest.h"
  359. #include    "contool.h"
  360. X
  361. EXPORT    Props    *parsed_defaults;
  362. EXPORT    Filter    *parsed_filters;
  363. EXPORT    int    filter_version = 0;
  364. X
  365. EXPORT    int    parse_errors_occured;
  366. X
  367. PRIVATE    char    *get_last_token();
  368. X
  369. PRIVATE    Filter    *curr;
  370. PRIVATE    char    *curr_file;
  371. PRIVATE    int    line_count = 1;
  372. PRIVATE    char    ungetc = -1;
  373. X
  374. %}
  375. X
  376. %start    configuration
  377. X
  378. %union    {char    *cpval;
  379. X     int    ival;
  380. X     Filter    *fval;
  381. X     Props    *pval;
  382. X    }
  383. X
  384. %token    <cpval>    STRING
  385. %token    <ival>    INTEGER
  386. X
  387. %token        LBRACE RBRACE
  388. X
  389. %token        ARCHIVE BEEP CHECK_ICON COMMAND COMMENT DEFAULTS DELETE DISPLAY FILTERS
  390. X        FLASH FLASH_ICON GOOD_ICON IGNORE LOG LOG_BEFORE_FILTERING LOG_FILE
  391. X        MATCH NO NOFLASH NOOPEN NOSTAMP OPEN PRINT QUIET SAVE STAMP TIMEOUT
  392. X        TIMESTAMP TO VERSION YES
  393. X
  394. %type    <ival>    beep flash log old_flash old_open old_stamp open stamp yes_no
  395. %type    <cpval>    command old_end_string string
  396. %type    <fval>    filter filter_list old_filter old_filter_list old_ignore old_quiet old_save
  397. X
  398. %%
  399. X
  400. configuration    :    empty
  401. X        |    old_style
  402. X        |    new_style
  403. X        ;
  404. X
  405. old_style    :    old_filter_list
  406. X                    { parsed_defaults = NULL;
  407. X                      parsed_filters = $1;
  408. X                    }
  409. X        ;
  410. X
  411. old_filter_list    :    old_filter
  412. X                    { $$ = $1; }
  413. X        |    old_filter_list old_filter
  414. X                    { Filter    *f;
  415. X                    
  416. X                      for (f = $1; f->next; f = f->next)
  417. X                         ;
  418. X                      f->next = $2;
  419. X                      $$ = $1;
  420. X                    }
  421. X        ;
  422. X
  423. old_filter    :    old_save
  424. X        |    old_ignore
  425. X        |    old_quiet
  426. X        ;
  427. X
  428. old_save    :    SAVE beep old_flash old_open old_stamp STRING old_end_string
  429. X                    { Filter    *f;
  430. X                      char        *msg;
  431. X
  432. X                      f = (Filter *) malloc(sizeof(Filter));
  433. X                      f->save     = TRUE;
  434. X                      f->beep     = $2;
  435. X                      f->flash    = $3;
  436. X                      f->open     = $4;
  437. X                      f->stamp    = $5;
  438. X                      f->timeout  = 0;
  439. X                      f->log      = TRUE;
  440. X                      f->start    = $6;
  441. X                      f->stop     = $7;
  442. X                      f->start_re = NULL;
  443. X                      f->stop_re  = NULL;
  444. X                      f->command  = NULL;
  445. X                      f->comment  = NULL;
  446. X                      f->next     = NULL;
  447. X                      if (msg = compile_exp(f, f->start, f->stop))
  448. X                         yyerror(msg);
  449. X                      $$ = f;
  450. X                    }
  451. X        ;
  452. X
  453. old_ignore    :    IGNORE STRING old_end_string
  454. X                    { Filter    *f;
  455. X                      char        *msg;
  456. X                    
  457. X                      f = (Filter *) malloc(sizeof(Filter));
  458. X                      f->save     = FALSE;
  459. X                      f->beep     = 0;
  460. X                      f->flash    = FALSE;
  461. X                      f->open     = FALSE;
  462. X                      f->stamp    = FALSE;
  463. X                      f->timeout  = 0;
  464. X                      f->log      = TRUE;
  465. X                      f->start    = $2;
  466. X                      f->stop     = $3;
  467. X                      f->start_re = NULL;
  468. X                      f->stop_re  = NULL;
  469. X                      f->command  = NULL;
  470. X                      f->comment  = NULL;
  471. X                      f->next     = NULL;
  472. X                      if (msg = compile_exp(f, f->start, f->stop))
  473. X                         yyerror(msg);
  474. X                      $$ = f;
  475. X                    }
  476. X        ;
  477. X
  478. old_quiet    :    QUIET STRING old_end_string
  479. X                    { Filter    *f;
  480. X                      char        *msg;
  481. X                    
  482. X                      f = (Filter *) malloc(sizeof(Filter));
  483. X                      f->save     = TRUE;
  484. X                      f->beep     = 0;
  485. X                      f->flash    = FALSE;
  486. X                      f->open     = FALSE;
  487. X                      f->stamp    = TRUE;
  488. X                      f->timeout  = 0;
  489. X                      f->log      = TRUE;
  490. X                      f->start    = $2;
  491. X                      f->stop     = $3;
  492. X                      f->start_re = NULL;
  493. X                      f->stop_re  = NULL;
  494. X                      f->command  = NULL;
  495. X                      f->comment  = NULL;
  496. X                      f->next     = NULL;
  497. X                      if (msg = compile_exp(f, f->start, f->stop))
  498. X                         yyerror(msg);
  499. X                      $$ = f;
  500. X                    }
  501. X        ;
  502. X
  503. old_flash    :    FLASH
  504. X                    { $$ = TRUE; }
  505. X        |    NOFLASH
  506. X                    { $$ = FALSE; }
  507. X        ;
  508. X
  509. old_open    :    OPEN
  510. X                    { $$ = TRUE; }
  511. X        |    NOOPEN
  512. X                    { $$ = FALSE; }
  513. X        ;
  514. X
  515. old_stamp    :    STAMP
  516. X                    { $$ = TRUE; }
  517. X        |    NOSTAMP
  518. X                    { $$ = FALSE; }
  519. X        ;
  520. X
  521. old_end_string    :    empty
  522. X                    { $$ = NULL; }
  523. X        |    TO STRING
  524. X                    { $$ = $2; }
  525. X        ;
  526. X
  527. new_style    :    version defaults
  528. X        |    version filters
  529. X        |    version defaults filters
  530. X        ;
  531. X
  532. version        :    empty
  533. X                    { filter_version = 0; }
  534. X        |    VERSION INTEGER
  535. X                    { filter_version = $2; }
  536. X        ;
  537. X
  538. defaults    :    DEFAULTS
  539. X                    { parsed_defaults = (Props *) malloc(sizeof(Props));
  540. X                      *parsed_defaults = defaults;
  541. X                    }
  542. X            LBRACE default_list RBRACE
  543. X        ;
  544. X
  545. filters        :    FILTERS LBRACE filter_list RBRACE
  546. X                    { parsed_filters = $3; }
  547. X        ;
  548. X
  549. default_list    :    empty
  550. X        |    default_list default
  551. X        ;
  552. X
  553. default        :    beep
  554. X                    { parsed_defaults->beep = $1; }
  555. X        |    command
  556. X                    { parsed_defaults->command = $1; }
  557. X        |    flash
  558. X                    { parsed_defaults->flash = $1; }
  559. X        |    log
  560. X                    { parsed_defaults->log = $1; }
  561. X        |    open
  562. X                    { parsed_defaults->open = $1; }
  563. X        |    stamp
  564. X                    { parsed_defaults->stamp = $1; }
  565. X        |    ARCHIVE INTEGER
  566. X                    { parsed_defaults->archive_style = $2; }
  567. X        |    CHECK_ICON string
  568. X                    { parsed_defaults->bad_icon = $2; }
  569. X        |    DELETE INTEGER
  570. X                    { parsed_defaults->delete_amount = $2; }
  571. X        |    DISPLAY INTEGER
  572. X                    { parsed_defaults->max_size = $2; }
  573. X        |    FLASH_ICON string
  574. X                    { parsed_defaults->flash_icon = $2; }
  575. X        |    GOOD_ICON string
  576. X                    { parsed_defaults->good_icon = $2; }
  577. X        |    LOG_BEFORE_FILTERING yes_no
  578. X                    { parsed_defaults->log_after = !$2; }
  579. X        |    LOG_FILE string
  580. X                    { parsed_defaults->log_file = $2; }
  581. X        |    PRINT STRING
  582. X                    { parsed_defaults->print_filter = $2; }
  583. X        |    TIMESTAMP INTEGER
  584. X                    { parsed_defaults->stamp_resolution = $2; }
  585. X        ;
  586. X
  587. filter_list    :    empty
  588. X                    { $$ = NULL; }
  589. X        |    filter_list filter
  590. X                    { Filter    *f;
  591. X                    
  592. X                      if ($1 == NULL)
  593. X                         $$ = $2;
  594. X                      else {
  595. X                         for (f = $1; f->next; f = f->next)
  596. X                            ;
  597. X                         f->next = $2;
  598. X                         $$ = $1;
  599. X                         }
  600. X                    }
  601. X        ;
  602. X
  603. filter        :    LBRACE
  604. X                    { curr = (Filter *) malloc(sizeof(Filter));
  605. X                      bzero(curr, sizeof(Filter));
  606. X                      if (filter_version < 310)
  607. X                         curr->log = TRUE;
  608. X                    }
  609. X            filter_attr_list RBRACE
  610. X                    { char    *msg;
  611. X                    
  612. X                      if (curr->start == NULL)
  613. X                         yyerror("no filter pattern specified");
  614. X                      if (msg = compile_exp(curr, curr->start, curr->stop))
  615. X                         yyerror(msg);
  616. X                      $$ = curr;
  617. X                    }
  618. X        ;
  619. X
  620. filter_attr_list:    empty
  621. X        |    filter_attr_list filter_attr
  622. X        ;
  623. X
  624. filter_attr    :    beep
  625. X                    { curr->beep = $1; }
  626. X        |    command
  627. X                    { curr->command = $1; }
  628. X        |    flash
  629. X                    { curr->flash = $1; }
  630. X        |    log
  631. X                    { curr->log = $1; }
  632. X        |    open
  633. X                    { curr->open = $1; }
  634. X        |    stamp
  635. X                    { curr->stamp = $1; }
  636. X        |    COMMENT string
  637. X                    { curr->comment = $2; }
  638. X        |    IGNORE yes_no
  639. X                    { curr->save = !$2; }
  640. X        |    MATCH string
  641. X                    { curr->start = $2; }
  642. X        |    TIMEOUT INTEGER
  643. X                    { curr->timeout = $2; }
  644. X        |    TO string
  645. X                    { curr->stop = $2; }
  646. X        ;
  647. X
  648. beep        :    BEEP INTEGER
  649. X                    { $$ = $2; }
  650. X        ;
  651. X
  652. command        :    COMMAND string
  653. X                    { $$ = $2; }
  654. X        ;
  655. flash        :    FLASH yes_no
  656. X                    { $$ = $2; }
  657. X        ;
  658. X
  659. log        :    LOG yes_no
  660. X                    { $$ = $2; }
  661. X        ;
  662. X
  663. open        :    OPEN yes_no
  664. X                    { $$ = $2; }
  665. X        ;
  666. X
  667. stamp        :    STAMP yes_no
  668. X                    { $$ = $2; }
  669. X        ;
  670. X
  671. yes_no        :    YES
  672. X                    { $$ = TRUE; }
  673. X        |    NO
  674. X                    { $$ = FALSE; }
  675. X        ;
  676. X
  677. string        :    STRING
  678. X                    { $$ = (*$1 == '\0')? NULL : $1; }
  679. X        ;
  680. X
  681. empty        : ;
  682. X
  683. %%
  684. X
  685. /************************************************************************/
  686. PRIVATE    yyerror(s1, s2, s3, s4, s5, s6, s7)
  687. X
  688. char    *s1, *s2, *s3, *s4, *s5, *s6, *s7;
  689. X
  690. {    char    buf1[1024], buf2[1024];
  691. X
  692. X    sprintf(buf1, "%s: line %d: ", curr_file, line_count - ((ungetc == '\n')? 1 : 0));
  693. X    sprintf(buf2, s1, s2, s3, s4, s5, s6, s7);
  694. X    strcat(buf1, buf2);
  695. X    if (strcmp(s1, "syntax error") == 0) {
  696. X       strcat(buf1, " at or near ");
  697. X       strcat(buf1, get_last_token());
  698. X       }
  699. X    error(buf1);
  700. X    yyclearin;
  701. X    parse_errors_occured++;
  702. }
  703. X
  704. #include "lex.c"
  705. SHAR_EOF
  706. chmod 0644 parse.y ||
  707. echo 'restore of parse.y failed'
  708. Wc_c="`wc -c < 'parse.y'`"
  709. test 8184 -eq "$Wc_c" ||
  710.     echo 'parse.y: original size 8184, current size' "$Wc_c"
  711. rm -f _shar_wnt_.tmp
  712. fi
  713. # ============= contool.man ==============
  714. if test -f 'contool.man' -a X"$1" != X"-c"; then
  715.     echo 'x - skipping contool.man (File already exists)'
  716.     rm -f _shar_wnt_.tmp
  717. else
  718. > _shar_wnt_.tmp
  719. echo 'x - extracting contool.man (Text)'
  720. sed 's/^X//' << 'SHAR_EOF' > 'contool.man' &&
  721. .TH CONTOOL 1 "31 July 1991"
  722. .SH NAME
  723. contool \- capture and display console output
  724. .SH SYNOPSIS
  725. contool [\fB\(hyc\fP \fIfile\fP] [\fB\(hyf\fP] [\fB\(hyi\fP \fIinput\fP] [\fB\(hyl\fP] [\f3\(hyL\fP \f2logfile\fP] [\f3\(hyn\fP]
  726. .SH DESCRIPTION
  727. .LP
  728. \f2Contool\fP captures and displays any messages sent to the system console.
  729. Each message is timestamped as it arrives.  The messages are displayed in a
  730. scrolling text window, so the user can scroll through old messages.
  731. .LP
  732. When a message arrives, \f3contool\fP will beep and, if closed, begin
  733. blinking its icon until the user opens the tool.  This behavior can be changed
  734. by modifying the default contool properties.
  735. .LP
  736. \f2Contool\fP must be run under either Open Windows or X Windows.
  737. It accepts the standard Open Windows command line options.
  738. .SH OPTIONS
  739. .IP "\fB\\(hyc\fP \fIfile\fP"
  740. specifies an alternate configuration file.  \f2Contool\fP normally
  741. reads its configuration information from ~/.contool.
  742. .IP "\fB\\(hyf\fP"
  743. forces \f2contool\fP to fork itself into the background after 
  744. acquiring the console.  This option is most useful when starting
  745. \f2contool\fP from your ~/.xinitrc or ~/.openwin-init file, where
  746. multiple tools are started in the background.  Even if \f2contool\fP is
  747. started first, other tools may begin running and produce error
  748. messages before \f2contool\fP can acquire the console.  By using the
  749. \fB-f\fP option you can start \f2contool\fP in the foreground,
  750. preventing other tools from starting until \f2contool\fP has acquired
  751. the console.
  752. .IP "\fB\\(hyi\fP \fIinput\fP"
  753. specifies an alternate input source.  \f2Contool\fP normally reads
  754. messages from the system console.  If \fB-i\fP is used, \f2contool\fP
  755. will read messages from the specified \fIinput\fP.  \fIInput\fP must
  756. be the pathname of a either a FIFO, or a character special device like
  757. /dev/tty.  \fIInput\fP can also be given as \*(lq-\*(rq, indicating
  758. that contool should read messages from its standard input.
  759. .IP "\fB\\(hyl\fP"
  760. enables logging when \f2contool\fP starts.  Initially, \f2contool\fP
  761. does not log messages to a file.  This option allows logging to be started
  762. automatically.  Logging behavior can be enabled and disabled via the
  763. \*(lqFile\*(rq menu (see below).
  764. .IP "\fB\\(hyL\fP \fIlogfile\fP"
  765. specifies an alternate log file.  The value of \fIlogfile\fP overrides
  766. any log file stored in the configuration file.  The \fB-l\fP and \fB-L\fP
  767. options used together allow multiple copies of contool to be started on 
  768. a single machine, with each copy logging to a different file, without
  769. having to create and maintain multiple configuration files.
  770. .IP "\fB\\(hyn\fP"
  771. prevents \f2contool\fP from acquiring the console when it starts.  This
  772. is most useful when testing a new version of contool, so that the test
  773. copy does not interfere with any previously running console tool.
  774. .SH USER INTERFACE
  775. .LP
  776. \f2Contool\fP presents the user with a control panel containing three
  777. buttons and a scrolling text window.  Console messages appear in the
  778. text window; \f2contool\fP's behavior is managed with the \fBFile\fP,
  779. \fBView\fP, and \fBEdit\fP buttons.  These buttons have several menu choices
  780. associated with them:
  781. .IP "\fBFile: Load Configuration...\fP"
  782. brings up the \fBLoad Configuration\fP dialog box.  This dialog contains
  783. a non-exclusive setting, a text field, and a single \fBLoad\fP button.
  784. The setting has two entries: \*(lqTool Properties\*(rq and \*(lqFilter
  785. Definitions\*(rq.  The user can choose which of these items to load from
  786. the configuration file.  The default action is to load both properties and
  787. filters from the file.
  788. .IP ""
  789. The text field contains the path of the configuration file.  By default,
  790. this is either ~/.contool, or the value of the \fB-c\fP option (above).
  791. This text field provides file name completion, like \f2csh\fP(1), by typing
  792. a space or carriage return.
  793. .IP ""
  794. After determining which components to be read from the file, and the name of
  795. the file, clicking on the \fBLoad\fP button will cause the desired elements
  796. to be read from the file.  If filters are loaded, any existing filters are
  797. discarded.  If \f2contool\fP was in the middle of filtering a multi-line message,
  798. that filtering action is terminated.
  799. .IP ""
  800. \f2Contool\fP can read files created by all previous versions of
  801. \f2contool\fP.  Files written by \f2contool\fP cannot be read by any previous
  802. version.
  803. .IP "\fBFile: Save Configuration...\fP"
  804. is analogous to the \fBLoad Configuration\fP operation, bringing up a dialog
  805. box containing a non-exclusive setting, a text field, and a \fBSave\fP
  806. button.  In the same manner as the \fBLoad Configuration\fP dialog, the
  807. user indiactes which items he desires to save, specifies the destination
  808. file, and clicks on the \fBSave\fP button to save the information.
  809. .IP ""
  810. \f2Contool\fP writes the data in a format incompatible with previous
  811. versions (release 3.0 or earlier) of the tool.
  812. .IP "\fBFile: Start Logging\fP"
  813. starts logging console messages to the log file specified by the tool
  814. properties, or the \fB-L\fP option (above).  The tool properties also
  815. contains a switch which determines whether messages are written before
  816. or after filtering occurs.  If before, all messages are logged.  If after,
  817. a message is written to the log if it does not match a filter and the default
  818. action in the tool properties has \*(lqLog message\*(rq enabled; or if it
  819. matches a filter with both the \*(lqSave\*(rq and \*(lqLog message\*(rq 
  820. attributes set.
  821. .IP ""
  822. The log file is written in such a manner that multiple invocations of
  823. \f2contool\fP can write to the same log file without conflict.  New 
  824. messages are always appended to the log file.  Log files can be forcibly
  825. flushed with a SIGHUP; see SIGNALS, below.
  826. .IP "\fBFile: Stop Logging\fP"
  827. stops the logging process.
  828. .IP "\fBFile: Print\fP"
  829. uses the \*(lqPrint Filter\*(rq specified in the tool properties to 
  830. print the contents of the console.  Only messages saved in the console
  831. can be printed.
  832. .IP "\fBFile: About Contool...\fP"
  833. provides a brief history of \f2contool\fP, and allows users to send
  834. e-mail to the contool developer.
  835. .IP "\fBView: Archive...\fP"
  836. opens the message archive dialog box.  This dialog box displays a 
  837. scrolling window containing all messages archived from the main 
  838. console display.  See MESSAGE ARCHIVE, below.
  839. .IP "\fBView: Archive Messages\fP"
  840. moves all the messages in the console display to the message archive.
  841. This is a handy way to remove already viewed messages from the console
  842. without losing them for later review.  By periodically moving 
  843. messages to the archive, only the most recent messages will be
  844. visible in the main console display.  Messages can be archived automatically
  845. as well; see TOOL PROPERTIES, below.
  846. .IP "\fBView: Become Console\fP"
  847. ensures that \f2contool\fP has the system console attribute.  SunOS
  848. allows exactly one process in the system to own the console.  If some
  849. other process takes control of the console, the user can reassign the
  850. console attribute to \f2contool\fP using this menu selection.
  851. .IP "\fBView: Clear Messages\fP"
  852. clears all messages from the console text display.
  853. .IP "\fBView: Reset Filter\fP"
  854. interrupts filtering of a multi-line filter.  If the user incorrectly
  855. specifies the end pattern of a multi-line filter, \f2contool\fP may
  856. never stop processing the filter, causing all subsequent console
  857. messages to be incorrectly handled.  This selection resets the effect
  858. of any multi-line filter that may be in effect.
  859. .IP ""
  860. When processing a multi-line filter, \f2contool\fP displays the
  861. starting filter pattern in the left window footer.  If the left footer
  862. is blank, \f2contool\fP is not processing a multi-line filter.
  863. .IP "\fBEdit: Filters...\fP"
  864. brings up the \fBFilters\fP dialog box.  See EDITING FILTERS, below.
  865. .IP "\fBEdit: Properties...\fP"
  866. brings up the \fBTool Properties\fP dialog box.  See TOOL PROPERTIES, below.
  867. .SH EDITING FILTERS
  868. The \fBFilters\fP dialog presents a scrolling list of filters and a variety of
  869. devices used to modify the current filter set.  The items in this dialog are:
  870. .IP "\fBFilters\fP"
  871. This scrolling list shows the starting pattern of each filter currently used by
  872. \f2contool\fP.  The pattern text is preceded by a small glyph indicating
  873. whether the filter is a single-line or multi-line filter.
  874. .IP ""
  875. If exactly one item in the list is selected, the properties of that filter
  876. will be displayed in the dialog box.  If no, or more than one, filter is
  877. selected, the remainder of the dialog box is grayed out.
  878. .IP "\fBInsert\fP"
  879. This button inserts a new blank filter into the scrolling list, allowing
  880. the user to add new filters to the filter set.  A menu attached to
  881. the button allows the user to select the insert point: at the top of the
  882. list, before the current selection, after the current selection, or at
  883. the bottom of the list.  The \*(lqbefore\*(rq and \*(lqafter\*(rq
  884. choices are only enabled if exactly one filter in the list is selected.
  885. The default position is the bottom of the list.
  886. .IP "\fBEdit\fP"
  887. This button edits the currently selected filters in the list.  The
  888. menu attached to this button has four choices: \fBCut\fP, \fBCopy\fP, \fBPaste\fP,
  889. and \fBDelete\fP.
  890. .IP ""
  891. The \fBCut\fP operation removes the selected filters from the list
  892. and places them on the clipboard, where they can subsequently be pasted
  893. back into the list.
  894. .IP ""
  895. The \fBCopy\fP operation copies the selected filters to the clipboard.
  896. The filters are not removed from the list.  The copied filters can subsequently
  897. be pasted back into the list.
  898. .IP ""
  899. The \fBPaste\fP operation copies filters from the clipboard into the list.
  900. This selection has a menu which specifies the paste position: at the top of the
  901. list, before the current selection, after the current selection, or at
  902. the bottom of the list.  The \*(lqbefore\*(rq and \*(lqafter\*(rq
  903. choices are only enabled if exactly one filter in the list is selected.
  904. The default position is the bottom of the list.
  905. .IP ""
  906. The \fBDelete\fP operation removes the selected filters from the list
  907. without placing them on the clipboard.  Once deleted, filters cannot
  908. be recovered with a paste operation.
  909. .IP ""
  910. The \fBCut\fP, \fBCopy\fP, and \fBDelete\fP selections are only presented
  911. if one or more filters in the list are selected.  The \fBPaste\fP selection
  912. is only available after a \fBCut\fP or \fBCopy\fP operation.
  913. .IP "\fBUpdate\fP"
  914. This button updates the currently selected filter using the values 
  915. presented in the remainder of the dialog box.  This button is only
  916. accessible if exactly one filter in the list is selected.
  917. .IP ""
  918. \fBUpdate\fP is used to modify an existing filter.  When just that filter
  919. is selected, its attributes are placed into the other dialog elements
  920. described below.  After adjusting the filter attributes, the user clicks
  921. the \fBUpdate\fP button to apply the changes to the currently selected
  922. filter.
  923. .IP ""
  924. In a similar manner, \fBUpdate\fP is used to apply attributes to a new,
  925. blank filter placed in the list via the \fBInsert\fP button.
  926. .IP "\fBType\fP"
  927. The \fBType\fP toggle indicates whether a filter will match just a single
  928. line message, or will match a multiple line message.  When \*(lqSingle
  929. line filter\*(rq is chosen, the \fBEnd pattern\fP item is disabled,
  930. and the user must specify the pattern which will match a single line of
  931. text written to the console.  When \*(lqMulti-line filter\*(rq is
  932. selected, the \fBEnd pattern\fP item is enabled, and the user needs to specify
  933. both a starting and an ending pattern.  All text following a line which
  934. matches the starting pattern, up to and including a line which matches the
  935. ending pattern, is considered to be part of the filtered message.
  936. .IP "\fBPattern\fP"
  937. This text field specifies the regular expression which matches the first
  938. (and, in the case of single line filters, the only) line of text in the
  939. filtered message.  Any valid regular expression is permitted.  Users that
  940. are trying to match some text exactly should be aware that regular
  941. expressions can match text anywhere in a line, and that the expression
  942. should be anchored to the start (or end) of the line by using the "^"
  943. (or "$") metacharacters.  For more information on regular expressions,
  944. see \f2ed\fP(1).
  945. .IP ""
  946. As a special extension to regular expressions, \f2contool\fP recognizes
  947. a backslash (\*(lq\\\*(rq) followed by one or more octal digits as a single
  948. character in the expression.  This allows non-printing characters, such as
  949. control characters, to be inserted in the text pattern.  If a backslash is
  950. followed by any other character, it is placed in the pattern verbatim.  Thus,
  951. to create an expression which matches a control-G followed by a backslash, the
  952. pattern \*(lq\\007\\\*(rq would suffice.
  953. .IP "\fBEnd pattern\fP"
  954. If the \fBType\fP is set to \*(lqMulti-line filter\*(rq, this field
  955. must contain the regular expression which matches the last line of the
  956. block of text handled by this filter.
  957. .IP "\fBTimeout\fP"
  958. If the \fBType\fP is set to \*(lqMulti-line filter\*(rq, this field
  959. sets a limit on how long \f2contool\fP will process the filter.  This
  960. prevents filters with erroneous end patterns from absorbing all console
  961. output once they begin filtering.  The default value, 0, indicates that
  962. no timeout is in effect.
  963. .IP "\fBComment\fP"
  964. This text field contains any comments regarding the filter the user
  965. wishes to record.  Since some filters can be rather arcane, it is suggested
  966. that users comment their filters.
  967. .IP "\fBWhen matched\fP"
  968. This exclusive setting dictates the behavior of \f2contool\fP when a
  969. filter is matched.  If \*(lqSave message\*(rq is chosen, the message
  970. is copied into the console display, and various actions can be taken.
  971. If \*(lqIgnore message\*(rq is selected, the filter text is discarded
  972. and no further actions are taken by \f2contool\fP.
  973. .IP "\fBWhen saved\fP"
  974. If \fBWhen matched\fP is set to \*(lqSave message\*(rq, this non-exclusive
  975. choice item will be enabled, allowing the user to specify what contool
  976. should do with this message.
  977. .IP ""
  978. The \*(lqBeep\*(rq choice causes the terminal bell to be sounded.  If
  979. selected, the beep counter to the right of this item is enabled, allowing
  980. the user to choose anywhere from one brief beep up to 99 annoying beeps.
  981. .IP ""
  982. The \*(lqCommand\*(rq choice causes a single command to be executed.
  983. The text field to the right of this item must contain the command to
  984. be executed.  \f2Contool\fP will write the text of the message to the
  985. standard input of the command.  For example, using \*(lqmail -s 'Contool
  986. output' user\*(rq as the command would mail the message text to the
  987. \f2user\fP.
  988. .IP ""
  989. The \*(lqFlash icon\*(rq choice causes the \f2contool\fP icon to flash,
  990. alternating between the \*(lqCheck console\*(rq and \*(lqFlash\*(rq
  991. icons.
  992. .IP ""
  993. The \*(lqLog message\*(rq choice causes the message to be written to
  994. the message log, if logging is enabled and is performed after filtering.
  995. .IP ""
  996. The \*(lqOpen window\*(rq choice causes \f2contool\fP to open from
  997. its iconic state, and to move in front of any obscuring windows.
  998. .IP ""
  999. The \*(lqTimestamp\*(rq choice causes \f2contool\fP to write a timestamp
  1000. to the console before copying the message into the console.  The timestamp
  1001. is written in conjunction with the timestamp resolution specified in the
  1002. \fBTool Properties\fP dialog.
  1003. .IP "\fBApply\fP"
  1004. This button makes the filters contained in the scrolling list the current
  1005. set of active filters.  Until this button is clicked, all changes made to
  1006. the filters are not used by \f2contool\fP.  After clicking \fBAccept\fP,
  1007. the changed filters become the current working set.
  1008. .IP ""
  1009. Note that even after clicking \fBAccept\fP, the configuration file is
  1010. not updated.  To make the changes permanent between invocations of
  1011. \f2contool\fP, press the \fBApply and Save\fP button, or use the \fBSave Configuration\fP
  1012. dialog to save the changed filters.
  1013. .IP "\fBApply and Save\fP"
  1014. This button makes the filters in the scrolling list the current set of
  1015. active filters and writes those filters and the tool properties to the
  1016. current configuration file.  To write the filters to a different file, or
  1017. to write just the filters without the tool properties, press the \fBApply\fP
  1018. button and use the \fBSave Configuration\fP dialog instead.
  1019. .IP "\fBReset\fP"
  1020. This button discards any changes made to the current filter set, 
  1021. restoring the filter list to match the current filter set in use
  1022. by \f2contool\fP.
  1023. .SH TOOL PROPERTIES
  1024. The \fBTool Properties\fP dialog allows the user to change the default behavior
  1025. of \f2contool\fP.  This includes various tool attributes, and the 
  1026. actions taken when a message arrives which does not match any filter.
  1027. The various properties include:
  1028. .IP "\fBDefault action\fP"
  1029. This non-exclusive setting determines the actions taken by \f2contool\fP
  1030. when a message arrives which does not match any filter.  The various
  1031. choices in this setting exactly correspond to the \fBWhen saved\fP
  1032. setting the \fBFilters\fP dialog, above.
  1033. .IP "\fBLog file\fP
  1034. This text field contains the path of the file to which messages will
  1035. be logged.  This field must be filled in before logging is enabled.
  1036. .IP "\fBLog messages\fP"
  1037. If this exclusive setting is set to \*(lqbefore filtering\*(rq, all
  1038. messages will be logged.  If set to \*(lqafter filtering\*(rq, 
  1039. messages that match filters whose \*(lqWhen matched\*(rq behavior is
  1040. set to \*(lqIgnore message\*(rq will not be logged.
  1041. .IP "\fBArchive messages\fP"
  1042. This exclusive setting determines how messages will be moved from the
  1043. main console display to the message archive.  If set to
  1044. \*(lqManually\*(rq, messages will only be archived when the user selects
  1045. \fBArchive Messages\fP from the \fBView\fP menu in the main \f2contool\fP
  1046. window.  If set to \*(lqWhen closing contool\*(rq, messages are copied to
  1047. the archive whenever the \f2contool\fP window is closed.  This mode assumes that
  1048. you typically open \f2contool\fP, read all the messages, and close the window.
  1049. Each time you open the window, you'll only see messages that have arrived
  1050. since you last closed \f2contool\fP.
  1051. .IP ""
  1052. Archived messages can be viewed in the message archive, described below.
  1053. .IP "\fBPrint filter\fP"
  1054. This text field specifies the command to be used to print the
  1055. console.  The default is \*(lqlpr\*(rq.  Local site dependencies
  1056. may require a different command.
  1057. .IP "\fB\\*(lqAll is well\\*(rq icon\fP"
  1058. This text field contains the path of a file created with \f2iconedit\fP(1).
  1059. The contained image will be used as \f2contool\fP's regular icon image.
  1060. This image is displayed whenever no flashing is in effect.
  1061. .IP "\fB\\*(lqCheck console\\*(rq icon\fP"
  1062. This image is alternated with the \fB\*(lqFlash\*(rq icon\fP image whenever flashing
  1063. is required.
  1064. .IP "\fB\\*(lqFlash\\*(rq icon\fP"
  1065. This image is alternated with the \fB\*(lqCheck console\*(rq icon\fP image whenever flashing
  1066. is required.  Ideally, all three icons should be the same size.
  1067. .IP "\fBTimestamp resolution\fP"
  1068. This numeric field specifies the minimum number of seconds to wait before
  1069. writing a new timestamp to the console.  Messages which require timestamping
  1070. will only write a timestamp if this number of seconds have transpired since the
  1071. last timestamp.
  1072. .IP "\fBMaximum message text\fP"
  1073. This numeric field determines the maximum size, in bytes, of messages that will
  1074. be stored in the console.  When writing a message to the console would exceed
  1075. this limit, some number of bytes, as determined by the \fBOverflow delete amount\fP,
  1076. below, will be removed from the front of the console.  This feature prevents the
  1077. console from becoming so large over time that it begins to swamp system resources.
  1078. .IP "\fBOverflow delete amount\fP"
  1079. When writing a message to the console would exceed the \fBMaximum message text\fP,
  1080. above, text will be deleted from the beginning of the console to make room.
  1081. This numeric field specifies how many bytes to remove to make room.  \f2Contool\fP
  1082. will attempt to remove whole messages within the constraints of the console
  1083. size to preserve a readable console.
  1084. .IP "\fBApply\fP"
  1085. This button makes the values in the dialog box the
  1086. current tool properties.  Until this button is clicked, all changes made to
  1087. the properties are not used by \f2contool\fP.  After clicking \fBAccept\fP,
  1088. the changed values become the current properties.
  1089. .IP ""
  1090. Note that even after clicking \fBAccept\fP, the configuration file is
  1091. not updated.  To make the changes permanent between invocations of
  1092. \f2contool\fP, use the \fBSave Configuration\fP dialog to save the
  1093. changed properties.
  1094. .IP "\fBReset\fP"
  1095. This button discards any changes in the dialog box made to the current properties, 
  1096. restoring the properties to match the current properties in use
  1097. by \f2contool\fP.
  1098. .SH MESSAGE ARCHIVE
  1099. The \fBMessage Archive\fP dialog allows the user to view archived messages.
  1100. The dialog presents a scrolling text window and two buttons.
  1101. .IP "\fBClear\fP"
  1102. The \fBClear\fP button removes all the messages from the archive.  Normally, 
  1103. the archive
  1104. works like the main \f2contool\fP display: it retains a certain amount of text,
  1105. and deletes the oldest messages as new messages arrive in excess of that
  1106. amount.  The \fBClear\fP button circumvents this feature and explicitly
  1107. clears the archive display.
  1108. .IP ""
  1109. The archive window will hold ten times the amount of text specified for the
  1110. main console display, as determined by the \fBMaximum message text\fP
  1111. value in the \fBTool Properties\fP dialog, described above.
  1112. .IP "\fBPrint\fP
  1113. The \fBPrint\fP button prints the contents of the archive, using the 
  1114. \*(lqPrint Filter\*(rq specified in the \fBTool Properties\fP dialog.
  1115. .SH CONFIGURATION FILE FORMAT
  1116. Previous versions of \f2contool\fP relied on the user editing the
  1117. configuration file by hand.  This version manages the file automatically,
  1118. and it is not intended that the file be edited directly by users.
  1119. See EDITING FILTERS, above, for information on modifying the behavior
  1120. of \f2contool\fP.
  1121. .SH SIGNALS
  1122. \f2Contool\fP will respond to certain Unix signals.  They are:
  1123. .IP "\fBSIGHUP\fP"
  1124. Upon receipt of SIGHUP, \f2contool\fP will close and reopen its log file,
  1125. if logging is enabled.  This guarantees that logged messages are flushed
  1126. to disk.
  1127. .IP "\fBSIGUSR1\fP"
  1128. Upon receipt of SIGUSR1, \f2contool\fP will stop blinking its icon.  This
  1129. is a handy way to stop blinking without opening \f2contool\fP.
  1130. .SH FILES
  1131. .ta 2i
  1132. ~/.contool    configuration file
  1133. .SH SEE ALSO
  1134. cmdtool(1), ed(1), kill(1), mkfifo(2), signal(3)
  1135. .SH AUTHOR
  1136. .LP
  1137. Chuck Musciano
  1138. .br
  1139. Advanced Technology Department
  1140. .br
  1141. Harris Corporation
  1142. .br
  1143. PO Box 37, MS 3A/1912
  1144. .br
  1145. Melbourne, FL 32902
  1146. .br
  1147. (407) 727-6131
  1148. .br
  1149. ARPA: chuck@trantor.harris-atd.com
  1150. .SH BUGS
  1151. .LP
  1152. \f2Contool\fP is a view-only tool, and there is no way to type commands
  1153. on the console.
  1154. .LP
  1155. Window system bugs may cause unusual, but harmless, quirks in the behavior
  1156. of \f2contool\fP.  In particular, displaying a menu in a dialog box without
  1157. actually selecting an item from that menu will cause the dialog box to close.
  1158. SHAR_EOF
  1159. chmod 0644 contool.man ||
  1160. echo 'restore of contool.man failed'
  1161. Wc_c="`wc -c < 'contool.man'`"
  1162. test 22873 -eq "$Wc_c" ||
  1163.     echo 'contool.man: original size 22873, current size' "$Wc_c"
  1164. rm -f _shar_wnt_.tmp
  1165. fi
  1166. # ============= contool.info ==============
  1167. if test -f 'contool.info' -a X"$1" != X"-c"; then
  1168.     echo 'x - skipping contool.info (File already exists)'
  1169.     rm -f _shar_wnt_.tmp
  1170. else
  1171. > _shar_wnt_.tmp
  1172. echo 'x - extracting contool.info (Text)'
  1173. sed 's/^X//' << 'SHAR_EOF' > 'contool.info' &&
  1174. # contool.info - User interface object help text.
  1175. # This file was generated by `gxv' from `contool.G'.
  1176. # DO NOT EDIT BY HAND.
  1177. :contool_controls
  1178. The contool control panel has buttons which let you load and store configuration data, adjust contool's configuration, and create and modify message filters.  Point at the desired button and press the Help key for more information about that set of functions.
  1179. :file
  1180. The File button provides various file-related services to contool users.  The associated menu has five entries.
  1181. X
  1182. "Load Configuration" brings up the Load Configuration dialog.
  1183. X
  1184. "Store Configuration" brings up the Store Configuration dialog.
  1185. X
  1186. "Start Logging" starts logging messages to the log file specified in the Properties dialog.  If logging is already in effect, this menu item is disabled.
  1187. X
  1188. "Stop Logging" stops logging.  If logging is not in effect, this menu item is disabled.
  1189. X
  1190. "Print" prints the contents of the console use the print filter specified in the Properties dialog. 
  1191. X
  1192. "About Contool" displays a brief history of contool, and allows users to send e-mail to contool's developer.
  1193. X
  1194. The default action is "Load Configuration".
  1195. :view
  1196. The View button provides three contool support functions:
  1197. X
  1198. "Become Console" ensures that contool has the system console attribute.  Only one process under SunOS can own the console.  If some other process acquires this attribute, messages will no longer be routed to contool.  This selection will give the console attribute back to contool.
  1199. SHAR_EOF
  1200. true || echo 'restore of contool.info failed'
  1201. fi
  1202. echo 'End of  part 6'
  1203. echo 'File contool.info is continued in part 7'
  1204. echo 7 > _shar_seq_.tmp
  1205. exit 0
  1206. -- 
  1207. --
  1208. Molecular Simulations, Inc.            mail: dcmartin@msi.com
  1209. 796 N. Pastoria Avenue                uucp: uunet!dcmartin
  1210. Sunnyvale, California 94086            at&t: 408/522-9236
  1211.