home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume20 / xmps / part01 < prev    next >
Encoding:
Text File  |  1993-06-14  |  53.2 KB  |  1,881 lines

  1. Newsgroups: comp.sources.x
  2. From: jjm@hplb.hpl.hp.com (Jean-Jacques Moreau)
  3. Subject: REPOST: v20i026:  xmps - Motif process monitor, Part01/03
  4. Message-ID: <csx-v20i026=xmps.090810@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 71e88b5fec4eeaa86b61a41093eadfa7
  6. Sender: chris@sparky.imd.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Tue, 15 Jun 1993 14:08:58 GMT
  9. Approved: chris@sparky.imd.sterling.com
  10.  
  11. Submitted-by: jjm@hplb.hpl.hp.com (Jean-Jacques Moreau)
  12. Posting-number: Volume 20, Issue 26
  13. Archive-name: xmps/part01
  14. Environment: HP-UX, X11. OSF/Motif
  15.  
  16.  
  17.                  XMPS NOTES
  18.                 ------------
  19.  
  20.  
  21.  Description
  22.  -----------
  23.  
  24.  This directory contains the sources and documentation for XmPs, an X/Motif
  25.  version of `ps'. This release of XmPs offers several useful features,
  26.  including process sorting by ancestry, the ability to search for a process
  27.  by name (using regular expressions), the ability to kill a process or group
  28.  of processes, to restrict the process information to specific users, groups
  29.  or terminals, the ability to refresh the information automatically on a
  30.  periodic basis, and to keep multiple snapshots of that information.
  31.  
  32. #! /bin/sh
  33. # This is a shell archive.  Remove anything before this line, then feed it
  34. # into a shell via "sh file" or similar.  To overwrite existing files,
  35. # type "sh file -c".
  36. # Contents:  README Imakefile Makefile menus.h xmps.c xmps.man
  37. # Wrapped by chris@sparky on Tue Jun 15 08:52:04 1993
  38. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  39. echo If this archive is complete, you will see the following message:
  40. echo '          "shar: End of archive 1 (of 3)."'
  41. if test -f 'README' -a "${1}" != "-c" ; then 
  42.   echo shar: Will not clobber existing file \"'README'\"
  43. else
  44.   echo shar: Extracting \"'README'\" \(2496 characters\)
  45.   sed "s/^X//" >'README' <<'END_OF_FILE'
  46. X
  47. X                 XMPS NOTES
  48. X                ------------
  49. X
  50. X
  51. XDescription
  52. X-----------
  53. X
  54. XThis directory contains the sources and documentation for XmPs, an X/Motif
  55. Xversion of `ps'. This release of XmPs offers several useful features,
  56. Xincluding process sorting by ancestry, the ability to search for a process
  57. Xby name (using regular expressions), the ability to kill a process or group
  58. Xof processes, to restrict the process information to specific users, groups
  59. Xor terminals, the ability to refresh the information automatically on a
  60. Xperiodic basis, and to keep multiple snapshots of that information.
  61. X
  62. X
  63. X
  64. XSoftware required
  65. X-----------------
  66. X
  67. XThe only software required to compile XmPs are a C compiler (ansi or
  68. Xnon-ansi; POSIX or non-POSIX; both cc and gcc work fine), and either X11R5
  69. Xand Motif1.2, or X11R4 and Motif1.1.
  70. X
  71. XBy default, XmPs is compiled by cc, with X11R5 and Motif1.2.
  72. X
  73. X
  74. XMachines supported
  75. X------------------
  76. X
  77. XIf you follow the directions below, this release should compile and run on
  78. Xany unix platform, either directly or with only minimal changes, although
  79. Xonly the following configurations have been tested:
  80. X
  81. X    - HP 9000 s300/700/800 running HP-UX 8.0 or 9.01.
  82. X
  83. XIf you find problems running XmPs on any of the above configurations,
  84. Xplease let me know. Also, if you are able to compile and run XmPs on
  85. Xconfigurations not listed above, please let me know and tell me what
  86. Xchanges, if any, you needed to make to do it. I would like to keep the
  87. Xabove list up-to-date and continue to improve the portability of XmPs.
  88. X
  89. X
  90. XCompiling XmPs
  91. X--------------
  92. X
  93. XTo compile XmPs do the following:
  94. X
  95. X    (a) If you have only an Ansi compiler, and/or do not have X11R5 and
  96. X        Motif1.2, edit the Imakefile (or Makefile) and change the default
  97. X        switches to the ones required by your personal environment.
  98. X
  99. X    (b) Type `imake' to compile the main executable. This will create xmps.
  100. X        A non-imake Makefile exists for those who might want/need it, called
  101. X        Makefile.std.
  102. X
  103. X    (c) Edit the XmPs file so that the X resources for XmPs reflect your
  104. X    own system and preferences.
  105. X
  106. X    (d) Type `make install' to install XmPs.
  107. X
  108. X
  109. XSupport
  110. X-------
  111. X
  112. XThere is no official support organization for XmPs. However, I am very
  113. Xinterested in receiving bug reports, suggestions for improvements and
  114. Xpatches. Bugs should get fixed quickly (particularly if they are serious),
  115. Xbut enhancements may take a while and may not happen at all unless there
  116. Xis widespread support for them.
  117. X
  118. X
  119. XJean-Jacques Moreau (jjm@hplb.hpl.hp.com).
  120. END_OF_FILE
  121.   if test 2496 -ne `wc -c <'README'`; then
  122.     echo shar: \"'README'\" unpacked with wrong size!
  123.   fi
  124.   # end of 'README'
  125. fi
  126. if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  127.   echo shar: Will not clobber existing file \"'Imakefile'\"
  128. else
  129.   echo shar: Extracting \"'Imakefile'\" \(599 characters\)
  130.   sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
  131. X       OBJS = xmps.o process.o search.o snapshot.o print.o status.o format.o \
  132. X              option.o cursor.o timer.o error.o exit.o command.o xutil.o util.o
  133. X
  134. X#CDEBUGFLAGS = DebuggableCDebugFlags
  135. X#        CC = c89 -D_HPUX_SOURCE
  136. X#        CC = cc -Aa -D_HPUX_SOURCE
  137. X#        CC = gcc
  138. X         CC = cc
  139. X
  140. XDEPEXTENSIONLIB = 
  141. X   EXTENSIONLIB = 
  142. X          XMLIB = -L/usr/lib/Motif1.2 -lXm
  143. X
  144. X EXTRA_INCLUDES = -I. -I/usr/include/Motif1.2
  145. X
  146. X        DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
  147. X  SYS_LIBRARIES = $(XMLIB) $(XTOOLLIB) $(XLIB)
  148. X
  149. Xall:: xmps
  150. X
  151. XComplexProgramTarget(xmps)
  152. XInstallAppDefaults(XmPs)
  153. END_OF_FILE
  154.   if test 599 -ne `wc -c <'Imakefile'`; then
  155.     echo shar: \"'Imakefile'\" unpacked with wrong size!
  156.   fi
  157.   # end of 'Imakefile'
  158. fi
  159. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  160.   echo shar: Will not clobber existing file \"'Makefile'\"
  161. else
  162.   echo shar: Extracting \"'Makefile'\" \(11818 characters\)
  163.   sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  164. X# Makefile generated by imake - do not edit!
  165. X# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $
  166. X#
  167. X# The cpp used on this machine replaces all newlines and multiple tabs and
  168. X# spaces in a macro expansion with a single space.  Imake tries to compensate
  169. X# for this, but is not always successful.
  170. X#
  171. X
  172. X# -------------------------------------------------------------------------
  173. X# Makefile generated from "Imake.tmpl" and </tmp/IIf.a20081>
  174. X# $XConsortium: Imake.tmpl,v 1.138 91/07/30 14:59:20 rws Exp $
  175. X#
  176. X# Platform-specific parameters may be set in the appropriate <vendor>.cf
  177. X# configuration files.  Site-specific parameters should be set in the file
  178. X# site.def.  Full rebuilds are recommended if any parameters are changed.
  179. X#
  180. X# If your C preprocessor does not define any unique symbols, you will need
  181. X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  182. X# "make World" the first time).
  183. X#
  184. X
  185. X# 57
  186. X
  187. X# 64
  188. X
  189. X# 71
  190. X
  191. X# 85
  192. X
  193. X# 92
  194. X
  195. X# 114
  196. X
  197. X# 121
  198. X
  199. X# 128
  200. X
  201. X# 136
  202. X
  203. X# 143
  204. X
  205. X# 152
  206. X
  207. X# 159
  208. X
  209. X# 184
  210. X
  211. X# 197
  212. X
  213. X# 208
  214. X
  215. X# 220
  216. X
  217. X# 230
  218. X
  219. X# 237
  220. X
  221. X# 246
  222. X
  223. X# 253
  224. X
  225. X# -------------------------------------------------------------------------
  226. X# site-specific configuration parameters that need to come before
  227. X# the platform-specific parameters - edit site.def to change
  228. X
  229. X# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  230. X
  231. X# 41
  232. X
  233. X# -------------------------------------------------------------------------
  234. X# platform-specific configuration parameters - edit hp.cf to change
  235. X
  236. X# platform:  $XConsortium: hp.cf,v 1.47 91/07/28 22:39:35 rws Exp $
  237. X#            modified for HP X11R5 includes and libs by bt@irfu.se 920222
  238. X
  239. X# machines:  HP9000/700 and 800 series
  240. X
  241. X# operating system:     HP-UX 9 . 01
  242. X# 39
  243. X
  244. X# $$
  245. X
  246. X# 27
  247. X
  248. X# 49
  249. X
  250. X# 283
  251. X
  252. X# 294
  253. X
  254. X# -------------------------------------------------------------------------
  255. X# site-specific configuration parameters that go after
  256. X# the platform-specific parameters - edit site.def to change
  257. X
  258. X# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  259. X
  260. X# 30
  261. X
  262. X# 312
  263. X
  264. X# 315
  265. X
  266. X# 321
  267. X
  268. X# 324
  269. X
  270. X# 334
  271. X
  272. X# 344
  273. X
  274. X# 356
  275. X
  276. X# 362
  277. X
  278. X# 366
  279. X
  280. X# 378
  281. X
  282. X# 381
  283. X
  284. X# 390
  285. X
  286. X# 424
  287. X
  288. X# 435
  289. X
  290. X# 445
  291. X
  292. X# 451
  293. X
  294. X# 491
  295. X
  296. X# 504
  297. X
  298. X# 537
  299. X
  300. X# 540
  301. X
  302. X# 553
  303. X
  304. X# 560
  305. X
  306. X# 571
  307. X
  308. X# 577
  309. X
  310. X# 583
  311. X
  312. X# 596
  313. X
  314. X# 606
  315. X
  316. X# 613
  317. X
  318. X# 619
  319. X
  320. X# 631
  321. X
  322. X# 638
  323. X
  324. X# 669
  325. X
  326. X            SHELL = /bin/sh
  327. X
  328. X              TOP = .
  329. X      CURRENT_DIR = .
  330. X
  331. X               AR = ar clq
  332. X  BOOTSTRAPCFLAGS =
  333. X               CC = cc
  334. X               AS = as
  335. X
  336. X               FC = f77
  337. X      FDEBUGFLAGS =
  338. X          FCFLAGS =  $(FDEBUGFLAGS)
  339. X
  340. X         COMPRESS = compress
  341. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  342. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  343. X          INSTALL = $(BINDIR)/bsdinst
  344. X               LD = ld
  345. X             LINT = lint
  346. X      LINTLIBFLAG = -o
  347. X         LINTOPTS = -ax
  348. X               LN = ln -s
  349. X             MAKE = make
  350. X               MV = mv -f
  351. X               CP = cp
  352. X# 712
  353. X
  354. X               RM = rm -f
  355. X            TROFF = psroff
  356. X         MSMACROS = -ms
  357. X              TBL = tbl
  358. X              EQN = eqn
  359. X     STD_INCLUDES = -I/usr/include/X11R5 -I/usr/include/Motif1.2
  360. X  STD_CPP_DEFINES = -DSYSV
  361. X      STD_DEFINES = -DSYSV
  362. X EXTRA_LOAD_FLAGS =
  363. X  EXTRA_LIBRARIES = -lPW
  364. X             TAGS = ctags
  365. X
  366. X           MFLAGS = -$(MAKEFLAGS)
  367. X
  368. X    SHAREDCODEDEF = -DSHAREDCODE
  369. X         SHLIBDEF =
  370. X
  371. X# 733
  372. X
  373. X# 739
  374. X
  375. X# 742
  376. X
  377. X# 745
  378. X
  379. X# 748
  380. X
  381. X# 751
  382. X
  383. X# 754
  384. X
  385. X# 757
  386. X
  387. X# 770
  388. X
  389. X    PROTO_DEFINES =
  390. X
  391. X# 777
  392. X
  393. X     INSTPGMFLAGS =
  394. X
  395. X     INSTBINFLAGS = -m 0755
  396. X     INSTUIDFLAGS = -m 4755
  397. X     INSTLIBFLAGS = -m 0644
  398. X     INSTINCFLAGS = -m 0444
  399. X     INSTMANFLAGS = -m 0444
  400. X     INSTDATFLAGS = -m 0444
  401. X    INSTKMEMFLAGS = -m 4755
  402. X
  403. X# 790
  404. X
  405. X# 794
  406. X
  407. X# 797
  408. X
  409. X      CDEBUGFLAGS = -O
  410. X        CCOPTIONS =
  411. X
  412. X      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
  413. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
  414. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  415. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  416. X# 813
  417. X
  418. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  419. X
  420. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)
  421. X# 820
  422. X
  423. X   LDCOMBINEFLAGS = -X -r
  424. X      DEPENDFLAGS =
  425. X
  426. X        MACROFILE = hp.cf
  427. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  428. X
  429. X    IMAKE_DEFINES =
  430. X
  431. X         IRULESRC = $(CONFIGDIR)
  432. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  433. X# 834
  434. X
  435. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  436. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  437. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  438. X
  439. X# -------------------------------------------------------------------------
  440. X# X Window System Build Parameters
  441. X# $XConsortium: Project.tmpl,v 1.138 91/09/10 09:02:12 rws Exp $
  442. X
  443. X# 21
  444. X
  445. X# 33
  446. X
  447. X# 37
  448. X
  449. X# 62
  450. X
  451. X# 132
  452. X
  453. X# 135
  454. X
  455. X# 169
  456. X
  457. X# 180
  458. X
  459. X# 197
  460. X
  461. X# 206
  462. X
  463. X# 211
  464. X
  465. X# 238
  466. X
  467. X# 241
  468. X
  469. X# 253
  470. X
  471. X# 261
  472. X
  473. X# 271
  474. X
  475. X# 286
  476. X
  477. X# 332
  478. X
  479. X# 363
  480. X
  481. X# 375
  482. X
  483. X# 385
  484. X
  485. X# 388
  486. X
  487. X# 391
  488. X
  489. X# 394
  490. X
  491. X# 397
  492. X
  493. X# 400
  494. X
  495. X# 403
  496. X
  497. X# 406
  498. X
  499. X# 409
  500. X
  501. X# 412
  502. X
  503. X# 418
  504. X
  505. X# 424
  506. X
  507. X# 427
  508. X
  509. X# 430
  510. X
  511. X# 433
  512. X
  513. X# 436
  514. X
  515. X# 442
  516. X
  517. X# -------------------------------------------------------------------------
  518. X# X Window System make variables; this need to be coordinated with rules
  519. X
  520. X          PATHSEP = /
  521. X        USRLIBDIR = /usr/lib
  522. X           BINDIR = /usr/bin/X11
  523. X          INCROOT = /usr/include
  524. X     BUILDINCROOT = $(TOP)
  525. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  526. X      BUILDINCTOP = ..
  527. X           INCDIR = $(INCROOT)/X11
  528. X           ADMDIR = /usr/adm
  529. X           LIBDIR = $(USRLIBDIR)/X11
  530. X        CONFIGDIR = /usr/lib/X11/config
  531. X       LINTLIBDIR = $(USRLIBDIR)/lint
  532. X
  533. X          FONTDIR = $(LIBDIR)/fonts
  534. X         XINITDIR = $(LIBDIR)/xinit
  535. X           XDMDIR = $(LIBDIR)/xdm
  536. X           TWMDIR = $(LIBDIR)/twm
  537. X          MANPATH = /usr/man
  538. X    MANSOURCEPATH = $(MANPATH)/man
  539. X        MANSUFFIX = n
  540. X     LIBMANSUFFIX = 3
  541. X           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
  542. X        LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
  543. X           NLSDIR = $(LIBDIR)/nls
  544. X        PEXAPIDIR = $(LIBDIR)/PEX
  545. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  546. X       FONTCFLAGS = -t
  547. X
  548. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  549. X
  550. X            IMAKE = imake
  551. X           DEPEND = makedepend
  552. X              RGB = rgb
  553. X# 492
  554. X
  555. X            FONTC = bdftopcf
  556. X
  557. X        MKFONTDIR = mkfontdir
  558. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier
  559. X# 508
  560. X
  561. X        CONFIGSRC = $(TOP)/config
  562. X       DOCUTILSRC = $(TOP)/doc/util
  563. X        CLIENTSRC = $(TOP)/clients
  564. X          DEMOSRC = $(TOP)/demos
  565. X           LIBSRC = $(TOP)/lib
  566. X          FONTSRC = $(TOP)/fonts
  567. X       INCLUDESRC = $(TOP)/X11
  568. X        SERVERSRC = $(TOP)/server
  569. X          UTILSRC = $(TOP)/util
  570. X        SCRIPTSRC = $(UTILSRC)/scripts
  571. X       EXAMPLESRC = $(TOP)/examples
  572. X       CONTRIBSRC = $(TOP)/../contrib
  573. X           DOCSRC = $(TOP)/doc
  574. X           RGBSRC = $(TOP)/rgb
  575. X        DEPENDSRC = $(UTILSRC)/makedepend
  576. X         IMAKESRC = $(CONFIGSRC)
  577. X         XAUTHSRC = $(LIBSRC)/Xau
  578. X          XLIBSRC = $(LIBSRC)/X
  579. X           XMUSRC = $(LIBSRC)/Xmu
  580. X       TOOLKITSRC = $(LIBSRC)/Xt
  581. X       AWIDGETSRC = $(LIBSRC)/Xaw
  582. X       OLDXLIBSRC = $(LIBSRC)/oldX
  583. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  584. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  585. X      BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
  586. X      BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
  587. X     MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
  588. X         FSLIBSRC = $(FONTSRC)/lib/fs
  589. X    FONTSERVERSRC = $(FONTSRC)/server
  590. X     EXTENSIONSRC = $(TOP)/extensions
  591. X         XILIBSRC = $(EXTENSIONSRC)/lib/xinput
  592. X      PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
  593. X
  594. X# 551
  595. X
  596. X# 565
  597. X
  598. X# 570
  599. X
  600. X# 577
  601. X
  602. X# $$
  603. X
  604. XSHLIBLDFLAGS = -b
  605. XPICFLAGS = +Z
  606. X
  607. X  DEPEXTENSIONLIB =
  608. X     EXTENSIONLIB = -lXext
  609. X
  610. X          DEPXLIB = $(DEPEXTENSIONLIB)
  611. X             XLIB = $(EXTENSIONLIB) -lX11
  612. X
  613. X        DEPXMULIB = $(USRLIBDIR)/X11R5/libXmu.sl
  614. X           XMULIB = -lXmu
  615. X
  616. X       DEPOLDXLIB =
  617. X          OLDXLIB = -loldX
  618. X
  619. X      DEPXTOOLLIB = $(USRLIBDIR)/X11R5/libXt.sl
  620. X         XTOOLLIB = -lXt
  621. X
  622. X        DEPXAWLIB = $(USRLIBDIR)/X11R5/libXaw.sl
  623. X           XAWLIB = -lXaw
  624. X
  625. X        DEPXILIB =
  626. X           XILIB = -lXi
  627. X
  628. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR)/X11R5  -L$(USRLIBDIR)/Motif1.2
  629. X# 47
  630. X
  631. X        SOXLIBREV = SharedXlibRev
  632. X          SOXTREV = SharedXtRev
  633. X         SOXAWREV = SharedXawRev
  634. X        SOOLDXREV = SharedOldXRev
  635. X         SOXMUREV = SharedXmuRev
  636. X        SOXEXTREV = SharedXextRev
  637. X      SOXINPUTREV = SharedXinputRev
  638. X
  639. X# 594
  640. X
  641. X# 598
  642. X
  643. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  644. X         XAUTHLIB =  -lXau
  645. X      DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
  646. X         XDMCPLIB =  -lXdmcp
  647. X# 606
  648. X
  649. X# 610
  650. X
  651. X# 614
  652. X
  653. X# 618
  654. X
  655. X# 622
  656. X
  657. X        DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
  658. X           PHIGSLIB =  -lphigs
  659. X
  660. X       DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
  661. X          XBSDLIB =  -lXbsd
  662. X
  663. X LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
  664. X         LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
  665. X          LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
  666. X        LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
  667. X          LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
  668. X           LINTXI = $(LINTLIBDIR)/llib-lXi.ln
  669. X        LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln
  670. X
  671. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  672. X# 657
  673. X
  674. X         DEPLIBS1 = $(DEPLIBS)
  675. X         DEPLIBS2 = $(DEPLIBS)
  676. X         DEPLIBS3 = $(DEPLIBS)
  677. X
  678. X# -------------------------------------------------------------------------
  679. X# Imake rules for building libraries, programs, scripts, and data files
  680. X# rules:  $XConsortium: Imake.rules,v 1.121 91/08/22 16:32:50 rws Exp $
  681. X
  682. X# 168
  683. X
  684. X# 179
  685. X
  686. X# 359
  687. X
  688. X# 606
  689. X
  690. X# 621
  691. X
  692. X# 643
  693. X
  694. X# 714
  695. X
  696. X# 1347
  697. X
  698. X# 1444
  699. X
  700. X# 1461
  701. X
  702. X# 1473
  703. X
  704. X# 1492
  705. X
  706. X# 1507
  707. X
  708. X# -------------------------------------------------------------------------
  709. X# start of Imakefile
  710. X
  711. X       OBJS = xmps.o process.o search.o snapshot.o print.o status.o format.o \
  712. X              option.o cursor.o timer.o error.o exit.o command.o xutil.o util.o
  713. X
  714. XCDEBUGFLAGS = -g
  715. X        CC = c89 -D_HPUX_SOURCE
  716. X#        CC = cc -Aa -D_HPUX_SOURCE
  717. X#        CC = gcc
  718. X
  719. XDEPEXTENSIONLIB =
  720. X   EXTENSIONLIB =
  721. X          XMLIB = -L/usr/lib/Motif1.2 -lXm
  722. X
  723. X EXTRA_INCLUDES = -I. -I/usr/include/Motif1.2
  724. X
  725. X        DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
  726. X  SYS_LIBRARIES = $(XMLIB) $(XTOOLLIB) $(XLIB)
  727. X
  728. Xall:: xmps
  729. X
  730. X PROGRAM = xmps
  731. X
  732. Xall:: xmps
  733. X
  734. Xxmps: $(OBJS) $(DEPLIBS)
  735. X    if [ -f $@ ]; then $(RM) $@~; $(MV) $@ $@~; fi
  736. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  737. X
  738. Xinstall:: xmps
  739. X    @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
  740. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
  741. X    $(INSTALL) -c $(INSTPGMFLAGS)  xmps $(DESTDIR)$(BINDIR)
  742. X
  743. Xinstall.man:: xmps.man
  744. X    @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
  745. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
  746. X    $(INSTALL) -c $(INSTMANFLAGS) xmps.man $(DESTDIR)$(MANDIR)/xmps.$(MANSUFFIX)
  747. X
  748. Xdepend::
  749. X    $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  750. X
  751. Xlint:
  752. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  753. Xlint1:
  754. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  755. X
  756. Xclean::
  757. X    $(RM) $(PROGRAM)
  758. X
  759. Xinstall:: XmPs.ad
  760. X    @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then set +x; \
  761. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); fi
  762. X    $(INSTALL) -c $(INSTAPPFLAGS) XmPs.ad $(DESTDIR)$(XAPPLOADDIR)/XmPs
  763. X
  764. X# -------------------------------------------------------------------------
  765. X# common rules for all Makefiles - do not edit
  766. X
  767. Xemptyrule::
  768. X
  769. Xclean::
  770. X    $(RM_CMD) "#"*
  771. X
  772. XMakefile::
  773. X    -@if [ -f Makefile ]; then set -x; \
  774. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  775. X    else exit 0; fi
  776. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  777. X
  778. Xtags::
  779. X    $(TAGS) -w *.[ch]
  780. X    $(TAGS) -xw *.[ch] > TAGS
  781. X# 868
  782. X
  783. X# 876
  784. X
  785. X# 890
  786. X
  787. X# -------------------------------------------------------------------------
  788. X# empty rules for directories that do not have SUBDIRS - do not edit
  789. X
  790. Xinstall::
  791. X    @echo "install in $(CURRENT_DIR) done"
  792. X
  793. Xinstall.man::
  794. X    @echo "install.man in $(CURRENT_DIR) done"
  795. X
  796. XMakefiles::
  797. X
  798. Xincludes::
  799. X
  800. X# -------------------------------------------------------------------------
  801. X# dependencies generated by makedepend
  802. X
  803. END_OF_FILE
  804.   if test 11818 -ne `wc -c <'Makefile'`; then
  805.     echo shar: \"'Makefile'\" unpacked with wrong size!
  806.   fi
  807.   # end of 'Makefile'
  808. fi
  809. if test -f 'menus.h' -a "${1}" != "-c" ; then 
  810.   echo shar: Will not clobber existing file \"'menus.h'\"
  811. else
  812.   echo shar: Extracting \"'menus.h'\" \(3263 characters\)
  813.   sed "s/^X//" >'menus.h' <<'END_OF_FILE'
  814. XMenuDescStruct processMenu[] = {
  815. X     { "Process", "process", 'P' },
  816. X     { "Refresh", "refresh", 'R', "<Ctrl>R", "Ctrl<Key>r:",
  817. X          reDisplayProcesses},
  818. X     { "-" },
  819. X     { "Select All", "selectAll", '-', "-", "-",
  820. X          selectAllProcesses},
  821. X     { "Unselect All", "unselectAll", '-', "-", "-",
  822. X          unselectAllProcesses},
  823. X     { "Execute Action On", "executeAction", 'E', "<Ctrl>E", "Ctrl<Key>e:",
  824. X          applyAction},
  825. X     { "-" },
  826. X     { "Search For...", "searchFor", 'S', "<Ctrl>S", "Ctrl<Key>s:",
  827. X          searchProcessPrompt},
  828. X     { "-Previous", "previous", 'P', "<Ctrl>P", "Ctrl<Key>p:",
  829. X          searchProcess, (caddr_t) ACTION_SEARCH_PREVIOUS},
  830. X     { "-Next", "next", 'N', "<Ctrl>N", "Ctrl<Key>n:",
  831. X          searchProcess, (caddr_t) ACTION_SEARCH_NEXT},
  832. X     { "-" },
  833. X     { "Exit", "exit", 'x', "<Ctrl>X", "Ctrl<Key>x:",
  834. X          exitXmPs},
  835. X};
  836. X
  837. XMenuDescStruct viewMenu[] = {
  838. X     { "View", "view", 'V' },
  839. X     { "-New", "new", '-', "-", "-",
  840. X          createNewView, (caddr_t) ACTION_NEW_VIEW },
  841. X     { "Print", "print", '-', "-", "-",
  842. X          printProcesses },
  843. X     { "Snapshot...", "snapshot", '-', "-", "-",
  844. X          takeSnapshot },
  845. X     { "-" },
  846. X     { "^Full Listing", "fullListing", '-', "-", "-",
  847. X          changeOption, (caddr_t) MENU_FULL_LISTING, &resources.fullListing },
  848. X     { "^Long Listing", "longListing", '-', "-", "-",
  849. X          changeOption, (caddr_t) MENU_LONG_LISTING, &resources.longListing },
  850. X     { "-" },
  851. X     { "^All Processes", "allProcesses", '-', "-", "-",
  852. X          changeOption, (caddr_t) MENU_ALL_PROCESSES, &resources.allProcesses },
  853. X     { "^No Group Leader Process", "noGroupLeader", '-', "-", "-",
  854. X          changeOption, (caddr_t) MENU_NO_GROUP_LEADER, &resources.noGroupLeader },
  855. X     { "^No Terminal Independent Process", "noNonTerminal", '-', "-", "-",
  856. X          changeOption, (caddr_t) MENU_NO_NON_TERMINAL, &resources.noNonTerminal },
  857. X};
  858. X
  859. XMenuDescStruct optionMenu[] = {
  860. X     { "Option", "option", 'O' },
  861. X     { "^Beautify Listing", "beautify", '-', "-", "-",
  862. X          changeOption, (caddr_t) MENU_BEAUTIFY, &resources.beautify },
  863. X     { "-" },
  864. X     { "^Refresh Automatically", "automaticRefresh", '-', "-", "-",
  865. X          changeOption, (caddr_t) MENU_AUTOMATIC_REFRESH, &resources.automaticRefresh },
  866. X     { "^Refresh Periodically", "periodicRefresh", '-', "-", "-",
  867. X          changeOption, (caddr_t) MENU_PERIODIC_REFRESH, &resources.periodicRefresh },
  868. X     { "-" },
  869. X     { "^Search Ignore Case", "ignoreCase", '-', "-", "-",
  870. X          changeOption, (caddr_t) MENU_IGNORE_CASE, &resources.ignoreCase },
  871. X     { "^Search & Select Multiple Occurrences", "multipleOccurrences", '-', "-", "-",
  872. X          changeOption, (caddr_t) MENU_MULTIPLE_OCCURRENCES, &resources.multipleOccurrences},
  873. X     { "-" },
  874. X     { "^Print Only Selected Processes", "printSelected", '-', "-", "-",
  875. X          changeOption, (caddr_t) MENU_PRINT_SELECTED, &resources.printSelected },
  876. X     { "-" },
  877. X     { "^Memorize New Parameters", "automaticMemory", '-', "-", "-",
  878. X          changeOption, (caddr_t) MENU_AUTOMATIC_MEMORY, &resources.automaticMemory },
  879. X};
  880. X
  881. XMenuDescStruct helpMenu[] = {
  882. X     { "Help", "help", 'H' },
  883. X     { "On Version", "version", 'V', "<Ctrl>V", "Ctrl<Key>v:",
  884. X          versionXmPs},
  885. X};
  886. X
  887. X
  888. END_OF_FILE
  889.   if test 3263 -ne `wc -c <'menus.h'`; then
  890.     echo shar: \"'menus.h'\" unpacked with wrong size!
  891.   fi
  892.   # end of 'menus.h'
  893. fi
  894. if test -f 'xmps.c' -a "${1}" != "-c" ; then 
  895.   echo shar: Will not clobber existing file \"'xmps.c'\"
  896. else
  897.   echo shar: Extracting \"'xmps.c'\" \(16822 characters\)
  898.   sed "s/^X//" >'xmps.c' <<'END_OF_FILE'
  899. X/*
  900. X * Copyright (C) 1991, 1992 Jean-Jacques Moreau.
  901. X *
  902. X * Permission to use, copy, modify, distribute, and sell this software
  903. X * and its documentation for any purpose is hereby granted without fee,
  904. X * provided that the above copyright notice appear in all copies and
  905. X * that both that copyright notice and this permission notice appear
  906. X * in supporting documentation.  The author makes no representations
  907. X * about the suitability of this software for any purpose.  It is
  908. X * provided "as is" without express or implied warranty.
  909. X *
  910. X * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  911. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
  912. X * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  913. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
  914. X * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  915. X * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
  916. X * USE OR PERFORMANCE OF THIS SOFTWARE.
  917. X */
  918. X
  919. X#ifndef lint
  920. Xstatic char copyright[] = "@(#) Copyright (c) 1991, 1992 Jean-Jacques Moreau\n\
  921. X All rights reserved";
  922. X#endif
  923. X
  924. X#ifndef lint
  925. Xstatic char rcsid[] = "@(#)$Header: xmps.c,v 1.1 92/05/19 17:14:01 jjm Exp $";
  926. X#endif
  927. X
  928. Xstatic char *version = "Motif Process Browser Version 1.1\n\
  929. X(c) Copyright 1991-1993 Jean-Jacques Moreau, All Rights Reserved";
  930. X
  931. X
  932. X#include <X11/Xlib.h>
  933. X#include <X11/cursorfont.h>
  934. X#include <Xm/Xm.h>
  935. X#include <Xm/XmStrDefs.h>
  936. X#include <Xm/CascadeB.h>
  937. X#include <Xm/CascadeBG.h>
  938. X#include <Xm/DialogS.h>
  939. X#include <Xm/Frame.h>
  940. X#include <Xm/MainW.h>
  941. X#include <Xm/List.h>
  942. X#include <Xm/PushBG.h>
  943. X#include <Xm/RowColumn.h>
  944. X#include <Xm/ScrolledW.h>
  945. X#include <Xm/SeparatoG.h>
  946. X#include <Xm/Text.h>
  947. X#include <Xm/ToggleBG.h>
  948. X
  949. X#include <stdio.h>
  950. X#include <unistd.h>
  951. X#include <errno.h>
  952. X
  953. X#define GLOBAL
  954. X#include "xmps.h"
  955. X#include "options.h"
  956. X#include "menus.h"
  957. X
  958. X
  959. XString generalTranslations =
  960. X     "<Map>: ReDisplay()";
  961. X
  962. XString textTranslations =
  963. X     "<Key>Return: UpdateParameter()\n\
  964. X     <Key>Escape: CancelInput()";
  965. X
  966. XString statusTranslations =
  967. X     "<Btn1Down>: DoInput()\n\
  968. X     <Key>Return: DoInput()";
  969. X
  970. XXtActionsRec xmPsActions[] = {
  971. X     { "ReDisplay", (XtActionProc) reDisplayProcessesIfNecessary},
  972. X     { "UpdateParameter", (XtActionProc) textParameterChange},
  973. X     { "DoInput", (XtActionProc) inputMode},
  974. X     { "CancelInput", (XtActionProc) noInputMode},
  975. X};
  976. X
  977. X
  978. Xint versionXmPs (widget, clientData, callData)
  979. X     Widget widget;
  980. X     caddr_t clientData;
  981. X     caddr_t callData;
  982. X{
  983. X     Widget versionDialog = NULL;
  984. X     
  985. X     if (! versionDialog) {
  986. X      XmString title, message;
  987. X
  988. X      Arg arglist[5];
  989. X      Cardinal i;
  990. X      
  991. X      title = XmStringCreateLtoR ("Version Dialog",
  992. X                      XmSTRING_DEFAULT_CHARSET);
  993. X      message = XmStringCreateLtoR (version,
  994. X                    XmSTRING_DEFAULT_CHARSET);
  995. X           
  996. X      i = 0;
  997. X      XtSetArg (arglist[i], XmNdialogTitle, title); i++;
  998. X      XtSetArg (arglist[i], XmNmessageString, message); i++;
  999. X      XtSetArg (arglist[i], XmNmessageAlignment, XmALIGNMENT_CENTER); i++;
  1000. X      XtSetArg (arglist[i], XmNdialogStyle, XmDIALOG_MODELESS); i++;
  1001. X      versionDialog = (Widget) XmCreateInformationDialog (topLevel,
  1002. X                                  "versionDialog",
  1003. X                                  arglist, i);
  1004. X
  1005. X      XtUnmanageChild ((Widget) XmMessageBoxGetChild (versionDialog,
  1006. X                              XmDIALOG_CANCEL_BUTTON));
  1007. X      XtUnmanageChild ((Widget) XmMessageBoxGetChild (versionDialog,
  1008. X                              XmDIALOG_HELP_BUTTON));
  1009. X
  1010. X      XmStringFree (title);
  1011. X      XmStringFree (message);
  1012. X    }
  1013. X
  1014. X    XtManageChild (versionDialog);
  1015. X}
  1016. X
  1017. X
  1018. XWidget createMenu (parent, menu, menuSize)
  1019. X     Widget parent;
  1020. X     MenuDescStruct menu[];
  1021. X     int menuSize;
  1022. X{
  1023. X     Widget pane;
  1024. X     Widget button;
  1025. X     Widget menuElement;
  1026. X
  1027. X     XmString label;
  1028. X     XmString acceleratorText;
  1029. X     Boolean sensitive, toggle;
  1030. X     int j;
  1031. X     
  1032. X     Arg arglist[6];
  1033. X     Cardinal i;
  1034. X     
  1035. X     /*
  1036. X      * Create a pulldown menu.
  1037. X      */
  1038. X     pane = (Widget) XmCreatePulldownMenu (parent, concat (menu[0].id, "Pane"),
  1039. X                       NULL, 0);
  1040. X
  1041. X     /*
  1042. X      * Create all the menu elements.
  1043. X      */
  1044. X     for (j = 1; j < menuSize; j++) {
  1045. X      int labelPosition = 0;
  1046. X
  1047. X      if (strcmp (menu[j].label, "-") == 0) {
  1048. X           XtManageChild (XmCreateSeparatorGadget (pane, "separator",
  1049. X                               NULL, 0));
  1050. X      } else {
  1051. X           sensitive = True;
  1052. X           if (menu[j].label[labelPosition] == '-') {
  1053. X            sensitive = False;
  1054. X            labelPosition++;
  1055. X           }
  1056. X
  1057. X           toggle = False;
  1058. X           if (menu[j].label[labelPosition] == '^') {
  1059. X            toggle = True;
  1060. X            labelPosition++;
  1061. X           }
  1062. X           
  1063. X           label = XmStringCreateLtoR (&menu[j].label[labelPosition],
  1064. X                       XmSTRING_DEFAULT_CHARSET);
  1065. X
  1066. X           acceleratorText = XmStringCreateLtoR (menu[j].acceleratorText,
  1067. X                             XmSTRING_DEFAULT_CHARSET);
  1068. X
  1069. X           i = 0;
  1070. X           XtSetArg (arglist[i], XmNlabelString, label); i++;
  1071. X           if (menu[j].mnemonic != '-') {
  1072. X            XtSetArg (arglist[i],
  1073. X                  XmNmnemonic, menu[j].mnemonic); i++;
  1074. X            XtSetArg (arglist[i],
  1075. X                  XmNacceleratorText, acceleratorText); i++;
  1076. X            XtSetArg (arglist[i],
  1077. X                  XmNaccelerator, menu[j].accelerator); i++;
  1078. X           }
  1079. X           XtSetArg (arglist[i], XmNsensitive, sensitive); i++;
  1080. X
  1081. X           if (! toggle)
  1082. X            menuElement = XmCreatePushButtonGadget (pane, menu[j].id,
  1083. X                                arglist, i);
  1084. X           else {
  1085. X            menuElement = XmCreateToggleButtonGadget (pane, menu[j].id,
  1086. X                                  arglist, i);
  1087. X            XmToggleButtonSetState (menuElement,
  1088. X                        *(menu[j].state), False);
  1089. X           }
  1090. X
  1091. X           XtManageChild (menuElement);
  1092. X
  1093. X           XtAddCallback (menuElement,
  1094. X                  toggle ?
  1095. X                  XmNvalueChangedCallback : XmNactivateCallback,
  1096. X                  (XtCallbackProc) menu[j].callback,
  1097. X                  menu[j].callbackData);
  1098. X
  1099. X           XmStringFree (label);
  1100. X           XmStringFree (acceleratorText);
  1101. X      }
  1102. X     }
  1103. X
  1104. X
  1105. X     /*
  1106. X      * Link the label and separators into the menu.
  1107. X      */
  1108. X     label = XmStringCreateLtoR (menu[0].label, XmSTRING_DEFAULT_CHARSET);
  1109. X
  1110. X     i = 0;
  1111. X     XtSetArg (arglist[i], XmNlabelString, label); i++;
  1112. X     XtSetArg (arglist[i], XmNmnemonic, menu[0].mnemonic); i++;
  1113. X     XtSetArg (arglist[i], XmNsubMenuId, pane); i++;
  1114. X
  1115. X     button = (Widget) XmCreateCascadeButton (parent,
  1116. X                          concat (menu[0].id, "Menu"),
  1117. X                          arglist, i);
  1118. X
  1119. X     XtManageChild (button);
  1120. X
  1121. X     XmStringFree (label);
  1122. X
  1123. X     /*
  1124. X      * Declare the help menu as the help menu for this application.
  1125. X      */
  1126. X     if (strcmp (menu[0].label, "Help") == 0) {
  1127. X      i = 0;
  1128. X      XtSetArg (arglist[i], XmNmenuHelpWidget, button); i++;
  1129. X      XtSetValues (parent, arglist, i);
  1130. X     }
  1131. X
  1132. X     return (pane);
  1133. X}
  1134. X
  1135. X     
  1136. XWidget createSelectionMenu (parent, title, labels)
  1137. X     Widget parent;
  1138. X     String title;
  1139. X     String labels;
  1140. X{
  1141. X     Widget pane;
  1142. X     Widget menu;
  1143. X     Widget menuElement;
  1144. X     XmString string, accelerator;
  1145. X     char s[512];
  1146. X
  1147. X     String label;
  1148. X     String labelSeparators = ","; /* <comma> */
  1149. X
  1150. X     Arg arglist[5];
  1151. X     Cardinal i;
  1152. X     
  1153. X     /*
  1154. X      * Create a pulldown menu.
  1155. X      */
  1156. X     pane = (Widget) XmCreatePulldownMenu (parent,
  1157. X                       concat (title, "Pane"), NULL, 0);
  1158. X
  1159. X     /*
  1160. X      * Add the first menu label.
  1161. X      */
  1162. X     if ((label = strtok (labels, labelSeparators)) != NULL) {
  1163. X          string = XmStringCreateLtoR (label, XmSTRING_DEFAULT_CHARSET);
  1164. X
  1165. X      i = 0;
  1166. X      XtSetArg (arglist[i], XmNlabelString, string); i++;
  1167. X      menuElement = (Widget) XmCreatePushButtonGadget (pane,
  1168. X                               concat (label, ""),
  1169. X                               arglist, i);
  1170. X      XtManageChild (menuElement);
  1171. X      XtAddCallback (menuElement,
  1172. X             XmNactivateCallback,
  1173. X             (XtCallbackProc) menuParameterChange, label);
  1174. X
  1175. X          XmStringFree (string);
  1176. X
  1177. X      /*
  1178. X       * Add the other labels.
  1179. X       */
  1180. X      while ((label = strtok (NULL, labelSeparators)) != NULL) {
  1181. X               string = XmStringCreateLtoR (label, XmSTRING_DEFAULT_CHARSET);
  1182. X
  1183. X           i = 0;
  1184. X           XtSetArg (arglist[i], XmNlabelString, string); i++;
  1185. X           menuElement = (Widget) XmCreatePushButtonGadget (pane,
  1186. X                                concat (label,""),
  1187. X                                arglist, i);
  1188. X           XtManageChild (menuElement);
  1189. X           XtAddCallback (menuElement,
  1190. X                  XmNactivateCallback,
  1191. X                  (XtCallbackProc) menuParameterChange, label);
  1192. X
  1193. X               XmStringFree (string);
  1194. X      }
  1195. X     }
  1196. X
  1197. X     /*
  1198. X      * Link the label and separators into the menu.
  1199. X      */
  1200. X     string = XmStringCreateLtoR (title, XmSTRING_DEFAULT_CHARSET);
  1201. X
  1202. X     i = 0;
  1203. X     XtSetArg (arglist[i], XmNlabelString, string); i++;
  1204. X     XtSetArg (arglist[i], XmNmnemonic, title[0]); i++;
  1205. X     XtSetArg (arglist[i], XmNsubMenuId, pane); i++;
  1206. X     menu = (Widget) XmCreateCascadeButton (parent,
  1207. X                        concat (title, "Menu"),
  1208. X                        arglist, i);
  1209. X     XtManageChild (menu);
  1210. X
  1211. X     XmStringFree (string);
  1212. X
  1213. X     return (pane);
  1214. X}
  1215. X
  1216. X
  1217. XWidget createMenuArea (parent)
  1218. X     Widget parent;
  1219. X{
  1220. X     Widget menuArea;
  1221. X
  1222. X     /*
  1223. X      * Create a menu bar.
  1224. X      */
  1225. X     menuArea = XmCreateMenuBar (parent, "menuArea", NULL, 0);
  1226. X     XtManageChild (menuArea);
  1227. X
  1228. X     /*
  1229. X      * Add the application's main menus.
  1230. X      */
  1231. X     processPane = createMenu (menuArea, processMenu, XtNumber (processMenu));
  1232. X
  1233. X     hostPane = createSelectionMenu (menuArea, "Host", resources.hosts);
  1234. X     userPane = createSelectionMenu (menuArea, "User", resources.users);
  1235. X     groupPane = createSelectionMenu (menuArea, "Group", resources.groups);
  1236. X     terminalPane = createSelectionMenu (menuArea, "Terminal", resources.terminals);
  1237. X     actionPane = createSelectionMenu (menuArea, "Action", resources.actions);
  1238. X
  1239. X     viewPane = createMenu (menuArea, viewMenu, XtNumber (viewMenu));
  1240. X     optionPane = createMenu (menuArea, optionMenu, XtNumber (optionMenu));
  1241. X     helpPane = createMenu (menuArea, helpMenu, XtNumber (helpMenu));
  1242. X
  1243. X     return (menuArea);
  1244. X}
  1245. X
  1246. X
  1247. XWidget createSelectionArea (parent)
  1248. X     Widget parent;
  1249. X{
  1250. X     Widget selectionArea;
  1251. X     Widget statusArea;
  1252. X     Widget textArea;
  1253. X     Widget infoArea;
  1254. X
  1255. X     XmFontList fontList;
  1256. X     Dimension width, height;
  1257. X     
  1258. X     Arg arglist[10];
  1259. X     Cardinal i;
  1260. X     
  1261. X     /*
  1262. X      * Create a form to contain the different fields.
  1263. X      */
  1264. X     selectionArea = (Widget) XmCreateForm (parent, "selectionArea", NULL, 0);
  1265. X     XtManageChild (selectionArea);
  1266. X
  1267. X     /*
  1268. X      * Add an info zone.
  1269. X      */
  1270. X     i = 0;
  1271. X     XtSetArg (arglist[i], XmNalignment, XmALIGNMENT_END); i++;
  1272. X     XtSetArg (arglist[i], XmNwidth, 200); i++;
  1273. X     XtSetArg (arglist[i], XmNtopAttachment, XmATTACH_FORM); i++;
  1274. X     XtSetArg (arglist[i], XmNleftAttachment, XmATTACH_NONE); i++;
  1275. X     XtSetArg (arglist[i], XmNrightAttachment, XmATTACH_FORM); i++;
  1276. X     XtSetArg (arglist[i], XmNbottomAttachment, XmATTACH_FORM); i++;
  1277. X
  1278. X     infoArea = (Widget) XmCreateLabel (selectionArea,
  1279. X                    "infoArea", arglist,i);
  1280. X     XtManageChild (infoArea);
  1281. X
  1282. X     /*
  1283. X      * Add a status zone.
  1284. X      */
  1285. X     i = 0;
  1286. X     XtSetArg (arglist[i], XmNalignment, XmALIGNMENT_BEGINNING); i++;
  1287. X     XtSetArg (arglist[i], XmNtopAttachment, XmATTACH_FORM); i++;
  1288. X     XtSetArg (arglist[i], XmNleftAttachment, XmATTACH_FORM); i++;
  1289. X     XtSetArg (arglist[i], XmNrightAttachment, XmATTACH_WIDGET); i++;
  1290. X     XtSetArg (arglist[i], XmNrightWidget, infoArea); i++;
  1291. X     XtSetArg (arglist[i], XmNbottomAttachment, XmATTACH_FORM); i++;
  1292. X
  1293. X     statusArea = (Widget) XmCreateLabel (selectionArea,
  1294. X                      "statusArea", arglist,i);
  1295. X     XtManageChild (statusArea);
  1296. X
  1297. X     XtOverrideTranslations (statusArea,
  1298. X                 XtParseTranslationTable (statusTranslations));
  1299. X
  1300. X     i = 0;
  1301. X     XtSetArg (arglist[i], XmNfontList, &fontList); i++;
  1302. X     XtGetValues (statusArea, arglist, i);
  1303. X
  1304. X     /*
  1305. X      * Add an input zone.
  1306. X      */
  1307. X     i = 0;
  1308. X     XtSetArg (arglist[i], XmNtopAttachment, XmATTACH_FORM); i++;
  1309. X     XtSetArg (arglist[i], XmNleftAttachment, XmATTACH_FORM); i++;
  1310. X     XtSetArg (arglist[i], XmNrightAttachment, XmATTACH_WIDGET); i++;
  1311. X     XtSetArg (arglist[i], XmNrightWidget, infoArea); i++;
  1312. X     XtSetArg (arglist[i], XmNbottomAttachment, XmATTACH_FORM); i++;
  1313. X     XtSetArg (arglist[i], XmNfontList, fontList); i++;
  1314. X
  1315. X     textArea = XmCreateText (selectionArea, "textArea", arglist, i);
  1316. X
  1317. X     XtOverrideTranslations (textArea,
  1318. X                 XtParseTranslationTable (textTranslations));
  1319. X
  1320. X     i = 0;
  1321. X     XtSetArg (arglist[i], XmNwidth, &width); i++;
  1322. X     XtSetArg (arglist[i], XmNheight, &height); i++;
  1323. X     XtGetValues (textArea, arglist, i);
  1324. X
  1325. X     i = 0;
  1326. X     XtSetArg (arglist[i], XmNwidth, width); i++;
  1327. X     XtSetArg (arglist[i], XmNheight, height); i++;
  1328. X     XtSetValues (statusArea, arglist, i);
  1329. X
  1330. X     return (selectionArea);
  1331. X}
  1332. X
  1333. X
  1334. XWidget createProcessArea (parent)
  1335. X     Widget parent;
  1336. X{
  1337. X     Arg arglist[10];
  1338. X     Cardinal i;
  1339. X     
  1340. X     /*
  1341. X      * Create a form to contain the processes windows.
  1342. X      */
  1343. X     processArea = (Widget) XmCreateForm (parent, "processArea", NULL, 0);
  1344. X     XtManageChild (processArea);
  1345. X     
  1346. X     /*
  1347. X      * Add a processes info header.
  1348. X      */
  1349. X     i = 0;
  1350. X     XtSetArg (arglist[i], XmNalignment, XmALIGNMENT_BEGINNING); i++;
  1351. X     XtSetArg (arglist[i], XmNtopAttachment, XmATTACH_FORM); i++;
  1352. X     XtSetArg (arglist[i], XmNleftAttachment, XmATTACH_FORM); i++;
  1353. X     XtSetArg (arglist[i], XmNrightAttachment, XmATTACH_FORM); i++;
  1354. X     XtSetArg (arglist[i], XmNbottomAttachment, XmATTACH_NONE); i++;
  1355. X
  1356. X     headerArea = (Widget) XmCreateLabelGadget (processArea,
  1357. X                        "headerArea", arglist, i);
  1358. X     XtManageChild (headerArea);
  1359. X     
  1360. X     /*
  1361. X      * Add a scrolled list.
  1362. X      */
  1363. X     i = 0;
  1364. X     XtSetArg (arglist[i], XmNlistSizePolicy, XmCONSTANT); i++;
  1365. X     XtSetArg (arglist[i], XmNselectionPolicy, XmEXTENDED_SELECT); i++;
  1366. X     XtSetArg (arglist[i], XmNautomaticSelection, True); i++;
  1367. X
  1368. X     XtSetArg (arglist[i], XmNtopAttachment, XmATTACH_WIDGET); i++;
  1369. X     XtSetArg (arglist[i], XmNtopWidget, headerArea); i++;
  1370. X     XtSetArg (arglist[i], XmNleftAttachment, XmATTACH_FORM); i++;
  1371. X     XtSetArg (arglist[i], XmNrightAttachment, XmATTACH_FORM); i++;
  1372. X     XtSetArg (arglist[i], XmNbottomAttachment, XmATTACH_FORM); i++;
  1373. X
  1374. X     listArea = XmCreateScrolledList (processArea, "listArea", arglist, i);
  1375. X     XtManageChild (listArea);
  1376. X
  1377. X     return (processArea);
  1378. X}
  1379. X
  1380. X
  1381. XWidget createAllAreas (parent)
  1382. X     Widget parent;
  1383. X{
  1384. X     Widget topWindow;
  1385. X     Widget menuArea;
  1386. X     Widget selectionArea;
  1387. X
  1388. X     Arg arglist[2];
  1389. X     Cardinal i;
  1390. X
  1391. X     /*
  1392. X      * Create the main window.
  1393. X      */
  1394. X     i = 0;
  1395. X     XtSetArg (arglist[i], XmNshowSeparator, True); i++;
  1396. X     topWindow = XmCreateMainWindow (parent, "topWindow", arglist, i);
  1397. X     XtManageChild (topWindow);
  1398. X
  1399. X     /*
  1400. X      * Add a menu bar.
  1401. X      */
  1402. X     menuArea = createMenuArea (topWindow);
  1403. X
  1404. X     /*
  1405. X      * Add the processes area.
  1406. X      */
  1407. X     processArea = createProcessArea (topWindow);
  1408. X     
  1409. X     /*
  1410. X      * Add the selection area.
  1411. X      */
  1412. X     selectionArea = createSelectionArea (topWindow);
  1413. X     
  1414. X     /*
  1415. X      * Identify the main window's children.
  1416. X      */
  1417. X     XmMainWindowSetAreas (topWindow,
  1418. X               menuArea, selectionArea, NULL, NULL, processArea);
  1419. X
  1420. X     return (topWindow);
  1421. X}
  1422. X
  1423. X
  1424. Xint createNewView (widget, clientData, callData)
  1425. X     Widget widget;
  1426. X     caddr_t clientData;
  1427. X     caddr_t callData;
  1428. X{
  1429. X}
  1430. X
  1431. X
  1432. Xvoid main (argc, argv)
  1433. X     unsigned int argc;
  1434. X     char *argv[];
  1435. X{
  1436. X     Arg arglist[3];
  1437. X     Cardinal i;
  1438. X     
  1439. X     /*
  1440. X      * Create the main window.
  1441. X      */
  1442. X     topLevel = XtInitialize ("topLevel", "XmPs",
  1443. X                  xmPsOptions, XtNumber (xmPsOptions),
  1444. X                  &argc, argv);
  1445. X
  1446. X     i = 0;
  1447. X     XtSetArg (arglist[i], XmNtitle, "Process Browser"); i++;
  1448. X     XtSetValues (topLevel, arglist, i);
  1449. X     
  1450. X     /*
  1451. X      * Add our specific actions.
  1452. X      */
  1453. X     XtAddActions (xmPsActions, XtNumber (xmPsActions));
  1454. X     XtOverrideTranslations (topLevel,
  1455. X                 XtParseTranslationTable (generalTranslations));
  1456. X
  1457. X     /*
  1458. X      * Get our resources.
  1459. X      */
  1460. X     XtGetApplicationResources (topLevel, &resources,
  1461. X                xmPsResources, XtNumber (xmPsResources),
  1462. X                NULL, 0);
  1463. X
  1464. X     verifyOptions ();
  1465. X     
  1466. X     /*
  1467. X      * Initialize some private data.
  1468. X      */
  1469. X     strcpy (currentHost, strtok (strdup (resources.hosts), ","));
  1470. X     strcpy (currentUser, strtok (strdup (resources.users), ","));
  1471. X     strcpy (currentGroup, strtok (strdup (resources.groups), ","));
  1472. X     strcpy (currentTerminal, strtok (strdup (resources.terminals), ","));
  1473. X     strcpy (currentAction, strtok (strdup (resources.actions), ","));
  1474. X
  1475. X     /*
  1476. X      * Create the busy cursor.
  1477. X      */
  1478. X     busyCursor = XCreateFontCursor (XtDisplay (topLevel), XC_watch);
  1479. X     
  1480. X     /*
  1481. X      * Create all the widgets.
  1482. X      */
  1483. X     (void) createAllAreas (topLevel);
  1484. X
  1485. X     /*
  1486. X      * Display the processes information only if automatic refresh is
  1487. X      * not in action.
  1488. X      */
  1489. X     if (! resources.automaticRefresh)
  1490. X      displayProcesses ();
  1491. X     XtRealizeWidget (topLevel);
  1492. X
  1493. X     if (resources.allProcesses ||
  1494. X     resources.noGroupLeader || resources.noNonTerminal) {
  1495. X      disableUser ();
  1496. X      disableGroup ();
  1497. X      disableTerminal ();
  1498. X     }
  1499. X
  1500. X     statusLineUpdate ();
  1501. X     
  1502. X     /*
  1503. X      * Let the toolkit handle events from now on.
  1504. X      */
  1505. X     XtMainLoop ();
  1506. X}
  1507. X
  1508. END_OF_FILE
  1509.   if test 16822 -ne `wc -c <'xmps.c'`; then
  1510.     echo shar: \"'xmps.c'\" unpacked with wrong size!
  1511.   fi
  1512.   # end of 'xmps.c'
  1513. fi
  1514. if test -f 'xmps.man' -a "${1}" != "-c" ; then 
  1515.   echo shar: Will not clobber existing file \"'xmps.man'\"
  1516. else
  1517.   echo shar: Extracting \"'xmps.man'\" \(13335 characters\)
  1518.   sed "s/^X//" >'xmps.man' <<'END_OF_FILE'
  1519. X.TH XmPs 1X
  1520. X.ds ]W X11R5 Motif 1.2 (92/05/19)
  1521. X.SH NAME
  1522. X\fBxmps \(em A X/Motif Process Browser.\fP
  1523. X.sp 1
  1524. X.SH SYNOPSIS
  1525. X.B xmps
  1526. X[options]
  1527. X.sp 1
  1528. X.SH DESCRIPTION
  1529. XThe X/Motif Process Browser \fIxmps\fP provides process manipulation
  1530. Xfuntionalities. It offers several useful features including process
  1531. Xsorting by ancestry, the ability to search for a process by name (using
  1532. Xregular expressions), to kill a process or group of processes, to restrict
  1533. Xthe process information to specific users, groups or terminals, and to keep
  1534. Xmultiple snapshots of the process information.
  1535. X.P
  1536. X\fIXmps\fP can display many main windows, each of which contains
  1537. Xthe processes of a single computer (not implemented yet). A menu bar provides
  1538. Xprocess operations.
  1539. X.P
  1540. XA direct manipulation paradigm is used to perform operations on the
  1541. Xdisplayed processes. Selection and multiple selection activate a process
  1542. Xor a set of processes. This is primarily used to indicate the active
  1543. Xobject(s) for menu operations.
  1544. X.P
  1545. X\fIXmps\fP is especially useful to manage multiple hosts on a network.
  1546. XOnce \fIremsh(1)\fP privileges have been enabled on those other hosts, it
  1547. Xis possible to view and manipulate their processes from within a single
  1548. X\fIxmps\fP session.
  1549. X.sp 1
  1550. X.SH OPTIONS
  1551. X.TP 8
  1552. X.BI \-ps " process status command"
  1553. XThis option specifies an alternative \fIps(1)\fP command to use to obtain
  1554. Xprocess information.
  1555. X.TP 8
  1556. X.BI \-pspp " pretty-printer command"
  1557. XThis option specifies an alternative command to use to sort processes by
  1558. Xancestry.
  1559. X.TP 8
  1560. X.BI \-rsh " remote shell command"
  1561. XThis option specifies an alternative \fIremsh(1)\fP command to use to
  1562. Xrun \fIps(1)\fP on remote hosts.
  1563. X.TP 8
  1564. X.BI \-hosts " hostname,[hostname,...]"
  1565. XThis option allows users to specify alternative \fIhost names\fP from which
  1566. Xthey will be able to get process information.
  1567. X.TP 8
  1568. X.BI \-users " user,[user,...]"
  1569. XThis option allows users to specify alternative \fIuser ids\fP or \fIuser
  1570. Xnames\fP to which they will be able to restrict the process information.
  1571. X.TP 8
  1572. X.BI \-groups " group,[group,...]"
  1573. XThis option allows users to specify alternative \fIgroup ids\fP or \fIgroup
  1574. Xnames\fP to which they will be able to restrict the process information.
  1575. X.TP 8
  1576. X.BI \-terminals " terminal,[terminal,...]"
  1577. XThis option allows users to specify alternative \fIterminal names\fP to which
  1578. Xthey will be able to restrict the process information.
  1579. X.TP 8
  1580. X.BI \-actions " action,[action,...]"
  1581. XThis option allows users to specify \fIactions\fP that can be applied to
  1582. Xactive processes. The current action will be applied iteratively on each
  1583. Xactive process and will be given as input that particular process number.
  1584. X.sp 1
  1585. X.SH FEATURES
  1586. X.IP "\fBSelecting a Process\fP"
  1587. XClicking on a process selects it and deselects any other selected process.
  1588. XDragging over a range of processes, or pressing <Shift> while clicking,
  1589. Xselects all processes between the process under the mouse and the process
  1590. Xon which the first click was made. This also deselects any other selected
  1591. Xprocesses outside that range.
  1592. X.sp 1
  1593. XAlso, users can select and deselect discontiguous ranges of processes.
  1594. XPressing <Ctrl> while clicking on a process toggles its selection state but
  1595. Xdoes not deselect any other selected items. Pressing <Ctrl> and dragging
  1596. Xover a range of processes sets the selection state of all processes between
  1597. Xthe process under the mouse and the process on which the first <Ctrl>-click
  1598. Xwas made to the state of that process. This does not deselect any other
  1599. Xselected processes outside that range.
  1600. X.sp 1
  1601. XAll selection operations available from the mouse are also available from
  1602. Xthe keyboard. Refer to \fIXmList(3X)\fP for more details.
  1603. X.IP "\fBExecuting an Action on a Process\fP"
  1604. XActions can be executed on selected processes. There is no restriction on
  1605. Xwhat an action can do. However, the state of a process as displayed by
  1606. X\fIxmps\fP is not refreshed after the action has been successfully executed.
  1607. XThe user must \fBRefresh\fP the process information himself in order to
  1608. Xkeep that information up-to-date.
  1609. X.sp 1
  1610. XActions are selected via a menu. However, an input area is provided to type
  1611. Xin an action which is not available in a menu. See \fBProcess Filtering\fP
  1612. Xfor more details.
  1613. X.IP "\fBCreating Snapshots\fP"
  1614. XSnapshots of the process information can be taken and displayed in separate
  1615. Xand independant windows. It allows the user to compare the evolution of
  1616. Xprocesses on a host over time, or to compare processes running on different
  1617. Xhosts. 
  1618. X.IP "\fBProcess Filtering\fP"
  1619. XProcesses belong to many different hosts, users, groups and terminals. The
  1620. XProcess Browser's filtering mechanism provides the
  1621. Xmeans by which the user can selectively display sets of processes.  The
  1622. Xtypes of filtering available include: by host, by user, by group, by terminal
  1623. Xand by terminal capabilities.
  1624. X.sp 1
  1625. XA status area below the menu bar displays the current user, group, terminal,
  1626. Xhost and action. It has the following format :
  1627. X.BI user:group(terminal)@host  (action)
  1628. X.sp 1
  1629. XOther hosts, users, groups and terminals can be selected from menus.
  1630. XHowever, an input area is provided to type in a host, user, group or
  1631. Xterminal which is not available on the corresponding menu. New values typed
  1632. Xin are automatically added to the corresponding menu if
  1633. X\fBautomaticMemory\fP is true.
  1634. X.sp 1
  1635. XThe input area is normally not displayed. To make it visible, mouse <Button1>
  1636. Xshould be pressed over the status area.
  1637. X.IP "\fBSetting Display Preferences\fP"
  1638. XBoth simple and detailed representations for process display are provided.
  1639. X.IP "\fBFinding Processes\fP"
  1640. XProcesses can be searched for a particular string. Search strings can
  1641. Xinclude regular expressions (see \fIregexp(5)\fP). When processes
  1642. Xmatch the search criteria, they become the selected processes. Only the
  1643. Xfirst process found is normaly selected; however, all matching processes
  1644. Xcan be selected at once if \fBmultipleOccurrences\fP is true.
  1645. X.sp 1
  1646. X.SH RESOURCES
  1647. XThe following resources can be used to taylor the initial appearance of
  1648. X\fIXmps\fP:
  1649. X.sp 2
  1650. X.TS
  1651. Xcenter;
  1652. XcB sss
  1653. XlB lB lB lB
  1654. Xl l l l.
  1655. XX/Motif Process Browser Appearance Resource Set
  1656. XName    Class    Type    Default
  1657. X_
  1658. Xactions    Actions    String    "kill"
  1659. XallProcesses    AllProcesses    Boolean    True
  1660. XautomaticMemory    AutomaticMemory    Boolean    True
  1661. XautomaticRefresh    AutomaticRefresh    Boolean    True
  1662. Xbeautify    Beautify    Boolean    True
  1663. XfullListing    FullListing    Boolean    True
  1664. Xgroups    Groups    String    "all"
  1665. Xhosts    Hosts    String    "localhost"
  1666. XignoreCase    IgnoreCase    Boolean    True
  1667. XlongListing    LongListing    Boolean    False
  1668. XmultipleOccurrences    MultipleOccurrences    Boolean    False
  1669. XnoGroupLeader    NoGroupLeader    Boolean    False
  1670. XnoNonTerminal    NoNonTerminal    Boolean    False
  1671. XperiodicRefresh    PeriodicRefresh    Boolean    False
  1672. XprintSelected    PrintSelected    Boolean    False
  1673. XrefreshPeriod    RefreshPeriod    unsigned int    600
  1674. Xterminals    Terminals    String    ""
  1675. Xusers    Users    String    "all"
  1676. X.TE
  1677. X.sp 1
  1678. X.IP "\fBactions\fP"
  1679. XThis resource specifies a list of actions that can be applied to active
  1680. Xprocesses. When the \fBExecute Action\fP command is selected, the current
  1681. Xaction is applied iteratively on each active process, and is given as input
  1682. Xthat particular process number. If no process is active, no action is
  1683. Xrequested. (Note: \fIactions\fP is a list of comma separated actions).
  1684. X.sp 1
  1685. X.IP "\fBallProcesses\fP"
  1686. XThis resource specifies whether \fIxmps\fP displays information about all
  1687. Xprocesses or only about processes associated with the current terminal
  1688. X(if any). Refer to \fIps(1)\fP for more details.
  1689. X.sp 1
  1690. X.IP "\fBautomaticMemory\fP"
  1691. XThis resource specifies whether \fIxmps\fP adds to the corresponding menu
  1692. Xthe hosts, users, groups, terminals and actions that are typed in the input
  1693. Xzone, or does not memorize them. 
  1694. X.sp 1
  1695. X.IP "\fBautomaticRefresh\fP"
  1696. XThis resource specifies whether \fIxmps\fP refreshes the process information
  1697. Xwhen a new host, user, group, terminal or listing option is specified, or
  1698. Xwaits until
  1699. Xan explicit \fBRefresh\fP command is executed. When \fBAutomaticRefresh\fP
  1700. Xis true, the process information is also refreshed upon deiconification.
  1701. X.sp 1
  1702. X.IP "\fBbeautify\fP"
  1703. XThis resource specifies whether \fIxmps\fP sorts processes by ancestry
  1704. Xbefore displaying them, or generates a raw listing as output by \fIps(1)\fP.
  1705. XBy default, \fIxmps\fP uses an internal formatter to sort processes. However,
  1706. Xan external formatter can used if \fBBeautifierCommand\fP is set
  1707. Xappropriately. 
  1708. X.sp 1
  1709. X.IP "\fBfullListing\fP"
  1710. XThis resource specifies whether \fIxmps\fP generates a full listing, or
  1711. Xdisplays only a short listing. Refer to \fIps(1)\fP for more details.
  1712. X.sp 1
  1713. X.IP "\fBgroups\fP"
  1714. XThis resource specifies a list of groups to which the process
  1715. Xinformation can be restricted to. (Note: \fIgroups\fP is a list of comma
  1716. Xseparated groups).
  1717. X.sp 1
  1718. X.IP "\fBhosts\fP"
  1719. XThis resource specifies a list of hosts from which process information can
  1720. Xbe obtained and displayed. (Note: \fIhosts\fP is a list of comma
  1721. Xseparated hosts).
  1722. X.sp 1
  1723. X.IP "\fBignoreCase\fP"
  1724. XThis resource specifies whether \fIxmps\fP ignores the case when searching
  1725. Xfor a process, or takes it into account (see \fIregcomp(3)\fP).
  1726. X.sp 1
  1727. X.IP "\fBlongListing\fP"
  1728. XThis resource specifies whether \fIxmps\fP generates a long listing, or
  1729. Xdisplays only a short listing. Refer to \fIps(1)\fP for more details.
  1730. X.sp 1
  1731. X.IP "\fBmultipleOccurrences\fP"
  1732. XThis resource specifies whether \fIxmps\fP selects multiple processes
  1733. Xmatching the string being searched, or only the first one. Search strings
  1734. Xmay be specified as regular expressions (see \fIregexp(5)\fP).
  1735. X.sp 1
  1736. X.IP "\fBnoGroupLeader\fP"
  1737. XThis resource specifies whether \fIxmps\fP displays information about all
  1738. Xprocesses, except process group leaders, or about processes associated
  1739. Xwith the current terminal (if any). Refer to \fIps(1)\fP for more details.
  1740. X.sp 1
  1741. X.IP "\fBnoNonTerminal\fP"
  1742. XThis resource specifies whether \fIxmps\fP displays information about all
  1743. Xprocesses, except process group leaders and processes not associated with
  1744. Xa terminal, or about processes associated with the current terminal (if any).
  1745. XRefer to \fIps(1)\fP for more details.
  1746. X.sp 1
  1747. X.IP "\fBperiodicRefresh\fP"
  1748. XWhen \fBperiodicRefresh\fP is true, \fIxmps\fP refreshes the process
  1749. Xinformation after \fBrefreshPeriod\fP seconds have ellapsed since the
  1750. Xlast refresh.
  1751. X.sp 1
  1752. X.IP "\fBprintSelected\fP"
  1753. XThis resource specifies whether \fIxmps\fP prints information only about 
  1754. Xselected processes (if any), or about all processes.
  1755. X.sp 1
  1756. X.IP "\fBrefreshPeriod\fP"
  1757. XThis resource specifies a time in second after which the process information
  1758. Xis refreshed if \fBperiodicRefresh\fP is true.
  1759. X.sp 1
  1760. X.IP "\fBterminals\fP"
  1761. XThis resource specifies a list of terminals to which the process
  1762. Xinformation can be restricted to. (Note: \fIterminals\fP is a list of comma
  1763. Xseparated terminals).
  1764. X.sp 1
  1765. X.IP "\fBusers\fP"
  1766. XThis resource specifies a list of users to whom the displayed process
  1767. Xinformation may be restricted to. (Note: \fIusers\fP is a list of comma
  1768. Xseparated users).
  1769. X.P
  1770. XThe following resources can be used to adapt \fIxmps\fP to a 
  1771. Xsystem for which it was not designed:
  1772. X.sp 2
  1773. X.TS
  1774. Xcenter;
  1775. XcB sss
  1776. XlB lB lB lB
  1777. Xl l l l.
  1778. XX/Motif Process Browser System Dependant Resource Set
  1779. XName    Class    Type    Default
  1780. X_
  1781. XallProcessesOption    AllProcessesOption    String    "e"
  1782. XbeautifyCommand    BeautifyCommand    String    ""
  1783. XfullListingOption    FullListingOption    String    "f"
  1784. XlongListingOption    LongListingOption    String    "l"
  1785. XnoGroupLeaderOption    NoGroupLeaderOption    String    "d"
  1786. XnoNonTerminalOption    NoNonTerminalOption    String    "a"
  1787. XprintCommand    PrintCommand    String    "lp %s"
  1788. XpsCommand    PsCommand    String    "/bin/ps"
  1789. XrshCommand    RshCommand    String    "remsh"
  1790. XterminalsOption    TerminalsOption    String    "g"
  1791. XusersOption    UsersOption    String    "u"
  1792. X.TE
  1793. X.sp 1
  1794. X.IP "\fBallProcessesOption\fP"
  1795. XThis resource specifies the \fIps(1)\fP option corresponding to
  1796. X\fBallProcesses\fP.
  1797. X.sp 1
  1798. X.IP "\fBbeautifyCommand\fP"
  1799. XThis resource specifies an alternate command to beautify the process
  1800. Xinformation. If this resource is not set, an internal formatter is used.
  1801. X.sp 1
  1802. X.IP "\fBfullListingOption\fP"
  1803. XThis resource specifies the \fIps(1)\fP option corresponding to
  1804. X\fBfullListing\fP.
  1805. X.sp 1
  1806. X.IP "\fBgroupsOption\fP"
  1807. XThis resource specifies the \fIps(1)\fP option corresponding to
  1808. X\fBgroups\fP.
  1809. X.sp 1
  1810. X.IP "\fBlongListingOption\fP"
  1811. XThis resource specifies the \fIps(1)\fP option corresponding to
  1812. X\fBlongListing\fP.
  1813. X.sp 1
  1814. X.IP "\fBnoGroupLeaderOption\fP"
  1815. XThis resource specifies the \fIps(1)\fP option corresponding to
  1816. X\fBnoGroupLeader\fP.
  1817. X.sp 1
  1818. X.IP "\fBnoNonTerminalOption\fP"
  1819. XThis resource specifies the \fIps(1)\fP option corresponding to
  1820. X\fBnoNonTerminal\fP.
  1821. X.sp 1
  1822. X.IP "\fBprintCommand\fP"
  1823. XThis resource specifies the command to use to print the process information.
  1824. X.sp 1
  1825. X.IP "\fBpsCommand\fP"
  1826. XThis resource specifies the command to use to obtain the process information.
  1827. X.sp 1
  1828. X.IP "\fBrshCommand\fP"
  1829. XThis resource specifies the command to use to run a given command on
  1830. Xa remote host.
  1831. X.sp 1
  1832. X.IP "\fBterminalsOption\fP"
  1833. XThis resource specifies the \fIps(1)\fP option corresponding to
  1834. X\fBterminals\fP.
  1835. X.sp 1
  1836. X.IP "\fBusersOption\fP"
  1837. XThis resource specifies the \fIps(1)\fP option corresponding to
  1838. X\fBusers\fP.
  1839. X.sp 1
  1840. X.SH BUGS
  1841. XThe code to select all processes does not work.
  1842. X.sp 1
  1843. X.SH COPYRIGHT
  1844. XCopyright 1991-1993 Jean-Jacques Moreau.
  1845. X.sp 1 
  1846. X.SH AUTHOR
  1847. XJean-Jacques Moreau (jjm@hplb.hpl.hp.com).
  1848. X.sp 1
  1849. X.SH RELATED INFORMATION
  1850. X\fBX(1)\fP, \fBps(1)\fP, \fBkill(1)\fP, \fBremsh(1)\fP,
  1851. X\fBregexp(5)\fP, \fBXmList(3X)\fP, \fBezps(1X)\fP, \fBxps(1X)\fP,
  1852. X\fBpspp(1)\fP.
  1853. END_OF_FILE
  1854.   if test 13335 -ne `wc -c <'xmps.man'`; then
  1855.     echo shar: \"'xmps.man'\" unpacked with wrong size!
  1856.   fi
  1857.   # end of 'xmps.man'
  1858. fi
  1859. echo shar: End of archive 1 \(of 3\).
  1860. cp /dev/null ark1isdone
  1861. MISSING=""
  1862. for I in 1 2 3 ; do
  1863.     if test ! -f ark${I}isdone ; then
  1864.     MISSING="${MISSING} ${I}"
  1865.     fi
  1866. done
  1867. if test "${MISSING}" = "" ; then
  1868.     echo You have unpacked all 3 archives.
  1869.     rm -f ark[1-9]isdone
  1870. else
  1871.     echo You still must unpack the following archives:
  1872.     echo "        " ${MISSING}
  1873. fi
  1874. exit 0
  1875. exit 0 # Just in case...
  1876. -- 
  1877.   // chris@IMD.Sterling.COM       | Send comp.sources.x submissions to:
  1878. \X/  Amiga - The only way to fly! |    sources-x@imd.sterling.com
  1879.  "It's intuitively obvious to the |
  1880.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1881.