diff -urNP ../siag-3.3.5/ChangeLog ./ChangeLog --- ../siag-3.3.5/ChangeLog Sat May 6 09:12:24 2000 +++ ./ChangeLog Tue May 16 11:28:57 2000 @@ -1,4 +1,29 @@ +000516 Replaced ~/.siag/applications.scm with ~/.siag/applications.sh, + which is used also by XedPlus, XFiler et al. This way all + applications use the same terminal, same help browser and so on. + German translation updated by Theodor Willax. + Released 3.3.6. + +000515 Siag, PW, Egon: Added setlocale(LC_NUMERIC, "C") at the top + of realmain(). Takes care of colour printing problems. + +000511 Tsiag: #include in window.c. + Danish translation updated by Birger Lankjer. + +000509 Updated Ruler drawing. + Let Richtext widget update Ruler resources. + New script siagrun is a "master-helper" for viewer, lpr, + editor, help, filer, terminal and calculator. + +000508 Rewrote Nws' copy of Vendor.c so everything is called NwsVendor + et al instead. Discovered by Gabor Z Papp . + Added a note in INSTALL for Linux users to run /sbin/ldconfig. + +000507 PW: tab stops were off when the Richtext widget was scrolled + sideways. + PW: resized to 640x420. + 000506 Tsiag: removed tsiag/selection.c and tsiag/forminput.c. Rewrote Image widget to redisplay more efficiently, including the timeout hack used in Richtext and Table. diff -urNP ../siag-3.3.5/INSTALL ./INSTALL --- ../siag-3.3.5/INSTALL Tue Apr 11 23:34:40 2000 +++ ./INSTALL Tue May 9 11:45:31 2000 @@ -15,6 +15,10 @@ make make install +4. Linux users: + + /sbin/ldconfig + Done. Take it for a test drive. Try some of the examples. The names of the programs are siag, pw and egon. @@ -25,6 +29,16 @@ The tarball includes the sources for Ed Falk's widget library XawM. The library is only built if it doesn't already exist on the system. +It is by default installed in /usr/local/lib. If the library can't +be found, it is probably because /usr/local/lib isn't listed in +/etc/ld.so.conf or because you didn't run /sbin/ldconfig (Linux +users). + +The executables are by default installed in /usr/local/bin. It is +important that this directory is in your PATH, for example by adding +this line to the file /etc/profile: + +PATH="/usr/local/bin:$PATH"; export PATH To get support for the ndbm database library or the programming diff -urNP ../siag-3.3.5/Nws/Makefile.am ./Nws/Makefile.am --- ../siag-3.3.5/Nws/Makefile.am Mon Mar 27 19:50:14 2000 +++ ./Nws/Makefile.am Mon May 8 10:11:56 2000 @@ -58,7 +58,9 @@ SubMEP.h \ Traverse.c \ Traverse.h \ - Vendor.c \ + NwsVendor.c \ + NwsVendor.h \ + NwsVendorP.h \ cvt.c \ cvt.h \ dimdefP.h \ @@ -137,6 +139,7 @@ ## TreeList.c \ ## TreeList.h \ ## TreeListP.h \ + EXTRA_DIST = \ mc2off.xpm \ diff -urNP ../siag-3.3.5/Nws/Makefile.in ./Nws/Makefile.in --- ../siag-3.3.5/Nws/Makefile.in Sat May 6 09:25:04 2000 +++ ./Nws/Makefile.in Tue May 16 11:46:35 2000 @@ -89,7 +89,7 @@ noinst_LIBRARIES = libNws.a -libNws_a_SOURCES = Base.c Base.h BaseP.h BaseME.c BaseME.h BaseMEP.h BaseComp.c BaseComp.h BaseCompP.h BaseConst.c BaseConst.h BaseConstP.h Button.c Button.h ButtonP.h CheckME.c CheckME.h CheckMEP.h Init.h LabelME.c LabelME.h LabelMEP.h LineME.c LineME.h LineMEP.h MBButton.c MBButton.h MBButtonP.h Menu.c Menu.h MenuBar.c MenuBar.h MenuBarP.h MenuButton.c MenuButton.h MenuButtonP.h MenuP.h PopText.c PopText.h PopTextP.h Row.c Row.h RowP.h SButton.c SButton.h SButtonP.h SubME.c SubME.h SubMEP.h Traverse.c Traverse.h Vendor.c cvt.c cvt.h dimdefP.h misc.c misc.h utils.c utils.h +libNws_a_SOURCES = Base.c Base.h BaseP.h BaseME.c BaseME.h BaseMEP.h BaseComp.c BaseComp.h BaseCompP.h BaseConst.c BaseConst.h BaseConstP.h Button.c Button.h ButtonP.h CheckME.c CheckME.h CheckMEP.h Init.h LabelME.c LabelME.h LabelMEP.h LineME.c LineME.h LineMEP.h MBButton.c MBButton.h MBButtonP.h Menu.c Menu.h MenuBar.c MenuBar.h MenuBarP.h MenuButton.c MenuButton.h MenuButtonP.h MenuP.h PopText.c PopText.h PopTextP.h Row.c Row.h RowP.h SButton.c SButton.h SButtonP.h SubME.c SubME.h SubMEP.h Traverse.c Traverse.h NwsVendor.c NwsVendor.h NwsVendorP.h cvt.c cvt.h dimdefP.h misc.c misc.h utils.c utils.h # Deleted @@ -116,7 +116,7 @@ libNws_a_LIBADD = libNws_a_OBJECTS = Base.o BaseME.o BaseComp.o BaseConst.o Button.o \ CheckME.o LabelME.o LineME.o MBButton.o Menu.o MenuBar.o MenuButton.o \ -PopText.o Row.o SButton.o SubME.o Traverse.o Vendor.o cvt.o misc.o \ +PopText.o Row.o SButton.o SubME.o Traverse.o NwsVendor.o cvt.o misc.o \ utils.o AR = ar CFLAGS = @CFLAGS@ @@ -248,6 +248,7 @@ BaseMEP.h BaseME.h LabelME.h MBButton.h MenuButton.o: MenuButton.c MenuButtonP.h ButtonP.h SButtonP.h BaseP.h \ Base.h cvt.h dimdefP.h SButton.h Button.h MenuButton.h Init.h +NwsVendor.o: NwsVendor.c NwsVendor.h NwsVendorP.h PopText.o: PopText.c PopTextP.h PopText.h Init.h misc.h Row.o: Row.c RowP.h BaseConstP.h BaseConst.h cvt.h dimdefP.h Row.h \ Init.h misc.h Traverse.h @@ -258,7 +259,6 @@ trion.xpm trioff.xpm Traverse.o: Traverse.c Traverse.h BaseConstP.h BaseConst.h cvt.h \ dimdefP.h BaseCompP.h BaseComp.h -Vendor.o: Vendor.c cvt.o: cvt.c cvt.h misc.o: misc.c misc.h utils.o: utils.c utils.h cvt.h BaseMEP.h BaseME.h dimdefP.h diff -urNP ../siag-3.3.5/Nws/NwsVendor.c ./Nws/NwsVendor.c --- ../siag-3.3.5/Nws/NwsVendor.c Thu Jan 1 01:00:00 1970 +++ ./Nws/NwsVendor.c Mon May 8 10:16:28 2000 @@ -0,0 +1,197 @@ +/* $XConsortium: NwsVendor.c,v 1.21 91/07/30 15:29:56 rws Exp $ */ + +/*********************************************************** +Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, +and the Massachusetts Institute of Technology, Cambridge, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Digital or MIT not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* + * This is a copy of Xt/Vendor.c with an additional ClassInitialize + * procedure to register Xmu resource type converters. + * + */ + +/* Make sure all wm properties can make it out of the resource manager */ + +/* I stole this from Xaw sources */ + +#include + +#include +#include +#include +#include +#include "NwsVendor.h" +#include "NwsVendorP.h" +#include +#include + +static XtResource resources[] = { + {XtNinput, XtCInput, XtRBool, sizeof(Bool), + XtOffsetOf(NwsVendorShellRec, wm.wm_hints.input), + XtRImmediate, (XtPointer)True} +}; + +/*************************************************************************** + * + * NwsVendor shell class record + * + ***************************************************************************/ + +static void NwsVendorShellClassInitialize(); +static void NwsVendorShellInitialize(); +static void ChangeManaged(); +static XtGeometryResult QueryGeometry(); + +#define SuperClass (&wmShellClassRec) +externaldef(nwsVendorshellclassrec) NwsVendorShellClassRec nwsVendorShellClassRec = { + { + /* superclass */ (WidgetClass)SuperClass, + /* class_name */ "NwsVendorShell", + /* size */ sizeof(NwsVendorShellRec), + /* class_initialize */ NwsVendorShellClassInitialize, + /* class_part_initialize*/ NULL, + /* Class init'ed ? */ FALSE, + /* initialize */ NwsVendorShellInitialize, + /* initialize_hook */ NULL, + /* realize */ XtInheritRealize, + /* actions */ NULL, + /* num_actions */ 0, + /* resources */ resources, + /* resource_count */ XtNumber(resources), + /* xrm_class */ NULLQUARK, + /* compress_motion */ FALSE, + /* compress_exposure */ TRUE, + /* compress_enterleave*/ FALSE, + /* visible_interest */ FALSE, + /* destroy */ NULL, + /* resize */ XtInheritResize, + /* expose */ NULL, + /* set_values */ NULL, + /* set_values_hook */ NULL, + /* set_values_almost */ XtInheritSetValuesAlmost, + /* get_values_hook */ NULL, + /* accept_focus */ NULL, + /* intrinsics version */ XtVersion, + /* callback offsets */ NULL, + /* tm_table */ NULL, + /* query_geometry */ QueryGeometry, + /* display_accelerator*/ NULL, + /* extension */ NULL + },{ + /* geometry_manager */ XtInheritGeometryManager, + /* change_managed */ ChangeManaged, + /* insert_child */ XtInheritInsertChild, + /* delete_child */ XtInheritDeleteChild, + /* extension */ NULL + },{ + /* extension */ NULL + },{ + /* extension */ NULL + },{ + /* extension */ NULL + } +}; + +externaldef(nwsVendorshellwidgetclass) WidgetClass nwsVendorShellWidgetClass = + (WidgetClass) (&nwsVendorShellClassRec); + +static void NwsVendorShellClassInitialize() +{ + static XtConvertArgRec screenConvertArg[] = { + {XtWidgetBaseOffset, (XtPointer) XtOffsetOf(WidgetRec, core.screen), + sizeof(Screen *)} + }; + + XtAddConverter(XtRString, XtRCursor, XmuCvtStringToCursor, + screenConvertArg, XtNumber(screenConvertArg)); + + XtAddConverter(XtRString, XtRBitmap, XmuCvtStringToBitmap, + screenConvertArg, XtNumber(screenConvertArg)); +} + +/* ARGSUSED */ +static void NwsVendorShellInitialize(req, new) + Widget req, new; +{ + XtAddEventHandler(new, (EventMask) 0, TRUE, _XEditResCheckMessages, NULL); +} + +static void ChangeManaged(wid) +Widget wid; +{ + ShellWidget w = (ShellWidget) wid; + Widget* childP; + int i; + XtWidgetGeometry intended , preferred; + + (*SuperClass->composite_class.change_managed)(wid); + for (i = w->composite.num_children, childP = w->composite.children; + i; i--, childP++) { + if (XtIsManaged(*childP)) { + XtSetKeyboardFocus(wid, *childP); + break; + } + } + + if (w->composite.num_children) + { + preferred.request_mode = CWWidth | CWHeight; + preferred.width = w->core.width; + preferred.height = w->core.height; + + intended.request_mode = CWWidth | CWHeight; + intended.width = w->core.width; + intended.height = w->core.height; + + XtQueryGeometry(w->composite.children[0] , &intended , &preferred); + + if (!preferred.width) preferred.width = 30; + if (!preferred.height) preferred.height = 30; + + XtResizeWidget(wid , preferred.width , preferred.height , w->core.border_width); + } +} + +static XtGeometryResult QueryGeometry(w, intended , preferred) +Widget w; +XtWidgetGeometry *intended; +XtWidgetGeometry *preferred; +{ + ShellWidget cw = (ShellWidget)w; + + if (cw->composite.num_children) + { + XtQueryGeometry(cw->composite.children[0] , intended , preferred); + } + return XtGeometryAlmost; +} + +void _InitializeWidgetSet () +{ + static int firsttime = 1; + + if (firsttime) { + firsttime = 0; + XtInitializeWidgetClass (nwsVendorShellWidgetClass); + } +} diff -urNP ../siag-3.3.5/Nws/NwsVendor.h ./Nws/NwsVendor.h --- ../siag-3.3.5/Nws/NwsVendor.h Thu Jan 1 01:00:00 1970 +++ ./Nws/NwsVendor.h Mon May 8 10:14:08 2000 @@ -0,0 +1,70 @@ +/* +* $XConsortium: NwsVendor.h,v 1.13 94/04/17 20:15:04 jim Exp $ +* $oHeader: NwsVendor.h,v 1.2 88/08/18 15:56:44 asente Exp $ +*/ + +/*********************************************************** + +Copyright (c) 1987, 1988 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifndef _XtNwsVendor_h +#define _XtNwsVendor_h + +/*********************************************************************** + * + * NwsVendorShell Widget + * + ***********************************************************************/ + +/* Class record constants */ + +typedef struct _NwsVendorShellClassRec *NwsVendorShellWidgetClass; + +externalref WidgetClass nwsVendorShellWidgetClass; + +#endif /* _XtNwsVendor_h */ +/* DON'T ADD STUFF AFTER THIS #endif */ diff -urNP ../siag-3.3.5/Nws/NwsVendorP.h ./Nws/NwsVendorP.h --- ../siag-3.3.5/Nws/NwsVendorP.h Thu Jan 1 01:00:00 1970 +++ ./Nws/NwsVendorP.h Mon May 8 10:14:51 2000 @@ -0,0 +1,104 @@ +/* +* $XConsortium: NwsVendorP.h,v 1.21 94/04/17 20:15:05 swick Exp $ +* $oHeader: NwsVendorP.h,v 1.2 88/08/18 15:56:48 asente Exp $ +*/ + +/*********************************************************** + +Copyright (c) 1987, 1988 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + + +Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* + * NwsVendorP.h - Private definitions for NwsVendorShell widget + * + * Author: Paul Asente + * Digital Equipment Corporation + * Western Software Laboratory + * Date: Thu Dec 3, 1987 + */ + +/*********************************************************************** + * + * NwsVendorShell Widget Private Data + * + ***********************************************************************/ + +#ifndef _XtNwsVendorPrivate_h +#define _XtNwsVendorPrivate_h + +#include "NwsVendor.h" + +/* New fields for the NwsVendorShell widget class record */ + +typedef struct { + XtPointer extension; /* pointer to extension record */ +} NwsVendorShellClassPart; + +typedef struct _NwsVendorShellClassRec { + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; + NwsVendorShellClassPart nwsVendor_shell_class; +} NwsVendorShellClassRec; + +externalref NwsVendorShellClassRec nwsVendorShellClassRec; + +/* New fields for the nwsVendor shell widget. */ + +typedef struct { + int nwsVendor_specific; +} NwsVendorShellPart; + +typedef struct { + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + NwsVendorShellPart nwsVendor; +} NwsVendorShellRec, *NwsVendorShellWidget; + +#endif /* _XtNwsVendorPrivate_h */ diff -urNP ../siag-3.3.5/Nws/Vendor.c ./Nws/Vendor.c --- ../siag-3.3.5/Nws/Vendor.c Sun Feb 14 16:48:53 1999 +++ ./Nws/Vendor.c Thu Jan 1 01:00:00 1970 @@ -1,197 +0,0 @@ -/* $XConsortium: Vendor.c,v 1.21 91/07/30 15:29:56 rws Exp $ */ - -/*********************************************************** -Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, -and the Massachusetts Institute of Technology, Cambridge, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the names of Digital or MIT not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -/* - * This is a copy of Xt/Vendor.c with an additional ClassInitialize - * procedure to register Xmu resource type converters. - * - */ - -/* Make sure all wm properties can make it out of the resource manager */ - -/* I stole this from Xaw sources */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static XtResource resources[] = { - {XtNinput, XtCInput, XtRBool, sizeof(Bool), - XtOffsetOf(VendorShellRec, wm.wm_hints.input), - XtRImmediate, (XtPointer)True} -}; - -/*************************************************************************** - * - * Vendor shell class record - * - ***************************************************************************/ - -static void VendorShellClassInitialize(); -static void VendorShellInitialize(); -static void ChangeManaged(); -static XtGeometryResult QueryGeometry(); - -#define SuperClass (&wmShellClassRec) -externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { - { - /* superclass */ (WidgetClass)SuperClass, - /* class_name */ "VendorShell", - /* size */ sizeof(VendorShellRec), - /* class_initialize */ VendorShellClassInitialize, - /* class_part_initialize*/ NULL, - /* Class init'ed ? */ FALSE, - /* initialize */ VendorShellInitialize, - /* initialize_hook */ NULL, - /* realize */ XtInheritRealize, - /* actions */ NULL, - /* num_actions */ 0, - /* resources */ resources, - /* resource_count */ XtNumber(resources), - /* xrm_class */ NULLQUARK, - /* compress_motion */ FALSE, - /* compress_exposure */ TRUE, - /* compress_enterleave*/ FALSE, - /* visible_interest */ FALSE, - /* destroy */ NULL, - /* resize */ XtInheritResize, - /* expose */ NULL, - /* set_values */ NULL, - /* set_values_hook */ NULL, - /* set_values_almost */ XtInheritSetValuesAlmost, - /* get_values_hook */ NULL, - /* accept_focus */ NULL, - /* intrinsics version */ XtVersion, - /* callback offsets */ NULL, - /* tm_table */ NULL, - /* query_geometry */ QueryGeometry, - /* display_accelerator*/ NULL, - /* extension */ NULL - },{ - /* geometry_manager */ XtInheritGeometryManager, - /* change_managed */ ChangeManaged, - /* insert_child */ XtInheritInsertChild, - /* delete_child */ XtInheritDeleteChild, - /* extension */ NULL - },{ - /* extension */ NULL - },{ - /* extension */ NULL - },{ - /* extension */ NULL - } -}; - -externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = - (WidgetClass) (&vendorShellClassRec); - -static void VendorShellClassInitialize() -{ - static XtConvertArgRec screenConvertArg[] = { - {XtWidgetBaseOffset, (XtPointer) XtOffsetOf(WidgetRec, core.screen), - sizeof(Screen *)} - }; - - XtAddConverter(XtRString, XtRCursor, XmuCvtStringToCursor, - screenConvertArg, XtNumber(screenConvertArg)); - - XtAddConverter(XtRString, XtRBitmap, XmuCvtStringToBitmap, - screenConvertArg, XtNumber(screenConvertArg)); -} - -/* ARGSUSED */ -static void VendorShellInitialize(req, new) - Widget req, new; -{ - XtAddEventHandler(new, (EventMask) 0, TRUE, _XEditResCheckMessages, NULL); -} - -static void ChangeManaged(wid) -Widget wid; -{ - ShellWidget w = (ShellWidget) wid; - Widget* childP; - int i; - XtWidgetGeometry intended , preferred; - - (*SuperClass->composite_class.change_managed)(wid); - for (i = w->composite.num_children, childP = w->composite.children; - i; i--, childP++) { - if (XtIsManaged(*childP)) { - XtSetKeyboardFocus(wid, *childP); - break; - } - } - - if (w->composite.num_children) - { - preferred.request_mode = CWWidth | CWHeight; - preferred.width = w->core.width; - preferred.height = w->core.height; - - intended.request_mode = CWWidth | CWHeight; - intended.width = w->core.width; - intended.height = w->core.height; - - XtQueryGeometry(w->composite.children[0] , &intended , &preferred); - - if (!preferred.width) preferred.width = 30; - if (!preferred.height) preferred.height = 30; - - XtResizeWidget(wid , preferred.width , preferred.height , w->core.border_width); - } -} - -static XtGeometryResult QueryGeometry(w, intended , preferred) -Widget w; -XtWidgetGeometry *intended; -XtWidgetGeometry *preferred; -{ - ShellWidget cw = (ShellWidget)w; - - if (cw->composite.num_children) - { - XtQueryGeometry(cw->composite.children[0] , intended , preferred); - } - return XtGeometryAlmost; -} - -void _InitializeWidgetSet () -{ - static int firsttime = 1; - - if (firsttime) { - firsttime = 0; - XtInitializeWidgetClass (vendorShellWidgetClass); - } -} diff -urNP ../siag-3.3.5/TODO ./TODO --- ../siag-3.3.5/TODO Tue May 2 15:53:41 2000 +++ ./TODO Tue May 9 12:11:33 2000 @@ -1,91 +1,17 @@ - +New features for PW: + - Nicer looking ruler + - Tab stops + - Columns + - Layout view + - Undo + - Formula editor using TeX Plugins should go into $prefix/lib rather than $prefix/libexec in order to be FHS compliant. -What is needed to use Richtext standalone as a single line text -widget that can replace Textfield? The resources are: -+top_row: top row, default 1. No changes needed. -+top_col: top col, default 1. No changes needed. -+sel_top_row, sel_top_col, sel_bottom_row, sel_bottom_col: selection, -+ default 0 (no selection). No changes needed. -+point_row, point_col: default (0,0). Must be handled by widget. -+row_height: function which returns the height of a given row. -+ Must be set to a function that returns some dummy height. -+adj_horiz: function which returns the horizontal adjustment. -+ Must be set to a function which returns HADJ_LEFT. -+style: function which returns the style. Must be set to a -+ function which returns 0. -+bop: function which returns True if a line is a bop. Must be set -+ to a function which returns False. -+text: function which returns the text of a line (?). Must be set -+ to a function which returns the internally managed data. -+data: pointer to some arbitrary data, a window structure in PW's -+ case. Can be left as the default NULL -+redisplay: boolean which causes the widget to redraw itself when -+ set to True. No need to change. -+visible_cursor: boolean which causes the cursor to be drawn if True. -+ Should be True to be used as a text widget. -+paper_width: default is 595, but that is totally inappropriate. -+ Should probably be the widget width, or infinity, or something. -+left_margin: default is 72, but 0 seems much better. -+right_margin: ditto. -+tab_distance: the default 36 is just fine. -+plugin_coords: function which returns the coordinates of a plugin. -+ We're not going to have any, so this resource can be anything. -+zoom: this will be used exactly as in PW; the default 1.0 can be kept -+ unless we want to change it. -+In addition, SelfInsertChar should be returned to pw application code -+and replaced with one that operates on the widget's own data. -More actions must be written, e.g. to move the point. New functions -+RichtextSetString and RichtextGetString work as the Textfield -+equivalents and take plain C strings as arguments. -+A new resource called format specifies what format should be used for -+characters that are entered. Defaults to 0. Another resource, rc_string, -+stores the richtext string being edited. -It seems that this will result in a widget that does much of what -pw does already. It would be a good idea to integrate as much as -possible. Another good idea would be to replace all TextField widgets -with Richtext. - - -Siag: row and column headings are off. - -Since the TextField widget can't zoom, in-place editing in Siag will have -to be done using another widget. The Richtext widget is an obvious -candidate, but needs some work before it can be used as a general-purpose -text widget. - Zoom plugins, or at least images. -Replace applications.scm with applications.sh, which looks like: - -viewer=gvu -lpr=lpr -editor=kedit -help=kdehelp -filer=xfiler -terminal=konsole -calculator=kcalc - -Then create the program siagrun.sh, which looks like: - -#!/bin/sh -if [ ! -f $HOME/.siag/applications.sh ]; then - cat > $HOME/.siag/applications.sh << EOF -viewer=gvu -lpr=lpr -editor=xedplus -help=siaghelp -filer=xfiler -terminal=xterm -calculator=xcalc -EOF - -. $HOME/.siag/applications.sh - - Update fileio_html to deal with the features in xlHtml: - Convert HTML entities like   (should be done anyway) @@ -116,7 +42,7 @@ } Note: this does not take into account line wrapping, white space, adjustment, line height and so on. We'll graft that on later. - + PW: transfer control over the data from the application to the Richtext widget. This so that Richtext can be used on its own. diff -urNP ../siag-3.3.5/common/Makefile.am ./common/Makefile.am --- ../siag-3.3.5/common/Makefile.am Thu Apr 6 15:15:38 2000 +++ ./common/Makefile.am Tue May 9 12:05:59 2000 @@ -1,6 +1,8 @@ SUBDIRS = docs bitmaps +bin_SCRIPTS = siagrun + noinst_LIBRARIES = libcommon.a libcommon_a_SOURCES = cmalloc.c common.c richchar.c fonts.c globals.c ps.c diff -urNP ../siag-3.3.5/common/Makefile.in ./common/Makefile.in --- ../siag-3.3.5/common/Makefile.in Sat May 6 09:24:50 2000 +++ ./common/Makefile.in Tue May 16 11:46:11 2000 @@ -85,6 +85,8 @@ SUBDIRS = docs bitmaps +bin_SCRIPTS = siagrun + noinst_LIBRARIES = libcommon.a libcommon_a_SOURCES = cmalloc.c common.c richchar.c fonts.c globals.c ps.c @@ -123,7 +125,7 @@ libcommon_a_OBJECTS = cmalloc.o common.o richchar.o fonts.o globals.o \ ps.o AR = ar -SCRIPTS = $(common_SCRIPTS) +SCRIPTS = $(bin_SCRIPTS) $(common_SCRIPTS) CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -187,6 +189,25 @@ $(AR) cru libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD) $(RANLIB) libcommon.a +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + else :; fi; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + list='$(bin_SCRIPTS)'; for p in $$list; do \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ + done + install-commonSCRIPTS: $(common_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(commondir) @@ -354,7 +375,7 @@ check: check-recursive installcheck-am: installcheck: installcheck-recursive -install-exec-am: +install-exec-am: install-binSCRIPTS install-exec: install-exec-recursive install-data-am: install-commonSCRIPTS install-commonDATA @@ -363,7 +384,8 @@ install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive -uninstall-am: uninstall-commonSCRIPTS uninstall-commonDATA +uninstall-am: uninstall-binSCRIPTS uninstall-commonSCRIPTS \ + uninstall-commonDATA uninstall: uninstall-recursive all-am: Makefile $(LIBRARIES) $(SCRIPTS) $(DATA) $(HEADERS) all-redirect: all-recursive @@ -371,7 +393,8 @@ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(commondir) $(DESTDIR)$(commondir) + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(commondir) \ + $(DESTDIR)$(commondir) mostlyclean-generic: @@ -410,12 +433,13 @@ .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ mostlyclean-compile distclean-compile clean-compile \ -maintainer-clean-compile uninstall-commonSCRIPTS install-commonSCRIPTS \ -uninstall-commonDATA install-commonDATA install-data-recursive \ -uninstall-data-recursive install-exec-recursive \ -uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ -all-recursive check-recursive installcheck-recursive info-recursive \ -dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-compile uninstall-binSCRIPTS install-binSCRIPTS \ +uninstall-commonSCRIPTS install-commonSCRIPTS uninstall-commonDATA \ +install-commonDATA install-data-recursive uninstall-data-recursive \ +install-exec-recursive uninstall-exec-recursive installdirs-recursive \ +uninstalldirs-recursive all-recursive check-recursive \ +installcheck-recursive info-recursive dvi-recursive \ +mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ diff -urNP ../siag-3.3.5/common/common.c ./common/common.c --- ../siag-3.3.5/common/common.c Thu Apr 6 18:27:52 2000 +++ ./common/common.c Mon May 15 00:28:22 2000 @@ -47,7 +47,9 @@ char *libexecdir; /* where plugins are; default /usr/local/libexec/siag */ char *datadir; /* where Scheme files are; default /usr/local/share/siag */ char *docdir; /* where online docs are; default /usr/local/doc/siag */ +#if 0 char *siaghelp; /* what displays html; default $bindir/siaghelp */ +#endif char *siag_basedir; /* $HOME/.siag */ char *siag_tmpdir; /* $HOME/.siag/tmp */ char *version; /* version string */ @@ -133,7 +135,9 @@ } else { docdir = DOCDIR; } +#if 0 siaghelp = "siaghelp"; +#endif if (fmt) { sprintf(p, fmt, VERSION_NO); } else { diff -urNP ../siag-3.3.5/common/common.h ./common/common.h --- ../siag-3.3.5/common/common.h Thu Apr 6 18:19:20 2000 +++ ./common/common.h Mon May 15 00:24:47 2000 @@ -26,7 +26,9 @@ extern char *libexecdir; extern char *datadir; extern char *docdir; +#if 0 extern char *siaghelp; +#endif extern char *siag_basedir; extern char *siag_tmpdir; extern char *version; diff -urNP ../siag-3.3.5/common/common.scm ./common/common.scm --- ../siag-3.3.5/common/common.scm Thu Apr 6 14:52:56 2000 +++ ./common/common.scm Tue May 16 10:41:20 2000 @@ -26,7 +26,7 @@ (define viewer-command "gvu") (define lpr-command "lpr") (define editor-command "xedplus") -(define help-command siaghelp) +(define help-command "siaghelp") (define filer-command "xfiler") (define terminal-command "xterm -sb -sl 500 -j -ls -fn 7x14") (define calculator-command "xcalc") @@ -37,24 +37,33 @@ (if (not (stat homedir)) (mkdir homedir (string->number "700" 8))) -(define appfile (string-append homedir "/applications.scm")) +; Obsoleted by the new applications.sh file + +(define appfile (string-append homedir "/applications.sh")) (define (save-applications) (let ((fp (fopen appfile "w"))) (writes fp - "; Auto generated file. Do not edit.\n" - "(define viewer-command \"" viewer-command "\")\n" - "(define lpr-command \"" lpr-command "\")\n" - "(define editor-command \"" editor-command "\")\n" - "(define help-command \"" help-command "\")\n" - "(define filer-command \"" filer-command "\")\n" - "(define terminal-command \"" terminal-command "\")\n" - "(define calculator-command \"" calculator-command "\")\n") + "# Auto generated file. Do not edit.\n" + "viewer=" viewer-command "\n" + "lpr=" lpr-command "\n" + "editor=" editor-command "\n" + "help=" help-command "\n" + "filer=" filer-command "\n" + "terminal=" terminal-command "\n" + "calculator=" calculator-command "\n") + (fclose fp))) + +(define (load-applications) + (let ((fp (fopen appfile "r"))) +; read line by line... (fclose fp))) (if (stat appfile) - (require appfile) - (save-applications)) + (load-applications)) + +; (require appfile) +; (save-applications)) (define (set-applications viewer lpr editor help filer term calc) (if (string? viewer) (set! viewer-command viewer)) @@ -81,7 +90,7 @@ (set! viewer "gvu") (set! lpr "lpr") (set! editor "xedplus") - (set! help siaghelp) + (set! help "siaghelp") (set! filer "xfiler") (set! term "xterm") (set! calc "xcalc"))) @@ -157,12 +166,14 @@ (puts x)) (define (do-help helpfile) - (putenv (string-append "SIAGHELP=" help-command)) - (spawn (string-append "siaghelp file:" docdir "/" helpfile))) +; (putenv (string-append "SIAGHELP=" help-command)) +; (spawn (string-append "siaghelp file:" docdir "/" helpfile))) + (spawn (string-append "siagrun help file:" docdir "/" helpfile))) (define (do-link url) - (putenv (string-append "SIAGHELP=" help-command)) - (spawn (string-append help-command " " url))) +; (putenv (string-append "SIAGHELP=" help-command)) +; (spawn (string-append help-command " " url))) + (spawn (string-append "siagrun help " url))) (define (help-for-help) (do-help "common/siaghelp.html")) diff -urNP ../siag-3.3.5/common/dictionary.de ./common/dictionary.de --- ../siag-3.3.5/common/dictionary.de Fri Apr 28 13:31:08 2000 +++ ./common/dictionary.de Tue May 16 11:29:26 2000 @@ -1,4 +1,5 @@ - +## German dictonary for Siag Office +###### siag ##### File Datei Edit Bearbeiten Block Block @@ -44,7 +45,8 @@ Remove grid lines from the block Gitterlinien im Block entfernen Select everything Alles markieren OK OK -Cancel Abbruch +Cancel Abbrechen +Abort Abbruch File Name: Dateiname: Directory: Verzeichnis: Directories Verzeichnisse @@ -136,6 +138,7 @@ Underline Unterstreichen None Keine First Page Number Nummer der ersten Seite +First page number: Nummer der ersten Seite: Column Width Spaltenbreite Set Setzen Fit Block An Block anpassen @@ -158,12 +161,16 @@ Cell Color Zellenfarbe Block Color Blockfarbe Edit Record Eintrag bearbeiten +######## Menü Daten ##### Data Entry Daten eintragen Siag-net Siag-Netz Enter Date Datum eingeben +Date: Datum: Enter Time Uhrzeit eingeben +Time: Uhrzeit: Identify Cell Zelle identifizieren Recalculate Neu berechnen +##### Menü Fenster ##### Change Buffer Puffer wechseln Delete Buffer Puffer löschen Split Window Fenster teilen @@ -328,12 +335,22 @@ Abstract Klappentext Preformatted Vorformatiert Embed Einbetten + +############################################################################### +##### pw ##### Start another instance of Pathetic Writer Neuen Pathetic Writer starten Open a Pathetic Writer document Ein Pathetic-Writer-Dokument öffnen Display the PW online documentation PW-Onlinedokumentation anzeigen Underlined text Unterstrichener Text Superscript Hochgestellter Text Subscript Tiefgestellt +Special Char Sonderzeichen +##### pw spellchecking ##### +Replacement: Vorschlag: +Skip Überspringen +Accept Akzeptieren + +##### egon ##### Show Editor Editor zeigen Hide Editor Editor verbergen Show editor Editor zeigen @@ -474,6 +491,8 @@ Call Sed Sed aufrufen Commands Kommandos Command: Kommando: + +##### Xedplus ##### New Xedplus Neuen Xedplus starten Pipes Pipes Goto line Gehe zu Zeile @@ -503,6 +522,8 @@ Perform a User command Kommando ausführen Perform a User pipe Pipe ausführen About XedPlus... Über XedPlus... + +##### Xfiler ##### Close window Fenster schliessen Go to home directory Persönliches Verzeichnis Go up one directory Ein Verzeichnis nach oben @@ -548,4 +569,5 @@ Clear Leeren Restore Wiederherstellen Redo Wiederholen +Continue Fortsetzen About Xfiler... Über Xfiler... diff -urNP ../siag-3.3.5/configure ./configure --- ../siag-3.3.5/configure Sat May 6 09:14:23 2000 +++ ./configure Mon May 8 10:17:35 2000 @@ -706,7 +706,7 @@ PACKAGE=siag -VERSION=3.3.5 +VERSION=3.3.6 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } diff -urNP ../siag-3.3.5/configure.in ./configure.in --- ../siag-3.3.5/configure.in Tue May 2 23:51:57 2000 +++ ./configure.in Sat May 6 18:23:04 2000 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(README) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(siag, 3.3.5) +AM_INIT_AUTOMAKE(siag, 3.3.6) dnl Set of available languages dnl ALL_LINGUAS="" diff -urNP ../siag-3.3.5/egon/main.c ./egon/main.c --- ../siag-3.3.5/egon/main.c Thu Apr 6 15:21:34 2000 +++ ./egon/main.c Mon May 15 00:25:14 2000 @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -87,6 +88,7 @@ char path[1024]; int i; + setlocale(LC_NUMERIC, "C"); common_init("Egon Animator %s. No Warranty"); sprintf(b, "%s/%ld", siag_basedir, (long)getpid()); @@ -124,7 +126,9 @@ setvar(cintern("libexecdir"), strcons(-1, libexecdir), NIL); setvar(cintern("datadir"), strcons(-1, datadir), NIL); setvar(cintern("docdir"), strcons(-1, docdir), NIL); +#if 0 setvar(cintern("siaghelp"), strcons(-1, siaghelp), NIL); +#endif /* load runtime library */ sprintf(b, "(load \"%s/egon/egon.scm\")", datadir); diff -urNP ../siag-3.3.5/gvu/Makefile.in ./gvu/Makefile.in --- ../siag-3.3.5/gvu/Makefile.in Sat May 6 09:26:00 2000 +++ ./gvu/Makefile.in Tue May 16 11:47:43 2000 @@ -303,6 +303,21 @@ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done +callbacks.o: callbacks.c ../common/common.h ../common/cmalloc.h \ + ../xcommon/filesel.h ../xcommon/dialogs.h ../xcommon/xcommon.h \ + gv.h ../xcommon/Ghostview.h ../Nws/cvt.h ../common/ps.h +main.o: main.c blank.xpm dot.xpm ../Nws/utils.h ../Nws/cvt.h \ + ../Nws/Menu.h ../Nws/MenuBar.h ../Nws/Row.h ../Nws/BaseConst.h \ + ../Nws/MBButton.h ../Nws/LabelME.h ../Nws/BaseME.h \ + ../Nws/LineME.h ../Nws/SubME.h ../common/common.h \ + ../xcommon/xcommon.h ../xcommon/dialogs.h ../xcommon/Rudegrid.h \ + ../xcommon/Frame.h ../xcommon/Tooltip.h ../xcommon/Handle.h \ + ../xcommon/../XawM/Label.h gv.h ../xcommon/Ghostview.h \ + ../common/ps.h ../xcommon/xcommon-ad.h ../xcommon/filesel-ad.h \ + ../xcommon/dialogs-ad.h ../xcommon/nws-ad.h gvu-ad.h +misc.o: misc.c ../Nws/Menu.h ../Nws/cvt.h ../Nws/MBButton.h \ + ../Nws/LabelME.h ../Nws/BaseME.h ../Nws/LineME.h gv.h \ + ../xcommon/Ghostview.h ../common/ps.h info-am: info: info-am diff -urNP ../siag-3.3.5/gvu/callbacks.c ./gvu/callbacks.c --- ../siag-3.3.5/gvu/callbacks.c Thu Apr 6 14:53:15 2000 +++ ./gvu/callbacks.c Mon May 15 00:25:34 2000 @@ -355,7 +355,7 @@ sprintf(b, "file:%s/%s", docdir, p); if (!fork()) { - execlp(siaghelp, "Siaghelp", b, (char *)0); + execlp("siagrun", "siagrun", "help", b, (char *)0); _exit(0); } } diff -urNP ../siag-3.3.5/pw/fileio_ps.c ./pw/fileio_ps.c --- ../siag-3.3.5/pw/fileio_ps.c Wed Mar 22 12:47:57 2000 +++ ./pw/fileio_ps.c Sun May 7 02:13:11 2000 @@ -29,8 +29,6 @@ - don't draw the grid - The lpr command is used for printing - This works for me, but will probably break (more or less) for anyone - not using my printer (a NEC S62P) with A4 paper. --- */ #include diff -urNP ../siag-3.3.5/pw/main.c ./pw/main.c --- ../siag-3.3.5/pw/main.c Tue Apr 4 20:16:39 2000 +++ ./pw/main.c Mon May 15 00:25:50 2000 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "../common/common.h" @@ -74,6 +75,7 @@ char path[1024]; int i; + setlocale(LC_NUMERIC, "C"); common_init("Pathetic Writer %s. No Warranty"); sprintf(b, "%s/%ld", siag_basedir, (long)getpid()); @@ -110,7 +112,9 @@ setvar(cintern("libexecdir"), strcons(-1, libexecdir), NIL); setvar(cintern("datadir"), strcons(-1, datadir), NIL); setvar(cintern("docdir"), strcons(-1, docdir), NIL); +#if 0 setvar(cintern("siaghelp"), strcons(-1, siaghelp), NIL); +#endif /* load runtime library */ sprintf(b, "(load \"%s/pw/pw.scm\")", datadir); diff -urNP ../siag-3.3.5/siag/main.c ./siag/main.c --- ../siag-3.3.5/siag/main.c Thu Apr 6 15:22:16 2000 +++ ./siag/main.c Mon May 15 00:26:01 2000 @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "../common/cmalloc.h" @@ -91,8 +92,8 @@ char path[1024]; int i; - P_MIN = make_position(1, 1); /* real men use (0, 0) */ - /* they don't have to deal with users, though ;-) */ + setlocale(LC_NUMERIC, "C"); + P_MIN = make_position(1, 1); common_init("Siag (Scheme In A Grid) %s. No Warranty."); @@ -133,7 +134,9 @@ setvar(cintern("libexecdir"), strcons(-1, libexecdir), NIL); setvar(cintern("datadir"), strcons(-1, datadir), NIL); setvar(cintern("docdir"), strcons(-1, docdir), NIL); +#if 0 setvar(cintern("siaghelp"), strcons(-1, siaghelp), NIL); +#endif /* now load runtime library */ sprintf(b, "(load \"%s/siag/siag.scm\")", datadir); diff -urNP ../siag-3.3.5/tsiag/window.c ./tsiag/window.c --- ../siag-3.3.5/tsiag/window.c Fri Apr 28 13:49:30 2000 +++ ./tsiag/window.c Thu May 11 01:25:12 2000 @@ -31,6 +31,7 @@ #include #include +#include #include #include diff -urNP ../siag-3.3.5/xcommon/Richtext.c ./xcommon/Richtext.c --- ../siag-3.3.5/xcommon/Richtext.c Fri May 5 12:00:45 2000 +++ ./xcommon/Richtext.c Tue May 9 11:06:06 2000 @@ -921,10 +921,12 @@ zoom); } if (b[0] == '\t') { - int new_x = x_base - rtw->richtext.left_margin; + int new_x = x_base - rtw->richtext.left_margin + - rtw->richtext.top_col; new_x += rtw->richtext.tab_distance; new_x -= new_x % rtw->richtext.tab_distance; - x_base = new_x + rtw->richtext.left_margin; + x_base = new_x + rtw->richtext.left_margin + + rtw->richtext.top_col; } else { width = rc_width(line[i]); x_base += width; @@ -1026,7 +1028,12 @@ if (rtw->richtext.ruler) { XtVaSetValues(rtw->richtext.ruler, XtNrulerTopCol, rtw->richtext.top_col, + XtNleftMargin, rtw->richtext.left_margin, + XtNrightMargin, rtw->richtext.right_margin, + XtNpaperWidth, rtw->richtext.paper_width, + XtNtabDistance, rtw->richtext.tab_distance, (char *)0); + RulerSetZoom(rtw->richtext.ruler, rtw->richtext.zoom); } } diff -urNP ../siag-3.3.5/xcommon/Ruler.c ./xcommon/Ruler.c --- ../siag-3.3.5/xcommon/Ruler.c Fri May 5 10:20:36 2000 +++ ./xcommon/Ruler.c Fri May 12 09:25:31 2000 @@ -82,6 +82,14 @@ offset(zoom), XtRFloat, (XtPointer)&floatOne + }, { + XtNfont, + XtCFont, + XtRFontStruct, + sizeof(XFontStruct *), + offset(font), + XtRString, + XtDefaultFont } }; #undef offset @@ -159,6 +167,8 @@ unsigned long mask = 0; XGCValues values; (*superclass->core_class.realize)(w, v, a); + values.font = rw->ruler.font->fid; + mask = GCFont; rw->ruler.gc = XCreateGC(XtDisplay(w), XtWindow(w), mask, &values); } @@ -175,23 +185,56 @@ unsigned long black = BlackPixelOfScreen(s); unsigned long white = WhitePixelOfScreen(s); float zoom = aw->ruler.zoom; + int pw, td, lm, rm, tc, ps, pe, in; + XSetForeground(dpy, gc, white); + + pw = aw->ruler.paper_width; + td = aw->ruler.tab_distance; + lm = aw->ruler.left_margin; + rm = aw->ruler.right_margin; + tc = aw->ruler.top_col; + ps = lm+tc+1; + pe = pw-rm+tc; + + XFillRectangle(dpy, wi, gc, zoom*ps, 5, zoom*(pw-lm-rm), h-10); o = -1; - for (i = aw->ruler.left_margin+aw->ruler.top_col+1; - i < aw->ruler.paper_width-aw->ruler.right_margin; - i += aw->ruler.tab_distance) { - XSetForeground(dpy, gc, white); - XDrawLine(dpy, wi, gc, zoom*i-2+o, 0, zoom*i-2+o, h-6); - XDrawLine(dpy, wi, gc, zoom*i-2+o, h-6, zoom*i+o, h-4); - XSetForeground(dpy, gc, black); - XDrawLine(dpy, wi, gc, zoom*i+2+o, 0, zoom*i+2+o, h-6); - XDrawLine(dpy, wi, gc, zoom*i+o, h-4, zoom*i+2+o, h-6); - - XDrawLine(dpy, wi, gc, 0, 0, 0, h-1); - XDrawLine(dpy, wi, gc, 0, 0, w1-1, 0); - XDrawLine(dpy, wi, gc, 0, h-1, w1-1, h-1); - XDrawLine(dpy, wi, gc, w1-1, 0, w1-1, h-1); + + XSetForeground(dpy, gc, black); + + /* draw the start for the first line in a paragraph */ + XDrawLine(dpy, wi, gc, zoom*ps-2+o, 0, zoom*ps+o, 7); + XDrawLine(dpy, wi, gc, zoom*ps+o, 7, zoom*ps+2+o, 0); + + /* draw the start for subsequent lines */ + XDrawLine(dpy, wi, gc, zoom*ps-2+o, h, zoom*ps+o, h-7); + XDrawLine(dpy, wi, gc, zoom*ps+o, h-7, zoom*ps+2+o, h); + + /* draw tab stops */ + for (i = ps+td; i < pe; i += td) { + XDrawLine(dpy, wi, gc, zoom*i-2+o, h, zoom*i+o, h-7); + XDrawLine(dpy, wi, gc, zoom*i+o, h-7, zoom*i+2+o, h); + } + + /* draw half inch markers */ + for (i = ps+36; i < pe; i += 72) { + XDrawLine(dpy, wi, gc, zoom*i+o, 9, zoom*i+o, h-10); + } + + /* draw inch numbers */ + for (i = ps+72, in = 1; i < pe; i += 72, in++) { + char num[10]; + int nw; + sprintf(num, "%d", in); + nw = XTextWidth(aw->ruler.font, num, strlen(num)); + XDrawString(dpy, wi, gc, zoom*i+o-nw/2, h-9, num, strlen(num)); } + XDrawLine(dpy, wi, gc, zoom*tc, 0, zoom*tc, h-1); + XDrawLine(dpy, wi, gc, zoom*(pw+tc-1), 0, zoom*(pw+tc-1), h-1); + XDrawLine(dpy, wi, gc, 0, 0, 0, h-1); + XDrawLine(dpy, wi, gc, 0, 0, w1-1, 0); + XDrawLine(dpy, wi, gc, 0, h-1, w1-1, h-1); + XDrawLine(dpy, wi, gc, w1-1, 0, w1-1, h-1); } static Boolean SetValues(Widget current, Widget request, Widget new, diff -urNP ../siag-3.3.5/xcommon/RulerP.h ./xcommon/RulerP.h --- ../siag-3.3.5/xcommon/RulerP.h Fri May 5 02:31:49 2000 +++ ./xcommon/RulerP.h Fri May 12 09:05:16 2000 @@ -41,6 +41,7 @@ typedef struct { /* resources */ + XFontStruct *font; int left_margin, right_margin; int paper_width; int tab_distance; diff -urNP ../siag-3.3.5/xcommon/filesel.c ./xcommon/filesel.c --- ../siag-3.3.5/xcommon/filesel.c Thu Apr 6 14:53:32 2000 +++ ./xcommon/filesel.c Tue May 16 11:09:56 2000 @@ -485,9 +485,9 @@ { char b[1024]; - sprintf(b, "file://localhost%s/xcommon/filesel.html", docdir); + sprintf(b, "file:%s/xcommon/filesel.html", docdir); if (!fork()) { - execlp(siaghelp, "Siaghelp", b, (char *)0); + execlp("siagrun", "siagrun", "help", b, (char *)0); _exit(0); } } diff -urNP ../siag-3.3.5/xed/special.c ./xed/special.c --- ../siag-3.3.5/xed/special.c Sat Jan 29 00:28:16 2000 +++ ./xed/special.c Mon May 15 00:19:56 2000 @@ -501,7 +501,11 @@ sprintf(b, "file:%s/xedplus/xedplus.html", docdir); if (!fork()) { +#if 0 execlp(siaghelp, "Siaghelp", b, (char *) 0); +#else + execlp("siagrun", "siagrun", "help", b, (char *)0); +#endif _exit(0); } } diff -urNP ../siag-3.3.5/xegon/window.c ./xegon/window.c --- ../siag-3.3.5/xegon/window.c Thu Apr 6 14:53:37 2000 +++ ./xegon/window.c Mon May 15 00:26:38 2000 @@ -219,7 +219,7 @@ sprintf(b, "file://localhost%s/egon/%s", docdir, params[0]); if (!fork()) { - execlp(siaghelp, "Siaghelp", b, NULL); + execlp("siagrun", "siagrun", "help", b, NULL); exit(0); } } diff -urNP ../siag-3.3.5/xfiler/Dnd.c ./xfiler/Dnd.c --- ../siag-3.3.5/xfiler/Dnd.c Wed Apr 28 18:25:15 1999 +++ ./xfiler/Dnd.c Tue May 16 11:20:29 2000 @@ -468,7 +468,11 @@ if (!strcmp(cmd, "EDIT")) { +#if 0 strcpy(cmd, resources.default_editor); +#else + sprintf(cmd, "siagrun editor"); +#endif strcat(cmd, " "); strcat(cmd, directory); strcat(cmd, "/"); diff -urNP ../siag-3.3.5/xfiler/FwActions.c ./xfiler/FwActions.c --- ../siag-3.3.5/xfiler/FwActions.c Mon Apr 19 10:28:44 1999 +++ ./xfiler/FwActions.c Tue May 16 11:21:52 2000 @@ -401,7 +401,7 @@ sprintf(b, "file://%s/%s", directory, fname); if (!fork()) { - execlp(siaghelp, "Siaghelp", b, (char *)0); + execlp("siagrun", "siagrun", "help", b, (char *)0); _exit(0); } } @@ -427,7 +427,11 @@ if (resources.default_editor) { +#if 0 strcpy(path, resources.default_editor); +#else + sprintf(path, "siagrun editor"); +#endif strcat(path, " "); strcat(path, fname); @@ -476,7 +480,11 @@ if (resources.default_viewer) { +#if 0 strcpy(path, resources.default_viewer); +#else + sprintf(path, "siagrun editor"); +#endif strcat(path, " "); strcat(path, fname); @@ -500,12 +508,14 @@ { char path[MAXPATHLEN]; char **argv; + char default_term[1000]; if (resources.default_term) { strcpy(path, "cd "); strcat(path, fname); strcat(path, "&&"); - strcat(path, resources.default_term); + sprintf(default_term, "siagrun terminal"); + strcat(path, default_term); argv = (char **) XtMalloc(4 * sizeof(char *)); argv[0] = user.shell; diff -urNP ../siag-3.3.5/xfiler/FwCb.c ./xfiler/FwCb.c --- ../siag-3.3.5/xfiler/FwCb.c Thu Apr 6 14:53:39 2000 +++ ./xfiler/FwCb.c Tue May 16 11:24:03 2000 @@ -64,10 +64,8 @@ void editorCb(Widget w, FileWindowRec *fw, XtPointer call_data) { - char *editor = NULL/*resources.default_editor*/; - if (editor == NULL) editor = "xedplus"; if (!fork()) { - execlp(editor, editor, (char *)0); + execlp("siagrun", "siagrun", "editor", (char *)0); _exit(0); } } @@ -434,7 +432,7 @@ sprintf(b, "file:%s/%s", docdir, p); if (!fork()) { - execlp(siaghelp, "Siaghelp", b, (char *)0); + execlp("siagrun", "siagrun", "help", b, (char *)0); _exit(0); } } diff -urNP ../siag-3.3.5/xpw/Pw.ad ./xpw/Pw.ad --- ../siag-3.3.5/xpw/Pw.ad Tue May 2 17:39:20 2000 +++ ./xpw/Pw.ad Fri May 12 09:06:03 2000 @@ -1,7 +1,7 @@ ! General settings for the whole application -Pw.geometry: 600x400 +Pw.geometry: 640x420 Pw*combo_viewport.allowHoriz: False @@ -74,10 +74,11 @@ Pw*label3.gridy: 1 Pw*viewport.xLayout: 25 25 50% 50% 15 -Pw*viewport.yLayout: 20 100% 15 +Pw*viewport.yLayout: 25 100% 15 Pw*ruler.gridWidth: 4 Pw*ruler.borderWidth: 0 +Pw*ruler.font: -*-helvetica-medium-r-*-8-* Pw*grid.gridy: 1 Pw*grid.gridWidth: 4 diff -urNP ../siag-3.3.5/xpw/app-defaults.h ./xpw/app-defaults.h --- ../siag-3.3.5/xpw/app-defaults.h Tue May 2 17:39:22 2000 +++ ./xpw/app-defaults.h Fri May 12 09:06:04 2000 @@ -1,4 +1,4 @@ -"Pw.geometry: 600x400", +"Pw.geometry: 640x420", "Pw*combo_viewport.allowHoriz: False", "Pw*topbox.xLayout: 100%", "Pw*topbox.yLayout: 30 30 30 100% 30", @@ -52,9 +52,10 @@ "Pw*label3.gridx: 5", "Pw*label3.gridy: 1", "Pw*viewport.xLayout: 25 25 50% 50% 15", -"Pw*viewport.yLayout: 20 100% 15", +"Pw*viewport.yLayout: 25 100% 15", "Pw*ruler.gridWidth: 4", "Pw*ruler.borderWidth: 0", +"Pw*ruler.font: -*-helvetica-medium-r-*-8-*", "Pw*grid.gridy: 1", "Pw*grid.gridWidth: 4", "Pw*grid.background: white", diff -urNP ../siag-3.3.5/xpw/window.c ./xpw/window.c --- ../siag-3.3.5/xpw/window.c Fri May 5 07:28:39 2000 +++ ./xpw/window.c Mon May 15 00:27:07 2000 @@ -177,14 +177,22 @@ } XtVaSetValues(w->ui->tab, XtNtabbingSelected, tab, (char *)0); XtVaSetValues(topLevel, XtNtitle, b, (char *)0); +#if 0 XtVaSetValues(w->ui->ruler, XtNleftMargin, w->buf->left_margin, XtNrightMargin, w->buf->right_margin, XtNpaperWidth, w->buf->paper_width, XtNtabDistance, w->buf->tab_distance, (char *)0); +#endif XtVaSetValues(w->ui->grid, XtNrichtextData, w, +#if 1 + XtNleftMargin, w->buf->left_margin, + XtNrightMargin, w->buf->right_margin, + XtNpaperWidth, w->buf->paper_width, + XtNtabDistance, w->buf->tab_distance, +#endif (char *)0); XtSetKeyboardFocus(topLevel, w->ui->grid); /* plugins */ @@ -376,7 +384,9 @@ int s = w->sht; sheet *st = w->buf->sht; RichtextSetZoom(w->ui->grid, zoom); +#if 0 RulerSetZoom(w->ui->ruler, zoom); +#endif XtVaSetValues(w->ui->grid, XtNrichtextData, w, XtNrichtextTopRow, st[s].top.row, @@ -692,7 +702,7 @@ sprintf(b, "file://localhost%s/pw/%s", docdir, params[0]); if (!fork()) { - execlp(siaghelp, "Siaghelp", b, (char *)0); + execlp("siagrun", "siagrun", "help", b, (char *)0); exit(0); } } @@ -756,7 +766,7 @@ (char *)0); w->ui->ruler = XtVaCreateManagedWidget("ruler", - rulerWidgetClass, w->ui->viewport/*rulerframe*/, + rulerWidgetClass, w->ui->viewport, (char *)0); s = w->sht; @@ -1810,9 +1820,11 @@ } draw_scrollbars(display, w); draw_buffer(display, w); +#if 0 XtVaSetValues(w->ui->ruler, XtNtabDistance, w->buf->tab_distance, (char *)0); +#endif /* check for nondisplayed plugins */ b = w->buf; s = w->sht; diff -urNP ../siag-3.3.5/xpw/xpw.c ./xpw/xpw.c --- ../siag-3.3.5/xpw/xpw.c Fri May 5 06:51:48 2000 +++ ./xpw/xpw.c Tue May 16 11:35:10 2000 @@ -596,7 +596,7 @@ sprintf(b, "file://localhost%s/pw/spell.html", docdir); if (!fork()) { - execlp(siaghelp, "Siaghelp", b, (char *)0); + execlp("siagrun", "siagrun", "help", b, (char *)0); exit(0); } } else { @@ -647,6 +647,15 @@ horiz = None; } +static void wm_del(Widget w) +{ + Atom da; + if (XtWindow(w)) { + da = XInternAtom(XtDisplay(w), "WM_DELETE_WINDOW", False); + XSetWMProtocols(XtDisplay(w), XtWindow(w), &da, 1); + } +} + extern void center(Widget, Widget); /* --- @@ -690,6 +699,7 @@ center(topLevel, spell_shell); XtPopup(spell_shell, XtGrabNonexclusive); + wm_del(spell_shell); XtSetKeyboardFocus(spell_shell, spell_text2); diff -urNP ../siag-3.3.5/xsiag/window.c ./xsiag/window.c --- ../siag-3.3.5/xsiag/window.c Sat May 6 08:15:12 2000 +++ ./xsiag/window.c Mon May 15 00:27:47 2000 @@ -1241,7 +1241,7 @@ sprintf(b, "file:%s/siag/%s", docdir, params[0]); if (!fork()) { - execlp(siaghelp, "Siaghelp", b, (char *)NULL); + execlp("siagrun", "siagrun", "help", b, (char *)NULL); _exit(0); } }