ssdken@watson.Claremont.EDU (Ken Nelson) (09/14/90)
I have not had time to put together the promised update to Xcard. I apologize, I am changing jobs, moving across the country, but enough about me... Time just ran out. Many users have sent patches for Xcard on Sun4 and Sparcs. I have an patch file after the cut-here line. I have not had time to test this patch, but wanted to release it to any users with that caveat. If you sent a patch, and it is not this one, take heart it will eventually be included. Xcard will be unsupported for a couple of months, if you have patches send them to me (my email will be forwarded) and post them to the net. Good luck Ken Nelson ---------------------------- cut here ---------------------------- 1N 14969: 11 Sep 90 dana fixes to xcard (Message # 1: 14969 bytes, New) Received: from thumper.bellcore.com by jarthur.Claremont.edu id aa27307; 11 Sep 90 7:02 PDT Received: from dino.bellcore.com by thumper.bellcore.com (4.1/4.7) id AA10512; Tue, 11 Sep 90 10:04:27 EDT Received: by dino.bellcore.com (4.12/4.7) id AA25572; Tue, 11 Sep 90 10:03:07 edt Date: Tue, 11 Sep 90 10:03:07 edt From: dana@thumper.bellcore.com (Dana A. Chee) Message-Id: <9009111403.AA25572@dino.bellcore.com> To: ssdken@jarthur.claremont.edu Subject: fixes to xcard Ken, Here are some patches to make xcard run (on a Sparc anyway) as well as remove the hard coded preferences (such as shape and labels). The next message will contain the applications default file and the Imakefiles. (I changed the class name so that it could be used with app-defaults files and in the .Xresources file). Dana Chee dana@thumper.bellcore.com *** cards.c.orr Tue Sep 4 12:54:30 1990 --- cards.c Tue Sep 4 12:54:49 1990 *************** *** 85,91 **** { card = (Card *) DynGet(theCardfile.cards,num); } ! } --- 85,91 ---- { card = (Card *) DynGet(theCardfile.cards,num); } ! return(card); } *** editor.c.orr Tue Sep 4 11:14:33 1990 --- editor.c Tue Sep 4 17:18:19 1990 *************** *** 126,132 **** "okEditor", commandWidgetClass, box, - XtNlabel,"Okay", NULL ); --- 126,131 ---- *************** *** 136,142 **** "cancelEditor", commandWidgetClass, box, - XtNlabel,"Cancel", NULL ); --- 135,140 ---- *************** *** 223,229 **** { char *text; ! XtVaGetValues(editorTextWidget,"string",&text); return text; } --- 221,227 ---- { char *text; ! XtVaGetValues(editorTextWidget,"string",&text,NULL); return text; } *** headers.c.orr Tue Sep 4 11:36:05 1990 --- headers.c Tue Sep 4 17:18:43 1990 *************** *** 37,43 **** static int countReturns(string,end) char *string; ! int end; { int pos = 0; int count = 0; --- 37,43 ---- static int countReturns(string,end) char *string; ! XawTextPosition end; { int pos = 0; int count = 0; *************** *** 95,101 **** static void highlightLine(lineNum) { - int pos; char *text; int start,end; --- 95,100 ---- *************** *** 139,144 **** --- 138,144 ---- int num; XawTextPosition start,end; char *numstr; + void saveCurrCard(), setHeaderArea(), setCardEditorText(); /* * Save the current text in the editor into the card *************** *** 206,212 **** asciiTextWidgetClass, parent, XtNeditType,XawtextRead, - XtNheight,200, XtNselectTypes,selectionArray, XtNscrollVertical,XawtextScrollAlways, NULL --- 206,211 ---- *************** *** 252,258 **** void updateCardHeaderList() { int pos=0; - char temp[100]; if (setCurrentCard(FIRSTCARD)) { --- 251,256 ---- *** menu.c.orr Tue Sep 4 13:33:38 1990 --- menu.c Tue Sep 4 17:26:10 1990 *************** *** 122,128 **** ! static addCardDialogHandler(header,status) char *header; int status; { --- 122,128 ---- ! static void addCardDialogHandler(header,status) char *header; int status; { *************** *** 493,500 **** "about", commandWidgetClass, menuArea, - XtNlabel,"about", - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 493,498 ---- *************** *** 510,518 **** "file", menuButtonWidgetClass, menuArea, - XtNlabel,"file", - XtNshapeStyle,XmuShapeEllipse, - XtNwidth,XCARD_BUTTON_WIDTH, NULL ); --- 508,513 ---- *************** *** 528,534 **** "save", smeBSBObjectClass, menu, - XtNlabel,"Save the CardFile", NULL ); --- 523,528 ---- *************** *** 546,552 **** "load", smeBSBObjectClass, menu, - XtNlabel,"Load New CardFile", NULL ); --- 540,545 ---- *************** *** 556,562 **** "merge", smeBSBObjectClass, menu, - XtNlabel,"Merge in another CardFile", NULL ); --- 549,554 ---- *************** *** 574,580 **** "template", smeBSBObjectClass, menu, - XtNlabel,"Edit Template", NULL ); --- 566,571 ---- *************** *** 609,615 **** "quit", smeBSBObjectClass, menu, - XtNlabel,"Quit XCard", NULL ); --- 600,605 ---- *************** *** 627,635 **** "searchMenu", menuButtonWidgetClass, menuArea, - XtNlabel,"Search", - XtNwidth,XCARD_BUTTON_WIDTH, - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 617,622 ---- *************** *** 644,650 **** "newsearch", smeBSBObjectClass, menu, - XtNlabel,"Start New Search", NULL ); --- 631,636 ---- *************** *** 662,668 **** "nextsearch", smeBSBObjectClass, menu, - XtNlabel,"Search For Next", NULL ); --- 648,653 ---- *************** *** 679,687 **** "cardMenu", menuButtonWidgetClass, menuArea, - XtNlabel,"Card", - XtNwidth,XCARD_BUTTON_WIDTH, - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 664,669 ---- *************** *** 697,703 **** "nextcard", smeBSBObjectClass, menu, - XtNlabel,"Next Card", NULL ); --- 679,684 ---- *************** *** 707,713 **** "prevcard", smeBSBObjectClass, menu, - XtNlabel,"Previous Card", NULL ); --- 688,693 ---- *************** *** 724,730 **** "firstcard", smeBSBObjectClass, menu, - XtNlabel,"First Card", NULL ); --- 704,709 ---- *************** *** 734,740 **** "lastcard", smeBSBObjectClass, menu, - XtNlabel,"Last Card", NULL ); --- 713,718 ---- *************** *** 751,757 **** "addcard", smeBSBObjectClass, menu, - XtNlabel,"Add New Card", NULL ); --- 729,734 ---- *************** *** 761,767 **** "deletecard", smeBSBObjectClass, menu, - XtNlabel,"Delete Selected Card", NULL ); --- 738,743 ---- *************** *** 778,784 **** "saveAscii", smeBSBObjectClass, menu, - XtNlabel,"Save Card to ASCII file.", NULL ); --- 754,759 ---- *************** *** 788,794 **** "savecard", smeBSBObjectClass, menu, - XtNlabel,"Load Card from ASCII file.", NULL ); --- 763,768 ---- *************** *** 807,815 **** "sortMenu", menuButtonWidgetClass, menuArea, - XtNlabel,"Sort", - XtNwidth,XCARD_BUTTON_WIDTH, - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 781,786 ---- *************** *** 825,831 **** "ascendingOrder", smeBSBObjectClass, menu, - XtNlabel,"Ascending Order", NULL ); --- 796,801 ---- *************** *** 835,841 **** "descendingOrder", smeBSBObjectClass, menu, - XtNlabel,"Descending Order", NULL ); --- 805,810 ---- *************** *** 852,859 **** "prevCard", commandWidgetClass, menuArea, - XtNshapeStyle,XmuShapeEllipse, - XtNlabel,"<-", NULL ); XtAddCallback(button,XtNcallback,CBprevButton,NULL); --- 821,826 ---- *************** *** 863,870 **** "nextCard", commandWidgetClass, menuArea, - XtNshapeStyle,XmuShapeEllipse, - XtNlabel,"->", NULL ); XtAddCallback(button,XtNcallback,CBnextButton,NULL); --- 830,835 ---- *** search.c.orr Tue Sep 4 13:27:41 1990 --- search.c Tue Sep 4 17:14:43 1990 *************** *** 167,173 **** searchPopup = XtCreatePopupShell( "searchPopup", transientShellWidgetClass, ! toplevel, NULL, 0 ); --- 167,173 ---- searchPopup = XtCreatePopupShell( "searchPopup", transientShellWidgetClass, ! parent, NULL, 0 ); *************** *** 184,190 **** labelWidgetClass, form, XtNborderWidth,0, - XtNlabel,"Search For: ", NULL ); --- 184,189 ---- *************** *** 193,199 **** asciiTextWidgetClass, form, XtNfromHoriz,label, - XtNwidth,400, XtNeditType,XawtextEdit, NULL ); --- 192,197 ---- *************** *** 207,215 **** toggleWidgetClass, form, XtNfromVert,label, - XtNlabel,"In Header", XtNstate,TRUE, - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 205,211 ---- *************** *** 220,228 **** form, XtNfromHoriz,whereRadioGroup, XtNfromVert,label, - XtNlabel,"In Body", XtNstate,FALSE, - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 216,222 ---- *************** *** 234,242 **** toggleWidgetClass, form, XtNfromVert,whereRadioGroup, - XtNlabel,"Backward", XtNvalue,TRUE, - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 228,234 ---- *************** *** 246,254 **** form, XtNfromHoriz,directionRadioGroup, XtNfromVert,whereRadioGroup, - XtNlabel,"Forward", XtNvalue,FALSE, - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 238,244 ---- *************** *** 265,272 **** commandWidgetClass, form, XtNfromVert,directionRadioGroup, - XtNlabel,"Cancel", - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 255,260 ---- *************** *** 280,287 **** form, XtNfromVert,directionRadioGroup, XtNfromHoriz,cancelButton, - XtNlabel,"Search", - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 268,273 ---- *************** *** 345,351 **** char *wanted; { int result = FALSE; - char *matchAgainst; while (!result && setCurrentCard(searchDirection())) { --- 331,336 ---- *** strdup.c.orr Tue Sep 4 13:29:19 1990 --- strdup.c Tue Sep 4 13:29:35 1990 *************** *** 19,24 **** --- 19,25 ---- char *strdup(old_str) + char *old_str; { char *new_str; *** xmsg.c.orr Tue Sep 4 11:14:41 1990 --- xmsg.c Tue Sep 4 17:11:28 1990 *************** *** 55,61 **** { char *string; ! XtVaGetValues(popupDialogText,"string",&string); XtPopdown(popupDialogWidget); if (dialogAction != NULL) { --- 55,61 ---- { char *string; ! XtVaGetValues(popupDialogText,"string",&string,NULL); XtPopdown(popupDialogWidget); if (dialogAction != NULL) { *************** *** 72,78 **** { char *string; ! XtVaGetValues(popupDialogText,"string",&string); XtPopdown(popupDialogWidget); if (dialogAction != NULL) { --- 72,78 ---- { char *string; ! XtVaGetValues(popupDialogText,"string",&string,NULL); XtPopdown(popupDialogWidget); if (dialogAction != NULL) { *************** *** 135,142 **** commandWidgetClass, form, XtNfromVert,dismissableMessageLabel, - XtNlabel,"Dismiss", - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 135,140 ---- *************** *** 177,183 **** "dialogPopupText", asciiTextWidgetClass, form, - XtNwidth,400, XtNeditType,XawtextEdit, XtNfromHoriz,popupDialogLabel, NULL --- 175,180 ---- *************** *** 198,205 **** commandWidgetClass, form, XtNfromVert,dismissableMessageLabel, - XtNlabel,"Cancel", - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 195,200 ---- *************** *** 211,218 **** form, XtNfromVert,dismissableMessageLabel, XtNfromHoriz,cancelButton, - XtNlabel,"Ok", - XtNshapeStyle,XmuShapeEllipse, NULL ); --- 206,211 ---- *** xui.c.orr Tue Sep 4 10:54:31 1990 --- xui.c Tue Sep 4 17:26:56 1990 *************** *** 40,46 **** void Syntax(call) char *call; { ! printf("Usage: %s -toolkit_option cardfile\n\n"); } --- 40,46 ---- void Syntax(call) char *call; { ! printf("Usage: %s -toolkit_option cardfile\n\n", call); } *************** *** 90,96 **** toplevel = XtInitialize( argv[0], ! (char *)xcard_version(), NULL, 0, argc, --- 90,97 ---- toplevel = XtInitialize( argv[0], ! "XCard", ! /*(char *)xcard_version(),*/ NULL, 0, argc, *************** *** 110,118 **** */ ! Widget buildXCardInterface(argc,argv) ! int argc; ! char **argv; { void addMenuArea(), addCardHeaderListArea(); Widget pane,pane2; --- 111,117 ---- */ ! Widget buildXCardInterface() { void addMenuArea(), addCardHeaderListArea(); Widget pane,pane2; *************** *** 122,128 **** "bigPane", panedWidgetClass, toplevel, - XtNwidth,563, NULL ); addCardHeaderListArea(pane); --- 121,126 ---- *************** *** 130,137 **** "subPane", panedWidgetClass, pane, - XtNshowGrip,TRUE, - XtNwidth,563, NULL ); XawPanedAllowResize(pane2,TRUE); --- 128,133 ---- *************** *** 143,151 **** setHeaderArea(headerCurrentCard()); setCardEditorText(bodyCurrentCard()); ! addSearchPopup(); ! addMessagePopups(); ! buildPopupEditor(); } --- 139,148 ---- setHeaderArea(headerCurrentCard()); setCardEditorText(bodyCurrentCard()); ! addSearchPopup(toplevel); ! addMessagePopups(toplevel); ! buildPopupEditor(toplevel); ! return(pane); }
dana@dino.bellcore.com (Dana A. Chee) (09/14/90)
Since Ken sent my patch out, I thought I'd send out the remainder of the stuff, especially the XCard.ad file, since after removing the hardcoded resources, you will want it. The following shar contains the Imakefiles for xcard and dynobj, and the XCard.ad file. #! /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 1)." # Contents: Imakefile XCard.ad dynobj/Imakefile # Wrapped by dana@dino on Tue Sep 11 10:00:45 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'\" \(997 characters\) sed "s/^X//" >'Imakefile' <<'END_OF_FILE' X#define IHaveSubdirs X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' X X DIST = 1.0 X DYNOBJ = dynobj X EXTRA_INCLUDES = -I$(DYNOBJ) X LOCAL_LIBRARIES = $(DYNOBJ)/libdyn.a $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) X DEPLIBS = $(DYNOBJ)/libdyn.a X SUBDIRS = $(DYNOBJ) X X OBJS = cards.o xcard.o strdup.o strtrim.o xui.o menu.o headers.o \ X editbody.o xmisc.o search.o strstr.o xmsg.o editor.o X SRCS = cards.c xcard.c strdup.c strtrim.c xui.c menu.c headers.c \ X editbody.c xmisc.c search.c strstr.c xmsg.c editor.c X XMakeSubdirs($(SUBDIRS)) XDependSubdirs($(SUBDIRS)) X XComplexProgramTarget(xcard) X XInstallAppDefaults(XCard) X Xdist: X cp *.c ../xcard$(DIST)/ X cp *.h ../xcard$(DIST)/ X cp Makefile.noIm ../xcard$(DIST)/ X cp xcard.icon ../xcard$(DIST)/ X cp xcard.man ../xcard$(DIST)/ X cp README ../xcard$(DIST)/ X cp COPYRIGHT ../xcard$(DIST)/ X cp ToDo.cf ../xcard$(DIST)/ X cp -r dynobj ../xcard$(DIST)/ END_OF_FILE if test 997 -ne `wc -c <'Imakefile'`; then echo shar: \"'Imakefile'\" unpacked with wrong size! fi # end of 'Imakefile' fi if test -f 'XCard.ad' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'XCard.ad'\" else echo shar: Extracting \"'XCard.ad'\" \(1445 characters\) sed "s/^X//" >'XCard.ad' <<'END_OF_FILE' X*ShapeStyle: ShapeEllipse X*bigPane.width: 563 X*subPane.width: 563 X*subPane.showGrip: TRUE X*dismissButton.label: Dismiss X*dialogPopupText.width: 400 X*cancelDialogButton.label: Cancel X*okayDialogButton.label: Ok X*searchLabel.label: Search For: X*searchTextWidget.width: 400 X*inHeader.label: In Header X*inBody.label: In Body X*goBack.label: Backward X*goForward.label: Forward X*cancelSearch.label: Cancel X*doTheSearch.label: Search X*headerTitleArea.width: 390 X*bodyEditor.height: 300 X*okEditor.label: Okay X*cancelEditor.label: Cancel X*editorTextWidget.width: X*editorTextWidget.height: X*headerList.height: 200 X*about.label: about X*file.label: file X*file.width: 60 X*save.label: Save the CardFile X*load.label: Load New CardFile X*merge.label: Merge in another CardFile X*template.label: Edit Template X*aboutCardfile.label: About Cardfile X*quit.label: Quit XCard X*searchMenu.label: Search X*searchMenu.width: 60 X*newsearch.label: Start New Search X*nextsearch.label: Search For Next X*cardMenu.label: Card X*cardMenu.width: 60 X*nextcard.label: Next Card X*prevcard.label: Previous Card X*firstcard.label: First Card X*lastcard.label: Last Card X*addcard.label: Add New Card X*deletecard.label: Delete Selected Card X*saveAscii.label: Save Card to ASCII file. X*savecard.label: Load Card from ASCII file. X*sortMenu.label: Sort X*sortMenu.width: 60 X*ascendingOrder.label: Ascending Order X*descendingOrder.label: Descending Order X*prevCard.label: <- X*nextCard.label: -> END_OF_FILE if test 1445 -ne `wc -c <'XCard.ad'`; then echo shar: \"'XCard.ad'\" unpacked with wrong size! fi # end of 'XCard.ad' fi if test -f 'dynobj/Imakefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'dynobj/Imakefile'\" else echo shar: Extracting \"'dynobj/Imakefile'\" \(1183 characters\) sed "s/^X//" >'dynobj/Imakefile' <<'END_OF_FILE' X/**/# This file is part of libdyn.a, the C Dynamic Object library. It X/**/# contains the Imakefile. X/**/# X/**/# There are no restrictions on this code; however, if you make any X/**/# changes, I request that you document them so that I do not get X/**/# credit or blame for your modifications. X/**/# X/**/# Written by Barr3y Jaspan, Student Information Processing Board (SIPB) X/**/# and MIT-Project Athena, 1989. X/**/# X/**/# This Imakefile was written by Dana Chee, Bellcore, Morristown NJ X X STD_DEFINES = LibraryDefines X CDEBUGFLAGS = LibraryCDebugFlags X INSTALLFLAGS = $(INSTINCFLAGS) X LINTLIBS = $(LINTXLIB) X X SRCS = dyn_create.c dyn_put.c dyn_debug.c dyn_delete.c dyn_size.c \ X dyn_append.c dyn_realloc.c dyn_paranoid.c dyn_insert.c X OBJS = dyn_create.o dyn_put.o dyn_debug.o dyn_delete.o dyn_size.o \ X dyn_append.o dyn_realloc.o dyn_paranoid.o dyn_insert.o X HDRS = dyn.h dynP.h X XNormalLibraryTarget(dyn,$(OBJS)) XLintLibraryTarget(dyn,$(SRCS)) XInstallLibrary(dyn,$(USRLIBDIR)) XInstallLintLibrary(dyn,$(LINTLIBDIR)) XInstallMultiple($(HDRS),$(INCDIR)) XDependTarget() X Xtest: $(DEST) test.o X $(CC) -o test test.o $(DEST) END_OF_FILE if test 1183 -ne `wc -c <'dynobj/Imakefile'`; then echo shar: \"'dynobj/Imakefile'\" unpacked with wrong size! fi # end of 'dynobj/Imakefile' fi echo shar: End of archive 1 \(of 1\). cp /dev/null ark1isdone MISSING="" for I in 1 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have the archive. 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