New phonetool

indi ssi!ssiwest!young at uunet.uu.net
Wed Jun 5 04:40:00 AEST 1991


	Well, I discovered a bug in phonetool that could leave a security 
	hole... the line that actually mailed the phone message used piping,
	so sh could get ahold of the text of the message you typed in, and
	if there were any $PATH's (or worse) the shell interpreted it for you.
	Anyway, I made the fix and also added a patch to have a PHONERC
	environment variable so you can put your .phonerc file anywhere
	you want.  Included below is the new shar file.  Please replace the
	old phonetool with this new one in the archive.  

	______________________________________________________________
	 ^   ^
	/_\ /_\	   indi			Supercomputer       ^      ^
	   ^	   uunet!ssi!young	Systems, Inc.      / \^  ^/ \
	  /_\	   (415)373-8044	Livermore, CA     /____\/____\
	______________________________________________________________


#! /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 the files:
#	phonetool/
# This archive created: Wed May  8 09:28:53 1991
export PATH; PATH=/bin:$PATH
if test ! -d ''
then
	echo shar: creating directory "''"
	mkdir ''
fi
echo shar: entering directory "''"
cd ''
echo shar: extracting "'phone.icon'" '(1997 characters)'
if test -f 'phone.icon'
then
	echo shar: will not over-write existing file "'phone.icon'"
else
sed 's/^	X//' << \SHAR_EOF > 'phone.icon'
	X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
	X */
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x3FFF,0xC000,0x0000,
	X	0x0007,0xC000,0x3E00,0x0000,
	X	0x0038,0x0000,0x01C0,0x0000,
	X	0x03C0,0x0000,0x003C,0x0000,
	X	0x0C00,0x7000,0xE003,0x0000,
	X	0x1003,0xDFFF,0xBC00,0x8000,
	X	0x2004,0x5000,0xA200,0x4000,
	X	0x2007,0xDFFF,0xBE00,0x4000,
	X	0x4004,0x0000,0x0200,0x2000,
	X	0x4004,0x3FFF,0xC200,0x2000,
	X	0x401C,0x4000,0x2380,0x2000,
	X	0x4064,0x4666,0x2260,0x2000,
	X	0x2788,0x8666,0x111E,0x4000,
	X	0x3808,0x8000,0x1101,0xC000,
	X	0x0010,0x8666,0x1080,0x0000,
	X	0x0011,0x0666,0x0880,0x0000,
	X	0x0021,0x0000,0x0840,0x0000,
	X	0x0021,0x0666,0x0840,0x0000,
	X	0x0042,0x0666,0x0420,0x0000,
	X	0x0042,0x0000,0x0420,0x0000,
	X	0x0081,0xFFFF,0xF810,0x0000,
	X	0x0080,0x0000,0x0010,0x0000,
	X	0x0100,0x0000,0x0008,0x0000,
	X	0x0100,0x0000,0x0008,0x0000,
	X	0x0100,0x0000,0x000F,0x8000,
	X	0x0100,0x0000,0x000C,0x7800,
	X	0x0100,0x0000,0x0008,0x0780,
	X	0x0100,0x0000,0x0009,0xC078,
	X	0x00FF,0xFFFF,0xFFF0,0x3804,
	X	0x0038,0x0000,0x05C7,0x0004,
	X	0x0000,0x0000,0x1800,0xE008,
	X	0x0000,0x0000,0x2060,0x1C10,
	X	0x0000,0x0000,0xC41C,0x0220,
	X	0x0000,0x0003,0x0303,0xC040,
	X	0x0000,0x0004,0x00C0,0x3080,
	X	0x0000,0x0018,0x6038,0x0100,
	X	0x0000,0x0020,0x1C07,0x0200,
	X	0x0000,0x0038,0x0300,0xC400,
	X	0x0000,0x0007,0x00E0,0x0800,
	X	0x0000,0x0000,0xE01C,0x1000,
	X	0x0000,0x0000,0x1802,0x2000,
	X	0x0000,0x0000,0x0700,0x4000,
	X	0x0000,0x0000,0x00E0,0x8000,
	X	0x0000,0x0000,0x0019,0x0000,
	X	0x0000,0x0000,0x0006,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0040,0x0000,0x0000,0x0020,
	X	0x0040,0x0000,0x0100,0x0020,
	X	0x0040,0x0000,0x0100,0x0020,
	X	0x5858,0x30B0,0xE3C6,0x0C20,
	X	0x6464,0x48C9,0x1109,0x1220,
	X	0x4444,0x8489,0x1110,0xA120,
	X	0x4444,0x8489,0xF110,0xA120,
	X	0x4444,0x8489,0x0110,0xA120,
	X	0x4444,0x4889,0x1109,0x1220,
	X	0x7844,0x3088,0xE0C6,0x0C20,
	X	0x4000,0x0000,0x0000,0x0000,
	X	0x4000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000
SHAR_EOF
if test 1997 -ne "`wc -c < 'phone.icon'`"
then
	echo shar: error transmitting "'phone.icon'" '(should have been 1997 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'phone_thick.icon'" '(1997 characters)'
if test -f 'phone_thick.icon'
then
	echo shar: will not over-write existing file "'phone_thick.icon'"
else
sed 's/^	X//' << \SHAR_EOF > 'phone_thick.icon'
	X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
	X */
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x3FFF,0xC000,0x0000,
	X	0x0007,0xFFFF,0xFE00,0x0000,
	X	0x003F,0xC000,0x3FC0,0x0000,
	X	0x03F8,0x0000,0x01FC,0x0000,
	X	0x0FC0,0x7FFF,0xE03F,0x0000,
	X	0x1C00,0xFFFF,0xE003,0x8000,
	X	0x3003,0xD800,0xBC00,0xC000,
	X	0x6007,0xDFFF,0xBE00,0x6000,
	X	0x6007,0xDFFF,0xBE00,0x6000,
	X	0xC006,0x0000,0x0600,0x3000,
	X	0xC006,0x3FFF,0xC600,0x3000,
	X	0xC01E,0x7FFF,0xE780,0x3000,
	X	0xC07E,0xC000,0x37E0,0x3000,
	X	0x63EC,0xC666,0x337C,0x6000,
	X	0x3F8D,0x8666,0x1B1F,0xC000,
	X	0x1C19,0x8000,0x1983,0x8000,
	X	0x0019,0x8666,0x1980,0x0000,
	X	0x0033,0x0666,0x0CC0,0x0000,
	X	0x0033,0x0000,0x0CC0,0x0000,
	X	0x0063,0x0666,0x0C60,0x0000,
	X	0x0066,0x0666,0x0660,0x0000,
	X	0x00C6,0x0000,0x0630,0x0000,
	X	0x00C7,0xFFFF,0xFE30,0x0000,
	X	0x0183,0xFFFF,0xFC18,0x0000,
	X	0x0180,0x0000,0x0018,0x0000,
	X	0x0180,0x0000,0x001F,0x8000,
	X	0x0180,0x0000,0x001C,0x7800,
	X	0x0180,0x0000,0x0018,0x0780,
	X	0x01FF,0xFFFF,0xFFF9,0xC078,
	X	0x00FF,0xFFFF,0xFFF0,0x3804,
	X	0x0038,0x0000,0x05C7,0x0004,
	X	0x0000,0x0000,0x1800,0xE008,
	X	0x0000,0x0000,0x2060,0x1C10,
	X	0x0000,0x0000,0xC41C,0x0220,
	X	0x0000,0x0003,0x0303,0xC040,
	X	0x0000,0x0004,0x00C0,0x3080,
	X	0x0000,0x0018,0x6038,0x0100,
	X	0x0000,0x0020,0x1C07,0x0200,
	X	0x0000,0x0038,0x0300,0xC400,
	X	0x0000,0x0007,0x00E0,0x0800,
	X	0x0000,0x0000,0xE01C,0x1000,
	X	0x0000,0x0000,0x1802,0x2000,
	X	0x0000,0x0000,0x0700,0x4000,
	X	0x0000,0x0000,0x00E0,0x8000,
	X	0x0000,0x0000,0x0019,0x0000,
	X	0x0000,0x0000,0x0006,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000,
	X	0x0040,0x0000,0x0000,0x0020,
	X	0x0040,0x0000,0x0100,0x0020,
	X	0x0040,0x0000,0x0100,0x0020,
	X	0x5858,0x30B0,0xE3C6,0x0C20,
	X	0x6464,0x48C9,0x1109,0x1220,
	X	0x4444,0x8489,0x1110,0xA120,
	X	0x4444,0x8489,0xF110,0xA120,
	X	0x4444,0x8489,0x0110,0xA120,
	X	0x4444,0x4889,0x1109,0x1220,
	X	0x7844,0x3088,0xE0C6,0x0C20,
	X	0x4000,0x0000,0x0000,0x0000,
	X	0x4000,0x0000,0x0000,0x0000,
	X	0x0000,0x0000,0x0000,0x0000
