Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!mips!bridge2!jarthur!watson!ssdken From: ssdken@watson.Claremont.EDU (Ken Nelson) Newsgroups: comp.windows.x Subject: Attetion XCard users (Patch Included) Message-ID: <8375@jarthur.Claremont.EDU> Date: 13 Sep 90 21:53:32 GMT Sender: news@jarthur.Claremont.EDU Reply-To: ssdken@watson.Claremont.EDU (Ken Nelson) Lines: 745 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); }