[comp.sources.x] v09i084: xrolo -- an XView rolodex, Part01/03

luis@rice.edu (Luis Soltero) (10/11/90)

Submitted-by: Luis Soltero <luis@rice.edu>
Posting-number: Volume 9, Issue 84
Archive-name: xrolo/part01

from the README:

   This is Rolo Version 2.0.  There is nothing tricky about compiling this,
just unpack everything in a directory and type 'make'.  You may need to
change the target directories in the Makefile if you want to do a
'make install', or you can just compile it and copy the binary and man
page to your favorite locations.

   As far as I know, this code should work on any Sun running 3.2 or
greater, though I personally have only seen it run on a 3.4 3/60C and a
3.2 monochrome 3/160.  If you notice strange behaviour on any hardware/software
combination please let me know (a fix would be nice too...).  Since the
initial release, I've been told that Rolo runs on Sun4s and 386s.  There
was a bug in the initial release which caused a seg fault on Sun4s at startup,
it was fixed in patch 1.

   The Makefile defines the symbol STANDALONE to determine the name of
the main() function.  That is for merging the binary into the toolmerge
library for linking with the other suntools binaries.  If you know what that
means, you'll probably know how to merge Rolo into the combined suntools binary.
If not, don't worry about it, Rolo runs just fine by itself.  In any case,
that silliness is unnecessary with 4.0 and beyond, so it will not be an issue
for much longer.

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 3)."
# Contents:  Imakefile Makefile.orig Manifest Notice Patchlevel README
#   README.1 SCCS buttons1.icon buttons2.icon buttons3.icon defs.h
#   help.h main.c pop.icon popup.c rolo.gray.icon rolo.icon xrolo.man
# Wrapped by luis@oort on Wed Oct 10 15:56:17 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Imakefile'\"
else
echo shar: Extracting \"'Imakefile'\" \(797 characters\)
sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
X#
X# xrolo - an XView tool to implement a rolodex-style list of notes.
X#
X# --Luis Soltero (luis@rice.edu), 10/10/90
X#
X
X#
X# linking against openlook libraries on suns after patching ol_button.c. 
X# see README for details.
XLOCAL_LIBRARIES = -L$$OPENWINHOME/lib -lxview -Bstatic -lolgx -Bdynamic
X
X#
X# linking against XView libraries compiled from mit distribution after 
X# patching ol_button.c. see README for details.
X# LOCAL_LIBRARIES = -lxview -lolgx
X
X           SRCS = main.c panel.c cards.c popup.c
X           OBJS = main.o panel.o cards.o popup.o
X       INCLUDES = -I$$OPENWINHOME/include
X        DEFINES = -DSTANDALONE
X
XAllTarget(xrolo)
XNormalProgramTarget(xrolo,$(OBJS),$(DEPLIBS), $(LOCAL_LIBRARIES), $(XLIB))
XInstallProgram(xrolo, $(BINDIR))
XInstallManPage(xrolo, $(MANDIR))
X
XDependTarget()
END_OF_FILE
if test 797 -ne `wc -c <'Imakefile'`; then
    echo shar: \"'Imakefile'\" unpacked with wrong size!
fi
# end of 'Imakefile'
fi
if test -f 'Makefile.orig' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile.orig'\"
else
echo shar: Extracting \"'Makefile.orig'\" \(1568 characters\)
sed "s/^X//" >'Makefile.orig' <<'END_OF_FILE'
X
X
X#	Makefile for Rolotool V2.0
X#
X#	@(#)Makefile	2.4 8/14/88
X
X
XPROG =		rolo
X
XOFILES =	main.o panel.o cards.o popup.o
XHFILES =	defs.h
XHELPFILES =	help.h
XICONS  =	rolo.icon
XBUTTONS =	buttons1.icon buttons2.icon buttons3.icon
XPOPBUTTONS = 	pop.icon
X
XC1 =		main.c cards.c popup.c
XC2 =		panel.c
XCFILES =	$(C1) $(C2)
XMANPAGE =	$(PROG).1
XOTHERS =	README Manifest Notice Patchlevel rolo.gray.icon
X
XLIBS =		 -lxview -Bstatic -lolgx -Bdynamic -L/usr/lib -lX11 
X
XCC=cc 
XCFLAGS =	-O -DSTANDALONE -I$$OPENWINHOME/include
XLDFLAGS =	-O -L$$OPENWINHOME/lib
X
XLINT =		lint
XLNFLAGS =	-abhxuz
X
X
X
X$(PROG):	$(OFILES)
X		$(CC) -o $(PROG) $(LDFLAGS) $(OFILES) $(LIBS)
X
Xtst:	tst.o
X		$(CC) -o tst $(LDFLAGS) tst.o $(LIBS)
X
Xlint:
X		$(LINT) $(LNFLAGS) $(CFILES) $(LIBS) > $(PROG).lint
X
X
Xclean:
X		rm -f *.o core $(PROG) $(PROG).lint
X
X#		You may want to change the destination dirs
Xinstall:	$(PROG)
X		install -s -m 775 $(PROG) /usr/local/bin
X		install -c -m 775 $(MANPAGE) /usr/man/manl
X
Xprint:
X		pr $(HELPFILES) $(HFILES) $(CFILES) | lpr
X
Xctags:
X		ctags $(CFILES) $(HFILES)
X
X#		Shar up everything for posting to the known universe
Xrelease:
X		shar -c Makefile $(MANPAGE) $(HFILES) $(C1) $(ICONS) \
X			$(POPBUTTONS) > $(PROG).shar.1of2
X		shar -c $(OTHERS) $(HELPFILES) $(C2) $(BUTTONS) \
X			> $(PROG).shar.2of2
X
X#		Make one shar file of necessaries, barely squeezes into 100K
Xshar1:
X		shar -c Makefile $(MANPAGE) $(HFILES) $(HELPFILES) $(CFILES) \
X		$(ICONS) $(BUTTONS) $(POPBUTTONS)  > $(PROG).shar
X
X
X
X$(OFILES):	$(HFILES)
X
Xmain.o:		$(ICONS)
X
Xpanel.o:	$(BUTTONS) $(HELPFILES)
X
Xpopup.o:	$(POPBUTTONS)
END_OF_FILE
if test 1568 -ne `wc -c <'Makefile.orig'`; then
    echo shar: \"'Makefile.orig'\" unpacked with wrong size!
fi
# end of 'Makefile.orig'
fi
if test -f 'Manifest' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Manifest'\"
else
echo shar: Extracting \"'Manifest'\" \(760 characters\)
sed "s/^X//" >'Manifest' <<'END_OF_FILE'
X   Rolo is posted as two shar files.  After unpacking both shars, you should
Xhave the following files:
X
XREADME			- Notes for installers of Rolo
XMakefile		- The Makefile, adjust install clause if necessary
XManifest		- This file
XNotice			- Notice of public domain status of Rolo
XPatchlevel		- A file I can patch if patches are posted
X
Xrolo.1			- The man page for Rolo
X
Xmain.c			- The source files
Xpanel.c
Xcards.c
Xpopup.c
X
Xdefs.h			- The header files
Xhelp.h
X
Xrolo.icon		- Rolo's tool icon
Xbuttons1.icon		- images for the buttons on the panel
Xbuttons2.icon
Xbuttons3.icon
Xpop.icon		- Images for the buttons in the popup window
Xrolo.gray.icon		- A spare icon with desktop gray if you're insecure
X
X
XRon Hitchens		ronbo@vixen.uucp	hitchens@cs.utexas.edu
X
X[RH 8/14/88]
END_OF_FILE
if test 760 -ne `wc -c <'Manifest'`; then
    echo shar: \"'Manifest'\" unpacked with wrong size!