SHAR_EOF
if test 1997 -ne "`wc -c < 'phone_thick.icon'`"
then
	echo shar: error transmitting "'phone_thick.icon'" '(should have been 1997 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'phonetool.1'" '(3887 characters)'
if test -f 'phonetool.1'
then
	echo shar: will not over-write existing file "'phonetool.1'"
else
sed 's/^	X//' << \SHAR_EOF > 'phonetool.1'
	X.\" @(#)cc.l    @(#)phonetool.1	
	X.TH PHONETOOL 1 "25 January 1991"
	X.SH NAME
	X.B phonetool
	X\- a message-sending tool for phone calls intercepted on behalf of a co-worker
	X.SH SYNOPSIS
	X.B phonetool
	X[
	X.I any OpenLook window options
	X]
	X.SH DESCRIPTION
	X.LP
	X.B phonetool
	Xis an OpenLook style application that was originally created to run under Sun's OpenWindows environment.  It is written in XView, and its code skeleton was created using Sun's DevGuide product.  
	X
	X.B phonetool
	Xis a simple message-sending tool.  It does nothing that regular email won't do, but it is designed to reduce the typing involved when intercepting a call for a fellow worker who's not at his/her desk.  Users keep 
	X.B phonetool
	Xiconified on their desktop, and simply pop it open and fill in a name and a phone number when they intercept a call for a co-worker.
	X.LP
	X.SH OPTIONS
	X.TP 12
	XUse any OpenLook window options with this tool.
	X.SH USAGE
	X.LP
	XThe 
	X.B phonetool
	Xapplication is about the same size as those little pink or yellow slips of paper your secertary leaves on your desk with phone messages on it (about 4" x 5 1/4" here in the U.S... I'm not sure what various Europeans use...).  At the top of the 
	X.B phonetool
	Xpane is a "To:" text field with a "login id's" menu button to the right of it. Users can type in any valid email address in the text field that is under 80 characters.  Invalid addresses result in mail being returned to the sender.  For efficiency, users can select a name from the "login id's" menu instead, and that name will appear in the "To:" text field.
	X
	XThe "login id's" menu is compiled directly from the
	X.I .phonerc
	Xfile.  Users may have a
	X.I .phonerc
	Xfile in their home directory or the full path must be given in the environment variable
	X.B PHONERC.
	XThe
	X.I .phonerc
	Xfile contains the login name, email address, or email alias of co-workers for whom they might intercept phone calls.  The file may contain comments on lines beginning with a pound (#) sign.  Only one login name, email address, or email alias is allowed per line in the file.
	X
	XBelow the "To:" text field are three more text fields, "Caller:", "Company:", and "Phone:".  Users fill these text fields in with the relevant information while they are taking the message on the phone.  Below these fields are six checkbox items with "canned" messages next to them that users may select from.  Or, if elaboration is required, below the checkboxes is an "Other:" scrolling text pane in which users can enter a longer message.
	X
	XAt the bottom is a "Send Message" button that, when pressed, mails the message off to the email address specified at the top and then clears the form for the next message.  There is also a "Clear" button at the bottom which blanks out all the fields, checkboxes, and text if the user decides not to take a message he/she has already started.
	X.SH NOTES
	X.br 
	X.B phonetool 
	Xshould run under any X-based window manager.  It will not, however, run under a kernel-based windowing system, such as SunView.  Users must also have a copy of a
	X.I .phonerc 
	Xfile to build the "login id's" menu.  If the user doesn't wish to have anything in that menu, the
	X.I .phonerc
	Xfile may still be present, only it must be empty.  Or the user may forgo having a
	X.I .phonerc
	Xfile at all.  The
	X.I .phonerc
	Xfile must be in the home directory.  The
	X.I .phonerc
	Xfile contains the login name, email address, or email alias of co-workers for whom they might intercept phone calls.  The file may contain comments on lines beginning with a pound (#) sign.  Only one login name, email address, or email alias is allowed per line in the file.
	X
	X.SH BUGS
	X.br
	X.B phonetool
	Xmay not run on machines other than Sun's without font problems.
	X
	XThe scrollbar on the scrolling text pane sometimes is drawn incorrectly, and the bottom anchor does not appear.  It is still usable.
	X.SH  COMPLAINTS/FIXES
	X.br
	XTo indi, currently at uunet!ssi!young.
SHAR_EOF
if test 3887 -ne "`wc -c < 'phonetool.1'`"
then
	echo shar: error transmitting "'phonetool.1'" '(should have been 3887 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'phonetool.c'" '(31641 characters)'
if test -f 'phonetool.c'
then
	echo shar: will not over-write existing file "'phonetool.c'"
else
sed 's/^	X//' << \SHAR_EOF > 'phonetool.c'
	X
	X#ifndef phonetool_HEADER
	X#include "phonetool.h"
	X#endif
	X
	X#include <xview/notice.h>
	X#include <xview/textsw.h>
	X
	Xvoid main(argc, argv)
	X   int    argc;
	X   char   **argv;
	X{
	X
	X   /*
	X    * Initialize XView.
	X    */
	X
	X   xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, 0);
	X
	X   /*
	X    * Set the global tag to unique numbers.
	X    */
	X
	X   INSTANCE = xv_unique_key();
	X	
	X   /*
	X    * Initialize user interface components.
	X    */
	X
	X   phone_msg_phonemsg_frame = phone_msg_phonemsg_frame_objects_initialize(NULL,
	X      NULL);
	X	
	X   /*
	X    * Turn control over to XView.
	X    */
	X
	X   xv_main_loop(phone_msg_phonemsg_frame->phonemsg_frame);
	X
	X   exit(0);
	X}
	X
	X								     
	X								      
	X
	X/*
	X * Menu handler for `login_menu'.
	X */
	X
	XMenu_item
	Xlogin_menu_handler(item, op)
	X	Menu_item	item;
	X	Menu_generate	op;
	X{
	X   phone_msg_phonemsg_frame_objects   *ip;
	X   char                               login[MAX_STORED_LENGTH];
	X   
	X   ip = (phone_msg_phonemsg_frame_objects *) xv_get(item,
	X      XV_KEY_DATA, INSTANCE);
	X	
	X   switch (op) {
	X
	X   case MENU_DISPLAY:
	X      break;
	X
	X   case MENU_DISPLAY_DONE:
	X      break;
	X
	X   case MENU_NOTIFY:
	X      /* Put id into the To: field. */
	X      strcpy(login, (char *) xv_get(item, MENU_STRING));
	X      (void) xv_set(ip->to_text,
	X	 PANEL_VALUE, login,
	X	 NULL);
	X      break;
	X
	X   case MENU_NOTIFY_DONE:
	X      break;
	X   }
	X
	X   return item;
	X}
	X
	X
	X
	X/*
	X * Notify callback function for `send_button'.
	X */
	X
	Xvoid send_button_handler(item, event)
	X   Panel_item   item;
	X   Event        *event;
	X{
	X   extern int                         put_up_error_notice();
	X   extern void                        clear_phone_message();
	X
	X   int                                value;
	X   int                                text_len;
	X   int                                result;
	X   char                               to[MAX_STORED_LENGTH];
	X   char                               caller[MAX_STORED_LENGTH];
	X   char                               company[MAX_STORED_LENGTH];
	X   char                               phone[MAX_STORED_LENGTH];
	X   char                               message[MAX_MESSAGE_LENGTH];
	X   char                               msg_buf[5500];
	X   char                               *mail_str;
	X   char                               text_message[MAX_TEXT_LENGTH];
	X   char                               *temp_file;
	X   FILE                               *fp_temp;
	X   Textsw_index                       next_position;
	X   phone_msg_phonemsg_frame_objects   *ip;
	X
	X   ip = (phone_msg_phonemsg_frame_objects *) xv_get(
	X      item, XV_KEY_DATA, INSTANCE);
	X
	X   /*
	X    * Get person's name to send message to. 
	X    */
	X
	X   (void) strcpy(to, (char *) xv_get(ip->to_text, PANEL_VALUE));
	X
	X   /*
	X    * Get the caller's name, company, and phone number. 
	X    */
	X
	X   (void) strcpy(caller,  (char *) xv_get(ip->caller_text, PANEL_VALUE));
	X   (void) strcpy(company, (char *) xv_get(ip->company_text, PANEL_VALUE));
	X   (void) strcpy(phone,   (char *) xv_get(ip->phone_text, PANEL_VALUE));
	X
	X   /*
	X    * Initialize message to a null string.  (patch by Eric Liefeld)
	X    */
	X
	X   (void) strcpy(message, "");
	X
	X   /*
	X    * Get the message.  See O'Reilly p. 150 for meaning of bit values.
	X    */
	X
	X   value = (int) xv_get(ip->message_setting, PANEL_VALUE);
	X
	X   switch(value) {
	X
	X   case 0: /* 000000 nothing selected */
	X      break;
	X
	X   case 1: /* 000001 the first one is selected */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      break;
	X
	X   case 2: /* 000010 the second one is selected */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      break;
	X
	X   case 3: /* 000011 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      break;
	X
	X   case 4: /* 000100 the third one is selected */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      break;
	X
	X   case 5: /* 000101 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      break;
	X
	X   case 6: /* 000110 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      break;
	X
	X   case 7: /* 000111 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      break;
	X
	X   case 8: /* 001000 fourth one selected */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      break;
	X
	X   case 9: /* 001001 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      break;
	X
	X   case 10: /* 001010 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      break;
	X
	X   case 11: /* 001011 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      break;
	X
	X   case 12: /* 001100 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      break;
	X
	X   case 13: /* 001101 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      break;
	X
	X   case 14: /* 001110 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      break;
	X
	X   case 15: /* 001111 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      break;
	X
	X   case 16: /* 010000 fifth one selected */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 17: /* 010001 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 18: /* 010010 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 19: /* 010011 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 20: /* 010100 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 21: /* 010101 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 22: /* 010110 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 23: /* 010111 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 24: /* 011000 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 25: /* 011001 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 26: /* 011010 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 27: /* 011011 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 28: /* 011100 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 29: /* 011101 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 30: /* 011110 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 31: /* 011111 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      break;
	X
	X   case 32: /* 100000 sixth one selected */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 33: /* 100001 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 34: /* 100010 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 35: /* 100011 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 36: /* 100100 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 37: /* 100101 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 38: /* 100110 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 39: /* 100111 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 40: /* 101000 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 41: /* 101001 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 42: /* 101010 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 43: /* 101011 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 44: /* 101100 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 45: /* 101101 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 46: /* 101110 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 47: /* 101111 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 48: /* 110000 the last two are selected */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 49: /* 110001 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 50: /* 110010 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 51: /* 110011 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 52: /* 110100 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 53: /* 110101 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 54: /* 110110 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 55: /* 110111 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 56: /* 111000 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 57: /* 111001 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 58: /* 111010 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 59: /* 111011 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 60: /* 111100 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 61: /* 111101 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 62: /* 111110 */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X
	X   case 63: /* 111111 all of them selected */
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 0));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 1));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 2));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 3));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 4));
	X      strcat(message, "\n");
	X      strcat(message, (char *) xv_get(ip->message_setting,
	X         PANEL_CHOICE_STRING, 5));
	X      break;
	X   }
	X
	X   strcat(message, "\n\n");
	X
	X   /*
	X    * Compose the header.
	X    */
	X
	X   sprintf(msg_buf, "From:    %s\nCompany: %s\nPhone:   %s\n\n", caller,
	X      company, phone);
	X
	X   /*
	X    * Get the text, if any.
	X    */
	X
	X   text_len = (int) xv_get(ip->message_textsw, TEXTSW_LENGTH);
	X
	X   if (text_len > MAX_TEXT_LENGTH) {
	X
	X      /*
	X       * Put up error notice.
	X       */
	X
	X      result = put_up_error_notice(item, TEXT);
	X      return;
	X   }
	X
	X   /*
	X    * Put the text into the buffer.
	X    */
	X
	X   next_position = (Textsw_index) xv_get(ip->message_textsw,
	X      TEXTSW_CONTENTS, 0, text_message, text_len);
	X
	X   if (next_position != text_len) {
	X
	X      /*
	X       * We've got more than we can use, still.  Put up error message.
	X       */
	X
	X      result = put_up_error_notice(item, TEXT);
	X      return;
	X   }
	X
	X   else {
	X
	X      /*
	X       * Null terminate the text message.
	X       */
	X
	X      text_message[text_len] = '\0';
	X   }
	X
	X   /*
	X    * Put the "canned" and the textsw messages together.
	X    */
	X
	X   strcat(msg_buf, message);
	X   strcat(msg_buf, text_message);
	X
	X   /*
	X    * Put the message in a temp file to be read by mail.  (This is a fix
	X    * to keep sh from parsing $'s and such when the message is piped in.)
	X    */
	X
	X   temp_file = tmpnam(NULL);
	X   fp_temp   = fopen(temp_file, "w");
	X   fprintf(fp_temp, "%s", msg_buf);
	X   (void) fclose(fp_temp);
	X
	X   /*
	X    * Send the mail.
	X    */
	X
	X   mail_str = (char *)malloc(strlen(msg_buf) + 1 + 55);
	X   /*sprintf(mail_str, "mail -s \"**Phone Message**\" %s << END_MSG\n%s\nEND_MSG\n", to, msg_buf);*/
	X   sprintf(mail_str, "mail -s \"**Phone Message**\" %s < %s", to, temp_file);
	X
	X   /*
	X    * Check for mail system errors.  
	X    */
	X
	X   if (system(mail_str)) {
	X      result = put_up_error_notice(item, MAIL);
	X   }
	X
	X   else {
	X
	X      /*
	X       * Clear the message.
	X       */
	X
	X      clear_phone_message(ip);
	X   }
	X
	X   free(mail_str);
	X   unlink(temp_file);
	X
	X}
	X
	X
	X
	X
	X/*
	X * Notify callback function for `clear_button'.
	X */
	X
	Xvoid clear_button_handler(item, event)
	X   Panel_item   item;
	X   Event        *event;
	X{
	X   extern void                        clear_phone_message();
	X   phone_msg_phonemsg_frame_objects   *ip;
	X
	X   ip = (phone_msg_phonemsg_frame_objects *) xv_get(item, XV_KEY_DATA, 
	X      INSTANCE);
	X
	X   /*
	X    * Clear the message.
	X    */
	X
	X   clear_phone_message(ip);
	X
	X}
	X
	X
	X
	X
	X/*
	X * Clear the form routine.
	X */
	X
	Xvoid clear_phone_message(ip)
	X   phone_msg_phonemsg_frame_objects   *ip;
	X{
	X   /*
	X    * Clear the message.
	X    */
	X
	X   (void) xv_set(ip->to_text,
	X      PANEL_VALUE, "",
	X      NULL);
	X   (void) xv_set(ip->caller_text,
	X      PANEL_VALUE, "",
	X      NULL);
	X   (void) xv_set(ip->company_text,
	X      PANEL_VALUE, "",
	X      NULL);
	X   (void) xv_set(ip->phone_text,
	X      PANEL_VALUE, "",
	X      NULL);
	X   (void) xv_set(ip->message_setting,
	X      PANEL_VALUE, 0,
	X      NULL);
	X   (void) textsw_reset(ip->message_textsw, 50, 50); /* 50 = x & y coords */
	X}
	X
	X
	X
	X
	X/*
	X * This routine posts a notice for mailing errors.
	X */
	X
	Xint put_up_error_notice(item, notice_type)
	X   Panel_item               item;
	X   enum Error_notice_type   notice_type;
	X
	X{
	X   Panel   panel;
	X   int     result;
	X
	X   panel = (Panel) xv_get(item, PANEL_PARENT_PANEL);
	X
	X   switch(notice_type) {
	X
	X   case TEXT:
	X      result = notice_prompt(panel, NULL,
	X         NOTICE_MESSAGE_STRINGS,
	X            "The message in the Other: text pane",
	X            "is too long.",
	X            "",
	X            "Please edit it to less than",
	X            "5000",
	X            "characters.",
	X            NULL,
	X         NOTICE_BUTTON_YES, "Okay",
	X         NULL);
	X      break;
	X
	X   case MAIL:
	X      result = notice_prompt(panel, NULL,
	X         NOTICE_MESSAGE_STRINGS,
	X            "This message cannot be sent.",
	X            "",
	X            "Check the login name in the To: field",
	X            "to be sure it contains a valid mail address,",
	X            "then try to send the message again.",
	X            NULL,
	X         NOTICE_BUTTON_YES, "Okay",
	X         NULL);
	X      break;
	X   }
	X
	X   return(result);
	X}
