ivtools-patch Mailing List for ivtools (Page 7)
Brought to you by:
johnston
You can subscribe to this list here.
1999 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2000 |
Jan
(17) |
Feb
(14) |
Mar
(7) |
Apr
(7) |
May
(20) |
Jun
(18) |
Jul
(5) |
Aug
(9) |
Sep
(4) |
Oct
(2) |
Nov
(2) |
Dec
(1) |
2001 |
Jan
(3) |
Feb
(2) |
Mar
(5) |
Apr
(7) |
May
(9) |
Jun
(15) |
Jul
(10) |
Aug
(2) |
Sep
(10) |
Oct
(15) |
Nov
(14) |
Dec
(2) |
2002 |
Jan
(8) |
Feb
(13) |
Mar
(10) |
Apr
(3) |
May
(2) |
Jun
(7) |
Jul
(5) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(10) |
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(3) |
2004 |
Jan
(2) |
Feb
(6) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(4) |
Nov
(1) |
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2010 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ivt...@li...> - 2001-05-22 22:05:21
|
Patch: ivtools-010522-johnston-022 For: ivtools-0.9.3 Author: joh...@us... Subject: fix export of EPS with color imagery Requires: This is an intermediate patch to ivtools-0.9.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - fix export of EPS with color imagery, by correctly reading radio button for output format on export dialog box. Before it only generated the idraw format, which is EPS, but has only graylevel rasters visible to any PostScript interpreter (the color information is in comments). Index: IVGlyph/exportchooser.c diff -c IVGlyph/exportchooser.c:1.1 IVGlyph/exportchooser.c:1.2 *** IVGlyph/exportchooser.c:1.1 Thu Jan 4 15:32:07 2001 --- src/IVGlyph/exportchooser.c Tue May 22 14:56:32 2001 *************** *** 83,95 **** boolean ExportChooser::idraw_format() { return ((ExportChooserImpl*)impl_)->_obse ! ? strcmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(), "idraw") == 0 : false; } boolean ExportChooser::postscript_format() { return ((ExportChooserImpl*)impl_)->_obse ! ? strcmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(), "idraw") == 0 || strcasecmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(), "PostScript") == 0 : false; } --- 83,95 ---- boolean ExportChooser::idraw_format() { return ((ExportChooserImpl*)impl_)->_obse ! ? strncmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(), "idraw", 5) == 0 : false; } boolean ExportChooser::postscript_format() { return ((ExportChooserImpl*)impl_)->_obse ! ? strncmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(), "idraw", 5) == 0 || strcasecmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(), "EPS") == 0 : false; } Index: OverlayUnidraw/ovexport.c diff -c OverlayUnidraw/ovexport.c:1.1 OverlayUnidraw/ovexport.c:1.2 *** OverlayUnidraw/ovexport.c:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovexport.c Tue May 22 14:56:40 2001 *************** *** 109,115 **** style = new Style(Session::instance()->style()); style->attribute("subcaption", "Export selected graphics to file:"); style->attribute("open", "Export"); ! const char *formats[] = {"PostScript", "idraw", "drawtool"}; const char *commands[] = {"ghostview %s", "idraw %s", "drawtool %s"}; chooser_ = new ExportChooser(".", WidgetKit::instance(), style, formats, sizeof(formats)/sizeof(char*), commands, nil, true); --- 109,115 ---- style = new Style(Session::instance()->style()); style->attribute("subcaption", "Export selected graphics to file:"); style->attribute("open", "Export"); ! const char *formats[] = {"EPS", "idraw EPS", "drawtool"}; const char *commands[] = {"ghostview %s", "idraw %s", "drawtool %s"}; chooser_ = new ExportChooser(".", WidgetKit::instance(), style, formats, sizeof(formats)/sizeof(char*), commands, nil, true); Index: OverlayUnidraw/ovraster.c diff -c OverlayUnidraw/ovraster.c:1.3 OverlayUnidraw/ovraster.c:1.4 *** OverlayUnidraw/ovraster.c:1.3 Thu Apr 5 09:39:45 2001 --- src/OverlayUnidraw/ovraster.c Tue May 22 14:56:40 2001 *************** *** 360,367 **** Coord w = raster->Width(); Coord h = raster->Height(); ! if (((OvPrintCmd*)GetCommand())->idraw_format()) { ! out << "Begin " << MARK << " " << "Rast\n"; Transformation(out); --- 360,373 ---- Coord w = raster->Width(); Coord h = raster->Height(); ! boolean idraw_format = false; ! if (GetCommand()->IsA(OV_EXPORT_CMD)) ! idraw_format = ((OvExportCmd*)GetCommand())->idraw_format(); ! else if (GetCommand()->IsA(OVPRINT_CMD)) ! idraw_format = ((OvPrintCmd*)GetCommand())->idraw_format(); ! ! if (idraw_format) { ! out << "Begin " << MARK << " " << "Rast\n"; Transformation(out); *** /dev/null Tue May 22 14:56:48 PDT 2001 --- patches/ivtools-010522-johnston-022 *************** patches/ivtools-010522-johnston-022 *** 0 **** --- 1 ---- + ivtools-010522-johnston-022 |
From: <ivt...@li...> - 2001-05-18 18:59:29
|
Patch: ivtools-010518-johnston-021 For: ivtools-0.9.2 Author: joh...@us... Subject: changes to wrap up ivtools-0.9.3 Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - this (plus some changes in the top most directory) bring things up to ivtools-0.9.3 Index: include_std/version.h diff -c include_std/version.h:1.3 include_std/version.h:1.4 *** include_std/version.h:1.3 Thu Apr 5 13:26:19 2001 --- src/include/ivstd/version.h Fri May 18 11:51:17 2001 *************** *** 1,3 **** ! #define IvtoolsVersion 0.9.2 ! #define VersionString "0.9.2" ! #define ReleaseString "ivtools-0.9.2" --- 1,3 ---- ! #define IvtoolsVersion 0.9.3 ! #define VersionString "0.9.3" ! #define ReleaseString "ivtools-0.9.3" Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.4 config_ivtools/params.def:1.5 *** config_ivtools/params.def:1.4 Fri Apr 27 15:06:29 2001 --- config/params.def Fri May 18 11:51:21 2001 *************** *** 27,33 **** * Name of the software release */ #ifndef Release ! #define Release ivtools-0.9.2 #endif RELEASE = Release --- 27,33 ---- * Name of the software release */ #ifndef Release ! #define Release ivtools-0.9.3 #endif RELEASE = Release *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 0.9.2 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 0.9.3 #endif VERSION = Version *** /dev/null Fri May 18 11:51:23 PDT 2001 --- patches/ivtools-010518-johnston-021 *************** patches/ivtools-010518-johnston-021 *** 0 **** --- 1 ---- + ivtools-010518-johnston-021 |
From: <ivt...@li...> - 2001-05-16 18:17:35
|
Patch: ivtools-010516-johnston-020 For: ivtools-0.9.2 Author: joh...@us... Subject: comdraw commands to convert between screen and drawing coordinates. Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - add comdraw funcs to convert between drawing and screen coordinates: dx,dy=stod(sx,sy) -- convert from screen to drawing coordinates sx,sy=dtos(dx,dy) -- convert from drawing to screen coordinates - change for building on Solaris 2.6. - bug fix in growgroup comdraw func. Index: drawtool/main.c diff -c drawtool/main.c:1.1 drawtool/main.c:1.2 *** drawtool/main.c:1.1 Thu Jan 4 15:33:07 2001 --- src/drawtool/main.c Tue May 15 14:56:37 2001 *************** *** 202,208 **** static char* usage = "Usage: drawtool [any idraw parameter] [-color5] [-gray5] [-gray6] [-gray7] \n\ ! [-nocolor6] [-opaque_off|-opoff] [-pagecols|-ncols] [-pagerows|-nrows] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\ [-panner_off|-poff] [-ptrloc] [-scribble_pointer|-scrpt ] \n\ [-slider_off|-soff] [-toolbarloc|-tbl r|l ] [-zoomer_off|-zoff] [file]"; --- 202,208 ---- static char* usage = "Usage: drawtool [any idraw parameter] [-color5] [-gray5] [-gray6] [-gray7] \n\ ! [-nocolor6] [-opaque_off|-opoff] [-pagecols|-ncols n] [-pagerows|-nrows n] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\ [-panner_off|-poff] [-ptrloc] [-scribble_pointer|-scrpt ] \n\ [-slider_off|-soff] [-toolbarloc|-tbl r|l ] [-zoomer_off|-zoff] [file]"; Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.3 ComUnidraw/comeditor.c:1.4 *** ComUnidraw/comeditor.c:1.3 Tue May 1 14:50:25 2001 --- src/ComUnidraw/comeditor.c Tue May 15 14:56:38 2001 *************** *** 204,209 **** --- 204,212 ---- comterp->add_command("paste", new PasteFunc(comterp, this)); comterp->add_command("pastemode", new PasteModeFunc(comterp, this)); comterp->add_command("addtool", new AddToolButtonFunc(comterp, this)); + + comterp->add_command("dtos", new DrawingToScreenFunc(comterp, this)); + comterp->add_command("stod", new ScreenToDrawingFunc(comterp, this)); } /* virtual */ void ComEditor::ExecuteCmd(Command* cmd) { Index: ComUnidraw/groupfunc.c diff -c ComUnidraw/groupfunc.c:1.1 ComUnidraw/groupfunc.c:1.2 *** ComUnidraw/groupfunc.c:1.1 Thu Jan 4 15:33:09 2001 --- src/ComUnidraw/groupfunc.c Tue May 15 14:56:38 2001 *************** *** 55,67 **** if (groupcomp && grcomp) { - /* first determine if group has non-zero members */ Iterator i; groupcomp->First(i); if (groupcomp->Done(i)) { push_stack(ComValue::nullval()); return; } MacroCmd* mcmd = new MacroCmd(GetEditor()); --- 55,69 ---- if (groupcomp && grcomp) { Iterator i; + #if 0 + /* first determine if group has non-zero members */ groupcomp->First(i); if (groupcomp->Done(i)) { push_stack(ComValue::nullval()); return; } + #endif MacroCmd* mcmd = new MacroCmd(GetEditor()); *************** *** 74,80 **** /* regroup */ Clipboard* gcb = new Clipboard(); ! for(; !groupcomp->Done(i); groupcomp->Next(i)) gcb->Append(groupcomp->GetComp(i)); gcb->Append(grcomp); OvGroupCmd* gcmd = new OvGroupCmd(GetEditor()); --- 76,82 ---- /* regroup */ Clipboard* gcb = new Clipboard(); ! for(groupcomp->First(i); !groupcomp->Done(i); groupcomp->Next(i)) gcb->Append(groupcomp->GetComp(i)); gcb->Append(grcomp); OvGroupCmd* gcmd = new OvGroupCmd(GetEditor()); Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.5 ComUnidraw/unifunc.c:1.6 *** ComUnidraw/unifunc.c:1.5 Tue May 1 14:50:25 2001 --- src/ComUnidraw/unifunc.c Tue May 15 14:56:38 2001 *************** *** 30,35 **** --- 30,36 ---- #include <OverlayUnidraw/ovcomps.h> #include <OverlayUnidraw/ovimport.h> #include <OverlayUnidraw/ovselection.h> + #include <OverlayUnidraw/ovviewer.h> #include <OverlayUnidraw/ovviews.h> #include <OverlayUnidraw/scriptview.h> #include <ComGlyph/comtextedit.h> *************** *** 558,562 **** --- 559,617 ---- } else { push_stack(ComValue::nullval()); } + } + + /*****************************************************************************/ + + ScreenToDrawingFunc::ScreenToDrawingFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { + } + + void ScreenToDrawingFunc::execute() { + ComValue coordsv(stack_arg(0)); + reset_stack(); + OverlayEditor* ed = (OverlayEditor*)GetEditor(); + OverlayViewer* viewer = ed ? (OverlayViewer*)ed->GetViewer() : nil; + if (viewer && coordsv.is_array() && coordsv.array_len()==2) { + AttributeValueList *avl = coordsv.array_val(); + Iterator i; + avl->First(i); + float sx = avl->GetAttrVal(i)->float_val(); + avl->Next(i); + float sy = avl->GetAttrVal(i)->float_val(); + float dx, dy; + viewer->ScreenToDrawing(sx, sy, dx, dy); + AttributeValueList* navl = new AttributeValueList(); + ComValue retval(navl); + navl->Append(new ComValue(dx)); + navl->Append(new ComValue(dy)); + push_stack(retval); + } + } + + /*****************************************************************************/ + + DrawingToScreenFunc::DrawingToScreenFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { + } + + void DrawingToScreenFunc::execute() { + ComValue coordsv(stack_arg(0)); + reset_stack(); + OverlayEditor* ed = (OverlayEditor*)GetEditor(); + OverlayViewer* viewer = ed ? (OverlayViewer*)ed->GetViewer() : nil; + if (viewer && coordsv.is_array() && coordsv.array_len()==2) { + AttributeValueList *avl = coordsv.array_val(); + Iterator i; + avl->First(i); + float dx = avl->GetAttrVal(i)->float_val(); + avl->Next(i); + float dy = avl->GetAttrVal(i)->float_val(); + float sx, sy; + viewer->DrawingToScreen(dx, dy, sx, sy); + AttributeValueList* navl = new AttributeValueList(); + ComValue retval(navl); + navl->Append(new ComValue(/* (int) */sx)); + navl->Append(new ComValue(/* (int) */sy)); + push_stack(retval); + } } Index: ComUnidraw/unifunc.h diff -c ComUnidraw/unifunc.h:1.4 ComUnidraw/unifunc.h:1.5 *** ComUnidraw/unifunc.h:1.4 Tue May 1 14:50:25 2001 --- src/ComUnidraw/unifunc.h Tue May 15 14:56:38 2001 *************** *** 198,202 **** --- 198,224 ---- }; + //: command to convert from screen to drawing coordinates + // dx,dy=stod(sx,sy) -- convert from screen to drawing coordinates + class ScreenToDrawingFunc : public UnidrawFunc { + public: + ScreenToDrawingFunc(ComTerp*,Editor*); + virtual void execute(); + virtual const char* docstring() { + return "dx,dy=%s(sx,sy) -- convert from screen to drawing coordinates."; } + + }; + + //: command to convert from drawing to screen coordinates + // sx,sy=dtos(dx,dy) -- convert from drawing to screen coordinates + class DrawingToScreenFunc : public UnidrawFunc { + public: + DrawingToScreenFunc(ComTerp*,Editor*); + virtual void execute(); + virtual const char* docstring() { + return "sx,sy=%s(dx,dy) -- convert from drawing to screen coordinates."; } + + }; + #endif /* !defined(_unifunc_h) */ Index: comdraw/main.c diff -c comdraw/main.c:1.1 comdraw/main.c:1.2 *** comdraw/main.c:1.1 Thu Jan 4 15:33:11 2001 --- src/comdraw/main.c Tue May 15 14:56:40 2001 *************** *** 223,229 **** static char* usage = "Usage: comdraw [any idraw parameter] [-comdraw port] [-color5] \n\ [-color6] [-import portnum] [-gray5] [-gray6] [-gray7] [-opaque_off|-opoff] \n\ ! [-pagecols|-ncols] [-pagerows|-nrows] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\ [-rampsize n ] [-scribble_pointer|-scrpt ] [-slider_off|-soff] [-stripped]\n\ [-toolbarloc|-tbl r|l ] [-theight|-th n] [-tile] [-twidth|-tw n] \n\ --- 223,229 ---- static char* usage = "Usage: comdraw [any idraw parameter] [-comdraw port] [-color5] \n\ [-color6] [-import portnum] [-gray5] [-gray6] [-gray7] [-opaque_off|-opoff] \n\ ! [-pagecols|-ncols n] [-pagerows|-nrows n] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\ [-rampsize n ] [-scribble_pointer|-scrpt ] [-slider_off|-soff] [-stripped]\n\ [-toolbarloc|-tbl r|l ] [-theight|-th n] [-tile] [-twidth|-tw n] \n\ *************** *** 232,238 **** static char* usage = "Usage: comdraw [any idraw parameter] [-color5] \n\ [-color6] [-gray5] [-gray6] [-gray7] [-opaque_off|-opoff] \n\ ! [-pagecols|-ncols] [-pagerows|-nrows] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\ [-rampsize n ] [-scribble_pointer|-scrpt ] [-slider_off|-soff] [-stripped]\n\ [-toolbarloc|-tbl r|l ] [-theight|-th n] [-tile] [-twidth|-tw n] \n\ --- 232,238 ---- static char* usage = "Usage: comdraw [any idraw parameter] [-color5] \n\ [-color6] [-gray5] [-gray6] [-gray7] [-opaque_off|-opoff] \n\ ! [-pagecols|-ncols n] [-pagerows|-nrows n] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\ [-rampsize n ] [-scribble_pointer|-scrpt ] [-slider_off|-soff] [-stripped]\n\ [-toolbarloc|-tbl r|l ] [-theight|-th n] [-tile] [-twidth|-tw n] \n\ Index: flipbook/main.c diff -c flipbook/main.c:1.1 flipbook/main.c:1.2 *** flipbook/main.c:1.1 Thu Jan 4 15:33:14 2001 --- src/flipbook/main.c Tue May 15 14:56:42 2001 *************** *** 210,216 **** static char* usage = "Usage: flipbook [any idraw parameter] [-bookgeom] [-comdraw port] \n\ [-color5] [-color6] [-import port] [-gray5] [-gray6] [-gray7] \n\ ! [-opaque_off|-opoff] [-pagecols|-ncols] [-pagerows|-nrows] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc ] \n\ [-scribble_pointer|-scrpt ] [-slideshow sec] [-slider_off|-soff] \n\ [-stripped] [-toolbarloc|-tbl r|l ] [-theight|-th n] [-tile] [-twidth|-tw n] \n\ --- 210,216 ---- static char* usage = "Usage: flipbook [any idraw parameter] [-bookgeom] [-comdraw port] \n\ [-color5] [-color6] [-import port] [-gray5] [-gray6] [-gray7] \n\ ! [-opaque_off|-opoff] [-pagecols|-ncols n] [-pagerows|-nrows n] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc ] \n\ [-scribble_pointer|-scrpt ] [-slideshow sec] [-slider_off|-soff] \n\ [-stripped] [-toolbarloc|-tbl r|l ] [-theight|-th n] [-tile] [-twidth|-tw n] \n\ *************** *** 219,225 **** static char* usage = "Usage: flipbook [any idraw parameter] [-bookgeom] \n\ [-color5] [-color6] [-gray5] [-gray6] [-gray7] [-opaque_off|-opoff] \n\ ! [-pagecols|-ncols] [-pagerows|-nrows] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc ] \n\ [-scribble_pointer|-scrpt ] [-slideshow sec] [-slider_off|-soff] \n\ [-toolbarloc|-tbl r|l ] [-theight|-th n] [-tile] [-twidth|-tw n] \n\ --- 219,225 ---- static char* usage = "Usage: flipbook [any idraw parameter] [-bookgeom] \n\ [-color5] [-color6] [-gray5] [-gray6] [-gray7] [-opaque_off|-opoff] \n\ ! [-pagecols|-ncols n] [-pagerows|-nrows n] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc ] \n\ [-scribble_pointer|-scrpt ] [-slideshow sec] [-slider_off|-soff] \n\ [-toolbarloc|-tbl r|l ] [-theight|-th n] [-tile] [-twidth|-tw n] \n\ Index: graphdraw/main.c diff -c graphdraw/main.c:1.1 graphdraw/main.c:1.2 *** graphdraw/main.c:1.1 Thu Jan 4 15:33:17 2001 --- src/graphdraw/main.c Tue May 15 14:56:43 2001 *************** *** 177,184 **** static char* usage = "Usage: graphdraw [any idraw parameter] [-color5] [-color6] \n\ ! [-gray5] [-gray6] [-gray7] [-opaque_off|-opoff] [-pagecols|-ncols] \n\ ! [-pagerows|-nrows] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc ] \n\ [-scribble_pointer|-scrpt ] [-slider_off|-soff] [-zoomer_off|-zoff] [file]"; --- 177,184 ---- static char* usage = "Usage: graphdraw [any idraw parameter] [-color5] [-color6] \n\ ! [-gray5] [-gray6] [-gray7] [-opaque_off|-opoff] [-pagecols|-ncols n] \n\ ! [-pagerows|-nrows n] [-panner_off|-poff] \n\ [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc ] \n\ [-scribble_pointer|-scrpt ] [-slider_off|-soff] [-zoomer_off|-zoff] [file]"; Index: include_std/string.h diff -c include_std/string.h:1.1 include_std/string.h:1.2 *** include_std/string.h:1.1 Thu Jan 4 15:33:47 2001 --- src/include/ivstd/string.h Tue May 15 14:56:48 2001 *************** *** 3,9 **** #if defined(__cplusplus) ! #if defined(sun) && !defined(solaris) extern "C" { int strcasecmp(const char*, const char*); int strncasecmp(const char*, const char*,int); --- 3,9 ---- #if defined(__cplusplus) ! #if defined(sun) && !defined(__svr4__) extern "C" { int strcasecmp(const char*, const char*); int strncasecmp(const char*, const char*,int); *** /dev/null Tue May 15 14:56:51 PDT 2001 --- patches/ivtools-010515-johnston-018 *************** patches/ivtools-010515-johnston-018 *** 0 **** --- 1 ---- + ivtools-010515-johnston-018 |
From: <ivt...@li...> - 2001-05-15 22:08:06
|
Patch: ivtools-010515-johnston-019 For: ivtools-0.9.2 Author: joh...@us... Subject: Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - stod and dtos documentation. Index: comdraw/README diff -c comdraw/README:1.3 comdraw/README:1.4 *** comdraw/README:1.3 Tue May 1 14:50:27 2001 --- src/comdraw/README Tue May 15 15:05:09 2001 *************** *** 92,97 **** --- 92,100 ---- ncols() -- onscreen horizontal extent in pixels nrows() -- onscreen vertical extent in pixels + dx,dy=stod(sx,sy) -- convert from screen to drawing coordinates + sx,sy=dtos(dx,dy) -- convert from drawing to screen coordinates + handles(flag) -- enable/disable current selection tic marks and/or highlighting highlight(compview compviewgs) -- set the highlight graphic state for a graphic Index: man1_ivtools/comdraw.1 diff -c man1_ivtools/comdraw.1:1.3 man1_ivtools/comdraw.1:1.4 *** man1_ivtools/comdraw.1:1.3 Tue May 1 14:50:37 2001 --- src/man/man1/comdraw.1 Tue May 15 15:05:15 2001 *************** *** 99,104 **** --- 99,107 ---- ncols() -- onscreen horizontal extent in pixels nrows() -- onscreen vertical extent in pixels + dx,dy=stod(sx,sy) -- convert from screen to drawing coordinates + sx,sy=dtos(dx,dy) -- convert from drawing to screen coordinates + handles(flag) -- enable/disable current selection tic marks and/or highlighting *** /dev/null Tue May 15 15:05:18 PDT 2001 --- patches/ivtools-010515-johnston-019 *************** patches/ivtools-010515-johnston-019 *** 0 **** --- 1 ---- + ivtools-010515-johnston-019 |
From: <ivt...@li...> - 2001-05-02 18:30:31
|
Patch: ivtools-010430-johnston-017 For: ivtools-0.9.2 Author: joh...@us... Subject: help returns strings, add glyph to corner of drawing editors Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - convert output of help func to a string, so it can be displayed in the keyboard command window on comdraw/graphdraw/flipbook/drawserv. - put an arbitrary glyph in the lower left, some kind of application specific icon. Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.1 ComTerp/comterp.c:1.2 *** ComTerp/comterp.c:1.1 Thu Jan 4 15:31:42 2001 --- src/ComTerp/comterp.c Mon Apr 30 16:32:33 2001 *************** *** 1076,1082 **** --- 1076,1086 ---- rowcnt = 0; out << "\n"; } else + #if 0 out << "\t"; + #else + for(int t=0; t<=tlen; t++) out << ' '; + #endif } delete funcids; } Index: ComTerp/dotfunc.h diff -c ComTerp/dotfunc.h:1.1 ComTerp/dotfunc.h:1.2 *** ComTerp/dotfunc.h:1.1 Thu Jan 4 15:31:42 2001 --- src/ComTerp/dotfunc.h Mon Apr 30 16:32:33 2001 *************** *** 37,43 **** virtual void execute(); virtual const char* docstring() { ! return ". makes compound variables"; } CLASS_SYMID("DotFunc"); }; --- 37,43 ---- virtual void execute(); virtual const char* docstring() { ! return "%s (.) makes compound variables"; } CLASS_SYMID("DotFunc"); }; Index: ComTerp/helpfunc.c diff -c ComTerp/helpfunc.c:1.1 ComTerp/helpfunc.c:1.2 *** ComTerp/helpfunc.c:1.1 Thu Jan 4 15:31:42 2001 --- src/ComTerp/helpfunc.c Mon Apr 30 16:32:33 2001 *************** *** 30,35 **** --- 30,36 ---- #include <Attribute/attrvalue.h> #include <iostream.h> + #include <strstream.h> #define TITLE "HelpFunc" *************** *** 115,126 **** reset_stack(); filebuf fbuf; if (comterp()->handler()) { int fd = max(1, comterp()->handler()->get_handle()); fbuf.attach(fd); ! } else fbuf.attach(fileno(stdout)); ! ostream out(&fbuf); if (noargs) { --- 116,131 ---- reset_stack(); filebuf fbuf; + strstreambuf sbuf; if (comterp()->handler()) { int fd = max(1, comterp()->handler()->get_handle()); fbuf.attach(fd); ! } ! #if 0 ! else fbuf.attach(fileno(stdout)); ! #endif ! ostream out(comterp()->handler() ? &fbuf : &sbuf); if (noargs) { *************** *** 179,184 **** --- 184,197 ---- } } } + } + + + if (!comterp()->handler()) { + out << '\0'; + int help_str_symid = symbol_add(sbuf.str()); + ComValue retval(sbuf.str()); + push_stack(retval); } delete command_ids; Index: OverlayUnidraw/ovkit.c diff -c OverlayUnidraw/ovkit.c:1.1 OverlayUnidraw/ovkit.c:1.2 *** OverlayUnidraw/ovkit.c:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovkit.c Mon Apr 30 16:32:47 2001 *************** *** 201,206 **** --- 201,207 ---- _clr_button_flag = false; _tg = nil; _toolbar_vbox = nil; + _appname = nil; } OverlayKit::~OverlayKit() { *************** *** 279,284 **** --- 280,286 ---- } void OverlayKit::InitLayout(OverlayKit* kit, const char* name) { + kit->_appname = name; OverlayEditor* ed = kit->GetEditor(); Catalog* catalog = unidraw->GetCatalog(); const char* stripped_string = catalog->GetAttribute("stripped"); *************** *** 347,352 **** --- 349,355 ---- (OverlayEditor*)ed, &OverlayEditor::ClearText )) : nil; Glyph* buttonbox = nil; + if (set && !clear) { buttonbox = lk.vbox( *************** *** 384,394 **** --- 387,401 ---- lk.vcenter( lk.margin( lk.vbox( + #if 0 wk.label("type help"), lk.vspace(10), wk.label("to print"), lk.vspace(10), wk.label("info to stdout") + #else + kit->appicon() + #endif ), 10 ) *************** *** 407,412 **** --- 414,431 ---- w->style(s); } + } + + + Glyph* OverlayKit::appicon() { + const LayoutKit& lk = *LayoutKit::instance(); + WidgetKit& wk = *WidgetKit::instance(); + return lk.vbox(lk.hcenter(wk.label("ivtools")), + lk.hcenter(wk.label(this->appname())), + lk.vspace(20), + lk.hcenter(wk.label("type help for list of")), + lk.hcenter(wk.label("keyboard commands")) + ); } Glyph* OverlayKit::MakeStates() { Index: OverlayUnidraw/ovkit.h diff -c OverlayUnidraw/ovkit.h:1.1 OverlayUnidraw/ovkit.h:1.2 *** OverlayUnidraw/ovkit.h:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovkit.h Mon Apr 30 16:32:47 2001 *************** *** 141,146 **** --- 141,153 ---- static boolean bincheck(const char* name); // static method for testing for URL prefix on pathname. Returns true if found. + virtual Glyph* appicon(); + // glyph to use for application icon. + virtual const char* appname() { return _appname; } + // get name of application. + virtual void appname(const char* name) { _appname=name; } + // set name of application. + void MouseDoc(const char*); // set current mouse documentation string on the editor. *************** *** 229,234 **** --- 236,242 ---- char* _otherdisplay; boolean _set_button_flag; boolean _clr_button_flag; + const char* _appname; protected: static OverlayKit* _overlaykit; Index: ComUnidraw/grdotfunc.h diff -c ComUnidraw/grdotfunc.h:1.1 ComUnidraw/grdotfunc.h:1.2 *** ComUnidraw/grdotfunc.h:1.1 Thu Jan 4 15:33:09 2001 --- src/ComUnidraw/grdotfunc.h Mon Apr 30 16:32:48 2001 *************** *** 37,43 **** virtual void execute(); virtual const char* docstring() { ! return "%s(. makes compound variables, and gives access to ComponentView AttributeList's."; } CLASS_SYMID("GrDotFunc"); }; --- 37,43 ---- virtual void execute(); virtual const char* docstring() { ! return "%s(.) makes compound variables, and gives access to ComponentView AttributeList's."; } CLASS_SYMID("GrDotFunc"); }; Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.3 ComUnidraw/unifunc.c:1.4 *** ComUnidraw/unifunc.c:1.3 Mon Apr 30 12:22:25 2001 --- src/ComUnidraw/unifunc.c Mon Apr 30 16:32:49 2001 *************** *** 403,410 **** reset_stack(); OverlayEditor* ed = (OverlayEditor*)GetEditor(); OverlayComp* comp = ed->overlay_kit()->add_tool_button(pathnamev.symbol_ptr()); ! ComValue retval(comp->classid(), new ComponentView(comp)); ! retval.object_compview(true); ! push_stack(retval); } --- 403,414 ---- reset_stack(); OverlayEditor* ed = (OverlayEditor*)GetEditor(); OverlayComp* comp = ed->overlay_kit()->add_tool_button(pathnamev.symbol_ptr()); ! if (comp) { ! ComValue retval(comp->classid(), new ComponentView(comp)); ! retval.object_compview(true); ! push_stack(retval); ! } else { ! push_stack(ComValue::nullval()); ! } } Index: FrameUnidraw/frameeditor.c diff -c FrameUnidraw/frameeditor.c:1.1 FrameUnidraw/frameeditor.c:1.2 *** FrameUnidraw/frameeditor.c:1.1 Thu Jan 4 15:33:12 2001 --- src/FrameUnidraw/frameeditor.c Mon Apr 30 16:32:50 2001 *************** *** 68,74 **** FrameEditor::FrameEditor(OverlayComp* gc, OverlayKit* ok) : ComEditor(false, ok) { ! Init(gc); } FrameEditor::FrameEditor(const char* file, OverlayKit* ok) --- 68,74 ---- FrameEditor::FrameEditor(OverlayComp* gc, OverlayKit* ok) : ComEditor(false, ok) { ! Init(gc, ok->appname()); } FrameEditor::FrameEditor(const char* file, OverlayKit* ok) *** /dev/null Mon Apr 30 16:32:59 PDT 2001 --- patches/ivtools-010430-johnston-017 *************** patches/ivtools-010430-johnston-017 *** 0 **** --- 1 ---- + ivtools-010430-johnston-017 |
From: <ivt...@li...> - 2001-05-02 18:29:44
|
Patch: ivtools-010501-johnston-018 For: ivtools-0.9.2 Author: joh...@us... Subject: add export func to comdraw Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - check that anAttributeValue is_object() or is_command() before returning the void* pointer associated with some C++ object. - add export func to comdraw: with ACE: export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- export in drawtool format without ACE: export(compview[,compview[,...compview]] [path] :string|:str) -- export in drawtool format "; Index: Attribute/attrvalue.c diff -c Attribute/attrvalue.c:1.1 Attribute/attrvalue.c:1.2 *** Attribute/attrvalue.c:1.1 Thu Jan 4 15:31:38 2001 --- src/Attribute/attrvalue.c Tue May 1 14:50:06 2001 *************** *** 565,571 **** } void* AttributeValue::obj_val() { ! return obj_ref(); } unsigned int AttributeValue::obj_type_val() { --- 565,571 ---- } void* AttributeValue::obj_val() { ! return is_object()||is_command() ? obj_ref() : nil; } unsigned int AttributeValue::obj_type_val() { Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.2 ComUnidraw/comeditor.c:1.3 *** ComUnidraw/comeditor.c:1.2 Mon Apr 30 12:07:29 2001 --- src/ComUnidraw/comeditor.c Tue May 1 14:50:25 2001 *************** *** 181,188 **** if (OverlayKit::bincheck("plotmtv")) comterp->add_command("barplot", new BarPlotFunc(comterp, this)); - comterp->add_command("import", new ImportFunc(comterp, this)); comterp->add_command("save", new SaveFileFunc(comterp, this)); comterp->add_command("dot", new GrDotFunc(comterp)); comterp->add_command("attrlist", new GrAttrListFunc(comterp)); --- 181,189 ---- if (OverlayKit::bincheck("plotmtv")) comterp->add_command("barplot", new BarPlotFunc(comterp, this)); comterp->add_command("save", new SaveFileFunc(comterp, this)); + comterp->add_command("import", new ImportFunc(comterp, this)); + comterp->add_command("export", new ExportFunc(comterp, this)); comterp->add_command("dot", new GrDotFunc(comterp)); comterp->add_command("attrlist", new GrAttrListFunc(comterp)); Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.4 ComUnidraw/unifunc.c:1.5 *** ComUnidraw/unifunc.c:1.4 Mon Apr 30 16:32:49 2001 --- src/ComUnidraw/unifunc.c Tue May 1 14:50:25 2001 *************** *** 26,35 **** --- 26,37 ---- #include <ComUnidraw/unifunc.h> #include <OverlayUnidraw/ovcatalog.h> #include <OverlayUnidraw/ovcmds.h> + #include <OverlayUnidraw/ovclasses.h> #include <OverlayUnidraw/ovcomps.h> #include <OverlayUnidraw/ovimport.h> #include <OverlayUnidraw/ovselection.h> #include <OverlayUnidraw/ovviews.h> + #include <OverlayUnidraw/scriptview.h> #include <ComGlyph/comtextedit.h> #include <ComGlyph/comtextview.h> #include <Unidraw/clipboard.h> *************** *** 308,313 **** --- 310,461 ---- inlist->Next(it); } } + } + + /*****************************************************************************/ + + ExportFunc::ExportFunc(ComTerp* comterp, Editor* editor, + const char* appname) : + UnidrawFunc(comterp, editor) + { + _appname = appname; + _docstring = nil; + } + + const char* ExportFunc::docstring() { + const char* df = + #ifdef HAVE_ACE + "%s(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- export in %s format "; + #else + "%s(compview[,compview[,...compview]] [path] :string|:str) -- export in %s format "; + #endif + if (!_docstring) { + _docstring = new char[strlen(df)+strlen(appname())+1]; + sprintf(_docstring, df, "%s", appname() ); + } + return _docstring; + } + + void ExportFunc::execute() { + static int _host_symid = symbol_add("host"); + static int _port_symid = symbol_add("port"); + static int _sock_symid = symbol_add("socket"); + static int _string_symid = symbol_add("string"); + static int _str_symid = symbol_add("str"); + ComValue compviewv(stack_arg(0)); + ComValue file(stack_arg(1)); + ComValue host(stack_key(_host_symid)); + ComValue port(stack_key(_port_symid)); + ComValue sock(stack_key(_sock_symid)); + ComValue string(stack_key(_string_symid)); + ComValue str(stack_key(_str_symid)); + reset_stack(); + if (nargs()==0 || compviewv.null() + || compviewv.type() == ComValue::BlankType) { + push_stack(ComValue::nullval()); + return; + } + + #ifdef HAVE_ACE + ACE_SOCK_Stream* socket = nil; + #endif + + filebuf fbuf; + if (file.is_type(ComValue::StringType)) + fbuf.open(file.string_ptr(), "w"); + + else if (sock.is_true()) { + #ifdef HAVE_ACE + ComTerpServ* terp = (ComTerpServ*)comterp(); + ComterpHandler* handler = (ComterpHandler*)terp->handler(); + if (handler) { + ACE_SOCK_Stream peer = handler->peer(); + fbuf.attach(peer.get_handle()); + } + else + #endif + fbuf.attach(fileno(stdout)); + } + + else { + #ifdef HAVE_ACE + const char* hoststr = nil; + const char* portstr = nil; + hoststr = host.type()==ComValue::StringType ? host.string_ptr() : nil; + portstr = port.type()==ComValue::StringType ? port.string_ptr() : nil; + u_short portnum = portstr ? atoi(portstr) : port.ushort_val(); + + if (portnum) { + socket = new ACE_SOCK_Stream; + ACE_SOCK_Connector conn; + ACE_INET_Addr addr (portnum, hoststr); + + if (conn.connect (*socket, addr) == -1) + ACE_ERROR ((LM_ERROR, "%p\n", "open")); + fbuf.attach(socket->get_handle()); + } else if (comterp()->handler() && comterp()->handler()->get_handle()>-1) { + fbuf.attach(comterp()->handler()->get_handle()); + } else + #endif + fbuf.attach(fileno(stdout)); + } + + ostream* out; + if (string.is_true()||str.is_true()) + out = new strstream(); + else + out = new ostream(&fbuf); + + if (!compviewv.is_array()) { + + ComponentView* view = (ComponentView*)compviewv.obj_val(); + OverlayComp* comp = view ? (OverlayComp*)view->GetSubject() : nil; + if (!comp) return; + *out << appname() << "(\n"; + compout(comp, out); + *out << ")\n"; + + } else { + + *out << appname() << "(\n"; + AttributeValueList* avl = compviewv.array_val(); + Iterator i; + for(avl->First(i);!avl->Done(i); ) { + ComponentView* view = (ComponentView*)avl->GetAttrVal(i)->obj_val(); + OverlayComp* comp = view ? (OverlayComp*)view->GetSubject() : nil; + if (!comp) break; + compout(comp, out); + avl->Next(i); + if (!avl->Done(i)) *out << ",\n"; + } + *out << ")\n"; + } + + if (string.is_true()||str.is_true()) { + *out << '\0'; out->flush(); + ComValue retval(((strstream*)out)->str()); + push_stack(retval); + } + delete out; + + #ifdef HAVE_ACE + if (sock.is_false() && socket) { + if (socket->close () == -1) + ACE_ERROR ((LM_ERROR, "%p\n", "close")); + delete(socket); + } + #endif + } + + void ExportFunc::compout(OverlayComp* comp, ostream* out) { + OverlayScript* ovsv = (OverlayScript*) comp->Create(SCRIPT_VIEW); + comp->Attach(ovsv); + ovsv->Update(); + ovsv->Definition(*out); + delete ovsv; + AttributeList* attrlist = comp->GetAttributeList(); + *out << *attrlist; + out->flush(); } /*****************************************************************************/ Index: ComUnidraw/unifunc.h diff -c ComUnidraw/unifunc.h:1.3 ComUnidraw/unifunc.h:1.4 *** ComUnidraw/unifunc.h:1.3 Mon Apr 30 12:11:34 2001 --- src/ComUnidraw/unifunc.h Tue May 1 14:50:25 2001 *************** *** 30,35 **** --- 30,36 ---- class Command; class ComTerp; + class OverlayComp; class OvImportCmd; class OvSaveCompCmd; class OverlayCatalog; *************** *** 132,137 **** --- 133,157 ---- virtual const char* docstring() { return "compview=%s(pathname :popen) -- import graphic file from pathname or URL, or from a command if :popen"; } + }; + + //: command to export a graphic file + // export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- remote in drawtool (or other) format "; + class ExportFunc : public UnidrawFunc { + public: + ExportFunc(ComTerp* c, Editor* e, const char* appname=nil); + virtual ~ExportFunc() { delete _docstring; } + virtual void execute(); + virtual const char* docstring(); + const char* appname() { return _appname ? _appname : "drawtool"; } + void appname(const char* name) + { _appname = name; delete _docstring; _docstring=nil;} + + protected: + void compout(OverlayComp*, ostream*); + + const char* _appname; + char* _docstring; }; //: command to set attributes on a graphic Index: comdraw/README diff -c comdraw/README:1.2 comdraw/README:1.3 *** comdraw/README:1.2 Mon Apr 30 12:07:30 2001 --- src/comdraw/README Tue May 1 14:50:27 2001 *************** *** 84,89 **** --- 84,90 ---- error=save([pathstr]) -- command to save document (to pathname) compview=import(pathstr :popen) -- import graphic file from pathname or URL, or from a command if :popen + export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- remote in drawtool (or other) format compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics compview=addtool(pathname) -- add button to toolbar based on zero-centered idraw drawing. Index: man1_ivtools/comdraw.1 diff -c man1_ivtools/comdraw.1:1.2 man1_ivtools/comdraw.1:1.3 *** man1_ivtools/comdraw.1:1.2 Mon Apr 30 12:07:40 2001 --- src/man/man1/comdraw.1 Tue May 1 14:50:37 2001 *************** *** 92,97 **** --- 92,98 ---- error=save([pathstr]) -- command to save document (to pathname) compview=import(pathstr :popen) -- import graphic file from pathname or URL, or from a command if :popen + export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- remote in drawtool (or other) format compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics *** /dev/null Tue May 1 14:50:40 PDT 2001 --- patches/ivtools-010501-johnston-018 *************** patches/ivtools-010501-johnston-018 *** 0 **** --- 1 ---- + ivtools-010501-johnston-018 |
From: <ivt...@li...> - 2001-05-01 22:40:18
|
Patch: ivtools-010501-johnston-018 For: ivtools-0.9.2 Author: joh...@us... Subject: Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - check that anAttributeValue is_object() or is_command() before returning the void* pointer associated with some C++ object. - add export func to comdraw: with ACE: export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- export in drawtool format without ACE: export(compview[,compview[,...compview]] [path] :string|:str) -- export in drawtool format "; Index: Attribute/attrvalue.c diff -c Attribute/attrvalue.c:1.1 Attribute/attrvalue.c:1.2 *** Attribute/attrvalue.c:1.1 Thu Jan 4 15:31:38 2001 --- src/Attribute/attrvalue.c Tue May 1 14:50:06 2001 *************** *** 565,571 **** } void* AttributeValue::obj_val() { ! return obj_ref(); } unsigned int AttributeValue::obj_type_val() { --- 565,571 ---- } void* AttributeValue::obj_val() { ! return is_object()||is_command() ? obj_ref() : nil; } unsigned int AttributeValue::obj_type_val() { Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.2 ComUnidraw/comeditor.c:1.3 *** ComUnidraw/comeditor.c:1.2 Mon Apr 30 12:07:29 2001 --- src/ComUnidraw/comeditor.c Tue May 1 14:50:25 2001 *************** *** 181,188 **** if (OverlayKit::bincheck("plotmtv")) comterp->add_command("barplot", new BarPlotFunc(comterp, this)); - comterp->add_command("import", new ImportFunc(comterp, this)); comterp->add_command("save", new SaveFileFunc(comterp, this)); comterp->add_command("dot", new GrDotFunc(comterp)); comterp->add_command("attrlist", new GrAttrListFunc(comterp)); --- 181,189 ---- if (OverlayKit::bincheck("plotmtv")) comterp->add_command("barplot", new BarPlotFunc(comterp, this)); comterp->add_command("save", new SaveFileFunc(comterp, this)); + comterp->add_command("import", new ImportFunc(comterp, this)); + comterp->add_command("export", new ExportFunc(comterp, this)); comterp->add_command("dot", new GrDotFunc(comterp)); comterp->add_command("attrlist", new GrAttrListFunc(comterp)); Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.4 ComUnidraw/unifunc.c:1.5 *** ComUnidraw/unifunc.c:1.4 Mon Apr 30 16:32:49 2001 --- src/ComUnidraw/unifunc.c Tue May 1 14:50:25 2001 *************** *** 26,35 **** --- 26,37 ---- #include <ComUnidraw/unifunc.h> #include <OverlayUnidraw/ovcatalog.h> #include <OverlayUnidraw/ovcmds.h> + #include <OverlayUnidraw/ovclasses.h> #include <OverlayUnidraw/ovcomps.h> #include <OverlayUnidraw/ovimport.h> #include <OverlayUnidraw/ovselection.h> #include <OverlayUnidraw/ovviews.h> + #include <OverlayUnidraw/scriptview.h> #include <ComGlyph/comtextedit.h> #include <ComGlyph/comtextview.h> #include <Unidraw/clipboard.h> *************** *** 308,313 **** --- 310,461 ---- inlist->Next(it); } } + } + + /*****************************************************************************/ + + ExportFunc::ExportFunc(ComTerp* comterp, Editor* editor, + const char* appname) : + UnidrawFunc(comterp, editor) + { + _appname = appname; + _docstring = nil; + } + + const char* ExportFunc::docstring() { + const char* df = + #ifdef HAVE_ACE + "%s(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- export in %s format "; + #else + "%s(compview[,compview[,...compview]] [path] :string|:str) -- export in %s format "; + #endif + if (!_docstring) { + _docstring = new char[strlen(df)+strlen(appname())+1]; + sprintf(_docstring, df, "%s", appname() ); + } + return _docstring; + } + + void ExportFunc::execute() { + static int _host_symid = symbol_add("host"); + static int _port_symid = symbol_add("port"); + static int _sock_symid = symbol_add("socket"); + static int _string_symid = symbol_add("string"); + static int _str_symid = symbol_add("str"); + ComValue compviewv(stack_arg(0)); + ComValue file(stack_arg(1)); + ComValue host(stack_key(_host_symid)); + ComValue port(stack_key(_port_symid)); + ComValue sock(stack_key(_sock_symid)); + ComValue string(stack_key(_string_symid)); + ComValue str(stack_key(_str_symid)); + reset_stack(); + if (nargs()==0 || compviewv.null() + || compviewv.type() == ComValue::BlankType) { + push_stack(ComValue::nullval()); + return; + } + + #ifdef HAVE_ACE + ACE_SOCK_Stream* socket = nil; + #endif + + filebuf fbuf; + if (file.is_type(ComValue::StringType)) + fbuf.open(file.string_ptr(), "w"); + + else if (sock.is_true()) { + #ifdef HAVE_ACE + ComTerpServ* terp = (ComTerpServ*)comterp(); + ComterpHandler* handler = (ComterpHandler*)terp->handler(); + if (handler) { + ACE_SOCK_Stream peer = handler->peer(); + fbuf.attach(peer.get_handle()); + } + else + #endif + fbuf.attach(fileno(stdout)); + } + + else { + #ifdef HAVE_ACE + const char* hoststr = nil; + const char* portstr = nil; + hoststr = host.type()==ComValue::StringType ? host.string_ptr() : nil; + portstr = port.type()==ComValue::StringType ? port.string_ptr() : nil; + u_short portnum = portstr ? atoi(portstr) : port.ushort_val(); + + if (portnum) { + socket = new ACE_SOCK_Stream; + ACE_SOCK_Connector conn; + ACE_INET_Addr addr (portnum, hoststr); + + if (conn.connect (*socket, addr) == -1) + ACE_ERROR ((LM_ERROR, "%p\n", "open")); + fbuf.attach(socket->get_handle()); + } else if (comterp()->handler() && comterp()->handler()->get_handle()>-1) { + fbuf.attach(comterp()->handler()->get_handle()); + } else + #endif + fbuf.attach(fileno(stdout)); + } + + ostream* out; + if (string.is_true()||str.is_true()) + out = new strstream(); + else + out = new ostream(&fbuf); + + if (!compviewv.is_array()) { + + ComponentView* view = (ComponentView*)compviewv.obj_val(); + OverlayComp* comp = view ? (OverlayComp*)view->GetSubject() : nil; + if (!comp) return; + *out << appname() << "(\n"; + compout(comp, out); + *out << ")\n"; + + } else { + + *out << appname() << "(\n"; + AttributeValueList* avl = compviewv.array_val(); + Iterator i; + for(avl->First(i);!avl->Done(i); ) { + ComponentView* view = (ComponentView*)avl->GetAttrVal(i)->obj_val(); + OverlayComp* comp = view ? (OverlayComp*)view->GetSubject() : nil; + if (!comp) break; + compout(comp, out); + avl->Next(i); + if (!avl->Done(i)) *out << ",\n"; + } + *out << ")\n"; + } + + if (string.is_true()||str.is_true()) { + *out << '\0'; out->flush(); + ComValue retval(((strstream*)out)->str()); + push_stack(retval); + } + delete out; + + #ifdef HAVE_ACE + if (sock.is_false() && socket) { + if (socket->close () == -1) + ACE_ERROR ((LM_ERROR, "%p\n", "close")); + delete(socket); + } + #endif + } + + void ExportFunc::compout(OverlayComp* comp, ostream* out) { + OverlayScript* ovsv = (OverlayScript*) comp->Create(SCRIPT_VIEW); + comp->Attach(ovsv); + ovsv->Update(); + ovsv->Definition(*out); + delete ovsv; + AttributeList* attrlist = comp->GetAttributeList(); + *out << *attrlist; + out->flush(); } /*****************************************************************************/ Index: ComUnidraw/unifunc.h diff -c ComUnidraw/unifunc.h:1.3 ComUnidraw/unifunc.h:1.4 *** ComUnidraw/unifunc.h:1.3 Mon Apr 30 12:11:34 2001 --- src/ComUnidraw/unifunc.h Tue May 1 14:50:25 2001 *************** *** 30,35 **** --- 30,36 ---- class Command; class ComTerp; + class OverlayComp; class OvImportCmd; class OvSaveCompCmd; class OverlayCatalog; *************** *** 132,137 **** --- 133,157 ---- virtual const char* docstring() { return "compview=%s(pathname :popen) -- import graphic file from pathname or URL, or from a command if :popen"; } + }; + + //: command to export a graphic file + // export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- remote in drawtool (or other) format "; + class ExportFunc : public UnidrawFunc { + public: + ExportFunc(ComTerp* c, Editor* e, const char* appname=nil); + virtual ~ExportFunc() { delete _docstring; } + virtual void execute(); + virtual const char* docstring(); + const char* appname() { return _appname ? _appname : "drawtool"; } + void appname(const char* name) + { _appname = name; delete _docstring; _docstring=nil;} + + protected: + void compout(OverlayComp*, ostream*); + + const char* _appname; + char* _docstring; }; //: command to set attributes on a graphic Index: comdraw/README diff -c comdraw/README:1.2 comdraw/README:1.3 *** comdraw/README:1.2 Mon Apr 30 12:07:30 2001 --- src/comdraw/README Tue May 1 14:50:27 2001 *************** *** 84,89 **** --- 84,90 ---- error=save([pathstr]) -- command to save document (to pathname) compview=import(pathstr :popen) -- import graphic file from pathname or URL, or from a command if :popen + export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- remote in drawtool (or other) format compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics compview=addtool(pathname) -- add button to toolbar based on zero-centered idraw drawing. Index: man1_ivtools/comdraw.1 diff -c man1_ivtools/comdraw.1:1.2 man1_ivtools/comdraw.1:1.3 *** man1_ivtools/comdraw.1:1.2 Mon Apr 30 12:07:40 2001 --- src/man/man1/comdraw.1 Tue May 1 14:50:37 2001 *************** *** 92,97 **** --- 92,98 ---- error=save([pathstr]) -- command to save document (to pathname) compview=import(pathstr :popen) -- import graphic file from pathname or URL, or from a command if :popen + export(compview[,compview[,...compview]] [path] :host host_str :port port_int :socket :string|:str) -- remote in drawtool (or other) format compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics *** /dev/null Tue May 1 14:50:40 PDT 2001 --- patches/ivtools-010501-johnston-018 *************** patches/ivtools-010501-johnston-018 *** 0 **** --- 1 ---- + ivtools-010501-johnston-018 |
From: <ivt...@li...> - 2001-04-30 23:38:17
|
Patch: ivtools-010430-johnston-015 For: ivtools-0.9.2 Author: joh...@us... Subject: add save func to comdraw Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - add save func to comdraw: error=save([path]) -- save editor document (to pathname) With no argument it saves using the current document name. If none is current the SaveAs dialog box pops up. If the file already exists a warning dialog box pops up. If the current document is unmodified the func returns zero without doing anything. With a pathname argument it always tries to save to the document to that file, returning zero if the save doesn't work (at least it will after a bug is fixed). If the file already exists a warning dialog box pops up. Index: OverlayUnidraw/ovcmds.c diff -c OverlayUnidraw/ovcmds.c:1.1 OverlayUnidraw/ovcmds.c:1.2 *** OverlayUnidraw/ovcmds.c:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovcmds.c Mon Apr 30 12:07:27 2001 *************** *** 85,90 **** --- 85,91 ---- #include <stdlib.h> #include <string.h> #include <fstream.h> + #include <iostream.h> /*****************************************************************************/ *************** *** 399,404 **** --- 400,406 ---- } void OvSaveCompCmd::Init (OpenFileChooser* f) { + comp_ = nil; chooser_ = f; Resource::ref(chooser_); } *************** *** 415,437 **** CompNameVar* compNameVar = (CompNameVar*) ed->GetState("CompNameVar"); const char* name = (compNameVar == nil) ? nil : compNameVar->GetName(); if (name == nil) { OvSaveCompAsCmd saveCompAs(ed, chooser_); saveCompAs.Execute(); - } else if (modifVar == nil || modifVar->GetModifStatus()) { Catalog* catalog = unidraw->GetCatalog(); - Component* comp; ! if (catalog->Retrieve(name, comp) && catalog->Save(comp, name)) { if (modifVar != nil) modifVar->SetModifStatus(false); ! unidraw->ClearHistory(comp); ! } else { OvSaveCompAsCmd saveCompAs(ed, chooser_); saveCompAs.Execute(); } ! } } /*****************************************************************************/ --- 417,440 ---- CompNameVar* compNameVar = (CompNameVar*) ed->GetState("CompNameVar"); const char* name = (compNameVar == nil) ? nil : compNameVar->GetName(); + comp_ = ed->GetComponent(); if (name == nil) { OvSaveCompAsCmd saveCompAs(ed, chooser_); saveCompAs.Execute(); } else if (modifVar == nil || modifVar->GetModifStatus()) { Catalog* catalog = unidraw->GetCatalog(); ! if (catalog->Retrieve(name, comp_) && catalog->Save(comp_, name)) { if (modifVar != nil) modifVar->SetModifStatus(false); ! unidraw->ClearHistory(comp_); } else { OvSaveCompAsCmd saveCompAs(ed, chooser_); saveCompAs.Execute(); + comp_ = saveCompAs.component(); } ! } else ! comp_ = nil; ! } /*****************************************************************************/ *************** *** 455,460 **** --- 458,465 ---- } void OvSaveCompAsCmd::Init (OpenFileChooser* f) { + comp_ = nil; + path_ = nil; chooser_ = f; Resource::ref(chooser_); } *************** *** 467,472 **** --- 472,478 ---- void OvSaveCompAsCmd::Execute () { Editor* ed = GetEditor(); + comp_ = nil; char buf[CHARBUFSIZE]; const char* domain = unidraw->GetCatalog()->GetAttribute("domain"); *************** *** 477,483 **** Style* style = new Style(Session::instance()->style()); style->attribute("subcaption", buf); style->attribute("open", "Save"); ! if (chooser_ == nil) { style = new Style(Session::instance()->style()); style->attribute("subcaption", "Save to file:"); style->attribute("open", "Save"); --- 483,489 ---- Style* style = new Style(Session::instance()->style()); style->attribute("subcaption", buf); style->attribute("open", "Save"); ! if (!path_ && chooser_ == nil) { style = new Style(Session::instance()->style()); style->attribute("subcaption", "Save to file:"); style->attribute("open", "Save"); *************** *** 485,499 **** Resource::ref(chooser_); } boolean again; ! while (again = chooser_->post_for(ed->GetWindow())) { ! const String* str = chooser_->selected(); ! NullTerminatedString ns(*str); ! const char* name = ns.string(); OverlayCatalog* catalog = (OverlayCatalog*)unidraw->GetCatalog(); boolean ok = true; ! style->attribute("caption", " " ); ! chooser_->twindow()->repair(); ! chooser_->twindow()->display()->sync(); if (catalog->Exists(name) && catalog->Writable(name)) { char buf[CHARBUFSIZE]; --- 491,512 ---- Resource::ref(chooser_); } boolean again; ! while (path_ || (again = chooser_->post_for(ed->GetWindow()))) { ! const char* name; ! if (path_) { ! name = path_; ! } else { ! const String* str = chooser_->selected(); ! NullTerminatedString ns(*str); ! name = ns.string(); ! } OverlayCatalog* catalog = (OverlayCatalog*)unidraw->GetCatalog(); boolean ok = true; ! if (!path_) { ! style->attribute("caption", " " ); ! chooser_->twindow()->repair(); ! chooser_->twindow()->display()->sync(); ! } if (catalog->Exists(name) && catalog->Writable(name)) { char buf[CHARBUFSIZE]; *************** *** 507,559 **** if (ok) { CompNameVar* cnv = (CompNameVar*) ed->GetState("CompNameVar"); const char* oldname = (cnv == nil) ? nil : cnv->GetName(); ! Component* comp = ed->GetComponent(); if (catalog->Exists(name) && !catalog->Writable(name)) { style->attribute("caption", "Couldn't save to file!" ); } else { if (oldname == nil) { ! comp = comp->GetRoot(); } else { ! catalog->Retrieve(oldname, comp); ! catalog->Forget(comp); } StateVar* sv = ed->GetState("ModifStatusVar"); ModifStatusVar* mv = (ModifStatusVar*) sv; ! if (chooser_->saveas_chooser()) { SaveAsChooser* sac = (SaveAsChooser*)chooser_; catalog->SetCompactions(sac->gs_compacted(), sac->pts_compacted(), sac->pic_compacted()); } ! ed->GetWindow()->cursor(hourglass); ! chooser_->twindow()->cursor(hourglass); ! if (catalog->Save(comp, name)) { if (mv != nil) mv->SetModifStatus(false); ! unidraw->ClearHistory(comp); UpdateCompNameVars(); ed->GetWindow()->cursor(arrow); break; } else { if (mv != nil) mv->Notify(); UpdateCompNameVars(); ! style->attribute("caption", "Couldn't save to file" ); ! reset_caption = true; ! ed->GetWindow()->cursor(arrow); ! chooser_->twindow()->cursor(arrow); } } } } ! chooser_->unmap(); if (reset_caption) { style->attribute("caption", " " ); } if (!again) ed->GetWindow()->cursor(arrow); } /*****************************************************************************/ --- 520,581 ---- if (ok) { CompNameVar* cnv = (CompNameVar*) ed->GetState("CompNameVar"); const char* oldname = (cnv == nil) ? nil : cnv->GetName(); ! comp_ = ed->GetComponent(); if (catalog->Exists(name) && !catalog->Writable(name)) { style->attribute("caption", "Couldn't save to file!" ); } else { if (oldname == nil) { ! comp_ = comp_->GetRoot(); } else { ! catalog->Retrieve(oldname, comp_); ! catalog->Forget(comp_); } StateVar* sv = ed->GetState("ModifStatusVar"); ModifStatusVar* mv = (ModifStatusVar*) sv; ! if (!path_ && chooser_->saveas_chooser()) { SaveAsChooser* sac = (SaveAsChooser*)chooser_; catalog->SetCompactions(sac->gs_compacted(), sac->pts_compacted(), sac->pic_compacted()); } ! if (!path_) { ! ed->GetWindow()->cursor(hourglass); ! chooser_->twindow()->cursor(hourglass); ! } ! if (catalog->Save(comp_, name)) { if (mv != nil) mv->SetModifStatus(false); ! unidraw->ClearHistory(comp_); UpdateCompNameVars(); ed->GetWindow()->cursor(arrow); break; } else { if (mv != nil) mv->Notify(); UpdateCompNameVars(); ! if (path_) { ! style->attribute("caption", "Couldn't save to file" ); ! reset_caption = true; ! ed->GetWindow()->cursor(arrow); ! chooser_->twindow()->cursor(arrow); ! } } } } + if (path_) break; } ! if (!path_) chooser_->unmap(); if (reset_caption) { style->attribute("caption", " " ); } if (!again) ed->GetWindow()->cursor(arrow); + } + + void OvSaveCompAsCmd::pathname(const char* path) { + path_ = path ? strdup(path) : nil; } /*****************************************************************************/ Index: OverlayUnidraw/ovcmds.h diff -c OverlayUnidraw/ovcmds.h:1.1 OverlayUnidraw/ovcmds.h:1.2 *** OverlayUnidraw/ovcmds.h:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovcmds.h Mon Apr 30 12:07:27 2001 *************** *** 43,48 **** --- 43,49 ---- class OpenFileChooser; class OverlayViewer; class PageDialog; + class istream; class ostream; //: derived new command. *************** *** 120,129 **** --- 121,135 ---- virtual ClassId GetClassId(); virtual boolean IsA(ClassId); + Component* component() { return comp_; } + // return pointer to saved component. + protected: OpenFileChooser* chooser_; void Init(OpenFileChooser*); + + Component* comp_; }; //: derived save-as command. *************** *** 140,150 **** virtual Command* Copy(); virtual ClassId GetClassId(); ! protected: OpenFileChooser* chooser_; void Init(OpenFileChooser*); virtual boolean IsA(ClassId); }; //: derived quit command. --- 146,165 ---- virtual Command* Copy(); virtual ClassId GetClassId(); ! Component* component() { return comp_; } ! // return pointer to saved component. ! ! void pathname(const char*); ! // set pathname to save file to. ! ! protected: OpenFileChooser* chooser_; void Init(OpenFileChooser*); virtual boolean IsA(ClassId); + + char* path_; + Component* comp_; }; //: derived quit command. Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.1 ComUnidraw/comeditor.c:1.2 *** ComUnidraw/comeditor.c:1.1 Thu Jan 4 15:33:09 2001 --- src/ComUnidraw/comeditor.c Mon Apr 30 12:07:29 2001 *************** *** 182,187 **** --- 182,188 ---- comterp->add_command("barplot", new BarPlotFunc(comterp, this)); comterp->add_command("import", new ImportFunc(comterp, this)); + comterp->add_command("save", new SaveFileFunc(comterp, this)); comterp->add_command("dot", new GrDotFunc(comterp)); comterp->add_command("attrlist", new GrAttrListFunc(comterp)); Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.1 ComUnidraw/unifunc.c:1.2 *** ComUnidraw/unifunc.c:1.1 Thu Jan 4 15:33:09 2001 --- src/ComUnidraw/unifunc.c Mon Apr 30 12:07:29 2001 *************** *** 25,30 **** --- 25,31 ---- #include <ComUnidraw/comeditor.h> #include <ComUnidraw/unifunc.h> #include <OverlayUnidraw/ovcatalog.h> + #include <OverlayUnidraw/ovcmds.h> #include <OverlayUnidraw/ovcomps.h> #include <OverlayUnidraw/ovimport.h> #include <OverlayUnidraw/ovselection.h> *************** *** 216,221 **** --- 217,251 ---- al->add_attr("readonly", ComValue::trueval()); push_stack(viewval); + } + + /*****************************************************************************/ + + SaveFileFunc::SaveFileFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { + } + + Command* SaveFileFunc::save(const char* path) { + if (!path) { + OvSaveCompCmd* cmd = new OvSaveCompCmd(editor()); + cmd->Execute(); + return cmd->component() ? cmd : nil; + } else { + OvSaveCompAsCmd* cmd = new OvSaveCompAsCmd(editor()); + cmd->pathname(path); + cmd->Execute(); + return cmd->component() ? cmd : nil; + } + } + + void SaveFileFunc::execute() { + char* path = nil; + if (nargs()>0) { + ComValue pathnamev(stack_arg(0)); + path = pathnamev.string_ptr(); + } + reset_stack(); + + push_stack( save(path) ? ComValue::oneval() : ComValue::zeroval()); } /*****************************************************************************/ Index: ComUnidraw/unifunc.h diff -c ComUnidraw/unifunc.h:1.1 ComUnidraw/unifunc.h:1.2 *** ComUnidraw/unifunc.h:1.1 Thu Jan 4 15:33:09 2001 --- src/ComUnidraw/unifunc.h Mon Apr 30 12:07:29 2001 *************** *** 31,36 **** --- 31,37 ---- class Command; class ComTerp; class OvImportCmd; + class OvSaveCompCmd; class OverlayCatalog; //: base class for interpreter commands in comdraw. *************** *** 104,109 **** --- 105,123 ---- virtual void execute(); virtual const char* docstring() { return "compview=%s(compview :clear) -- set or clear the readonly attribute of a graphic component"; } + + }; + + //: command to save document (to pathname) + //error=save([path]) -- save editor document (to pathname). + class SaveFileFunc : public UnidrawFunc { + public: + SaveFileFunc(ComTerp*,Editor*); + Command* save(const char* path); + // helper method to import from path + virtual void execute(); + virtual const char* docstring() { + return "error=%s([path]) -- save editor document (to pathname)"; } }; Index: comdraw/README diff -c comdraw/README:1.1 comdraw/README:1.2 *** comdraw/README:1.1 Thu Jan 4 15:33:11 2001 --- src/comdraw/README Mon Apr 30 12:07:30 2001 *************** *** 82,87 **** --- 82,88 ---- update() -- update viewer + error=save([pathstr]) -- command to save document (to pathname) compview=import(pathstr :popen) -- import graphic file from pathname or URL, or from a command if :popen compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics Index: scripts_ivtools/ivmkmf diff -c scripts_ivtools/ivmkmf:1.1 scripts_ivtools/ivmkmf:1.2 *** scripts_ivtools/ivmkmf:1.1 Thu Jan 4 15:33:49 2001 --- src/scripts/ivmkmf Mon Apr 30 12:07:38 2001 *************** *** 27,40 **** case "$do_all" in yes) set -x ! imake -T "template" -I/usr/local/lib/ivtools/config -I/usr/local/lib/ivtools/config/.. -I/usr/X11R6/lib/X11/config -DUseInstalled && ! make Makefile ARCH=LINUX CONFIGSRC=/usr/local/lib/ivtools/config XCONFIGDIR=/usr/X11R6/lib/X11/config UseInstalled=1 && ! make Makefiles ARCH=LINUX CONFIGSRC=/usr/local/lib/ivtools/config XCONFIGDIR=/usr/X11R6/lib/X11/config UseInstalled=1 && ! make depend UseInstalled=1 ;; *) set -x ! imake -T "template" -I/usr/local/lib/ivtools/config -I/usr/local/lib/ivtools/config/.. -I/usr/X11R6/lib/X11/config -DUseInstalled ! make Makefile ARCH=LINUX CONFIGSRC=/usr/local/lib/ivtools/config XCONFIGDIR=/usr/X11R6/lib/X11/config UseInstalled=1 ;; esac --- 27,40 ---- case "$do_all" in yes) set -x ! imake -T "template" -I/home/scott/src/ivtools-0.9/config -I/usr/X11R6/lib/X11/config && ! make Makefile ARCH=LINUX CONFIGSRC=/home/scott/src/ivtools-0.9/config XCONFIGDIR=/usr/X11R6/lib/X11/config && ! make Makefiles ARCH=LINUX CONFIGSRC=/home/scott/src/ivtools-0.9/config XCONFIGDIR=/usr/X11R6/lib/X11/config && ! make depend ;; *) set -x ! imake -T "template" -I/home/scott/src/ivtools-0.9/config -I/usr/X11R6/lib/X11/config ! make Makefile ARCH=LINUX CONFIGSRC=/home/scott/src/ivtools-0.9/config XCONFIGDIR=/usr/X11R6/lib/X11/config ;; esac Index: man1_ivtools/comdraw.1 diff -c man1_ivtools/comdraw.1:1.1 man1_ivtools/comdraw.1:1.2 *** man1_ivtools/comdraw.1:1.1 Thu Jan 4 15:33:56 2001 --- src/man/man1/comdraw.1 Mon Apr 30 12:07:40 2001 *************** *** 90,95 **** --- 90,96 ---- update() -- update viewer + error=save([pathstr]) -- command to save document (to pathname) compview=import(pathstr :popen) -- import graphic file from pathname or URL, or from a command if :popen compview=paste(compview [xscale yscale xoff yoff | a00,a01,a10,a11,a20,a21]) -- paste graphic into the viewer val=pastemode([val] :get) -- toggle or set paste mode, default is 0, always paste new graphics *** /dev/null Mon Apr 30 12:07:43 PDT 2001 --- patches/ivtools-010430-johnston-015 *************** patches/ivtools-010430-johnston-015 *** 0 **** --- 1 ---- + ivtools-010430-johnston-015 |
From: <ivt...@li...> - 2001-04-30 23:36:37
|
Patch: ivtools-010430-johnston-017 For: ivtools-0.9.2 Author: joh...@us... Subject: Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - convert output of help func to a string, so it can be displayed in the keyboard command window on comdraw/graphdraw/flipbook/drawserv. - put an arbitrary glyph in the lower left, some kind of application specific icon. Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.1 ComTerp/comterp.c:1.2 *** ComTerp/comterp.c:1.1 Thu Jan 4 15:31:42 2001 --- src/ComTerp/comterp.c Mon Apr 30 16:32:33 2001 *************** *** 1076,1082 **** --- 1076,1086 ---- rowcnt = 0; out << "\n"; } else + #if 0 out << "\t"; + #else + for(int t=0; t<=tlen; t++) out << ' '; + #endif } delete funcids; } Index: ComTerp/dotfunc.h diff -c ComTerp/dotfunc.h:1.1 ComTerp/dotfunc.h:1.2 *** ComTerp/dotfunc.h:1.1 Thu Jan 4 15:31:42 2001 --- src/ComTerp/dotfunc.h Mon Apr 30 16:32:33 2001 *************** *** 37,43 **** virtual void execute(); virtual const char* docstring() { ! return ". makes compound variables"; } CLASS_SYMID("DotFunc"); }; --- 37,43 ---- virtual void execute(); virtual const char* docstring() { ! return "%s (.) makes compound variables"; } CLASS_SYMID("DotFunc"); }; Index: ComTerp/helpfunc.c diff -c ComTerp/helpfunc.c:1.1 ComTerp/helpfunc.c:1.2 *** ComTerp/helpfunc.c:1.1 Thu Jan 4 15:31:42 2001 --- src/ComTerp/helpfunc.c Mon Apr 30 16:32:33 2001 *************** *** 30,35 **** --- 30,36 ---- #include <Attribute/attrvalue.h> #include <iostream.h> + #include <strstream.h> #define TITLE "HelpFunc" *************** *** 115,126 **** reset_stack(); filebuf fbuf; if (comterp()->handler()) { int fd = max(1, comterp()->handler()->get_handle()); fbuf.attach(fd); ! } else fbuf.attach(fileno(stdout)); ! ostream out(&fbuf); if (noargs) { --- 116,131 ---- reset_stack(); filebuf fbuf; + strstreambuf sbuf; if (comterp()->handler()) { int fd = max(1, comterp()->handler()->get_handle()); fbuf.attach(fd); ! } ! #if 0 ! else fbuf.attach(fileno(stdout)); ! #endif ! ostream out(comterp()->handler() ? &fbuf : &sbuf); if (noargs) { *************** *** 179,184 **** --- 184,197 ---- } } } + } + + + if (!comterp()->handler()) { + out << '\0'; + int help_str_symid = symbol_add(sbuf.str()); + ComValue retval(sbuf.str()); + push_stack(retval); } delete command_ids; Index: OverlayUnidraw/ovkit.c diff -c OverlayUnidraw/ovkit.c:1.1 OverlayUnidraw/ovkit.c:1.2 *** OverlayUnidraw/ovkit.c:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovkit.c Mon Apr 30 16:32:47 2001 *************** *** 201,206 **** --- 201,207 ---- _clr_button_flag = false; _tg = nil; _toolbar_vbox = nil; + _appname = nil; } OverlayKit::~OverlayKit() { *************** *** 279,284 **** --- 280,286 ---- } void OverlayKit::InitLayout(OverlayKit* kit, const char* name) { + kit->_appname = name; OverlayEditor* ed = kit->GetEditor(); Catalog* catalog = unidraw->GetCatalog(); const char* stripped_string = catalog->GetAttribute("stripped"); *************** *** 347,352 **** --- 349,355 ---- (OverlayEditor*)ed, &OverlayEditor::ClearText )) : nil; Glyph* buttonbox = nil; + if (set && !clear) { buttonbox = lk.vbox( *************** *** 384,394 **** --- 387,401 ---- lk.vcenter( lk.margin( lk.vbox( + #if 0 wk.label("type help"), lk.vspace(10), wk.label("to print"), lk.vspace(10), wk.label("info to stdout") + #else + kit->appicon() + #endif ), 10 ) *************** *** 407,412 **** --- 414,431 ---- w->style(s); } + } + + + Glyph* OverlayKit::appicon() { + const LayoutKit& lk = *LayoutKit::instance(); + WidgetKit& wk = *WidgetKit::instance(); + return lk.vbox(lk.hcenter(wk.label("ivtools")), + lk.hcenter(wk.label(this->appname())), + lk.vspace(20), + lk.hcenter(wk.label("type help for list of")), + lk.hcenter(wk.label("keyboard commands")) + ); } Glyph* OverlayKit::MakeStates() { Index: OverlayUnidraw/ovkit.h diff -c OverlayUnidraw/ovkit.h:1.1 OverlayUnidraw/ovkit.h:1.2 *** OverlayUnidraw/ovkit.h:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovkit.h Mon Apr 30 16:32:47 2001 *************** *** 141,146 **** --- 141,153 ---- static boolean bincheck(const char* name); // static method for testing for URL prefix on pathname. Returns true if found. + virtual Glyph* appicon(); + // glyph to use for application icon. + virtual const char* appname() { return _appname; } + // get name of application. + virtual void appname(const char* name) { _appname=name; } + // set name of application. + void MouseDoc(const char*); // set current mouse documentation string on the editor. *************** *** 229,234 **** --- 236,242 ---- char* _otherdisplay; boolean _set_button_flag; boolean _clr_button_flag; + const char* _appname; protected: static OverlayKit* _overlaykit; Index: ComUnidraw/grdotfunc.h diff -c ComUnidraw/grdotfunc.h:1.1 ComUnidraw/grdotfunc.h:1.2 *** ComUnidraw/grdotfunc.h:1.1 Thu Jan 4 15:33:09 2001 --- src/ComUnidraw/grdotfunc.h Mon Apr 30 16:32:48 2001 *************** *** 37,43 **** virtual void execute(); virtual const char* docstring() { ! return "%s(. makes compound variables, and gives access to ComponentView AttributeList's."; } CLASS_SYMID("GrDotFunc"); }; --- 37,43 ---- virtual void execute(); virtual const char* docstring() { ! return "%s(.) makes compound variables, and gives access to ComponentView AttributeList's."; } CLASS_SYMID("GrDotFunc"); }; Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.3 ComUnidraw/unifunc.c:1.4 *** ComUnidraw/unifunc.c:1.3 Mon Apr 30 12:22:25 2001 --- src/ComUnidraw/unifunc.c Mon Apr 30 16:32:49 2001 *************** *** 403,410 **** reset_stack(); OverlayEditor* ed = (OverlayEditor*)GetEditor(); OverlayComp* comp = ed->overlay_kit()->add_tool_button(pathnamev.symbol_ptr()); ! ComValue retval(comp->classid(), new ComponentView(comp)); ! retval.object_compview(true); ! push_stack(retval); } --- 403,414 ---- reset_stack(); OverlayEditor* ed = (OverlayEditor*)GetEditor(); OverlayComp* comp = ed->overlay_kit()->add_tool_button(pathnamev.symbol_ptr()); ! if (comp) { ! ComValue retval(comp->classid(), new ComponentView(comp)); ! retval.object_compview(true); ! push_stack(retval); ! } else { ! push_stack(ComValue::nullval()); ! } } Index: FrameUnidraw/frameeditor.c diff -c FrameUnidraw/frameeditor.c:1.1 FrameUnidraw/frameeditor.c:1.2 *** FrameUnidraw/frameeditor.c:1.1 Thu Jan 4 15:33:12 2001 --- src/FrameUnidraw/frameeditor.c Mon Apr 30 16:32:50 2001 *************** *** 68,74 **** FrameEditor::FrameEditor(OverlayComp* gc, OverlayKit* ok) : ComEditor(false, ok) { ! Init(gc); } FrameEditor::FrameEditor(const char* file, OverlayKit* ok) --- 68,74 ---- FrameEditor::FrameEditor(OverlayComp* gc, OverlayKit* ok) : ComEditor(false, ok) { ! Init(gc, ok->appname()); } FrameEditor::FrameEditor(const char* file, OverlayKit* ok) *** /dev/null Mon Apr 30 16:32:59 PDT 2001 --- patches/ivtools-010430-johnston-017 *************** patches/ivtools-010430-johnston-017 *** 0 **** --- 1 ---- + ivtools-010430-johnston-017 |
From: <ivt...@li...> - 2001-04-30 19:27:03
|
Patch: ivtools-010430-johnston-016 For: ivtools-0.9.2 Author: joh...@us... Subject: fix bug in new comdraw save func Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - fix bug in new save comdraw func, to return 0 if saved to path and it doesn't work. Index: OverlayUnidraw/ovcmds.c diff -c OverlayUnidraw/ovcmds.c:1.2 OverlayUnidraw/ovcmds.c:1.3 *** OverlayUnidraw/ovcmds.c:1.2 Mon Apr 30 12:07:27 2001 --- src/OverlayUnidraw/ovcmds.c Mon Apr 30 12:22:23 2001 *************** *** 555,561 **** } else { if (mv != nil) mv->Notify(); UpdateCompNameVars(); ! if (path_) { style->attribute("caption", "Couldn't save to file" ); reset_caption = true; ed->GetWindow()->cursor(arrow); --- 555,562 ---- } else { if (mv != nil) mv->Notify(); UpdateCompNameVars(); ! comp_ = nil; ! if (!path_) { style->attribute("caption", "Couldn't save to file" ); reset_caption = true; ed->GetWindow()->cursor(arrow); Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.2 ComUnidraw/unifunc.c:1.3 *** ComUnidraw/unifunc.c:1.2 Mon Apr 30 12:07:29 2001 --- src/ComUnidraw/unifunc.c Mon Apr 30 12:22:25 2001 *************** *** 238,244 **** } void SaveFileFunc::execute() { ! char* path = nil; if (nargs()>0) { ComValue pathnamev(stack_arg(0)); path = pathnamev.string_ptr(); --- 238,244 ---- } void SaveFileFunc::execute() { ! const char* path = nil; if (nargs()>0) { ComValue pathnamev(stack_arg(0)); path = pathnamev.string_ptr(); *** /dev/null Mon Apr 30 12:22:47 PDT 2001 --- patches/ivtools-010430-johnston-016 *************** patches/ivtools-010430-johnston-016 *** 0 **** --- 1 ---- + ivtools-010430-johnston-016 |
From: <ivt...@li...> - 2001-04-27 22:10:24
|
Patch: ivtools-010427-johnston-014 For: ivtools-0.9.2 Author: joh...@us... Subject: attempt to upgrade to ACE 5.1 Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - attempt to upgrade to ACE 5.1 Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.3 top_ivtools/INSTALL:1.4 *** top_ivtools/INSTALL:1.3 Thu Apr 5 13:25:53 2001 --- ./INSTALL Fri Apr 27 15:06:14 2001 *************** *** 58,65 **** http://www.cs.wustl.edu/%7Eschmidt/ACE.html ! We currently use ACE-5.1. If you have problems with the ./configure ! script, consider using the latest beta version of ACE instead. 0.f if you want to build the ivxt example program, which demonstrates the embedding of a ivtools drawing editor inside Motif widgets, you'll --- 58,69 ---- http://www.cs.wustl.edu/%7Eschmidt/ACE.html ! We are currently using ACE-5.1 on Debian 2.4 (sid -- libace5.1-dev). ! With g++ in considerable flux it is currently problematic to build ACE ! from source yourself (so that it works with ivtools), so you might ! want to consider skipping this library if you are not using Debian. ! Hopefully these problems will go away once the migration to gcc-3.0 is ! done. 0.f if you want to build the ivxt example program, which demonstrates the embedding of a ivtools drawing editor inside Motif widgets, you'll Index: ComTerp/comhandler.h diff -c ComTerp/comhandler.h:1.3 ComTerp/comhandler.h:1.4 *** ComTerp/comhandler.h:1.3 Fri Apr 13 07:51:44 2001 --- src/ComTerp/comhandler.h Fri Apr 27 15:06:16 2001 *************** *** 31,38 **** --- 31,40 ---- #ifdef HAVE_ACE #include <stdio.h> + #if 0 /* does not work for ACE5.1 */ #define __USE_GNU #include <sys/msg.h> + #endif #include <signal.h> #include <ace/Acceptor.h> #include <ace/Reactor.h> Index: OverlayUnidraw/aceimport.h diff -c OverlayUnidraw/aceimport.h:1.1 OverlayUnidraw/aceimport.h:1.2 *** OverlayUnidraw/aceimport.h:1.1 Thu Jan 4 15:33:05 2001 --- src/OverlayUnidraw/aceimport.h Fri Apr 27 15:06:23 2001 *************** *** 27,34 **** --- 27,36 ---- #define _unidraw_import_handler_ #include <stdio.h> + #if 0 /* does not work for ACE5.1 */ #define __USE_GNU #include <sys/msg.h> + #endif #include <signal.h> #include <ace/Acceptor.h> #include <ace/Reactor.h> Index: config_ivtools/local.def diff -c config_ivtools/local.def:1.1 config_ivtools/local.def:1.2 *** config_ivtools/local.def:1.1 Thu Jan 4 15:34:05 2001 --- config/local.def Fri Apr 27 15:06:29 2001 *************** *** 126,132 **** #ifdef IueDir libvar(LIBIUESERV,IVTOOLSSRC,IueServ,libIueServ,-lIueServ) #endif ! #ifdef AceDir libvar(LIBACEDISPATCH,IVTOOLSSRC,AceDispatch,libAceDispatch,-lAceDispatch) #else LIBACEDISPATCH = --- 126,132 ---- #ifdef IueDir libvar(LIBIUESERV,IVTOOLSSRC,IueServ,libIueServ,-lIueServ) #endif ! #ifdef AceLibDir libvar(LIBACEDISPATCH,IVTOOLSSRC,AceDispatch,libAceDispatch,-lAceDispatch) #else LIBACEDISPATCH = *************** *** 155,161 **** #ifdef IueDir depvar(DEPIUESERV,IVTOOLSSRC,IueServ,libIueServ,$(VERSION)) #endif ! #ifdef AceDir depvar(DEPACEDISPATCH,IVTOOLSSRC,AceDispatch,libAceDispatch,$(VERSION)) #else DEPACEDISPATCH = --- 155,161 ---- #ifdef IueDir depvar(DEPIUESERV,IVTOOLSSRC,IueServ,libIueServ,$(VERSION)) #endif ! #ifdef AceLibDir depvar(DEPACEDISPATCH,IVTOOLSSRC,AceDispatch,libAceDispatch,$(VERSION)) #else DEPACEDISPATCH = Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.3 config_ivtools/params.def:1.4 *** config_ivtools/params.def:1.3 Thu Apr 5 13:26:23 2001 --- config/params.def Fri Apr 27 15:06:29 2001 *************** *** 561,566 **** --- 561,569 ---- #ifdef AceDir ACEDIR = AceDir #endif + #ifdef AceLibDir + ACELIBDIR = AceLibDir + #endif #ifdef IueDir IUEDIR = IueDir #endif *************** *** 783,790 **** #endif #ifndef AceCCLdLibs ! #ifdef AceDir ! #define AceCCLdLibs -L$(ACEDIR)/ace -lACE #else #define AceCCLdLibs /**/ #endif --- 786,793 ---- #endif #ifndef AceCCLdLibs ! #ifdef AceLibDir ! #define AceCCLdLibs -L$(ACELIBDIR) -lACE #else #define AceCCLdLibs /**/ #endif *** /dev/null Fri Apr 27 15:06:30 PDT 2001 --- patches/ivtools-010427-johnston-014 *************** patches/ivtools-010427-johnston-014 *** 0 **** --- 1 ---- + ivtools-010427-johnston-014 |
From: <ivt...@li...> - 2001-04-12 23:56:39
|
Patch: ivtools-010413-johnston-013 For: ivtools-0.9.2 Author: joh...@us... Subject: diffs from Guenter Geiger for Debian ivtools-0.9.2-1 Requires: This is an intermediate patch to ivtools-0.9.2. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - subset of diffs applied by Guenter Geiger to generate ivtools-0.9.2-1 for latest Debian (sid). Index: TopoFace/Imakefile diff -c TopoFace/Imakefile:1.1 TopoFace/Imakefile:1.2 *** TopoFace/Imakefile:1.1 Thu Jan 4 15:31:40 2001 --- src/TopoFace/Imakefile Fri Apr 13 07:45:20 2001 *************** *** 8,15 **** LIB = TopoFace - Use_libUnidraw() - Use_2_6() MakeLibrary($(LIB),$(VERSION)) --- 8,13 ---- Index: ComUnidraw/comterp-acehandler.h diff -c ComUnidraw/comterp-acehandler.h:1.1 ComUnidraw/comterp-acehandler.h:1.2 *** ComUnidraw/comterp-acehandler.h:1.1 Thu Jan 4 15:33:09 2001 --- src/ComUnidraw/comterp-acehandler.h Fri Apr 13 07:45:40 2001 *************** *** 26,31 **** --- 26,32 ---- #ifndef _unidraw_comterp_handler_ #define _unidraw_comterp_handler_ + #include <stdio.h> #include <signal.h> #include <ComTerp/comhandler.h> Index: utils_ivtools/sockets.cc diff -c utils_ivtools/sockets.cc:1.1 utils_ivtools/sockets.cc:1.2 *** utils_ivtools/sockets.cc:1.1 Thu Jan 4 15:33:51 2001 --- src/utils/sockets.cc Fri Apr 13 07:45:47 2001 *************** *** 98,104 **** int data_fd; if ((data_fd = accept(Psocket_fd, (struct sockaddr *)&Pclient_addr, ! (unsigned int *)&Palen)) < 0) { // we can break out of accept if the system call was interrupted #ifndef ERESTART /* ERESTART not defined on some systems */ if (errno != EINTR) { --- 98,104 ---- int data_fd; if ((data_fd = accept(Psocket_fd, (struct sockaddr *)&Pclient_addr, ! (socklen_t *)&Palen)) < 0) { // we can break out of accept if the system call was interrupted #ifndef ERESTART /* ERESTART not defined on some systems */ if (errno != EINTR) { *** /dev/null Fri Apr 13 07:45:52 PDT 2001 --- patches/ivtools-010413-johnston-013 *************** patches/ivtools-010413-johnston-013 *** 0 **** --- 1 ---- + ivtools-010413-johnston-013 |
From: <ivt...@li...> - 2001-04-05 20:31:21
|
Patch: ivtools-010405-johnston-012 For: ivtools-0.9.1 Author: joh...@us... Subject: changes to finish ivtools-0.9.2 Requires: This is an intermediate patch to ivtools-0.9.1. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - changes to finish ivtools-0.9.2 Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.2 top_ivtools/CHANGES:1.3 *** top_ivtools/CHANGES:1.2 Wed Jan 10 11:52:36 2001 --- ./CHANGES Thu Apr 5 13:25:53 2001 *************** *** 1,4 **** ! Jan 10th 2000 ivtools-0.9.1 Correct 0.9 oversights: --- 1,45 ---- ! Apr 5th 2001 ivtools-0.9.2 ! ! - set of changes to allow save/restore of graphics files internal to a ! drawing by the Unix command line used to generate them. For example, ! if "xwdtopnm temp.xwd" was used to import a raster file (with "from ! command" checked on the import dialog box), a subsequent save would ! write this command (and only this command) to the document on disk, ! and a subsequent restore would re-run the command to regenerate the ! contents. Should work equally well for rasters, PostScript, and ! ivtools drawtool files. ! ! - remove anytopnm from ivtools, since the enhancements our copy had ! over pbmplus were incorporated directly into the netpbm variant. The ! salient feature was the ability for anytopnm to recognize it had a ! file that was already in a pbmplus format, and pass it through. ! ! - remove duplicate IVGlyph/figure.[ch] from MANIFEST ! ! - add /usr/local/include/g++-3 and /usr/local/include/g++-2 to paths ! searched for libstdc++ include files by configure. ! ! - add "wget" to the list of download utilities searched for and used ! by the code that reads URLs. The others are ivdl (from ivtools), ! curl, and w3c. ! ! - changes to support compiling with older versions of libg++ and ! changes to support relative installation (--enable-install-relative) ! on FreeBSD. ! ! - add "name" and "value" labels to the attribute-list editing dialog box. ! ! - save rasters imported from Unix commands by writing out only the ! command string in an generic by-file drawtool object. For example: ! ! ovfile(:popen "djpeg -pnm test.jpg" ) ! ! would be output to the saved document if save-by-path was checked on ! the import box and save-by-path is checked (for the whole document) on ! the export box. Subsequent opens rerun the command. ! ! ! Jan 10th 2001 ivtools-0.9.1 Correct 0.9 oversights: Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.2 top_ivtools/INSTALL:1.3 *** top_ivtools/INSTALL:1.2 Wed Jan 10 12:04:37 2001 --- ./INSTALL Thu Apr 5 13:25:53 2001 *************** *** 1,7 **** INSTALL for ivtools-0.9 ! Instructions for building ivtools-0.9.1 from source: 0. Compilation Environment --- 1,7 ---- INSTALL for ivtools-0.9 ! Instructions for building ivtools-0.9.2 from source: 0. Compilation Environment Index: top_ivtools/README diff -c top_ivtools/README:1.2 top_ivtools/README:1.3 *** top_ivtools/README:1.2 Wed Jan 10 12:04:37 2001 --- ./README Thu Apr 5 13:25:53 2001 *************** *** 2,8 **** README for ivtools 0.9 ! This directory contains a release of ivtools 0.9.1. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. --- 2,8 ---- README for ivtools 0.9 ! This directory contains a release of ivtools 0.9.2. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. Index: top_ivtools/VERSION diff -c top_ivtools/VERSION:1.2 top_ivtools/VERSION:1.3 *** top_ivtools/VERSION:1.2 Wed Jan 10 12:04:37 2001 --- ./VERSION Thu Apr 5 13:25:53 2001 *************** *** 1 **** ! Release 0.9.1 --- 1 ---- ! Release 0.9.2 Index: include_std/version.h diff -c include_std/version.h:1.2 include_std/version.h:1.3 *** include_std/version.h:1.2 Wed Jan 10 11:52:52 2001 --- src/include/ivstd/version.h Thu Apr 5 13:26:19 2001 *************** *** 1,3 **** ! #define IvtoolsVersion 0.9.1 ! #define VersionString "0.9.1" ! #define ReleaseString "ivtools-0.9.1" --- 1,3 ---- ! #define IvtoolsVersion 0.9.2 ! #define VersionString "0.9.2" ! #define ReleaseString "ivtools-0.9.2" Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.2 config_ivtools/params.def:1.3 *** config_ivtools/params.def:1.2 Wed Jan 10 11:52:55 2001 --- config/params.def Thu Apr 5 13:26:23 2001 *************** *** 27,33 **** * Name of the software release */ #ifndef Release ! #define Release ivtools-0.9.1 #endif RELEASE = Release --- 27,33 ---- * Name of the software release */ #ifndef Release ! #define Release ivtools-0.9.2 #endif RELEASE = Release *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 0.9.1 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 0.9.2 #endif VERSION = Version *** /dev/null Thu Apr 5 13:26:24 PDT 2001 --- patches/ivtools-010405-johnston-012 *************** patches/ivtools-010405-johnston-012 *** 0 **** --- 1 ---- + ivtools-010405-johnston-012 |
From: <ivt...@li...> - 2001-04-05 16:46:20
|
Patch: ivtools-010405-johnston-011 For: ivtools-0.9.1 Author: joh...@us... Subject: save/restore import commands, add name/value labels to attribute dialog box Requires: This is an intermediate patch to ivtools-0.9.1. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - add "name" and "value" labels to the attribute-list editing dialog box. - save rasters imported from Unix commands by writing out only the command string in an generic by-file drawtool object. For example: ovfile(:popen "djpeg -pnm test.jpg" ) would be output to the saved document if save-by-path was checked on the import box and save-by-path is checked (for the whole document) on the export box. Subsequent opens rerun the command. Index: AttrGlyph/attredit.c diff -c AttrGlyph/attredit.c:1.1 AttrGlyph/attredit.c:1.2 *** AttrGlyph/attredit.c:1.1 Thu Jan 4 15:32:53 2001 --- src/AttrGlyph/attredit.c Thu Apr 5 09:39:41 2001 *************** *** 201,206 **** --- 201,216 ---- _mainglyph->append( lk.hcenter( lk.hbox( + lk.vcenter(lk.hfixed(wk.label("name"), wid)), + lk.hspace(10), + lk.vcenter(lk.hfixed(wk.label("value"), wid)) + ) + ) + ); + _mainglyph->append(lk.vspace(2)); + _mainglyph->append( + lk.hcenter( + lk.hbox( lk.vcenter(lk.hfixed(_namefe, wid)), lk.hspace(10), lk.vcenter(lk.hfixed(_valfe, wid)) Index: OverlayUnidraw/ovcomps.c diff -c OverlayUnidraw/ovcomps.c:1.1 OverlayUnidraw/ovcomps.c:1.2 *** OverlayUnidraw/ovcomps.c:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovcomps.c Thu Apr 5 09:39:45 2001 *************** *** 301,306 **** --- 301,313 ---- void OverlayComp::SetByPathnameFlag(boolean flag) { } + boolean OverlayComp::GetFromCommandFlag() { + return true; + } + + void OverlayComp::SetFromCommandFlag(boolean flag) { + } + void OverlayComp::Configure(Editor*) { } OverlayComp* OverlayComp::TopComp() { Index: OverlayUnidraw/ovcomps.h diff -c OverlayUnidraw/ovcomps.h:1.1 OverlayUnidraw/ovcomps.h:1.2 *** OverlayUnidraw/ovcomps.h:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovcomps.h Thu Apr 5 09:39:45 2001 *************** *** 48,53 **** --- 48,55 ---- class Viewer; class istream; + enum { bypath_mask=0x1, fromcomm_mask=0x2, autoconv_mask=0x4 }; + //: derived GraphicComp // derived GraphicComp with extensions for property lists of arbitrary // AttributeValue objects, event propogation inherited from Observer and *************** *** 88,93 **** --- 90,100 ---- // set flag that determines whether component will be serialized (converted to // external persistent storage) by just the pathname or by the internal contents. virtual boolean GetByPathnameFlag(); + // return by-pathname flag + virtual void SetFromCommandFlag(boolean); + // set flag that determines whether component will be serialized (converted to + // external persistent storage) by just the pathname or by the internal contents. + virtual boolean GetFromCommandFlag(); // return by-pathname flag virtual const char* GetBaseDir(); // set base directory used for generating pathnames for this component Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.4 OverlayUnidraw/ovimport.c:1.5 *** OverlayUnidraw/ovimport.c:1.4 Thu Mar 22 16:27:53 2001 --- src/OverlayUnidraw/ovimport.c Thu Apr 5 09:39:45 2001 *************** *** 1216,1221 **** --- 1216,1223 ---- /* pipe import from command */ if (chooser_->from_command() || chooser_->auto_convert()) { + _popen = true; + FILE* fptr = nil; if (chooser_->auto_convert()) { char buffer[BUFSIZ]; *************** *** 1230,1236 **** } pclose(fptr); return comp; ! } const char* creator = ReadCreator(path); OverlayCatalog* catalog = (OverlayCatalog*)unidraw->GetCatalog(); --- 1232,1241 ---- } pclose(fptr); return comp; ! } else ! _popen = false; ! ! comp->SetFromCommandFlag(_popen); const char* creator = ReadCreator(path); OverlayCatalog* catalog = (OverlayCatalog*)unidraw->GetCatalog(); *************** *** 1323,1328 **** --- 1328,1334 ---- rr->GetOverlayRaster()->initialize(); rcomp->SetByPathnameFlag(chooser_ ? chooser_->by_pathname() : true); + rcomp->SetFromCommandFlag(chooser_ ? chooser_->from_command() : true); helper_->add_pipe(fptr); new ReadImageHandler( *************** *** 1353,1358 **** --- 1359,1365 ---- ((OverlayComp*)comp)->SetPathName(pathname()); if (chooser_) { ((OverlayComp*)comp)->SetByPathnameFlag(chooser_->by_pathname()); + ((OverlayComp*)comp)->SetFromCommandFlag(chooser_->from_command()); if (chooser_->by_pathname() && comp->IsA(OVERLAY_IDRAW_COMP)) { OverlayFileComp* ovfile = new OverlayFileComp(); ovfile->SetPathName(path); Index: OverlayUnidraw/ovraster.c diff -c OverlayUnidraw/ovraster.c:1.2 OverlayUnidraw/ovraster.c:1.3 *** OverlayUnidraw/ovraster.c:1.2 Mon Feb 12 17:04:28 2001 --- src/OverlayUnidraw/ovraster.c Thu Apr 5 09:39:45 2001 *************** *** 126,138 **** RasterOvComp::RasterOvComp (OverlayRasterRect* s, const char* pathname, OverlayComp* parent) : OverlayComp(s, parent), _com_exp("") { _pathname = (pathname == nil) ? nil : strdup(pathname); ! _by_pathname = pathname ? true : false; } RasterOvComp::RasterOvComp(istream& in, OverlayComp* parent) : OverlayComp(nil, parent), _com_exp("") { _pathname = nil; ! _by_pathname = false; _valid = GetParamList()->read_args(in, this); // update the size of the raster --- 126,138 ---- RasterOvComp::RasterOvComp (OverlayRasterRect* s, const char* pathname, OverlayComp* parent) : OverlayComp(s, parent), _com_exp("") { _pathname = (pathname == nil) ? nil : strdup(pathname); ! if(pathname) _import_flags |= bypath_mask; } RasterOvComp::RasterOvComp(istream& in, OverlayComp* parent) : OverlayComp(nil, parent), _com_exp("") { _pathname = nil; ! _import_flags = 0x0; _valid = GetParamList()->read_args(in, this); // update the size of the raster *************** *** 155,161 **** } void RasterOvComp::GrowParamList(ParamList* pl) { ! pl->add_param("by pathname", ParamStruct::optional, &RasterScript::ReadRaster, this, this); pl->add_param("rgb", ParamStruct::keyword, &RasterScript::ReadRGB, this, this); --- 155,161 ---- } void RasterOvComp::GrowParamList(ParamList* pl) { ! pl->add_param("pathname", ParamStruct::optional, &RasterScript::ReadRaster, this, this); pl->add_param("rgb", ParamStruct::keyword, &RasterScript::ReadRGB, this, this); *************** *** 468,475 **** OverlayRasterRect* rr = comp->GetOverlayRasterRect(); OverlayRaster* raster = (OverlayRaster*)rr->GetOriginal(); ! out << "raster("; ! if (GetByPathnameFlag() && comp->GetPathName()){ out << "\"" << comp->GetPathName() << "\""; --- 468,476 ---- OverlayRasterRect* rr = comp->GetOverlayRasterRect(); OverlayRaster* raster = (OverlayRaster*)rr->GetOriginal(); ! out << (GetFromCommandFlag() && GetByPathnameFlag() && comp->GetPathName() ! ? "ovfile(:popen " : "raster("); ! if (GetByPathnameFlag() && comp->GetPathName()){ out << "\"" << comp->GetPathName() << "\""; *************** *** 883,888 **** --- 884,894 ---- boolean RasterScript::GetByPathnameFlag() { RasterOvComp* comp = (RasterOvComp*) GetSubject(); return comp->GetByPathnameFlag() && ((OverlayScript*)GetParent())->GetByPathnameFlag(); + } + + boolean RasterScript::GetFromCommandFlag() { + RasterOvComp* comp = (RasterOvComp*) GetSubject(); + return comp->GetFromCommandFlag(); } /*****************************************************************************/ Index: OverlayUnidraw/ovraster.h diff -c OverlayUnidraw/ovraster.h:1.1 OverlayUnidraw/ovraster.h:1.2 *** OverlayUnidraw/ovraster.h:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovraster.h Thu Apr 5 09:39:45 2001 *************** *** 72,83 **** // set pathname associated with raster. virtual const char* GetPathName(); // return pathname associated with raster. ! virtual boolean GetByPathnameFlag() { return _by_pathname;} // return flag that indicates whether component will be serialized // by data or by pathname. ! virtual void SetByPathnameFlag(boolean flag) { _by_pathname = flag;} // set flag that indicates whether component will be serialized // by data or by pathname. virtual Component* Copy(); --- 72,91 ---- // set pathname associated with raster. virtual const char* GetPathName(); // return pathname associated with raster. ! virtual boolean GetByPathnameFlag() { return _import_flags & bypath_mask;} // return flag that indicates whether component will be serialized // by data or by pathname. ! virtual void SetByPathnameFlag(boolean flag) ! { _import_flags = flag ? _import_flags |= bypath_mask : _import_flags &= ~bypath_mask;} // set flag that indicates whether component will be serialized // by data or by pathname. + virtual boolean GetFromCommandFlag() { return _import_flags & fromcomm_mask;} + // return flag that indicates whether component will be serialized + // by data or by pathname. + virtual void SetFromCommandFlag(boolean flag) + { _import_flags = flag ? _import_flags |= fromcomm_mask : _import_flags &= ~fromcomm_mask;} + // set flag that indicates whether component will be serialized + // by data or by pathname. virtual Component* Copy(); *************** *** 105,111 **** static ParamList* _ovraster_params; char* _pathname; ! boolean _by_pathname; CopyStringList _commands; CopyString _com_exp; --- 113,119 ---- static ParamList* _ovraster_params; char* _pathname; ! int _import_flags; CopyStringList _commands; CopyString _com_exp; *************** *** 190,195 **** --- 198,204 ---- virtual boolean IsA(ClassId); boolean GetByPathnameFlag(); + boolean GetFromCommandFlag(); }; *** /dev/null Thu Apr 5 09:39:58 PDT 2001 --- patches/ivtools-010405-johnston-011 *************** patches/ivtools-010405-johnston-011 *** 0 **** --- 1 ---- + ivtools-010405-johnston-011 |
From: <ivt...@li...> - 2001-03-27 19:09:31
|
Patch: ivtools-010327-johnston-010 For: ivtools-0.9.1 Author: joh...@us... Subject: didn't really need the test for /bin/bash Requires: This is an intermediate patch to ivtools-0.9.1. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: I didn't really need the test for /bin/bash, because when it is invoked via /bin/sh it fakes the behavior of /bin/sh. Index: top_ivtools/configure diff -c top_ivtools/configure:1.3 top_ivtools/configure:1.4 *** top_ivtools/configure:1.3 Tue Mar 27 11:00:51 2001 --- ./configure Tue Mar 27 11:08:11 2001 *************** *** 1724,1749 **** fi ! if test "$cross_compiling" = yes; then ! BIN_BASH=1 ! else ! cat > conftest.$ac_ext <<EOF ! #line 1761 "configure" ! #include "confdefs.h" ! int access(); int main() { return access("/bin/bash", 1); } ! EOF ! if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ! BIN_BASH=1 ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! BIN_BASH=0 ! fi ! rm -fr conftest* ! fi ! #AC_SUBST(OPENGL) --- 1724,1730 ---- fi ! # AC_TRY_RUN(int access(); int main() { return access("/bin/bash", 1); },BIN_BASH=1,BIN_BASH=0,BIN_BASH=1) #AC_SUBST(OPENGL) *************** *** 1775,1782 **** - #output to config-$host_fragd PWD=`pwd`; export PWD --- 1756,1763 ---- + #AC_SUBST(BIN_BASH) #output to config-$host_fragd PWD=`pwd`; export PWD *************** *** 1957,1963 **** s%@INSTALLRELATIVE@%$INSTALLRELATIVE%g s%@USERPATH@%$USERPATH%g s%@INSTALLSUBDIR@%$INSTALLSUBDIR%g - s%@BIN_BASH@%$BIN_BASH%g CEOF EOF --- 1938,1943 ---- Index: top_ivtools/configure.in diff -c top_ivtools/configure.in:1.3 top_ivtools/configure.in:1.4 *** top_ivtools/configure.in:1.3 Tue Mar 27 11:00:51 2001 --- ./configure.in Tue Mar 27 11:08:11 2001 *************** *** 289,295 **** AC_ARG_ENABLE(install-subdir,[ --enable-install-subdir[=ARG] enable installation in an ivtools sub-directory], INSTALLSUBDIR=YES, INSTALLSUBDIR=NO) ! AC_TRY_RUN(int access(); int main() { return access("/bin/bash", 1); },BIN_BASH=1,BIN_BASH=0,BIN_BASH=1) AC_SUBST(prefix) #AC_SUBST(OPENGL) --- 289,295 ---- AC_ARG_ENABLE(install-subdir,[ --enable-install-subdir[=ARG] enable installation in an ivtools sub-directory], INSTALLSUBDIR=YES, INSTALLSUBDIR=NO) ! # AC_TRY_RUN(int access(); int main() { return access("/bin/bash", 1); },BIN_BASH=1,BIN_BASH=0,BIN_BASH=1) AC_SUBST(prefix) #AC_SUBST(OPENGL) *************** *** 322,328 **** AC_SUBST(INSTALLRELATIVE) AC_SUBST(USERPATH) AC_SUBST(INSTALLSUBDIR) ! AC_SUBST(BIN_BASH) #output to config-$host_fragd PWD=`pwd`; export PWD --- 322,328 ---- AC_SUBST(INSTALLRELATIVE) AC_SUBST(USERPATH) AC_SUBST(INSTALLSUBDIR) ! #AC_SUBST(BIN_BASH) #output to config-$host_fragd PWD=`pwd`; export PWD Index: config_ivtools/config.defs.in diff -c config_ivtools/config.defs.in:1.3 config_ivtools/config.defs.in:1.4 *** config_ivtools/config.defs.in:1.3 Tue Mar 27 11:01:01 2001 --- config/config.defs.in Tue Mar 27 11:08:20 2001 *************** *** 55,60 **** #define IvToolsSrcRoot @PWD@ - #define BinBash @BIN_BASH@ - --- 55,58 ---- Index: config_ivtools/rules.def diff -c config_ivtools/rules.def:1.3 config_ivtools/rules.def:1.4 *** config_ivtools/rules.def:1.3 Tue Mar 27 11:01:01 2001 --- config/rules.def Tue Mar 27 11:08:20 2001 *************** *** 1054,1071 **** * Install header files on Linux. */ - #if BinBash - #define SYMTEST -h - #else - #define SYMTEST -L - #endif - - #ifndef InstallIncludes #if InstallRelative #define InstallIncludes(dir) @@\ install:: @@\ ! -@if [ SYMTEST $(TOP)/include ]; then exit 0; else \ @@\ (cd $(TOP) && $(LN) src/include include); fi #else #define InstallIncludes(dir) @@\ --- 1054,1064 ---- * Install header files on Linux. */ #ifndef InstallIncludes #if InstallRelative #define InstallIncludes(dir) @@\ install:: @@\ ! -@if [ -h $(TOP)/include ]; then exit 0; else \ @@\ (cd $(TOP) && $(LN) src/include include); fi #else #define InstallIncludes(dir) @@\ *************** *** 1082,1088 **** #if InstallRelative #define InstallInclude(dir, file) @@\ install:: @@\ ! -@if [ SYMTEST $(TOP)/include ]; then exit 0; else \ @@\ (cd $(TOP) && $(LN) src/include include); fi #else #define InstallInclude(dir, file) @@\ --- 1075,1081 ---- #if InstallRelative #define InstallInclude(dir, file) @@\ install:: @@\ ! -@if [ -h $(TOP)/include ]; then exit 0; else \ @@\ (cd $(TOP) && $(LN) src/include include); fi #else #define InstallInclude(dir, file) @@\ *** /dev/null Tue Mar 27 11:08:22 PST 2001 --- patches/ivtools-010327-johnston-010 *************** patches/ivtools-010327-johnston-010 *** 0 **** --- 1 ---- + ivtools-010327-johnston-010 |
From: <ivt...@li...> - 2001-03-27 19:03:09
|
Patch: ivtools-010327-johnston-009 For: ivtools-0.9.1 Author: joh...@us... Subject: configure now tests for /bin/bash Requires: This is an intermediate patch to ivtools-0.9.1. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - migrate the configure script to test for the presence of /bin/bash. This controls whether or not you use -L or -h in makefile sh scripts to test for symbolic links. Index: top_ivtools/configure diff -c top_ivtools/configure:1.2 top_ivtools/configure:1.3 *** top_ivtools/configure:1.2 Tue Mar 27 09:32:26 2001 --- ./configure Tue Mar 27 11:00:51 2001 *************** *** 1725,1745 **** if test "$cross_compiling" = yes; then ! BSD_TEST=2 else cat > conftest.$ac_ext <<EOF #line 1761 "configure" #include "confdefs.h" ! int main() { return system("test -h src/include/IV-3_1/InterViews"); } EOF if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ! BSD_TEST=0 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ! BSD_TEST=1 fi rm -fr conftest* fi --- 1725,1745 ---- if test "$cross_compiling" = yes; then ! BIN_BASH=1 else cat > conftest.$ac_ext <<EOF #line 1761 "configure" #include "confdefs.h" ! int access(); int main() { return access("/bin/bash", 1); } EOF if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ! BIN_BASH=1 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ! BIN_BASH=0 fi rm -fr conftest* fi *************** *** 1957,1963 **** s%@INSTALLRELATIVE@%$INSTALLRELATIVE%g s%@USERPATH@%$USERPATH%g s%@INSTALLSUBDIR@%$INSTALLSUBDIR%g ! s%@BSD_TEST@%$BSD_TEST%g CEOF EOF --- 1957,1963 ---- s%@INSTALLRELATIVE@%$INSTALLRELATIVE%g s%@USERPATH@%$USERPATH%g s%@INSTALLSUBDIR@%$INSTALLSUBDIR%g ! s%@BIN_BASH@%$BIN_BASH%g CEOF EOF Index: top_ivtools/configure.in diff -c top_ivtools/configure.in:1.2 top_ivtools/configure.in:1.3 *** top_ivtools/configure.in:1.2 Tue Mar 27 09:32:26 2001 --- ./configure.in Tue Mar 27 11:00:51 2001 *************** *** 289,295 **** AC_ARG_ENABLE(install-subdir,[ --enable-install-subdir[=ARG] enable installation in an ivtools sub-directory], INSTALLSUBDIR=YES, INSTALLSUBDIR=NO) ! AC_TRY_RUN(int main() { return system("test -h src/include/IV-3_1/InterViews"); },BSD_TEST=0,BSD_TEST=1,BSD_TEST=2) AC_SUBST(prefix) #AC_SUBST(OPENGL) --- 289,295 ---- AC_ARG_ENABLE(install-subdir,[ --enable-install-subdir[=ARG] enable installation in an ivtools sub-directory], INSTALLSUBDIR=YES, INSTALLSUBDIR=NO) ! AC_TRY_RUN(int access(); int main() { return access("/bin/bash", 1); },BIN_BASH=1,BIN_BASH=0,BIN_BASH=1) AC_SUBST(prefix) #AC_SUBST(OPENGL) *************** *** 322,328 **** AC_SUBST(INSTALLRELATIVE) AC_SUBST(USERPATH) AC_SUBST(INSTALLSUBDIR) ! AC_SUBST(BSD_TEST) #output to config-$host_fragd PWD=`pwd`; export PWD --- 322,328 ---- AC_SUBST(INSTALLRELATIVE) AC_SUBST(USERPATH) AC_SUBST(INSTALLSUBDIR) ! AC_SUBST(BIN_BASH) #output to config-$host_fragd PWD=`pwd`; export PWD Index: config_ivtools/config.defs.in diff -c config_ivtools/config.defs.in:1.2 config_ivtools/config.defs.in:1.3 *** config_ivtools/config.defs.in:1.2 Tue Mar 27 09:32:41 2001 --- config/config.defs.in Tue Mar 27 11:01:01 2001 *************** *** 55,60 **** #define IvToolsSrcRoot @PWD@ ! #define BsdTest @BSD_TEST@ --- 55,60 ---- #define IvToolsSrcRoot @PWD@ ! #define BinBash @BIN_BASH@ Index: config_ivtools/rules.def diff -c config_ivtools/rules.def:1.2 config_ivtools/rules.def:1.3 *** config_ivtools/rules.def:1.2 Tue Mar 27 09:32:41 2001 --- config/rules.def Tue Mar 27 11:01:01 2001 *************** *** 1054,1060 **** * Install header files on Linux. */ ! #if BsdTest #define SYMTEST -h #else #define SYMTEST -L --- 1054,1060 ---- * Install header files on Linux. */ ! #if BinBash #define SYMTEST -h #else #define SYMTEST -L *** /dev/null Tue Mar 27 11:01:02 PST 2001 --- patches/ivtools-010327-johnston-009 *************** patches/ivtools-010327-johnston-009 *** 0 **** --- 1 ---- + ivtools-010327-johnston-009 |
From: <ivt...@li...> - 2001-03-27 17:37:35
|
Patch: ivtools-010327-johnston-008 For: ivtools-0.9.1 Author: joh...@us... Subject: changes to support more FreeBSD compilation Requires: This is an intermediate patch to ivtools-0.9.1. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - changes to support compiling with older versions of libg++ and changes to support relative installation (--enable-install-relative) on FreeBSD. Turns out the BSD version of test (the original) uses a -h to check for symbolic links, and the GNU version uses -L. Index: top_ivtools/configure diff -c top_ivtools/configure:1.1 top_ivtools/configure:1.2 *** top_ivtools/configure:1.1 Thu Jan 4 15:31:33 2001 --- ./configure Tue Mar 27 09:32:26 2001 *************** *** 28,35 **** ac_help="$ac_help --with-iue-libs=<path> path to compiled IUE libs" ac_help="$ac_help - --with-x use the X Window System" - ac_help="$ac_help --enable-install-relative[=ARG] enable installation relative to the source tree" ac_help="$ac_help --enable-use-rpath[=ARG] enable use of -rpath when linking" --- 28,33 ---- *************** *** 170,202 **** Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names - EOF - cat << EOF - Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --- 168,173 ---- *************** *** 1614,1620 **** ice_cv_cxx_include_dir="$prefix/include" for pfx in "$prefix" "$exec_prefix"; do for dir in "$pfx/lib/g++-include" "$pfx/include/CC" \ ! "$pfx/include" /usr/include; do if test -d "$dir"; then ice_cv_cxx_include_dir="$dir" break --- 1585,1591 ---- ice_cv_cxx_include_dir="$prefix/include" for pfx in "$prefix" "$exec_prefix"; do for dir in "$pfx/lib/g++-include" "$pfx/include/CC" \ ! "$pfx/include" /usr/include /usr/local/include/g++-3 /usr/local/include/g++-2 ; do if test -d "$dir"; then ice_cv_cxx_include_dir="$dir" break *************** *** 1753,1759 **** --- 1724,1751 ---- fi + if test "$cross_compiling" = yes; then + BSD_TEST=2 + else + cat > conftest.$ac_ext <<EOF + #line 1761 "configure" + #include "confdefs.h" + int main() { return system("test -h src/include/IV-3_1/InterViews"); } + EOF + if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null + then + BSD_TEST=0 + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + BSD_TEST=1 + fi + rm -fr conftest* + fi + + #AC_SUBST(OPENGL) #AC_SUBST(XGL) #AC_SUBST(TCL) *************** *** 1785,1790 **** --- 1777,1783 ---- + #output to config-$host_fragd PWD=`pwd`; export PWD trap '' 1 2 15 *************** *** 1964,1969 **** --- 1957,1963 ---- s%@INSTALLRELATIVE@%$INSTALLRELATIVE%g s%@USERPATH@%$USERPATH%g s%@INSTALLSUBDIR@%$INSTALLSUBDIR%g + s%@BSD_TEST@%$BSD_TEST%g CEOF EOF Index: top_ivtools/configure.in diff -c top_ivtools/configure.in:1.1 top_ivtools/configure.in:1.2 *** top_ivtools/configure.in:1.1 Thu Jan 4 15:31:33 2001 --- ./configure.in Tue Mar 27 09:32:26 2001 *************** *** 289,294 **** --- 289,296 ---- AC_ARG_ENABLE(install-subdir,[ --enable-install-subdir[=ARG] enable installation in an ivtools sub-directory], INSTALLSUBDIR=YES, INSTALLSUBDIR=NO) + AC_TRY_RUN(int main() { return system("test -h src/include/IV-3_1/InterViews"); },BSD_TEST=0,BSD_TEST=1,BSD_TEST=2) + AC_SUBST(prefix) #AC_SUBST(OPENGL) #AC_SUBST(XGL) *************** *** 320,325 **** --- 322,328 ---- AC_SUBST(INSTALLRELATIVE) AC_SUBST(USERPATH) AC_SUBST(INSTALLSUBDIR) + AC_SUBST(BSD_TEST) #output to config-$host_fragd PWD=`pwd`; export PWD Index: ComTerp/debugfunc.c diff -c ComTerp/debugfunc.c:1.1 ComTerp/debugfunc.c:1.2 *** ComTerp/debugfunc.c:1.1 Thu Jan 4 15:31:42 2001 --- src/ComTerp/debugfunc.c Tue Mar 27 09:32:28 2001 *************** *** 98,104 **** ComValue retval; do { char ch; ! cvect.clear(); /* need to handle embedded newlines differently */ do { ch = in.get(); --- 98,104 ---- ComValue retval; do { char ch; ! cvect.erase(cvect.begin(), cvect.end()); /* need to handle embedded newlines differently */ do { ch = in.get(); Index: include_std/vector.h diff -c /dev/null include_std/vector.h:1.1 *** /dev/null Tue Mar 27 09:32:40 2001 --- src/include/ivstd/vector.h Tue Mar 27 09:32:39 2001 *************** *** 0 **** --- 1,10 ---- + #ifndef _iv_vector_h + #define _iv_vector_h + #define _min_save min + #define _max_save max + #undef min + #undef max + #include_next <vector.h> + #define min _min_save + #define max _max_save + #endif Index: config_ivtools/config.defs.in diff -c config_ivtools/config.defs.in:1.1 config_ivtools/config.defs.in:1.2 *** config_ivtools/config.defs.in:1.1 Thu Jan 4 15:34:05 2001 --- config/config.defs.in Tue Mar 27 09:32:41 2001 *************** *** 55,58 **** --- 55,60 ---- #define IvToolsSrcRoot @PWD@ + #define BsdTest @BSD_TEST@ + Index: config_ivtools/rules.def diff -c config_ivtools/rules.def:1.1 config_ivtools/rules.def:1.2 *** config_ivtools/rules.def:1.1 Thu Jan 4 15:34:05 2001 --- config/rules.def Tue Mar 27 09:32:41 2001 *************** *** 1054,1065 **** * Install header files on Linux. */ #ifndef InstallIncludes #if InstallRelative #define InstallIncludes(dir) @@\ install:: @@\ ! -@if [ -L $(TOP)/include ]; then exit 0; else \ @@\ (cd $(TOP) && $(LN) src/include include); fi #else #define InstallIncludes(dir) @@\ --- 1054,1071 ---- * Install header files on Linux. */ + #if BsdTest + #define SYMTEST -h + #else + #define SYMTEST -L + #endif + #ifndef InstallIncludes #if InstallRelative #define InstallIncludes(dir) @@\ install:: @@\ ! -@if [ SYMTEST $(TOP)/include ]; then exit 0; else \ @@\ (cd $(TOP) && $(LN) src/include include); fi #else #define InstallIncludes(dir) @@\ *************** *** 1076,1082 **** #if InstallRelative #define InstallInclude(dir, file) @@\ install:: @@\ ! -@if [ -L $(TOP)/include ]; then exit 0; else \ @@\ (cd $(TOP) && $(LN) src/include include); fi #else #define InstallInclude(dir, file) @@\ --- 1082,1088 ---- #if InstallRelative #define InstallInclude(dir, file) @@\ install:: @@\ ! -@if [ SYMTEST $(TOP)/include ]; then exit 0; else \ @@\ (cd $(TOP) && $(LN) src/include include); fi #else #define InstallInclude(dir, file) @@\ *** /dev/null Tue Mar 27 09:32:43 PST 2001 --- patches/ivtools-010327-johnston-008 *************** patches/ivtools-010327-johnston-008 *** 0 **** --- 1 ---- + ivtools-010327-johnston-008 |
From: <ivt...@li...> - 2001-03-23 00:30:01
|
Patch: ivtools-010322-johnston-007 For: ivtools-0.9.1 Author: joh...@us... Subject: add wget to list of supported download utilities Requires: This is an intermediate patch to ivtools-0.9.1. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - add "wget" to the list of download utilities searched for and used by the code that reads URLs. The others are ivdl (from ivtools), curl, and w3c. Index: Attribute/paramlist.c diff -c Attribute/paramlist.c:1.2 Attribute/paramlist.c:1.3 *** Attribute/paramlist.c:1.2 Mon Feb 12 17:04:21 2001 --- src/Attribute/paramlist.c Thu Mar 22 16:27:32 2001 *************** *** 880,885 **** --- 880,889 ---- return 0; } + boolean ParamList::url_use_ok() { + return bincheck("ivdl") || bincheck("w3c") || bincheck("curl") || bincheck("wget"); + } + boolean ParamList::urltest(const char* buf) { if (!buf) return false; static boolean file_url_ok = bincheck("w3c") || bincheck("curl"); *************** *** 891,897 **** int ParamList::bintest(const char* command) { char combuf[BUFSIZ]; ! sprintf( combuf, "which %s", command ); FILE* fptr = popen(combuf, "r"); char testbuf[BUFSIZ]; fgets(testbuf, BUFSIZ, fptr); --- 895,901 ---- int ParamList::bintest(const char* command) { char combuf[BUFSIZ]; ! sprintf( combuf, "wr=`which %s`; echo $wr", command ); FILE* fptr = popen(combuf, "r"); char testbuf[BUFSIZ]; fgets(testbuf, BUFSIZ, fptr); Index: Attribute/paramlist.h diff -c Attribute/paramlist.h:1.2 Attribute/paramlist.h:1.3 *** Attribute/paramlist.h:1.2 Mon Feb 12 17:04:21 2001 --- src/Attribute/paramlist.h Thu Mar 22 16:27:32 2001 *************** *** 220,227 **** // parse pathname, expanding relative pathnames from 'dir', for use of a // param_callback. static boolean urltest(const char*); ! // test if pathname looks like a URL. static int bintest(const char* name); // return 0 if executable can be found, otherwise -1. --- 220,229 ---- // parse pathname, expanding relative pathnames from 'dir', for use of a // param_callback. + static boolean url_use_ok(); + // test if url use ok for pathnames. Same as OpenFileChooser method. static boolean urltest(const char*); ! // test if pathname looks like a URL. Same as OpenFileChooser method. static int bintest(const char* name); // return 0 if executable can be found, otherwise -1. Index: IVGlyph/ofilechooser.c diff -c IVGlyph/ofilechooser.c:1.1 IVGlyph/ofilechooser.c:1.2 *** IVGlyph/ofilechooser.c:1.1 Thu Jan 4 15:32:07 2001 --- src/IVGlyph/ofilechooser.c Thu Mar 22 16:27:39 2001 *************** *** 146,154 **** if (impl_) impl_->updatecaption(); } boolean OpenFileChooser::urltest(const char* buf) { if (!buf) return false; ! static boolean file_url_ok = bincheck("w3c") || bincheck("curl"); return strncasecmp("http://", buf, 7)==0 || strncasecmp("ftp://", buf, 6)==0 || --- 146,158 ---- if (impl_) impl_->updatecaption(); } + boolean OpenFileChooser::url_use_ok() { + return bincheck("ivdl") || bincheck("w3c") || bincheck("curl") || bincheck("wget"); + } + boolean OpenFileChooser::urltest(const char* buf) { if (!buf) return false; ! static boolean file_url_ok = url_use_ok(); return strncasecmp("http://", buf, 7)==0 || strncasecmp("ftp://", buf, 6)==0 || *************** *** 157,163 **** int OpenFileChooser::bintest(const char* command) { char combuf[BUFSIZ]; ! sprintf( combuf, "which %s", command ); FILE* fptr = popen(combuf, "r"); char testbuf[BUFSIZ]; fgets(testbuf, BUFSIZ, fptr); --- 161,167 ---- int OpenFileChooser::bintest(const char* command) { char combuf[BUFSIZ]; ! sprintf( combuf, "wr=`which %s`; echo $wr", command ); FILE* fptr = popen(combuf, "r"); char testbuf[BUFSIZ]; fgets(testbuf, BUFSIZ, fptr); Index: IVGlyph/ofilechooser.h diff -c IVGlyph/ofilechooser.h:1.1 IVGlyph/ofilechooser.h:1.2 *** IVGlyph/ofilechooser.h:1.1 Thu Jan 4 15:32:07 2001 --- src/IVGlyph/ofilechooser.h Thu Mar 22 16:27:39 2001 *************** *** 116,122 **** --- 116,125 ---- TransientWindow* twindow(); virtual void updatecaption(); + static boolean url_use_ok(); + // test if url use ok for pathnames. Same as ParamList method. static boolean urltest(const char*); + // test if pathname looks like a URL. Same as ParamList method. static int bintest(const char* name); // return 0 if executable can be found, otherwise -1. Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.3 OverlayUnidraw/ovimport.c:1.4 *** OverlayUnidraw/ovimport.c:1.3 Mon Feb 12 17:26:32 2001 --- src/OverlayUnidraw/ovimport.c Thu Mar 22 16:27:53 2001 *************** *** 1302,1311 **** char buffer[BUFSIZ]; static boolean use_w3c = OverlayKit::bincheck("w3c"); static boolean use_curl = OverlayKit::bincheck("curl"); ! if (use_w3c) ! sprintf(buffer,"w3c -q %s", path); ! else if (use_curl) sprintf(buffer,"curl %s", path); else sprintf(buffer,"ivdl %s -", path); cerr << buffer << "\n"; --- 1302,1314 ---- char buffer[BUFSIZ]; static boolean use_w3c = OverlayKit::bincheck("w3c"); static boolean use_curl = OverlayKit::bincheck("curl"); ! static boolean use_wget = OverlayKit::bincheck("wget"); ! if (use_curl) sprintf(buffer,"curl %s", path); + else if (use_w3c) + sprintf(buffer,"w3c -q %s", path); + else if (use_wget) + sprintf(buffer,"wget -q -O - %s", path); else sprintf(buffer,"ivdl %s -", path); cerr << buffer << "\n"; *** /dev/null Thu Mar 22 16:28:05 PST 2001 --- patches/ivtools-010322-johnston-007 *************** patches/ivtools-010322-johnston-007 *** 0 **** --- 1 ---- + ivtools-010322-johnston-007 |
From: <ivt...@li...> - 2001-03-06 17:44:32
|
Patch: ivtools-010306-johnston-006 For: ivtools-0.9.1 Author: joh...@us... Subject: touchups Requires: This is an intermediate patch to ivtools-0.9.1. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - remove duplicate IVGlyph/figure.[ch] from MANIFEST - add /usr/local/include/g++-3 and /usr/local/include/g++-2 to paths searched for libstdc++ include files by configure. Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.3 top_ivtools/MANIFEST:1.4 *** top_ivtools/MANIFEST:1.3 Mon Feb 12 17:26:18 2001 --- ./MANIFEST Tue Mar 6 09:43:03 2001 *************** *** 432,439 **** ivtools-0.9/src/IVGlyph/fieldedit.c ivtools-0.9/src/IVGlyph/fieldedit.h ivtools-0.9/src/IVGlyph/figure.c - ivtools-0.9/src/IVGlyph/figure.c - ivtools-0.9/src/IVGlyph/figure.h ivtools-0.9/src/IVGlyph/figure.h ivtools-0.9/src/IVGlyph/gdialogs.c ivtools-0.9/src/IVGlyph/gdialogs.h --- 432,437 ---- Index: top_ivtools/aclocal.m4 diff -c top_ivtools/aclocal.m4:1.1 top_ivtools/aclocal.m4:1.2 *** top_ivtools/aclocal.m4:1.1 Thu Jan 4 15:31:33 2001 --- ./aclocal.m4 Tue Mar 6 09:43:03 2001 *************** *** 25,31 **** ice_cv_cxx_include_dir="$prefix/include" for pfx in "$prefix" "$exec_prefix"; do for dir in "$pfx/lib/g++-include" "$pfx/include/CC" \ ! "$pfx/include" /usr/include; do if test -d "$dir"; then ice_cv_cxx_include_dir="$dir" break --- 25,31 ---- ice_cv_cxx_include_dir="$prefix/include" for pfx in "$prefix" "$exec_prefix"; do for dir in "$pfx/lib/g++-include" "$pfx/include/CC" \ ! "$pfx/include" /usr/include /usr/local/include/g++-3 /usr/local/include/g++-2 ; do if test -d "$dir"; then ice_cv_cxx_include_dir="$dir" break *** /dev/null Tue Mar 6 09:43:14 PST 2001 --- patches/ivtools-010306-johnston-006 *************** patches/ivtools-010306-johnston-006 *** 0 **** --- 1 ---- + ivtools-010306-johnston-006 |
From: <ivt...@li...> - 2001-02-13 01:28:28
|
Patch: ivtools-010212-johnston-005 For: ivtools-0.9.1 Author: joh...@us... Subject: remove anytopnm from ivtools Requires: This is an intermediate patch to ivtools-0.9.1. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - this patch removes anytopnm from ivtools, since the enhancements our copy had over pbmplus were incorporated directly into the netpbm variant. The salient feature was the ability for anytopnm to recognize it had a file that was already in a pbmplus format, and pass it through. Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.2 top_ivtools/MANIFEST:1.3 *** top_ivtools/MANIFEST:1.2 Wed Jan 10 11:52:36 2001 --- ./MANIFEST Mon Feb 12 17:26:18 2001 *************** *** 1726,1732 **** ivtools-0.9/src/man/refman3.1/refman.PS ivtools-0.9/src/scripts/Imakefile ivtools-0.9/src/scripts/Makefile - ivtools-0.9/src/scripts/anytopnm.sh ivtools-0.9/src/scripts/bsdinst.sh ivtools-0.9/src/scripts/chgsuffix.sh ivtools-0.9/src/scripts/cntsrclines.bash --- 1726,1731 ---- Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.2 OverlayUnidraw/ovimport.c:1.3 *** OverlayUnidraw/ovimport.c:1.2 Mon Feb 12 17:04:28 2001 --- src/OverlayUnidraw/ovimport.c Mon Feb 12 17:26:32 2001 *************** *** 1288,1294 **** GraphicComp* comp = nil; FILE* fptr = nil; boolean incremental_flag = false; ! if (chooser_ && chooser_->auto_convert()) { char buffer[BUFSIZ]; sprintf( buffer, "anytopnm %s", path ); fptr = popen(buffer, "r"); --- 1288,1295 ---- GraphicComp* comp = nil; FILE* fptr = nil; boolean incremental_flag = false; ! static boolean use_anytopnm = OverlayKit::bincheck("anytopnm"); ! if (chooser_ && chooser_->auto_convert() && use_anytopnm) { char buffer[BUFSIZ]; sprintf( buffer, "anytopnm %s", path ); fptr = popen(buffer, "r"); Index: scripts_ivtools/Imakefile diff -c scripts_ivtools/Imakefile:1.1 scripts_ivtools/Imakefile:1.2 *** scripts_ivtools/Imakefile:1.1 Thu Jan 4 15:33:49 2001 --- src/scripts/Imakefile Mon Feb 12 17:26:39 2001 *************** *** 40,46 **** InstallScriptAs(cntsrclines.bash,$(BINDIR),cntsrclines) InstallScriptAs(tiftopnm.bash,$(BINDIR),tiftopnm) - InstallScriptAs(anytopnm.sh,$(BINDIR),anytopnm) InstallScriptAs(pnmtopgm.sh,$(BINDIR),pnmtopgm) clean:: --- 40,45 ---- Index: scripts_ivtools/anytopnm.sh diff -c scripts_ivtools/anytopnm.sh:1.1 scripts_ivtools/anytopnm.sh:removed *** scripts_ivtools/anytopnm.sh:1.1 Thu Jan 4 15:33:49 2001 --- src/scripts/anytopnm.sh Mon Feb 12 17:26:40 2001 *************** *** 1,231 **** - #!/bin/sh - # - # anytopnm - attempt to convert an unknown type of image file to a P?M file. - # - # Copyright 1998 Vectaport Inc. - # Copyright (C) 1991 by Jef Poskanzer. - # - # 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. This software is provided "as is" without express or - # implied warranty. - - if [ ! $# = 1 ] ; then - echo "usage: $0 <file>" 1>&2 - exit 1 - fi - - origfile="$1" - file="$origfile" - tmpfiles="" - - while true ; do - - filetype=`file "$file"` - - case "$filetype" in - - *PBM* | *PGM* | *PPM* ) - cat "$file" - break - ;; - - *compress* ) - newfile="/tmp/atn.comp.$origfile" - rm -f "$newfile" - zcat < "$file" > "$newfile" - file="$newfile" - tmpfiles="$tmpfiles $newfile" - ;; - - *btoa* ) - newfile="/tmp/atn.btoa.$origfile" - rm -f "$newfile" - atob < "$file" > "$newfile" - file="$newfile" - tmpfiles="$tmpfiles $newfile" - ;; - - *Sun* | *rasterfile* ) - rasttopnm "$file" - break - ;; - - *GIF* ) - giftopnm "$file" - break - ;; - - *TIFF* ) - tifftopnm "$file" - break - ;; - - *IFF*ILBM* ) - ilbmtoppm "$file" - break - ;; - - *Lisp* ) - lispmtopgm "$file" - break - ;; - - *PC*Paintbrush* ) - pcxtoppm "$file" - break - ;; - - *Bennet* ) - ybmtopbm "$file" - break - ;; - - *JPEG* ) - cmapfile=`tmpnam` - stdcmapppm >$cmapfile - djpeg -map $cmapfile -dither fs -pnm "$file" - rm $cmapfile - break - ;; - - *PC*bitmap*data* ) - bmptoppm "$file" - break - ;; - - *PPM*rawbits* ) - cat "$file" - break - ;; - - *PGM*rawbits* ) - cat "$file" - break - ;; - - *PBM*rawbits* ) - cat "$file" - break - ;; - - *PPM*image* ) - cat "$file" - break - ;; - - *PGM*image* ) - cat "$file" - break - ;; - - *PBM*image* ) - cat "$file" - break - ;; - - * ) - # Can't figure out the file type from the magic number, - # try the extension. - case "$file" in - - *.pbm | *.pbm.* | *.pgm | *.pgm.* | *.ppm | *.ppm.* ) - cat "$file" - ;; - *.x | *.x.* | *.xbm | *.xbm.* | *.x10bm | *.x10bm.* | *.x11bm | *.x11bm.* | *.bitmap | *.bitmap.* ) - xbmtopbm "$file" - ;; - *.r | *.r.* | *.rast | *.rast.* ) - rasttopnm "$file" - ;; - *.mac | *.mac.* | *.macp | *.macp.* ) - macptopbm "$file" - ;; - *.g3 | *.g3.* | *.fax | *.fax.* ) - g3topbm "$file" - ;; - *.xwd | *.xwd.* | *.x10wd | *.x10wd.* | *.x11wd | *.x11wd.* ) - xwdtopnm "$file" - ;; - *.brush | *.brush.* ) - brushtopbm "$file" - ;; - *.img | *.img.* ) - gemtopbm "$file" - ;; - *.pcx | *.pcx.* ) - pcxtoppm "$file" - ;; - *.pic | *.pic.* | *.pict | *.pict.* | *.pict2 | *.pict2.* ) - picttoppm "$file" - ;; - *.tif | *.tif.* | *.tiff | *.tiff.* ) - tifftopnm "$file" - ;; - *.fs | *.fs.* | *.face | *.face.* ) - fstopgm "$file" - ;; - *.hips | *.hips.* ) - hipstopgm "$file" - ;; - *.fits | *.fits.* ) - fitstopgm "$file" - ;; - *.gif | *.gif.* ) - giftoppm "$file" - ;; - *.iff | *.iff.* | *.ilbm | *.ilbm.* ) - ilbmtoppm "$file" - ;; - *.lispm | *.lispm.* ) - lispmtopgm "$file" - ;; - *.mtv | *.mtv.* ) - mtvtoppm "$file" - ;; - *.qrt | *.qrt.* ) - qrttoppm "$file" - ;; - *.tga | *.tga.* | *.targa | *.targa.* ) - tgatoppm "$file" - ;; - *.xim | *.xim.* ) - ximtoppm "$file" - ;; - *.xpm | *.xpm.* | *.xpm2 | *.xpm2.* ) - xpmtoppm "$file" - ;; - *.pi1 | *.pi1.* ) - pi1toppm "$file" - ;; - *.pi3 | *.pi3.* ) - pi3topbm "$file" - ;; - *.spu | *.spu.* ) - sputoppm "$file" - ;; - *.spc | *.spc.* ) - spctoppm "$file" - ;; - *.ybm | *.ybm.* | *.face | *.face.* ) - ybmtopbm "$file" - ;; - * ) - echo "$0: unknown file type" 1>&2 - exit 1 - ;; - - esac - break - ;; - - esac - - done - - if [ "$tmpfiles" ] ; then - rm -f $tmpfiles - fi - exit 0 --- 0 ---- *** /dev/null Mon Feb 12 17:26:42 PST 2001 --- patches/ivtools-010212-johnston-005 *************** patches/ivtools-010212-johnston-005 *** 0 **** --- 1 ---- + ivtools-010212-johnston-005 |
From: <ivt...@li...> - 2001-02-13 01:09:10
|
Patch: ivtools-010212-johnston-004 For: ivtools-0.9.1 Author: joh...@us... Subject: changes to support save/restore of graphics by Unix command Requires: This is an intermediate patch to ivtools-0.9.1. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - set of changes to allow save/restore of graphics files internal to a drawing by the Unix command line used to generate them. For example, if "xwdtopnm temp.xwd" was used to import a raster file (with "from command" checked on the import dialog box), a subsequent save would write this command (and only this command) to the document on disk, and a subsequent restore would re-run the command to regenerate the contents. Should work equally well for rasters, PostScript, and ivtools drawtool files. Index: Attribute/paramlist.c diff -c Attribute/paramlist.c:1.1 Attribute/paramlist.c:1.2 *** Attribute/paramlist.c:1.1 Thu Jan 4 15:31:38 2001 --- src/Attribute/paramlist.c Mon Feb 12 17:04:21 2001 *************** *** 120,125 **** --- 120,126 ---- /*****************************************************************************/ LexScan* ParamList::_lexscan = nil; + ParamStruct* ParamList::_currstruct = nil; ParamList::ParamList (ParamList* s) { _alist = new AList; *************** *** 345,351 **** } } ! ParamStruct* ParamList::GetStruct (ALIterator i) { return Struct(Elem(i)); } void ParamList::SetStruct (ParamStruct* gv, ALIterator& i) { i.SetValue(_alist->Find(gv)); --- 346,352 ---- } } ! ParamStruct* ParamList::GetStruct (ALIterator i) { _currstruct = Struct(Elem(i)); return _currstruct;} void ParamList::SetStruct (ParamStruct* gv, ALIterator& i) { i.SetValue(_alist->Find(gv)); Index: Attribute/paramlist.h diff -c Attribute/paramlist.h:1.1 Attribute/paramlist.h:1.2 *** Attribute/paramlist.h:1.1 Thu Jan 4 15:31:38 2001 --- src/Attribute/paramlist.h Mon Feb 12 17:04:21 2001 *************** *** 235,240 **** --- 235,243 ---- static char octal(const char* p); // convert string of three octal digits to a character. + static ParamStruct* CurrParamStruct() { return _currstruct; } + // last ParamStruct from ::GetStruct + protected: void insert(ParamStruct*); void insert_first(ParamStruct*); *************** *** 270,275 **** --- 273,279 ---- int _other_count; static LexScan* _lexscan; + static ParamStruct* _currstruct; }; #include <IV-2_6/_leave.h> Index: OverlayUnidraw/ovfile.c diff -c OverlayUnidraw/ovfile.c:1.1 OverlayUnidraw/ovfile.c:1.2 *** OverlayUnidraw/ovfile.c:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovfile.c Mon Feb 12 17:04:28 2001 *************** *** 24,29 **** --- 24,30 ---- #include <OverlayUnidraw/ovcatalog.h> #include <OverlayUnidraw/ovclasses.h> #include <OverlayUnidraw/ovfile.h> + #include <OverlayUnidraw/ovimport.h> #include <OverlayUnidraw/paramlist.h> #include <Unidraw/Commands/command.h> *************** *** 37,42 **** --- 38,44 ---- #include <stdio.h> #include <stream.h> #include <string.h> + #include <fstream.h> /*****************************************************************************/ *************** *** 67,74 **** } void OverlayFileComp::GrowParamList(ParamList* pl) { ! pl->add_param("pathname", ParamStruct::required, &OverlayFileScript::ReadPathName, this, this); OverlaysComp::GrowParamList(pl); } --- 69,78 ---- } void OverlayFileComp::GrowParamList(ParamList* pl) { ! pl->add_param("path", ParamStruct::optional, &OverlayFileScript::ReadPathName, this, this); + pl->add_param("popen", ParamStruct::keyword, &OverlayFileScript::ReadPathName, + this, this); OverlaysComp::GrowParamList(pl); } *************** *** 175,187 **** int OverlayFileScript::ReadPathName (istream& in, void* addr1, void* addr2, void* addr3, void* addr4) { OverlayFileComp* filecomp = (OverlayFileComp*)addr1; char pathname[BUFSIZ]; ! if (ParamList::parse_pathname(in, pathname, BUFSIZ, filecomp->GetBaseDir()) != 0) return -1; /* check pathname for recursion */ OverlayComp* parent = (OverlayComp*) filecomp->GetParent(); ! while (parent != nil) { if (parent->GetPathName() && strcmp(parent->GetPathName(), pathname) == 0) { cerr << "pathname recursion not allowed (" << pathname << ")\n"; return -1; --- 179,200 ---- int OverlayFileScript::ReadPathName (istream& in, void* addr1, void* addr2, void* addr3, void* addr4) { OverlayFileComp* filecomp = (OverlayFileComp*)addr1; + const char* paramname = ParamList::CurrParamStruct()->name(); + filecomp->SetPopenFlag(strcmp(paramname, "popen")==0); + char pathname[BUFSIZ]; ! if (filecomp->GetPopenFlag()) { ! if (ParamList::parse_string(in, pathname, BUFSIZ) != 0) return -1; + } else { + if (ParamList::parse_pathname(in, pathname, BUFSIZ, filecomp->GetBaseDir()) != 0) + return -1; + } + /* check pathname for recursion */ OverlayComp* parent = (OverlayComp*) filecomp->GetParent(); ! while (!filecomp->GetPopenFlag() && parent != nil) { if (parent->GetPathName() && strcmp(parent->GetPathName(), pathname) == 0) { cerr << "pathname recursion not allowed (" << pathname << ")\n"; return -1; *************** *** 190,206 **** } filecomp->SetPathName(pathname); ! OverlayIdrawComp* child = nil; ! OverlayCatalog* catalog = (OverlayCatalog*) unidraw->GetCatalog(); ! catalog->SetParent(filecomp); ! if( catalog->OverlayCatalog::Retrieve(pathname, (Component*&)child)) { catalog->SetParent(nil); catalog->Forget(child); filecomp->Append(child); return 0; ! } else { catalog->SetParent(nil); return -1; } } --- 203,235 ---- } filecomp->SetPathName(pathname); ! if (!filecomp->GetPopenFlag()) { ! OverlayIdrawComp* child = nil; ! OverlayCatalog* catalog = (OverlayCatalog*) unidraw->GetCatalog(); ! catalog->SetParent(filecomp); ! if( catalog->OverlayCatalog::Retrieve(pathname, (Component*&)child)) { catalog->SetParent(nil); catalog->Forget(child); filecomp->Append(child); return 0; ! } else { catalog->SetParent(nil); return -1; + } + } else { + OvImportCmd impcmd((Editor*)nil); + FILE* fptr = popen(pathname, "r"); + if (fptr) { + ifstream ifs; + ifs.rdbuf()->attach(fileno(fptr)); + OverlayComp* child = (OverlayComp*) impcmd.Import(ifs); + if (child) { + filecomp->Append(child); + return 0; + } + fclose(fptr); + } + return -1; } } Index: OverlayUnidraw/ovfile.h diff -c OverlayUnidraw/ovfile.h:1.1 OverlayUnidraw/ovfile.h:1.2 *** OverlayUnidraw/ovfile.h:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovfile.h Mon Feb 12 17:04:28 2001 *************** *** 59,64 **** --- 59,70 ---- // return point to underlying top-level component. virtual boolean operator == (OverlayComp&); + + void SetPopenFlag(boolean flg) { _popenflg = flg; } + // set flag that indicates whether to read from command pipe. + boolean GetPopenFlag() { return _popenflg; } + // get flag that indicates whether to read from command pipe. + virtual void AdjustBaseDir(const char* oldpath, const char* newpath); // adjust base directory used for generating pathnames for this component, // done when a document is saved to a new location. *************** *** 67,72 **** --- 73,79 ---- void GrowParamList(ParamList*); static ParamList* _overlay_file_params; char * _pathname; + boolean _popenflg; CLASS_SYMID("OverlayFileComp"); }; Index: OverlayUnidraw/ovimport.c diff -c OverlayUnidraw/ovimport.c:1.1 OverlayUnidraw/ovimport.c:1.2 *** OverlayUnidraw/ovimport.c:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovimport.c Mon Feb 12 17:04:28 2001 *************** *** 1520,1529 **** --- 1520,1536 ---- if (pathname && !return_fd) { char buffer[BUFSIZ]; + #if 0 if (compressed) sprintf(buffer, "cm=`ivtmpnam`;stdcmapppm>$cm;gzip -c %s | djpeg -map $cm -dither fs -pnm;rm $cm", pathname); else sprintf(buffer, "cm=`ivtmpnam`;stdcmapppm>$cm;djpeg -map $cm -dither fs -pnm %s;rm $cm", pathname); + #else + if (compressed) + sprintf(buffer, "cm=`ivtmpnam`;stdcmapppm>$cm;gzip -c %s | djpeg -pnm;rm $cm", pathname); + else + sprintf(buffer, "cm=`ivtmpnam`;stdcmapppm>$cm;djpeg -pnm %s;rm $cm", pathname); + #endif FILE* pptr = popen(buffer, "r"); helper.add_pipe(pptr); if (pptr) { Index: OverlayUnidraw/ovraster.c diff -c OverlayUnidraw/ovraster.c:1.1 OverlayUnidraw/ovraster.c:1.2 *** OverlayUnidraw/ovraster.c:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/ovraster.c Mon Feb 12 17:04:28 2001 *************** *** 329,338 **** if (graphic == nil) { OverlayRasterRect* rr = GetRasterOvComp()->GetOverlayRasterRect(); ! OverlayRaster* r = rr->GetOverlayRaster(); ! OverlayRaster* or = rr->GetOverlayRaster(); ! graphic = or ? (new OverlayRasterRect(or, rr)) : ! (new OverlayRasterRect(r, rr)); SetGraphic(graphic); } --- 329,336 ---- if (graphic == nil) { OverlayRasterRect* rr = GetRasterOvComp()->GetOverlayRasterRect(); ! OverlayRaster* r = rr ? rr->GetOverlayRaster() : nil; ! graphic = r ? new OverlayRasterRect(r, rr) : nil; SetGraphic(graphic); } Index: OverlayUnidraw/scriptview.c diff -c OverlayUnidraw/scriptview.c:1.1 OverlayUnidraw/scriptview.c:1.2 *** OverlayUnidraw/scriptview.c:1.1 Thu Jan 4 15:33:06 2001 --- src/OverlayUnidraw/scriptview.c Mon Feb 12 17:04:28 2001 *************** *** 524,530 **** } else { Transformer* t = new Transformer(a00, a01, a10, a11, a20, a21); ! gs->SetTransformer(t); Unref(t); return 0; } --- 524,531 ---- } else { Transformer* t = new Transformer(a00, a01, a10, a11, a20, a21); ! if (gs) gs->SetTransformer(t); ! else fprintf(stderr, "OverlayScript::ReadTransform: no graphic for transformer\n"); Unref(t); return 0; } *** /dev/null Mon Feb 12 17:04:36 PST 2001 --- patches/ivtools-010212-johnston-004 *************** patches/ivtools-010212-johnston-004 *** 0 **** --- 1 ---- + ivtools-010212-johnston-004 |
From: <ivt...@li...> - 2001-01-11 23:05:19
|
Patch: ivtools-010111-johnston-003 For: ivtools-0.9 Author: joh...@us... Subject: add COPYING Requires: This is an intermediate patch to ivtools-0.9. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - add COPYING Index: top_ivtools/COPYING diff -c /dev/null top_ivtools/COPYING:1.1 *** /dev/null Thu Jan 11 15:02:33 2001 --- ./COPYING Thu Jan 11 15:02:32 2001 *************** *** 0 **** --- 1,340 ---- + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public + License is intended to guarantee your freedom to share and change free + software--to make sure the software is free for all its users. This + General Public License applies to most of the Free Software + Foundation's software and to any other program whose authors commit to + using it. (Some other Free Software Foundation software is covered by + the GNU Library General Public License instead.) You can apply it to + your programs, too. + + When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that you + have the freedom to distribute copies of free software (and charge for + this service if you wish), that you receive source code or can get it + if you want it, that you can change the software or use pieces of it + in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the rights. + These restrictions translate to certain responsibilities for you if you + distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether + gratis or for a fee, you must give the recipients all the rights that + you have. You must make sure that they, too, receive or can get the + source code. And you must show them these terms so they know their + rights. + + We protect your rights with two steps: (1) copyright the software, and + (2) offer you this license which gives you legal permission to copy, + distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain + that everyone understands that there is no warranty for this free + software. If the software is modified by someone else and passed on, we + want its recipients to know that what they have is not the original, so + that any problems introduced by others will not reflect on the original + authors' reputations. + + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that redistributors of a free + program will individually obtain patent licenses, in effect making the + program proprietary. To prevent this, we have made it clear that any + patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains + a notice placed by the copyright holder saying it may be distributed + under the terms of this General Public License. The "Program", below, + refers to any such program or work, and a "work based on the Program" + means either the Program or any derivative work under copyright law: + that is to say, a work containing the Program or a portion of it, + either verbatim or with modifications and/or translated into another + language. (Hereinafter, translation is included without limitation in + the term "modification".) Each licensee is addressed as "you". + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of + running the Program is not restricted, and the output from the Program + is covered only if its contents constitute a work based on the + Program (independent of having been made by running the Program). + Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's + source code as you receive it, in any medium, provided that you + conspicuously and appropriately publish on each copy an appropriate + copyright notice and disclaimer of warranty; keep intact all the + notices that refer to this License and to the absence of any warranty; + and give any other recipients of the Program a copy of this License + along with the Program. + + You may charge a fee for the physical act of transferring a copy, and + you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion + of it, thus forming a work based on the Program, and copy and + distribute such modifications or work under the terms of Section 1 + above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Program, + and can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based + on the Program, the distribution of the whole must be on the terms of + this License, whose permissions for other licensees extend to the + entire whole, and thus to each and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Program. + + In addition, mere aggregation of another work not based on the Program + with the Program (or with a work based on the Program) on a volume of + a storage or distribution medium does not bring the other work under + the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms of + Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete source + code means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to + control compilation and installation of the executable. However, as a + special exception, the source code distributed need not include + anything that is normally distributed (in either source or binary + form) with the major components (compiler, kernel, and so on) of the + operating system on which the executable runs, unless that component + itself accompanies the executable. + + If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this License. + However, parties who have received copies, or rights, from you under + this License will not have their licenses terminated so long as such + parties remain in full compliance. + + 5. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Program or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Program (or any work based on the + Program), you indicate your acceptance of this License to do so, and + all its terms and conditions for copying, distributing or modifying + the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program subject to + these terms and conditions. You may not impose any further + restrictions on the recipients' exercise of the rights granted herein. + You are not responsible for enforcing compliance by third parties to + this License. + + 7. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot + distribute so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you + may not distribute the Program at all. For example, if a patent + license would not permit royalty-free redistribution of the Program by + all those who receive copies directly or indirectly through you, then + the only way you could satisfy both it and this License would be to + refrain entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply and the section as a whole is intended to apply in other + circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system, which is + implemented by public license practices. Many people have made + generous contributions to the wide range of software distributed + through that system in reliance on consistent application of that + system; it is up to the author/donor to decide if he or she is willing + to distribute software through any other system and a licensee cannot + impose that choice. + + This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Program under this License + may add an explicit geographical distribution limitation excluding + those countries, so that distribution is permitted only in or among + countries not thus excluded. In such case, this License incorporates + the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions + of the General Public License from time to time. Such new versions will + be similar in spirit to the present version, but may differ in detail to + address new problems or concerns. + + Each version is given a distinguishing version number. If the Program + specifies a version number of this License which applies to it and "any + later version", you have the option of following the terms and conditions + either of that version or of any later version published by the Free + Software Foundation. If the Program does not specify a version number of + this License, you may choose any version ever published by the Free Software + Foundation. + + 10. If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the author + to ask for permission. For software which is copyrighted by the Free + Software Foundation, write to the Free Software Foundation; we sometimes + make exceptions for this. Our decision will be guided by the two goals + of preserving the free status of all derivatives of our free software and + of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY + FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN + OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES + PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED + OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS + TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE + PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, + REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR + REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, + INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING + OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED + TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY + YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER + PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it + free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest + to attach them to the start of each source file to most effectively + convey the exclusion of warranty; and each file should have at least + the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Also add information on how to contact you by electronic and paper mail. + + If the program is interactive, make it output a short notice like this + when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + + The hypothetical commands `show w' and `show c' should show the appropriate + parts of the General Public License. Of course, the commands you use may + be called something other than `show w' and `show c'; they could even be + mouse-clicks or menu items--whatever suits your program. + + You should also get your employer (if you work as a programmer) or your + school, if any, to sign a "copyright disclaimer" for the program, if + necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + + This General Public License does not permit incorporating your program into + proprietary programs. If your program is a subroutine library, you may + consider it more useful to permit linking proprietary applications with the + library. If this is what you want to do, use the GNU Library General + Public License instead of this License. *** /dev/null Thu Jan 11 15:02:43 PST 2001 --- patches/ivtools-010111-johnston-003 *************** patches/ivtools-010111-johnston-003 *** 0 **** --- 1 ---- + ivtools-010111-johnston-003 |
From: <ivt...@li...> - 2001-01-10 20:10:24
|
Patch: ivtools-010110-johnston-002 For: ivtools-0.9 Author: joh...@us... Subject: final touchups for 0.9.1 Requires: This is an intermediate patch to ivtools-0.9. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.1 top_ivtools/INSTALL:1.2 *** top_ivtools/INSTALL:1.1 Thu Jan 4 15:31:33 2001 --- ./INSTALL Wed Jan 10 12:04:37 2001 *************** *** 1,7 **** INSTALL for ivtools-0.9 ! Instructions for building ivtools-0.9 from source: 0. Compilation Environment --- 1,7 ---- INSTALL for ivtools-0.9 ! Instructions for building ivtools-0.9.1 from source: 0. Compilation Environment Index: top_ivtools/README diff -c top_ivtools/README:1.1 top_ivtools/README:1.2 *** top_ivtools/README:1.1 Thu Jan 4 15:31:33 2001 --- ./README Wed Jan 10 12:04:37 2001 *************** *** 2,8 **** README for ivtools 0.9 ! This directory contains a release of ivtools 0.9. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. --- 2,8 ---- README for ivtools 0.9 ! This directory contains a release of ivtools 0.9.1. You should read the rest of this file for information on what ivtools is and the INSTALL file for instructions on how to build it. Index: top_ivtools/VERSION diff -c top_ivtools/VERSION:1.1 top_ivtools/VERSION:1.2 *** top_ivtools/VERSION:1.1 Thu Jan 4 15:31:33 2001 --- ./VERSION Wed Jan 10 12:04:37 2001 *************** *** 1 **** ! Release 0.9 --- 1 ---- ! Release 0.9.1 *** /dev/null Wed Jan 10 12:05:39 PST 2001 --- patches/ivtools-010110-johnston-002 *************** patches/ivtools-010110-johnston-002 *** 0 **** --- 1 ---- + ivtools-010110-johnston-002 |
From: <ivt...@li...> - 2001-01-10 19:54:33
|
Patch: ivtools-010110-johnston-001 For: ivtools-0.9 Author: joh...@us... Subject: fix two minor 0.9 oversights in a 0.9.1 Requires: This is an intermediate patch to ivtools-0.9. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.1 top_ivtools/CHANGES:1.2 *** top_ivtools/CHANGES:1.1 Thu Jan 4 15:31:33 2001 --- ./CHANGES Wed Jan 10 11:52:36 2001 *************** *** 1,3 **** --- 1,12 ---- + Jan 10th 2000 ivtools-0.9.1 + + Correct 0.9 oversights: + + - restore GPL dual licensing documentation in COPYRIGHT, COPYING, and + MANIFEST. + + - correctly set version number to 0.9.1 + December 19th 2000 ivtools-0.9 - fix segfault in new comdraw addtool command when the supplied Index: top_ivtools/COPYRIGHT diff -c top_ivtools/COPYRIGHT:1.1 top_ivtools/COPYRIGHT:1.2 *** top_ivtools/COPYRIGHT:1.1 Thu Jan 4 15:31:33 2001 --- ./COPYRIGHT Wed Jan 10 11:52:36 2001 *************** *** 1,3 **** --- 1,8 ---- + As of September 6th 2000 the portion of ivtools for which Vectaport + Inc. holds the copyright is made available under the GPL as + well as the following license. See the file COPYING for details on + the GPL. + /* * Copyright (c) 2000 Vectaport Inc., IET Inc * Copyright (c) 1999 Vectaport Inc., IET Inc, R.B. Kissh and Associates Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.1 top_ivtools/MANIFEST:1.2 *** top_ivtools/MANIFEST:1.1 Thu Jan 4 15:31:33 2001 --- ./MANIFEST Wed Jan 10 11:52:36 2001 *************** *** 4,9 **** --- 4,10 ---- ivtools-0.9/CHANGES-0.6 ivtools-0.9/CHANGES-0.7 ivtools-0.9/CHANGES-0.8 + ivtools-0.9/COPYING ivtools-0.9/COPYRIGHT ivtools-0.9/COPYRIGHT.proposed ivtools-0.9/INSTALL Index: include_std/version.h diff -c include_std/version.h:1.1 include_std/version.h:1.2 *** include_std/version.h:1.1 Thu Jan 4 15:33:47 2001 --- src/include/ivstd/version.h Wed Jan 10 11:52:52 2001 *************** *** 1,3 **** ! #define IvtoolsVersion 0.8.4 ! #define VersionString "0.8.4" ! #define ReleaseString "ivtools-0.8.4" --- 1,3 ---- ! #define IvtoolsVersion 0.9.1 ! #define VersionString "0.9.1" ! #define ReleaseString "ivtools-0.9.1" Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.1 config_ivtools/params.def:1.2 *** config_ivtools/params.def:1.1 Thu Jan 4 15:34:05 2001 --- config/params.def Wed Jan 10 11:52:55 2001 *************** *** 27,33 **** * Name of the software release */ #ifndef Release ! #define Release ivtools-0.9 #endif RELEASE = Release --- 27,33 ---- * Name of the software release */ #ifndef Release ! #define Release ivtools-0.9.1 #endif RELEASE = Release *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 0.9.0 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 0.9.1 #endif VERSION = Version *** /dev/null Wed Jan 10 11:52:56 PST 2001 --- patches/ivtools-010110-johnston-001 *************** patches/ivtools-010110-johnston-001 *** 0 **** --- 1 ---- + ivtools-010110-johnston-001 |
From: <ivt...@li...> - 2000-12-13 01:02:52
|
Patch: ivtools-001212-johnston-105 For: ivtools-0.8.4 Author: joh...@us... Subject: new and improved comterp debug commands Requires: This is an intermediate patch to ivtools-0.8.4. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - revises comterp pause, trace, and step commands. Index: ComTerp/comfunc.c diff -c ComTerp/comfunc.c:1.2 ComTerp/comfunc.c:1.3 *** ComTerp/comfunc.c:1.2 Fri Oct 6 16:49:58 2000 --- src/ComTerp/comfunc.c Tue Dec 12 16:58:43 2000 *************** *** 25,30 **** --- 25,31 ---- #include <ComTerp/comfunc.h> #include <ComTerp/comterp.h> #include <ComTerp/comvalue.h> + #include <ComUtil/comutil.h> #include <Attribute/attrlist.h> #include <string.h> *************** *** 417,422 **** --- 418,432 ---- return al; } + ComTerpServ* ComFunc::comterpserv() { + return _comterp && _comterp->is_serv() ? (ComTerpServ*)_comterp : nil; + } + + ostream& operator<< (ostream& out, const ComFunc& cf) { + out << symbol_pntr(cf.funcid()); + return out; + } + /*****************************************************************************/ ComFuncState::ComFuncState(int narg, int nkey, int pedepth, *************** *** 433,436 **** --- 443,453 ---- ComFuncState::ComFuncState(ComFuncState& cfs) { *this = cfs; } + + ostream& operator<< (ostream& out, const ComFuncState& cf) { + out << "nargs = " << cf._nargs; + out << ";nkeys = " << cf._nkeys; + return out; + } + Index: ComTerp/comfunc.h diff -c ComTerp/comfunc.h:1.1 ComTerp/comfunc.h:1.2 *** ComTerp/comfunc.h:1.1 Wed Aug 30 09:59:30 2000 --- src/ComTerp/comfunc.h Tue Dec 12 16:58:43 2000 *************** *** 95,105 **** ComTerp* comterp() { return _comterp; } // return ComTerp this ComFunc is associated with. ! ComTerpServ* comterpserv() { return (ComTerpServ*)_comterp; } // return ComTerpServ this ComFunc is associated with. ! ComValue& pop_stack(); // pop top off the stack. ComValue& pop_symbol(); // pop top off the stack preserving symbol ids if ComValue is a symbol type. --- 95,105 ---- ComTerp* comterp() { return _comterp; } // return ComTerp this ComFunc is associated with. ! ComTerpServ* comterpserv(); // return ComTerpServ this ComFunc is associated with. ! ComValue& pop_stack(); // pop top off the stack. ComValue& pop_symbol(); // pop top off the stack preserving symbol ids if ComValue is a symbol type. *************** *** 153,159 **** void funcid(int id) { _funcid = id; } // set symbol id of name for func ! int funcid() { return _funcid; } // get symbol id of name for func ComValue& lookup_symval(ComValue&); --- 153,159 ---- void funcid(int id) { _funcid = id; } // set symbol id of name for func ! int funcid() const { return _funcid; } // get symbol id of name for func ComValue& lookup_symval(ComValue&); *************** *** 167,172 **** --- 167,175 ---- static int bintest(const char* name); static boolean bincheck(const char* name); + friend ostream& operator << (ostream& s, const ComFunc&); + // print contents to ostream, brief or not depending on + // associated ComTerp brief flag. protected: *************** *** 240,245 **** --- 243,252 ---- // within blocks of conditionally executing control commands. int& command_symid() { return _command_symid; } // symbol id associated with the ComFunc. + + friend ostream& operator << (ostream& s, const ComFuncState&); + // print contents to ostream, brief or not depending on + // associated ComTerp brief flag. protected: Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.2 ComTerp/comterp.c:1.3 *** ComTerp/comterp.c:1.2 Fri Oct 6 16:49:58 2000 --- src/ComTerp/comterp.c Tue Dec 12 16:58:43 2000 *************** *** 30,35 **** --- 30,36 ---- #include <ComTerp/comfunc.h> #include <ComTerp/comhandler.h> #include <ComTerp/comterp.h> + #include <ComTerp/comterpserv.h> #include <ComTerp/comvalue.h> #include <ComTerp/condfunc.h> #include <ComTerp/ctrlfunc.h> *************** *** 128,133 **** --- 129,136 ---- _val_for_next_func = nil; _func_for_next_expr = nil; _trace_mode = 0; + _npause = 0; + _stepflag = 0; } *************** *** 209,218 **** --- 212,227 ---- } void ComTerp::eval_expr_internals(int pedepth) { + static int step_symid = symbol_add("step"); + static ComFunc* stepfunc = nil; + if (!stepfunc) + stepfunc = new ComterpStepFunc(this); + ComValue sv = pop_stack(false); if (sv.type() == ComValue::CommandType) { + ComFunc* func = nil; if (_func_for_next_expr) { func = _func_for_next_expr; *************** *** 244,252 **** } } ! func->execute(); func->pop_funcstate(); if (_just_reset && !_func_for_next_expr) { push_stack(ComValue::blankval()); _just_reset = false; --- 253,275 ---- } } ! if (stepflag()) { ! filebuf fbufout; ! fbufout.attach(handler() ? max(1, handler()->get_handle()) : fileno(stdout)); ! ostream out(&fbufout); ! out << ">>> " << *func << "(" << *func->funcstate() << ")\n"; ! static int pause_symid = symbol_add("pause"); ! ComValue pausekey(pause_symid, 0, ComValue::KeywordType); ! push_stack(pausekey); ! stepfunc->push_funcstate(0,1, pedepth, step_symid); ! stepfunc->execute(); ! stepfunc->pop_funcstate(); ! pop_stack(); ! } + func->execute(); func->pop_funcstate(); + if (_just_reset && !_func_for_next_expr) { push_stack(ComValue::blankval()); _just_reset = false; *************** *** 908,914 **** add_command("run", new RunFunc(this)); add_command("help", new HelpFunc(this)); ! add_command("trace", new TraceFunc(this)); add_command("symid", new SymIdFunc(this)); add_command("symval", new SymValFunc(this)); add_command("symbol", new SymbolFunc(this)); --- 931,939 ---- add_command("run", new RunFunc(this)); add_command("help", new HelpFunc(this)); ! add_command("trace", new ComterpTraceFunc(this)); ! add_command("pause", new ComterpPauseFunc(this)); ! add_command("step", new ComterpStepFunc(this)); add_command("symid", new SymIdFunc(this)); add_command("symval", new SymValFunc(this)); add_command("symbol", new SymbolFunc(this)); Index: ComTerp/comterp.h diff -c ComTerp/comterp.h:1.1 ComTerp/comterp.h:1.2 *** ComTerp/comterp.h:1.1 Wed Aug 30 09:59:30 2000 --- src/ComTerp/comterp.h Tue Dec 12 16:58:43 2000 *************** *** 232,237 **** --- 232,243 ---- int trace_mode() { return _trace_mode; } // return trace mode + int& npause() { return _npause; } + // return (reference to) number of pauses + + int& stepflag() { return _stepflag; } + // return flag that controls stepwise execution + protected: void incr_stack(); void incr_stack(int n); *************** *** 295,300 **** --- 301,312 ---- int _trace_mode; // trace mode + + int _npause; + // depth of pause + + int _stepflag; + // true if single-stepping interpreter friend class ComFunc; friend class ComterpHandler; Index: ComTerp/comterpserv.c diff -c ComTerp/comterpserv.c:1.1 ComTerp/comterpserv.c:1.2 *** ComTerp/comterpserv.c:1.1 Wed Aug 30 09:59:30 2000 --- src/ComTerp/comterpserv.c Tue Dec 12 16:58:43 2000 *************** *** 60,67 **** /* inform the parser which infunc is the oneshot infunc */ _oneshot_infunc = (infuncptr)&s_fgets; - _npause = 0; - _logger_mode = 0; } --- 60,65 ---- Index: ComTerp/comterpserv.h diff -c ComTerp/comterpserv.h:1.1 ComTerp/comterpserv.h:1.2 *** ComTerp/comterpserv.h:1.1 Wed Aug 30 09:59:30 2000 --- src/ComTerp/comterpserv.h Tue Dec 12 16:58:43 2000 *************** *** 69,77 **** virtual boolean is_serv() { return true; } // flag to test if ComTerp or ComTerpServ - int& npause() { return _npause; } - // return (reference to) number of pauses - protected: static char* s_fgets(char* s, int n, void* serv); --- 69,74 ---- *************** *** 95,101 **** int _fd; FILE* _fptr; int _instat; - int _npause; int _logger_mode; friend class ComterpHandler; --- 92,97 ---- Index: ComTerp/debugfunc.c diff -c ComTerp/debugfunc.c:1.1 ComTerp/debugfunc.c:1.2 *** ComTerp/debugfunc.c:1.1 Wed Aug 30 09:59:30 2000 --- src/ComTerp/debugfunc.c Tue Dec 12 16:58:43 2000 *************** *** 21,37 **** * */ #include <ComTerp/debugfunc.h> ! #include <ComTerp/comterp.h> #define TITLE "DebugFunc" /*****************************************************************************/ ! TraceFunc::TraceFunc(ComTerp* comterp) : ComFunc(comterp) { } ! void TraceFunc::execute() { static int get_symid = symbol_add("get"); boolean get_flag = stack_key(get_symid).is_true(); if (get_flag) { --- 21,40 ---- * */ + #include <ComTerp/comhandler.h> #include <ComTerp/debugfunc.h> ! #include <ComTerp/comterpserv.h> ! #include <strstream.h> ! #include <vector.h> #define TITLE "DebugFunc" /*****************************************************************************/ ! ComterpTraceFunc::ComterpTraceFunc(ComTerp* comterp) : ComFunc(comterp) { } ! void ComterpTraceFunc::execute() { static int get_symid = symbol_add("get"); boolean get_flag = stack_key(get_symid).is_true(); if (get_flag) { *************** *** 54,57 **** --- 57,153 ---- } } } + + /*****************************************************************************/ + + ComterpPauseFunc::ComterpPauseFunc(ComTerp* comterp) : ComFunc(comterp) { + } + + void ComterpPauseFunc::execute_body(ComValue& msgstrv) { + + comterp()->npause()++; + + if (msgstrv.is_string()) { + ostrstream sbuf1_s; + sbuf1_s << (stepfunc() ? "step(" : "pause(") << comterp()->npause() << "): " + << msgstrv.string_ptr() << "\n"; + sbuf1_s.put('\0'); + cerr << sbuf1_s.str(); + } + ostrstream sbuf2_s; + sbuf2_s << (stepfunc() ? "step(" : "pause(") << comterp()->npause() << "): enter command or press C/R to continue\n"; + sbuf2_s.put('\0'); + cerr << sbuf2_s.str(); + + comterp()->push_servstate(); + filebuf fbufin; + if (comterp()->handler()) { + int fd = max(0, comterp()->handler()->get_handle()); + fbufin.attach(fd); + } else + fbufin.attach(fileno(stdin)); + istream in(&fbufin); + filebuf fbufout; + if (comterp()->handler()) { + int fd = max(1, comterp()->handler()->get_handle()); + fbufout.attach(fd); + } else + fbufout.attach(fileno(stdout)); + ostream out(&fbufout); + vector<char> cvect; + ComValue retval; + do { + char ch; + cvect.clear(); + /* need to handle embedded newlines differently */ + do { + ch = in.get(); + cvect.push_back(ch); + } while (in.good() && ch != '\n'); + if (cvect[0] != '\n') { + if (comterpserv()) { + retval.assignval(comterpserv()->run(&cvect[0])); + out << retval << "\n"; + } else { + cerr << "execution of commands during step requires comterp in server or remote mode\n"; + } + } + } while (cvect[0] != '\n'); + comterp()->pop_servstate(); + ostrstream sbuf_e; + sbuf_e << (stepfunc() ? "end of step(" : "end of pause(") << comterp()->npause()-- << ")\n"; + sbuf_e.put('\0'); + cerr << sbuf_e.str(); + push_stack(retval); + } + + void ComterpPauseFunc::execute() { + ComValue msgstrv(stack_arg(0)); + reset_stack(); + execute_body(msgstrv); + } + + + /*****************************************************************************/ + + ComterpStepFunc::ComterpStepFunc(ComTerp* comterp) : ComterpPauseFunc(comterp) { + } + + void ComterpStepFunc::execute() { + ComValue msgstrv(stack_arg(0)); + static int pause_symid = symbol_add("pause"); + ComValue pausekey(stack_key(pause_symid)); + reset_stack(); + if (pausekey.is_true()) { + execute_body(msgstrv); + } else { + comterp()->stepflag() = !comterp()->stepflag(); + ComValue retval(comterp()->stepflag()); + push_stack(retval); + } + } + + + + Index: ComTerp/debugfunc.h diff -c ComTerp/debugfunc.h:1.1 ComTerp/debugfunc.h:1.2 *** ComTerp/debugfunc.h:1.1 Wed Aug 30 09:59:30 2000 --- src/ComTerp/debugfunc.h Tue Dec 12 16:58:43 2000 *************** *** 1,5 **** /* ! * Copyright (c) 2000 IET Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided --- 1,5 ---- /* ! * Copyright (c) 2000 Vectaport Inc, IET Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided *************** *** 35,47 **** //: command for toggling or setting trace mode // val=trace([flag] :val) -- toggle or set trace mode ! class TraceFunc : public ComFunc { public: ! TraceFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { return "val=%s([flag] :val) -- toggle or set trace mode"; } }; #endif /* !defined(_debugfunc_h) */ --- 35,71 ---- //: command for toggling or setting trace mode // val=trace([flag] :val) -- toggle or set trace mode ! class ComterpTraceFunc : public ComFunc { public: ! ComterpTraceFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { return "val=%s([flag] :val) -- toggle or set trace mode"; } + }; + + //: command to pause script execution until C/R + // pause -- pause script execution until C/R + class ComterpPauseFunc : public ComFunc { + public: + ComterpPauseFunc(ComTerp*); + virtual void execute(); + virtual void execute_body(ComValue&); + virtual const char* docstring() { + return "%s -- pause script execution until C/R"; } + virtual boolean stepfunc() { return false; } + + }; + + //: command to toggle step script execution + // pause -- toggle stepwise script execution + class ComterpStepFunc : public ComterpPauseFunc { + public: + ComterpStepFunc(ComTerp*); + virtual void execute(); + virtual const char* docstring() { + return "%s -- toggle stepwise script execution"; } + virtual boolean stepfunc() { return true; } }; #endif /* !defined(_debugfunc_h) */ *** /dev/null Tue Dec 12 16:59:07 PST 2000 --- patches/ivtools-001212-johnston-105 *************** patches/ivtools-001212-johnston-105 *** 0 **** --- 1 ---- + ivtools-001212-johnston-105 |