ivtools-0.7.6-0.7.7.diffs Vectaport Inc. May 3rd 1999 This file, when applied with patch, transforms an ivtools source tree with all the changes made to Vectaport's copy between 0.7.6 and 0.7.7. See the diff to the ivtools-0.7/CHANGES file below for details of what's new. To apply this patch, cd to the top directory of the ivtools-0.7 source tree (the directory with "config" and "src" sub-directories), and pipe the file to patch, i.e.: patch -p0 First(it); !al->Done(it); al->Next(it)) + add_attribute(new Attribute(*al->GetAttr(it))); + } + return this; } /*****************************************************************************/ Index: Attribute/attrlist.h diff -c Attribute/attrlist.h:1.2 Attribute/attrlist.h:1.3 *** Attribute/attrlist.h:1.2 Wed Jan 20 16:26:28 1999 --- src/Attribute/attrlist.h Mon May 3 11:30:34 1999 *************** *** 68,73 **** --- 68,74 ---- void add_attr(int symid, AttributeValue* value); // add attribute by using pointer to AttributeValue, assuming responsibility // for the memory. + void add_attribute(Attribute* attr); // add complete Attribute object to the list, accepting responsibility // for the memory of the Attribute object. *************** *** 104,109 **** --- 105,114 ---- // return AList (UList) pointed to by ALIterator (Iterator). Attribute* Attr(AList*); // return attribute pointed to by AList (UList). + + AttributeList* merge(AttributeList*); + // merge the contents of another AttributeList into this one, + // replicating the AttributeValue as needed. protected: void Append(Attribute*); Index: Attribute/commodule.c diff -c Attribute/commodule.c:1.3 Attribute/commodule.c:1.5 *** Attribute/commodule.c:1.3 Fri Apr 16 14:48:53 1999 --- src/Attribute/commodule.c Mon May 3 11:40:43 1999 *************** *** 27,32 **** --- 27,36 ---- #include #define TITLE "ComTerpModule" + #if BUFSIZ>1024 + #undef BUFSIZ + #define BUFSIZ 1024 + #endif /*****************************************************************************/ *************** *** 79,97 **** _errfunc = (errfuncptr)&fferror; _outptr = stdout; _outfunc = (outfuncptr)&fputs; ! _buffer = new char[BUFSIZ]; ! _bufsiz = BUFSIZ; ! _token = new char[BUFSIZ]; ! _toksiz = BUFSIZ; _linenum = 0; } void ComTerpModule::reset() { delete _buffer; delete _token; ! _buffer = new char[BUFSIZ]; ! _bufsiz = BUFSIZ; ! _token = new char[BUFSIZ]; ! _toksiz = BUFSIZ; _linenum = 0; } --- 83,101 ---- _errfunc = (errfuncptr)&fferror; _outptr = stdout; _outfunc = (outfuncptr)&fputs; ! _buffer = new char[BUFSIZ*BUFSIZ]; ! _bufsiz = BUFSIZ*BUFSIZ; ! _token = new char[BUFSIZ*BUFSIZ]; ! _toksiz = BUFSIZ*BUFSIZ; _linenum = 0; } void ComTerpModule::reset() { delete _buffer; delete _token; ! _buffer = new char[BUFSIZ*BUFSIZ]; ! _bufsiz = BUFSIZ*BUFSIZ; ! _token = new char[BUFSIZ*BUFSIZ]; ! _toksiz = BUFSIZ*BUFSIZ; _linenum = 0; } Index: ComTerp/Imakefile diff -c ComTerp/Imakefile:1.2 ComTerp/Imakefile:1.5 *** ComTerp/Imakefile:1.2 Fri Feb 19 16:47:18 1999 --- src/ComTerp/Imakefile Mon May 3 13:09:13 1999 *************** *** 26,31 **** --- 26,32 ---- ObjA(ctrlfunc) Obj(helpfunc) Obj(iofunc) + Obj(listfunc) Obj(mathfunc) Obj(numfunc) Obj(parser) Index: ComTerp/comfunc.c diff -c ComTerp/comfunc.c:1.2 ComTerp/comfunc.c:1.4 *** ComTerp/comfunc.c:1.2 Fri Feb 5 11:14:16 1999 --- src/ComTerp/comfunc.c Mon May 3 11:30:36 1999 *************** *** 1,5 **** /* ! * Copyright (c) 1994-1998 Vectaport 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) 1994-1999 Vectaport Inc. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation for any purpose is hereby granted without fee, provided *************** *** 24,29 **** --- 24,30 ---- #include #include #include + #include #include #define TITLE "ComFunc" *************** *** 305,310 **** --- 306,318 ---- _comterp->pop_funcstate(); } + void ComFunc::exec(int nargs, int nkeys, int pedepth, + int command_symid) { + push_funcstate(nargs, nkeys, pedepth, command_symid); + execute(); + pop_funcstate(); + } + int& ComFunc::nargs() { return _comterp->top_funcstate()->nargs(); } *************** *** 376,381 **** --- 384,413 ---- int& ComFunc::pedepth() { return _comterp->top_funcstate()->pedepth(); + } + + AttributeList* ComFunc::stack_keys(boolean symbol, AttributeValue& dflt) { + AttributeList* al = new AttributeList(); + int count = nargs() + nkeys() - npops(); + for (int i=0; istack_top(-i); + if( keyref.type() == ComValue::KeywordType) { + int key_symid = keyref.symbol_val(); + if (i+1==count || keyref.keynarg_val() == 0) + al->add_attr(key_symid, dflt); + else { + ComValue& valref = _comterp->stack_top(-i-1); + if (valref.type() == ComValue::KeywordType) + al->add_attr(key_symid, dflt); + else { + if (!symbol) + valref = _comterp->lookup_symval(valref); + al->add_attr(key_symid, valref); + } + } + } + } + return al; } /*****************************************************************************/ Index: ComTerp/comfunc.h diff -c ComTerp/comfunc.h:1.4 ComTerp/comfunc.h:1.6 *** ComTerp/comfunc.h:1.4 Fri Feb 5 11:14:16 1999 --- src/ComTerp/comfunc.h Mon May 3 11:30:37 1999 *************** *** 33,38 **** --- 33,39 ---- #include #include + class AttributeList; class ComFuncState; class ComTerp; class ComTerpServ; *************** *** 50,55 **** --- 51,60 ---- // method that needs to be filled in, that will take ComValue arguments // off the stack, then compute and push a ComValue result on the stack. + void exec(int nargs, int nkeys, int pedepth=0, int command_symid=0); + // invokes push_funcstate, then plain execute, then pop_funcstate. + // for use from the body of regular execute methods. + int& nargs(); // number of white space separated arguments inside parentheses // that are not keywords (keywords indicated by a ':' prefix *************** *** 137,142 **** --- 142,153 ---- // the keyword. If 'use_dflt_for_no_key' is true, 'dflt' gets returned // as the value when a keyword is not found. + AttributeList* stack_keys(boolean symbol = false, + AttributeValue& dflt=ComValue::trueval()); + // return newly-constructed AttributeList (which needs referencing) + // that contains a copy of each keyword/value pair in the arguments + // to the invocation of this ComFunc. 'dflt' is used whenever a + // keyword has no matching argument. ComValue& lookup_symval(ComValue&); void assign_symval(int id, ComValue*); Index: ComTerp/comhandler.c diff -c ComTerp/comhandler.c:1.1 ComTerp/comhandler.c:1.4 *** ComTerp/comhandler.c:1.1 Fri Jan 15 09:28:51 1999 --- src/ComTerp/comhandler.c Mon May 3 11:40:46 1999 *************** *** 28,40 **** #include /*****************************************************************************/ // Default constructor. ComterpHandler::ComterpHandler (void) { ! comterp_ = new ComTerpServ(BUFSIZ); comterp_->handler(this); comterp_->add_defaults(); _timeoutscriptid = -1; --- 28,45 ---- #include + #if BUFSIZ>1024 + #undef BUFSIZ + #define BUFSIZ 1024 + #endif + /*****************************************************************************/ // Default constructor. ComterpHandler::ComterpHandler (void) { ! comterp_ = new ComTerpServ(BUFSIZ*BUFSIZ); comterp_->handler(this); comterp_->add_defaults(); _timeoutscriptid = -1; *************** *** 112,125 **** // Perform the logging record receive. static const unit = 15; int ComterpHandler::handle_input (ACE_HANDLE fd) { #if 1 ! const int bufsiz = BUFSIZ; char inbuf[bufsiz]; char outbuf[bufsiz]; inbuf[0] = '\0'; filebuf ibuf(fd); istream istr(&ibuf); istr.getline(inbuf, bufsiz); --- 117,133 ---- // Perform the logging record receive. static const unit = 15; + // #define INPUT_BY_READ + int ComterpHandler::handle_input (ACE_HANDLE fd) { #if 1 ! const int bufsiz = BUFSIZ*BUFSIZ; char inbuf[bufsiz]; char outbuf[bufsiz]; inbuf[0] = '\0'; + #if !defined(INPUT_BY_READ) filebuf ibuf(fd); istream istr(&ibuf); istr.getline(inbuf, bufsiz); *************** *** 132,137 **** --- 140,158 ---- ostr.flush(); return 0; } + #else + int len = 0; + while (lenload_string(inbuf); if (fd) cerr << "command via ACE -- " << inbuf << "\n"; *************** *** 163,169 **** --- 184,194 ---- } #endif #if 1 + #if !defined(INPUT_BY_READ) return (istr.good() ? 0 : -1) && status; + #else + return status; + #endif #else return comterp_->_instat ? 0 : -1; #endif Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.2 ComTerp/comterp.c:1.5 *** ComTerp/comterp.c:1.2 Fri Feb 5 11:14:16 1999 --- src/ComTerp/comterp.c Mon May 3 13:09:13 1999 *************** *** 33,38 **** --- 33,39 ---- #include #include #include + #include #include #include #include *************** *** 681,686 **** --- 682,690 ---- add_command("stream", new StreamFunc(this)); add_command("repeat", new RepeatFunc(this)); add_command("iterate", new IterateFunc(this)); + + add_command("at", new ListAtFunc(this)); + add_command("size", new ListSizeFunc(this)); add_command("sum", new SumFunc(this)); add_command("mean", new MeanFunc(this)); Index: ComTerp/comterpserv.h diff -c ComTerp/comterpserv.h:1.2 ComTerp/comterpserv.h:1.3 *** ComTerp/comterpserv.h:1.2 Wed Jan 20 16:26:31 1999 --- src/ComTerp/comterpserv.h Tue Apr 27 14:22:06 1999 *************** *** 37,43 **** //: extended ComTerp that works with buffered IO. class ComTerpServ : public ComTerp { public: ! ComTerpServ(int bufsize = 1024, int fd = -1); // construct with optional 'bufsize', and on an optional 'fd'. ~ComTerpServ(); --- 37,43 ---- //: extended ComTerp that works with buffered IO. class ComTerpServ : public ComTerp { public: ! ComTerpServ(int bufsize = 1024*1024, int fd = -1); // construct with optional 'bufsize', and on an optional 'fd'. ~ComTerpServ(); Index: ComTerp/ctrlfunc.c diff -c ComTerp/ctrlfunc.c:1.2 ComTerp/ctrlfunc.c:1.3 *** ComTerp/ctrlfunc.c:1.2 Fri Feb 5 11:14:17 1999 --- src/ComTerp/ctrlfunc.c Thu Apr 22 16:29:35 1999 *************** *** 118,123 **** --- 118,125 ---- ComValue hostv(stack_arg(0, true)); ComValue portv(stack_arg(1)); ComValue cmdstrv(stack_arg(2)); + static int nowait_sym = symbol_add("nowait"); + ComValue nowaitv(stack_key(nowait_sym)); reset_stack(); #ifdef HAVE_ACE *************** *** 142,154 **** out << cmdstr; if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n"; out.flush(); ! filebuf ifbuf; ! ifbuf.attach(socket.get_handle()); ! istream in(&ifbuf); ! char* buf; ! in.gets(&buf); ! ComValue& retval = comterpserv()->run(buf, true); ! push_stack(retval); if (socket.close () == -1) ACE_ERROR ((LM_ERROR, "%p\n", "close")); --- 144,158 ---- out << cmdstr; if (cmdstr[strlen(cmdstr)-1] != '\n') out << "\n"; out.flush(); ! if (nowaitv.is_false()) { ! filebuf ifbuf; ! ifbuf.attach(socket.get_handle()); ! istream in(&ifbuf); ! char* buf; ! in.gets(&buf); ! ComValue& retval = comterpserv()->run(buf, true); ! push_stack(retval); ! } if (socket.close () == -1) ACE_ERROR ((LM_ERROR, "%p\n", "close")); Index: ComTerp/ctrlfunc.h diff -c ComTerp/ctrlfunc.h:1.3 ComTerp/ctrlfunc.h:1.5 *** ComTerp/ctrlfunc.h:1.3 Fri Feb 5 11:14:17 1999 --- src/ComTerp/ctrlfunc.h Mon May 3 13:09:13 1999 *************** *** 97,103 **** }; //: remote execution command for ComTerp. ! // remote(hoststr portnum cmdstr) -- remotely evaluate command string then locally // evaluate result string. class RemoteFunc : public ComFunc { public: --- 97,103 ---- }; //: remote execution command for ComTerp. ! // remote(hoststr portnum cmdstr :nowait) -- remotely evaluate command string then locally // evaluate result string. class RemoteFunc : public ComFunc { public: *************** *** 105,111 **** virtual void execute(); virtual const char* docstring() { ! return "%s(hoststr portnum cmdstr) -- remotely evaluate command string then locally evaluate result string"; } }; --- 105,111 ---- virtual void execute(); virtual const char* docstring() { ! return "%s(hoststr portnum cmdstr :nowait) -- remotely evaluate command string then locally evaluate result string"; } }; Index: ComTerp/iofunc.c diff -c ComTerp/iofunc.c:1.2 ComTerp/iofunc.c:1.3 *** ComTerp/iofunc.c:1.2 Fri Mar 5 15:07:03 1999 --- src/ComTerp/iofunc.c Tue Apr 27 16:46:10 1999 *************** *** 96,102 **** break; case ComValue::FloatType: ! out.form(fstr, printval.double_ref()); break; case ComValue::DoubleType: --- 96,102 ---- break; case ComValue::FloatType: ! out.form(fstr, printval.float_ref()); break; case ComValue::DoubleType: Index: ComTerp/listfunc.c diff -c /dev/null ComTerp/listfunc.c:1.1 *** /dev/null Mon May 3 13:13:43 1999 --- src/ComTerp/listfunc.c Mon May 3 11:30:37 1999 *************** *** 0 **** --- 1,79 ---- + /* + * Copyright (c) 1999 Vectaport Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the names of the copyright holders not be used in + * advertising or publicity pertaining to distribution of the software + * without specific, written prior permission. The copyright holders make + * no representations about the suitability of this software for any purpose. + * It is provided "as is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + + #include + #include + #include + #include + #include + #include + + #define TITLE "ListFunc" + + /*****************************************************************************/ + + ListAtFunc::ListAtFunc(ComTerp* comterp) : ComFunc(comterp) { + } + + void ListAtFunc::execute() { + ComValue listv(stack_arg(0)); + ComValue nv(stack_arg(1)); + reset_stack(); + + if (listv.is_type(ComValue::ArrayType) && nv.int_val()>=0) { + AttributeValueList* avl = listv.array_val(); + if (avl && nv.int_val()Number()) { + int count = 0; + Iterator it; + for (avl->First(it); !avl->Done(it); avl->Next(it)) { + if (count==nv.int_val()) { + push_stack(*avl->GetAttrVal(it)); + return; + } + count++; + } + } + } + push_stack(ComValue::nullval()); + } + + /*****************************************************************************/ + + ListSizeFunc::ListSizeFunc(ComTerp* comterp) : ComFunc(comterp) { + } + + void ListSizeFunc::execute() { + ComValue listv(stack_arg(0)); + reset_stack(); + + if (listv.is_type(ComValue::ArrayType)) { + AttributeValueList* avl = listv.array_val(); + if (avl) { + ComValue retval(avl->Number()); + push_stack(retval); + return; + } + } + push_stack(ComValue::nullval()); + } + Index: ComTerp/listfunc.h diff -c /dev/null ComTerp/listfunc.h:1.1 *** /dev/null Mon May 3 13:13:43 1999 --- src/ComTerp/listfunc.h Mon May 3 11:30:37 1999 *************** *** 0 **** --- 1,58 ---- + /* + * Copyright (c) 1999 Vectaport Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the names of the copyright holders not be used in + * advertising or publicity pertaining to distribution of the software + * without specific, written prior permission. The copyright holders make + * no representations about the suitability of this software for any purpose. + * It is provided "as is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + + /* + * collection of list manipulation functions + */ + + #if !defined(_listfunc_h) + #define _listfunc_h + + #include + + class ComTerp; + class ComValue; + + //: list member command for ComTerp. + // val=at(list n) -- return the nth item in a list. + class ListAtFunc : public ComFunc { + public: + ListAtFunc(ComTerp*); + + virtual void execute(); + virtual const char* docstring() { + return "val=at(list n) -- return the nth item in a list"; } + }; + + //: list size command for ComTerp. + // num=size(list) -- return size of a list. + class ListSizeFunc : public ComFunc { + public: + ListSizeFunc(ComTerp*); + + virtual void execute(); + virtual const char* docstring() { + return "val=at(list n) -- return the nth item in a list"; } + }; + + #endif /* !defined(_listfunc_h) */ Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.2 ComUnidraw/comeditor.c:1.4 *** ComUnidraw/comeditor.c:1.2 Thu Mar 4 15:53:38 1999 --- src/ComUnidraw/comeditor.c Mon May 3 11:31:13 1999 *************** *** 101,107 **** } void ComEditor::AddCommands(ComTerp* comterp) { ! comterp->add_defaults(); comterp->add_command("rect", new CreateRectFunc(comterp, this)); comterp->add_command("line", new CreateLineFunc(comterp, this)); --- 101,107 ---- } void ComEditor::AddCommands(ComTerp* comterp) { ! ((ComTerpServ*)comterp)->add_defaults(); comterp->add_command("rect", new CreateRectFunc(comterp, this)); comterp->add_command("line", new CreateLineFunc(comterp, this)); *************** *** 121,126 **** --- 121,128 ---- comterp->add_command("nbrushes", new NBrushesFunc(comterp, this)); comterp->add_command("npatterns", new NPatternsFunc(comterp, this)); comterp->add_command("ncolors", new NColorsFunc(comterp, this)); + + comterp->add_command("setattr", new SetAttrFunc(comterp, this)); comterp->add_command("select", new SelectFunc(comterp, this)); comterp->add_command("move", new MoveFunc(comterp, this)); Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.4 ComUnidraw/unifunc.c:1.5 *** ComUnidraw/unifunc.c:1.4 Tue Mar 30 16:51:57 1999 --- src/ComUnidraw/unifunc.c Mon May 3 11:31:13 1999 *************** *** 177,183 **** ComponentView* view = (ComponentView*)viewval.obj_val(); OverlayComp* comp = (OverlayComp*)view->GetSubject(); - /* should be done with an attribute setting command */ AttributeList* al = comp->GetAttributeList(); al->add_attr("readonly", ComValue::trueval()); --- 177,182 ---- *************** *** 234,238 **** --- 233,260 ---- inlist->Next(it); } } + } + + /*****************************************************************************/ + + SetAttrFunc::SetAttrFunc(ComTerp* comterp, Editor* ed) : UnidrawFunc(comterp, ed) { + } + + void SetAttrFunc::execute() { + ComValue viewval(stack_arg(0)); + AttributeList* al = stack_keys(); + reset_stack(); + + ComponentView* view = (ComponentView*)viewval.obj_val(); + OverlayComp* comp = (OverlayComp*)view->GetSubject(); + + AttributeList* comp_al = comp->attrlist(); + if (!comp_al) + comp->SetAttributeList(al); + else { + comp_al->merge(al); + delete al; + } + push_stack(viewval); } Index: ComUnidraw/unifunc.h diff -c ComUnidraw/unifunc.h:1.4 ComUnidraw/unifunc.h:1.5 *** ComUnidraw/unifunc.h:1.4 Fri Mar 5 15:07:38 1999 --- src/ComUnidraw/unifunc.h Mon May 3 11:31:13 1999 *************** *** 83,95 **** }; //: command to make a graphic read-only in comdraw. ! // readonly(compview :clear) -- set or clear the readonly attribute of a graphic component class ReadOnlyFunc : public UnidrawFunc { public: ReadOnlyFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "%s(compview :clear) -- set or clear the readonly attribute of a graphic component"; } }; --- 83,95 ---- }; //: command to make a graphic read-only in comdraw. ! // compview=readonly(compview :clear) -- set or clear the readonly attribute of a graphic component class ReadOnlyFunc : public UnidrawFunc { public: ReadOnlyFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "compview=%s(compview :clear) -- set or clear the readonly attribute of a graphic component"; } }; *************** *** 103,108 **** --- 103,119 ---- virtual void execute(); virtual const char* docstring() { return "%s(pathname) -- import graphic file from pathname or URL"; } + + }; + + //: command to set attributes on a graphic + // compview=setattr(compview [:keyword value [:keyword value [...]]]) -- set attributes of a graphic component. + class SetAttrFunc : public UnidrawFunc { + public: + SetAttrFunc(ComTerp*,Editor*); + virtual void execute(); + virtual const char* docstring() { + return "compview=%s(compview [:keyword value [:keyword value [...]]]) -- set attributes of a graphic component"; } }; Index: Unidraw/ellipses.c diff -c Unidraw/ellipses.c:1.1 Unidraw/ellipses.c:1.2 *** Unidraw/ellipses.c:1.1 Fri Jan 15 09:30:55 1999 --- src/Unidraw/ellipses.c Tue Apr 27 14:22:37 1999 *************** *** 142,147 **** --- 142,154 ---- return false; } + MultiLineObj* Ellipse::ellipse_to_polygon(Transformer* t) { + MultiLineObj* ml = new MultiLineObj; + CalcControlPts(t); + ml->ClosedSplineToPolygon(_x, _y, 8); + return ml; + } + static const float axis = 0.42; static const float seen = 1.025; *************** *** 183,188 **** --- 190,197 ---- } } } + + /*****************************************************************************/ Index: comdraw/README diff -c comdraw/README:1.3 comdraw/README:1.4 *** comdraw/README:1.3 Thu Mar 4 15:53:41 1999 --- src/comdraw/README Mon May 3 11:31:15 1999 *************** *** 53,58 **** --- 53,62 ---- scale(xflt yflt) -- scale current selection rotate(degflt) -- rotate current selection + ATTRIBUTE COMMANDS + + compview=setattr(compview [:keyword value [:keyword value [...]]]) -- set attributes of a graphic component + VIEWER COMMANDS update() -- update viewer Index: comterp/README diff -c comterp/README:1.3 comterp/README:1.5 *** comterp/README:1.3 Fri Feb 5 11:14:20 1999 --- src/comterp/README Mon May 3 13:09:16 1999 *************** *** 151,156 **** --- 151,162 ---- srand(seedval) -- seed random number generator + LIST COMMANDS: + + val=at(list n) -- return nth item in a list + + num=size(list) -- return size of a list + CONTROL COMMANDS (using post evaluation): val=cond(testexpr trueexpr falseexpr) -- evaluate testexpr, and if true, *************** *** 186,192 **** val=run(filename) -- run commands from file ! val=remote(hoststr portnum cmdstr) -- remotely evaluate command string then locally evaluate result string val=shell(cmdstr) -- evaluate command in shell --- 192,198 ---- val=run(filename) -- run commands from file ! val=remote(hoststr portnum cmdstr :nowait) -- remotely evaluate command string then locally evaluate result string val=shell(cmdstr) -- evaluate command in shell Index: comterp/main.c diff -c comterp/main.c:1.3 comterp/main.c:1.6 *** comterp/main.c:1.3 Fri Feb 19 16:47:34 1999 --- src/comterp/main.c Mon May 3 11:40:48 1999 *************** *** 39,44 **** --- 39,49 ---- #include + #if BUFSIZ>1024 + #undef BUFSIZ + #define BUFSIZ 1024 + #endif + int main(int argc, char *argv[]) { boolean server_flag = argc>1 && strcmp(argv[1], "server") == 0; *************** *** 100,106 **** ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); FILE* fptr = fdopen(server.get_handle(), "r+"); ! char buffer[BUFSIZ]; FILE* inptr = argc>=5 ? fopen(argv[4], "r") : stdin; --- 105,111 ---- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); FILE* fptr = fdopen(server.get_handle(), "r+"); ! char buffer[BUFSIZ*BUFSIZ]; FILE* inptr = argc>=5 ? fopen(argv[4], "r") : stdin; *************** *** 115,121 **** istream in(&ibuf); for (;;) { ! fgets(buffer, BUFSIZ, inptr); if (feof(inptr)) break; out << buffer; out.flush(); --- 120,126 ---- istream in(&ibuf); for (;;) { ! fgets(buffer, BUFSIZ*BUFSIZ, inptr); if (feof(inptr)) break; out << buffer; out.flush(); *************** *** 148,156 **** out << ch; } #else ! char buffer[BUFSIZ]; while(!in.eof() && in.good()) { ! in.read(buffer, BUFSIZ); if (!in.eof() || in.gcount()) out.write(buffer, in.gcount()); } --- 153,161 ---- out << ch; } #else ! char buffer[BUFSIZ*BUFSIZ]; while(!in.eof() && in.good()) { ! in.read(buffer, BUFSIZ*BUFSIZ); if (!in.eof() || in.gcount()) out.write(buffer, in.gcount()); } *************** *** 159,170 **** #if 0 for (;;) { ! fgets(buffer, BUFSIZ, inptr); if (feof(inptr)) break; fputs(buffer, fptr); fflush(fptr); #if 0 ! fgets(buffer, BUFSIZ, fptr); fputs(buffer, stdout); #else char ch; --- 164,175 ---- #if 0 for (;;) { ! fgets(buffer, BUFSIZ*BUFSIZ, inptr); if (feof(inptr)) break; fputs(buffer, fptr); fflush(fptr); #if 0 ! fgets(buffer, BUFSIZ*BUFSIZ, fptr); fputs(buffer, stdout); #else char ch; *************** *** 174,187 **** if (ch != ' ') { ungetc(ch, fptr); ungetc('>', fptr); ! fgets(buffer, BUFSIZ, fptr); fputs(buffer, stdout); } else { printf( "> " ); } } else { ungetc(ch, fptr); ! fgets(buffer, BUFSIZ, fptr); fputs(buffer, stdout); } #endif --- 179,192 ---- if (ch != ' ') { ungetc(ch, fptr); ungetc('>', fptr); ! fgets(buffer, BUFSIZ*BUFSIZ, fptr); fputs(buffer, stdout); } else { printf( "> " ); } } else { ungetc(ch, fptr); ! fgets(buffer, BUFSIZ*BUFSIZ, fptr); fputs(buffer, stdout); } #endif *************** *** 201,207 **** #endif if (server_flag || remote_flag) { ! ComTerpServ* terp = new ComTerpServ(); terp->add_defaults(); struct stat buf; int status = fstat(fileno(stdin), &buf); --- 206,212 ---- #endif if (server_flag || remote_flag) { ! ComTerpServ* terp = new ComTerpServ(BUFSIZ*BUFSIZ); terp->add_defaults(); struct stat buf; int status = fstat(fileno(stdin), &buf); Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.9 config_ivtools/params.def:1.10 *** config_ivtools/params.def:1.9 Fri Apr 16 14:19:02 1999 --- config/params.def Mon May 3 13:10:13 1999 *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 0.7.6 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 0.7.7 #endif VERSION = Version Index: config_ivtools/site.def.LINUX diff -c config_ivtools/site.def.LINUX:1.4 config_ivtools/site.def.LINUX:1.5 *** config_ivtools/site.def.LINUX:1.4 Wed Mar 24 15:29:40 1999 --- config/site.def.LINUX Mon May 3 11:41:40 1999 *************** *** 52,59 **** MakeDir(dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) dest @@\ -@$(RM) dest/Concat(lib,libname.so) @@\ ! -@$(LN) dest/Concat(lib,libname.so.rev) \ @@\ ! dest/Concat(lib,libname.so) @@\ @@\ uninstall:: @@\ $(RM) dest/Concat(lib,libname.so.rev) @@\ --- 52,59 ---- MakeDir(dest) @@\ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) dest @@\ -@$(RM) dest/Concat(lib,libname.so) @@\ ! -@(cd dest;$(LN) Concat(lib,libname.so.rev) \ @@\ ! Concat(lib,libname.so)) @@\ @@\ uninstall:: @@\ $(RM) dest/Concat(lib,libname.so.rev) @@\ Index: include_commands/Imakefile diff -c include_commands/Imakefile:1.2 include_commands/Imakefile:1.3 *** include_commands/Imakefile:1.2 Wed Feb 10 15:15:39 1999 --- src/include/Unidraw/Commands/Imakefile Thu Apr 22 16:30:34 1999 *************** *** 6,9 **** IvmkcmTargets($(PACKAGE)) ! InstallIncludes(Unidraw/Commands) \ No newline at end of file --- 6,9 ---- IvmkcmTargets($(PACKAGE)) ! InstallIncludes(Unidraw/Commands) Index: include_graphic/ellipses.h diff -c include_graphic/ellipses.h:1.1 include_graphic/ellipses.h:1.2 *** include_graphic/ellipses.h:1.1 Fri Jan 15 09:34:56 1999 --- src/include/Unidraw/Graphic/ellipses.h Tue Apr 27 14:22:58 1999 *************** *** 31,42 **** #include class Ellipse : public Graphic { public: void GetOriginal(Coord&, Coord&, int&, int&); void SetOriginal(Coord, Coord, int, int); - protected: Ellipse(Coord x0, Coord y0, int r1, int r2, Graphic* gr = nil); void s_getExtent(float&, float&, float&, float&, float&, Graphic*); void f_getExtent(float&, float&, float&, float&, float&, Graphic*); --- 31,45 ---- #include + class MultiLineObj; + class Ellipse : public Graphic { public: void GetOriginal(Coord&, Coord&, int&, int&); void SetOriginal(Coord, Coord, int, int); Ellipse(Coord x0, Coord y0, int r1, int r2, Graphic* gr = nil); + MultiLineObj* ellipse_to_polygon(Transformer* t = nil); + protected: void s_getExtent(float&, float&, float&, float&, float&, Graphic*); void f_getExtent(float&, float&, float&, float&, float&, Graphic*); *************** *** 45,50 **** --- 48,54 ---- boolean f_contains(PointObj&, Graphic*); boolean s_intersects(BoxObj&, Graphic*); boolean f_intersects(BoxObj&, Graphic*); + protected: Coord _x0, _y0; int _r1, _r2; 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 Fri Mar 19 15:16:13 1999 --- src/include/std/version.h Mon May 3 13:10:04 1999 *************** *** 1,2 **** ! #define VersionString "0.7.5" #define ReleaseString "ivtools-0.7" --- 1,2 ---- ! #define VersionString "0.7.7" #define ReleaseString "ivtools-0.7" 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 Fri Mar 5 15:07:52 1999 --- src/man/man1/comdraw.1 Mon May 3 11:31:33 1999 *************** *** 59,64 **** --- 59,68 ---- scale(xflt yflt) -- scale current selection rotate(degflt) -- rotate current selection + .SH ATTRIBUTE COMMANDS + + compview=setattr(compview [:keyword value [:keyword value [...]]]) -- set attributes of a graphic component + .SH VIEWER COMMANDS update() -- update viewer Index: man1_ivtools/comterp.1 diff -c man1_ivtools/comterp.1:1.2 man1_ivtools/comterp.1:1.4 *** man1_ivtools/comterp.1:1.2 Fri Feb 5 11:14:52 1999 --- src/man/man1/comterp.1 Mon May 3 13:10:08 1999 *************** *** 161,166 **** --- 161,172 ---- srand(seedval) -- seed random number generator + .SH LIST COMMANDS: + + val=at(list n) -- return nth item in a list + + num=size(list) -- return size of a list + .SH CONTROL COMMANDS (using post evaluation): val=cond(testexpr trueexpr falseexpr) -- evaluate testexpr, and if true, evaluate and return trueexpr, otherwise evaluate and return falseexpr *************** *** 192,198 **** val=run(filename) -- run commands from file ! val=remote(hoststr portnum cmdstr) -- remotely evaluate command string then locally evaluate result string val=shell(cmdstr) -- evaluate command in shell --- 198,204 ---- val=run(filename) -- run commands from file ! val=remote(hoststr portnum cmdstr :nowait) -- remotely evaluate command string then locally evaluate result string val=shell(cmdstr) -- evaluate command in shell Index: src_dispatch/dispatcher.c diff -c src_dispatch/dispatcher.c:1.1 src_dispatch/dispatcher.c:1.2 *** src_dispatch/dispatcher.c:1.1 Fri Jan 15 09:29:51 1999 --- src/Dispatch/dispatcher.c Thu Apr 22 16:29:51 1999 *************** *** 384,390 **** _ready = false; } ! #if defined(svr4) && defined(sun) && NOFILE==20 #undef NOFILE #define NOFILE 256 #endif --- 384,390 ---- _ready = false; } ! #if defined(__svr4__) && defined(sun) && NOFILE==20 #undef NOFILE #define NOFILE 256 #endif Index: src_ivtools/Imakefile diff -c src_ivtools/Imakefile:1.3 src_ivtools/Imakefile:1.4 *** src_ivtools/Imakefile:1.3 Thu Feb 25 15:44:07 1999 --- src/Imakefile Tue Apr 27 14:22:01 1999 *************** *** 28,33 **** --- 28,34 ---- \ ComUtil \ Attribute \ + TopoFace \ ComTerp \ comtest \ comterp \ *************** *** 55,61 **** UniIdraw \ idraw \ \ - TopoFace \ $(ACEDISPATCH) \ OverlayUnidraw \ drawtool \ --- 56,61 ---- Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.13 top_ivtools/INSTALL:1.15 *** top_ivtools/INSTALL:1.13 Fri Apr 16 14:15:59 1999 --- ./INSTALL Mon May 3 13:09:08 1999 *************** *** 1,7 **** INSTALL for ivtools-0.7 ! Instructions for building ivtools-0.7.6 from source: 0. Compilation Environment --- 1,7 ---- INSTALL for ivtools-0.7 ! Instructions for building ivtools-0.7.7 from source: 0. Compilation Environment *************** *** 74,80 **** building this sizeable collection of public-domain and free software class libraries for image understanding application development. ! 1. Configuring ivtools 1.a. You no longer need to set your CPU environment variable to build ivtools, but you still need a CPU specific configuration file. LINUX, --- 74,80 ---- building this sizeable collection of public-domain and free software class libraries for image understanding application development. ! 1. Configuring ivtools: 1.a. You no longer need to set your CPU environment variable to build ivtools, but you still need a CPU specific configuration file. LINUX, Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.18 top_ivtools/MANIFEST:1.20 *** top_ivtools/MANIFEST:1.18 Wed Apr 7 14:33:53 1999 --- ./MANIFEST Thu Apr 22 16:29:25 1999 *************** *** 8,13 **** --- 8,14 ---- ivtools-0.7/INSTALL.old ivtools-0.7/Imakefile ivtools-0.7/MANIFEST + ivtools-0.7/MANIFEST.comterp ivtools-0.7/MANIFEST.perceps ivtools-0.7/Makefile ivtools-0.7/README *************** *** 147,152 **** --- 148,155 ---- ivtools-0.7/src/ComTerp/iofunc.c ivtools-0.7/src/ComTerp/iofunc.h ivtools-0.7/src/ComTerp/lexscan.h + ivtools-0.7/src/ComTerp/listfunc.c + ivtools-0.7/src/ComTerp/listfunc.h ivtools-0.7/src/ComTerp/mathfunc.c ivtools-0.7/src/ComTerp/mathfunc.h ivtools-0.7/src/ComTerp/numfunc.c *************** *** 755,760 **** --- 758,764 ---- ivtools-0.7/src/UniIdraw/idversion.h ivtools-0.7/src/Unidraw-common/Imakefile ivtools-0.7/src/Unidraw-common/Makefile + ivtools-0.7/src/Unidraw-common/fgeomobjs.c ivtools-0.7/src/Unidraw-common/iterator.c ivtools-0.7/src/Unidraw-common/ulist.c ivtools-0.7/src/Unidraw/Imakefile Index: top_ivtools/MANIFEST.perceps diff -c top_ivtools/MANIFEST.perceps:1.5 top_ivtools/MANIFEST.perceps:1.6 *** top_ivtools/MANIFEST.perceps:1.5 Wed Apr 7 14:33:53 1999 --- ./MANIFEST.perceps Thu Apr 22 10:18:36 1999 *************** *** 29,34 **** --- 29,35 ---- ComTerp/helpfunc.h ComTerp/iofunc.h ComTerp/lexscan.h + ComTerp/listfunc.h ComTerp/mathfunc.h ComTerp/numfunc.h ComTerp/parser.h Index: top_ivtools/README diff -c top_ivtools/README:1.9 top_ivtools/README:1.10 *** top_ivtools/README:1.9 Fri Apr 16 14:16:00 1999 --- ./README Mon May 3 13:09:08 1999 *************** *** 2,8 **** README for ivtools 0.7 ! This directory contains a release of ivtools 0.7.6 from Vectaport Inc.. 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. It is known to build with many versions of gcc (<= gcc-2.7.2, >= --- 2,8 ---- README for ivtools 0.7 ! This directory contains a release of ivtools 0.7.7 from Vectaport Inc.. 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. It is known to build with many versions of gcc (<= gcc-2.7.2, >= Index: top_ivtools/VERSION diff -c top_ivtools/VERSION:1.5 top_ivtools/VERSION:1.6 *** top_ivtools/VERSION:1.5 Fri Apr 16 14:16:00 1999 --- ./VERSION Mon May 3 13:09:08 1999 *************** *** 1 **** ! Release 0.7.6 --- 1 ---- ! Release 0.7.7