SHAR_EOF
if test 31641 -ne "`wc -c < 'phonetool.c'`"
then
	echo shar: error transmitting "'phonetool.c'" '(should have been 31641 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'phonetool.h'" '(2418 characters)'
if test -f 'phonetool.h'
then
	echo shar: will not over-write existing file "'phonetool.h'"
else
sed 's/^	X//' << \SHAR_EOF > 'phonetool.h'
	X
	X#ifndef	phonetool_HEADER
	X#define	phonetool_HEADER
	X
	X#include <sys/types.h>
	X#include <sys/param.h>
	X#include <stdio.h>
	X#include <xview/xview.h>
	X#include <xview/xv_xrect.h>
	X#include <xview/attr.h>
	X#include <xview/panel.h>
	X
	X
	X#define MAX_STORED_LENGTH    40     /* Maximum chars in a text field */
	X#define MAX_MESSAGE_LENGTH   140    /* Maximum size of toggle messages */
	X#define MAX_TEXT_LENGTH      5000   /* Maximum num chars in the textsw */
	X                                    /* NOTE: If you change this last value,
	X                                     * change the value in the notice
	X                                     * prompt in phonetool.c put_up_error_notice
	X                                     * routine, too.
	X                                     */
	X
	Xenum Error_notice_type {
	X   TEXT,
	X   MAIL,
	X   NO_DOT_FILE,
	X   CANNOT_OPEN_DOT_FILE
	X};
	X
	Xextern Attr_attribute   INSTANCE;
	Xextern Xv_opaque        phone_msg_login_menu_create();
	X
	Xtypedef struct {
	X   Xv_opaque   phonemsg_frame;
	X   Xv_opaque   message_control;
	X   Xv_opaque   login_button;
	X   Xv_opaque   to_text;
	X   Xv_opaque   caller_text;
	X   Xv_opaque   company_text;
	X   Xv_opaque   phone_text;
	X   Xv_opaque   message_setting;
	X   Xv_opaque   other_message;
	X   Xv_opaque   message_textsw;
	X   Xv_opaque   send_control;
	X   Xv_opaque   send_button;
	X   Xv_opaque   clear_button;
	X} phone_msg_phonemsg_frame_objects;
	X
	Xextern phone_msg_phonemsg_frame_objects 
	X   *phone_msg_phonemsg_frame_objects_initialize();
	X
	Xextern Xv_opaque   phone_msg_phonemsg_frame_phonemsg_frame_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_message_control_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_login_button_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_to_text_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_caller_text_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_company_text_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_phone_text_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_message_setting_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_other_message_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_message_textsw_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_send_control_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_send_button_create();
	Xextern Xv_opaque   phone_msg_phonemsg_frame_clear_button_create();
	X
	X
	X
	Xextern phone_msg_phonemsg_frame_objects   *phone_msg_phonemsg_frame;
	X
	X#endif
