|
|
BSD 4.3reno
#ifndef lint
static char *rcsid = "$Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/others/quipu/uips/pod/pod.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $";
#endif
/*
* $Header: /var/lib/cvsd/repos/CSRG/43BSDReno/contrib/isode-beta/others/quipu/uips/pod/pod.c,v 1.1.1.1 2018/04/24 16:12:56 root Exp $
*/
/*
* $Log: pod.c,v $
* Revision 1.1.1.1 2018/04/24 16:12:56 root
* BSD 4.3reno
*
* Revision 7.0 90/06/12 13:15:50 mrose
* *** empty log message ***
*
* Revision 1.5 90/04/26 10:21:06 emsrdsm
* *** empty log message ***
*
* Revision 1.4 90/04/25 13:47:09 emsrdsm
* i) lint'ed
*
* Revision 1.3 90/04/20 10:28:00 emsrdsm
* (i) fixed form bug
*
* Revision 1.2 90/04/18 18:48:24 emsrdsm
* i) added logging
*
* Revision 1.1 90/04/10 16:44:42 emsrdsm
* Initial revision
*
*
*/
#include "bitmaps/Search"
#include "bitmaps/SearchPress"
#include "bitmaps/List"
#include "bitmaps/ListPress"
#include "bitmaps/History"
#include "bitmaps/HistoryPress"
#include "bitmaps/Close"
#include "bitmaps/ClosePress"
#include "bitmaps/Quit"
#include "bitmaps/QuitPress"
#include "bitmaps/Help"
#include "bitmaps/HelpPress"
#include "bitmaps/Cancel"
#include "bitmaps/Okay"
#include "bitmaps/OkayPress"
#include "bitmaps/About"
#include "bitmaps/AboutPress"
#include <X11/bitmaps/gray>
#include "pod.h"
#include "defs.h"
char help_string[1000];
extern dsEnqError srch_start(), rd_start(), list_start();
extern char base_path[];
extern char friendly_base_path[];
extern char mvalue[];
extern unsigned int filt_num, typeindx;
extern int *av_typeindx;
extern char *filtvalue[];
extern char *filttype[];
extern char dua_help_dir[];
extern int NUMLINES;
extern int px, py, maxx;
extern Pixmap photo_pixmap;
Widget PhotoWindow;
extern int sizelimit;
char selection[1024];
char curr_help[1024];
static Widget sel_widget = 0;
static Widget popup = 0, error_popup = 0;
static Display *dpy;
static Screen *screen;
static int scr;
mode listmode = many;
extern D_seq showseq, dnseq, backseq;
extern int entry_number, back_buf_num, dn_number;
int element_number = 0;
int rdn_number = 0;
int help_up = 0;
static void Quit(), QuitFromHelp(), InsertHelp();
static void List(), ListDestroy(), Close();
static void AddNewList(), ListSelect(), Move(), DMove(), HMove();
static void StartSearch(), Search(), SetType(), Read(), Help();
static void TSearch(), ClearSearchArea(), killSearch(), killError();
static void create_new_list(), create_genform();
static void create_text_display(), create_search_popup();
static void create_history_popup(), popupHistory(), popdownHistory();
static void ChangeHelp();
static void buttonPress();
void CreateBackgroundPixmap();
static Widget create_type_menu();
Widget toplevel, outer;
static XtActionsRec actionsTable[] = {
{"TSearch", (XtActionProc) TSearch},
{"ClearSearchArea", (XtActionProc) ClearSearchArea},
};
static char defaultTranslations[] =
"<Key>Return: TSearch() \n\
Ctrl<Key>M: TSearch() \n\
Ctrl<Key>O: TSearch() \n\
Ctrl<Key>J: TSearch() \n\
Ctrl<Key>U: ClearSearchArea()";
static XtActionsRec buttonActionsTable[] = {
{"ChangeHelp", (XtActionProc) ChangeHelp},
{"buttonPress", (XtActionProc) buttonPress},
};
init_widgets ()
{
int count;
Arg args[10];
count = 0;
outer = XtCreateManagedWidget("outer", formWidgetClass, toplevel,
args, count);
dpy = XtDisplay(toplevel);
scr = DefaultScreen(dpy);
screen = XtScreen(toplevel);
XtAddActions(buttonActionsTable, XtNumber(buttonActionsTable));
curr_help[0] = '\0';
create_genform(outer);
create_dnwindow(outer);
create_text_display(outer);
create_history_popup(backseq, "");
create_help_popup();
create_mess_popup();
create_error_popup();
}
Loop()
{
Widget PosWindow;
XtRealizeWidget(toplevel);
PosWindow = XtNameToWidget(outer,
"PosForm.PosScrolledWindow.PosWindow");
print_search_area(PosWindow);
if (DefaultDepthOfScreen(screen) == 1) {
CreateBackgroundPixmap(XtNameToWidget(outer, "ButtonForm"),
gray_bits, gray_width, gray_height);
CreateBackgroundPixmap(outer, gray_bits, gray_width, gray_height);
}
CreateBackgroundPixmap(XtNameToWidget(outer, "ButtonForm.searchButton"),
Search_bits, Search_width, Search_height);
CreateBackgroundPixmap(XtNameToWidget(outer, "ButtonForm.listButton"),
List_bits, List_width, List_height);
CreateBackgroundPixmap(XtNameToWidget(outer, "ButtonForm.historyButton"),
History_bits, History_width, History_height);
CreateBackgroundPixmap(XtNameToWidget(outer, "ButtonForm.quitButton"),
Quit_bits, Quit_width, Quit_height);
CreateBackgroundPixmap(XtNameToWidget(outer, "ButtonForm.helpButton"),
Help_bits, Help_width, Help_height);
(void) rd_start();
goto_addr();
SetType((Widget) 0, (XtPointer) typeindx, (XtPointer) 0);
XtMainLoop();
}
static void
create_text_display(parent)
Widget parent;
{
Widget TextForm, TextScrolledWindow;
Arg args[15];
int count = 0;
count = 0;
TextScrolledWindow = XtCreateManagedWidget("TextScrolledWindow",
viewportWidgetClass,
parent, args, count);
count = 0;
XtSetArg(args[count], XtNborderWidth, 0); count++;
TextForm = XtCreateManagedWidget("TextForm",
formWidgetClass,
TextScrolledWindow, args, count);
count = 0;
XtSetArg(args[count], XtNresizable, TRUE); count++;
(void) XtCreateManagedWidget("TextWindow",
asciiTextWidgetClass,
TextForm, args, count);
}
make_photo_widget()
{
int count;
Arg args[10];
Widget TextForm, TextWindow;
TextForm = XtNameToWidget(outer,
"TextScrolledWindow.TextForm");
TextWindow = XtNameToWidget(outer,
"TextScrolledWindow.TextForm.TextWindow");
count = 0;
XtSetArg(args[count], XtNresizable, TRUE); count++;
XtSetArg(args[count], XtNwidth, (Dimension) maxx); count++;
XtSetArg(args[count], XtNheight, (Dimension) py); count++;
XtSetArg(args[count], XtNlabel, ""); count++;
XtSetArg(args[count], XtNfromVert, TextWindow); count++;
PhotoWindow = XtCreateManagedWidget("PhotoWindow",
labelWidgetClass,
TextForm, args, count);
}
kill_photo()
{
if (PhotoWindow) {
XtDestroyWidget(PhotoWindow);
PhotoWindow = 0;
}
}
print_photo()
{
int count;
Arg args[10];
count = 0;
if (photo_pixmap)
XtSetArg(args[count], XtNbackgroundPixmap, photo_pixmap); count++;
XtSetArg(args[count], XtNresizable, FALSE); count++;
XtSetValues(PhotoWindow, args, count);
}
static void
create_new_list(list_seq, top_mess, lower_mess)
D_seq list_seq;
char *top_mess, *lower_mess;
{
int count = 0;
char name[1024];
Widget shell, swindow, ListForm, ListWindow, list_element, closeButton;
Arg args[15];
if (listmode == one)
if ((shell = XtNameToWidget(toplevel, "ListOutput")) != NULL) {
ListWindow = XtNameToWidget(shell,
"ListForm.ListScrolledWindow.ListWindow");
(void) strcpy(name, "X");
while ((list_element = XtNameToWidget(ListWindow, name)) != NULL) {
XtDestroyWidget(list_element);
(void) strcat(name, "X");
}
XtRemoveCallback(ListWindow, XtNdestroyCallback,
ListDestroy, (XtPointer) showseq);
free_seq(showseq);
XtAddCallback(ListWindow, XtNdestroyCallback,
ListDestroy, (XtPointer) list_seq);
AddNewList(XtNameToWidget(shell,
"ListForm.ListScrolledWindow.ListWindow"),
list_seq);
count = 0;
XtSetArg(args[count], XtNlabel, top_mess); count++;
XtSetValues(XtNameToWidget(shell, "ListForm.ListTitle"),
args, count);
count = 0;
XtSetArg(args[count], XtNlabel, lower_mess); count++;
XtSetValues(XtNameToWidget(shell, "ListForm.ListMessage"),
args, count);
return;
}
count = 0;
shell = XtCreatePopupShell("ListOutput", topLevelShellWidgetClass,
toplevel, args, 0);
count = 0;
ListForm = XtCreateManagedWidget("ListForm", formWidgetClass,
shell, args, count);
count = 0;
XtSetArg(args[count], XtNheight, Close_height); count++;
XtSetArg(args[count], XtNwidth, Close_width); count++;
closeButton = XtCreateManagedWidget("closeButton",
commandWidgetClass,
ListForm, args, count);
XtAddCallback(closeButton, XtNcallback,
(XtCallbackProc) Close, (XtPointer) shell);
count = 0;
XtSetValues(closeButton, args, count);
count = 0;
XtSetArg(args[count], XtNlabel, top_mess); count++;
(void) XtCreateManagedWidget("ListTitle", labelWidgetClass,
ListForm, args, count);
count = 0;
swindow = XtCreateManagedWidget("ListScrolledWindow", viewportWidgetClass,
ListForm, args, count);
count = 0;
ListWindow = XtCreateManagedWidget("ListWindow", formWidgetClass,
swindow, args, count);
count = 0;
XtSetArg(args[count], XtNlabel, lower_mess); count++;
(void) XtCreateManagedWidget("ListMessage", labelWidgetClass,
ListForm, args, count);
XtAddCallback(ListWindow, XtNdestroyCallback,
ListDestroy, (XtPointer) list_seq);
AddNewList(ListWindow, list_seq);
XtRealizeWidget(shell);
XtPopup(shell, XtGrabNone);
CreateBackgroundPixmap(closeButton, Close_bits, Close_width, Close_height);
if (DefaultDepthOfScreen(screen) == 1)
CreateBackgroundPixmap(ListForm, gray_bits, gray_width, gray_height);
}
create_dnwindow(parent)
Widget parent;
{
int count;
Widget PosForm, swindow;
Arg args[20];
count = 0;
PosForm = XtCreateManagedWidget("PosForm", formWidgetClass,
parent, args, count);
count = 0;
(void) XtCreateManagedWidget("PosTitle", labelWidgetClass, PosForm,
args, count);
count = 0;
swindow = XtCreateManagedWidget("PosScrolledWindow", viewportWidgetClass,
PosForm, args, count);
count = 0;
(void) XtCreateManagedWidget("PosWindow", formWidgetClass,
swindow, args, count);
}
add_to_history(rdn, seqnum)
String rdn;
int seqnum;
{
int count, n;
char name[1024];
char *prev;
Widget history_popup, history_display, rdn_window, scrolwin;
Dimension width, rwidth;
Arg args[20];
history_popup = XtNameToWidget(toplevel, "Session History");
history_display = XtNameToWidget(history_popup,
"HistoryForm.ListScrolledWindow.ListWindow");
scrolwin = (Widget) XtParent(history_display);
count = 0;
XtSetArg(args[count], XtNwidth, &width); count++;
XtGetValues(scrolwin, args, count);
width -= 14;
for (n = 0; n < seqnum; n++) {
(void) strcpy((name+n), "X");
}
count = 0;
XtSetArg(args[count], XtNlabel, (*rdn? rdn: "The World")); count++;
XtSetArg(args[count], XtNresizable, TRUE); count++;
XtSetArg(args[count], XtNborderWidth, 0); count++;
XtSetArg(args[count], XtNborderColor, WhitePixelOfScreen(screen)); count++;
XtSetArg(args[count], XtNhighlightThickness, 1); count++;
XtSetArg(args[count], XtNjustify, XtJustifyLeft); count++;
if (strlen(name) > 1) {
prev = (char *) (name + 1);
XtSetArg(args[count], XtNfromVert, XtNameToWidget(history_display,
prev));
count++;
}
rdn_window = XtCreateManagedWidget((String) name, commandWidgetClass,
history_display, args, count);
XtAddCallback(rdn_window, XtNcallback, ListSelect,
(XtPointer) get_from_seq(seqnum, backseq));
count = 0;
XtSetArg(args[count], XtNwidth, &rwidth); count++;
XtGetValues(rdn_window, args, count); count++;
count = 0;
XtSetArg(args[count], XtNright, XtChainRight); count++;
XtSetArg(args[count], XtNleft, XtChainLeft); count++;
if (rwidth < width)
XtSetArg(args[count], XtNwidth, width); count++;
XtSetValues(rdn_window, args, count);
}
print_search_area(PosWindow)
Widget PosWindow;
{
char *str, *end;
char save;
int count;
char array[1024];
Dimension width;
Arg args[20];
Widget rdn_window, last_rdn = 0;
count = 0;
XtSetArg(args[count], XtNwidth, &width); count++;
XtGetValues(PosWindow, args, count);
width -= 24;
count = 0;
XtSetArg(args[count], XtNlabel, ("The World")); count++;
XtSetArg(args[count], XtNborderWidth, 0); count++;
XtSetArg(args[count], XtNborderColor, WhitePixelOfScreen(screen)); count++;
XtSetArg(args[count], XtNhighlightThickness, 1); count++;
XtSetArg(args[count], XtNjustify, XtJustifyLeft); count++;
XtSetArg(args[count], XtNwidth, width); count++;
rdn_window = XtCreateManagedWidget("x", commandWidgetClass,
PosWindow, args, count);
XtAddCallback(rdn_window, XtNcallback, DMove, (XtPointer) 0);
last_rdn = rdn_window;
rdn_number = 1;
(void) strcpy (array, "xx");
make_friendly(friendly_base_path, base_path);
end = friendly_base_path;
while (*end != 0) {
str = end;
do {
end++;
} while (*end != ',' && *end != '\0');
save = *end;
*end = '\0';
count = 0;
XtSetArg(args[count], XtNlabel, (*str? str: "ahem")); count++;
XtSetArg(args[count], XtNborderWidth, 0); count++;
XtSetArg(args[count], XtNborderColor, WhitePixelOfScreen(screen)); count++;
XtSetArg(args[count], XtNhighlightThickness, 1); count++;
XtSetArg(args[count], XtNjustify, XtJustifyLeft); count++;
XtSetArg(args[count], XtNwidth, width); count++;
XtSetArg(args[count], XtNfromVert, last_rdn); count++;
rdn_window = XtCreateManagedWidget((String) array, commandWidgetClass,
PosWindow, args, count);
last_rdn = rdn_window;
XtAddCallback(rdn_window, XtNcallback, DMove, (XtPointer) rdn_number);
(void) strcat(array, "x");
rdn_number++;
*end = save;
if (*end == ',') end++;
}
}
static void
create_search_popup(parent)
Widget parent;
{
Dimension height;
Widget form, SearchValueForm, okButton,
SearchValueDialog, shell, cancelButton;
XtTranslations trans_table;
Arg args[20];
XFontStruct *font;
char string[1024];
int count = 0;
count = 0;
shell = XtCreatePopupShell("Search", transientShellWidgetClass,
parent, args, 0);
count = 0;
form = XtCreateManagedWidget("SearchForm", formWidgetClass,
shell, args, count);
count = 0;
XtSetArg(args[count], XtNheight, Okay_height); count++;
XtSetArg(args[count], XtNwidth, Okay_width); count++;
okButton = XtCreateManagedWidget("okButton", commandWidgetClass,
form, args, count);
count = 0;
XtSetValues(okButton, args, count);
XtAddCallback(okButton, XtNcallback,
(XtCallbackProc) StartSearch, (XtPointer) 0);
count = 0;
XtSetArg(args[count], XtNheight, Cancel_height); count++;
XtSetArg(args[count], XtNwidth, Cancel_width); count++;
cancelButton = XtCreateManagedWidget("cancelButton", commandWidgetClass,
form, args, count);
XtAddCallback(cancelButton, XtNcallback,
(XtCallbackProc) killSearch, (XtPointer) 0);
SearchValueForm = XtCreateManagedWidget("SearchValueForm", formWidgetClass,
form, args, count);
count = 0;
XtSetArg(args[count], XtNlabel, "Searching For "); count++;
(void) XtCreateManagedWidget("SearchLabel", labelWidgetClass,
SearchValueForm, args, count);
count = 0;
XtSetArg(args[count], XtNeditType, XawtextEdit); count++;
SearchValueDialog = XtCreateManagedWidget("SearchValueDialog",
asciiTextWidgetClass,
SearchValueForm, args, count);
count = 0;
XtSetArg(args[count], XtNfont, &font); count++;
XtGetValues(SearchValueDialog, args, count);
height = FONTHEIGHT(font);
height += 8;
count = 0;
XtSetArg(args[count], XtNheight, height); count++;
XtSetValues(SearchValueDialog, args, count);
XtAddActions(actionsTable, XtNumber(actionsTable));
trans_table = XtParseTranslationTable(defaultTranslations);
XtOverrideTranslations(SearchValueDialog, trans_table);
count = 0;
XtSetArg(args[count], XtNlabel, "Change Type"); count++;
(void) XtCreateManagedWidget("TypeMenuButton", menuButtonWidgetClass,
form, args, count);
count = 0;
(void) strcpy(string, "Current Type - ");
(void) strcat(string, filttype[typeindx]);
XtSetArg(args[count], XtNlabel, (String) string); count++;
(void) XtCreateManagedWidget("SearchTypeLabel", labelWidgetClass,
form, args, count);
XtRealizeWidget(shell);
CreateBackgroundPixmap(okButton, Okay_bits, Okay_width, Okay_height);
CreateBackgroundPixmap(cancelButton, Cancel_bits,
Cancel_width, Cancel_height);
if (DefaultDepthOfScreen(screen) == 1) {
CreateBackgroundPixmap(SearchValueForm, gray_bits,
gray_width, gray_height);
CreateBackgroundPixmap(form, gray_bits,
gray_width, gray_height);
}
}
/*ARGSUSED*/
static void
StartSearch(w, clientdata, calldata)
Widget w;
XtPointer clientdata, calldata;
{
Arg args[15];
int count, indx;
Widget text;
char entry[1024], string[1024], mess[1024];
char *value;
dsEnqError status;
message("Please Stand By........");
text = XtNameToWidget(XtNameToWidget(outer, "ButtonForm.searchButton"),
"Search.SearchForm.SearchValueForm.SearchValueDialog");
count = 0;
XtSetArg(args[count], XtNstring, &value); count++;
XtGetValues(text, args, count);
(void) strcpy(mvalue, value);
if (mvalue[0] == '\0') {
kill_message();
dir_error("You have not specified a search value!\nClick on this window to continue");
return;
}
killSearch();
refresh();
status = srch_start();
switch(status) {
case timelimit:
entry_number = 0;
dir_error("Time limit exceeded.\nClick on this window to continue");
break;
case nothingfound:
dnseq = 0;
entry_number = 0;
dir_error("Nothing found!\nClick on this window to continue");
break;
case localdsaerror:
dnseq = 0;
entry_number = 0;
dir_error("Problem with local directory server.\nClick on this window to continue");
break;
case remotedsaerror:
dnseq = 0;
entry_number = 0;
dir_error("Requested data unavailable at present.\n Click on this window to continue");
break;
case duaerror:
dnseq = 0;
entry_number = 0;
dir_error("Internal error. Sorry!\nClick on this window to continue");
break;
case security:
dnseq = 0;
entry_number = 0;
dir_error("You do not have the access privileges required\nto make this request!\nClick on this window to continue");
break;
case namerror:
dnseq = 0;
entry_number = 0;
dir_error("Invalid directory position!\nClick on this window to continue");
break;
case attributerror:
dnseq = 0;
entry_number = 0;
dir_error("Faulty data found in database!\nClick on this window to continue");
break;
case Okay:
if (entry_number == 1) {
(void) strcpy(entry, (get_from_seq(1, dnseq)));
if (!isleaf(entry)) {
(void) strcpy(base_path, entry);
make_friendly(friendly_base_path, base_path);
set_search_area(XtNameToWidget
(outer, "PosForm.PosScrolledWindow.PosWindow"));
goto_addr();
SetType((Widget) 0, (XtPointer) typeindx, (XtPointer) 0);
kill_photo();
refresh();
(void) rd_start();
} else {
(void) strcpy(string, base_path);
(void) strcpy(base_path, entry);
make_friendly(friendly_base_path, base_path);
kill_photo();
refresh();
(void) rd_start();
(void) strcpy(base_path, string);
make_friendly(friendly_base_path, base_path);
}
clear_dnseq();
entry_number = 0;
} else if (entry_number > 0) {
(void) strcpy(mess, "Results of search under ");
if (strlen(base_path) > 3) {
indx = strlen(friendly_base_path);
while (friendly_base_path[indx] != ',' && indx != 0) indx--;
(void) strcat(mess, (char *) (friendly_base_path+indx));
} else {
(void) strcat(mess, "The World");
indx = 0;
}
create_new_list(dnseq, mess, "");
if (listmode == one) showseq = dnseq;
dnseq = 0;
break;
case listsizelimit:
(void) strcpy(mess, "Results of search under ");
if (strlen(base_path) > 3) {
indx = strlen(friendly_base_path);
while (friendly_base_path[indx] != ',' && indx != 0) indx--;
(void) strcat(mess, (char *) (friendly_base_path+indx));
} else {
(void) strcat(mess, "The World");
indx = 0;
}
(void) sprintf(string,
"List size limit exceeded. Only %d items displayed.",
sizelimit);
create_new_list(dnseq,
mess,
string);
if (listmode == one) showseq = dnseq;
dnseq = 0;
}
}
kill_message();
}
static Widget
create_type_menu(parent)
Widget parent;
{
Widget menu_mgr, button;
Arg args[15];
int count = 0, n;
menu_mgr = XtCreatePopupShell("menu", simpleMenuWidgetClass,
parent, args, 0 );
n = 0;
while (av_typeindx[n] != -1) {
count = 0;
XtSetArg(args[count], XtNlabel, (String) filttype[av_typeindx[n]]);count++;
button = XtCreateManagedWidget((String) filttype[av_typeindx[n]],
smeBSBObjectClass,
menu_mgr, args, count);
XtAddCallback(button, XtNcallback, SetType, (XtPointer) av_typeindx[n]);
n++;
}
return menu_mgr;
}
/*ARGSUSED*/
static void
SetType(w, indx, calldata)
Widget w;
XtPointer indx, calldata;
{
Widget type_label, menu, searchButton, menuButton;
int count = 0;
Arg args[10];
char label[1024];
searchButton = XtNameToWidget(outer,"ButtonForm.searchButton");
menuButton = XtNameToWidget(searchButton,
"Search.SearchForm.TypeMenuButton");
if ((int) indx < 0 || (int) indx >= (int) filt_num) return;
if ((menu = XtNameToWidget(searchButton,
"Search.SearchForm.TypeMenuButton.menu")))
XtDestroyWidget(menu);
(void) create_type_menu(menuButton);
type_label = XtNameToWidget(searchButton,
"Search.SearchForm.SearchTypeLabel");
(void) strcpy(label, "Current Type - ");
(void) strcat(label, filttype[(int) indx]);
count = 0;
XtSetArg(args[count], XtNlabel, label); count++;
XtSetValues(type_label, args, count);
typeindx = (int) indx;
}
static void
create_genform(parent)
Widget parent;
{
Widget form, quitButton, helpButton, searchButton, listButton, historyButton;
Arg args[10];
int count;
count = 0;
form = XtCreateManagedWidget("ButtonForm", formWidgetClass, parent,
args, count);
count = 0;
XtSetArg(args[count], XtNheight, Quit_height); count++;
XtSetArg(args[count], XtNwidth, Quit_width); count++;
quitButton = XtCreateManagedWidget("quitButton",
commandWidgetClass,
form, args, count);
XtAddCallback(quitButton, XtNcallback,
(XtCallbackProc) Quit, (XtPointer) 0);
count = 0;
XtSetArg(args[count], XtNheight, Help_height); count++;
XtSetArg(args[count], XtNwidth, Help_width); count++;
helpButton = XtCreateManagedWidget("helpButton",
commandWidgetClass,
form, args, count);
XtAddCallback(helpButton, XtNcallback,
(XtCallbackProc) Help, (XtPointer) 0);
count = 0;
XtSetArg(args[count], XtNheight, Search_height); count++;
XtSetArg(args[count], XtNwidth, Search_width); count++;
searchButton = XtCreateManagedWidget("searchButton",
commandWidgetClass,
form, args, count);
XtAddCallback(searchButton, XtNcallback,
(XtCallbackProc) Search, (XtPointer) 0);
create_search_popup(searchButton);
count = 0;
XtSetArg(args[count], XtNheight, List_height); count++;
XtSetArg(args[count], XtNwidth, List_width); count++;
listButton = XtCreateManagedWidget("listButton",
commandWidgetClass,
form, args, count);
XtAddCallback(listButton, XtNcallback,
(XtCallbackProc) List, (XtPointer) 0);
count = 0;
XtSetArg(args[count], XtNheight, History_height); count++;
XtSetArg(args[count], XtNwidth, History_width); count++;
historyButton = XtCreateManagedWidget("historyButton",
commandWidgetClass,
form, args, count);
XtAddCallback(historyButton, XtNcallback,
(XtCallbackProc) popupHistory, (XtPointer) 0);
}
cleartext()
{
Arg args[15];
Widget text;
int count = 0;
text = XtNameToWidget(outer,
"TextScrolledWindow.TextForm.TextWindow");
count = 0;
XtSetArg(args[count], XtNstring, "\0"); count++;
XtSetArg(args[count], XtNwidth, (Dimension) 5); count++;
XtSetArg(args[count], XtNheight, (Dimension) 5); count++;
XtSetValues(text, args, count);
}
static void
AddNewList(list_widget, list_seq)
Widget list_widget;
D_seq list_seq;
{
Arg args[15];
Widget element, scrolwin;
int count = 0, n;
char name[1024], friendly_rdn[1024];
char *prev, *string;
Dimension width, rwidth;
scrolwin = (Widget) XtParent(list_widget);
count = 0;
XtSetArg(args[count], XtNwidth, &width); count++;
XtGetValues(scrolwin, args, count);
width -= 15;
element_number = entry_number;
for (n = 0; n < element_number; n++) {
(void) strcpy((name+n), "X");
string = get_from_seq(n+1, list_seq);
make_friendly_rdn(friendly_rdn, string, base_path);
count = 0;
XtSetArg(args[count], XtNlabel, (*friendly_rdn?
friendly_rdn: "The World"));count++;
XtSetArg(args[count], XtNborderWidth, 0);count++;
XtSetArg(args[count], XtNborderColor, WhitePixelOfScreen(screen)); count++;
XtSetArg(args[count], XtNhighlightThickness, 1); count++;
XtSetArg(args[count], XtNjustify, XtJustifyLeft); count++;
if (strlen(name) > 1) {
prev = (char *) name + 1;
XtSetArg(args[count], XtNfromVert, XtNameToWidget(list_widget,
prev));
count++;
}
element = XtCreateManagedWidget((String) name,
commandWidgetClass,
list_widget, args, count);
XtAddCallback(element, XtNcallback, ListSelect, (XtPointer) string);
count = 0;
XtSetArg(args[count], XtNwidth, &rwidth); count++;
XtGetValues(element, args, count);
if (rwidth < width) {
count = 0;
XtSetArg(args[count], XtNwidth, width); count++;
XtSetValues(element, args, count);
}
}
}
void
xprint(str)
String str;
{
Arg args[15];
Widget text;
char *string, *sptr;
char buffer[4024];
int count;
Dimension height, addheight, width, addwidth;
int lines, maxchars, chars, char_width;
XFontStruct *font;
text = XtNameToWidget(outer,
"TextScrolledWindow.TextForm.TextWindow");
lines = maxchars = chars = 0;
count = 0;
XtSetArg(args[count], XtNheight, &height); count++;
XtSetArg(args[count], XtNwidth, &width); count++;
XtSetArg(args[count], XtNfont, &font); count++;
XtSetArg(args[count], XtNstring, &string); count++;
XtGetValues(text, args, count);
/* (void) strcpy(buffer, str);*/
sptr = str;
while (*sptr != '\0') {
switch (*sptr) {
case '\n':
lines++;
if (chars > maxchars) maxchars = chars;
chars = 0;
break;
default:
chars++;
break;
}
sptr++;
}
char_width = FONTWIDTH(font);
addwidth = char_width * maxchars;
width = addwidth > width? addwidth: width;
addheight = FONTHEIGHT(font);
addheight *= lines;
height += addheight;
if (*string == '\0')
(void) strcpy(buffer, str);
else
(void) sprintf(buffer, "%s%s", string, str);
count = 0;
XtSetArg(args[count], XtNwidth, width); count++;
XtSetArg(args[count], XtNheight, height); count++;
XtSetArg(args[count], XtNstring, buffer); count++;
XtSetValues(text, args, count);
}
hold_text()
{
Widget text, form;
text = XtNameToWidget(outer,
"TextScrolledWindow.TextForm.TextWindow");
form = XtNameToWidget(outer,
"TextScrolledWindow.TextForm");
XawFormDoLayout(form, FALSE);
XawTextDisableRedisplay(text);
refresh();
}
restart_text()
{
Widget text, form;
text = XtNameToWidget(outer,
"TextScrolledWindow.TextForm.TextWindow");
form = XtNameToWidget(outer,
"TextScrolledWindow.TextForm");
XawTextEnableRedisplay(text);
if (PhotoWindow) {
XtRealizeWidget(PhotoWindow);
print_photo();
}
XawFormDoLayout(form, TRUE);
refresh();
}
refresh()
{
XFlush(dpy);
}
/*ARGSUSED*/
static void
Quit(widget, closure, callData)
Widget widget;
XtPointer closure, callData;
{
XtDestroyWidget(toplevel);
quit(0);
}
/*ARGSUSED*/
static void
Search(w, data, calldata)
Widget w;
XtPointer data, calldata;
{
Widget search_popup;
int win_x, win_y, root_x, root_y;
Window a, b;
Cardinal buttons;
search_popup = XtNameToWidget(XtNameToWidget(outer,
"ButtonForm.searchButton"),
"Search");
XQueryPointer(dpy, XtWindow(outer), &a, &b,
&root_x, &root_y, &win_x, &win_y, &buttons);
XtMoveWidget(search_popup, root_x, root_y);
XtPopup(search_popup, XtGrabNone);
XFlush(dpy);
}
static void
killSearch()
{
Widget search_popup;
search_popup = XtNameToWidget(XtNameToWidget(outer,
"ButtonForm.searchButton"),
"Search");
XtPopdown(search_popup);
}
/*ARGSUSED*/
static void
TSearch(w, event, params, num_params)
Widget w;
XEvent *event;
String *params;
Cardinal *num_params;
{
StartSearch((Widget) 0, (XtPointer) 0, (XtPointer) 0);
}
/*ARGSUSED*/
static void
ClearSearchArea(w, event, params, num_params)
Widget w;
XEvent *event;
String *params;
Cardinal *num_params;
{
Arg args[2];
int count= 0;
XtSetArg(args[count], XtNstring, "\0"); count++;
XtSetValues(w, args, count);
}
/*ARGSUSED*/
static void
Read(w, data, calldata)
Widget w;
XtPointer data, calldata;
{
cleartext();
kill_photo();
refresh();
(void) rd_start();
}
set_search_area(search_area)
Widget search_area;
{
WidgetList wlist;
char name[1024];
int count = 0, n;
wlist = (WidgetList) XtMalloc((rdn_number + 1) * sizeof(Widget));
for (n = 0; n < rdn_number; n++) {
(void) strcpy((name+n), "x");
wlist[count] = XtNameToWidget(search_area, name);
if (wlist[count]) count++;
}
XtUnmanageChildren(wlist, count);
for (n = 0; n < count; n++)
XtDestroyWidget(wlist[n]);
XtFree(wlist);
print_search_area(search_area);
}
/*ARGSUSED*/
static void
List(w, clientdata, calldata)
Widget w;
XtPointer clientdata, calldata;
{
int indx;
char string[1024], mess[1024];
dsEnqError status;
message("Please Stand By......");
refresh();
status = list_start();
kill_message();
switch(status) {
case timelimit:
entry_number = 0;
dir_error("Time limit exceeded.\nClick on this window to continue");
break;
case listsizelimit:
(void) strcpy(mess, "Results of list under ");
if (strlen(base_path) > 3) {
indx = strlen(friendly_base_path);
while (friendly_base_path[indx] != ',' && indx != 0) indx--;
} else {
(void) strcat(mess, "The World");
indx = strlen(friendly_base_path) - 1;
}
(void) strcat(mess, (char *) (friendly_base_path+indx));
(void) sprintf (string,
"List size limit exceeded. Only %d items displayed.",
sizelimit);
create_new_list(dnseq,
mess,
string);
if (listmode == one) showseq = dnseq;
dnseq = 0;
break;
case nothingfound:
dnseq = 0;
entry_number = 0;
dir_error("Nothing found!\nClick on this window to continue");
break;
case localdsaerror:
dnseq = 0;
entry_number = 0;
dir_error("Problem with local directory server.\nClick on this window to continue");
break;
case remotedsaerror:
dnseq = 0;
entry_number = 0;
dir_error("Requested data unavailable at present.\n Click on this window to continue");
break;
case duaerror:
dnseq = 0;
entry_number = 0;
dir_error("Internal error. Sorry!\nClick on this window to continue");
break;
case security:
dnseq = 0;
entry_number = 0;
dir_error("You do not have the access privileges required\nto make this request!\nClick on this window to continue");
break;
case namerror:
dnseq = 0;
entry_number = 0;
dir_error("Invalid directory position!\nClick on this window to continue");
break;
case attributerror:
dnseq = 0;
entry_number = 0;
dir_error("Faulty data found in database!\nClick on this window to continue");
break;
case Okay:
(void) strcpy(mess, "Results of list under ");
if (strlen(base_path) > 3) {
indx = strlen(friendly_base_path);
while (friendly_base_path[indx] != ',' && indx != 0) indx--;
(void) strcat(mess, (char *) (friendly_base_path+indx));
} else {
(void) strcat(mess, "The World");
indx = 0;
}
create_new_list(dnseq, mess, "");
if (listmode == one) showseq = dnseq;
dnseq = 0;
break;
}
}
/*ARGSUSED*/
static void
ListSelect(w, object, calldata)
Widget w;
XtPointer object, calldata;
{
char *string, parent[1024];
string = (char *) object;
(void) strcpy(parent, base_path);
(void) strcpy(base_path, string);
make_friendly(friendly_base_path, base_path);
Read((Widget) 0, (XtPointer) 0, (XtPointer) 0);
(void) strcpy(base_path, parent);
make_friendly(friendly_base_path, base_path);
if (!isleaf(string)) {
(void) strcpy(selection, string);
sel_widget = w;
Move((Widget) 0, (XtPointer) string, (XtPointer) 0);
}
}
/*ARGSUSED*/
static void
DMove(w, rdnlevel, calldata)
Widget w;
XtPointer rdnlevel, calldata;
{
Widget search_area;
char *end;
search_area = XtNameToWidget(outer,
"PosForm.PosScrolledWindow.PosWindow");
end = base_path;
if (rdnlevel == 0) *base_path = '\0';
else if (rdn_number > (int) (rdnlevel+1)) {
while (rdnlevel) {
while (*end != '@') end++;
if (*end == '@') end++;
rdnlevel--;
}
*--end = '\0';
}
goto_addr();
set_search_area(search_area);
SetType((Widget) 0, (XtPointer) typeindx, (XtPointer) 0);
kill_photo();
refresh();
(void) rd_start();
}
/*ARGSUSED*/
static void
Move(w, clientdata, calldata)
Widget w;
XtPointer clientdata, calldata;
{
Widget search_area;
char *string;
if (!sel_widget) return;
search_area = XtNameToWidget(outer,
"PosForm.PosScrolledWindow.PosWindow");
string = (char *) clientdata;
(void) strcpy(base_path, string);
make_friendly(friendly_base_path, base_path);
set_search_area(search_area);
goto_addr();
SetType((Widget) 0, (XtPointer) typeindx, (XtPointer) 0);
}
create_mess_popup()
{
/* To please lint*/
Arg args[1];
popup = XtCreatePopupShell("OK. Chugging along.",
transientShellWidgetClass,
toplevel, args, 0);
(void) XtCreateManagedWidget("standby", labelWidgetClass,
popup, args, 0);
}
create_error_popup()
{
Widget text;
/* To please lint*/
Arg args[1];
error_popup = XtCreatePopupShell("<Directory Error>",
transientShellWidgetClass,
toplevel, args, 0);
text = XtCreateManagedWidget("text", commandWidgetClass,
error_popup, args, 0);
XtAddCallback(text, XtNcallback, killError, (XtPointer) 0);
}
dir_error(mess)
String mess;
{
Arg args[10];
int count;
Widget text;
int win_x, win_y, root_x, root_y;
Window a, b;
Cardinal buttons;
XQueryPointer(dpy, XtWindow(outer), &a, &b,
&root_x, &root_y, &win_x, &win_y, &buttons);
text = XtNameToWidget(error_popup, "text");
XtMoveWidget(error_popup, root_x, root_y);
count = 0;
XtSetArg(args[count], XtNborderWidth, 1); count++;
XtSetArg(args[count], XtNlabel, mess); count++;
XtSetValues(text, args, count);
XtPopup(error_popup, XtGrabNone);
}
/*ARGSUSED*/
static void
killError(w, calldata, clientdata)
Widget w;
XtPointer calldata, clientdata;
{
kill_error();
}
kill_error()
{
XtPopdown(error_popup);
}
message(mess)
String mess;
{
Arg args[10];
int count;
Widget text;
int win_x, win_y, root_x, root_y;
Window a, b;
Cardinal buttons;
XEvent event;
XQueryPointer(dpy, XtWindow(outer), &a, &b,
&root_x, &root_y, &win_x, &win_y, &buttons);
text = XtNameToWidget(popup, "standby");
XtMoveWidget(popup, root_x, root_y);
count = 0;
XtSetArg(args[count], XtNborderWidth, 1); count++;
XtSetArg(args[count], XtNlabel, mess); count++;
XtSetValues(text, args, count);
XtPopup(popup, XtGrabExclusive);
while (!XCheckTypedWindowEvent(dpy,
XtWindow(text),
Expose, &event));
XtDispatchEvent(&event);
XFlush(dpy);
}
kill_message()
{
XtPopdown(popup);
}
create_help_popup()
{
Widget popup_help, popup_help_button, popup_quit_button,
popup_help_form, popup_help_scrolwin;
Arg args[15];
int count;
count = 0;
popup_help = XtCreatePopupShell("Pod Help Screen", topLevelShellWidgetClass,
toplevel, args, count);
count = 0;
popup_help_form = XtCreateManagedWidget("popup_help_form", formWidgetClass,
popup_help, args, count);
count = 0;
XtSetArg(args[count], XtNheight, Close_height); count++;
XtSetArg(args[count], XtNwidth, Close_width); count++;
popup_quit_button = XtCreateManagedWidget("popup_help_quit",
commandWidgetClass,
popup_help_form, args, count);
XtAddCallback(popup_quit_button, XtNcallback, QuitFromHelp, (XtPointer) 0);
count = 0;
XtSetArg(args[count], XtNheight, About_height); count++;
XtSetArg(args[count], XtNwidth, About_width); count++;
popup_help_button = XtCreateManagedWidget("popup_help_general",
commandWidgetClass,
popup_help_form, args, count);
XtAddCallback(popup_help_button, XtNcallback, InsertHelp,
(XtPointer) "general");
count = 0;
popup_help_scrolwin = XtCreateManagedWidget("popup_help_scrolwin",
viewportWidgetClass,
popup_help_form, args, count);
count = 0;
XtSetArg(args[count], XtNsensitive, FALSE); count++;
(void) XtCreateManagedWidget("popup_help_text",
asciiTextWidgetClass,
popup_help_scrolwin, args, count);
XtRealizeWidget(popup_help);
CreateBackgroundPixmap(popup_help_button, About_bits,
About_width, About_height);
CreateBackgroundPixmap(popup_quit_button, Close_bits,
Close_width, Close_height);
if (DefaultDepthOfScreen(screen) == 1) {
CreateBackgroundPixmap(popup_help_form, gray_bits,
gray_width, gray_height);
}
}
/*ARGSUSED*/
static void
Help(w, calldata, clientdata)
Widget w;
XtPointer calldata, clientdata;
{
Widget help_popup;
help_popup = XtNameToWidget(toplevel, "Pod Help Screen");
XtPopup(help_popup, XtGrabNone);
InsertHelp((Widget) 0, (XtPointer) "help", (XtPointer) 0);
XFlush(dpy);
help_up = TRUE;
}
/*ARGSUSED*/
static void
QuitFromHelp(w, calldata, clientdata)
Widget w;
XtPointer calldata, clientdata;
{
Widget help_popup;
help_up = FALSE;
help_popup = XtNameToWidget(toplevel, "Pod Help Screen");
XtPopdown(help_popup);
}
/*ARGSUSED*/
static void
InsertHelp(w, calldata, clientdata)
Widget w;
XtPointer calldata, clientdata;
{
Widget text, scrolwin;
FILE *file;
char filename[1024];
char help_buf[4024];
int count;
Arg args[10];
Dimension width, height;
XFontStruct *font;
scrolwin = XtNameToWidget(toplevel,
"Pod Help Screen.popup_help_form.popup_help_scrolwin");
text = XtNameToWidget(scrolwin, "popup_help_text");
count = 0;
XtSetArg(args[count], XtNwidth, &width); count++;
XtGetValues(scrolwin, args, count);
(void) strcpy(filename, dua_help_dir);
(void) strcat(filename, (String) calldata);
count = 0;
XtSetArg(args[count], XtNfont, &font); count++;
XtGetValues(text, args, count);
height = FONTHEIGHT(font);
count = 0;
XtSetArg(args[count], XtNheight, height); count++;
XtSetValues(text, args, count);
height = 0;
if (!(file = fopen(filename, "r"))) {
(void) strcpy(filename, "./Xd/podHelpdir/");
(void) strcat(filename, (String) calldata);
if (!(file = fopen(filename, "r"))) (void) printf("Helpfile not found");
}
if (file) {
(void) strcpy(help_buf, "\0");
while (fgets(help_string, 1000, file)) {
height += (FONTHEIGHT(font));
(void) strcat(help_buf, help_string);
}
(void) fclose(file);
count = 0;
XtSetArg(args[count], XtNstring, ""); count++;
XtSetValues(text, args, count);
count = 0;
XtSetArg(args[count], XtNwidth, width - 18); count++;
XtSetArg(args[count], XtNheight, height); count++;
XtSetArg(args[count], XtNstring, help_buf); count++;
XtSetValues(text, args, count);
}
}
void CreateBackgroundPixmap(widget, bits,
width, height)
Widget widget;
char bits[];
Cardinal width, height;
{
Arg args[15];
int count;
Pixmap bitmap;
bitmap = XCreatePixmapFromBitmapData(dpy,
XtWindow(widget), bits,
width, height,
BlackPixelOfScreen(screen),
WhitePixelOfScreen(screen),
DefaultDepthOfScreen(screen));
count = 0;
XtSetArg(args[count], XtNbackgroundPixmap, bitmap); count++;
XtSetArg(args[count], XtNresizable, FALSE); count++;
XtSetValues(widget, args, count);
}
/*ARGSUSED*/
static void
ListDestroy(w, list_seq, calldata)
Widget w;
XtPointer calldata, list_seq;
{
free_seq((D_seq) list_seq);
XtDestroyWidget(w);
}
/*ARGSUSED*/
static void
Close(w, shellwidget, calldata)
Widget w;
XtPointer calldata, shellwidget;
{
XtDestroyWidget((Widget) shellwidget);
}
static void
create_history_popup(list_seq, mess)
D_seq list_seq;
char *mess;
{
int count = 0;
Widget shell, swindow, HistoryForm, ListWindow, closeButton;
Arg args[15];
count = 0;
shell = XtCreatePopupShell("Session History", topLevelShellWidgetClass,
toplevel, args, 0);
count = 0;
HistoryForm = XtCreateManagedWidget("HistoryForm", formWidgetClass,
shell, args, count);
count = 0;
XtSetArg(args[count], XtNheight, Close_height); count++;
XtSetArg(args[count], XtNwidth, Close_width); count++;
closeButton = XtCreateManagedWidget("closeButton",
commandWidgetClass,
HistoryForm, args, count);
XtAddCallback(closeButton, XtNcallback,
(XtCallbackProc) popdownHistory, (XtPointer) shell);
count = 0;
XtSetValues(closeButton, args, count);
count = 0;
XtSetArg(args[count], XtNlabel, "History Window"); count++;
(void) XtCreateManagedWidget("ListTitle", labelWidgetClass,
HistoryForm, args, count);
count = 0;
swindow = XtCreateManagedWidget("ListScrolledWindow", viewportWidgetClass,
HistoryForm, args, count);
count = 0;
ListWindow = XtCreateManagedWidget("ListWindow", formWidgetClass,
swindow, args, count);
count = 0;
XtSetArg(args[count], XtNlabel, mess); count++;
(void) XtCreateManagedWidget("ListMessage", labelWidgetClass,
HistoryForm, args, count);
XtAddCallback(ListWindow, XtNdestroyCallback,
ListDestroy, (XtPointer) list_seq);
AddNewList(ListWindow, list_seq);
XtRealizeWidget(shell);
CreateBackgroundPixmap(closeButton, Close_bits, Close_width, Close_height);
if (DefaultDepthOfScreen(screen) == 1)
CreateBackgroundPixmap(HistoryForm, gray_bits, gray_width, gray_height);
}
/*ARGSUSED*/
static void
popupHistory(w, clientdata, calldata)
Widget w;
XtPointer clientdata, calldata;
{
Widget history_popup;
history_popup = XtNameToWidget(toplevel, "Session History");
XtPopup(history_popup, XtGrabNone);
}
/*ARGSUSED*/
static void
popdownHistory(w, clientdata, calldata)
Widget w;
XtPointer clientdata, calldata;
{
Widget history_popup;
history_popup = XtNameToWidget(toplevel, "Session History");
XtPopdown(history_popup);
}
/*ARGSUSED*/
static void
ChangeHelp(w, event, params, num_params)
Widget w;
XEvent *event;
String *params;
int num_params;
{
if ((help_up) && strcmp(params[0], curr_help)) {
InsertHelp((Widget) 0, (XtPointer) params[0], (XtPointer) 0);
(void) strcpy(curr_help, params[0]);
}
}
/*ARGSUSED*/
static void
buttonPress(w, event, params, num_params)
Widget w;
XEvent *event;
String *params;
int num_params;
{
if (!strcmp(params[0], "search"))
CreateBackgroundPixmap(w, SearchPress_bits,
SearchPress_width, SearchPress_height);
else if (!strcmp(params[0], "help"))
CreateBackgroundPixmap(w, HelpPress_bits,
HelpPress_width, HelpPress_height);
else if (!strcmp(params[0], "quit"))
CreateBackgroundPixmap(w, QuitPress_bits,
QuitPress_width, QuitPress_height);
else if (!strcmp(params[0], "list"))
CreateBackgroundPixmap(w, ListPress_bits,
ListPress_width, ListPress_height);
else if (!strcmp(params[0], "history"))
CreateBackgroundPixmap(w, HistoryPress_bits,
HistoryPress_width, HistoryPress_height);
else if (!strcmp(params[0], "close"))
CreateBackgroundPixmap(w, ClosePress_bits,
ClosePress_width, ClosePress_height);
else if (!strcmp(params[0], "about"))
CreateBackgroundPixmap(w, AboutPress_bits,
AboutPress_width, AboutPress_height);
else if (!strcmp(params[0], "okay"))
CreateBackgroundPixmap(w, OkayPress_bits,
OkayPress_width, OkayPress_height);
XFlush(dpy);
XtCallCallbacks(w, XtNcallback, NULL);
if (!strcmp(params[0], "search"))
CreateBackgroundPixmap(w, Search_bits,
Search_width, Search_height);
else if (!strcmp(params[0], "help"))
CreateBackgroundPixmap(w, Help_bits,
Help_width, Help_height);
else if (!strcmp(params[0], "quit"))
CreateBackgroundPixmap(w, Quit_bits,
Quit_width, Quit_height);
else if (!strcmp(params[0], "list"))
CreateBackgroundPixmap(w, List_bits,
List_width, List_height);
else if (!strcmp(params[0], "history"))
CreateBackgroundPixmap(w, History_bits,
History_width, History_height);
else if (!strcmp(params[0], "close"))
CreateBackgroundPixmap(w, Close_bits,
Close_width, Close_height);
else if (!strcmp(params[0], "okay"))
CreateBackgroundPixmap(w, Okay_bits,
Okay_width, Okay_height);
else if (!strcmp(params[0], "about"))
CreateBackgroundPixmap(w, About_bits,
About_width, About_height);
XFlush(dpy);
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.