home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / 2580 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  50.8 KB

  1. Path: sparky!uunet!stanford.edu!morrow.stanford.edu!sep!steve
  2. From: steve@sep.Stanford.EDU (Steve Cole)
  3. Newsgroups: alt.sources
  4. Subject: xtpanel 2.0 - interactive program builder - part 04/10
  5. Followup-To: alt.sources.d
  6. Date: 21 Nov 1992 00:31:31 GMT
  7. Organization: Stanford Exploration Project
  8. Lines: 1512
  9. Distribution: world
  10. Message-ID: <1ek013INN194@morrow.stanford.edu>
  11. NNTP-Posting-Host: taal.stanford.edu
  12.  
  13.  
  14. Submitted-by: steve@sep.Stanford.EDU
  15. Archive-name: xtpanel/part04
  16.  
  17. #!/bin/sh
  18. # This is part 04 of a multipart archive
  19. # ============= xtpanel/Makefile ==============
  20. if test ! -d 'xtpanel'; then
  21.     echo 'x - creating directory xtpanel'
  22.     mkdir 'xtpanel'
  23. fi
  24. if test -f 'xtpanel/Makefile' -a X"$1" != X"-c"; then
  25.     echo 'x - skipping xtpanel/Makefile (File already exists)'
  26. else
  27. echo 'x - extracting xtpanel/Makefile (Text)'
  28. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/Makefile' &&
  29. # Makefile generated by imake - do not edit!
  30. # $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
  31. #
  32. # The cpp used on this machine replaces all newlines and multiple tabs and
  33. # spaces in a macro expansion with a single space.  Imake tries to compensate
  34. # for this, but is not always successful.
  35. #
  36. X
  37. # -------------------------------------------------------------------------
  38. # Makefile generated from "Imake.tmpl" and <Imakefile>
  39. # $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
  40. #
  41. # Platform-specific parameters may be set in the appropriate <vendor>.cf
  42. # configuration files.  Site-specific parameters should be set in the file
  43. # site.def.  Full rebuilds are recommended if any parameters are changed.
  44. #
  45. # If your C preprocessor does not define any unique symbols, you will need
  46. # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  47. # "make World" the first time).
  48. #
  49. X
  50. # -------------------------------------------------------------------------
  51. # site-specific configuration parameters that need to come before
  52. # the platform-specific parameters - edit site.def to change
  53. X
  54. # site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  55. X
  56. # -------------------------------------------------------------------------
  57. # platform-specific configuration parameters - edit sun.cf to change
  58. X
  59. # platform:  $XConsortium: sun.cf,v 1.72.1.1 92/03/18 13:13:37 rws Exp $
  60. X
  61. # operating system:  SunOS 4.1.1
  62. X
  63. # $XConsortium: sunLib.rules,v 1.7 91/12/20 11:19:47 rws Exp $
  64. X
  65. # -------------------------------------------------------------------------
  66. # site-specific configuration parameters that go after
  67. # the platform-specific parameters - edit site.def to change
  68. X
  69. # site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  70. X
  71. X            SHELL = /bin/sh
  72. X
  73. X              TOP = .
  74. X      CURRENT_DIR = .
  75. X
  76. X               AR = ar clq
  77. X  BOOTSTRAPCFLAGS =
  78. X               CC = cc
  79. X               AS = as
  80. X
  81. X         COMPRESS = compress
  82. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  83. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  84. X          INSTALL = install
  85. X               LD = ld
  86. X             LINT = lint
  87. X      LINTLIBFLAG = -C
  88. X         LINTOPTS = -axz
  89. X               LN = ln -s
  90. X             MAKE = make
  91. X               MV = mv
  92. X               CP = cp
  93. X
  94. X           RANLIB = ranlib
  95. X  RANLIBINSTFLAGS =
  96. X
  97. X               RM = rm -f
  98. X            TROFF = psroff
  99. X         MSMACROS = -ms
  100. X              TBL = tbl
  101. X              EQN = eqn
  102. X     STD_INCLUDES =
  103. X  STD_CPP_DEFINES = -D_NO_PROTO
  104. X      STD_DEFINES = -D_NO_PROTO
  105. X EXTRA_LOAD_FLAGS =
  106. X  EXTRA_LIBRARIES =
  107. X             TAGS = ctags
  108. X
  109. X    SHAREDCODEDEF = -DSHAREDCODE
  110. X         SHLIBDEF = -DSUNSHLIB
  111. X
  112. X    PROTO_DEFINES =
  113. X
  114. X     INSTPGMFLAGS =
  115. X
  116. X     INSTBINFLAGS = -m 0755
  117. X     INSTUIDFLAGS = -m 4755
  118. X     INSTLIBFLAGS = -m 0644
  119. X     INSTINCFLAGS = -m 0444
  120. X     INSTMANFLAGS = -m 0444
  121. X     INSTDATFLAGS = -m 0444
  122. X    INSTKMEMFLAGS = -g kmem -m 2755
  123. X
  124. X      PROJECTROOT = /usr/local
  125. X
  126. X     TOP_INCLUDES = -I$(INCROOT)
  127. X
  128. X      CDEBUGFLAGS = -O
  129. X        CCOPTIONS = -pipe
  130. X
  131. X      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
  132. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
  133. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  134. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  135. X
  136. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  137. X
  138. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)
  139. X
  140. X   LDCOMBINEFLAGS = -X -r
  141. X      DEPENDFLAGS =
  142. X
  143. X        MACROFILE = sun.cf
  144. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  145. X
  146. X    IMAKE_DEFINES =
  147. X
  148. X         IRULESRC = $(CONFIGDIR)
  149. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  150. X
  151. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  152. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  153. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  154. X
  155. # -------------------------------------------------------------------------
  156. # X Window System Build Parameters
  157. # $XConsortium: Project.tmpl,v 1.138 91/09/10 09:02:12 rws Exp $
  158. X
  159. # -------------------------------------------------------------------------
  160. # X Window System make variables; this need to be coordinated with rules
  161. X
  162. X          PATHSEP = /
  163. X        USRLIBDIR = /usr/local/lib
  164. X           BINDIR = /usr/local/bin/X5
  165. X          INCROOT = /usr/local/include
  166. X     BUILDINCROOT = $(TOP)
  167. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  168. X      BUILDINCTOP = ..
  169. X           INCDIR = $(INCROOT)/X11
  170. X           ADMDIR = /usr/adm
  171. X           LIBDIR = $(USRLIBDIR)/X11
  172. X        CONFIGDIR = $(LIBDIR)/config
  173. X       LINTLIBDIR = $(USRLIBDIR)/lint
  174. X
  175. X          FONTDIR = $(LIBDIR)/fonts
  176. X         XINITDIR = $(LIBDIR)/xinit
  177. X           XDMDIR = $(LIBDIR)/xdm
  178. X           TWMDIR = $(LIBDIR)/twm
  179. X          MANPATH = /usr/local/man
  180. X    MANSOURCEPATH = $(MANPATH)/man
  181. X        MANSUFFIX = n
  182. X     LIBMANSUFFIX = 3
  183. X           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
  184. X        LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
  185. X           NLSDIR = $(LIBDIR)/nls
  186. X        PEXAPIDIR = $(LIBDIR)/PEX
  187. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  188. X       FONTCFLAGS = -t
  189. X
  190. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  191. X
  192. X            IMAKE = imake
  193. X           DEPEND = makedepend
  194. X              RGB = rgb
  195. X
  196. X            FONTC = bdftopcf
  197. X
  198. X        MKFONTDIR = mkfontdir
  199. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier
  200. X
  201. X        CONFIGSRC = $(TOP)/config
  202. X       DOCUTILSRC = $(TOP)/doc/util
  203. X        CLIENTSRC = $(TOP)/clients
  204. X          DEMOSRC = $(TOP)/demos
  205. X           LIBSRC = $(TOP)/lib
  206. X          FONTSRC = $(TOP)/fonts
  207. X       INCLUDESRC = $(TOP)/X11
  208. X        SERVERSRC = $(TOP)/server
  209. X          UTILSRC = $(TOP)/util
  210. X        SCRIPTSRC = $(UTILSRC)/scripts
  211. X       EXAMPLESRC = $(TOP)/examples
  212. X       CONTRIBSRC = $(TOP)/../contrib
  213. X           DOCSRC = $(TOP)/doc
  214. X           RGBSRC = $(TOP)/rgb
  215. X        DEPENDSRC = $(UTILSRC)/makedepend
  216. X         IMAKESRC = $(CONFIGSRC)
  217. X         XAUTHSRC = $(LIBSRC)/Xau
  218. X          XLIBSRC = $(LIBSRC)/X
  219. X           XMUSRC = $(LIBSRC)/Xmu
  220. X       TOOLKITSRC = $(LIBSRC)/Xt
  221. X       AWIDGETSRC = $(LIBSRC)/Xaw
  222. X       OLDXLIBSRC = $(LIBSRC)/oldX
  223. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  224. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  225. X      BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
  226. X      BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
  227. X     MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
  228. X         FSLIBSRC = $(FONTSRC)/lib/fs
  229. X    FONTSERVERSRC = $(FONTSRC)/server
  230. X     EXTENSIONSRC = $(TOP)/extensions
  231. X         XILIBSRC = $(EXTENSIONSRC)/lib/xinput
  232. X      PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
  233. X
  234. # $XConsortium: sunLib.tmpl,v 1.14.1.1 92/03/17 14:58:46 rws Exp $
  235. X
  236. SHLIBLDFLAGS = -assert pure-text
  237. PICFLAGS = -pic
  238. X
  239. X  DEPEXTENSIONLIB =
  240. X     EXTENSIONLIB = -lXext
  241. X
  242. X          DEPXLIB = $(DEPEXTENSIONLIB)
  243. X             XLIB = $(EXTENSIONLIB) -lX11
  244. X
  245. X        DEPXMULIB = $(USRLIBDIR)/libXmu.sa.$(SOXMUREV)
  246. X       XMULIBONLY = -lXmu
  247. X           XMULIB = -lXmu
  248. X
  249. X       DEPOLDXLIB =
  250. X          OLDXLIB = -loldX
  251. X
  252. X      DEPXTOOLLIB = $(USRLIBDIR)/libXt.sa.$(SOXTREV)
  253. X         XTOOLLIB = -lXt
  254. X
  255. X        DEPXAWLIB = $(USRLIBDIR)/libXaw.sa.$(SOXAWREV)
  256. X           XAWLIB = -lXaw
  257. X
  258. X        DEPXILIB =
  259. X           XILIB = -lXi
  260. X
  261. X        SOXLIBREV = 4.10
  262. X          SOXTREV = 4.10
  263. X         SOXAWREV = 5.0
  264. X        SOOLDXREV = 4.10
  265. X         SOXMUREV = 4.10
  266. X        SOXEXTREV = 4.10
  267. X      SOXINPUTREV = 4.10
  268. X
  269. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  270. X         XAUTHLIB =  -lXau
  271. X      DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
  272. X         XDMCPLIB =  -lXdmcp
  273. X
  274. X        DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
  275. X           PHIGSLIB =  -lphigs
  276. X
  277. X       DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
  278. X          XBSDLIB =  -lXbsd
  279. X
  280. X LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
  281. X         LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
  282. X          LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
  283. X        LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
  284. X          LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
  285. X           LINTXI = $(LINTLIBDIR)/llib-lXi.ln
  286. X        LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln
  287. X
  288. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  289. X
  290. X         DEPLIBS1 = $(DEPLIBS)
  291. X         DEPLIBS2 = $(DEPLIBS)
  292. X         DEPLIBS3 = $(DEPLIBS)
  293. X
  294. # -------------------------------------------------------------------------
  295. # Imake rules for building libraries, programs, scripts, and data files
  296. # rules:  $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $
  297. X
  298. # -------------------------------------------------------------------------
  299. # start of Imakefile
  300. X
  301. SYS_XTPANELDIR = $(LIBDIR)/xtpanel
  302. X
  303. EXTRA_DEFINES = -DSYS_XTPANELDIR=\"$(SYS_XTPANELDIR)\"
  304. X
  305. LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  306. DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  307. APPDEFAULTS = XTpanel
  308. X
  309. PROGRAMS = xtpanel
  310. X
  311. SRCS = main.c tree.c parse.c actions.c object.c item.c xtpanel_scan.l \
  312. X       message.c button.c slider.c dialog.c text.c menubutton.c \
  313. X       choice.c list.c variable.c eval_command.c string_buf.c builders.c \
  314. X       graph.c
  315. OBJS = main.o tree.o parse.o actions.o object.o item.o xtpanel_scan.o \
  316. X       message.o button.o slider.o dialog.o text.o menubutton.o \
  317. X       choice.o list.o variable.o eval_command.o string_buf.o builders.o \
  318. X       graph.o
  319. X
  320. SUBDIRS = help generator examples
  321. X
  322. all:: $(PROGRAMS)
  323. X
  324. X PROGRAM = $(PROGRAMS)
  325. X
  326. all:: $(PROGRAMS)
  327. X
  328. $(PROGRAMS): $(OBJS) $(DEPLIBS)
  329. X    $(RM) $@
  330. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  331. X
  332. saber_$(PROGRAMS):: $(SRCS)
  333. X    # load $(ALLDEFINES) $(SRCS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  334. X
  335. osaber_$(PROGRAMS):: $(OBJS)
  336. X    # load $(ALLDEFINES) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  337. X
  338. install:: $(PROGRAMS)
  339. X    @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
  340. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
  341. X    $(INSTALL) -c $(INSTPGMFLAGS)  $(PROGRAMS) $(DESTDIR)$(BINDIR)
  342. X
  343. install.man:: $(PROGRAMS).man
  344. X    @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
  345. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
  346. X    $(INSTALL) -c $(INSTMANFLAGS) $(PROGRAMS).man $(DESTDIR)$(MANDIR)/$(PROGRAMS).$(MANSUFFIX)
  347. X
  348. depend::
  349. X    $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  350. X
  351. lint:
  352. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  353. lint1:
  354. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  355. X
  356. clean::
  357. X    $(RM) $(PROGRAM)
  358. X
  359. xtpanel-examples.script: xtpanel-examples.script.sed
  360. X    sed -e 's,SYS_XTPANELDIR,$(SYS_XTPANELDIR),g' <$? >$@
  361. X
  362. install:: xtpanel-generator.script
  363. X    @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
  364. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
  365. X    $(INSTALL) -c $(INSTBINFLAGS) xtpanel-generator.script $(DESTDIR)$(BINDIR)/xtpanel-generator
  366. X
  367. install:: xtpanel-examples.script
  368. X    @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
  369. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
  370. X    $(INSTALL) -c $(INSTBINFLAGS) xtpanel-examples.script $(DESTDIR)$(BINDIR)/xtpanel-examples
  371. X
  372. install:: $(APPDEFAULTS).ad
  373. X    @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then set +x; \
  374. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); fi
  375. X    $(INSTALL) -c $(INSTAPPFLAGS) $(APPDEFAULTS).ad $(DESTDIR)$(XAPPLOADDIR)/$(APPDEFAULTS)
  376. X
  377. xtpanel.man: xtpanel.man.sed
  378. X    sed -e 's,SYS_XTPANELDIR,$(SYS_XTPANELDIR),g' <$? >$@
  379. X
  380. XXTpanel.ad: XTpanel.ad.sed
  381. X    sed -e 's,SYS_XTPANELDIR,$(SYS_XTPANELDIR),g' <$? >$@
  382. X
  383. install.man:: xtpanel.man
  384. X    @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
  385. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
  386. X    $(INSTALL) -c $(INSTMANFLAGS) xtpanel.man $(DESTDIR)$(MANDIR)/xtpanel.$(MANSUFFIX)
  387. X
  388. Makefiles::
  389. X    @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
  390. X    for i in $(SUBDIRS) ;\
  391. X    do \
  392. X    echo "making Makefiles in $(CURRENT_DIR)/$$i..."; \
  393. X    case "$$i" in \
  394. X    ./?*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \
  395. X    ./?*/?*/?*) newtop=../../../ sub=subsubsub;; \
  396. X    ./?*/?*) newtop=../../ sub=subsub;; \
  397. X    ./?*) newtop=../ sub=sub;; \
  398. X    */?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \
  399. X    */?*/?*) newtop=../../../ sub=subsubsub;; \
  400. X    */?*) newtop=../../ sub=subsub;; \
  401. X    *) newtop=../ sub=sub;; \
  402. X    esac; \
  403. X    case "$(TOP)" in \
  404. X    /?*) newtop= upprefix= ;; \
  405. X    *) upprefix=../ ;; \
  406. X    esac; \
  407. X    $(MAKE) $${sub}dirMakefiles UPPREFIX=$$upprefix NEWTOP=$$newtop \
  408. X    MAKEFILE_SUBDIR=$$i NEW_CURRENT_DIR=$(CURRENT_DIR)/$$i;\
  409. X    done
  410. X
  411. subdirMakefiles:
  412. X    $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
  413. X    -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \
  414. X    $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
  415. X    else exit 0; fi
  416. X    cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
  417. X    $(MAKE) $(MFLAGS) Makefiles
  418. X
  419. subsubdirMakefiles:
  420. X    $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
  421. X    -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \
  422. X    $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
  423. X    else exit 0; fi
  424. X    cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
  425. X    $(MAKE) $(MFLAGS) Makefiles
  426. X
  427. subsubsubdirMakefiles:
  428. X    $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
  429. X    -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \
  430. X    $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
  431. X    else exit 0; fi
  432. X    cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
  433. X    $(MAKE) $(MFLAGS) Makefiles
  434. X
  435. subsubsubsubdirMakefiles:
  436. X    $(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
  437. X    -@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then set -x; \
  438. X    $(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
  439. X    else exit 0; fi
  440. X    cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
  441. X    $(MAKE) $(MFLAGS) Makefiles
  442. X
  443. install::
  444. X    @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
  445. X    for i in $(SUBDIRS) ;\
  446. X    do \
  447. X    (cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
  448. X    $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
  449. X    done
  450. X
  451. clean::
  452. X    @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
  453. X    for i in $(SUBDIRS) ;\
  454. X    do \
  455. X    (cd $$i ; echo "cleaning" "in $(CURRENT_DIR)/$$i..."; \
  456. X    $(MAKE) $(MFLAGS) RM_CMD='$(RM_CMD)' clean); \
  457. X    done
  458. X
  459. xtpanel_scan.o: xtpanel_scan.l
  460. X        rm -f lex.yy.c
  461. X        lex xtpanel_scan.l
  462. X        $(CC) $(CFLAGS) -c lex.yy.c
  463. X        mv lex.yy.o xtpanel_scan.o
  464. X
  465. clean::
  466. X    $(RM) lex.yy.c
  467. X    $(RM) XTpanel.ad
  468. X    $(RM) xtpanel.man
  469. X    $(RM) xtpanel-examples.script
  470. X
  471. # -------------------------------------------------------------------------
  472. # common rules for all Makefiles - do not edit
  473. X
  474. emptyrule::
  475. X
  476. clean::
  477. X    $(RM_CMD) "#"*
  478. X
  479. Makefile::
  480. X    -@if [ -f Makefile ]; then set -x; \
  481. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  482. X    else exit 0; fi
  483. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  484. X
  485. tags::
  486. X    $(TAGS) -w *.[ch]
  487. X    $(TAGS) -xw *.[ch] > TAGS
  488. X
  489. saber:
  490. X    # load $(ALLDEFINES) $(SRCS)
  491. X
  492. osaber:
  493. X    # load $(ALLDEFINES) $(OBJS)
  494. X
  495. # -------------------------------------------------------------------------
  496. # empty rules for directories that do not have SUBDIRS - do not edit
  497. X
  498. install::
  499. X    @echo "install in $(CURRENT_DIR) done"
  500. X
  501. install.man::
  502. X    @echo "install.man in $(CURRENT_DIR) done"
  503. X
  504. Makefiles::
  505. X
  506. includes::
  507. X
  508. # -------------------------------------------------------------------------
  509. # dependencies generated by makedepend
  510. X
  511. # DO NOT DELETE
  512. X
  513. main.o: patchlevel.h /usr/include/stdio.h /usr/local/include/X11/Intrinsic.h
  514. main.o: /usr/local/include/X11/Xlib.h /usr/include/sys/types.h
  515. main.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  516. main.o: /usr/local/include/X11/X.h /usr/local/include/X11/Xfuncproto.h
  517. main.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  518. main.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  519. main.o: /usr/include/string.h /usr/local/include/X11/Core.h
  520. main.o: /usr/local/include/X11/Composite.h
  521. main.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  522. main.o: /usr/local/include/X11/RectObj.h /usr/local/include/X11/StringDefs.h
  523. main.o: /usr/local/include/X11/Xaw/Box.h
  524. main.o: /usr/local/include/X11/Xmu/Converters.h
  525. main.o: /usr/local/include/X11/Xaw/Cardinals.h
  526. main.o: /usr/local/include/X11/Xaw/Paned.h tree.h builders.h
  527. tree.o: /usr/include/stdio.h tree.h /usr/include/string.h
  528. tree.o: /usr/include/sys/stdtypes.h
  529. parse.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  530. parse.o: /usr/include/sys/sysmacros.h /usr/include/sys/stat.h tree.h
  531. parse.o: /usr/include/string.h /usr/include/stdio.h string_buf.h
  532. parse.o: /usr/include/sys/param.h /usr/include/machine/param.h
  533. parse.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  534. actions.o: /usr/include/stdio.h /usr/include/string.h
  535. actions.o: /usr/include/sys/stdtypes.h tree.h actions.h object.h
  536. actions.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  537. actions.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  538. actions.o: /usr/local/include/X11/X.h /usr/local/include/X11/Xfuncproto.h
  539. actions.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  540. actions.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  541. actions.o: /usr/local/include/X11/Core.h /usr/local/include/X11/Composite.h
  542. actions.o: /usr/local/include/X11/Constraint.h
  543. actions.o: /usr/local/include/X11/Object.h /usr/local/include/X11/RectObj.h
  544. actions.o: eval_command.h string_buf.h
  545. object.o: /usr/include/stdio.h /usr/local/include/X11/Xatom.h
  546. object.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  547. object.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  548. object.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  549. object.o: /usr/local/include/X11/Xfuncproto.h
  550. object.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  551. object.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  552. object.o: /usr/include/string.h /usr/local/include/X11/Core.h
  553. object.o: /usr/local/include/X11/Composite.h
  554. object.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  555. object.o: /usr/local/include/X11/RectObj.h /usr/local/include/X11/Xaw/Label.h
  556. object.o: /usr/local/include/X11/Xaw/Simple.h
  557. object.o: /usr/local/include/X11/Xmu/Converters.h object.h actions.h tree.h
  558. item.o: /usr/include/stdio.h /usr/local/include/X11/Intrinsic.h
  559. item.o: /usr/local/include/X11/Xlib.h /usr/include/sys/types.h
  560. item.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  561. item.o: /usr/local/include/X11/X.h /usr/local/include/X11/Xfuncproto.h
  562. item.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  563. item.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  564. item.o: /usr/include/string.h /usr/local/include/X11/Core.h
  565. item.o: /usr/local/include/X11/Composite.h
  566. item.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  567. item.o: /usr/local/include/X11/RectObj.h object.h actions.h tree.h item.h
  568. xtpanel_scan.o: /usr/include/ctype.h /usr/include/stdio.h
  569. xtpanel_scan.o: /usr/include/string.h /usr/include/sys/stdtypes.h tree.h
  570. xtpanel_scan.o: eval_command.h
  571. message.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  572. message.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  573. message.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  574. message.o: /usr/local/include/X11/Xfuncproto.h
  575. message.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  576. message.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  577. message.o: /usr/include/string.h /usr/local/include/X11/Core.h
  578. message.o: /usr/local/include/X11/Composite.h
  579. message.o: /usr/local/include/X11/Constraint.h
  580. message.o: /usr/local/include/X11/Object.h /usr/local/include/X11/RectObj.h
  581. message.o: /usr/local/include/X11/StringDefs.h
  582. message.o: /usr/local/include/X11/Xaw/Cardinals.h
  583. message.o: /usr/local/include/X11/Xaw/Label.h
  584. message.o: /usr/local/include/X11/Xaw/Simple.h
  585. message.o: /usr/local/include/X11/Xmu/Converters.h object.h actions.h tree.h
  586. message.o: builders.h
  587. button.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  588. button.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  589. button.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  590. button.o: /usr/local/include/X11/Xfuncproto.h
  591. button.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  592. button.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  593. button.o: /usr/include/string.h /usr/local/include/X11/Core.h
  594. button.o: /usr/local/include/X11/Composite.h
  595. button.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  596. button.o: /usr/local/include/X11/RectObj.h
  597. button.o: /usr/local/include/X11/StringDefs.h
  598. button.o: /usr/local/include/X11/Xaw/Cardinals.h
  599. button.o: /usr/local/include/X11/Xaw/Command.h
  600. button.o: /usr/local/include/X11/Xaw/Label.h
  601. button.o: /usr/local/include/X11/Xaw/Simple.h
  602. button.o: /usr/local/include/X11/Xmu/Converters.h
  603. button.o: /usr/local/include/X11/Xaw/Toggle.h /usr/include/stdio.h object.h
  604. button.o: actions.h tree.h builders.h
  605. slider.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  606. slider.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  607. slider.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  608. slider.o: /usr/local/include/X11/Xfuncproto.h
  609. slider.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  610. slider.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  611. slider.o: /usr/include/string.h /usr/local/include/X11/Core.h
  612. slider.o: /usr/local/include/X11/Composite.h
  613. slider.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  614. slider.o: /usr/local/include/X11/RectObj.h
  615. slider.o: /usr/local/include/X11/StringDefs.h
  616. slider.o: /usr/local/include/X11/Xaw/Box.h
  617. slider.o: /usr/local/include/X11/Xmu/Converters.h
  618. slider.o: /usr/local/include/X11/Xaw/Cardinals.h
  619. slider.o: /usr/local/include/X11/Xaw/Command.h
  620. slider.o: /usr/local/include/X11/Xaw/Label.h
  621. slider.o: /usr/local/include/X11/Xaw/Simple.h
  622. slider.o: /usr/local/include/X11/Xaw/Scrollbar.h object.h actions.h tree.h
  623. slider.o: builders.h /usr/include/stdio.h
  624. dialog.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  625. dialog.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  626. dialog.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  627. dialog.o: /usr/local/include/X11/Xfuncproto.h
  628. dialog.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  629. dialog.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  630. dialog.o: /usr/include/string.h /usr/local/include/X11/Core.h
  631. dialog.o: /usr/local/include/X11/Composite.h
  632. dialog.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  633. dialog.o: /usr/local/include/X11/RectObj.h
  634. dialog.o: /usr/local/include/X11/StringDefs.h
  635. dialog.o: /usr/local/include/X11/Xaw/Cardinals.h
  636. dialog.o: /usr/local/include/X11/Xaw/Command.h
  637. dialog.o: /usr/local/include/X11/Xaw/Label.h
  638. dialog.o: /usr/local/include/X11/Xaw/Simple.h
  639. dialog.o: /usr/local/include/X11/Xmu/Converters.h
  640. dialog.o: /usr/local/include/X11/Xaw/Dialog.h
  641. dialog.o: /usr/local/include/X11/Xaw/Form.h object.h actions.h tree.h
  642. dialog.o: builders.h
  643. text.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  644. text.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  645. text.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  646. text.o: /usr/local/include/X11/Xfuncproto.h /usr/local/include/X11/Xosdefs.h
  647. text.o: /usr/include/stddef.h /usr/local/include/X11/Xutil.h
  648. text.o: /usr/local/include/X11/Xresource.h /usr/include/string.h
  649. text.o: /usr/local/include/X11/Core.h /usr/local/include/X11/Composite.h
  650. text.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  651. text.o: /usr/local/include/X11/RectObj.h /usr/local/include/X11/StringDefs.h
  652. text.o: /usr/local/include/X11/Xaw/AsciiText.h
  653. text.o: /usr/local/include/X11/Xaw/Text.h
  654. text.o: /usr/local/include/X11/Xaw/TextSink.h
  655. text.o: /usr/local/include/X11/Xaw/TextSrc.h
  656. text.o: /usr/local/include/X11/Xaw/AsciiSrc.h
  657. text.o: /usr/local/include/X11/Xaw/AsciiSink.h
  658. text.o: /usr/local/include/X11/Xaw/Cardinals.h object.h actions.h tree.h
  659. text.o: builders.h
  660. menubutton.o: /usr/local/include/X11/Intrinsic.h
  661. menubutton.o: /usr/local/include/X11/Xlib.h /usr/include/sys/types.h
  662. menubutton.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h
  663. menubutton.o: /usr/local/include/X11/X.h /usr/local/include/X11/Xfuncproto.h
  664. menubutton.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  665. menubutton.o: /usr/local/include/X11/Xutil.h
  666. menubutton.o: /usr/local/include/X11/Xresource.h /usr/include/string.h
  667. menubutton.o: /usr/local/include/X11/Core.h
  668. menubutton.o: /usr/local/include/X11/Composite.h
  669. menubutton.o: /usr/local/include/X11/Constraint.h
  670. menubutton.o: /usr/local/include/X11/Object.h
  671. menubutton.o: /usr/local/include/X11/RectObj.h
  672. menubutton.o: /usr/local/include/X11/StringDefs.h
  673. menubutton.o: /usr/local/include/X11/bitmaps/dot
  674. menubutton.o: /usr/local/include/X11/Xaw/Cardinals.h
  675. menubutton.o: /usr/local/include/X11/Xaw/MenuButton.h
  676. menubutton.o: /usr/local/include/X11/Xaw/Command.h
  677. menubutton.o: /usr/local/include/X11/Xaw/Label.h
  678. menubutton.o: /usr/local/include/X11/Xaw/Simple.h
  679. menubutton.o: /usr/local/include/X11/Xmu/Converters.h
  680. menubutton.o: /usr/local/include/X11/Xaw/SimpleMenu.h
  681. menubutton.o: /usr/local/include/X11/Shell.h
  682. menubutton.o: /usr/local/include/X11/Xaw/SmeBSB.h
  683. menubutton.o: /usr/local/include/X11/Xaw/Sme.h object.h actions.h tree.h
  684. menubutton.o: item.h builders.h
  685. choice.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  686. choice.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  687. choice.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  688. choice.o: /usr/local/include/X11/Xfuncproto.h
  689. choice.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  690. choice.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  691. choice.o: /usr/include/string.h /usr/local/include/X11/Core.h
  692. choice.o: /usr/local/include/X11/Composite.h
  693. choice.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  694. choice.o: /usr/local/include/X11/RectObj.h
  695. choice.o: /usr/local/include/X11/StringDefs.h
  696. choice.o: /usr/local/include/X11/Xaw/Box.h
  697. choice.o: /usr/local/include/X11/Xmu/Converters.h
  698. choice.o: /usr/local/include/X11/Xaw/Cardinals.h
  699. choice.o: /usr/local/include/X11/Xaw/Label.h
  700. choice.o: /usr/local/include/X11/Xaw/Simple.h
  701. choice.o: /usr/local/include/X11/Xaw/Toggle.h
  702. choice.o: /usr/local/include/X11/Xaw/Command.h object.h actions.h tree.h
  703. choice.o: item.h builders.h
  704. list.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  705. list.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  706. list.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  707. list.o: /usr/local/include/X11/Xfuncproto.h /usr/local/include/X11/Xosdefs.h
  708. list.o: /usr/include/stddef.h /usr/local/include/X11/Xutil.h
  709. list.o: /usr/local/include/X11/Xresource.h /usr/include/string.h
  710. list.o: /usr/local/include/X11/Core.h /usr/local/include/X11/Composite.h
  711. list.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  712. list.o: /usr/local/include/X11/RectObj.h /usr/local/include/X11/StringDefs.h
  713. list.o: /usr/local/include/X11/Xaw/Box.h
  714. list.o: /usr/local/include/X11/Xmu/Converters.h
  715. list.o: /usr/local/include/X11/Xaw/Cardinals.h
  716. list.o: /usr/local/include/X11/Xaw/Label.h
  717. list.o: /usr/local/include/X11/Xaw/Simple.h /usr/local/include/X11/Xaw/List.h
  718. list.o: /usr/local/include/X11/Xaw/Viewport.h
  719. list.o: /usr/local/include/X11/Xaw/Form.h
  720. list.o: /usr/local/include/X11/Xaw/Reports.h object.h actions.h tree.h item.h
  721. list.o: builders.h
  722. variable.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  723. variable.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  724. variable.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  725. variable.o: /usr/local/include/X11/Xfuncproto.h
  726. variable.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  727. variable.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  728. variable.o: /usr/include/string.h /usr/local/include/X11/Core.h
  729. variable.o: /usr/local/include/X11/Composite.h
  730. variable.o: /usr/local/include/X11/Constraint.h
  731. variable.o: /usr/local/include/X11/Object.h /usr/local/include/X11/RectObj.h
  732. variable.o: object.h actions.h tree.h builders.h
  733. eval_command.o: /usr/include/stdio.h /usr/include/string.h
  734. eval_command.o: /usr/include/sys/stdtypes.h eval_command.h string_buf.h
  735. string_buf.o: /usr/include/stdio.h /usr/include/string.h
  736. string_buf.o: /usr/include/sys/stdtypes.h /usr/include/assert.h string_buf.h
  737. builders.o: /usr/local/include/X11/IntrinsicP.h
  738. builders.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  739. builders.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  740. builders.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  741. builders.o: /usr/local/include/X11/Xfuncproto.h
  742. builders.o: /usr/local/include/X11/Xosdefs.h /usr/include/stddef.h
  743. builders.o: /usr/local/include/X11/Xutil.h /usr/local/include/X11/Xresource.h
  744. builders.o: /usr/include/string.h /usr/local/include/X11/Core.h
  745. builders.o: /usr/local/include/X11/Composite.h
  746. builders.o: /usr/local/include/X11/Constraint.h
  747. builders.o: /usr/local/include/X11/Object.h /usr/local/include/X11/RectObj.h
  748. builders.o: /usr/local/include/X11/CoreP.h
  749. builders.o: /usr/local/include/X11/CompositeP.h
  750. builders.o: /usr/local/include/X11/ConstrainP.h
  751. builders.o: /usr/local/include/X11/ObjectP.h
  752. builders.o: /usr/local/include/X11/RectObjP.h
  753. builders.o: /usr/local/include/X11/StringDefs.h
  754. builders.o: /usr/local/include/X11/Xaw/Scrollbar.h
  755. builders.o: /usr/local/include/X11/Xmu/Converters.h
  756. builders.o: /usr/local/include/X11/Xaw/Text.h
  757. builders.o: /usr/local/include/X11/Xaw/TextSink.h
  758. builders.o: /usr/local/include/X11/Xaw/TextSrc.h
  759. builders.o: /usr/local/include/X11/Xaw/AsciiSrc.h
  760. builders.o: /usr/local/include/X11/Xaw/AsciiSink.h
  761. builders.o: /usr/local/include/X11/Xaw/AsciiText.h object.h actions.h tree.h
  762. builders.o: builders.h /usr/include/stdio.h
  763. graph.o: /usr/local/include/X11/Intrinsic.h /usr/local/include/X11/Xlib.h
  764. graph.o: /usr/include/sys/types.h /usr/include/sys/stdtypes.h
  765. graph.o: /usr/include/sys/sysmacros.h /usr/local/include/X11/X.h
  766. graph.o: /usr/local/include/X11/Xfuncproto.h /usr/local/include/X11/Xosdefs.h
  767. graph.o: /usr/include/stddef.h /usr/local/include/X11/Xutil.h
  768. graph.o: /usr/local/include/X11/Xresource.h /usr/include/string.h
  769. graph.o: /usr/local/include/X11/Core.h /usr/local/include/X11/Composite.h
  770. graph.o: /usr/local/include/X11/Constraint.h /usr/local/include/X11/Object.h
  771. graph.o: /usr/local/include/X11/RectObj.h /usr/local/include/X11/StringDefs.h
  772. graph.o: /usr/local/include/X11/Xaw/Box.h
  773. graph.o: /usr/local/include/X11/Xmu/Converters.h
  774. graph.o: /usr/local/include/X11/Xaw/Cardinals.h
  775. graph.o: /usr/local/include/X11/Xaw/Command.h
  776. graph.o: /usr/local/include/X11/Xaw/Label.h
  777. graph.o: /usr/local/include/X11/Xaw/Simple.h
  778. graph.o: /usr/local/include/X11/Xaw/Scrollbar.h object.h actions.h tree.h
  779. graph.o: builders.h string_buf.h /usr/include/stdio.h
  780. SHAR_EOF
  781. chmod 0664 xtpanel/Makefile ||
  782. echo 'restore of xtpanel/Makefile failed'
  783. Wc_c="`wc -c < 'xtpanel/Makefile'`"
  784. test 30583 -eq "$Wc_c" ||
  785.     echo 'xtpanel/Makefile: original size 30583, current size' "$Wc_c"
  786. fi
  787. # ============= xtpanel/builders.h ==============
  788. if test -f 'xtpanel/builders.h' -a X"$1" != X"-c"; then
  789.     echo 'x - skipping xtpanel/builders.h (File already exists)'
  790. else
  791. echo 'x - extracting xtpanel/builders.h (Text)'
  792. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/builders.h' &&
  793. #ifndef BUILDERS_H
  794. #define BUILDERS_H
  795. X
  796. #include <X11/Intrinsic.h>
  797. #include "tree.h"
  798. X
  799. #ifndef _NO_PROTO
  800. X
  801. extern void build_message( entry*, Widget );
  802. extern void build_button( entry*, Widget, char* );
  803. extern void build_slider( entry*, Widget, char* );
  804. extern void build_dialog( entry*, Widget );
  805. extern void build_text( entry*, Widget );
  806. extern void build_menubutton( entry*, Widget );
  807. extern void build_list( entry*, Widget );
  808. extern void build_choice( entry*, Widget );
  809. extern void build_variable( entry*, Widget );
  810. extern void build_graph( entry*, Widget );
  811. X
  812. extern int SetTag( Widget, Arg*, int*, char*, char* );
  813. extern void common_tags( entry*, Arg*, int*, int );
  814. X
  815. #else
  816. X
  817. extern void build_message();
  818. extern void build_button();
  819. extern void build_slider();
  820. extern void build_dialog();
  821. extern void build_text();
  822. extern void build_menubutton();
  823. extern void build_list();
  824. extern void build_choice();
  825. extern void build_variable();
  826. extern void build_graph();
  827. X
  828. extern void common_tags();
  829. extern int SetTag();
  830. X
  831. #endif
  832. X
  833. #define SET_HEIGHT 1
  834. #define SET_WIDTH 2
  835. #define SET_ORIENT 4
  836. #define SET_FG 8
  837. #define SET_BG 16
  838. #define SET_BORDER 32
  839. #define SET_FONT 64
  840. #define SET_BITMAP 128
  841. #define SET_EDIT 256
  842. #define SET_ALL 511
  843. X
  844. #endif
  845. SHAR_EOF
  846. chmod 0664 xtpanel/builders.h ||
  847. echo 'restore of xtpanel/builders.h failed'
  848. Wc_c="`wc -c < 'xtpanel/builders.h'`"
  849. test 1227 -eq "$Wc_c" ||
  850.     echo 'xtpanel/builders.h: original size 1227, current size' "$Wc_c"
  851. fi
  852. # ============= xtpanel/item.c ==============
  853. if test -f 'xtpanel/item.c' -a X"$1" != X"-c"; then
  854.     echo 'x - skipping xtpanel/item.c (File already exists)'
  855. else
  856. echo 'x - extracting xtpanel/item.c (Text)'
  857. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/item.c' &&
  858. X
  859. /*
  860. X * Copyright 1992 the Board of Trustees of the Leland Stanford Junior
  861. X * University. Official permission to use this software is included in
  862. X * the documentation. It authorizes you to use this file for any
  863. X * non-commercial purpose, provided that this copyright notice is not
  864. X * removed and that any modifications made to this file are commented
  865. X * and dated in the style of the example below.
  866. X */
  867. X
  868. /*
  869. X *
  870. X *  source file:   ./xtpanel/item.c
  871. X *
  872. X * Steve Cole, Dave Nichols (SEP), August 31 1992
  873. X *      Inserted this sample edit history entry.
  874. X *      Please log any further modifications made to this file:
  875. X * Steve Cole, Dave Nichols (SEP), November 20 1992 -  version 2.00
  876. X * 1) added new objects: toggle, scrollbar, graph.
  877. X * 2) added new actions: ASSIGN, SET.
  878. X * 3) objects can have multiple actions.
  879. X * 4) backquoted strings in actions get executed at action time.
  880. X */
  881. X
  882. #include <stdio.h>
  883. X
  884. #include <X11/Intrinsic.h>
  885. X
  886. #include "object.h"
  887. #include "item.h"
  888. X
  889. /*
  890. X * Function name: new_item
  891. X * Description: creates a structure for a new list
  892. X *            or menubutton item.
  893. X * Arguments: info - info structure of choice, list, or menubutton.
  894. X * Returns: pointer to new structure of type itemdef
  895. X */
  896. struct itemdef* new_item(info)
  897. X     struct itemizedinfo* info;
  898. {
  899. X    struct itemdef *a, *b;
  900. X    
  901. X    if( info->firstitem == (struct itemdef*)0 ){
  902. X    /* make the head of the list */
  903. X    info->firstitem = (struct itemdef*) malloc( sizeof( struct itemdef ) );
  904. X    info->firstitem->label = (char*)0;
  905. X    info->firstitem->value = (char*)0;
  906. X    info->firstitem->widgetname = (Widget)0;
  907. X    info->firstitem->object = (Objdef*)0;
  908. X    info->firstitem->next = (struct itemdef*)0;
  909. X    }
  910. X    
  911. X    a = (struct itemdef*) malloc( sizeof( struct itemdef ) );
  912. X    a->label = (char*)0;
  913. X    a->value = (char*)0;
  914. X    a->widgetname = (Widget)0;
  915. X    a->object = (Objdef*)0;
  916. X    a->next = (struct itemdef*)0;
  917. X    
  918. X    /* find the tail of the list */
  919. X    for( b=info->firstitem; b->next != (struct itemdef*)0; b = b->next );
  920. X    
  921. X    b->next = a;
  922. X    
  923. X    return a;
  924. }
  925. /*
  926. X * Function name: find_item
  927. X * Description: loop over all items for a menubutton or list.
  928. X *        find the one with the right label.
  929. X * Arguments: obj - object structure of menubutton or list.
  930. X *          label - label to match    
  931. X * Returns: pointer to item structure for matching item
  932. X */
  933. struct itemdef*
  934. X  find_item(obj,label)
  935. Objdef* obj;
  936. char* label;
  937. {
  938. X    struct itemdef* item;
  939. X    
  940. X    /* loop over items */
  941. X    for ( item=((struct itemizedinfo *) obj->info)->firstitem; 
  942. X     item != (struct itemdef*) 0; item=item->next )
  943. X      {
  944. X      if (!strcmp(item->label,label)) {
  945. X          return item;
  946. X      }
  947. X      }
  948. X    
  949. X    fprintf(stderr,"find_item cannot find item with label %s\n",
  950. X        (char *) label);
  951. X    exit(-1);  
  952. }
  953. SHAR_EOF
  954. chmod 0664 xtpanel/item.c ||
  955. echo 'restore of xtpanel/item.c failed'
  956. Wc_c="`wc -c < 'xtpanel/item.c'`"
  957. test 2737 -eq "$Wc_c" ||
  958.     echo 'xtpanel/item.c: original size 2737, current size' "$Wc_c"
  959. fi
  960. # ============= xtpanel/actions.c ==============
  961. if test -f 'xtpanel/actions.c' -a X"$1" != X"-c"; then
  962.     echo 'x - skipping xtpanel/actions.c (File already exists)'
  963. else
  964. echo 'x - extracting xtpanel/actions.c (Text)'
  965. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/actions.c' &&
  966. X
  967. X
  968. /*
  969. X * Copyright 1992 the Board of Trustees of the Leland Stanford Junior
  970. X * University. Official permission to use this software is included in
  971. X * the documentation. It authorizes you to use this file for any
  972. X * non-commercial purpose, provided that this copyright notice is not
  973. X * removed and that any modifications made to this file are commented
  974. X * and dated in the style of the example below.
  975. X */
  976. X
  977. /*
  978. X *
  979. X *  source file:   ./xtpanel/actions.c
  980. X *
  981. X * Steve Cole, Dave Nichols (SEP), August 28 1992
  982. X *      Inserted this sample edit history entry.
  983. X *      Please log any further modifications made to this file:
  984. X * Steve Cole, Dave Nichols (SEP), November 20 1992 -  version 2.00
  985. X * 1) added new objects: toggle, scrollbar, graph.
  986. X * 2) added new actions: ASSIGN, SET.
  987. X * 3) objects can have multiple actions.
  988. X * 4) backquoted strings in actions get executed at action time.
  989. X */
  990. X
  991. #include <stdio.h>
  992. #include <string.h>
  993. X
  994. #include "tree.h"
  995. X
  996. #include "actions.h"
  997. #include "object.h"
  998. #include "eval_command.h"
  999. #include "string_buf.h"
  1000. X
  1001. extern int quitflag;
  1002. X
  1003. /*
  1004. X * Function name: parse_actions
  1005. X * Description: parses all the actions for an object
  1006. X * Arguments: name (object->name) root (level in tree)
  1007. X * Returns: pointer to new structure of type action
  1008. X */
  1009. action* parse_actions( name, root )
  1010. X    char *name;
  1011. X    entry *root;
  1012. {
  1013. X      action *topact;
  1014. X      char *act_string;
  1015. X      action *act;
  1016. X      entry *ent;
  1017. X
  1018. X    /* Initiall no actions */
  1019. X    topact = (action*) 0;
  1020. X
  1021. X    /* loop over action strings, parse each */
  1022. X    for (ent = get_next(root,"action",(entry*) 0);
  1023. X    ent != ((entry*) 0);
  1024. X    ent = get_next(root,"action",ent)) {
  1025. X        if( ent != (entry*)0 &&  ent->value != (char*)0 ) {
  1026. X                act_string = strdupl( ent->value );
  1027. X            }else{
  1028. X                act_string = strdupl( "NONE" );
  1029. X            }
  1030. X
  1031. X            /* create a new action struct */
  1032. X        if( topact == (action*) 0){
  1033. X           act = topact =  new_action( 0 );
  1034. X        }else{
  1035. X               act = (action*) new_action(topact);
  1036. X        }
  1037. X        parse_one_action( act, name, act_string );
  1038. X    }
  1039. X
  1040. X    /* make an action of "NONE" if none were specified */
  1041. X    if( topact == 0 ){
  1042. X     act = topact =  new_action( 0 );
  1043. X     parse_one_action( act, name, "NONE" );
  1044. X    }
  1045. X
  1046. X    /* return the head of the list */
  1047. X    return topact;
  1048. }
  1049. X
  1050. /*
  1051. X * Function name: parse_one_action
  1052. X * Description: parses a single action for an object
  1053. X * Arguments: act (action structure) name (object->name) act_string (to parse)
  1054. X * Returns: none
  1055. X */
  1056. void parse_one_action( act, name, act_string )
  1057. X     action *act;
  1058. X     char* name;
  1059. X     char* act_string;
  1060. {
  1061. X    char *startpos;
  1062. X    int len;
  1063. X    int brackets;
  1064. X
  1065. X    /* strip leading blanks */
  1066. X    len = strspn( act_string, " \t\n" );
  1067. X    act_string += len;
  1068. X    
  1069. X
  1070. X    /* no action specified or "NONE" explicitly specified */
  1071. X    if( !strncmp( act_string, "NONE" , 4 ) ){
  1072. X      act->type=NONE; return;
  1073. X    }
  1074. X    
  1075. X    /* "QUIT" explicitly specified */
  1076. X    if( !strncmp( act_string, "QUIT" , 4 ) ){
  1077. X    quitflag=1; 
  1078. X    act->type=QUIT; return;
  1079. X    }
  1080. X    
  1081. X    /* In either of the next three cases we will generate a "format" string */
  1082. X    if( !strncmp( act_string, "PRINT" , 5 ) ){
  1083. X    act->type=PRINT;
  1084. X    act_string += 5;
  1085. X    }else if(!strncmp( act_string, "STRING" , 6 ) ){
  1086. X    act->type=STRING;
  1087. X    act_string += 6;
  1088. X    }else if(!strncmp( act_string, "ASSIGN" , 6 ) ){
  1089. X    act->type=ASSIGN;
  1090. X    act_string += 6;
  1091. X    /* the next word is the object name to assign it to */
  1092. X    for(startpos=act_string; *startpos==' '; startpos++); 
  1093. X        len = strcspn( startpos, " " ); act->assignto = malloc( len + 1); 
  1094. X    strncpy( act->assignto, startpos, len ); act->assignto[len]='\0'; 
  1095. X    act_string = startpos+len+1;
  1096. X    
  1097. X    }else if(!strncmp( act_string, "SET" , 3 ) ){
  1098. X    act->type=SET;
  1099. X    act_string += 3;
  1100. X    /* the next word is the object name to assign it to */
  1101. X    for(startpos=act_string; *startpos==' '; startpos++); 
  1102. X        len = strcspn( startpos, " " ); act->assignto = malloc( len + 1); 
  1103. X    strncpy( act->assignto, startpos, len ); act->assignto[len]='\0'; 
  1104. X    act_string = startpos+len+1;
  1105. X    /* the next word is the tag to assign it to */
  1106. X    for(startpos=act_string; *startpos==' '; startpos++); 
  1107. X        len = strcspn( startpos, " " ); act->totag = malloc( len + 1); 
  1108. X    strncpy( act->totag, startpos, len ); act->totag[len]='\0'; 
  1109. X    act_string = startpos+len+1;
  1110. X    
  1111. X    }else if(!strncmp( act_string, "SYSTEM" , 6 ) ){
  1112. X    act->type=SYSTEM;
  1113. X    act_string += 6;
  1114. X    }else {
  1115. X    act->type=SYSTEM;
  1116. X    }
  1117. X    
  1118. X    /* allocate space, probably a little too much, better safe than sorry */
  1119. X    act->format = malloc( strlen( act_string ) + 10  );
  1120. X    act->format[0] = '\0';
  1121. X    
  1122. X    while( *act_string != '\0' ){
  1123. X    
  1124. X    /* look for the next '$' */
  1125. X    len = strcspn( act_string, "$" );
  1126. X    
  1127. X    /* copy up to this point */
  1128. X    strncat( act->format, act_string, len );
  1129. X    
  1130. X    act_string += len;
  1131. X    
  1132. X    if( *act_string != '\0' ){ 
  1133. X        
  1134. X        /* we have found a new $ token */
  1135. X        
  1136. X        if( act_string[1] == '$' ){
  1137. X        /* double $$ means emit a single $ in the format */
  1138. X        strcat( act->format, "$" ); act_string +=2;
  1139. X        
  1140. X        }else{
  1141. X        
  1142. X        if( act->num_args == MAX_ARG ){
  1143. X            fprintf(stderr,
  1144. X                "Too many variables in an action, max is %d\n",
  1145. X                MAX_ARG);
  1146. X            exit(-1);
  1147. X        }
  1148. X        
  1149. X        /* add a "$val to the format */
  1150. X        strncat( act->format, "$val" , 4 );
  1151. X        
  1152. X        act_string++; /* skip the $ */
  1153. X        
  1154. X        /* skip ( between $ and variable name */
  1155. X        brackets = 0;
  1156. X            if( *act_string == '(' ){ act_string++; brackets = 1; }
  1157. X
  1158. X        /* look for the next blank, $, ), or quote
  1159. X            and examine the string */
  1160. X        len = strcspn( act_string, "$ )\"'`" );
  1161. X        
  1162. X        /* if it is $val use this object's string */
  1163. X        if( !strncmp( act_string, "val", len ) ){
  1164. X            act->args[act->num_args] = strdupl(name);
  1165. X            if( !strcmp( act->args[act->num_args], "NONAME" ) ){
  1166. X            fprintf(stderr,
  1167. X                " actions with $val must specify a name\n");
  1168. X            exit(-1);
  1169. X            }
  1170. X            act->num_args++;
  1171. X            
  1172. X        }else{
  1173. X            act->args[act->num_args] = malloc( len+1 );
  1174. X            strncpy(  act->args[act->num_args] , act_string, len );
  1175. X            (act->args[act->num_args])[len] = '\0';
  1176. X            act->num_args++;
  1177. X        }
  1178. X        act_string +=len;
  1179. X
  1180. X        /* skip ) if there was a ( between $ and variable name */
  1181. X            if( brackets==1 ){
  1182. X          if( *act_string == ')' ){
  1183. X             act_string++;
  1184. X           }else{
  1185. X             fprintf(stderr,"closing bracket missing after $(%s \n",
  1186. X            act->args[act->num_args-1] );
  1187. X             exit(-1);
  1188. X          }
  1189. X            }
  1190. X        }
  1191. X    }
  1192. X    }
  1193. X    
  1194. }
  1195. X
  1196. /*
  1197. X * Function name: new_action
  1198. X * Description: creates a structure for a new action
  1199. X * Arguments: action* topact ( first item in action list for an object)
  1200. X * Returns: pointer to new structure of type action
  1201. X */
  1202. action* new_action(topact)
  1203. X     action* topact;
  1204. {
  1205. X    action *a, *b;
  1206. X   
  1207. X    /* make a new action */ 
  1208. X    a = (action*) malloc( sizeof( action ) );
  1209. X    a->num_args = (int) 0;
  1210. X    a->assignto = (char *) 0;
  1211. X    a->next= (action*) 0;
  1212. X
  1213. X    if( topact == (action*)0 ) return a;
  1214. X    
  1215. X    /* find the tail of the list */
  1216. X    for( b=topact; b->next != (action*)0; b = b->next );
  1217. X    
  1218. X    b->next = a;
  1219. X    
  1220. X    return a;
  1221. }
  1222. X
  1223. /*
  1224. X * Function name: performs_actions
  1225. X * Description: performs all the actions for an object
  1226. X * Arguments: name (object->name) topact (head of action list) 
  1227. X *            all (>0 do all actions; =0 string actions only)
  1228. X * Returns: int
  1229. X */
  1230. int perform_actions( name, topact, all )
  1231. X     char *name;
  1232. X     action *topact;
  1233. X     int all;
  1234. {
  1235. X    action *act;
  1236. X    int retcode=0;
  1237. X
  1238. X    for (act=topact; act != (action*) 0; act=act->next) {
  1239. X    if (all || act->type == STRING || act->type == NONE)
  1240. X        retcode += perform_one_action( name, act );
  1241. X    }
  1242. X
  1243. X    return retcode;
  1244. }
  1245. X
  1246. /*
  1247. X * Function name: perform_one_action
  1248. X * Description: performs a single action for an object
  1249. X * Arguments: name (object->name) act (action) 
  1250. X * Returns: int
  1251. X */
  1252. int perform_one_action( name, act )
  1253. X     char *name;
  1254. X     action *act;
  1255. {
  1256. X    char *action_line;
  1257. X    
  1258. X    switch( act->type ){
  1259. X    case( NONE ):
  1260. X      return 0;
  1261. X    break;
  1262. X    
  1263. X    case( QUIT ):
  1264. X      quit_xtpanel();
  1265. X    break;
  1266. X    
  1267. X    case( PRINT ):
  1268. X      action_line = format_action( act );
  1269. X      printf( "%s",action_line );
  1270. X          fflush(stdout);
  1271. X      return 1;
  1272. X    break;
  1273. X    
  1274. X    case( STRING ):
  1275. X      action_line = format_action( act );
  1276. X      set_string( name, action_line );
  1277. X      return 0;
  1278. X    break;
  1279. X    
  1280. X    case( ASSIGN ):
  1281. X      action_line = format_action( act );
  1282. X      update_object( act->assignto, action_line );
  1283. X      return 0;
  1284. X    break;
  1285. X    
  1286. X    case( SET ):
  1287. X      action_line = format_action( act );
  1288. X      update_tag( act->assignto, act->totag, action_line );
  1289. X      return 0;
  1290. X    break;
  1291. X    
  1292. X    case( SYSTEM ):
  1293. X      action_line = format_action( act );
  1294. X      system( action_line );
  1295. X      return 1;
  1296. X    break;
  1297. X    }
  1298. X    
  1299. X    return 0;
  1300. }
  1301. X
  1302. /*
  1303. X * Function name: all_string_actions
  1304. X * Description: determines whether all actions for an object are string type
  1305. X * Arguments: topact (head of action list )
  1306. X * Returns: int (=0 if not all actions are strings, =1 otherwise)
  1307. X */
  1308. int all_string_actions( topact )
  1309. X     action *topact;
  1310. {
  1311. X    action *act;
  1312. X    int all_strings = 1;
  1313. X    for (act=topact; act != (action*) 0; act=act->next) {
  1314. X    if (act->type == PRINT || act->type == SYSTEM || 
  1315. X        act->type == ASSIGN || act->type == SET) all_strings = 0;
  1316. X    }
  1317. X    return all_strings;
  1318. }
  1319. X
  1320. X
  1321. static char* expand_args();
  1322. static char* expand_eval();
  1323. X
  1324. /* get the arguments from the object list and format the
  1325. X * output string in the buffer " */
  1326. char* format_action( act )
  1327. X     action* act;
  1328. {
  1329. X
  1330. X    char *tmp1, *tmp2 ;
  1331. X
  1332. X    tmp1 = strdupl( expand_args( act) );
  1333. X
  1334. X    tmp2 = expand_eval( tmp1 );
  1335. X
  1336. X    free( tmp1 );
  1337. X
  1338. X    return ( tmp2 );
  1339. X
  1340. }
  1341. X
  1342. /* get the arguments from the object list and format the
  1343. X * output string in the buffer "action_line" */
  1344. static char* expand_args( act )
  1345. action* act;
  1346. {
  1347. X    char* start, *next;
  1348. X    char *arg;
  1349. X    int len;
  1350. X    int i;
  1351. X    string_buf *buffer;
  1352. X  
  1353. X    buffer = buf_start();
  1354. X
  1355. X    /* retrieve the strings from the objects */
  1356. X   
  1357. X    start =   act->format;
  1358. X    for( i=0 ; i<act->num_args ;i++ ){
  1359. X    /* find the next $val in the action format */
  1360. X    next = strstr( start, "$val" );
  1361. X    if( next == NULL ){
  1362. X        fprintf(stderr,
  1363. X            "format_action(), couldn't format argument number %d \n",i);
  1364. X        exit(-1);
  1365. X        }
  1366. X
  1367. X        /* copy the format string up to this point */
  1368. X    len = next-start;
  1369. X    buf_cat( buffer, start, len );
  1370. X    /* now copy the string argument */
  1371. X    arg = get_string( act->args[i] );
  1372. X    buf_cat( buffer, arg, strlen( arg ) );
  1373. X    /* skip the "$val" */
  1374. X    start = next+4;
  1375. X    }
  1376. X
  1377. X    /* copy anything left over */
  1378. X    buf_cat( buffer, start, strlen(start) );
  1379. X
  1380. X    return buf_fetch(buffer);
  1381. X    
  1382. }
  1383. X
  1384. X
  1385. static char* expand_eval( format )
  1386. char* format;
  1387. {
  1388. X    char* res;
  1389. X    char *start, *next;
  1390. X    string_buf *buffer;
  1391. X  
  1392. X    buffer = buf_start(); 
  1393. X
  1394. X    start =  format; next = start;
  1395. X
  1396. X    while( (next=strchr( start, '`' ) ) != NULL ){
  1397. X
  1398. X        /* copy up to this point */
  1399. X    *next = '\0';
  1400. X    buf_cat( buffer, start, strlen(start) );
  1401. X
  1402. X    /* a command to evaluate */
  1403. X        start = ++next;
  1404. X    /* find the closing backquote */
  1405. X        next = strchr( start, '`' );
  1406. X        if( next == NULL ){
  1407. X        fprintf(stderr,
  1408. X           "format_action(), couldn't find matching backquote\n");
  1409. X        exit(-1);
  1410. X    }
  1411. X        *next='\0';
  1412. X
  1413. X    /* get the resulting string and add it to the buffer */
  1414. X        res = eval_command( start );
  1415. X        buf_cat( buffer, res, strlen(res) );
  1416. X
  1417. X    /* now keep going after the second backquote */
  1418. X        start= (++next);
  1419. X
  1420. X    }
  1421. X
  1422. X     /* anything left? */
  1423. X    buf_cat( buffer, start, strlen(start) );
  1424. X
  1425. X    /* return the formatted string */
  1426. X    return( buf_fetch(buffer) );
  1427. X    
  1428. }
  1429. X
  1430. X
  1431. void print_action( act )
  1432. X     action* act;
  1433. {
  1434. X    int i;
  1435. X    
  1436. X    switch( act->type ){
  1437. X    case( NONE ):    
  1438. X      printf(" action type NONE \n");
  1439. X    return;
  1440. X    break;
  1441. X    case( QUIT ):
  1442. X      printf(" action type QUIT \n");
  1443. X    return;
  1444. X    break;
  1445. X    
  1446. X    case( PRINT ):
  1447. X      printf(" action type PRINT \n");
  1448. X    break;
  1449. X    
  1450. X    case( SYSTEM ):
  1451. X      printf(" action type SYSTEM \n");
  1452. X    break;
  1453. X
  1454. X    case( STRING ):
  1455. X      printf(" action type STRING \n");
  1456. X    break;
  1457. X
  1458. X    case( ASSIGN ):
  1459. X      printf(" action type ASSIGN \n");
  1460. X    break;
  1461. X
  1462. X    case( SET ):
  1463. X      printf(" action type SET \n");
  1464. X    break;
  1465. X    }
  1466. X    
  1467. X    printf(" action format = ->%s<- \n",act->format);
  1468. X    
  1469. X    for( i=0; i<act->num_args; i++ ){
  1470. X    printf(" argument %d is %s \n",i,act->args[i]);
  1471. X    }
  1472. X    
  1473. }
  1474. SHAR_EOF
  1475. chmod 0664 xtpanel/actions.c ||
  1476. echo 'restore of xtpanel/actions.c failed'
  1477. Wc_c="`wc -c < 'xtpanel/actions.c'`"
  1478. test 12032 -eq "$Wc_c" ||
  1479.     echo 'xtpanel/actions.c: original size 12032, current size' "$Wc_c"
  1480. fi
  1481. # ============= xtpanel/CHANGES ==============
  1482. if test -f 'xtpanel/CHANGES' -a X"$1" != X"-c"; then
  1483.     echo 'x - skipping xtpanel/CHANGES (File already exists)'
  1484. else
  1485. echo 'x - extracting xtpanel/CHANGES (Text)'
  1486. sed 's/^X//' << 'SHAR_EOF' > 'xtpanel/CHANGES' &&
  1487. version 1.0 - 2 Sep 92
  1488. X
  1489. version 1.01 - 3 Sep 92
  1490. 1) Made all lines < 80 characters long. Some mailers truncated long lines.
  1491. 2) Shortened some file names.
  1492. 3) get_string now checks for unitialized objects and returns an empty string
  1493. X   if nothing has been set.
  1494. X
  1495. version 2.00 - 20 Nov 92
  1496. 1) Objects can have multiple actions; they get executed in order specified.
  1497. 2) Added new action ASSIGN. Allows one object to change another's value.
  1498. 3) Allow backquotes in actions; these get evaluated at action time.
  1499. 4) Added new objects scrollbar, toggle, graph.
  1500. 5) Message and text now have a value, not a label.
  1501. 6) Can use parentheses around variable names (e.g. $(var) ) in actions.
  1502. X   Avoids putting a space between value of variable and what follows.
  1503. 7) All objects now have a number of settable attributes: height, width, 
  1504. X   foreground, background, borderColor (colors), orientation, font,
  1505. X   bitmap, editType.
  1506. 8) Added new action SET which updates object's resources.
  1507. 9) Changed the example script to put its jobs in the background.
  1508. 10) Fixed bug in help scripts regarding "show copyright". 
  1509. 11) Updated generator to take advantage of new features.
  1510. 12) New examples - calculator, color_selector, bitmap_browser.
  1511. SHAR_EOF
  1512. chmod 0664 xtpanel/CHANGES ||
  1513. echo 'restore of xtpanel/CHANGES failed'
  1514. Wc_c="`wc -c < 'xtpanel/CHANGES'`"
  1515. test 1205 -eq "$Wc_c" ||
  1516.     echo 'xtpanel/CHANGES: original size 1205, current size' "$Wc_c"
  1517. fi
  1518. true || echo 'restore of xtpanel/main.c failed'
  1519. echo End of part 4, continue with part 5
  1520. exit 0
  1521. -----------------------------------------------------------------
  1522. Steve Cole  (steve@sep.stanford.edu, apple!sep!steve)
  1523. Department of Geophysics, Stanford University, Stanford, CA 94305
  1524.