SHAR_EOF
if test 2418 -ne "`wc -c < 'phonetool.h'`"
then
	echo shar: error transmitting "'phonetool.h'" '(should have been 2418 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'phonetool.info'" '(1319 characters)'
if test -f 'phonetool.info'
then
	echo shar: will not over-write existing file "'phonetool.info'"
else
sed 's/^	X//' << \SHAR_EOF > 'phonetool.info'
	X#
	X# phonetool.info - User interface object help text.
	X#
	X:login_button
	XSelect a name from this list, and it will appear in the "To:" field to the
	Xleft of this menu.  The names in this list come from your .phonerc file.
	XYou may edit your .phonerc file to add any names you might wish to use.
	X
	XThe names in this menu must be valid logins or email addresses.
	X#
	X:to_text
	XEnter the login name or email address of the person for whom you are taking a 
	Xphone message.
	X#
	X:caller_text
	XEnter the name, in plain language, of the person calling.
	X#
	X:company_text
	XEnter the name of the company for which the caller works.  (optional)
	X#
	X:phone_text
	XEnter the phone number and area code, if applicable, of the person calling.
	X(optional)
	X#
	X:message_setting
	XSelect one or more of the appropriate messages.  A checkmark will appear in the
	Xbox next to the message you have selected.  You may un-mark a message by
	Xselecting it again, thus toggling the checkmark off. (optional)
	X#
	X:message_textsw
	XAdd any additional message from the caller here.
	X#
	X:send_button
	XThis button sends your message to the person named in the "To:" field, and then
	Xclears the phone message form.
	X#
	X:clear_button
	XThis button simply clears the phone message form of any names or selections
	Xyou have made.  Use this button to cancel messages you have begun to compile.
