v11i045: wcl - Widget Creation Language, Part30/35

David E. Smyth david at devvax.Jpl.Nasa.Gov
Tue Feb 12 16:13:57 AEST 1991


Submitted-by: david at devvax.Jpl.Nasa.Gov (David E. Smyth)
Posting-number: Volume 11, Issue 45
Archive-name: wcl/part30

#! /bin/sh

# Make a new directory for the wc sources, cd to it, and run kits 1
# thru 35 through sh.  When all 35 kits have been run, read README.

echo "This is wc 1.05 kit 30 (of 35).  If kit 30 is complete, the line"
echo '"'"End of kit 30 (of 35)"'" will echo at the end.'
echo ""
export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
mkdir DemosMotif Mri Wc Xmp 2>/dev/null
echo Extracting DemosMotif/xmailbox.c
sed >DemosMotif/xmailbox.c <<'!STUFFY!FUNK!' -e 's/X//'
X/***************************************************************************
X *
X * FILE NAME		: xmailbox.c
X *
X * AUTHOR		: Andrew Peebles
X *
X * DESCRIPTION		: Simple utility to monitor mail box
X *
X * VERSIONS		: %W%
X *
X ***************************************************************************/
X
X/*
X * standard includes
X */
X#include <stdio.h>
X#include <sys/types.h>
X#include <sys/stat.h>
X
X#include <Xm/Xm.h>
X
X#include <X11/Shell.h>
X#include <Wc/WcCreate.h>
X
Xstatic void ClearTextACT();
Xstatic void HideMailACT();
Xstatic void ReScanACT();
X
Xstatic XtActionsRec	MYactions[] = {
X  {"ClearTextACT",	ClearTextACT},
X  {"HideMailACT",	HideMailACT},
X  {"ReScanACT",		ReScanACT},
X};
X
X/*
X * resources
X */
Xtypedef struct _defs {
X  char		*mailbox;
X  Boolean	hide_nomail;
X  Boolean	include_subject;
X  Boolean	flash;
X  int		flash_timeout;
X  int		flash_number;
X  Boolean	beep;
X  char		*mri_file;
X  int		timeout;
X  char		*from_cmd;
X  char		*subject_cmd;
X  Boolean	nomailboxWarningMessage;
X} Defs, *DefsPtr;
Xstatic Defs defaults;
X
Xstatic	int 	timeout;
Xstatic	Boolean	hide_nomail, include_subject, flash, beep;
Xstatic	char	*mailbox, *mri_file;
Xstatic	int	flash_timeout, flash_number;
Xstatic	char	*from_cmd, *subject_cmd;
X
Xstatic XtResource resources[] = {
X  {"mailbox", "Mailbox",
X     XmRString, sizeof (char *),
X     XtOffset (DefsPtr, mailbox),
X     XmRString,
X     NULL},
X
X  {"hideNoMail", "HideNoMail",
X     XmRBoolean, sizeof (Boolean),
X     XtOffset (DefsPtr, hide_nomail),
X     XmRString,
X     "False"},
X
X  {"nomailboxWarningMessage", "NomailboxWarningMessage",
X     XmRBoolean, sizeof (Boolean),
X     XtOffset (DefsPtr, nomailboxWarningMessage),
X     XmRString,
X     "True"},
X
X  {"flash", "Flash",
X     XmRBoolean, sizeof (Boolean),
X     XtOffset (DefsPtr, flash),
X     XmRString,
X     "False"},
X
X  {"beep", "Beep",
X     XmRBoolean, sizeof (Boolean),
X     XtOffset (DefsPtr, beep),
X     XmRString,
X     "False"},
X
X  {"includeSubject", "IncludeSubject",
X     XmRBoolean, sizeof (Boolean),
X     XtOffset (DefsPtr, include_subject),
X     XmRString,
X     "False"},
X
X  {"timeout", "Timeout",
X     XmRInt, sizeof (int),
X     XtOffset (DefsPtr, timeout),
X     XmRString,
X     "60"},
X
X  {"flashTimeout", "FlashTimeout",
X     XmRInt, sizeof (int),
X     XtOffset (DefsPtr, flash_timeout),
X     XmRString,
X     "100"},
X
X  {"flashNumber", "FlashNumber",
X     XmRInt, sizeof (int),
X     XtOffset (DefsPtr, flash_number),
X     XmRString,
X     "10"},
X
X  {"wcResources", "WcResources",
X     XmRString, sizeof (char *),
X     XtOffset (DefsPtr, mri_file),
X     XmRString,
X     "/user/cadroot/lib/Mri/XMailbox.res"},
X
X  {"fromCmd", "FromCmd",
X     XmRString, sizeof (char *),
X     XtOffset (DefsPtr, from_cmd),
X     XmRString,
X     "grep \"From:\""},
X
X  {"subjectCmd", "SubjectCmd",
X     XmRString, sizeof (char *),
X     XtOffset (DefsPtr, subject_cmd),
X     XmRString,
X     "grep \"Subject:\""},
X
X};
X
X/*
X * Command line equivelents
X */
Xstatic XrmOptionDescRec cmd_options[] =
X{
X  {"-mailbox",		".mailbox",	XrmoptionSepArg,	NULL},
X  {"-resources",	".wcResources",	XrmoptionSepArg,	"/user/cadroot/lib/Mri/XMailbox.res"},
X  {"-hide",		".hideNoMail",	XrmoptionNoArg,		"True"},
X  {"-subject",		".includeSubject", XrmoptionNoArg,	"True"},
X  {"-flash",		".flash",	XrmoptionNoArg,		"True"},
X  {"-beep",		".beep",	XrmoptionNoArg,		"True"},
X  {"-timeout",		".timeout",	XrmoptionSepArg,	"60"},
X  {"-ftimeout",		".flashTimeout", XrmoptionSepArg,	"100"},
X  {"-fnumber",		".flashNumber",	XrmoptionSepArg,	"10"},
X  {"-nowarning",	".nomailboxWarningMessage", XrmoptionSepArg, "False"},
X  {"-fromCmd",		".fromCmd",	XrmoptionSepArg,	NULL},
X  {"-subjectCmd",	".subjectCmd",	XrmoptionSepArg,	NULL},
X};
X
X
X/*
X * global vars
X */
Xstatic	XtAppContext 	app;
Xstatic	Widget		text, shell;
Xstatic	Boolean		UP = False;
Xstatic  Boolean		DoAutoRaise = False;
Xstatic  Widget		topshell;
Xstatic	int		last_size;
Xstatic	int		flash_count = 0;
Xstatic	int		box_size = 0;
X
X#define FLASH_MAX	6
X
Xchar	*mystrdup();
Xstatic  void ClearText();
Xstatic	void FlashEvent();
Xstatic	Boolean ScanMBox();
X
Xmain (argc, argv)
Xint	argc;
Xchar	*argv;
X{
X  Widget	appshell;
X  void		TimeOutEvent();
X  char		*resfile;
X  Display	*display;
X  int		n;
X  Arg		args[5];
X  int		mfp;
X
X  topshell = XtInitialize ("xmailbox", "XMailbox",
X			   cmd_options, XtNumber(cmd_options),
X			   &argc, argv);
X#if 0
X  appshell = XtAppCreateShell ("xmailbox", "XMailbox",
X			       applicationShellWidgetClass,
X                               XtDisplay(topshell), NULL, 0);
X#endif
X  n=0;
X  XtSetArg (args[n], XmNtransient, True); n++;
X  shell = XtCreatePopupShell ("xmailbox",
X			      topLevelShellWidgetClass,	
X                              topshell, args, n);
X
X  app = XtWidgetToApplicationContext (topshell);
X
X  XtAppAddActions (app, MYactions, XtNumber(MYactions));
X
X  XtGetApplicationResources (topshell,
X                             &defaults,
X                             resources, XtNumber(resources),
X                             NULL, 0);
X
X  timeout = defaults.timeout;
X  hide_nomail = defaults.hide_nomail;
X  include_subject = defaults.include_subject;
X  flash = defaults.flash;
X  beep = defaults.beep;
X  flash_timeout = defaults.flash_timeout;
X  flash_number = defaults.flash_number;
X  if (flash_number % 2) ++flash_number;
X  if (defaults.mailbox == NULL) {
X    fprintf (stderr,"MUST specify a mailbox resource!\n");
X    exit (1);
X  }
X  mailbox = mystrdup (defaults.mailbox);
X
X  if ((mfp = open (mailbox, O_RDONLY)) == -1) {
X    if (defaults.nomailboxWarningMessage) {
X      fprintf (stderr, "Can't open mailbox: %s\n",mailbox);
X    }
X  }
X
X#ifdef DEBUG
X  printf ("timeout = %d seconds\n", timeout);
X  printf ("hide_nomail = %s\n",((hide_nomail) ? "True" : "False"));
X  printf ("include_subject = %s\n", ((include_subject) ? "True" : "False"));
X  printf ("mailbox = %s\n",mailbox);
X#endif
X
X  RegisterApplicationCallbacks (app);
X  MriRegisterMotif(app);
X
X  resfile = (char *) malloc (strlen(defaults.mri_file) + 1);
X  strcpy (resfile, defaults.mri_file);
X  WcLoadResourceFileCB (shell, resfile, NULL);
X
X  WcWidgetCreation(shell);
X
X  XtRealizeWidget (shell);
X
X#ifdef DEBUG
X  ListWidgetNames (appshell);
X#endif
X
X  XtAppAddTimeOut (app,
X                   1000 * 1,	/* get to it fast for the first time */
X                   TimeOutEvent,
X                   NULL);
X
X  XtPopup (shell, XtGrabNone);
X  UP = True;
X
X  XtMainLoop();
X}
X
Xstatic Boolean first_up = True;
X
Xvoid
XTimeOutEvent (type, id)
Xint             type;
XXtIntervalId    *id;
X{
X  int FLASH = False;
X
X#ifdef DEBUG
X  printf ("timeout ...\n");
X#endif
X
X  FLASH = ScanMBox();
X
X  XtAppAddTimeOut (app,
X                   1000 * timeout,
X                   TimeOutEvent,
X                   NULL);
X
X  if (FLASH) {
X    FLASH = False;
X    flash_count = 0;
X    XtAppAddTimeOut (app,
X		     flash_timeout,
X		     FlashEvent,
X		     NULL);
X  }
X
X  if (first_up) first_up = False;
X
X}
X
Xstatic Boolean
XScanMBox()
X{
X  struct stat stats;
X  int	FLASH = False;
X
X  /*
X   * Try to stat mailbox, see if any mail
X   */
X  stats.st_size = 0;
X  if ((stat (mailbox, &stats) == -1) &&
X      (defaults.nomailboxWarningMessage)) {
X    Error ("Can't stat (open) mailbox");
X    return (True);
X  }
X  else if ((stats.st_size != 0) && (stats.st_size > last_size)) {
X
X    last_size = stats.st_size;
X
X    if (DealWithText(True)) {
X      if (UP) {
X	if (DoAutoRaise) {
X	  XRaiseWindow (XtDisplay (shell), XtWindow (shell));
X	}
X      } else {
X	XtPopup (shell, XtGrabNone);
X	UP = True;
X      }
X    
X      if (beep) {
X	XBell (XtDisplay(shell), 99);
X      }
X
X      if (flash) {
X	FLASH = True;
X      }
X    }
X
X  }
X  else if (stats.st_size == 0) {
X    if (hide_nomail && UP && !first_up) {
X      XtPopdown (shell);
X      UP = False;
X    } else {
X      if (DoAutoRaise)
X	XLowerWindow (XtDisplay (shell), XtWindow (shell));
X    }
X    box_size = 0;
X    last_size = 0;
X    ClearText (NULL, NULL, NULL);
X  }
X  else if (stats.st_size < last_size) {
X    last_size = stats.st_size;
X    box_size = 0;
X    DealWithText (False);	/* recalcualtes box_size */
X  }
X
X  return (FLASH);
X}
X
Xstatic void
XFlashEvent (type, id)
Xint             type;
XXtIntervalId    *id;
X{
X  Arg	args[5];
X  int	n;
X  Pixel	fg, bg;
X  int	pos;
X
X  if (flash_count == flash_number)
X    return;
X
X  pos = XmTextGetLastPosition (text);
X
X  n=0;
X  XtSetArg (args[n], XmNbackground, &bg); n++;
X  XtSetArg (args[n], XmNforeground, &fg); n++;
X  XtGetValues (text, args, n);
X
X  n=0;
X  XtSetArg (args[n], XmNbackground, fg); n++;
X  XtSetArg (args[n], XmNforeground, bg); n++;
X  XtSetValues (text, args, n);
X
X  XmTextSetInsertionPosition (text, pos);
X
X  ++flash_count;
X  XtAppAddTimeOut (app,
X		   flash_timeout,
X		   FlashEvent,
X		   NULL);
X}
X
X/*
X * User accessabible Callback routines
X */
X
Xstatic void
XRegisterText (widget, widgetName, unused)
XWidget  widget;
Xchar*   widgetName;
Xcaddr_t unused;
X{
X  Widget        cp;
X  char          clean[128];
X
X  WcCleanName (widgetName, clean);
X  text = WcFullNameToWidget (widget, clean);
X}
X
Xstatic void
XClearText (widget, widgetName, unused)
XWidget  widget;
Xchar*   widgetName;
Xcaddr_t unused;
X{
X  XmTextSetString (text, NULL);
X}
X
Xstatic void
XHideMail (widget, widgetName, unused)
XWidget  widget;
Xchar*   widgetName;
Xcaddr_t unused;
X{
X  XtPopdown (shell);
X  UP = False;
X}
X
Xstatic void
XAutoRaise (widget, widgetName, unused)
X{
X  DoAutoRaise = !DoAutoRaise;
X}
X
Xstatic void
XReScan (widget, widgetName, unused)
XWidget  widget;
Xchar*   widgetName;
Xcaddr_t unused;
X{
X  box_size = 0;
X  last_size = 0;
X  ClearText (NULL, NULL, NULL);
X  ScanMBox();
X}
X
XRegisterApplicationCallbacks (app)
XXtAppContext app;
X{
X#define RCALL( name, func ) WcRegisterCallback ( app, name, func, NULL );
X
X  RCALL ( "RegisterText",  	RegisterText       );
X  RCALL ( "ClearTextCB",	ClearText	   );
X  RCALL ( "HideMailCB",		HideMail	   );
X  RCALL ( "ReScanCB",		ReScan		   );
X  /*
X   * and for backward compatability
X   */
X  RCALL ( "ClearText",		ClearText	   );
X  RCALL ( "HideMail",		HideMail	   );
X  RCALL ( "ReScan",		ReScan		   );
X  RCALL ( "AutoRaise",		AutoRaise	   );
X}
X
XDealWithText(displayit)
XBoolean displayit;
X{
X  int pos, THIS_POS;
X  char	cmd[128];
X  FILE	*popen(), *fp, *sp;
X  char	from[180], subject[180];
X  int	index;
X  char	*tok;
X  int	ret = False;
X
X  sprintf (cmd,"%s %s",defaults.from_cmd,mailbox);
X
X  if ((fp = popen (cmd, "r")) == NULL) {
X    Error ("Problems reading From from mailbox");
X    return (0);
X  }
X
X  if (include_subject) {
X
X    sprintf (cmd,"%s %s",defaults.subject_cmd,mailbox);
X
X    if ((sp = popen (cmd, "r")) == NULL) {
X      Error ("Problems reading Subject from mailbox");
X      pclose (fp);
X      return (0);
X    }
X
X  }
X
X  index = 0;
X  while (fgets (from, 180, fp) != NULL) {
X    if (include_subject) {
X      fgets (subject, 180, sp);
X    }
X
X    if (index++ < box_size) {
X      continue;
X    }
X
X#ifdef DEBUG
X    printf (">> %s ...\n", from);
X#endif
X
X    ++box_size;
X
X    if (!displayit)
X      continue;
X
X    ret = True;
X
X    if (!include_subject) {
X      if (from[strlen(from)-1] != '\n') {
X	from[strlen(from)-1] = '\n';
X      }
X      tok = from;
X      THIS_POS = 
X      pos = XmTextGetLastPosition (text);
X      XmTextReplace (text, pos, pos, tok);
X    }
X    else {
X      if (from[strlen(from)-1] == '\n') {
X	from[strlen(from)-1] = '\0';
X      }
X      if (subject[strlen(subject)-1] != '\n') {
X	subject[strlen(subject)-1] = '\n';
X      }
X      tok = from;
X      THIS_POS = 
X      pos = XmTextGetLastPosition (text);
X      XmTextReplace (text, pos, pos, tok);
X
X      tok = subject;
X      pos = XmTextGetLastPosition (text);
X      XmTextReplace (text, pos, pos, tok);
X    }
X    bzero (from, 80);
X    bzero (subject, 80);
X  }
X
X  XmTextSetInsertionPosition (text, THIS_POS);
X
X  pclose(fp);
X  if (include_subject)
X    pclose(sp);
X
X  return (ret);
X}
X
XError (msg) 
Xchar *msg;
X{
X  fprintf (stderr, "xmailbox Warning: %s\n", msg);
X}
X
Xchar *
Xmystrdup (str)
Xchar	*str;
X{
X  char	*ret = (char *) malloc (strlen(str) + 1);
X  strcpy (ret, str);
X  return (ret);
X}
X
X/*
X * action functions - they mearly call thier callback equivelents
X */
Xstatic void
XClearTextACT()
X{
X  ClearText();
X}
X
Xstatic void
XHideMailACT()
X{
X  HideMail();
X}
X
Xstatic void
XReScanACT()
X{
X  ReScan();
X}
X
!STUFFY!FUNK!
echo Extracting Wc/Makefile
sed >Wc/Makefile <<'!STUFFY!FUNK!' -e 's/X//'
X# Makefile generated by imake - do not edit!
X# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
X#
X# The cpp used on this machine replaces all newlines and multiple tabs and
X# spaces in a macro expansion with a single space.  Imake tries to compensate
X# for this, but is not always successful.
X#
X
X###########################################################################
X# Makefile generated from "Imake.tmpl" and </tmp/IIf.a14364>
X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
X#
X# Platform-specific parameters may be set in the appropriate .cf
X# configuration files.  Site-wide parameters may be set in the file
X# site.def.  Full rebuilds are recommended if any parameters are changed.
X#
X# If your C preprocessor doesn't define any unique symbols, you'll need
X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
X# "make Makefile", "make Makefiles", or "make World").
X#
X# If you absolutely can't get imake to work, you'll need to set the
X# variables at the top of each Makefile as well as the dependencies at the
X# bottom (makedepend will do this automatically).
X#
X
X###########################################################################
X# platform-specific configuration parameters - edit sun.cf to change
X
XSYSLIBS=-lXt -lX11
XMWM_DEFINES=-DLARGECURSORS -DSHAPE -DOPAQUE
X
X# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
X# operating system:  SunOS 4.1
X
X###########################################################################
X# site-specific configuration parameters - edit site.def to change
X
X# site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
X
X            SHELL = /bin/sh
X
X              TOP = ../.
X      CURRENT_DIR = ./Wc
X
X               AR = ar cq
X  BOOTSTRAPCFLAGS =
X               CC = cc
X
X         COMPRESS = compress
X              CPP = /lib/cpp $(STD_CPP_DEFINES)
X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
X          INSTALL = install
X               LD = ld
X             LINT = lint
X      LINTLIBFLAG = -C
X         LINTOPTS = -axz
X               LN = ln -s
X             MAKE = make
X               MV = mv
X               CP = cp
X           RANLIB = ranlib
X  RANLIBINSTFLAGS =
X               RM = rm -f
X     STD_INCLUDES =
X  STD_CPP_DEFINES =
X      STD_DEFINES =
X EXTRA_LOAD_FLAGS =
X  EXTRA_LIBRARIES =
X             TAGS = ctags
X
X    SHAREDCODEDEF = -DSHAREDCODE
X         SHLIBDEF = -DSUNSHLIB
X
X    PROTO_DEFINES =
X
X     INSTPGMFLAGS =
X
X     INSTBINFLAGS = -m 0755
X     INSTUIDFLAGS = -m 4755
X     INSTLIBFLAGS = -m 0664
X     INSTINCFLAGS = -m 0444
X     INSTMANFLAGS = -m 0444
X     INSTDATFLAGS = -m 0444
X    INSTKMEMFLAGS = -m 4755
X
X          DESTDIR =
X
X     TOP_INCLUDES = -I$(INCROOT)
X
X      CDEBUGFLAGS = -O
X        CCOPTIONS = -D_NO_PROTO -DSTRINGS_ALIGNED -DNO_REGEX
X      COMPATFLAGS =
X
X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
X   LDCOMBINEFLAGS = -X -r
X
X        MACROFILE = sun.cf
X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
X
X    IMAKE_DEFINES =
X
X         IRULESRC = $(CONFIGDIR)
X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
X
X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
X			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
X			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
X
X###########################################################################
X# X Window System Build Parameters
X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
X
X###########################################################################
X# X Window System make variables; this need to be coordinated with rules
X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
X
X          PATHSEP = /
X        USRLIBDIR = $(DESTDIR)/usr/lib
X           BINDIR = $(DESTDIR)/usr/bin/X11
X          INCROOT = $(DESTDIR)/usr/include
X     BUILDINCROOT = $(TOP)
X      BUILDINCDIR = $(BUILDINCROOT)/X11
X      BUILDINCTOP = ..
X           INCDIR = $(INCROOT)/X11
X           ADMDIR = $(DESTDIR)/usr/adm
X           LIBDIR = $(USRLIBDIR)/X11
X        CONFIGDIR = $(LIBDIR)/config
X       LINTLIBDIR = $(USRLIBDIR)/lint
X
X          FONTDIR = $(LIBDIR)/fonts
X         XINITDIR = $(LIBDIR)/xinit
X           XDMDIR = $(LIBDIR)/xdm
X           AWMDIR = $(LIBDIR)/awm
X           TWMDIR = $(LIBDIR)/twm
X           GWMDIR = $(LIBDIR)/gwm
X          MANPATH = $(DESTDIR)/usr/man
X    MANSOURCEPATH = $(MANPATH)/man
X           MANDIR = $(MANSOURCEPATH)n
X        LIBMANDIR = $(MANSOURCEPATH)3
X      XAPPLOADDIR = $(LIBDIR)/app-defaults
X
X        SOXLIBREV = 4.2
X          SOXTREV = 4.0
X         SOXAWREV = 4.0
X        SOOLDXREV = 4.0
X         SOXMUREV = 4.0
X        SOXEXTREV = 4.0
X
X       FONTCFLAGS = -t
X
X     INSTAPPFLAGS = $(INSTDATFLAGS)
X
X            IMAKE = imake
X           DEPEND = makedepend
X              RGB = rgb
X            FONTC = bdftosnf
X        MKFONTDIR = mkfontdir
X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
X
X        CONFIGSRC = $(TOP)/config
X        CLIENTSRC = $(TOP)/clients
X          DEMOSRC = $(TOP)/demos
X           LIBSRC = $(TOP)/lib
X          FONTSRC = $(TOP)/fonts
X       INCLUDESRC = $(TOP)/X11
X        SERVERSRC = $(TOP)/server
X          UTILSRC = $(TOP)/util
X        SCRIPTSRC = $(UTILSRC)/scripts
X       EXAMPLESRC = $(TOP)/examples
X       CONTRIBSRC = $(TOP)/../contrib
X           DOCSRC = $(TOP)/doc
X           RGBSRC = $(TOP)/rgb
X        DEPENDSRC = $(UTILSRC)/makedepend
X         IMAKESRC = $(CONFIGSRC)
X         XAUTHSRC = $(LIBSRC)/Xau
X          XLIBSRC = $(LIBSRC)/X
X           XMUSRC = $(LIBSRC)/Xmu
X       TOOLKITSRC = $(LIBSRC)/Xt
X       AWIDGETSRC = $(LIBSRC)/Xaw
X       OLDXLIBSRC = $(LIBSRC)/oldX
X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
X     EXTENSIONSRC = /cdb2/X11R4/mit/extensions
X
X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
X     EXTENSIONLIB =  -lXext
X
X          DEPXLIB = $(DEPEXTENSIONLIB)
X             XLIB = $(EXTENSIONLIB) -lX11
X
X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
X         XAUTHLIB =  -lXau
X
X        DEPXMULIB =
X           XMULIB = -lXmu
X
X       DEPOLDXLIB =
X          OLDXLIB = -loldX
X
X      DEPXTOOLLIB =
X         XTOOLLIB = -lXt
X
X        DEPXAWLIB =
X           XAWLIB = -lXaw
X
X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
X
X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
X
X         DEPLIBS1 = $(DEPLIBS)
X         DEPLIBS2 = $(DEPLIBS)
X         DEPLIBS3 = $(DEPLIBS)
X
X###########################################################################
X# Imake rules for building libraries, programs, scripts, and data files
X# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
X
X###########################################################################
X# start of Imakefile
X
X###########################################################################
X# Imake rules for building and installing libraries, programs,
X# apps-defaults, and other data files.  Unlike Imake.rules, these
X# rules allow files to be installed anywhere.
X#
X# These rules *override* rules of the same name defined in Imake.rules!!
X#
X# New variables:
X#	INSTBIN		default to $BINDIR - programs installed here
X#	INSTMAN		default to $MANDIR - man pages installed here
X#	INSTAPP		default to $XAPPLOADDIR - apps-defaults files go here
X#
X# David E. Smyth: Install.rules Wed Jan  2 07:12:10 PST 1991
X
X###########################################################################
X# Makefile defines for Widget Creation Library distribution.
X# David E. Smyth: Wc.tmpl Wed Jan  2 07:44:04 PST 1991
X
X# What I use for pre-release testing
X
X      INSTLIB = /u/tds/david/tmp/lib
X      INSTLIN = /u/tds/david/tmp/lib/lint
X      INSTINC = /u/tds/david/tmp/include
X      INSTBIN = /u/tds/david/tmp/bin
X      INSTMAN = /u/tds/david/tmp/man/man1
X      INSTAPP = /u/tds/david/tmp/app-defaults
X
X      MKDIRHIER = /bin/sh /u/tds/david/bin/mkdirhier.sh
X
X   WCTOPDIR = .
X
X      WCLIB = -L$(INSTLIB) -lWc
X      XPLIB = -L$(INSTLIB) -lXp
X     XMPLIB = -L$(INSTLIB) -lXmp
X
X    SoWcRev = 1.05
X
X# Imakefile for libWc
X# This file is derived from mit/lib/Xt/Imakefile
X
X# If you are building libWc to run on top of an Xt older
X# than X11R4, then you must add Xt4GetResL.o to the list
X# of object files built into libWc.
X# Just define 0 to 1 (see ../Wc.tmpl) and it will build properly.
X
X    APP_DEFINES = -DXAPPLOADDIR=\"$(XAPPLOADDIR)$(PATHSEP)\"
X
XHEADERS = WcCreate.h WcCreateP.h
X
XSRCS = \
X	WcActions.c \
X	WcCallb.c \
X	WcConvert.c \
X	WcCreate.c \
X	WcName.c \
X	WcReg.c \
X	WcRegXt.c \
X	$(OLD_XT_SRCS)
X
XOBJS = \
X	WcActions.o \
X	WcCallb.o \
X	WcConvert.o \
X	WcCreate.o \
X	WcName.o \
X	WcReg.o \
X	WcRegXt.o \
X	$(OLD_XT_OBJS)
X
Xall::
X
Xall::
X	@if [ ! -d shared ]; then mkdir shared; else exit 0; fi
X
X.c.o:
X	$(RM) $@ shared/$@
X	$(CC) -pic -c $(SHAREDCODEDEF) $(SHLIBDEF) $(CFLAGS) $*.c
X	$(MV) $*.o shared/$*.o
X	$(CC) -c $(SHLIBDEF) $(CFLAGS) $*.c
X
Xclean::
X	- at if [ -d shared ]; then echo "	$(RM) shared/?*.o"; \
X	$(RM) shared/?*.o; else exit 0; fi
X
Xall::
X	@if [ ! -d shared ]; then mkdir shared; else exit 0; fi
X
XWcCallb.o: $(ICONFIGFILES)
X	$(RM) $@ shared/$@
X	$(CC) -pic -c $(SHAREDCODEDEF) $(SHLIBDEF) $(CFLAGS) $(APP_DEFINES) $*.c
X	$(MV) $*.o shared/$*.o
X	$(CC) -c $(SHLIBDEF) $(CFLAGS) $(APP_DEFINES) $*.c
X
Xall:: libWc.so.$(SoWcRev)
X
XlibWc.so.$(SoWcRev): $(OBJS)
X	$(RM) $@~
X	(cd shared; $(LD) -o ../$@~ -assert pure-text $(OBJS))
X	$(RM) $@
X	$(MV) $@~ $@
X
Xclean::
X	$(RM) libWc.so.$(SoWcRev)
X
Xinstall:: libWc.so.$(SoWcRev)
X	$(INSTALL) -c $(INSTLIBFLAGS) libWc.so.$(SoWcRev) $(INSTLIB)
X
Xall:: libWc.a
X
XlibWc.a: $(OBJS)
X	$(RM) $@
X	$(AR) $@ $(OBJS)
X	$(RANLIB) $@
X
Xinstall:: libWc.a
X	$(INSTALL) -c $(INSTLIBFLAGS) libWc.a $(INSTLIB)
X	$(RANLIB) $(RANLIBINSTFLAGS) $(INSTLIB)/libWc.a
X
Xlintlib:: llib-lWc.ln
X
Xllib-lWc.ln: $(SRCS)
X	$(RM) $@
X	$(LINT) $(LINTLIBFLAG)Wc $(LINTFLAGS) $(SRCS)
X
Xinstall.ln:: llib-lWc.ln
X	$(INSTALL) -c $(INSTLIBFLAGS) llib-lWc.ln $(INSTLIN)
X
Xinstall::
X	$(MKDIRHIER) $(INSTINC)/Wc
X
Xinstall:: $(HEADERS)
X	@case '${MFLAGS}' in *[i]*) set +e;; esac; \
X	for i in $(HEADERS); do \
X	(set -x; $(INSTALL) -c $(INSTALLFLAGS) $$i $(INSTINC)/Wc); \
X	done
X
Xdepend::
X	$(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
X
Xlint:
X	$(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
Xlint1:
X	$(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
X
X###########################################################################
X# common rules for all Makefiles - do not edit
X
Xemptyrule::
X
Xclean::
X	$(RM_CMD) \#*
X
XMakefile::
X	- at if [ -f Makefile ]; then \
X	echo "	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
X	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
X	else exit 0; fi
X	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
X
Xtags::
X	$(TAGS) -w *.[ch]
X	$(TAGS) -xw *.[ch] > TAGS
X
X###########################################################################
X# empty rules for directories that do not have SUBDIRS - do not edit
X
Xinstall::
X	@echo "install in $(CURRENT_DIR) done"
X
Xinstall.man::
X	@echo "install.man in $(CURRENT_DIR) done"
X
XMakefiles::
X
Xincludes::
X
X###########################################################################
X# dependencies generated by makedepend
X
!STUFFY!FUNK!
echo Extracting Mri/M08_Periodic
sed >Mri/M08_Periodic <<'!STUFFY!FUNK!' -e 's/X//'
X! This example is taken from the periodic demo which came with Motif 1.0
X! and was developed by Michael K. Yee at OSF.  To quote the original
X! README:
X! 
X! 	Periodic is a demo of the displayable widgets in 
X!	Motif.  Periodic presents many Motif widgets for 
X!	your visual and sensual enjoyment.
X!
X
XMri.wcChildren:	main
XMri.title:	M08_Periodic
X
X*background:	Turquoise
X*fontList:	-adobe-new century schoolbook-medium-r-normal--10-*
X
X*main.wcConstructor:		XmCreateMainWindow
X*main.wcChildren:		menuBar, table
X
X# If you want scrollbars, uncomment this line
X#*main.scrollingPolicy:	AUTOMATIC
X
X##################################################################
X# Minimal menu bar
X##################################################################
X
X*menuBar.wcConstructor:	XmCreateMenuBar
X*menuBar.wcCallback:	WcSetValueCB(*main.menuBar: this)
X*menuBar.wcChildren:	fileMenu, File, Edit, Help
X*menuBar*fontList:	-b&h-lucida-medium-i-normal-sans-12-120-*
X
X*fileMenu.wcConstructor:	XmCreatePulldownMenu
X*fileMenu.wcChildren:		Quit
X*fileMenu.wcManaged:		false
X
X*Quit.wcConstructor:	XmCreateCascadeButton
X*Quit.activateCallback:	WcExitCB
X
X*File.wcConstructor:	XmCreateCascadeButton
X*File.subMenuId:	*fileMenu
X
X*Edit.wcConstructor:	XmCreateCascadeButton
X
X*Help.wcConstructor:	XmCreateCascadeButton
X*Help.wcCallback:	WcSetValueCB( ^.menuHelpWidget: this )
X
X##################################################################
X# Table Widget for Periodic Table
X##################################################################
X
X*table.wcClassName:	Table
X*table.wcCallback:	WcSetValueCB(*main.workWindow: this)
X*table.wcChildren:	title, \
X			02, 03, 04, 05, 06, 62, \
X			17, 27, 47, 57, \
X			Ia, 1, 2, 3, 4, 5, \
X			IIa, 6, 7, 8, 9, \
X			IIIb, 10, \
X			IVa, 11, 12, 16, \
X			Va, 13, 14, 15, dialogs, 19
X#				name	c r cs rs opt	
X*table.layout:			title	2 1  4  1	;\
X	Ia 1 1;\
X02 0 2;	1  1 2;	IIa 2 2;				Va 5 2;	62 6 2;\
X03 0 3;	2  1 3;	6   2 3; IIIb 3 3;	IVa 4 3;	13 5 3;\
X04 0 4;	3  1 4;	7   2 4; 10 3 4 1 3;	11  4 4;	14 5 4;\
X05 0 5;	4  1 5;	8   2 5;		12  4 5;	15 5 5;\
X06 0 6;	5  1 6;	9   2 6;		16  4 6 2 1;\
X	17 1 7;	27  2 7;		47  4 7;	57 5 7;\
X	dialogs 1 8 5 1;\
X	19 1 9;
X
X*title.wcConstructor:	XmCreateLabel
X*title.labelString:	The Periodic Table Of Motif Widgets
X*title.fontList:	-b&h-lucida-bold-i-normal-sans-34-240-*
X
X# The following are simply for spacing.  Composite is
X# perhaps the simplest Motif widget which can be created.
X*table.Composite.Width:		120
X*table.Composite.Height:	120
X*table.Composite.borderWidth:	0
X*table.02.wcClassName:	Composite
X*table.02.width:		20
X*table.03.wcClassName:	Composite
X*table.03.width:		20
X*table.04.wcClassName:	Composite
X*table.04.width:		20
X*table.05.wcClassName:	Composite
X*table.05.width:		20
X*table.06.wcClassName:	Composite
X*table.06.width:		20
X*table.62.wcClassName:	Composite
X*table.62.width:		20
X*table.17.wcClassName:	Composite
X*table.17.height:		20
X*table.27.wcClassName:	Composite
X*table.27.height:		20
X*table.47.wcClassName:	Composite
X*table.47.height:		20
X*table.57.wcClassName:	Composite
X*table.57.height:		20
X*table.19.wcClassName:	Composite
X*table.19.height:		20
X
X# Labels above the columns:  I use the same "display box"
X# as for widget types, but I just null out the label strings
X# and change the type fo the bottom widget to label.  
X
X*filler.wcClassName:	XmLabel
X*filler.labelString:
X
X*table.Ia.wcClassName:		Table
X*table.Ia.wcChildren:		filler, Ia
X*table.Ia.layout: 		filler 0 0; Ia 0 1 hH;
X*table.Ia.borderWidth:		0
X*table.Ia.Ia.wcClassName:	XmLabel
X
X*table.IIa.wcClassName:		Table
X*table.IIa.wcChildren:		filler, IIa
X*table.IIa.layout: 		filler 0 0; IIa 0 1 hH;
X*table.IIa.borderWidth:		0
X*table.IIa.IIa.wcClassName:	XmLabel
X
X*table.IIIb.wcClassName:	Table
X*table.IIIb.wcChildren:		filler, IIIb
X*table.IIIb.layout: 		filler 0 0; IIIb 0 1 hH;
X*table.IIIb.borderWidth:	0
X*table.IIIb.IIIb.wcClassName:	XmLabel
X
X*table.IVa.wcClassName:		Table
X*table.IVa.wcChildren:		filler, IVa
X*table.IVa.layout: 		filler 0 0; IVa 0 1 hH;
X*table.IVa.borderWidth:		0
X*table.IVa.IVa.wcClassName:	XmLabel
X
X*table.Va.wcClassName:		Table
X*table.Va.wcChildren:		filler, Va
X*table.Va.layout: 		filler 0 0; Va 0 1 hH;
X*table.Va.borderWidth:		0
X*table.Va.Va.wcClassName:	XmLabel
X
X# These are the widget display boxes:
X
X*table*Table.WcChildren:	an, w, n
X*table*Table.Layout:		an 1 0 1 1 hH; w 0 1 2 1 ; n 0 2 2 1 hH;
X*table*Table.rowSpacing:	10
X*table*Table.borderWidth:	1
X*table.Table.an.wcClassName:	XmLabel
X*table.Table.an.alignment:	ALIGNMENT_END
X*table*Table.n.wcClassName:	XmPushButton
X
X*1.wcClassName:		Table
X*1.an.labelString:	1
X*1.w.wcClassName:	XmSeparator
X*1.n.labelString:	XmSeparator
X
X*2.wcClassName:		Table
X*2.an.labelString:	2
X*2.w.wcClassName:	XmArrowButton
X*2.n.labelString:	XmArrowButton
X
X*3.wcClassName:		Table
X*3.an.labelString:	3
X*3.w.wcClassName:	XmPushButton
X*3.w.labelString:	Format Disk
X*3.n.labelString:	XmPushButton
X
X*4.wcClassName:		Table
X*4.an.labelString:	4
X*4.w.wcClassName:	XmToggleButton
X*4.w.labelString:	Lights
X*4.n.labelString:	XmToggleButton
X
X*5.wcClassName:		Table
X*5.an.labelString:	5
X*5.w.wcClassName:	XmLabel
X*5.w.labelString:	Don't Panic
X*5.n.labelString:	XmLabel
X
X# Note that we must have a resource name with more componenets in
X# order to override the common specification for Table.WcChildren above!
X#
X*6.wcClassName:		Table
X*table*6.wcChildren:	an, colorOptions, w, n
X*6.an.labelString:	6
X*6.colorOptions.wcConstructor:	XmCreatePulldownMenu
X*6.colorOptions.wcManaged:	False
X*6.colorOptions.wcChildren:	red, orange, yellow, green, blue, purple
X*6*colorOptions.red.wcClassName:	XmPushButton
X*6*colorOptions.orange.wcClassName:	XmPushButton
X*6*colorOptions.yellow.wcClassName:	XmPushButton
X*6*colorOptions.green.wcClassName:	XmPushButton
X*6*colorOptions.blue.wcClassName:	XmPushButton
X*6*colorOptions.purple.wcClassName:	XmPushButton
X# ^	Note the asterisk needed here!!  colorOptions is actually
X#	a child of a menu shell created by XmCreatePulldownMenu.
X*6.w.wcConstructor:	XmCreateOptionMenu
X*6.w.labelString:	color
X*6.w.subMenuId:		*6*colorOptions
X*6.n.labelString:	XmOptionMenu
X
X*7.wcClassName:		Table
X*7.an.labelString:	7
X*7.w.wcClassName:		XmScale
X*7.w.wcChildren:		min, |, max
X*7.w.decimalPoints:		1
X*7.w.maximum:			50
X*7.w.orientation:		HORIZONTAL
X*7.w.processingDirection:	MAX_ON_RIGHT
X*7.w.showValue:			True
X*7.w.titleString:		Warp Factor
X*7.w.min.wcClassName:		XmLabel
X*7.w.min.labelString:		0
X*7.w.|.wcClassName:		XmLabel
X*7.w.max.wcClassName:		XmLabel
X*7.w.max.labelString:		5
X*7.n.labelString:	XmScale
X
X*8.wcClassName:		Table
X*8.an.labelString:	8
X*8.w.wcConstructor:	XmCreateRadioBox
X*8.w.wcChildren:	WFNX, WCRB, WHKY
X*8.w.WFNX.wcClassName:	XmToggleButtonGadget
X*8.w.WCRB.wcClassName:	XmToggleButtonGadget
X*8.w.WHKY.wcClassName:	XmToggleButtonGadget
X*8.n.labelString:	XmRadioBox
X
X*9.wcClassName:		Table
X*9.an.labelString:	9
X*9.w.wcClassName:	XmText
X*9.w.value:		Hello World
X*9.n.labelString:	XmText
X
X*10.wcClassName:	Table
X*10.an.labelString:	10
X*10.w.wcClassName:	XmFileSelectionBox
X*10.w.dirMask:		*.c
X*10.n.labelString:	XmFileSelectionBox
X
X*11.wcClassName:	Table
X*table.11.rowSpacing:	30
X*11.an.labelString:	11
X*11.w.wcClassName:	XmScrollBar
X*11.w.orientation:	HORIZONTAL
X*11.w.height:		20
X*11.n.labelString:	XmScrollBar
X
X# Remember that XmCreateScrolledList creates an intermediate
X# parent named wSW, and that is the widget the table lays out.
X#
X*12.wcClassName:	Table
X*table.12.layout:	an 1 0 1 1 hH; wSW 0 1 2 1 ; n 0 2 2 1 hH;
X*12.an.labelString:	12
X*12.w.wcConstructor:	XmCreateScrolledList
X*12*w.items:		Foobar, Mumble, Glorp, Reggae, Rock, and, Roll
X*12*w.itemCount:	7
X*12*w.visibleItemCount:	3
X*12*w.listMarginWidth:	3
X*12.n.labelString:	XmScrolledList
X
X# Note that the XmCascadeButton which pops-up the demoMenu
X# MUST be a child of an XmRowColumn.  I used XmCreateMenuBar
X# to create the row column, because that it usually what
X# you will use when you've got pull-down menus.  If the
X# cascade button is not a child of an XmRowColumn, you
X# will get a core dump in Motif.  Sorry, I can't fix that here.
X#
X*13.wcClassName:	Table
X*13.an.labelString:	13
X*13.n.labelString:	XmPulldownMenu
X*13.w.wcConstructor:	XmCreateMenuBar
X*13.w.wcChildren:	demoMenu, menuButton
X*13.w.menuButton.wcClassName:	XmCascadeButton
X*13.w.menuButton.labelString:	Press For Menu
X*13.w.menuButton.subMenuId:	*13.w*demoMenu
X*13.w.demoMenu.wcConstructor:	XmCreatePulldownMenu
X*13.w.demoMenu.wcManaged:	False
X*13.w.demoMenu.wcChildren:	title, Black, Blue, Coral, LimeGreen, \
X				Cyan, Goldenrod, Magenta, Pink
X*13.w*demoMenu.title.wcConstructor:	XmCreateLabel
X*13.w*demoMenu.title.labelString:	Choose Color of XmDrawingArea:
X*13.w*demoMenu.title.fontList:	-b&h-lucida-bold-i-normal-sans-12-120-*
X*13.w*demoMenu*FontList:	-b&h-lucida-medium-r-normal-sans-12-120-*
X#    ^	Note the asterisk needed here!!  demoMenu is actually
X#	a child of a menu shell created by XmCreatePulldownMenu.
X
X
X*13*Black.wcClassName:		XmCascadeButton
X*13*Blue.wcClassName:		XmCascadeButton
X*13*Coral.wcClassName:		XmCascadeButton
X*13*LimeGreen.wcClassName:	XmCascadeButton
X*13*Cyan.wcClassName:		XmCascadeButton
X*13*Goldenrod.wcClassName:	XmCascadeButton
X*13*Magenta.wcClassName:	XmCascadeButton
X*13*Pink.wcClassName:		XmCascadeButton
X
X*13*Black.activateCallback:	WcSetValueCB(*14.w.background: Black)
X*13*Blue.activateCallback:	WcSetValueCB(*14.w.background: Blue)
X*13*Coral.activateCallback:	WcSetValueCB(*14.w.background: Coral)
X*13*LimeGreen.activateCallback:	WcSetValueCB(*14.w.background: LimeGreen)
X*13*Cyan.activateCallback:	WcSetValueCB(*14.w.background: Cyan)
X*13*Goldenrod.activateCallback:	WcSetValueCB(*14.w.background: Goldenrod)
X*13*Magenta.activateCallback:	WcSetValueCB(*14.w.background: Magenta)
X*13*Pink.activateCallback:	WcSetValueCB(*14.w.background: Pink)
X
X*14.wcClassName:	Table
X*14.an.labelString:	14
X*14.w.wcClassName:	XmDrawingArea
X*14.w.background:	RoyalBlue
X*14.n.labelString:	XmDrawingArea
X
X*15.wcClassName:	Table
X*15.an.labelString:	15
X*15.w.wcClassName:	XmDrawnButton
X*15.n.labelString:	XmDrawnButton
X
X*16.wcClassName:	Table
X*16.an.labelString:	16
X*16.w.wcClassName:	XmPanedWindow
X*16.w.wcChildren:	text1, text2
X*16.w.text1.wcClassName:	XmText
X*16.w.text1.value:		Motif Resource Interpreter
X*16.w.text2.wcClassName:	XmText
X*16.w.text2.value:		Version 1.04
X*16.n.labelString:	XmPanedWindow
X
X# Again, there is another wcChildren specification earlier which says
X# all Table children of *table have three children, named an, w, and n.
X# In order to override that specification, we've got to give a LONGER
X# specification here:
X*dialogs.wcClassName:	Table
X*table*dialogs.wcChildren:	error, info, question, warn, work
X*table.dialogs.borderWidth: 0
X*table.dialogs.layout:	error 0 0; info 1 0; question 2 0; warn 3 0; work 4 0;
X*table.dialogs.columnSpacing:	10
X
X*dialogs.XmMessageBox.borderWidth: 1
X
X*error.wcClassName:	XmMessageBox
X*error.dialogType:	DIALOG_ERROR
X*error.messageString:	Error Dialog
X
X*info.wcClassName:	XmMessageBox
X*info.dialogType:	DIALOG_INFORMATION
X*info.messageString:	Information Dialog
X
X*message.wcClassName:		XmMessageBox
X*message.dialogType:		DIALOG_MESSAGE
X*message.messageString:		Message Dialog
X
X*question.wcClassName:		XmMessageBox
X*question.dialogType:		DIALOG_QUESTION
X*question.messageString:	Question Dialog
X
X*warn.wcClassName:		XmMessageBox
X*warn.dialogType:		DIALOG_WARNING
X*warn.messageString:		Warning Dialog
X
X*work.wcClassName:		XmMessageBox
X*work.dialogType:		DIALOG_WORKING
X*work.messageString:		Working Dialog
!STUFFY!FUNK!
echo Extracting Xmp/Makefile
sed >Xmp/Makefile <<'!STUFFY!FUNK!' -e 's/X//'
X# Makefile generated by imake - do not edit!
X# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
X#
X# The cpp used on this machine replaces all newlines and multiple tabs and
X# spaces in a macro expansion with a single space.  Imake tries to compensate
X# for this, but is not always successful.
X#
X
X###########################################################################
X# Makefile generated from "Imake.tmpl" and <Imakefile>
X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
X#
X# Platform-specific parameters may be set in the appropriate .cf
X# configuration files.  Site-wide parameters may be set in the file
X# site.def.  Full rebuilds are recommended if any parameters are changed.
X#
X# If your C preprocessor doesn't define any unique symbols, you'll need
X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
X# "make Makefile", "make Makefiles", or "make World").
X#
X# If you absolutely can't get imake to work, you'll need to set the
X# variables at the top of each Makefile as well as the dependencies at the
X# bottom (makedepend will do this automatically).
X#
X
X###########################################################################
X# platform-specific configuration parameters - edit sun.cf to change
X
XSYSLIBS=-lXt -lX11
XMWM_DEFINES=-DLARGECURSORS -DSHAPE -DOPAQUE
X
X# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
X# operating system:  SunOS 4.1
X
X###########################################################################
X# site-specific configuration parameters - edit site.def to change
X
X# site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
X
X            SHELL = /bin/sh
X
X              TOP = ../.
X      CURRENT_DIR = ./Xmp
X
X               AR = ar cq
X  BOOTSTRAPCFLAGS =
X               CC = cc
X
X         COMPRESS = compress
X              CPP = /lib/cpp $(STD_CPP_DEFINES)
X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
X          INSTALL = install
X               LD = ld
X             LINT = lint
X      LINTLIBFLAG = -C
X         LINTOPTS = -axz
X               LN = ln -s
X             MAKE = make
X               MV = mv
X               CP = cp
X           RANLIB = ranlib
X  RANLIBINSTFLAGS =
X               RM = rm -f
X     STD_INCLUDES =
X  STD_CPP_DEFINES =
X      STD_DEFINES =
X EXTRA_LOAD_FLAGS =
X  EXTRA_LIBRARIES =
X             TAGS = ctags
X
X    SHAREDCODEDEF = -DSHAREDCODE
X         SHLIBDEF = -DSUNSHLIB
X
X    PROTO_DEFINES =
X
X     INSTPGMFLAGS =
X
X     INSTBINFLAGS = -m 0755
X     INSTUIDFLAGS = -m 4755
X     INSTLIBFLAGS = -m 0664
X     INSTINCFLAGS = -m 0444
X     INSTMANFLAGS = -m 0444
X     INSTDATFLAGS = -m 0444
X    INSTKMEMFLAGS = -m 4755
X
X          DESTDIR =
X
X     TOP_INCLUDES = -I$(INCROOT)
X
X      CDEBUGFLAGS = -O
X        CCOPTIONS = -D_NO_PROTO -DSTRINGS_ALIGNED -DNO_REGEX
X      COMPATFLAGS =
X
X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
X   LDCOMBINEFLAGS = -X -r
X
X        MACROFILE = sun.cf
X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
X
X    IMAKE_DEFINES =
X
X         IRULESRC = $(CONFIGDIR)
X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
X
X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
X			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
X			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
X
X###########################################################################
X# X Window System Build Parameters
X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
X
X###########################################################################
X# X Window System make variables; this need to be coordinated with rules
X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
X
X          PATHSEP = /
X        USRLIBDIR = $(DESTDIR)/usr/lib
X           BINDIR = $(DESTDIR)/usr/bin/X11
X          INCROOT = $(DESTDIR)/usr/include
X     BUILDINCROOT = $(TOP)
X      BUILDINCDIR = $(BUILDINCROOT)/X11
X      BUILDINCTOP = ..
X           INCDIR = $(INCROOT)/X11
X           ADMDIR = $(DESTDIR)/usr/adm
X           LIBDIR = $(USRLIBDIR)/X11
X        CONFIGDIR = $(LIBDIR)/config
X       LINTLIBDIR = $(USRLIBDIR)/lint
X
X          FONTDIR = $(LIBDIR)/fonts
X         XINITDIR = $(LIBDIR)/xinit
X           XDMDIR = $(LIBDIR)/xdm
X           AWMDIR = $(LIBDIR)/awm
X           TWMDIR = $(LIBDIR)/twm
X           GWMDIR = $(LIBDIR)/gwm
X          MANPATH = $(DESTDIR)/usr/man
X    MANSOURCEPATH = $(MANPATH)/man
X           MANDIR = $(MANSOURCEPATH)n
X        LIBMANDIR = $(MANSOURCEPATH)3
X      XAPPLOADDIR = $(LIBDIR)/app-defaults
X
X        SOXLIBREV = 4.2
X          SOXTREV = 4.0
X         SOXAWREV = 4.0
X        SOOLDXREV = 4.0
X         SOXMUREV = 4.0
X        SOXEXTREV = 4.0
X
X       FONTCFLAGS = -t
X
X     INSTAPPFLAGS = $(INSTDATFLAGS)
X
X            IMAKE = imake
X           DEPEND = makedepend
X              RGB = rgb
X            FONTC = bdftosnf
X        MKFONTDIR = mkfontdir
X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
X
X        CONFIGSRC = $(TOP)/config
X        CLIENTSRC = $(TOP)/clients
X          DEMOSRC = $(TOP)/demos
X           LIBSRC = $(TOP)/lib
X          FONTSRC = $(TOP)/fonts
X       INCLUDESRC = $(TOP)/X11
X        SERVERSRC = $(TOP)/server
X          UTILSRC = $(TOP)/util
X        SCRIPTSRC = $(UTILSRC)/scripts
X       EXAMPLESRC = $(TOP)/examples
X       CONTRIBSRC = $(TOP)/../contrib
X           DOCSRC = $(TOP)/doc
X           RGBSRC = $(TOP)/rgb
X        DEPENDSRC = $(UTILSRC)/makedepend
X         IMAKESRC = $(CONFIGSRC)
X         XAUTHSRC = $(LIBSRC)/Xau
X          XLIBSRC = $(LIBSRC)/X
X           XMUSRC = $(LIBSRC)/Xmu
X       TOOLKITSRC = $(LIBSRC)/Xt
X       AWIDGETSRC = $(LIBSRC)/Xaw
X       OLDXLIBSRC = $(LIBSRC)/oldX
X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
X     EXTENSIONSRC = /cdb2/X11R4/mit/extensions
X
X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
X     EXTENSIONLIB =  -lXext
X
X          DEPXLIB = $(DEPEXTENSIONLIB)
X             XLIB = $(EXTENSIONLIB) -lX11
X
X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
X         XAUTHLIB =  -lXau
X
X        DEPXMULIB =
X           XMULIB = -lXmu
X
X       DEPOLDXLIB =
X          OLDXLIB = -loldX
X
X      DEPXTOOLLIB =
X         XTOOLLIB = -lXt
X
X        DEPXAWLIB =
X           XAWLIB = -lXaw
X
X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
X
X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
X
X         DEPLIBS1 = $(DEPLIBS)
X         DEPLIBS2 = $(DEPLIBS)
X         DEPLIBS3 = $(DEPLIBS)
X
X###########################################################################
X# Imake rules for building libraries, programs, scripts, and data files
X# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
X
X###########################################################################
X# start of Imakefile
X
X###########################################################################
X# Imake rules for building and installing libraries, programs,
X# apps-defaults, and other data files.  Unlike Imake.rules, these
X# rules allow files to be installed anywhere.
X#
X# These rules *override* rules of the same name defined in Imake.rules!!
X#
X# New variables:
X#	INSTBIN		default to $BINDIR - programs installed here
X#	INSTMAN		default to $MANDIR - man pages installed here
X#	INSTAPP		default to $XAPPLOADDIR - apps-defaults files go here
X#
X# David E. Smyth: Install.rules Wed Jan  2 07:12:10 PST 1991
X
X###########################################################################
X# Makefile defines for Widget Creation Library distribution.
X# David E. Smyth: Wc.tmpl Wed Jan  2 07:44:04 PST 1991
X
X# What I use for pre-release testing
X
X      INSTLIB = /u/tds/david/tmp/lib
X      INSTLIN = /u/tds/david/tmp/lib/lint
X      INSTINC = /u/tds/david/tmp/include
X      INSTBIN = /u/tds/david/tmp/bin
X      INSTMAN = /u/tds/david/tmp/man/man1
X      INSTAPP = /u/tds/david/tmp/app-defaults
X
X      MKDIRHIER = /bin/sh /u/tds/david/bin/mkdirhier.sh
X
X   WCTOPDIR = .
X
X      WCLIB = -L$(INSTLIB) -lWc
X      XPLIB = -L$(INSTLIB) -lXp
X     XMPLIB = -L$(INSTLIB) -lXmp
X
X    SoWcRev = 1.05
X
X# Imakefile for libXmp
X
XHEADERS = Table.h TableP.h
X
XSRCS = Table.c XmpRegAll.c
XOBJS = Table.o XmpRegAll.o
X
Xall::
X
Xall::
X	@if [ ! -d shared ]; then mkdir shared; else exit 0; fi
X
X.c.o:
X	$(RM) $@ shared/$@
X	$(CC) -pic -c $(SHAREDCODEDEF) $(SHLIBDEF) $(CFLAGS) $*.c
X	$(MV) $*.o shared/$*.o
X	$(CC) -c $(SHLIBDEF) $(CFLAGS) $*.c
X
Xclean::
X	- at if [ -d shared ]; then echo "	$(RM) shared/?*.o"; \
X	$(RM) shared/?*.o; else exit 0; fi
X
Xall:: libXmp.so.$(SoWcRev)
X
XlibXmp.so.$(SoWcRev): $(OBJS)
X	$(RM) $@~
X	(cd shared; $(LD) -o ../$@~ -assert pure-text $(OBJS))
X	$(RM) $@
X	$(MV) $@~ $@
X
Xclean::
X	$(RM) libXmp.so.$(SoWcRev)
X
Xinstall:: libXmp.so.$(SoWcRev)
X	$(INSTALL) -c $(INSTLIBFLAGS) libXmp.so.$(SoWcRev) $(INSTLIB)
X
Xall:: libXmp.a
X
XlibXmp.a: $(OBJS)
X	$(RM) $@
X	$(AR) $@ $(OBJS)
X	$(RANLIB) $@
X
Xinstall:: libXmp.a
X	$(INSTALL) -c $(INSTLIBFLAGS) libXmp.a $(INSTLIB)
X	$(RANLIB) $(RANLIBINSTFLAGS) $(INSTLIB)/libXmp.a
X
Xlintlib:: llib-lXmp.ln
X
Xllib-lXmp.ln: $(SRCS)
X	$(RM) $@
X	$(LINT) $(LINTLIBFLAG)Xmp $(LINTFLAGS) $(SRCS)
X
Xinstall.ln:: llib-lXmp.ln
X	$(INSTALL) -c $(INSTLIBFLAGS) llib-lXmp.ln $(INSTLIN)
X
Xinstall::
X	$(MKDIRHIER) $(INSTINC)/Xmp
X
Xinstall:: $(HEADERS)
X	@case '${MFLAGS}' in *[i]*) set +e;; esac; \
X	for i in $(HEADERS); do \
X	(set -x; $(INSTALL) -c $(INSTALLFLAGS) $$i $(INSTINC)/Xmp); \
X	done
X
Xdepend::
X	$(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
X
Xlint:
X	$(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
Xlint1:
X	$(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
X
X###########################################################################
X# common rules for all Makefiles - do not edit
X
Xemptyrule::
X
Xclean::
X	$(RM_CMD) \#*
X
XMakefile::
X	- at if [ -f Makefile ]; then \
X	echo "	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
X	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
X	else exit 0; fi
X	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
X
Xtags::
X	$(TAGS) -w *.[ch]
X	$(TAGS) -xw *.[ch] > TAGS
X
X###########################################################################
X# empty rules for directories that do not have SUBDIRS - do not edit
X
Xinstall::
X	@echo "install in $(CURRENT_DIR) done"
X
Xinstall.man::
X	@echo "install.man in $(CURRENT_DIR) done"
X
XMakefiles::
X
Xincludes::
X
X###########################################################################
X# dependencies generated by makedepend
X
!STUFFY!FUNK!
echo Extracting Mri/M09_Multi
sed >Mri/M09_Multi <<'!STUFFY!FUNK!' -e 's/X//'
X! This example explores the use of multiple files, and the
X! re-use of interface components.  Note that we get the
X! menu bar, buttons, and so on from other examples.
X
XMri.wcChildren:		mainWin
XMri.title:		M09_Multi
X
X*mainWin.wcClassName:	XmMainWindow
X*mainWin.wcPopups:	fsbShell
X*mainWin.wcChildren:	menuBar, table
X
X*fsbShell.wcClassName:	TransientShell
X*fsbShell.title:	Modal Trasient Shell
X*fsbShell.x:		100
X*fsbShell.y:		100
X*fsbShell.wcChildren:	fsb
X
X*fsb.wcResFile:			M11_FSB
X*fsbShell.fsb*okCallback:	WcPopdownCB(~)
X
X*menuBar.wcResFile:		M03_Menubar
X*menuBar*load.activateCallback:	WcPopupGrabCB(*fsbShell)
X
X*table.wcResFile:	M06_ListTable
!STUFFY!FUNK!
echo " "
echo "End of kit 30 (of 35)"
cat /dev/null >kit30isdone
run=''
config=''
for iskit in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35; do
    if test -f kit${iskit}isdone; then
	run="$run $iskit"
    else
	todo="$todo $iskit"
    fi
done
case $todo in
    '')
	echo "You have run all your kits.  Please read README."
	for combo in `find . -name '*:AA' -print`; do
	    if test -f "$combo"; then
		realfile=`echo $combo | sed 's/:AA$//'`
		cat $realfile:[A-Z][A-Z] >$realfile
		rm -rf $realfile:[A-Z][A-Z]
	    fi
	done
	rm -rf kit*isdone
	chmod ugo+x test*
	;;
    *)  echo "You have run$run."
	echo "You still need to run$todo."
	;;
esac
: Someone might mail this, so...
exit

--
Dan Heller
------------------------------------------------
O'Reilly && Associates 		      Zyrcom Inc
Senior Writer			       President
argv at ora.com			argv at zipcode.com



More information about the Comp.sources.x mailing list