home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************/
- /* Copyright 1988, 1989 by Chuck Musciano and Harris Corporation */
- /* */
- /* Permission to use, copy, modify, and distribute this software */
- /* and its documentation for any purpose and without fee is */
- /* hereby granted, provided that the above copyright notice */
- /* appear in all copies and that both that copyright notice and */
- /* this permission notice appear in supporting documentation, and */
- /* that the name of Chuck Musciano and Harris Corporation not be */
- /* used in advertising or publicity pertaining to distribution */
- /* of the software without specific, written prior permission. */
- /* Chuck Musciano and Harris Corporation make no representations */
- /* about the suitability of this software for any purpose. It is */
- /* provided "as is" without express or implied warranty. This */
- /* software may not be sold without the prior explicit permission */
- /* of Harris Corporation. */
- /************************************************************************/
-
- /**************** Site dependent parameters ****************************/
-
- /* Where the default contool icons are kept. !Must end in '/'! */
-
- #if !defined(ICON_DIRECTORY)
- #define ICON_DIRECTORY "./icons/"
- #endif
-
- /* Where the Sun-provided fonts reside. Probably already correct */
-
- #define BOLD_FONT "/usr/lib/fonts/fixedwidthfonts/screen.b.14"
- #define REGULAR_FONT "/usr/lib/fonts/fixedwidthfonts/screen.r.14"
-
- /* The default icon names. Alternate sets are shown, and you might want
- to try these instead of the default set by uncommenting the desired set. */
-
- /* This set gives a blinking stop sign when messages arrive. */
- #define GOOD_ICON "contool.icon"
- #define BAD_ICON "stopsign.icon"
- #define INVERSE_ICON "stopsign_inv.icon"
-
- /* This set gives a terminal, labelled "Console", in a box. The screen
- flashes when messages arrive. */
- /* #define GOOD_ICON "contool.icon" */
- /* #define BAD_ICON "contool.icon" */
- /* #define INVERSE_ICON "contool_bad.icon" */
-
- /* This set gives a terminal, without a box. Again, the screen flashes
- when messages arrive. */
- /* #define GOOD_ICON "console1.icon" */
- /* #define BAD_ICON "console1_bad.icon" */
- /* #define INVERSE_ICON "console1_flash.icon" */
-
- /*************** End of site dependencies ******************************/
-
- #ifndef TRUE
- #define TRUE 1
- #define FALSE 0
- #endif
-
- #define PRIVATE static
- #define PUBLIC extern
- #define EXPORT
-
- #define TOOL_LABEL "<< Console Tool 2.2 >>"
-
- #define strsave(s) ((char *) strcpy(malloc(strlen(s) + 1), s))
-
- #define BEEP_COUNT 3
- #define TS_INTERVAL 60
-
- #define TEXT_SIZE_LIMIT 32768
- #define TEXT_SIZE_FUZZ 1024
- #define TEXT_DELETE_SIZE 1024
-
- #define INPUT_BUFFER_SIZE 4096
-
- typedef char boolean;
- typedef struct f_data f_rec, *f_ptr;
-
- struct f_data {char *start; /* starting string */
- char *start_re; /* starting compiled regular expression */
- char *end; /* ending string */
- char *end_re; /* starting compiled regular expression */
- int scircf; /* used by regex */
- int ecircf; /* used by regex */
- boolean valid; /* filter expressions are valid */
- boolean beep; /* number of times to beep */
- boolean flash; /* make the icon blink */
- boolean open; /* pop open the console window */
- boolean save; /* save message in console */
- boolean stamp; /* timestamp message */
- };
-
- PUBLIC struct pixrect better_button_cross;
- PUBLIC struct pixrect handle_pix;
- PUBLIC struct pixrect nohandle_pix;
- PUBLIC struct pixrect beep_0_pix;
- PUBLIC struct pixrect beep_1_pix;
- PUBLIC struct pixrect beep_2_pix;
- PUBLIC struct pixrect beep_3_pix;
- PUBLIC struct pixrect beep_4_pix;
- PUBLIC struct pixrect open_pix;
- PUBLIC struct pixrect close_pix;
- PUBLIC struct pixrect flash_pix;
- PUBLIC struct pixrect noflash_pix;
- PUBLIC struct pixrect save_pix;
- PUBLIC struct pixrect nosave_pix;
- PUBLIC struct pixrect stamp_pix;
- PUBLIC struct pixrect nostamp_pix;
- PUBLIC struct pixrect single_pix;
- PUBLIC struct pixrect range_pix;
- PUBLIC struct pixrect stopsign_pix;
-
- PUBLIC char filter_path[256];
- PUBLIC int pop_open;
- PUBLIC int beep_amount;
- PUBLIC int blink_icon;
- PUBLIC int do_time_stamp;
- PUBLIC f_ptr filters;
- PUBLIC f_ptr curr_filter;
-
- PUBLIC int match_exp(/* char *exp, int circ, char *str */);
- PUBLIC char *compile_exp(/* f_ptr filter, char *start, char *end */);
- PUBLIC int getline(/* FILE *f, char *buf, int max */);
- PUBLIC char getopt(/* int *argc, char **argv, char *opts, char **parm*/);
- PUBLIC char *lower(/* char *str */);
- PUBLIC int verify(/* char *source, char *valid */);
- PUBLIC char **saveargs(/* int argc, char **argv */);
- PUBLIC char *open_psuedo_tty(/* FILE **master, char *m_mode, FILE **slave, char *s_mode */);
- PUBLIC char *index();
- PUBLIC f_ptr read_filters(/* char *path, void (*f)() */);
- PUBLIC f_ptr next_filter(/* f_ptr *base, int *curr, int *limit */);
- PUBLIC char **tokenize(/* char *line, int *count */);
-