SHAR_EOF
if test 1319 -ne "`wc -c < 'phonetool.info'`"
then
	echo shar: error transmitting "'phonetool.info'" '(should have been 1319 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'phonetool_build.c'" '(14126 characters)'
if test -f 'phonetool_build.c'
then
	echo shar: will not over-write existing file "'phonetool_build.c'"
else
sed 's/^	X//' << \SHAR_EOF > 'phonetool_build.c'
	X
	X#ifndef phonetool_HEADER
	X#include "phonetool.h"
	X#endif
	X
	X#include <xview/textsw.h>
	X#include <sys/stat.h>
	X#include <assert.h>
	X
	X
	X/*
	X * Create object `login_menu' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_login_menu_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X#define               MAXLINE    100
	X
	X   extern Menu_item   login_menu_handler();
	X   char               name[MAXPATHLEN+10];
	X   char               line[MAXLINE];
	X   char               *menu_text;
	X   FILE               *fptr;
	X   FILE               *fopen();
	X   Menu_item          mi;
	X   struct stat        statbuf;
	X   Xv_opaque          obj;
	X
	X   /*
	X    * Open the .phonerc file.  Look in environment variable PHONERC and
	X    * then the home dir for it.  (env variable patch by Ken Nelson)
	X    */
	X
	X   if (getenv("PHONERC") != NULL) {
	X
	X      (void) strcpy(name, getenv("PHONERC"));
	X
	X      /*
	X       * Add the name of the resource file.
	X       */
	X
	X      (void) strcat(name, "/.phonerc");
	X   }
	X
	X   else if (getenv("HOME") != NULL) {
	X
	X      (void) strcpy(name, getenv("HOME"));
	X
	X      /*
	X       * Add the name of the resource file.
	X       */
	X
	X      (void) strcat(name, "/.phonerc");
	X   }
	X
	X   else {
	X
	X      /*
	X       * If it returns null, then the file doesn't exist, or the user
	X       * has messed with $HOME.  So, make the menu blank.
	X       */
	X
	X      (void) strcpy(name, "");
	X   }
	X
	X   if (stat(name, &statbuf) != 0) {
	X
	X      /*
	X       * The file does not exist in this directory.  Put up an error notice
	X       * telling the user to create a .phonerc file.
	X       */
	X
	X      fprintf(stderr, "Can't find your .phonerc file.\n");
	X      fprintf(stderr, "You should have a .phonerc file in your home \n");
	X      fprintf(stderr, "directory if you wish to have a \"login id's\" menu.\n");
	X      fprintf(stderr, "The .phonerc file contains the logins or email\n");
	X      fprintf(stderr, "addresses of people to whom you might wish to send\n");
	X      fprintf(stderr, "phone messages.  These names will appear in the\n");
	X      fprintf(stderr, "\"login id's\" menu.\n");
	X      fprintf(stderr, "The .phonerc file may contain comments on lines\n");
	X      fprintf(stderr, "starting with a pound (#) sign.\n");
	X      fprintf(stderr, "The environment variable PHONERC may be used to\n");
	X      fprintf(stderr, "specify the location of your resource file.\n");
	X      
	X      /* 
	X       * Create the menu with no items.
	X       */
	X 
	X      obj = (Xv_opaque) xv_create(owner, MENU, NULL);
	X
	X      return(obj);
	X
	X   }
	X
	X   if ((fptr = fopen(name, "r")) == NULL) {
	X
	X      /*
	X       * Can't open file.  Put up a notice to this effect.
	X       */
	X
	X      fprintf(stderr, "Can't open or read your .phonerc file.\n");
	X      fprintf(stderr, "Please check to be sure this file is readable,\n");
	X      fprintf(stderr, "and exists in your home directory.\n");
	X      exit(0);
	X   }
	X
	X   /* 
	X    * Create the menu with no items at first.
	X    */
	X 
	X   obj = (Xv_opaque) xv_create(owner, MENU, NULL);
	X
	X   fgets(line, MAXLINE, fptr);
	X
	X   while(!feof(fptr)) {
	X
	X      /*
	X       * If this line doesn't start with a comment "#" or a newline, then
	X       * write its contents into the menu.
	X       */
	X
	X      if (((strncmp("#", line, 1)) != 0) && ((strncmp("\n", line, 1)) != 0)) {
	X
	X         /*
	X          * Take out the trailing newline.
	X          */
	X
	X         (void) strtok(line, "\n");
	X
	X         /*
	X          * Malloc space for the text for this menu item.
	X          */
	X
	X         menu_text = (char *) malloc(strlen(line) + 1);
	X         (void) strcpy(menu_text, line);
	X
	X         /*
	X          * Add the entry to the menu.
	X          */
	X
	X         mi = (Menu_item) xv_create(NULL, MENUITEM,
	X            XV_KEY_DATA, INSTANCE, ip,
	X            MENU_STRING, menu_text,
	X            MENU_GEN_PROC, login_menu_handler,
	X            NULL);
	X
	X         (void) xv_set(obj,
	X            MENU_APPEND_ITEM, mi,
	X            NULL);
	X      }
	X 
	X      /*
	X       * Get another line.  Go ahead and write over what was there before.
	X       */
	X
	X      fgets(line, MAXLINE, fptr);
	X
	X   }
	X 
	X   /*
	X    * Close the .bt file.
	X    */
	X
	X   fclose(fptr);
	X
	X   return(obj);
	X
	X}
	X
	X
	X
	X
	X/*
	X * Initialize an instance of object `phonemsg_frame'.
	X */
	X
	Xphone_msg_phonemsg_frame_objects
	X   *phone_msg_phonemsg_frame_objects_initialize(ip, owner)
	X   phone_msg_phonemsg_frame_objects   *ip;
	X   Xv_opaque                          owner;
	X{
	X   if (!ip && !(ip = (phone_msg_phonemsg_frame_objects *) calloc(1, sizeof 
	X      (phone_msg_phonemsg_frame_objects))))
	X      return (phone_msg_phonemsg_frame_objects *) NULL;
	X   if (!ip->phonemsg_frame)
	X      ip->phonemsg_frame = phone_msg_phonemsg_frame_phonemsg_frame_create(ip, 
	X         owner);
	X   if (!ip->message_control)
	X      ip->message_control = phone_msg_phonemsg_frame_message_control_create(ip, 
	X         ip->phonemsg_frame);
	X   if (!ip->login_button)
	X      ip->login_button = phone_msg_phonemsg_frame_login_button_create(ip, 
	X         ip->message_control);
	X   if (!ip->to_text)
	X      ip->to_text = phone_msg_phonemsg_frame_to_text_create(ip, 
	X         ip->message_control);
	X   if (!ip->caller_text)
	X      ip->caller_text = phone_msg_phonemsg_frame_caller_text_create(ip, 
	X         ip->message_control);
	X   if (!ip->company_text)
	X      ip->company_text = phone_msg_phonemsg_frame_company_text_create(ip, 
	X         ip->message_control);
	X   if (!ip->phone_text)
	X      ip->phone_text = phone_msg_phonemsg_frame_phone_text_create(ip, 
	X         ip->message_control);
	X   if (!ip->message_setting)
	X      ip->message_setting = phone_msg_phonemsg_frame_message_setting_create(ip, 
	X         ip->message_control);
	X   if (!ip->other_message)
	X      ip->other_message = phone_msg_phonemsg_frame_other_message_create(ip, 
	X         ip->message_control);
	X   if (!ip->message_textsw)
	X      ip->message_textsw = phone_msg_phonemsg_frame_message_textsw_create(ip, 
	X         ip->phonemsg_frame);
	X   if (!ip->send_control)
	X      ip->send_control = phone_msg_phonemsg_frame_send_control_create(ip, 
	X         ip->phonemsg_frame);
	X   if (!ip->send_button)
	X      ip->send_button = phone_msg_phonemsg_frame_send_button_create(ip, 
	X         ip->send_control);
	X   if (!ip->clear_button)
	X      ip->clear_button = phone_msg_phonemsg_frame_clear_button_create(ip, 
	X         ip->send_control);
	X
	X   return ip;
	X}
	X
	X
	X
	X/*
	X * Create object `phonemsg_frame' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_phonemsg_frame_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque               obj;
	X   Xv_opaque               phonemsg_frame_image;
	X   static unsigned short   phonemsg_frame_bits[] = {
	X#include "phone.icon"
	X   };
	X	
	X   phonemsg_frame_image = xv_create(0, SERVER_IMAGE,
	X      SERVER_IMAGE_BITS, phonemsg_frame_bits,
	X      SERVER_IMAGE_DEPTH, 1,
	X      XV_WIDTH, 64,
	X      XV_HEIGHT, 64,
	X      0);
	X
	X   obj = xv_create(owner, FRAME,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_WIDTH, 321,
	X      XV_HEIGHT, 399,
	X      XV_LABEL, "Phone Message",
	X      FRAME_CLOSED, FALSE,
	X      FRAME_SHOW_FOOTER, TRUE,
	X      FRAME_ICON, xv_create(0, ICON,
	X         ICON_IMAGE, phonemsg_frame_image,
	X         0),
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X/*
	X * Create object `message_control' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_message_control_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, PANEL,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_X, 0,
	X      XV_Y, 0,
	X      XV_WIDTH, WIN_EXTEND_TO_EDGE,
	X      XV_HEIGHT, 312,
	X      WIN_BORDER, FALSE,
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X/*
	X * Create object `login_button' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_login_button_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, PANEL_BUTTON,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_HELP_DATA, "phonetool:login_button",
	X      XV_X, 219,
	X      XV_Y, 11,
	X      XV_WIDTH, 87,
	X      XV_HEIGHT, 20,
	X      PANEL_LABEL_STRING, "login id's",
	X      PANEL_ITEM_MENU, phone_msg_login_menu_create(ip, NULL),
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X/*
	X * Create object `to_text' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_to_text_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, PANEL_TEXT,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_HELP_DATA, "phonetool:to_text",
	X      XV_X, 11,
	X      XV_Y, 15,
	X      XV_WIDTH, 189,
	X      XV_HEIGHT, 15,
	X      PANEL_LABEL_STRING, "To:",
	X      PANEL_VALUE_X, 40,
	X      PANEL_VALUE_Y, 15,
	X      PANEL_LAYOUT, PANEL_HORIZONTAL,
	X      PANEL_VALUE_DISPLAY_LENGTH, 20,
	X      PANEL_VALUE_STORED_LENGTH, MAX_STORED_LENGTH,
	X      PANEL_MAX_VALUE, 0,
	X      PANEL_MIN_VALUE, 0,
	X      PANEL_READ_ONLY, FALSE,
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X
	X/*
	X * Create object `caller_text' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_caller_text_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, PANEL_TEXT,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_HELP_DATA, "phonetool:caller_text",
	X      XV_X, 32,
	X      XV_Y, 45,
	X      XV_WIDTH, 253,
	X      XV_HEIGHT, 15,
	X      PANEL_LABEL_STRING, "Caller:",
	X      PANEL_VALUE_X, 85,
	X      PANEL_VALUE_Y, 45,
	X      PANEL_LAYOUT, PANEL_HORIZONTAL,
	X      PANEL_VALUE_DISPLAY_LENGTH, 25,
	X      PANEL_VALUE_STORED_LENGTH, MAX_STORED_LENGTH,
	X      PANEL_MAX_VALUE, 0,
	X      PANEL_MIN_VALUE, 0,
	X      PANEL_READ_ONLY, FALSE,
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X
	X/*
	X * Create object `company_text' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_company_text_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, PANEL_TEXT,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_HELP_DATA, "phonetool:company_text",
	X      XV_X, 9,
	X      XV_Y, 63,
	X      XV_WIDTH, 276,
	X      XV_HEIGHT, 15,
	X      PANEL_LABEL_STRING, "Company:",
	X      PANEL_VALUE_X, 85,
	X      PANEL_VALUE_Y, 63,
	X      PANEL_LAYOUT, PANEL_HORIZONTAL,
	X      PANEL_VALUE_DISPLAY_LENGTH, 25,
	X      PANEL_VALUE_STORED_LENGTH, MAX_STORED_LENGTH,
	X      PANEL_MAX_VALUE, 0,
	X      PANEL_MIN_VALUE, 0,
	X      PANEL_READ_ONLY, FALSE,
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X
	X/*
	X * Create object `phone_text' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_phone_text_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, PANEL_TEXT,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_HELP_DATA, "phonetool:phone_text",
	X      XV_X, 31,
	X      XV_Y, 81,
	X      XV_WIDTH, 254,
	X      XV_HEIGHT, 15,
	X      PANEL_LABEL_STRING, "Phone:",
	X      PANEL_VALUE_X, 85,
	X      PANEL_VALUE_Y, 81,
	X      PANEL_LAYOUT, PANEL_HORIZONTAL,
	X      PANEL_VALUE_DISPLAY_LENGTH, 25,
	X      PANEL_VALUE_STORED_LENGTH, MAX_STORED_LENGTH,
	X      PANEL_MAX_VALUE, 0,
	X      PANEL_MIN_VALUE, 0,
	X      PANEL_READ_ONLY, FALSE,
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X
	X/*
	X * Create object `message_setting' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_message_setting_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, PANEL_TOGGLE, PANEL_FEEDBACK, PANEL_MARKED,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_HELP_DATA, "phonetool:message_setting",
	X      XV_X, 16,
	X      XV_Y, 104,
	X      XV_WIDTH, 235,
	X      XV_HEIGHT, 185,
	X      PANEL_VALUE_X, 16,
	X      PANEL_VALUE_Y, 121,
	X      PANEL_LAYOUT, PANEL_VERTICAL,
	X      PANEL_CHOICE_STRINGS,
	X         "Please return this call.",
	X         "Will call again.",
	X         "URGENT - return this call ASAP.",
	X         "Wants to see you.",
	X         "Stopped by to see you.",
	X         "Returned your call.",
	X         0,
	X      PANEL_LABEL_STRING, "Message:",
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X
	X/*
	X * Create object `other_message' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_other_message_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, PANEL_MESSAGE,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_X, 16,
	X      XV_Y, 296,
	X      XV_WIDTH, 43,
	X      XV_HEIGHT, 13,
	X      PANEL_LABEL_STRING, "Other:",
	X      PANEL_LABEL_BOLD, TRUE,
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X
	X/*
	X * Create object `message_textsw' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_message_textsw_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, TEXTSW,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_HELP_DATA, "phonetool:message_textsw",
	X      XV_X, 16,
	X      XV_Y, 316,
	X      XV_WIDTH, WIN_EXTEND_TO_EDGE,
	X      XV_HEIGHT, 48,
	X      OPENWIN_SHOW_BORDERS, TRUE,
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X
	X/*
	X * Create object `send_control' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_send_control_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   Xv_opaque   obj;
	X	
	X   obj = xv_create(owner, PANEL,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_X, 0,
	X      XV_Y, 369,
	X      XV_WIDTH, WIN_EXTEND_TO_EDGE,
	X      XV_HEIGHT, WIN_EXTEND_TO_EDGE,
	X      WIN_BORDER, FALSE,
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X
	X/*
	X * Create object `send_button' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_send_button_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   extern void   send_button_handler();
	X   Xv_opaque     obj;
	X	
	X   obj = xv_create(owner, PANEL_BUTTON,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_HELP_DATA, "phonetool:send_button",
	X      XV_X, 66,
	X      XV_Y, 4,
	X      XV_WIDTH, 103,
	X      XV_HEIGHT, 20,
	X      PANEL_LABEL_STRING, "Send Message",
	X      PANEL_NOTIFY_PROC, send_button_handler,
	X      0);
	X
	X   return obj;
	X}
	X
	X
	X
	X
	X/*
	X * Create object `clear_button' in the specified instance.
	X */
	X
	XXv_opaque phone_msg_phonemsg_frame_clear_button_create(ip, owner)
	X   caddr_t     *ip;
	X   Xv_opaque   owner;
	X{
	X   extern void   clear_button_handler();
	X   Xv_opaque     obj;
	X	
	X   obj = xv_create(owner, PANEL_BUTTON,
	X      XV_KEY_DATA, INSTANCE, ip,
	X      XV_HELP_DATA, "phonetool:clear_button",
	X      XV_X, 206,
	X      XV_Y, 4,
	X      XV_WIDTH, 50,
	X      XV_HEIGHT, 20,
	X      PANEL_LABEL_STRING, "Clear",
	X      PANEL_NOTIFY_PROC, clear_button_handler,
	X      0);
	X
	X   return obj;
	X}
	X