fi
# end of 'Manifest'
fi
if test -f 'Notice' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Notice'\"
else
echo shar: Extracting \"'Notice'\" \(1192 characters\)
sed "s/^X//" >'Notice' <<'END_OF_FILE'
X
X/*
X * -------------------------------------------------------------------------
X *	ROLO - A Sun Tool to implement a Rolodex-style list of notes
X *
X *	This code manipulates "cards" in a visual manner approximating
X *	a rolodex file.  All the cards are stored in one real file, the
X *	cards are seperated by a ^L (form-feed).  The default path
X *	name is $HOME/.rolo.  A different pathname may be specified at
X *	startup on the command line.  The pathname is relative to the
X *	user's home directory.
X *
X *	Due to bugs in the 3.0 distribution, especially with text subwindows,
X *	this code is only guaranteed to compile and run properly with 3.2
X *	or greater.
X *
X *	This code is public domain, anyone and everyone is welcome to it.
X *	All I ask is that my name and this notice remain on it.  If Sun would
X *	like to bundle it with their product they are welcome to do so,
X *	I only ask that the sources be included in the binary distribution.
X *
X *	Please return any fixes, improvements, gripes, etc to me.
X *
X *	Ron Hitchens		ronbo@vixen.uucp
X *	March 1987 (V1.0)	hitchens@cs.utexas.edu
X *	August 1988 (V2.0)
X * -------------------------------------------------------------------------
X */
X
END_OF_FILE
if test 1192 -ne `wc -c <'Notice'`; then
    echo shar: \"'Notice'\" unpacked with wrong size!
fi
# end of 'Notice'
fi
if test -f 'Patchlevel' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Patchlevel'\"
else
echo shar: Extracting \"'Patchlevel'\" \(521 characters\)
sed "s/^X//" >'Patchlevel' <<'END_OF_FILE'
XRolo, release 2.0, patch level 1
X
XPatch 1:
X  main.c:
X	Add missing 0 to end of icon_create() attribute list, caused a
X	seg fault on SPARC systems.
X
X	Break card text subwindow setup into two parts to avoid SunView
X	bug which causes a seg fault if user has selected retained text
X	subwindows in the Defaults database.
X
X	Re-organize the method windows are setup and the way command line args
X	are handled so that user-specified window parms are handled properly.
X
X  README:
X	Update info about which systems Rolo will run on.
END_OF_FILE
if test 521 -ne `wc -c <'Patchlevel'`; then
    echo shar: \"'Patchlevel'\" unpacked with wrong size!
