argv@island.uu.net (Dan Heller) (07/25/89)
Submitted-by: Jon Crowcroft <J.Crowcroft@Cs.Ucl.AC.UK> Posting-number: Volume 4, Issue 86 Archive-name: xconf/part01 #! /bin/sh # This is a shell archive. Remove anything before this line, then feed it # into a shell via "sh file" or similar. To overwrite existing files, # type "sh file -c". # The tool that generated this appeared in the comp.sources.unix newsgroup; # send mail to comp-sources-unix@uunet.uu.net if you want that tool. # If this archive is complete, you will see the following message at the end: # "End of archive 5 (of 5)." # Contents: xconf/AsciiText.h xconf/AsciiTextP.h xconf/JON.macros # xconf/README xconf/Text.c.ad xconf/TextSrcP.h xconf/XawMisc.h # xconf/kille.comments xconf/ru.c xconf/xconf.1 xconf/xconf.h # Wrapped by argv@sumatra on Tue Jul 25 01:01:08 1989 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'xconf/AsciiText.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/AsciiText.h'\" else echo shar: Extracting \"'xconf/AsciiText.h'\" \(3068 characters\) sed "s/^X//" >'xconf/AsciiText.h' <<'END_OF_FILE' X#include <X11/copyright.h> X X/* $XConsortium: AsciiText.h,v 1.11 88/10/23 13:20:46 swick Exp $ */ X X X/*********************************************************** XCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, Xand the Massachusetts Institute of Technology, Cambridge, Massachusetts. X X All Rights Reserved X XPermission to use, copy, modify, and distribute this software and its Xdocumentation for any purpose and without fee is hereby granted, Xprovided that the above copyright notice appear in all copies and that Xboth that copyright notice and this permission notice appear in Xsupporting documentation, and that the names of Digital or MIT not be Xused in advertising or publicity pertaining to distribution of the Xsoftware without specific, written prior permission. X XDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING XALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL XDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR XANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, XWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, XARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS XSOFTWARE. X X******************************************************************/ X X X#ifndef _AsciiText_h X#define _AsciiText_h X X/**************************************************************** X * X * AsciiText widgets X * X ****************************************************************/ X X/* Resources: X X Name Class RepType Default Value X ---- ----- ------- ------------- X background Background Pixel XtDefaultBackground X border BorderColor Pixel XtDefaultForeground X borderWidth BorderWidth Dimension 1 X destroyCallback Callback Pointer NULL X displayPosition TextPosition int 0 X editType EditType XtTextEditType XttextRead X file File String NULL X font Font XFontStruct* Fixed X foreground Foreground Pixel Black X height Height Dimension font height X insertPosition TextPosition int 0 X leftMargin Margin Dimension 2 X mappedWhenManaged MappedWhenManaged Boolean True X selectTypes SelectTypes Pointer (internal) X selection Selection Pointer empty selection X sensitive Sensitive Boolean True X string String String NULL X textOptions TextOptions int 0 X width Width Dimension 100 X x Position Position 0 X y Position Position 0 X X*/ X X X#ifdef JON X#include "Text.h" X#else JON X#include <X11/Text.h> /* AsciiText is a subclass of Text */ X#endif JON X X#define XtNstring "string" X#define XtNfile "file" X X#define XtCString "String" X#define XtCFile "File" X Xtypedef struct _AsciiStringClassRec *AsciiStringWidgetClass; Xtypedef struct _AsciiStringRec *AsciiStringWidget; X Xextern WidgetClass asciiStringWidgetClass; X Xtypedef struct _AsciiDiskClassRec *AsciiDiskWidgetClass; Xtypedef struct _AsciiDiskRec *AsciiDiskWidget; X Xextern WidgetClass asciiDiskWidgetClass; X X#endif _AsciiText_h END_OF_FILE if test 3068 -ne `wc -c <'xconf/AsciiText.h'`; then echo shar: \"'xconf/AsciiText.h'\" unpacked with wrong size! fi # end of 'xconf/AsciiText.h' fi if test -f 'xconf/AsciiTextP.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/AsciiTextP.h'\" else echo shar: Extracting \"'xconf/AsciiTextP.h'\" \(2678 characters\) sed "s/^X//" >'xconf/AsciiTextP.h' <<'END_OF_FILE' X#include <X11/copyright.h> X X/* $XConsortium: AsciiTextP.h,v 1.10 88/10/18 12:25:24 swick Exp $ */ X X X/*********************************************************** XCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, Xand the Massachusetts Institute of Technology, Cambridge, Massachusetts. X X All Rights Reserved X XPermission to use, copy, modify, and distribute this software and its Xdocumentation for any purpose and without fee is hereby granted, Xprovided that the above copyright notice appear in all copies and that Xboth that copyright notice and this permission notice appear in Xsupporting documentation, and that the names of Digital or MIT not be Xused in advertising or publicity pertaining to distribution of the Xsoftware without specific, written prior permission. X XDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING XALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL XDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR XANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, XWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, XARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS XSOFTWARE. X X******************************************************************/ X X#ifndef _AsciiTextP_h X#define _AsciiTextP_h X X#ifdef JON X#include "AsciiText.h" X#include "TextP.h" X#else JON X#include <X11/AsciiText.h> X#include <X11/TextP.h> X#endif JON X Xextern XtActionsRec textActionsTable[]; Xextern Cardinal textActionsTableCount; X Xtypedef struct {int empty;} AsciiStringClassPart; X Xtypedef struct _AsciiStringClassRec { X CoreClassPart core_class; X SimpleClassPart simple_class; X TextClassPart text_class; X AsciiStringClassPart ascii_string_class; X} AsciiStringClassRec; X Xextern AsciiStringClassRec asciiStringClassRec; X Xtypedef struct { X String string; /* string for which to create a source */ X} AsciiStringPart; X Xtypedef struct _AsciiStringRec { X CorePart core; X SimplePart simple; X TextPart text; X AsciiStringPart ascii_string; X} AsciiStringRec; X Xtypedef struct {int empty;} AsciiDiskClassPart; X Xtypedef struct _AsciiDiskClassRec { X CoreClassPart core_class; X SimpleClassPart simple_class; X TextClassPart text_class; X AsciiDiskClassPart ascii_disk_class; X} AsciiDiskClassRec; X Xextern AsciiDiskClassRec asciiDiskClassRec; X Xtypedef struct { X String file_name; /* file for which to create a source */ X} AsciiDiskPart; X Xtypedef struct _AsciiDiskRec { X CorePart core; X SimplePart simple; X TextPart text; X AsciiDiskPart ascii_disk; X} AsciiDiskRec; X X#endif _AsciiTextP_h END_OF_FILE if test 2678 -ne `wc -c <'xconf/AsciiTextP.h'`; then echo shar: \"'xconf/AsciiTextP.h'\" unpacked with wrong size! fi # end of 'xconf/AsciiTextP.h' fi if test -f 'xconf/JON.macros' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/JON.macros'\" else echo shar: Extracting \"'xconf/JON.macros'\" \(2132 characters\) sed "s/^X//" >'xconf/JON.macros' <<'END_OF_FILE' X/* X * SET VERSION NUMBERS BEFORE MAKING MAKEFILES X * X * If you change either of the following numbers, you will need to do a X * full build (make World) at the top of the sources.... X */ X#define SunOSPlatform YES /* set to NO if not running SunOS */ X#define OSName SunOS 4.0 X#define OSMajorVersion 4 X#define OSMinorVersion 0 X X X/* X **************************************************************************** X */ X X/**/# platform: $XConsortium: Sun.macros,v 1.52 88/10/23 11:00:55 jim Exp $ X/**/# operating system: OSName X X#if SunOSPlatform && OSMajorVersion == 3 && OSMinorVersion <= 2 X#define OptimizedCDebugFlags /* as nothing */ X#endif X XBOOTSTRAPCFLAGS = X AS = as X CC = cc -DJON -DSUNRPC -DJOKE X CPP = /lib/cpp X LD = ld X LINT = lint X INSTALL = install -g csstaff X TAGS = ctags X RM = rm -f X MV = mv X LN = ln -s X RANLIB = ranlib XRANLIBINSTFLAGS = -t X AR = ar clq X LS = ls X LINTOPTS = -axz X LINTLIBFLAG = -C X MAKE = make XSTD_CPP_DEFINES = X STD_DEFINES = X X/* This defines the server you want */ X#define XsunServer Xsun X/* #define Xplx Xplx */ X X/* define this as you like for normal library compilation */ X#define LibraryDefines X X/* define this as you like for server font support */ X#define FontDefines -DFONT_SNF -DFONT_BDF -DCOMPRESSED_FONTS X X X/* X * link in SunWindows support? X */ X#define UseSunWindowsInServer NO X X#if UseSunWindowsInServer X#define SunWindowsDefines -DSUN_WINDOWS X#else X#define SunWindowsDefines /* as nothing */ X#endif X X/* define this as you like for server compilation */ X#if SunOSPlatform && OSMajorVersion >= 4 X#define ServerDefines SunWindowsDefines -DINCLUDE_ALLOCA_H X#else X#define ServerDefines SunWindowsDefines X#endif X X/* -DTCPCONN allows TCP connections */ X/* -DUNIXCONN allows Unix domain connections */ X/* -DDNETCONN allows DECnet connections */ X X#define ConnectionFlags -DTCPCONN -DUNIXCONN X X/* X * override any parameters from site.def X */ X#define ExpandManNames YES /* expand Xlib man page filenames */ X X X END_OF_FILE if test 2132 -ne `wc -c <'xconf/JON.macros'`; then echo shar: \"'xconf/JON.macros'\" unpacked with wrong size! fi # end of 'xconf/JON.macros' fi if test -f 'xconf/README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/README'\" else echo shar: Extracting \"'xconf/README'\" \(3407 characters\) sed "s/^X//" >'xconf/README' <<'END_OF_FILE' XThis dir contains the srcs/hdrs/makefile for the xconf program. X XDESCRIPTION... XXconf is a simple text based conferencing program. X XIt works by opening multiple windows, one per conferee, one on each Xconferees displays (does not pre-empt user being in multiple Xconferences though). X XIt sets up a top level window with quit/help/accept buttons. XAccept popups a box widget with multiple asciiTextwidget's (one per Xconferee). One is for input, the rest show what every one is typeing Xon their input windows... X XThere is no floor control at present, so it is a "free for all" Xconference, just like an n-way talk. X XNote that the ascii widget is like a jove edit window, and that edit Xcommands typed in it will have the same effect on the output windows Xon each other conferees display as on your input window. X XOne user starts the conference, specifying all the users at startup. XUsers may choose not to accept the conference, by quiting immediately. XWhen the last person quits, the conference terminates. X XA User is specified by user name. This may be optionally appended by Xa machine (user@machine) and also by a display X(user@machine:Display#). if the user name appears alone, it can be Xused to find where the user is logged in, and which of possibly many Xlogins is least recently idle. If the machine/display is specified, Xthe user name is ignored, and used simply as a tag for their Xconference windows. X XINSTALLATION X Ximake and install... X XNB You need to put the HELP file in a public place as well as the binary X- e.g. /usr/local/lib/HELP - the filename and Xpath are (sorry) defined in xconf.h X XNOTE BENE: X XUnder twm, you need to set NoTitleFocus in your .twmrc file, else Xkeyboard input never gets focused properly - a sort of feature of twm X- not really a bug in xconf though... X XUSAGE... XTo run, type X Xxconf <user@machine>+ [-X typicalXArgs] X Xe.g. Xxconf jon@perky pp@lagavulin steve@lion -X -fg green -bg blue X XA box appears on each users display, with three command buttons: X XQuit XQuits now, or at any point in the conference. X XHelp XPopups a help window with soem assistance displayed, and a subsidery Xquit button. X XAccept XAccepts the conference, Popups a new box, with a text window for this Xuser to type in, and other users input to be output on. The windows Xare labelled to show whose is whose. If you quit, all the windows Xvanish on your display, and your output window vanishes onm each other Xpersons display. X XAdd XAdds a conferee, resizing all the others boxes to allow their output. XAdd uses a dialog to get the conferees name/machine... X XYou type at the widnow marked <= input. X XBUGS... XPredominately, the system needs its own version of all the Athena XWidget set to do with ascii text. These are conditionally compiled Xwith -DJON to add the callbacks required. XIt also has its own Converters and GCManager routines to overcome a Xcouple of minor bugs in these. Again, bugs (and quick hack fixes) Xare marked and compiled in with -DJON. They have been reported. X XCurrently there are some odd problems with some window managers. X XIf the user who started the conference kills the program, the Xconference terminates for everyone else [although they may just quit Xwithout this happening]. X X XCOMMENTS and BUGS to X Xjon@cs.ucl.ac.uk (INTERNET) Xor Xjon@uk.ac.ucl.cs (JANET) Xor Xjon@ucl-cs (ukc, mcvax etc for UUCP) Xor Xo/r name: /pn=Jon.Crowcroft/ou=cs/o=ucl/prmd=uk.ac/admd=gold 400/c=gb/ X(phew, X.400) END_OF_FILE if test 3407 -ne `wc -c <'xconf/README'`; then echo shar: \"'xconf/README'\" unpacked with wrong size! fi # end of 'xconf/README' fi if test -f 'xconf/Text.c.ad' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/Text.c.ad'\" else echo shar: Extracting \"'xconf/Text.c.ad'\" \(5307 characters\) sed "s/^X//" >'xconf/Text.c.ad' <<'END_OF_FILE' X x += ctx->text.dialog_horiz_offset; X y += ctx->text.dialog_vert_offset; X prev = dialog; X } X if (dialog) { X _XtTextAbortDialog(w, (caddr_t)dialog, NULL); X XtMoveWidget(popup = dialog->widget->core.parent, x, y); X } X else { X XtCallbackRec callbacks[2]; X dialog = XtNew(struct _dialog); X if (prev) X prev->next = dialog; /* add to end of list to make visual */ X else /* placement easier next time 'round */ X ctx->text.dialog = dialog; X dialog->text = ctx; X dialog->message = (Widget)NULL; X dialog->next = NULL; X popup_args[0].value = (XtArgVal)x; X popup_args[1].value = (XtArgVal)y; X popup_args[2].value = (XtArgVal)dialog_label; X popup = XtCreatePopupShell( "insertFile", transientShellWidgetClass, w, X popup_args, XtNumber(popup_args) ); X X XtSetArg( args[0], XtNlabel, dialog_label ); X XtSetArg( args[1], XtNvalue, ptr ); X dialog->widget = X XtCreateManagedWidget("fileInsert", dialogWidgetClass, popup, X args, TWO); X X XtSetKeyboardFocus( dialog->widget, X XtNameToWidget( dialog->widget, "value" )); X callbacks[0].callback = _XtTextAbortDialog; X callbacks[0].closure = (caddr_t)dialog; X callbacks[1].callback = (XtCallbackProc)NULL; X callbacks[1].closure = (caddr_t)NULL; X XtSetArg( args[0], XtNcallback, callbacks ); X XtCreateManagedWidget( "Cancel", commandWidgetClass, dialog->widget, X args, ONE ); X X callbacks[0].callback = DoInsert; X dialog->doit = X XtCreateManagedWidget( "DoIt", commandWidgetClass, dialog->widget, X args, ONE ); X X XtRealizeWidget( popup ); X } X XtPopup(popup, XtGrabNone); X dialog->mapped = True; X X EndAction(ctx); X} X X/* Actions Table */ X XXtActionsRec textActionsTable [] = { X/* motion bindings */ X {"forward-character", MoveForwardChar}, X {"backward-character", MoveBackwardChar}, X {"forward-word", MoveForwardWord}, X {"backward-word", MoveBackwardWord}, X {"forward-paragraph", MoveForwardParagraph}, X {"backward-paragraph", MoveBackwardParagraph}, X {"beginning-of-line", MoveToLineStart}, X {"end-of-line", MoveToLineEnd}, X {"next-line", MoveNextLine}, X {"previous-line", MovePreviousLine}, X {"next-page", MoveNextPage}, X {"previous-page", MovePreviousPage}, X {"beginning-of-file", MoveBeginningOfFile}, X {"end-of-file", MoveEndOfFile}, X {"scroll-one-line-up", ScrollOneLineUp}, X {"scroll-one-line-down", ScrollOneLineDown}, X/* delete bindings */ X {"delete-next-character", DeleteForwardChar}, X {"delete-previous-character", DeleteBackwardChar}, X {"delete-next-word", DeleteForwardWord}, X {"delete-previous-word", DeleteBackwardWord}, X {"delete-selection", DeleteCurrentSelection}, X/* kill bindings */ X {"kill-word", KillForwardWord}, X {"backward-kill-word", KillBackwardWord}, X {"kill-selection", KillCurrentSelection}, X {"kill-to-end-of-line", KillToEndOfLine}, X {"kill-to-end-of-paragraph", KillToEndOfParagraph}, X/* unkill bindings */ X {"unkill", UnKill}, X {"stuff", Stuff}, X/* new line stuff */ X {"newline-and-indent", InsertNewLineAndIndent}, X {"newline-and-backup", InsertNewLineAndBackup}, X {"newline", (XtActionProc)InsertNewLine}, X/* Selection stuff */ X {"select-word", SelectWord}, X {"select-all", SelectAll}, X {"select-start", SelectStart}, X {"select-adjust", SelectAdjust}, X {"select-end", SelectEnd}, X {"extend-start", ExtendStart}, X {"extend-adjust", ExtendAdjust}, X {"extend-end", ExtendEnd}, X {"insert-selection", InsertSelection}, X/* Miscellaneous */ X {"redraw-display", RedrawDisplay}, X {"insert-file", InsertFile}, X {"insert-char", InsertChar}, X {"focus-in", TextFocusIn}, X {"focus-out", TextFocusOut}, X}; X XCardinal textActionsTableCount = XtNumber(textActionsTable); /* for subclasses */ X XTextClassRec textClassRec = { X { /* core fields */ X /* superclass */ (WidgetClass) &simpleClassRec, X /* class_name */ "Text", X /* widget_size */ sizeof(TextRec), X /* class_initialize */ ClassInitialize, X /* class_part_init */ NULL, X /* class_inited */ FALSE, X /* initialize */ Initialize, X /* initialize_hook */ NULL, X /* realize */ Realize, X /* actions */ textActionsTable, X /* num_actions */ XtNumber(textActionsTable), X /* resources */ resources, X /* num_ resource */ XtNumber(resources), X /* xrm_class */ NULLQUARK, X /* compress_motion */ TRUE, X /* compress_exposure*/ FALSE, X /* compress_enterleave*/ TRUE, X /* visible_interest */ FALSE, X /* destroy */ TextDestroy, X /* resize */ Resize, X /* expose */ ProcessExposeRegion, X /* set_values */ SetValues, X /* set_values_hook */ NULL, X /* set_values_almost*/ XtInheritSetValuesAlmost, X /* get_values_hook */ NULL, X /* accept_focus */ NULL, X /* version */ XtVersion, X /* callback_private */ NULL, X /* tm_table */ defaultTextTranslations, X /* query_geometry */ XtInheritQueryGeometry, X /* display_accelerator*/ XtInheritDisplayAccelerator, X /* extension */ NULL X }, X { /* text fields */ X /* empty */ 0 X } X}; X XWidgetClass textWidgetClass = (WidgetClass)&textClassRec; END_OF_FILE if test 5307 -ne `wc -c <'xconf/Text.c.ad'`; then echo shar: \"'xconf/Text.c.ad'\" unpacked with wrong size! fi # end of 'xconf/Text.c.ad' fi if test -f 'xconf/TextSrcP.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/TextSrcP.h'\" else echo shar: Extracting \"'xconf/TextSrcP.h'\" \(3013 characters\) sed "s/^X//" >'xconf/TextSrcP.h' <<'END_OF_FILE' X/* X* $XConsortium: TextSrcP.h,v 1.1 88/10/18 13:13:08 swick Exp $ X*/ X X X/*********************************************************** XCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, Xand the Massachusetts Institute of Technology, Cambridge, Massachusetts. X X All Rights Reserved X XPermission to use, copy, modify, and distribute this software and its Xdocumentation for any purpose and without fee is hereby granted, Xprovided that the above copyright notice appear in all copies and that Xboth that copyright notice and this permission notice appear in Xsupporting documentation, and that the names of Digital or MIT not be Xused in advertising or publicity pertaining to distribution of the Xsoftware without specific, written prior permission. X XDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING XALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL XDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR XANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, XWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, XARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS XSOFTWARE. X X******************************************************************/ X X#ifndef _XtTextSrcP_h X#define _XtTextSrcP_h X X X#include "Text.h" X Xtypedef enum {XtsdLeft, XtsdRight} XtTextScanDirection; Xtypedef enum {XtstPositions, XtstWhiteSpace, XtstEOL, XtstParagraph, XtstAll} X XtTextScanType; X Xtypedef struct _XtTextSource { X XtTextPosition (*Read)(); X int (*Replace)(); X XtTextPosition (*GetLastPos)(); X int (*SetLastPos)(); X XtTextPosition (*Scan)(); X void (*AddWidget)( /* source, widget */ ); X void (*RemoveWidget)( /* source, widget */ ); X Boolean (*GetSelection)( /* source, left, right, selection */); X void (*SetSelection)( /* source, left, right, selection */); X Boolean (*ConvertSelection)( /* Display*, source, ... */ ); X XtTextEditType edit_mode; X caddr_t data; X }; X Xtypedef struct _XtTextSink { X XFontStruct *font; X int foreground; X int *Display; X int (*InsertCursor)(); X int (*ClearToBackground)(); X int (*FindPosition)(); X int (*FindDistance)(); X int (*Resolve)(); X int (*MaxLines)(); X int (*MaxHeight)(); X void (*SetTabs)(); /* widget, offset, tab_count, *tabs */ X caddr_t data; X }; X Xtypedef enum {XtisOn, XtisOff} XtTextInsertState; X Xtypedef enum {XtsmTextSelect, XtsmTextExtend} XtTextSelectionMode; X Xtypedef enum {XtactionStart, XtactionAdjust, XtactionEnd} X XtTextSelectionAction; X Xtypedef struct { X XtTextPosition left, right; X XtTextSelectType type; X Atom* selections; X int atom_count; X int array_size; X} XtTextSelection; X Xtypedef enum {Normal, Selected }highlightType; X X/* for backwards compatibility only */ X X#define EditDone XawEditDone X#define EditError XawEditError X#define PositionError XawPositionError X X#endif _XtTextSrcP_h END_OF_FILE if test 3013 -ne `wc -c <'xconf/TextSrcP.h'`; then echo shar: \"'xconf/TextSrcP.h'\" unpacked with wrong size! fi # end of 'xconf/TextSrcP.h' fi if test -f 'xconf/XawMisc.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/XawMisc.h'\" else echo shar: Extracting \"'xconf/XawMisc.h'\" \(1630 characters\) sed "s/^X//" >'xconf/XawMisc.h' <<'END_OF_FILE' X/* X* $XConsortium: XawMisc.h,v 1.8 88/09/06 16:42:52 jim Exp $ X*/ X X/*********************************************************** XCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, Xand the Massachusetts Institute of Technology, Cambridge, Massachusetts. X X All Rights Reserved X XPermission to use, copy, modify, and distribute this software and its Xdocumentation for any purpose and without fee is hereby granted, Xprovided that the above copyright notice appear in all copies and that Xboth that copyright notice and this permission notice appear in Xsupporting documentation, and that the names of Digital or MIT not be Xused in advertising or publicity pertaining to distribution of the Xsoftware without specific, written prior permission. X XDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING XALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL XDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR XANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, XWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, XARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS XSOFTWARE. X X******************************************************************/ X X/* Various useful constant and macro definitions */ X X#ifndef _XawMisc_h X#define _XawMisc_h X X#define MAXDIMENSION ((1 << 31)-1) X X#define Max(x, y) (((x) > (y)) ? (x) : (y)) X#define Min(x, y) (((x) < (y)) ? (x) : (y)) X#define AssignMax(x, y) if ((y) > (x)) x = (y) X#define AssignMin(x, y) if ((y) < (x)) x = (y) X X#endif /*_XawMisc_h*/ END_OF_FILE if test 1630 -ne `wc -c <'xconf/XawMisc.h'`; then echo shar: \"'xconf/XawMisc.h'\" unpacked with wrong size! fi # end of 'xconf/XawMisc.h' fi if test -f 'xconf/kille.comments' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/kille.comments'\" else echo shar: Extracting \"'xconf/kille.comments'\" \(1061 characters\) sed "s/^X//" >'xconf/kille.comments' <<'END_OF_FILE' X(Message inbox:52) XReplied: Thu, 20 Jul 89 11:09:37 +0100 XReplied: Steve Kille <S.Kille@uk.ac.ucl.cs> XReceived: from vs6.cs.ucl.ac.uk by pyr1.Cs.Ucl.AC.UK via Ethernet with SMTP X id ab09179; 20 Jul 89 8:18 GMT-0:00 XTo: Jon Crowcroft <J.Crowcroft@uk.ac.ucl.cs> XSubject: Re: An X based talk program XPhone: +44-1-380-7294 XIn-reply-to: Your message of Wed, 12 Jul 89 11:30:43 +0100. XDate: Thu, 20 Jul 89 08:15:38 +0100 XMessage-ID: <460.616922138@UK.AC.UCL.CS> XFrom: Steve Kille <S.Kille@uk.ac.ucl.cs> XSource-Info: lion.cs.ucl.ac.uk X XWell, conferenceing to yourrself is a bit odd! (hard to figure the arrows Xout) X Xxonferee (sic) is an odd name for the window X Xwhen I add someone, and give a <CR> it should not Xadd a new line to the box (or at least not scroll the Xbuttons off!) X XWhen someonw withdraws, the window doesn't shrink back Xdown again. X XI need to know where the person is logged on (pain). Should be Xable to ask for Marshall Rose (or whoever), and it will go to the "right" Xplace. X X XLooks good tho. Will try it out a bit more X X X XSteve END_OF_FILE if test 1061 -ne `wc -c <'xconf/kille.comments'`; then echo shar: \"'xconf/kille.comments'\" unpacked with wrong size! fi # end of 'xconf/kille.comments' fi if test -f 'xconf/ru.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/ru.c'\" else echo shar: Extracting \"'xconf/ru.c'\" \(1289 characters\) sed "s/^X//" >'xconf/ru.c' <<'END_OF_FILE' X#ifdef SUNRPC X X#include "ru.h" X Xchar * XFindMostRecentActiveLogin(user) Xchar *user; X{ X char host[80], besthost[80]; X int idle = 999999, pidle; X FILE *fx; X X strcpy(besthost, ""); X if ((fx = fopen(XHosts, "r")) == NULL) X return besthost; X while(fgets(host, sizeof(host), fx) != NULL) { X rfind(user, host, &pidle); X if (pidle < idle) { X idle = pidle; X strcpy(besthost, host); X } X } X return besthost; X} X X/* X * Do the horrid things to find users there X * and filter for this user X */ Xrfind(user, host, idle) Xchar *user, *host; Xunsigned *idle; X{ X int i; X struct utmpidlearr ut; X struct utmpidle **up; X X up = (struct utmpidle **)calloc(MAXUSERS, sizeof(struct utmpidle)); X X X ut.uia_arr = up; X ut.uia_cnt = MAXUSERS; X X if (rusers(host, &ut) != 0) { X free(up); X return 0; X } X X for(i=0; i<ut.uia_cnt; i++) { X if (!nonuser(ut.uia_arr[i]->ui_utmp) && X (strcmp(user, ut.uia_arr[i]->ui_utmp.ut_name) == 0)) { X *idle = ut.uia_arr[i]->ui_idle; X free(up); X return -1; X } X } X free(up); X return 0; X} X X/* X * Find the rexec port X */ Xu_short Xinport() X{ X struct servent *svc; X svc = getservbyname("exec", "tcp"); X if (svc == (struct servent *)0) { X (void)fprintf(stderr, "No rexec svc known\n"); X exit(-1); X } X return svc->s_port; X} X#endif SUNRPC END_OF_FILE if test 1289 -ne `wc -c <'xconf/ru.c'`; then echo shar: \"'xconf/ru.c'\" unpacked with wrong size! fi # end of 'xconf/ru.c' fi if test -f 'xconf/xconf.1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/xconf.1'\" else echo shar: Extracting \"'xconf/xconf.1'\" \(1818 characters\) sed "s/^X//" >'xconf/xconf.1' <<'END_OF_FILE' X.TH xconf 1 "1st June 1989" X.SH NAME Xxconf \- Conferencing program for X X.SH SYNOPSIS X.in +.5i X.ti -.5i Xxconf \%[user@host]+ \%[-TypicalXArgs] X.in -.5i X.SH DESCRIPTION X.I Xconf is a text based n-way conferening program, similar to the Xtalk utility. X.LP XWhen X.I xconf Xappears, each user has a small selection area, which they can choose Xhelp, quit or accept. X.IP XClicking on Accept pops up a box window, with a number of sub (text) Xwindows. Each has a label (one for the users input, one for each other users Xoutput). The user types at their input window, and what appears their Xappears in each other conferees output window exactly as is, including Xedits. X.IP XHelp, pops up a help window, with a scroll bar and two buttons. One X(hapropos) Xallows apropos queries of the key bindings for editing in the Xconference text windows. The other (quit) simply quits the help. X.IP XQuit, quits this user from the conference. Their output windows are Xtaken from all the other conferees' boxes, and then their conference Xbox and command box are destroyed. X.SH BUGS XThere are still many: There are some problems with focus under some Xwindow managers (e.g. under twm, you must set NoTitleFocus in Xyour .twmrc file). Quiting at some points during the conference causes Xthe program to die badly. If one of the conferees exits from X during Xthe conference, the entire conference dies (even if they have quit the Xconference). X.PP XScrolling by one user does not scroll the other users views of that Xwindow. X.PP XIncluding a file (see xedit) in one conferee's window does not include Xit in others, but does bring up the include dialog. X.PP XThe model of a central (the first conferee's) conference is not robust Xor efficient. X.SH AUTHOR XJon Crowcroft (jon@cs.ucl.ac.uk) XYou may copy this file in whole or in part as many times as you wish. END_OF_FILE if test 1818 -ne `wc -c <'xconf/xconf.1'`; then echo shar: \"'xconf/xconf.1'\" unpacked with wrong size! fi # end of 'xconf/xconf.1' fi if test -f 'xconf/xconf.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xconf/xconf.h'\" else echo shar: Extracting \"'xconf/xconf.h'\" \(1540 characters\) sed "s/^X//" >'xconf/xconf.h' <<'END_OF_FILE' X#include <utmp.h> X#include <stdio.h> X#include <string.h> X#include <ctype.h> X#include <sys/types.h> X X#include <fcntl.h> X X#include <X11/Intrinsic.h> X#include <X11/StringDefs.h> X#include <X11/Scroll.h> X#include "AsciiText.h" X#include <X11/Shell.h> X#include <X11/Command.h> X#include <X11/VPaned.h> X#include <X11/Box.h> X#include <X11/Form.h> X#include <X11/Dialog.h> X#include <X11/Label.h> X#include <X11/Cardinals.h> X X#define BUFFSIZE 4096 X Xtypedef struct xwin { X Widget v; X Widget w; X/* X * searle's points - also see e-mail ettiquette X */ X Widget assert, commit, direct, declare, express; X Widget lab; X char buff[BUFFSIZE]; X XtTextSource source; X} xwin_t; X X#define MAXCONF 8 Xtypedef struct xconf { X Display *dpy; X/* X * The following shows the relation of widgets for each conference X */ X Widget toplevel, X tbox, X ab, qb, nb, hb; X Widget pop, X box; X Widget hpop, X hbox, htxt, hq, X hap, hapok, hapres; X Widget npop, X nbox, nq, X nap, nok; X#ifdef JOKE X Widget jb; X#endif JOKE X int live; X char user[128]; X char display[128]; X xwin_t me; X xwin_t them[MAXCONF]; X} xconf_t; X X#define IN -1 X#define OUT 0 X Xextern xconf_t Conference[MAXCONF]; X Xextern int numberofthem; X X#define NO(t) (t)0 X X#define DEFWIDTHT 512 X#define DEFHEIGHTT 512 X X#define DEFWIDTHB 256 X#define DEFHEIGHTB 256 X X#define DEFWIDTHW 128 X#define DEFHEIGHTW 128 X X/* X *This is site/installation specific - needs to be edited (e.g. X * goes in local/lib/... at our site... X */ X#define HELPFILE "/cs/research/reuters/pink/jon/bin/xconf.HELP" END_OF_FILE if test 1540 -ne `wc -c <'xconf/xconf.h'`; then echo shar: \"'xconf/xconf.h'\" unpacked with wrong size! fi # end of 'xconf/xconf.h' fi echo shar: End of archive 5 \(of 5\). cp /dev/null ark5isdone MISSING="" for I in 1 2 3 4 5 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 5 archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0