SHAR_EOF
if test 14126 -ne "`wc -c < 'phonetool_build.c'`"
then
	echo shar: error transmitting "'phonetool_build.c'" '(should have been 14126 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'phonetool_data.c'" '(401 characters)'
if test -f 'phonetool_data.c'
then
	echo shar: will not over-write existing file "'phonetool_data.c'"
else
sed 's/^	X//' << \SHAR_EOF > 'phonetool_data.c'
	X
	X/*
	X * THIS IS THE GLOBAL FILE.
	X */
	X
	X#ifndef phonetool_HEADER
	X#include "phonetool.h"
	X#endif
	X
	X/*
	X * Instance XV_KEY_DATA key.  An instance is a set of related
	X * user interface objects.  A pointer to an object's instance
	X * is stored under this key in every object.  This must be a
	X * global variable.
	X */
	XAttr_attribute  INSTANCE;
	X      
	Xphone_msg_phonemsg_frame_objects   *phone_msg_phonemsg_frame;
	X
SHAR_EOF
if test 401 -ne "`wc -c < 'phonetool_data.c'`"
then
	echo shar: error transmitting "'phonetool_data.c'" '(should have been 401 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'lisa_simpson.icon'" '(1997 characters)'
if test -f 'lisa_simpson.icon'
then
	echo shar: will not over-write existing file "'lisa_simpson.icon'"