fi
# end of 'Patchlevel'
fi
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(1514 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
X
XThis is an Xview2.0 port of Ron Hitchens rolo tool. Please send problems
Xto me directly. Note that Ron had nothing to do w/ this port, so you
Xshould not pester him about problems found in this distribtuion.
X
XLuis Soltero
X
X--luis@rice.edu
X
X
XBUGS.
X	There is a nasty bug in XView 2.0 which causes XView to core dump
Xwhen run xrolo is run in 2D mode (the default on B&W displays). If you
Xare linking xrolo against a library that was created from the XView
Xsources available at expo.lcs.mit.edu, apply the following patch and
Xrecompile libolgx. Sun claims that this bug will be fixed in OW 3.0.
X
X*** ol_button.c.orig	Thu Oct  4 16:07:17 1990
X--- ol_button.c	Thu Oct  4 16:11:36 1990
X***************
X*** 551,558 ****
X  
X  
X  
X!     if (!info->gc_rec[OLGX_TEXTGC])
X! 	olgx_initialise_gcrec(info, OLGX_TEXTGC);
X  
X      if ((state & OLGX_INVOKED) && (info->three_d)) {
X  
X--- 551,561 ----
X  
X  
X  
X!     if (!info->gc_rec[OLGX_TEXTGC]) {
X!       olgx_initialise_gcrec(info, OLGX_TEXTGC);
X!         if (!info->three_d)
X!             olgx_initialise_gcrec(info, OLGX_TEXTGC_REV);
X!     }
X  
X      if ((state & OLGX_INVOKED) && (info->three_d)) {
X
X
Xif you are linking agains the XView libraries that come w/ open look
Xthen:
X	1) obtain a copy of ol_button.c from one of the source archives. 
X	2) apply the patch.
X	3) cd $OPENWINHOME/lib
X	   cp libolgx.a libolgx.orig
X       ar rlv libolgx.a ol_button.o  
X	4) link xrolo using the following sequence
X	cc -o xrolo -O -L$OPENWINHOME/lib -lxview -Bstatic -lolgx -Bdynamic -lX11 
END_OF_FILE
if test 1514 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'README.1' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README.1'\"
else
echo shar: Extracting \"'README.1'\" \(1761 characters\)
sed "s/^X//" >'README.1' <<'END_OF_FILE'
X
X   This is Rolo Version 2.0.  There is nothing tricky about compiling this,
Xjust unpack everything in a directory and type 'make'.  You may need to
Xchange the target directories in the Makefile if you want to do a
X'make install', or you can just compile it and copy the binary and man
Xpage to your favorite locations.
X
X   As far as I know, this code should work on any Sun running 3.2 or
Xgreater, though I personally have only seen it run on a 3.4 3/60C and a
X3.2 monochrome 3/160.  If you notice strange behaviour on any hardware/software
Xcombination please let me know (a fix would be nice too...).  Since the
Xinitial release, I've been told that Rolo runs on Sun4s and 386s.  There
Xwas a bug in the initial release which caused a seg fault on Sun4s at startup,
Xit was fixed in patch 1.
X
X   The Makefile defines the symbol STANDALONE to determine the name of
Xthe main() function.  That is for merging the binary into the toolmerge
Xlibrary for linking with the other suntools binaries.  If you know what that
Xmeans, you'll probably know how to merge Rolo into the combined suntools binary.
XIf not, don't worry about it, Rolo runs just fine by itself.  In any case,
Xthat silliness is unnecessary with 4.0 and beyond, so it will not be an issue
Xfor much longer.
X
X   Please report any problems, suggestions, bug fixes, etc to me at the
Xemail address below.  Please feel free to pass Rolo around, it is public
Xdomain and carries no restrictions.  I only ask that if you give it to someone,
Xthat you give them everything, source code, man page, the works.  And if
Xyou hack on it, please try to get the changes back to me so that I can make
Xan attempt to keep things in sync.  Enjoy.
X
X
XRon Hitchens		ronbo@vixen.uucp	hitchens@cs.utexas.edu
X
X[@(#)README	2.3 9/9/88]
END_OF_FILE
if test 1761 -ne `wc -c <'README.1'`; then
    echo shar: \"'README.1'\" unpacked with wrong size!
fi
# end of 'README.1'
fi
if test ! -d 'SCCS' ; then
    echo shar: Creating directory \"'SCCS'\"
    mkdir 'SCCS'
fi
if test -f 'buttons1.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'buttons1.icon'\"
else
echo shar: Extracting \"'buttons1.icon'\" \(1933 characters\)
sed "s/^X//" >'buttons1.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
X	0xE000,0x0007,0xE000,0x0007,0xC000,0x0003,0xC000,0x0003,
X	0xC001,0x8003,0xC000,0x0003,0xC003,0xC003,0xC000,0x0003,
X	0xC007,0xE003,0xC000,0x0003,0xC00F,0xF003,0xC000,0x0003,
X	0xC01F,0xF803,0xC000,0x0003,0xC03F,0xFC03,0xC000,0x0003,
X	0xC07F,0xFE03,0xC7FF,0xFFF3,0xC0FF,0xFF03,0xC400,0x0013,
X	0xC1FF,0xFF83,0xC400,0x0013,0xC3FF,0xFFC3,0xC400,0x0013,
X	0xC7FF,0xFFE3,0xC4A1,0x8893,0xCFFF,0xFFF3,0xC4D2,0x4893,
X	0xCFFF,0xFFF3,0xC493,0x8A93,0xCFFF,0xFFF3,0xC492,0x0A93,
X	0xC00F,0xF003,0xC491,0xC513,0xC00F,0xF003,0xC400,0x0013,
X	0xC00F,0xF003,0xC470,0x0713,0xC00F,0xF003,0xC400,0x0013,
X	0xC00F,0xF003,0xC7FF,0xFFF3,0xC00F,0xF003,0xC000,0x0003,
X	0xC00F,0xF003,0xC000,0x0003,0xC00F,0xF003,0xC000,0x0003,
X	0xC00F,0xF003,0xC000,0x0003,0xC00F,0xF003,0xC000,0x0003,
X	0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
X	0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC,
X	0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
X	0xE000,0x0007,0xE000,0x0007,0xC000,0x0003,0xC000,0x0003,
X	0xC00F,0xF003,0xC00F,0xF003,0xC00F,0xF003,0xC030,0x0C03,
X	0xC00F,0xF003,0xC043,0xC203,0xC00F,0xF003,0xC082,0x4103,
X	0xC00F,0xF003,0xC060,0x0603,0xC00F,0xF003,0xC05F,0xFA03,
X	0xC00F,0xF003,0xC040,0x0203,0xC00F,0xF003,0xC04A,0x5203,
X	0xC00F,0xF003,0xC04A,0x5203,0xC00F,0xF003,0xC04A,0x5203,
X	0xCFFF,0xFFF3,0xC04A,0x5203,0xCFFF,0xFFF3,0xC04A,0x5203,
X	0xCFFF,0xFFF3,0xC04A,0x5203,0xC7FF,0xFFE3,0xC04A,0x5203,
X	0xC3FF,0xFFC3,0xC04A,0x5203,0xC1FF,0xFF83,0xC04A,0x5203,
X	0xC0FF,0xFF03,0xC04A,0x5203,0xC07F,0xFE03,0xC04A,0x5203,
X	0xC03F,0xFC03,0xC04A,0x5203,0xC01F,0xF803,0xC04E,0x7203,
X	0xC00F,0xF003,0xC040,0x0203,0xC007,0xE003,0xC060,0x0603,
X	0xC003,0xC003,0xC01F,0xF803,0xC001,0x8003,0xC000,0x0003,
X	0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
X	0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC
END_OF_FILE
if test 1933 -ne `wc -c <'buttons1.icon'`; then
    echo shar: \"'buttons1.icon'\" unpacked with wrong size!
fi
# end of 'buttons1.icon'
fi
if test -f 'buttons2.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'buttons2.icon'\"
else
echo shar: Extracting \"'buttons2.icon'\" \(1933 characters\)
sed "s/^X//" >'buttons2.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
X	0xE000,0x0007,0xE000,0x0007,0xC000,0x0003,0xC000,0x0003,
X	0xC000,0x5403,0xC00F,0xE003,0xC000,0xAA03,0xC03F,0xF803,
X	0xC001,0x5103,0xC03F,0xF803,0xC002,0xA083,0xC07F,0xFC03,
X	0xC005,0x4043,0xC07C,0x7C03,0xC00A,0x8023,0xC078,0x3C03,
X	0xC015,0x0013,0xC030,0x3C03,0xC02A,0x0023,0xC000,0x3C03,
X	0xC054,0x0043,0xC000,0x7C03,0xC0A8,0x0083,0xC001,0xF803,
X	0xC054,0x0103,0xC003,0xF003,0xC02A,0x0203,0xC003,0xE003,
X	0xCFFF,0xFFF3,0xC007,0xC003,0xC800,0x0013,0xC007,0x8003,
X	0xC800,0x0013,0xC007,0x8003,0xC80F,0xF013,0xC007,0x8003,
X	0xC808,0x1013,0xC007,0x8003,0xC808,0x1013,0xC003,0x0003,
X	0xC80F,0xF013,0xC000,0x0003,0xC800,0x0013,0xC000,0x0003,
X	0xC810,0x0813,0xC003,0x0003,0xC80F,0xF013,0xC007,0x8003,
X	0xC800,0x0013,0xC007,0x8003,0xCFFF,0xFFF3,0xC003,0x0003,
X	0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
X	0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC,
X	0x3FFF,0xFFFC,0x3FFF,0xFFFC,0x7FFF,0xFFFE,0x7FFF,0xFFFE,
X	0xE000,0x0007,0xE000,0x0003,0xC000,0x0003,0xC000,0x0003,
X	0xCC00,0x0003,0xC000,0x0003,0xCFFC,0x0003,0xC000,0x0003,
X	0xCF1F,0xFC03,0xCFFF,0xFFC3,0xCF1C,0xE3E3,0xCC00,0x0043,
X	0xCF1C,0xE323,0xCFFF,0xFFE3,0xCCE0,0xE323,0xCE00,0x0023,
X	0xCCE3,0x1F23,0xCFFF,0xFFF3,0xCCE3,0x1CE3,0xCF00,0x0013,
X	0xCF1F,0x1CE3,0xCFFF,0xFFFB,0xCF1C,0xE0E3,0xCF00,0x000B,
X	0xCF1C,0xE323,0xCF00,0x000B,0xCCE0,0xE323,0xCF22,0x010B,
X	0xCCE3,0x1F23,0xCF20,0x3BCB,0xCCE3,0x1CE3,0xCF26,0x410B,
X	0xCF1F,0x1CE3,0xCF22,0x310B,0xCF1C,0xE0E3,0xCF22,0x090B,
X	0xCFFC,0xE323,0xC722,0x70CB,0xCC03,0xFF23,0xC700,0x000B,
X	0xCC00,0x03E3,0xC300,0x000B,0xCC00,0x0003,0xC318,0x018B,
X	0xCC00,0x0003,0xC100,0x000B,0xCC00,0x0003,0xC1FF,0xFFFB,
X	0xCC00,0x0003,0xC000,0x0003,0xCC00,0x0003,0xC000,0x0003,
X	0xC000,0x0003,0xC000,0x0003,0xE000,0x0007,0xE000,0x0007,
X	0x7FFF,0xFFFE,0x7FFF,0xFFFE,0x3FFF,0xFFFC,0x3FFF,0xFFFC
END_OF_FILE
if test 1933 -ne `wc -c <'buttons2.icon'`; then
    echo shar: \"'buttons2.icon'\" unpacked with wrong size!
fi
# end of 'buttons2.icon'
fi
if test -f 'buttons3.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'buttons3.icon'\"
else
echo shar: Extracting \"'buttons3.icon'\" \(1933 characters\)
sed "s/^X//" >'buttons3.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x3FFF,0xFFFF,0xFFFF,0xC001,0x7FFF,0xFFFF,0xFFFF,0xE001,
X	0xE000,0x0000,0x0000,0x7001,0xC000,0x0000,0x0000,0x3001,
X	0xC000,0x0000,0x0000,0x3000,0xC01F,0x8200,0x0080,0x3001,
X	0xC010,0x0200,0x0080,0x3001,0xC010,0x0000,0x0080,0x3001,
X	0xC010,0x0E17,0x0E80,0x3001,0xC01F,0x0218,0x9180,0x3000,
X	0xC010,0x0210,0x9080,0x3001,0xC010,0x0210,0x9080,0x3001,
X	0xC010,0x0210,0x9080,0x3001,0xC010,0x0210,0x9180,0x3001,
X	0xC010,0x0210,0x8E80,0x3000,0xC000,0x0000,0x0000,0x3001,
X	0xC000,0x0000,0x0000,0x3001,0xE000,0x0000,0x0000,0x7001,
X	0x7FFF,0xFFFF,0xFFFF,0xE001,0x3FFF,0xFFFF,0xFFFF,0xC0FE,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1000,
X	0x0000,0x0000,0x0000,0x1000,0x0000,0x0000,0x0000,0x10EE,
X	0xF7BD,0xEF7B,0xDEF7,0xB02A,0x0000,0x0000,0x0000,0x00EA,
X	0x0040,0x1004,0x0100,0x008A,0x0000,0x0000,0x0000,0x40EE,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x3B80,0x0000,0x0000,
X	0x0000,0x2080,0x0000,0x0000,0x0000,0x3B80,0x0000,0x0000,
X	0x0000,0x0A00,0x0000,0x0000,0x0000,0x3B80,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
END_OF_FILE
if test 1933 -ne `wc -c <'buttons3.icon'`; then
    echo shar: \"'buttons3.icon'\" unpacked with wrong size!
fi
# end of 'buttons3.icon'
fi
if test -f 'defs.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'defs.h'\"
else
echo shar: Extracting \"'defs.h'\" \(2599 characters\)
sed "s/^X//" >'defs.h' <<'END_OF_FILE'
X
X/*	@(#)defs.h	2.2 8/16/88		*/
X
X/*
X * -------------------------------------------------------------------------
X *	ROLO - A Sun Tool to implement a Rolodex-style list of notes
X *
X *	This code manipulates "cards" in a visual manner approximating
X *	a rolodex file.  All the cards are stored in one real file, the
X *	cards are seperated by a ^L (form-feed).  The default path
X *	name is $HOME/.rolo.  A different pathname may be specified at
X *	startup on the command line.  The pathname is relative to the
X *	user's home directory.
X *
X *	Due to bugs in the 3.0 distribution, especially with text subwindows,
X *	this code is only guaranteed to compile and run properly with 3.2
X *	or greater.
X *
X *	This code is public domain, anyone and everyone is welcome to it.
X *	All I ask is that my name and this notice remain on it.  If Sun would
X *	like to bundle it with their product they are welcome to do so,
X *	I only ask that the sources be included in the binary distribution.
X *
X *	Please return any fixes, improvements, gripes, etc to me.
X *
X *	Ron Hitchens		ronbo@vixen.uucp
X *	March 1987 (V1.0)	hitchens@cs.utexas.edu
X *	August 1988 (V2.0)
X * -------------------------------------------------------------------------
X */
X
X
X/*
X *	Definitions for Rolo (This is version 2.0)
X */
X
X
X#ifndef TRUE
X#define TRUE 1
X#define FALSE 0
X#endif
X
X#define ROLOFILE		".rolo"	/* name of Rolo file in $HOME */
X#define NEWMODE			0600	/* file mode for creating new ROLOFILE */
X#define NAME			"Rolo"
X#define MAX_SELN_LEN		80	/* Max length of selection */
X#define MAX_INDEX_LINE		80	/* Max length of an index line */
X#define MAX_MENU_LEN		30
X
X#define HELPDISPLAYED		0x800000 /* "#" of card if help displayed */
X#define LISTALLCARDS		0x400000 /* "#" of card if listing all */
X
X#define PLAIN_CLICK		0	/* Symbolic names for the bit      */
X#define SHIFT_CLICK		1	/* encodings of the eight possible */
X#define CTRL_CLICK		2	/* combinations of the three shift */
X#define CTRL_SHIFT_CLICK	3	/* modifiers.  These values are    */
X#define META_CLICK		4	/* returned by the function        */
X#define META_SHIFT_CLICK	5	/* value_from_mask().              */
X#define META_CTRL_CLICK		6
X#define META_CTRL_SHIFT_CLICK	7
X
X
Xstruct card {
X	char		*c_text;		/* the text of the card */
X	int		c_num;			/* logical card number */
X	struct	card	*c_next,		/* pointer to the next card */
X			*c_prev;		/* pointer to the previous */
X};
X
X#define NULL_CARD	(struct card *)0
X
X
X#define DUMMY_CARD_CONTENTS	"\n\n\t  RoloTool - by Ron Hitchens\t(hitchens@vixen.uucp)\n\n\t  Ported to XView by Luis Soltero (luis@rice.edu)\n\n\n\n\t      delete this card";
X
END_OF_FILE
if test 2599 -ne `wc -c <'defs.h'`; then
    echo shar: \"'defs.h'\" unpacked with wrong size!
fi
# end of 'defs.h'
fi
if test -f 'help.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'help.h'\"
else
echo shar: Extracting \"'help.h'\" \(6702 characters\)
sed "s/^X//" >'help.h' <<'END_OF_FILE'
X/*	"@(#)help.h	2.3 8/14/88"	*/
X
X/*
X *	The text of the help message.
X */
X
X
X
Xstatic char	*help_msg [] = {
X
X" \n\
X      ROLO - Manage notes like a Rolodex\n\
X\n\
X   Each note in your Rolo file is meant to\n\
Xsimulate a 3x5 card upon which you may scribble\n\
Xanything you like.  You can have any number of\n\
Xcards in your rolodex, Rolo will keep track of\n\
Xthem for you.  You may browse around through\n\
Xthem, create new ones, throw old ones away,\n\
Xsearch for strings in them, etc.\n\
X\n\
X   The buttons in the top part of the Rolo\n\
Xwindow provide the main controls with which\n\
Xyou manipulate your cards.  Every button on\n\
Xthe control panel has a menu attached which\n\
Xcan be pulled up by pressing the right mouse\n\
Xbutton over that item.  The menus provide\n\
Xtextual explanations of what the buttons do,\n\
Xas well showing the shift accelerators which\n\
Xmay be used with the buttons.  Selecting from\n\
Xthe button menus is equivalent to clicking the\n\
Xbutton directly.  Herewith is a quick overview\n\
Xof what the buttons do.\n\
X\n",
X
X"\
XARROW BUTTONS\n\
X   These buttons move you through the cards.\n\
XThe down arrow moves you to the next card in\n\
Xthe file, the up arrow moves you backwards to\n\
Xthe previous card.  Holding down the Shift key\n\
Xwhen the down or up button is clicked, or\n\
Xchoosing the second menu item, will jump you\n\
Xto the last or first card respectively.\n\
X\n\
XNEW CARD BUTTON\n\
X   This button creates a new blank card.  By\n\
Xdefault, the new card will be inserted after\n\
Xthe currently displayed card.  Using the Shift\n\
Xkey will cause it to be inserted before the\n\
Xcurrent card.\n\
X\n\
XTRASHCAN BUTTON\n\
X   This button deletes and undeletes cards\n\
Xfrom your rolodex.  A normal unshifted click\n\
Xon this button deletes the card which is\n\
Xcurrently displayed.  Deleted cards are not\n\
Xlost, they are saved on a stack of deleted\n\
Xcards and may be retreived any time before\n\
XRolo exits.  The alternate selections on the\n\
Xmenu for the Trash button may be used to\n\
Xundelete any card which was previously deleted.\n\
XThese undelete menu items have pullright\n\
Xmenus which will list the first line of all\n\
Xthe cards on the deleted stack.  You may select\n\
Xany one of these deleted cards directly from\n\
Xthe pullright menu and it will re-inserted\n\
Xback into the active list of cards before or\n\
Xafter the current card.  If you select one\n\
Xof the undelete menu items directly, without\n\
Xpulling right to pick from the list of deleted\n\
Xcards, the card on the top of the deleted\n\
Xstack (the last one deleted) will be undeleted.\n\
XUsing Shift and Control key accelerators when\n\
Xclicking the button will give the same effect.\n\
XIf there are no deleted cards on the stack,\n\
Xthe undelete items are marked as inactive.\n\
XYou can rearrange the order of the cards in\n\
Xyour rolodex by deleting a card, moving to\n\
Xa new position, then undeleting it. Note that\n\
Xblanks cards containing only white space are\n\
Xnot saved on the undeleted stack, they are\n\
Xthrown away.\n\
X\n",
X
X"\
XLIST BUTTON\n\
X   This button produces an index list of all\n\
Xthe cards in your rolodex.  The first line\n\
Xof each card is displayed in the window so\n\
Xthat you can get a quick overview of all\n\
Xyour cards.  The card numbers to the left of\n\
Xeach line can be used to jump directly to that\n\
Xcard with the slider in the control panel.\n\
X\n\
XFILE BUTTON\n\
X   This button loads and saves your rolodex\n\
Xcards from and to disk.  The default action\n\
Xis to write the current list of cards out to\n\
Xthe file they were loaded from (the file name\n\
Xlisted in the title bar).  You can also reload\n\
Xthe cards from that file as-of the last time\n\
Xthey were saved.  There are also items on\n\
Xthis menu which will sort your cards into\n\
Xalphabetical order according to their first\n\
Xlines.  The last two items on the menu, which\n\
Xcan only be selected from the menu, will load\n\
Xfrom or save to a named file.  You must select\n\
Xa string in some window to provide the file\n\
Xname, similar to the way the TextEdit tool\n\
Xworks.  The path you give must be relative to\n\
Xyour home directory (Rolo does a cd to $HOME\n\
Xwhen it starts up).  Saving to or loading from\n\
Xa file this way causes that new file to become\n\
Xthe default for the regular load and save\n\
Xoperations.  You will be warned about unsaved\n\
Xmodifications to your cards, overwriting\n\
Xexisting files, etc.\n\
X\n\
XHELP BUTTON\n\
X   Displays the information you're reading now.\n\
X\n\
XFINISHED BUTTON\n\
X   This button is used when you are finished\n\
Xusing Rolo.  A normal click saves any changes\n\
Xyou've made and causes Rolo to close to an\n\
Xicon.  Alternate selections will cause Rolo to\n\
Xexit with or without saving any pending\n\
Xchanges you've made.  Rolo automatically\n\
Xsaves any pending changes if SunTools\n\
Xforces it to exit.\n\
X\n",
X
X"\
XFIND BUTTON\n\
X   This button searches for a regular expression\n\
Xin your cards.  This can be used to find any\n\
Xtext pattern which appears anywhere in any of\n\
Xyour cards.  The pattern to search for may be\n\
Xentered in the text item to the right of the\n\
XFind button.  If, at the time the Find\n\
Xbutton is clicked, there is an active selection\n\
Xin any window, it will be used as the search\n\
Xpattern instead.  Pressing the return key in\n\
Xthe search pattern item is equivalent to\n\
Xclicking the Find button.  Due to the way the\n\
Xlibrary search routines work, all the text of a\n\
Xgiven card is treated as one logical line.  The\n\
Xmain effect of this is that the '^' and '$'\n\
Xoperations won't match individual lines within\n\
Xa card, only the text of the card as a whole.\n\
XNote: \"Regular expressions\" are the kind used\n\
Xby egrep(1), which are not the same as the\n\
Xshell meta-characters.\n\
X\n\
XSLIDER\n\
X   The slider item on the control panel may\n\
Xbe used to select any card directly.  Simply\n\
Xdrag the bar back and forth until the number\n\
Xof the card you wish to see is displayed to\n\
Xthe left of the slider, then release the\n\
Xmouse button.\n\
X\n\
X\n",
X
X"\
XAUTHOR\n\
X   Ron Hitchens\n\
X    ronbo@vixen.uucp, hitchens@cs.utexas.edu\n\
X\n\
X   March  1987, version 1.0\n\
X   August 1988, version 2.0\n\
X\n\
X   Thanks to S. Page (spage@sun.com) and\n\
XMike Ekberg (mae@sun.com) at Sun for changes\n\
Xand improvements to the original Rolo.\n\
X\n\
X\n\
X   Rolo is public domain, anyone and everyone\n\
Xis welcome to it.  Feel free to give it to your\n\
Xfriends (or even your enemies).  I only ask\n\
Xthat you keep it all together, source included,\n\
Xas posted.  Please send bug reports, fixes,\n\
Xgripes, suggestions, etc, to me at the email\n\
Xaddress above.\n\
X\n\
X[RH 8/8/88]\n\
X" };
END_OF_FILE
if test 6702 -ne `wc -c <'help.h'`; then
    echo shar: \"'help.h'\" unpacked with wrong size!
fi
# end of 'help.h'
fi
if test -f 'main.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'main.c'\"
else
echo shar: Extracting \"'main.c'\" \(6209 characters\)
sed "s/^X//" >'main.c' <<'END_OF_FILE'
X#ifndef lint
Xstatic char sccsid[] = "@(#)main.c	2.4 9/13/88";
X#endif
X
X/*
X *	Main - Setup the tool environment and dive into Sunview
X */
X
X
X/*
X * -------------------------------------------------------------------------
X *	ROLO - A Sun Tool to implement a Rolodex-style list of notes
X *
X *	This code manipulates "cards" in a visual manner approximating
X *	a rolodex file.  All the cards are stored in one real file, the
X *	cards are seperated by a ^L (form-feed).  The default path
X *	name is $HOME/.rolo.  A different pathname may be specified at
X *	startup on the command line.  The pathname is relative to the
X *	user's home directory.
X *
X *	Due to bugs in the 3.0 distribution, especially with text subwindows,
X *	this code is only guaranteed to compile and run properly with 3.2
X *	or greater.
X *
X *	This code is public domain, anyone and everyone is welcome to it.
X *	All I ask is that my name and this notice remain on it.  If Sun would
X *	like to bundle it with their product they are welcome to do so,
X *	I only ask that the sources be included in the binary distribution.
X *
X *	Please return any fixes, improvements, gripes, etc to me.
X *
X *	Ron Hitchens		ronbo@vixen.uucp
X *	March 1987 (V1.0)	hitchens@cs.utexas.edu
X *	August 1988 (V2.0)
X * -------------------------------------------------------------------------
X */
X
X
X#include <stdio.h>
X#include <xview/xview.h>
X#include <xview/panel.h>
X#include <xview/textsw.h>
X#include <xview/svrimage.h>
X#include <xview/icon.h>
X
X#include "defs.h"
X
X
X
X/* ------------------------------ Exports ---------------------------------- */
X
XTextsw			rolocard;
X
Xchar			*rolofile = ROLOFILE;
X
X
X/* ------------------------------ Imports ---------------------------------- */
X
Xextern Panel		init_panel ();
X
Xextern Notify_value	rolo_destroy (), catch_resize ();
X
Xextern void		init_rolo ();
X
Xextern char		*check_args (), *getenv (), *strcpy (),
X			*calloc (), *malloc ();
X
X
X/* ------------------------------ Locals ----------------------------------- */
X
Xstatic Frame		frame;
X
Xstatic Textsw		init_card ();
X
Xstatic int		scan_args ();
X
Xstatic char		*strsav ();
X
Xstatic unsigned short	roloicon_data [] = {
X#include "rolo.icon"
X};
X
X/* ------------------------------------------------------------------------- */
X
X
X
X/*
X *	Main - Clean up inherited fds, make sure we're under SunView,
X *	create the frame and the subwindows, setup interposers then
X *	enter SunView.
X */
X
X
X#ifdef STANDALONE
Xmain (argc, argv)
X#else
Xrolomain (argc, argv)
X#endif
X	int	argc;
X	char	**argv;
X{
X	Panel	panel;
X	int	Argc, i, j = getdtablesize ();
X	extern void abort();
X	char	**Argv, *p;
X	Server_image roloicon_image;
X	Icon roloicon;
X
X	for (i = 3; i < j; i++)	{	/* free up all the fd's */
X		(void) close (i);
X	}
X
X	xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, 
X/*			XV_ERROR_PROC, abort, /* */
X			0);
X	Argc = scan_args (argc, argv, &Argv);
X
X	frame = xv_create (XV_NULL, FRAME,
X		WIN_ERROR_MSG,			"Couldn't create base window",
X		NULL);
X
X    roloicon_image = (Server_image)xv_create(NULL, SERVER_IMAGE,
X										 XV_WIDTH, 64,
X										 XV_HEIGHT, 64,
X										 SERVER_IMAGE_BITS, roloicon_data,
X										 NULL);
X
X	roloicon = (Icon) xv_create(NULL, ICON, 
X								ICON_IMAGE, roloicon_image,
X								NULL);
X	xv_set(frame, FRAME_ICON,	roloicon, NULL);
X
X	panel = init_panel (frame);
X
X	rolocard = (Textsw) xv_create (frame, TEXTSW,
X		WIN_X,			0,
X		WIN_BELOW,		panel,
X		XV_HEIGHT,		200,
X		XV_WIDTH,		WIN_EXTEND_TO_EDGE,
X		TEXTSW_CONTENTS,	"Rolo - by Ron Hitchens",
X		0);
X
X	window_fit (frame);
X
X	p = check_args (argc, argv);
X	if (p != NULL) {
X		rolofile = p;
X	}
X
X	init_rolo (rolofile);
X
X	notify_interpose_destroy_func (frame, rolo_destroy);
X	notify_interpose_event_func (frame, catch_resize, NOTIFY_SAFE);
X
X	xv_main_loop (frame);
X
X	exit (0);
X}
X
X
X/*
X *	Scan the command line args and build a dummy arg list containing
X *	the window args which will be overridden by Rolo's fascist sizing
X *	rules.  These will be passed into a xv_set() after the frame and
X *	the subwindows have been created.  These args must be copied because
X *	xv_create() will eat them.
X */
X
Xstatic
Xint
Xscan_args (argc, argv, Argv)
X	int	argc;
X	char	**argv, ***Argv;
X{
X	int	i, new_argc;
X	char	**p, **new_argv;
X
X	new_argv = (char **) calloc (argc, sizeof (char *));
X	if (new_argv == (char **)0) {
X		fprintf (stderr, "%s: Can't allocate temp arg list\n", *argv);
X		exit (1);
X	}
X
X	new_argv [0] = strsav (argv [0]);
X	new_argc = 1;
X	for (i = 1, p = &new_argv [1]; i < argc; i++) {
X		if ((strcmp (argv [i], "-Ww") == 0) ||
X		    (strcmp (argv [i], "-width") == 0)) {
X			if ((argc - i) < 2) {
X				/* SunView will complain about missing args */
X				continue;
X			}
X			*p++ = strsav (argv [i++]);
X			*p++ = strsav (argv [i]);	/* one sub-arg */
X			new_argc += 2;
X			continue;
X		}
X		if ((strcmp (argv [i], "-Wh") == 0) ||
X		    (strcmp (argv [i], "-height") == 0)) {
X			if ((argc - i) < 2) {
X				continue;
X			}
X			*p++ = strsav (argv [i++]);
X			*p++ = strsav (argv [i]);	/* one sub-arg */
X			new_argc += 2;
X			continue;
X		}
X		if ((strcmp (argv [i], "-Ws") == 0) ||
X		    (strcmp (argv [i], "-size") == 0)) {
X			if ((argc - i) < 3) {
X				continue;
X			}
X			*p++ = strsav (argv [i++]);
X			*p++ = strsav (argv [i++]);	/* two sub-args */
X			*p++ = strsav (argv [i]);
X			new_argc += 3;
X			continue;
X		}
X	}
X
X	*Argv = new_argv;
X
X	return (new_argc);
X}
X
X
X/*
X *	Glue for setting the tool name stripe.  Simply to avoid exporting
X *	the frame handle.
X */
X
Xvoid
Xset_stripe (p)
X	char	*p;
X{
X	xv_set (frame, XV_LABEL, p, 0);
X}
X
X
X/*
X *	Glue for the pop-up message window.  The provided args are passed
X *	on to the popup routine along with the handle to the frame.
X */
X
X/*VARARGS1*/
Xmsg (s, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
X	char	*s;
X	long    a0, a1, a2, a3, a4, a5, a6, a7, a8, a9;
X{
X	return (pop_msg (frame, s, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9));
X}
X
X
X/*
X *	Glue for the popup confirmer.
X */
X
X/*VARARGS1*/
Xconfirm (s, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
X	char	*s;
X	long    a0, a1, a2, a3, a4, a5, a6, a7, a8, a9;
X{
X	return (pop_confirm (frame, s, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9));
X}
X
X
X/*
X *	Duplicate a string, return the address of the copy.
X */
X
Xstatic
Xchar *
Xstrsav (p)
X	char	*p;
X{
X	char	*q = malloc (strlen (p) + 1);
X
X	return (strcpy (q, p));
X}
END_OF_FILE
if test 6209 -ne `wc -c <'main.c'`; then
    echo shar: \"'main.c'\" unpacked with wrong size!
fi
# end of 'main.c'
fi
if test -f 'pop.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'pop.icon'\"
else
echo shar: Extracting \"'pop.icon'\" \(1934 characters\)
sed "s/^X//" >'pop.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x007F,0xFFFF,0xFFFF,0xFE00,0x00FF,0xFFFF,0xFFFF,0xFF00,
X	0x01FF,0xFFFF,0xFFFF,0xFF80,0x03FF,0xFFE1,0xDEFF,0xFFC0,
X	0x07FF,0xFFDE,0xDDFF,0xFFE0,0x07FF,0xFFDE,0xDBFF,0xFFE0,
X	0x07FF,0xFFDE,0xD7FF,0xFFE0,0x07FF,0xFFDE,0xCFFF,0xFFE0,
X	0x07FF,0xFFDE,0xD7FF,0xFFE0,0x07FF,0xFFDE,0xDBFF,0xFFE0,
X	0x07FF,0xFFDE,0xDDFF,0xFFE0,0x05FF,0xFFE1,0xDEFF,0xFFA0,
X	0x0CFF,0xFFFF,0xFFFF,0xFF30,0x1E7F,0xFFFF,0xFFFF,0xFE78,
X	0x1D3F,0xFFFF,0xFFFF,0xFCB8,0x1E20,0x0000,0x0000,0x0478,
X	0x1D3F,0xFFF0,0x0000,0x04B8,0x1E20,0x0000,0x0000,0x0478,
X	0x1F3F,0xFE00,0x0000,0x04F8,0x0F20,0x0000,0x0000,0x04F0,
X	0x07BF,0x0000,0x0000,0x05E0,0x03E0,0x0000,0x0000,0x07C0,
X	0x01FF,0xFFFF,0xFFFF,0xFF80,0x00FF,0xFFFF,0xFFFF,0xFF00,
X	0x007F,0xFFFF,0xFFFF,0xFE00,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x007F,0xFFFF,0xFFFF,0xFE00,0x00FF,0xFFFF,0xFFFF,0xFF00,
X	0x01FF,0xFFFF,0xFFFF,0xFF80,0x03E1,0xFBE7,0x70E0,0xDFC0,
X	0x07DE,0xFBE7,0x6F6F,0xDFE0,0x07DF,0xF5EB,0x6FEF,0xDFE0,
X	0x07DF,0xF5EB,0x6FEF,0xDFE0,0x07DF,0xEEED,0x6FE1,0xDFE0,
X	0x07DF,0xEEED,0x6FEF,0xDFE0,0x07DF,0xC06E,0x6FEF,0xDFE0,
X	0x07DE,0xDF6E,0x6F6F,0xDFE0,0x05E1,0xDF6F,0x70E0,0xC1A0,
X	0x0CFF,0xFFFF,0xFFFF,0xFF30,0x1E7F,0xFFFF,0xFFFF,0xFE78,
X	0x1D3F,0xFFFF,0xFFFF,0xFCB8,0x1E20,0x0000,0x0000,0x0478,
X	0x1D3F,0xFFF0,0x0000,0x04B8,0x1E20,0x0000,0x0000,0x0478,
X	0x1F3F,0xFE00,0x0000,0x04F8,0x0F20,0x0000,0x0000,0x04F0,
X	0x07BF,0x0000,0x0000,0x05E0,0x03E0,0x0000,0x0000,0x07C0,
X	0x01FF,0xFFFF,0xFFFF,0xFF80,0x00FF,0xFFFF,0xFFFF,0xFF00,
X	0x007F,0xFFFF,0xFFFF,0xFE00,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
X	0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
X
END_OF_FILE
if test 1934 -ne `wc -c <'pop.icon'`; then
    echo shar: \"'pop.icon'\" unpacked with wrong size!
fi
# end of 'pop.icon'
fi
if test -f 'popup.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'popup.c'\"
else
echo shar: Extracting \"'popup.c'\" \(1954 characters\)
sed "s/^X//" >'popup.c' <<'END_OF_FILE'
X#ifndef lint
Xstatic char sccsid[] = "@(#)popup.c	2.2 8/12/88";
X#endif
X
X/*
X *	popup - pop up error dialog windows
X */
X
X
X#include <xview/xview.h>
X#include <xview/panel.h>
X#include <xview/notice.h>
X#include <stdio.h>
X
X
X#define X_GAP		25
X#define Y_GAP		30
X
X#define MAX(a,b)	(((a)>(b))?(a):(b))
X#define MIN(a,b)	(((a)<(b))?(a):(b))
X
X
X/* ---------------------------- Imports -------------------------------- */
X
Xextern char		*sprintf ();
X
Xstatic
Xdo_pop (frame, s, show_cancel)
X	Frame	frame;
X	char	*s;
X	int	show_cancel;
X{
X	int	answer;
X
X	if ( show_cancel )
X	  answer = notice_prompt(frame, NULL,
X							 NOTICE_MESSAGE_STRINGS, s, NULL,
X							 NOTICE_BUTTON_YES, "   OK   ",
X							 NOTICE_BUTTON_NO,  " Cancel ",
X							 NULL);
X	else
X	  answer = notice_prompt(frame, NULL,
X							 NOTICE_MESSAGE_STRINGS, s, NULL,
X							 NOTICE_BUTTON_YES, "   OK   ",
X							 NULL);
X	  
X	return (answer == NOTICE_YES ? 1 : 0);
X}
X
X
X/*
X *	Glue routine for a confirmer dialog box.  The first argument is
X *	the frame relative to which the dialog window is displayed.  The
X *	remaining arguments are a format string and generic args for
X *	the sprintf call.  The flag is passed to the dialog frame creation
X *	routine which indicates that both the OK and CANCEL buttons are
X *	to be displayed.
X */
X
X/*VARARGS2*/
Xpop_confirm (frame, s, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
X	Frame	frame;
X	char	*s;
X	long	a0, a1, a2, a3, a4, a5, a6, a7, a8, a9;
X{
X	char	temp [512];
X
X	(void) sprintf (temp, s, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
X	return (do_pop (frame, temp, TRUE));
X}
X
X
X/*
X *	Glue routine for a simple info popup frame.  Only the OK button is
X *	displayed and the frame waits until it is clicked.
X */
X
X/*VARARGS2*/
Xpop_msg (frame, s, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
X	Frame	frame;
X	char	*s;
X	long	a0, a1, a2, a3, a4, a5, a6, a7, a8, a9;
X{
X	char	temp [512];
X
X	(void) sprintf (temp, s, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
X	return (do_pop (frame, temp, FALSE));
X}
X
END_OF_FILE
if test 1954 -ne `wc -c <'popup.c'`; then
    echo shar: \"'popup.c'\" unpacked with wrong size!
fi
# end of 'popup.c'
fi
if test -f 'rolo.gray.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'rolo.gray.icon'\"
else
echo shar: Extracting \"'rolo.gray.icon'\" \(1933 characters\)
sed "s/^X//" >'rolo.gray.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,
X	0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
X	0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,
X	0x2222,0x2222,0x2222,0x2222,0x223F,0xFFFF,0xFFFF,0xFE22,
X	0x88A0,0x0000,0x0000,0x0488,0x88A0,0x0000,0x0000,0x0488,
X	0x2220,0x0000,0x0000,0x0622,0x2220,0x0000,0x0000,0x0622,
X	0x88A0,0x7C3E,0x307C,0x0488,0x88A0,0x7E7F,0x30FE,0x0488,
X	0x2220,0x6663,0x30C6,0x0622,0x2220,0x6663,0x30C6,0x0622,
X	0x88A0,0x6663,0x30C6,0x0488,0x88A0,0x6663,0x30C6,0x0488,
X	0x2220,0x7E63,0x30C6,0x0622,0x2220,0x7C63,0x30C6,0x0622,
X	0x88A0,0x6C63,0x30C6,0x0488,0x88A0,0x6663,0x30C6,0x0488,
X	0x2220,0x6663,0x30C6,0x0622,0x2220,0x667F,0x3EFE,0x0622,
X	0x88A0,0x663E,0x3E7C,0x0488,0x88A0,0x0000,0x0000,0x0488,
X	0x2220,0x0000,0x0000,0x0622,0x22E0,0x0400,0x0020,0x0622,
X	0x88A0,0x0A00,0x0050,0x0588,0x8B20,0x0A00,0x0050,0x0488,
X	0x22BF,0xFBFF,0xFFDF,0xFD62,0x2291,0x1B11,0x1151,0x1162,
X	0x8A88,0x8A88,0x88D8,0x8948,0x8ABF,0xFBFF,0xFFDF,0xFD48,
X	0x2320,0x0A00,0x0050,0x04E2,0x22A0,0x0A00,0x0050,0x0522,
X	0x88E0,0x0400,0x0020,0x0788,0x88A0,0x0000,0x0000,0x0488,
X	0x2220,0x0000,0x0000,0x0622,0x2220,0x183E,0x1F1F,0x0622,
X	0x88A0,0x187F,0x3F9F,0x0488,0x88A0,0x1863,0x3198,0x0488,
X	0x2220,0x1863,0x3198,0x0622,0x2220,0x1863,0x3198,0x0622,
X	0x88A0,0x1863,0x3198,0x0488,0x88A0,0x1863,0x3198,0x0488,
X	0x2220,0x1863,0x3198,0x0622,0x2220,0x1863,0x3198,0x0622,
X	0x88A0,0x1863,0x3198,0x0488,0x88A0,0x1863,0x3198,0x0488,
X	0x2220,0xFF7F,0x3F98,0x0622,0x2220,0xFF3E,0x1F18,0x0622,
X	0x88A0,0x0000,0x0000,0x0488,0x88A0,0x0000,0x0000,0x0488,
X	0x2220,0x0000,0x0000,0x0622,0x2220,0x0000,0x0000,0x0622,
X	0x88BF,0xFFFF,0xFFFF,0xFC88,0x8888,0x8888,0x8888,0x8888,
X	0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
X	0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,0x8888,
X	0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222
END_OF_FILE
if test 1933 -ne `wc -c <'rolo.gray.icon'`; then
    echo shar: \"'rolo.gray.icon'\" unpacked with wrong size!
fi
# end of 'rolo.gray.icon'
fi
if test -f 'rolo.icon' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'rolo.icon'\"
else
echo shar: Extracting \"'rolo.icon'\" \(1933 characters\)
sed "s/^X//" >'rolo.icon' <<'END_OF_FILE'
X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
X */
X	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
X	0xC000,0x0000,0x0000,0x0003,0xDFFF,0xFFFF,0xFFFF,0xFFFB,
X	0xDFFF,0xFFFF,0xFFFF,0xFFFB,0xDFFF,0xFFFF,0xFFFF,0xFFFB,
X	0xDFFF,0xFFFF,0xFFFF,0xFFFB,0xDFFF,0xFFFF,0xFFFF,0xFFFB,
X	0xDFE0,0x0000,0x0000,0x07FB,0xDFE0,0x0000,0x0000,0x07FB,
X	0xDFE0,0x0000,0x0000,0x07FB,0xDFE0,0x0000,0x0000,0x07FB,
X	0xDFE0,0x7C3E,0x307C,0x07FB,0xDFE0,0x7E7F,0x30FE,0x07FB,
X	0xDFE0,0x6663,0x30C6,0x07FB,0xDFE0,0x6663,0x30C6,0x07FB,
X	0xDFE0,0x6663,0x30C6,0x07FB,0xDFE0,0x6663,0x30C6,0x07FB,
X	0xDFE0,0x7E63,0x30C6,0x07FB,0xDFE0,0x7C63,0x30C6,0x07FB,
X	0xDFE0,0x6C63,0x30C6,0x07FB,0xDFE0,0x6663,0x30C6,0x07FB,
X	0xDFE0,0x6663,0x30C6,0x07FB,0xDFE0,0x667F,0x3EFE,0x07FB,
X	0xDFE0,0x663E,0x3E7C,0x07FB,0xDFE0,0x0000,0x0000,0x07FB,
X	0xDFE0,0x0000,0x0000,0x07FB,0xDFE0,0x0400,0x0020,0x07FB,
X	0xDFA0,0x0A00,0x0050,0x05FB,0xDF20,0x0A00,0x0050,0x04FB,
X	0xDEBF,0xFBFF,0xFFDF,0xFD7B,0xDE91,0x1B11,0x1151,0x117B,
X	0xDE88,0x8A88,0x88D8,0x897B,0xDEBF,0xFBFF,0xFFDF,0xFD7B,
X	0xDF20,0x0A00,0x0050,0x04FB,0xDFA0,0x0A00,0x0050,0x05FB,
X	0xDFE0,0x0400,0x0020,0x07FB,0xDFE0,0x0000,0x0000,0x07FB,
X	0xDFE0,0x0000,0x0000,0x07FB,0xDFE0,0x183E,0x1F1F,0x07FB,
X	0xDFE0,0x187F,0x3F9F,0x07FB,0xDFE0,0x1863,0x3198,0x07FB,
X	0xDFE0,0x1863,0x3198,0x07FB,0xDFE0,0x1863,0x3198,0x07FB,
X	0xDFE0,0x1863,0x3198,0x07FB,0xDFE0,0x1863,0x3198,0x07FB,
X	0xDFE0,0x1863,0x3198,0x07FB,0xDFE0,0x1863,0x3198,0x07FB,
X	0xDFE0,0x1863,0x3198,0x07FB,0xDFE0,0x1863,0x3198,0x07FB,
X	0xDFE0,0xFF7F,0x3F98,0x07FB,0xDFE0,0xFF3E,0x1F18,0x07FB,
X	0xDFE0,0x0000,0x0000,0x07FB,0xDFE0,0x0000,0x0000,0x07FB,
X	0xDFE0,0x0000,0x0000,0x07FB,0xDFE0,0x0000,0x0000,0x07FB,
X	0xDFFF,0xFFFF,0xFFFF,0xFFFB,0xDFFF,0xFFFF,0xFFFF,0xFFFB,
X	0xDFFF,0xFFFF,0xFFFF,0xFFFB,0xDFFF,0xFFFF,0xFFFF,0xFFFB,
X	0xDFFF,0xFFFF,0xFFFF,0xFFFB,0xC000,0x0000,0x0000,0x0003,
X	0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF
END_OF_FILE
if test 1933 -ne `wc -c <'rolo.icon'`; then
    echo shar: \"'rolo.icon'\" unpacked with wrong size!
fi
# end of 'rolo.icon'
fi
if test -f 'xrolo.man' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xrolo.man'\"
else
echo shar: Extracting \"'xrolo.man'\" \(6827 characters\)
sed "s/^X//" >'xrolo.man' <<'END_OF_FILE'
X\" @(#)rolo.1	2.2 8/14/88
X.TH ROLO 1 "August 1988"
X.SH NAME
Xrolo \- SunView tool to manage notes like a Rolodex
X.SH SYNOPSIS
X.B rolo [file]
X.SH DESCRIPTION
X.I Rolo
Xis a tool for the Sun workstation which presents a
Xuser interface to a simple database of notes in a manner
Xwhich approximates a Rolodex file.  The information in
Xthis man page is available, almost verbatim, within
X.I Rolo
Xby clicking the "?" button in the control panel.
X
XEach note in your
X.I Rolo
Xfile is meant to
Xsimulate a 3x5 card upon which you may scribble
Xanything you like.  You can have any number of
Xcards in your rolodex,
X.I Rolo
Xwill keep track of
Xthem for you.  You may browse around through
Xthem, create new ones, throw old ones away,
Xsearch for strings in them, etc.
X
XThe buttons in the top part of the
X.I Rolo
Xwindow provide the main controls with which
Xyou manipulate your cards.  Every button on
Xthe control panel has a menu attached which
Xcan be pulled up by pressing the right mouse
Xbutton over that item.  The menus provide
Xtextual explanations of what the buttons do,
Xas well showing the shift accelerators which
Xmay be used with the buttons.  Selecting from
Xthe button menus is equivalent to clicking the
Xbutton directly.  Herewith is a quick overview
Xof what the buttons do.
X.TP
XARROW BUTTONS
XThese buttons move you through the cards.
XThe down arrow moves you to the next card in
Xthe file, the up arrow moves you backwards to
Xthe previous card.  Holding down the Shift key
Xwhen the down or up button is clicked, or
Xchoosing the second menu item, will jump you
Xto the last or first card respectively.
X.TP
XNEW CARD BUTTON
XThis button creates a new blank card.  By
Xdefault, the new card will be inserted after
Xthe currently displayed card.  Using the Shift
Xkey will cause it to be inserted before the
Xcurrent card.
X.TP
XTRASHCAN BUTTON
XThis button deletes and undeletes cards
Xfrom your rolodex.  A normal unshifted click
Xon this button deletes the card which is
Xcurrently displayed.  Deleted cards are not
Xlost, they are saved on a stack of deleted
Xcards and may be retreived any time before
X.I Rolo
Xexits.  The alternate selections on the
Xmenu for the Trash button may be used to
Xundelete any card which was previously deleted.
XThese undelete menu items have pullright
Xmenus which will list the first line of all
Xthe cards on the deleted stack.  You may select
Xany one of these deleted cards directly from
Xthe pullright menu and it will re-inserted
Xback into the active list of cards before or
Xafter the current card.  If you select one
Xof the undelete menu items directly, without
Xpulling right to pick from the list of deleted
Xcards, the card on the top of the deleted
Xstack (the last one deleted) will be undeleted.
XUsing Shift and Control key accelerators when
Xclicking the button will give the same effect.
XIf there are no deleted cards on the stack,
Xthe undelete items are marked as inactive.
XYou can rearrange the order of the cards in
Xyour rolodex by deleting a card, moving to
Xa new position, then undeleting it.  Note that
Xblanks cards containing only white space are
Xnot saved on the undeleted stack, they are
Xthrown away.
X.TP
XLIST BUTTON
XThis button produces an index list of all
Xthe cards in your rolodex.  The first line
Xof each card is displayed in the window so
Xthat you can get a quick overview of all
Xyour cards.  The card numbers to the left of
Xeach line can be used to jump directly to that
Xcard with the slider in the control panel.
X.TP
XFILE BUTTON
XThis button loads and saves your rolodex
Xcards from and to disk.  The default action
Xis to write the current list of cards out to
Xthe file they were loaded from (the file name
Xlisted in the title bar).  You can also reload
Xthe cards from that file as-of the last time
Xthey were saved.  There are also items on
Xthis menu which will sort your cards into
Xalphabetical order according to their first
Xlines.  The last two items on the menu, which
Xcan only be selected from the menu, will load
Xfrom or save to a named file.  You must select
Xa string in some window to provide the file
Xname, similar to the way the
X.I TextEdit
Xtool
Xworks.  The path you give must be relative to
Xyour home directory (a cd to
X.B $HOME
Xis done
Xwhen 
X.I Rolo
Xstarts up).  Saving to or loading from
Xa file this way causes that new file to become
Xthe default for the regular load and save
Xoperations.  You will be warned about unsaved
Xmodifications to your cards, overwriting
Xexisting files, etc.
X.TP
XHELP BUTTON
XDisplays the information you're reading now.
X.TP
XFINISHED BUTTON
X   This button is used when you are finished
Xusing
X.I Rolo.  
XA normal click saves any changes
Xyou've made and causes
X.I Rolo
Xto close to an
Xicon.  Alternate selections will cause
X.I Rolo
Xto
Xexit with or without saving any pending
Xchanges you've made.  
X.I Rolo
Xautomatically
Xsaves any pending changes if SunTools
Xforces it to exit.
X.TP
XFIND BUTTON
XThis button searches for a regular expression
Xin your cards.  This can be used to find any
Xtext pattern which appears anywhere in any of
Xyour cards.  The pattern to search for may be
Xentered in the text item to the right of the
XFind button.  If, at the time the Find
Xbutton is clicked, there is an active selection
Xin any window, it will be used as the search
Xpattern instead.  Pressing the return key in
Xthe search pattern item is equivalent to
Xclicking the Find button.  Due to the way the
Xlibrary search routines work, all the text of a
Xgiven card is treated as one logical line.  The
Xmain effect of this is that the '^' and '$'
Xoperations won't match individual lines within
Xa card, only the text of the card as a whole.
X.br
XNote: "Regular expressions" are the kind used
Xby egrep(1), which are not the same as the
Xshell meta-characters.
X.TP
XSLIDER
XThe slider item on the control panel may
Xbe used to select any card directly.  Simply
Xdrag the bar back and forth until the number
Xof the card you wish to see is displayed to
Xthe left of the slider, then release the
Xmouse button.
X.SH FILES
X.TP
X$HOME/.rolo
XThis is the default filename
X.I Rolo
Xlooks for at startup, unless a filename argument
Xis provided on the command line.  The file pathname
Xgiven must be relative to your home directory, even if
X.I Rolo
Xis executed from somewhere else, because
X.I Rolo
Xchanges to your home directory when it begins.
X.SH AUTHOR
XRon Hitchens   (ronbo@vixen.uucp, hitchens@cs.utexas.edu)
X.br
X   Version 1.0, March  1987
X   Version 2.0, August 1988
X
XThanks to S. Page (spage@sun.com) and
XMike Ekberg (mae@sun.com) at Sun for
Xchanges and improvements to the original
X.I Rolo.
X.SH POLICY
X.I Rolo
Xis public domain, anyone and everyone
Xis welcome to it.  Feel free to give it to your
Xfriends (or even your enemies).  I only ask
Xthat you keep it all together, source included,
Xas posted.  Please send bug reports, fixes,
Xgripes, suggestions, etc, to me at the email
Xaddress above.
X
X[RH 8/8/88]
END_OF_FILE
if test 6827 -ne `wc -c <'xrolo.man'`; then
    echo shar: \"'xrolo.man'\" unpacked with wrong size!
fi
# end of 'xrolo.man'
fi
echo shar: End of archive 1 \(of 3\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 3 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0

dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.