else
sed 's/^	X//' << \SHAR_EOF > 'lisa_simpson.icon'
	X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
	X */
	X	0x0000,0x0060,0x00F0,0x0000,
	X	0x0000,0x0190,0x0310,0x0000,
	X	0x0000,0x0208,0x0410,0x0000,
	X	0x0000,0x0404,0x1808,0x0000,
	X	0x0008,0x0402,0x2008,0x0000,
	X	0x0017,0x8401,0xC008,0x0000,
	X	0x0010,0x6400,0x0008,0x0000,
	X	0x0010,0x3800,0x0008,0x03E0,
	X	0x0010,0x0000,0x0008,0xFC20,
	X	0x0010,0x0000,0x0007,0x8040,
	X	0x0008,0x0000,0x0000,0x0040,
	X	0x0008,0x0000,0x0000,0x0080,
	X	0x0008,0x0000,0x0000,0x0080,
	X	0x0008,0x0000,0x0000,0x0080,
	X	0x0005,0x8C00,0x0000,0x0100,
	X	0x0005,0x1800,0x0000,0x0600,
	X	0x0005,0x1060,0x0000,0x0C00,
	X	0x0005,0x1084,0x0000,0x03F0,
	X	0x0003,0xF988,0x1000,0x000C,
	X	0x0003,0x0708,0x2000,0x0002,
	X	0x0004,0x0188,0x4000,0x0002,
	X	0x0008,0x0089,0x8000,0x0004,
	X	0x0008,0xC09F,0x0000,0x0004,
	X	0x0010,0xC060,0xC780,0x0008,
	X	0x0010,0x0080,0x3800,0x0010,
	X	0x0010,0x0100,0x1000,0x0060,
	X	0x0010,0x0118,0x1000,0x0080,
	X	0x0010,0x0218,0x0800,0x0100,
	X	0x0008,0x0200,0x0FC0,0x0200,
	X	0x0008,0x0200,0x0800,0x0400,
	X	0x003F,0xF200,0x0800,0x0800,
	X	0x0040,0x0E00,0x0800,0x0400,
	X	0x0040,0x0100,0x1000,0x0200,
	X	0x0040,0x0100,0x1000,0x0100,
	X	0x0020,0x0080,0x2000,0x0080,
	X	0x07E0,0x0060,0xC000,0x0040,
	X	0x1810,0x001F,0x0000,0x0020,
	X	0x100C,0x0000,0x0000,0x0010,
	X	0x0803,0xC000,0x0000,0x0008,
	X	0x0C00,0x2000,0x01C0,0x0008,
	X	0x0200,0x0000,0x0630,0x0070,
	X	0x0080,0x0000,0x0410,0x0F80,
	X	0x0038,0x0000,0x0188,0x1000,
	X	0x000E,0x0000,0x0248,0x1000,
	X	0x0001,0xC001,0x0024,0x1000,
	X	0x0002,0x1000,0xC024,0x1000,
	X	0x0001,0x0E00,0x23E8,0x1000,
	X	0x0001,0x01E1,0xE018,0x1000,
	X	0x0000,0x801F,0x23F0,0x1000,
	X	0x0000,0x7000,0x220C,0x1000,
	X	0x0000,0x0800,0x240B,0xC800,
	X	0x0000,0x0800,0x0408,0x2800,
	X	0x0000,0x0800,0x0710,0x1800,
	X	0x0000,0x0800,0x04A0,0x0000,
	X	0x0000,0x0400,0x04A0,0x0000,
	X	0x0000,0x0400,0x0460,0x0000,
	X	0x0000,0x0E00,0x1C20,0x0000,
	X	0x0000,0x1100,0x2200,0x0000,
	X	0x0000,0x1173,0xA380,0x0000,
	X	0x0000,0x118C,0x6260,0x0000,
	X	0x0000,0x0E8C,0x5C18,0x0000,
	X	0x0000,0x108C,0x400C,0x0000,
	X	0x0000,0x1073,0x8006,0x0000,
	X	0x0000,0x1000,0x0002,0x0000
SHAR_EOF
if test 1997 -ne "`wc -c < 'lisa_simpson.icon'`"
then
	echo shar: error transmitting "'lisa_simpson.icon'" '(should have been 1997 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'Makefile'" '(2212 characters)'
if test -f 'Makefile'
then
	echo shar: will not over-write existing file "'Makefile'"
else
sed 's/^	X//' << \SHAR_EOF > 'Makefile'
	X#
	X#   Makefile for building PhoneTool
	X#
	X#   This tool was designed for use in Sun's OpenWindows environment.  If
	X#   you are not installing this on a Sun running OpenWindows, there are
	X#   a few environment variables and directories you'll need to have.
	X#   The following are examples of how OpenWindows was set up on our
	X#   system:
	X#
	X#	setenv OPENWINHOME /usr/openwin
	X#	setenv HELPPATH $OPENWINHOME/lib/help
	X#
	X#   Set up the definitions below to match those on your system, and be
	X#   sure to have your HELPPATH environment variable set.
	X#
	X#   Then type 'make install' and all should be taken care of for you...
	X#
	X#   (Three icon files are included... you can rotate them in by changing
	X#   their names to phone.icon.  To prevent losing the current phone.icon,
	X#   move it to a temporary file first.)
	X#
	X#	___________________________________________________________
	X#	indi (Cathy Young)            Supercomputer Systems, Inc
	X#	uunet!ssi!young           2021 Las Positas Court, Suite 101
	X#	(415)373-8044                   Livermore, CA  94550
	X
	X
	X#
	X# Include files, libraries, and other macros.  Be sure to change 
	X# these to match your own system.
	X#
	X
	XHOME = /home/ugiashak/young
	XOPENWINHOME = /usr/openwin
	X
	XINFOFILE = phonetool.info
	XMANPAGE = phonetool.1
	XSTARTUPFILE = .phonerc
	X
	XINSTALLDIR = /usr/local/bin
	XINFODIR = $(OPENWINHOME)/lib/help
	XMANDIR = /usr/man/man1
	XHOMEDIR = $(HOME)
	X
	XXLIB = $(OPENWINHOME)/lib/libX11.a
	XXVIEWLIB = $(OPENWINHOME)/lib/libxview.a
	XXOLGXLIB = $(OPENWINHOME)/lib/libolgx.a
	XXINCLUDE = $(OPENWINHOME)/include
	XXVIEWINCLUDE = $(OPENWINHOME)/include/xview
	X
	X#
	X# Set CPP flags here to the things you really want.
	X#
	X
	XCPPFLAGS = \
	X	-I$(XVIEWINCLUDE)	\
	X	-I$(XINCLUDE)		\
	X	-g
	X
	XEXECUTABLE = phonetool
	X
	X#
	X# Source file definitions
	X#
	X
	XSOURCES = 				\
	X	phonetool_data.c		\
	X	phonetool_build.c		\
	X	phonetool.c
	X
	XOBJECTS =       $(SOURCES:.c=.o)
	X
	Xall: $(EXECUTABLE)
	X
	Xinstall: $(EXECUTABLE) $(INFOFILE) $(MANPAGE)
	X	install -m 7555 $(EXECUTABLE) $(INSTALLDIR)
	X	install -m 0644 $(INFOFILE) $(INFODIR)
	X	install -m 0644 $(MANPAGE) $(MANDIR)
	X	install -m 0644 $(STARTUPFILE) $(HOMEDIR)
	X
	Xclean:
	X	rm -f $(OBJECTS) $(EXECUTABLE)
	X
	X$(EXECUTABLE): $(OBJECTS)
	X	$(LINK.c) -o $@ $(OBJECTS) $(XVIEWLIB) $(XOLGXLIB) $(XLIB)
SHAR_EOF
if test 2212 -ne "`wc -c < 'Makefile'`"
then
	echo shar: error transmitting "'Makefile'" '(should have been 2212 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'.phonerc'" '(80 characters)'
if test -f '.phonerc'
then
	echo shar: will not over-write existing file "'.phonerc'"
else
sed 's/^	X//' << \SHAR_EOF > '.phonerc'
	X#
	X# .phonrc -Example file for use in the "login id's" menu
	X#
	X
	Xbrown
	Xjones
	Xsmith
SHAR_EOF
if test 80 -ne "`wc -c < '.phonerc'`"
then
	echo shar: error transmitting "'.phonerc'" '(should have been 80 characters)'
fi
fi # end of overwriting check
echo shar: done with directory "''"
cd ..
#	End of shell archive
exit 0




More information about the Comp.sys.sun mailing list