patches for ivtools-1.2.9
ivtools patch distribution <[email protected]> Tue, 23 Feb 2010 11:07:27 -0800
| Newsgroups | gmane.comp.lib.ivtools.patches |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-1-882039120 Content-Disposition: attachment; filename=ivtools-100223-johnston-036 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-100223-johnston-036" Content-Transfer-Encoding: 7bit Patch: ivtools-100223-johnston-036 For: ivtools-1.2 Author: [email protected] Subject: added TOK_EOL Requires: This is an intermediate patch to ivtools-1.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: Index: Attribute/attrlist.c diff -c Attribute/attrlist.c:1.9 Attribute/attrlist.c:1.10 *** Attribute/attrlist.c:1.9 Wed Aug 26 09:21:32 2009 --- src/Attribute/attrlist.c Tue Feb 23 11:03:59 2010 *************** *** 312,317 **** --- 312,318 ---- #endif _alist = new AList; _count = 0; + _max_out = -1; if (s != nil) { ALIterator i; *************** *** 403,410 **** ostream& operator<< (ostream& out, const AttributeValueList& al) { AttributeValueList* attrlist = (AttributeValueList*)&al; ALIterator i; ! for (attrlist->First(i); !attrlist->Done(i);) { AttributeValue* attrval = attrlist->GetAttrVal(i); char* string; --- 404,413 ---- ostream& operator<< (ostream& out, const AttributeValueList& al) { AttributeValueList* attrlist = (AttributeValueList*)&al; + int maxout = attrlist->max_out(); ALIterator i; ! for (attrlist->First(i); !attrlist->Done(i) && maxout!=0;) { ! maxout--; AttributeValue* attrval = attrlist->GetAttrVal(i); char* string; *************** *** 457,462 **** --- 460,466 ---- if (!attrlist->Done(i)) out << ","; } + if(maxout==0) out << "..."; return out; } Index: Attribute/attrlist.h diff -c Attribute/attrlist.h:1.3 Attribute/attrlist.h:1.4 *** Attribute/attrlist.h:1.3 Wed Aug 26 09:21:32 2009 --- src/Attribute/attrlist.h Tue Feb 23 11:03:59 2010 *************** *** 148,154 **** AttributeValue* find(int symid); // find AttributeValue by symbol id. - protected: int add_attr(Attribute* attr); // add attribute, returning 0 if new, -1 if it already existed. --- 148,153 ---- *************** *** 242,251 **** --- 241,256 ---- boolean nested_insert() { return _nested_insert; } // get flag to insert in a nested fashion + int max_out() { return _max_out; } + // get maximum to print + void max_out(int num) { _max_out = num; } + // set maximum to print + protected: AList* _alist; unsigned int _count; boolean _nested_insert; + int _max_out; #ifdef LEAKCHECK public: Index: Attribute/attrvalue.c diff -c Attribute/attrvalue.c:1.8 Attribute/attrvalue.c:1.9 *** Attribute/attrvalue.c:1.8 Fri Feb 19 07:31:27 2010 --- src/Attribute/attrvalue.c Tue Feb 23 11:03:59 2010 *************** *** 1283,1285 **** --- 1283,1309 ---- if(flag) Resource::ref((ComponentView*)_v.objval.ptr); } #endif + + + AttributeValue::AttributeValue(postfix_token* token) { + clear(); + void* v1 = &_v; + void* v2 = &token->v; + memcpy(v1, v2, sizeof(_v)); + switch (token->type) { + case TOK_STRING: type(StringType); break; + case TOK_CHAR: type(CharType); break; + case TOK_DFINT: type(IntType); break; + case TOK_DFUNS: type(UIntType); break; + case TOK_LNINT: type(LongType); break; + case TOK_LNUNS: type(ULongType); break; + case TOK_FLOAT: type(FloatType); break; + case TOK_DOUBLE: type(DoubleType); break; + case TOK_EOF: type(EofType); break; + case TOK_COMMAND: type(SymbolType); _v.symval.globalflag=0; break; + case TOK_KEYWORD: type(KeywordType); break; + case TOK_BLANK: type(BlankType); break; + default: type(UnknownType); break; + } + } + Index: Attribute/attrvalue.h diff -c Attribute/attrvalue.h:1.3 Attribute/attrvalue.h:1.4 *** Attribute/attrvalue.h:1.3 Wed Aug 26 09:21:32 2009 --- src/Attribute/attrvalue.h Tue Feb 23 11:03:59 2010 *************** *** 37,42 **** --- 37,43 ---- #include <OS/enter-scope.h> #include <Attribute/classid.h> #include <Unidraw/Components/compview.h> + #include <ComUtil/comterp.h> extern "C" { int symbol_add(char*); *************** *** 131,136 **** --- 132,139 ---- // deep copy constructor. AttributeValue(); // default constructor (UnknownType constructor). + AttributeValue(postfix_token* token); + // copy constructor from a postfix token generated by a scanner or parser. AttributeValue(char val); // CharType constructor. Index: Attribute/lexscan.c diff -c Attribute/lexscan.c:1.1 Attribute/lexscan.c:1.2 *** Attribute/lexscan.c:1.1 Wed Aug 29 10:37:46 2007 --- src/Attribute/lexscan.c Tue Feb 23 11:03:59 2010 *************** *** 77,82 **** --- 77,83 ---- case TOK_FLOAT: retval.floatval = *(float*)_token; break; case TOK_DOUBLE: retval.doublval = *(double*)_token; break; case TOK_OPERATOR: retval.symval.symid = symbol_add(_token); break; + case TOK_EOL: break; case TOK_EOF: break; default: break; } *************** *** 120,122 **** --- 121,142 ---- return new AttributeValue(valtype, tokval); } + + + const int LexScan::get_next_value(AttributeValue* attrval, char delim) + { + attr_value token; + unsigned int toktype; + do { + token = get_next_token(toktype); + } while(toktype == TOK_OPERATOR && *symbol_pntr(token.symval.symid)==delim); + if (toktype==TOK_EOF) + return 0; + else if (toktype==TOK_EOL) + return 2; + else { + AttributeValue tokval((AttributeValue::ValueType)toktype, token); + *attrval = tokval; + return 1; + } + } Index: Attribute/lexscan.h diff -c Attribute/lexscan.h:1.1 Attribute/lexscan.h:1.2 *** Attribute/lexscan.h:1.1 Wed Aug 29 10:37:46 2007 --- src/Attribute/lexscan.h Tue Feb 23 11:03:59 2010 *************** *** 27,32 **** --- 27,34 ---- #include <Attribute/attrvalue.h> #include <Attribute/commodule.h> + class AttributeValue; + //: Lexical scanner for C tokens, with C-style comment skipping. class LexScan : public ComTerpModule { public: *************** *** 50,55 **** --- 52,59 ---- AttributeValue* get_attr(char* buf, unsigned int bufsiz); // return token in newly allocated AttributeValue. + const int get_next_value(AttributeValue* attrval, char delim='\0'); + // return AttributeValue that represents next token, skipping over delim and whitespace protected: char* _begcmt; char* _endcmt; Index: ComTerp/scanner.c diff -c ComTerp/scanner.c:1.1 ComTerp/scanner.c:1.2 *** ComTerp/scanner.c:1.1 Wed Aug 29 10:37:49 2007 --- src/ComTerp/scanner.c Tue Feb 23 11:04:00 2010 *************** *** 24,29 **** --- 24,33 ---- #include <ComTerp/_comterp.h> #include <ComTerp/scanner.h> #include <ComTerp/_comutil.h> + #if 0 // moved to lexscan.c + #include <Attribute/attrvalue.h> + #include <ComUtil/comterp.h> + #endif #include <string.h> *************** *** 69,71 **** --- 73,96 ---- } + #if 0 // moved to lexscan.c + const int Scanner::get_next_value(AttributeValue* attrval, char delim) + { + + const void* token; + postfix_token pftok; + unsigned int toktype; + do { + token = get_next_token(toktype); + pftok.type = toktype; + memcpy(&pftok.v, token, sizeof(pftok.v)); + } while(toktype == TOK_OPERATOR && *(char*)token==delim); + if (toktype==TOK_EOF) + return 0; + else { + AttributeValue tokval(&pftok); + *attrval = tokval; + return 1; + } + } + #endif Index: ComUtil/_lexscan.c diff -c ComUtil/_lexscan.c:1.1 ComUtil/_lexscan.c:1.2 *** ComUtil/_lexscan.c:1.1 Wed Aug 29 10:37:45 2007 --- src/ComUtil/_lexscan.c Tue Feb 23 11:03:58 2010 *************** *** 46,51 **** --- 46,52 ---- unsigned _token_state_save = TOK_WHITESPACE; /* variable to save token state between calls */ int _ignore_numerics = 0; + int _token_eol = 0; /* MACROS */ *************** *** 337,342 **** --- 338,351 ---- case TOK_WHITESPACE: + /* Check for new-line token if desired */ + if(_token_eol && CURR_CHAR=='\n') { + token_state = TOK_EOL; + TOKEN_ADD('\n'); + ADVANCE_CHAR; + goto token_return; + } + /* This could be the start of something */ *tokstart = *bufptr; *************** *** 352,357 **** --- 361,372 ---- ADVANCE_CHAR; } + /* Start of comment until-end-of-line */ + else if( !no_comment && linecmt && *(buffer+*bufptr)==linecmt) { + while(*(buffer+*bufptr)!= '\n') + ADVANCE_CHAR; + } + /* empty input buffer */ else if ( CURR_CHAR == '\0') { *linenum--; Index: ComUtil/comterp.h diff -c ComUtil/comterp.h:1.3 ComUtil/comterp.h:1.4 *** ComUtil/comterp.h:1.3 Fri Feb 27 07:00:03 2009 --- src/ComUtil/comterp.h Tue Feb 23 11:03:58 2010 *************** *** 37,58 **** #define IOPNTR(comtype) ((comtype *)argv[0]) /* Token types returned from SCANNER.C */ ! #define TOK_LPAREN 16 /* Left parenthesis */ ! #define TOK_RPAREN 17 /* Right parenthesis */ ! #define TOK_LBRACKET 18 /* Left bracket */ ! #define TOK_RBRACKET 19 /* Right bracket */ ! #define TOK_LBRACE 20 /* Left brace */ ! #define TOK_RBRACE 21 /* Right brace */ ! #define TOK_LANGBRACK 22 /* left angle bracket (less than) */ ! #define TOK_RANGBRACK 23 /* right angle bracket (greater than) */ ! #define TOK_LANGBRACK2 24 /* left angle bracket (less than) */ ! #define TOK_RANGBRACK2 25 /* right angle bracket (greater than) */ ! #define TOK_KEYWORD 26 /* Keyword for free format parameters */ /* Token types returned from OPTABLE.C */ ! #define TOK_COMMAND 27 /* Command name */ ! #define TOK_BLANK 28 /* generated by empty parens: () */ /* OPTABLE.C Constants */ --- 37,58 ---- #define IOPNTR(comtype) ((comtype *)argv[0]) /* Token types returned from SCANNER.C */ ! #define TOK_LPAREN 17 /* Left parenthesis */ ! #define TOK_RPAREN 18 /* Right parenthesis */ ! #define TOK_LBRACKET 19 /* Left bracket */ ! #define TOK_RBRACKET 20 /* Right bracket */ ! #define TOK_LBRACE 21 /* Left brace */ ! #define TOK_RBRACE 22 /* Right brace */ ! #define TOK_LANGBRACK 23 /* left angle bracket (less than) */ ! #define TOK_RANGBRACK 24 /* right angle bracket (greater than) */ ! #define TOK_LANGBRACK2 25 /* left angle bracket (less than) */ ! #define TOK_RANGBRACK2 26 /* right angle bracket (greater than) */ ! #define TOK_KEYWORD 27 /* Keyword for free format parameters */ /* Token types returned from OPTABLE.C */ ! #define TOK_COMMAND 28 /* Command name */ ! #define TOK_BLANK 29 /* generated by empty parens: () */ /* OPTABLE.C Constants */ Index: ComUtil/comutil.h diff -c ComUtil/comutil.h:1.1 ComUtil/comutil.h:1.2 *** ComUtil/comutil.h:1.1 Wed Aug 29 10:37:45 2007 --- src/ComUtil/comutil.h Tue Feb 23 11:03:58 2010 *************** *** 70,81 **** #define TOK_FLOAT 9 /* Floating point number */ #define TOK_DOUBLE 10 /* Double-size floating point number */ #define TOK_EOF 11 /* End of file */ /* Token types never returned from LEXSCAN.C */ ! #define TOK_WHITESPACE 12 /* Spaces, tabs, new-lines, control chars */ ! #define TOK_OCT 13 /* Octal token */ ! #define TOK_HEX 14 /* Hexadecimal token */ ! #define TOK_COMMENT 15 /* Comment */ /* Levels for error system output */ #define USER_LEVEL 0 --- 70,82 ---- #define TOK_FLOAT 9 /* Floating point number */ #define TOK_DOUBLE 10 /* Double-size floating point number */ #define TOK_EOF 11 /* End of file */ + #define TOK_EOL 12 /* End of line -- only returned if _token_eol is true */ /* Token types never returned from LEXSCAN.C */ ! #define TOK_WHITESPACE 13 /* Spaces, tabs, new-lines, control chars */ ! #define TOK_OCT 14 /* Octal token */ ! #define TOK_HEX 15 /* Hexadecimal token */ ! #define TOK_COMMENT 16 /* Comment */ /* Levels for error system output */ #define USER_LEVEL 0 Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.12 top_ivtools/CHANGES:1.13 *** top_ivtools/CHANGES:1.12 Fri Feb 19 07:31:24 2010 --- ./CHANGES Tue Feb 23 11:03:57 2010 *************** *** 1,8 **** ! Feb. 1st, 2010 ivtools-1.2.9 - Debian related changes suggested by Agustin Martin. ! - usec timeout on comdraw pause command -- allows for writing loops that can be exited. Nov. 21st, 2009 ivtools-1.2.8 --- 1,13 ---- ! Feb. 23rd, 2010 ivtools-1.2.9 - Debian related changes suggested by Agustin Martin. ! - usec timeout on comdraw pause command -- allows for writing loops ! that can be exited. ! ! - option for an end-of-line token introduced to LexScan. ! ! - port to 64 bit Fedora Nov. 21st, 2009 ivtools-1.2.8 *** /dev/null Tue Feb 23 11:04:07 PST 2010 --- patches/ivtools-100223-johnston-036 *************** patches/ivtools-100223-johnston-036 *** 0 **** --- 1 ---- + ivtools-100223-johnston-036 --Apple-Mail-1-882039120 Content-Disposition: attachment; filename=ivtools-100219-johnston-035 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-100219-johnston-035" Content-Transfer-Encoding: 7bit Patch: ivtools-100219-johnston-035 For: ivtools-1.2 Author: [email protected] Subject: work on i don't recall Requires: This is an intermediate patch to ivtools-1.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: Index: Attribute/attrvalue.c diff -c Attribute/attrvalue.c:1.7 Attribute/attrvalue.c:1.8 *** Attribute/attrvalue.c:1.7 Thu Jan 7 15:24:22 2010 --- src/Attribute/attrvalue.c Fri Feb 19 07:31:27 2010 *************** *** 76,81 **** --- 76,83 ---- if(!_leakchecker) _leakchecker = new LeakChecker("AttributeValue"); _leakchecker->create(); #endif + clear(); + type(UnknownType); *this = sv; } *************** *** 84,89 **** --- 86,93 ---- if(!_leakchecker) _leakchecker = new LeakChecker("AttributeValue"); _leakchecker->create(); #endif + clear(); + type(UnknownType); *this = *sv; dup_as_needed(); } *************** *** 246,251 **** --- 250,256 ---- if(!_leakchecker) _leakchecker = new LeakChecker("AttributeValue"); _leakchecker->create(); #endif + clear(); _type = AttributeValue::ObjectType; _v.objval.ptr = ptr; _v.objval.type = classid; *************** *** 257,262 **** --- 262,268 ---- if(!_leakchecker) _leakchecker = new LeakChecker("AttributeValue"); _leakchecker->create(); #endif + clear(); _type = AttributeValue::ObjectType; _v.objval.ptr = view; _v.objval.type = compid; *************** *** 269,274 **** --- 275,281 ---- if(!_leakchecker) _leakchecker = new LeakChecker("AttributeValue"); _leakchecker->create(); #endif + clear(); _type = AttributeValue::ArrayType; _v.arrayval.ptr = ptr; _v.arrayval.type = 0; *************** *** 280,285 **** --- 287,293 ---- if(!_leakchecker) _leakchecker = new LeakChecker("AttributeValue"); _leakchecker->create(); #endif + clear(); _type = AttributeValue::StreamType; _v.streamval.funcptr = comfuncptr; _v.streamval.listptr = vallist; *************** *** 291,296 **** --- 299,305 ---- if(!_leakchecker) _leakchecker = new LeakChecker("AttributeValue"); _leakchecker->create(); #endif + clear(); _type = AttributeValue::StringType; _v.dfintval = symbol_add((char*)string); } Index: comdraw/README diff -c comdraw/README:1.2 comdraw/README:1.3 *** comdraw/README:1.2 Sat Oct 25 10:25:08 2008 --- src/comdraw/README Fri Feb 19 07:31:39 2010 *************** *** 82,87 **** --- 82,88 ---- compview=frame([index]) -- return composite component for a frame, defaults to current val=at(list|attrlist|compview n :set val) -- return (or set) the nth item in a list. num=size(list|attrlist|compview) -- return size of a list. + compview=parent(compview) -- get parent of graphic VIEWER COMMANDS *************** *** 143,149 **** run(filename) -- run commands from file quit() -- quit this interpreter exit() -- exit entire application ! pause([msgstr]) -- pause script execution until C/R OPTIONS --- 144,150 ---- run(filename) -- run commands from file quit() -- quit this interpreter exit() -- exit entire application ! pause([msgstr] :usec num) -- pause script execution until C/R OPTIONS Index: ComTerp/comterpserv.c diff -c ComTerp/comterpserv.c:1.6 ComTerp/comterpserv.c:1.7 *** ComTerp/comterpserv.c:1.6 Fri Nov 6 08:19:28 2009 --- src/ComTerp/comterpserv.c Fri Feb 19 07:31:28 2010 *************** *** 28,33 **** --- 28,34 ---- #include <ComTerp/comterpserv.h> #include <ComTerp/comvalue.h> #include <ComTerp/ctrlfunc.h> + #include <ComTerp/strmfunc.h> #include <OS/math.h> #include <iostream.h> #include <string.h> *************** *** 351,360 **** } else if (quitflag()) { status = 1; break; ! } else { ! /* save last thing on stack */ ! retval = new ComValue(pop_stack()); } } else if (*inbuf) { err_print( stderr, "comterp" ); #if __GNUC__<3 --- 352,378 ---- } else if (quitflag()) { status = 1; break; ! } else if (!func_for_next_expr() && val_for_next_func().is_null() && !muted()) { ! if (stack_top().is_stream() && autostream()) { ! ComValue streamv(stack_top()); ! do { ! pop_stack(); ! NextFunc::execute_impl(this, streamv); ! #if 0 ! if (stack_top().is_known()) { ! print_stack_top(out); ! out << "\n"; out.flush(); ! } ! #endif ! } while (stack_top().is_known()); ! pop_stack(); ! } else { ! /* save last thing on stack */ ! if(retval) delete retval; ! retval = new ComValue(pop_stack()); ! } } + } else if (*inbuf) { err_print( stderr, "comterp" ); #if __GNUC__<3 Index: comterp_/README diff -c comterp_/README:1.5 comterp_/README:1.6 *** comterp_/README:1.5 Fri Feb 27 07:00:06 2009 --- src/comterp_/README Fri Feb 19 07:31:30 2010 *************** *** 219,224 **** --- 219,228 ---- val=trace([flag] :get) -- toggle or set trace mode + pause() -- pause script execution until C/R + + step() -- toggle stepwise script execution + [str]=print(fmtstr val :string|:str :err) -- print value with format string [str]=print(val :string|:str :err) -- print value with format string Index: ComUnidraw/comeditor.c diff -c ComUnidraw/comeditor.c:1.5 ComUnidraw/comeditor.c:1.6 *** ComUnidraw/comeditor.c:1.5 Wed Aug 26 09:21:39 2009 --- src/ComUnidraw/comeditor.c Fri Feb 19 07:31:38 2010 *************** *** 130,135 **** --- 130,136 ---- void ComEditor::AddCommands(ComTerp* comterp) { ((ComTerpServ*)comterp)->add_defaults(); + comterp->add_command("parent", new GrParentFunc(comterp)); comterp->add_command("rect", new CreateRectFunc(comterp, this)); comterp->add_command("rectangle", new CreateRectFunc(comterp, this)); comterp->add_command("line", new CreateLineFunc(comterp, this)); Index: ComUnidraw/grfunc.c diff -c ComUnidraw/grfunc.c:1.8 ComUnidraw/grfunc.c:1.9 *** ComUnidraw/grfunc.c:1.8 Fri Nov 6 08:19:37 2009 --- src/ComUnidraw/grfunc.c Fri Feb 19 07:31:38 2010 *************** *** 1376,1381 **** --- 1376,1404 ---- /*****************************************************************************/ + GrParentFunc::GrParentFunc(ComTerp* comterp) : ComFunc(comterp) { + } + + void GrParentFunc::execute() { + ComValue compv(stack_arg(0)); + reset_stack(); + + if(compv.is_object() && compv.object_compview()) { + ComponentView* compview = (ComponentView*)compv.obj_val(); + OverlayComp* comp = (OverlayComp*)compview->GetSubject(); + if (comp && comp->GetParent()) { + ComValue retval(new OverlayViewRef((OverlayComp*)comp->GetParent()), + ((OverlayComp*)comp->GetParent())->classid()); + push_stack(retval); + return; + } + } + push_stack(ComValue::nullval()); + return; + } + + /*****************************************************************************/ + #ifdef LEAKCHECK #include <leakchecker.h> Index: ComUnidraw/grfunc.h diff -c ComUnidraw/grfunc.h:1.4 ComUnidraw/grfunc.h:1.5 *** ComUnidraw/grfunc.h:1.4 Wed Aug 26 09:21:39 2009 --- src/ComUnidraw/grfunc.h Fri Feb 19 07:31:38 2010 *************** *** 384,389 **** --- 384,398 ---- return "[compview|a00,a01,a10,a11,a20,a21]=trans(compview [a00,a01,a10,a11,a20,a21]) -- set/get transformer associated with a graphic"; } }; + //: command to access a graphic's parent + class GrParentFunc : public ComFunc { + public: + GrParentFunc(ComTerp*); + virtual void execute(); + virtual const char* docstring() { + return "compview=parent(compview) -- get parent of graphic"; } + }; + #ifdef LEAKCHECK //: command to return current number of OverlayComp's // compleak() -- current number of OverlayComp's Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.5 config_ivtools/params.def:1.6 *** config_ivtools/params.def:1.5 Sat Nov 21 10:08:43 2009 --- config/params.def Fri Feb 19 07:31:45 2010 *************** *** 27,33 **** * Name of the software release */ #ifndef Release ! #define Release ivtools-1.2.8 #endif RELEASE = Release --- 27,33 ---- * Name of the software release */ #ifndef Release ! #define Release ivtools-1.2.9 #endif RELEASE = Release *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 1.2.8 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 1.2.9 #endif VERSION = Version Index: DrawServ/drawcatalog.c diff -c DrawServ/drawcatalog.c:1.3 DrawServ/drawcatalog.c:1.4 *** DrawServ/drawcatalog.c:1.3 Mon May 18 16:43:01 2009 --- src/DrawServ/drawcatalog.c Fri Feb 19 07:31:41 2010 *************** *** 181,189 **** int end_id = _endnode[i]; if (start_id < 0 || end_id < 0) _comps->AppendEdge(_edges[i]); ! _edges[i]->Edge()-> ! attach_nodes(start_id < 0 ? nil : _nodes[start_id]->Node(), ! end_id < 0 ? nil : _nodes[end_id]->Node()); #if defined(GRAPH_OBSERVABLES) if (start_id >=0 && end_id >=0) _edges[i]->NodeStart()->attach(_edges[i]->NodeEnd()); --- 181,188 ---- int end_id = _endnode[i]; if (start_id < 0 || end_id < 0) _comps->AppendEdge(_edges[i]); ! _edges[i]->AttachNodes(start_id < 0 ? nil : _nodes[start_id], ! end_id < 0 ? nil : _nodes[end_id]); #if defined(GRAPH_OBSERVABLES) if (start_id >=0 && end_id >=0) _edges[i]->NodeStart()->attach(_edges[i]->NodeEnd()); Index: DrawServ/drawcomps.c diff -c DrawServ/drawcomps.c:1.5 DrawServ/drawcomps.c:1.6 *** DrawServ/drawcomps.c:1.5 Mon May 18 16:43:01 2009 --- src/DrawServ/drawcomps.c Fri Feb 19 07:31:41 2010 *************** *** 208,214 **** char buf2[BUFSIZ]; char* buf = buf1; ! DrawCatalog* catalog = (DrawCatalog*)unidraw->GetCatalog(); int num_edge = (comps)->GetNumEdge(); int num_node = (comps)->GetNumNode(); catalog->graph_init(comps, num_edge, num_node); --- 208,214 ---- char buf2[BUFSIZ]; char* buf = buf1; ! DrawCatalog* catalog = unidraw ? (DrawCatalog*) unidraw->GetCatalog() : (DrawCatalog*) DrawCatalog::Instance(); int num_edge = (comps)->GetNumEdge(); int num_node = (comps)->GetNumNode(); catalog->graph_init(comps, num_edge, num_node); Index: GraphUnidraw/edgecomp.c diff -c GraphUnidraw/edgecomp.c:1.7 GraphUnidraw/edgecomp.c:1.8 *** GraphUnidraw/edgecomp.c:1.7 Fri Jan 22 07:05:46 2010 --- src/GraphUnidraw/edgecomp.c Fri Feb 19 07:31:40 2010 *************** *** 268,274 **** #if defined(GRAPH_OBSERVABLES) if (NodeStart() && NodeEnd()) NodeStart()->detach(NodeEnd()); #endif ! Edge()->attach_nodes(nil, nil); } else if (cmd->IsA(EDGECONNECT_CMD)) { EdgeConnectCmd* ecmd = (EdgeConnectCmd*)cmd; --- 268,274 ---- #if defined(GRAPH_OBSERVABLES) if (NodeStart() && NodeEnd()) NodeStart()->detach(NodeEnd()); #endif ! AttachNodes(nil, nil); } else if (cmd->IsA(EDGECONNECT_CMD)) { EdgeConnectCmd* ecmd = (EdgeConnectCmd*)cmd; *************** *** 495,500 **** --- 495,506 ---- return nil; } + void EdgeComp::AttachNodes(NodeComp* startnode, NodeComp* endnode) { + Edge()->attach_nodes(startnode ? startnode->Node() : nil, + endnode ? endnode->Node() : nil); + return; + } + /*****************************************************************************/ EdgeView::EdgeView(EdgeComp* comp) Index: GraphUnidraw/edgecomp.h diff -c GraphUnidraw/edgecomp.h:1.4 GraphUnidraw/edgecomp.h:1.5 *** GraphUnidraw/edgecomp.h:1.4 Fri Jan 22 07:05:46 2010 --- src/GraphUnidraw/edgecomp.h Fri Feb 19 07:31:40 2010 *************** *** 109,114 **** --- 109,117 ---- void EndSubEdge(int index) { _end_subedge = index; } // set index of connected edge in sub-graph of end node + void AttachNodes(NodeComp* startnode, NodeComp* endnode); + // attach start and end nodes + virtual boolean operator == (OverlayComp&); static boolean clipline(Coord, Coord, Coord, Coord, Ellipse*, boolean, Coord&, Coord&); Index: GraphUnidraw/graphcomp.c diff -c GraphUnidraw/graphcomp.c:1.4 GraphUnidraw/graphcomp.c:1.5 *** GraphUnidraw/graphcomp.c:1.4 Fri Jan 22 07:05:46 2010 --- src/GraphUnidraw/graphcomp.c Fri Feb 19 07:31:40 2010 *************** *** 209,215 **** } /* hook em up */ ! newedge->Edge()->attach_nodes(startnew ? startnew->Node() : nil, endnew ? endnew->Node() : nil); } Next(it); --- 209,215 ---- } /* hook em up */ ! newedge->AttachNodes(startnew, endnew); } Next(it); *************** *** 401,409 **** int end_id = endnode[i]; if (start_id < 0 || end_id < 0) comps->AppendEdge(edges[i]); ! edges[i]->Edge()-> ! attach_nodes(start_id < 0 ? nil : nodes[start_id]->Node(), ! end_id < 0 ? nil : nodes[end_id]->Node()); } return 0; } --- 401,408 ---- int end_id = endnode[i]; if (start_id < 0 || end_id < 0) comps->AppendEdge(edges[i]); ! edges[i]->AttachNodes(start_id < 0 ? nil : nodes[start_id], ! end_id < 0 ? nil : nodes[end_id]); } return 0; } *************** *** 650,658 **** for (int i=0; i<num_edge; i++) { int start_id = startnode[i]; int end_id = endnode[i]; ! edges[i]->Edge()-> ! attach_nodes(start_id < 0 ? nil : nodes[start_id]->Node(), ! end_id < 0 ? nil : nodes[end_id]->Node()); #if defined(GRAPH_OBSERVABLES) if (start_id >=0 && end_id >=0) edges[i]->NodeStart()->attach(edges[i]->NodeEnd()); --- 649,656 ---- for (int i=0; i<num_edge; i++) { int start_id = startnode[i]; int end_id = endnode[i]; ! edges[i]->AttachNodes(start_id < 0 ? nil : nodes[start_id], ! end_id < 0 ? nil : nodes[end_id]); #if defined(GRAPH_OBSERVABLES) if (start_id >=0 && end_id >=0) edges[i]->NodeStart()->attach(edges[i]->NodeEnd()); Index: include_std/version.h diff -c include_std/version.h:1.5 include_std/version.h:1.6 *** include_std/version.h:1.5 Sat Nov 21 10:08:41 2009 --- src/include/ivstd/version.h Fri Feb 19 07:31:43 2010 *************** *** 1,3 **** ! #define IvtoolsVersion 1.2.8 ! #define VersionString "1.2.8" ! #define ReleaseString "ivtools-1.2.8" --- 1,3 ---- ! #define IvtoolsVersion 1.2.9 ! #define VersionString "1.2.9" ! #define ReleaseString "ivtools-1.2.9" 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 Wed Aug 29 10:39:25 2007 --- src/man/man1/comdraw.1 Fri Feb 19 07:31:44 2010 *************** *** 90,95 **** --- 90,96 ---- compview=frame([index]) -- return composite component for a frame, defaults to current val=at(list|attrlist|compview n :set val) -- return (or set) the nth item in a list. num=size(list|attrlist|compview) -- return size of a list. + compview=parent(compview) -- get parent of graphic .SH VIEWER COMMANDS *************** *** 155,161 **** run(filename) -- run commands from file quit() -- quit this interpreter exit() -- exit entire application ! pause([msgstr]) -- pause script execution until C/R .SH OPTIONS --- 156,162 ---- run(filename) -- run commands from file quit() -- quit this interpreter exit() -- exit entire application ! pause([msgstr] :usec num) -- pause script execution until C/R .SH OPTIONS Index: man1_ivtools/comterp.1 diff -c man1_ivtools/comterp.1:1.5 man1_ivtools/comterp.1:1.6 *** man1_ivtools/comterp.1:1.5 Fri Feb 27 07:00:11 2009 --- src/man/man1/comterp.1 Fri Feb 19 07:31:44 2010 *************** *** 225,230 **** --- 225,234 ---- val=trace([flag] :get) -- toggle or set trace mode + pause() -- pause script execution until C/R + + step() -- toggle stepwise script execution + [str]=print(fmtstr val :string|:str :err) -- print value with format string [str]=print(val :string|:str :err) -- print value Index: OverlayUnidraw/ovcatalog.c diff -c OverlayUnidraw/ovcatalog.c:1.2 OverlayUnidraw/ovcatalog.c:1.3 *** OverlayUnidraw/ovcatalog.c:1.2 Fri May 16 10:47:55 2008 --- src/OverlayUnidraw/ovcatalog.c Fri Feb 19 07:31:36 2010 *************** *** 148,153 **** --- 148,155 ---- ok = Catalog::Save(comp, name); } else { + Creator* oldcreator = Creator::instance(); + Creator::instance(GetCreator()); ExternView* ev = (ExternView*) comp->Create(SCRIPT_VIEW); if (ev != nil) { *************** *** 172,177 **** --- 174,181 ---- } delete ev; } + Creator::instance(oldcreator); + } return ok; } Index: OverlayUnidraw/ovcomps.c diff -c OverlayUnidraw/ovcomps.c:1.6 OverlayUnidraw/ovcomps.c:1.7 *** OverlayUnidraw/ovcomps.c:1.6 Wed Aug 26 09:21:38 2009 --- src/OverlayUnidraw/ovcomps.c Fri Feb 19 07:31:36 2010 *************** *** 1326,1331 **** --- 1326,1341 ---- return parent; } + void OverlaysComp::ClearVisit() { + visited(false); + Iterator it; + First(it); + while(!Done(it)) { + ((OverlayComp*)GetComp(it))->ClearVisit(); + Next(it); + } + } + /*****************************************************************************/ Index: OverlayUnidraw/ovcomps.h diff -c OverlayUnidraw/ovcomps.h:1.6 OverlayUnidraw/ovcomps.h:1.7 *** OverlayUnidraw/ovcomps.h:1.6 Fri Jan 22 07:05:44 2010 --- src/OverlayUnidraw/ovcomps.h Fri Feb 19 07:31:37 2010 *************** *** 186,191 **** --- 186,194 ---- virtual OverlayComp* DepthPrev(OverlayComp*); // return previous node in depth first traversal of tree + virtual void ClearVisit() { visited(false); } + // clear visit mark + protected: ParamList* GetParamList(); // return ParamList of required/optional/keyword arguments to be read *************** *** 325,330 **** --- 328,336 ---- virtual OverlayComp* DepthPrev(OverlayComp*); // return previous node in depth first traversal of tree + virtual void ClearVisit(); + // clear visit mark + protected: OverlayComp* Comp(UList*); UList* Elem(Iterator); Index: OverlayUnidraw/scriptview.c diff -c OverlayUnidraw/scriptview.c:1.2 OverlayUnidraw/scriptview.c:1.3 *** OverlayUnidraw/scriptview.c:1.2 Fri May 16 10:47:55 2008 --- src/OverlayUnidraw/scriptview.c Fri Feb 19 07:31:37 2010 *************** *** 932,938 **** void OverlayScript::Attributes(ostream& out) { AttributeList* attrlist = GetOverlayComp()->GetAttributeList(); ! if( !((OverlayUnidraw*)unidraw)->PrintAttributeList(out, attrlist)) out << *attrlist; } --- 932,938 ---- void OverlayScript::Attributes(ostream& out) { AttributeList* attrlist = GetOverlayComp()->GetAttributeList(); ! if( !unidraw || !((OverlayUnidraw*)unidraw)->PrintAttributeList(out, attrlist)) out << *attrlist; } Index: src_interviews/printer.c diff -c src_interviews/printer.c:1.1 src_interviews/printer.c:1.2 *** src_interviews/printer.c:1.1 Wed Aug 29 10:37:54 2007 --- src/InterViews/printer.c Fri Feb 19 07:31:31 2010 *************** *** 37,42 **** --- 37,43 ---- #include <OS/math.h> #include <stream.h> #include <string.h> + #include <stdio.h> static const float PAGE_WIDTH = 8.5 * 72; static const float PAGE_HEIGHT = 11 * 72; Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.11 top_ivtools/CHANGES:1.12 *** top_ivtools/CHANGES:1.11 Sat Nov 21 10:08:24 2009 --- ./CHANGES Fri Feb 19 07:31:24 2010 *************** *** 1,3 **** --- 1,9 ---- + Feb. 1st, 2010 ivtools-1.2.9 + + - Debian related changes suggested by Agustin Martin. + + - usec timeout on comdraw pause command -- allows for writing loops that can be exited. + Nov. 21st, 2009 ivtools-1.2.8 - significant work on keeping up with gcc and libstdc++. A wrapper Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.7 top_ivtools/INSTALL:1.8 *** top_ivtools/INSTALL:1.7 Sat Nov 21 10:08:24 2009 --- ./INSTALL Fri Feb 19 07:31:25 2010 *************** *** 10,16 **** And if that doesn't work... ! Instructions for building ivtools-1.2.6 from source, the long version: 0. Compilation Environment --- 10,16 ---- And if that doesn't work... ! Instructions for building ivtools-1.2.9 from source, the long version: 0. Compilation Environment Index: top_ivtools/README diff -c top_ivtools/README:1.5 top_ivtools/README:1.6 *** top_ivtools/README:1.5 Sat Oct 25 10:24:57 2008 --- ./README Fri Feb 19 07:31:25 2010 *************** *** 2,8 **** README for ivtools 1.2 ! This directory contains a release of ivtools 1.2.7. 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 1.2 ! This directory contains a release of ivtools 1.2.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. Index: top_ivtools/VERSION diff -c top_ivtools/VERSION:1.4 top_ivtools/VERSION:1.5 *** top_ivtools/VERSION:1.4 Sat Nov 21 10:08:24 2009 --- ./VERSION Fri Feb 19 07:31:25 2010 *************** *** 1 **** ! Release 1.2.8 --- 1 ---- ! Release 1.2.9 *** /dev/null Fri Feb 19 07:31:46 PST 2010 --- patches/ivtools-100219-johnston-035 *************** patches/ivtools-100219-johnston-035 *** 0 **** --- 1 ---- + ivtools-100219-johnston-035 --Apple-Mail-1-882039120 Content-Disposition: attachment; filename=ivtools-100201-johnston-034 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-100201-johnston-034" Content-Transfer-Encoding: 7bit Patch: ivtools-100201-johnston-034 For: ivtools-1.2 Author: [email protected] Subject: getting ready for 1.2.9 Requires: This is an intermediate patch to ivtools-1.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: Index: ComTerp/comhandler.c diff -c ComTerp/comhandler.c:1.8 ComTerp/comhandler.c:1.9 *** ComTerp/comhandler.c:1.8 Fri Jan 22 07:05:39 2010 --- src/ComTerp/comhandler.c Mon Feb 1 11:45:37 2010 *************** *** 227,233 **** comterp_->_outfunc = (outfuncptr)&ComTerpServ::fd_fputs; int status = comterp_->ComTerp::run(false /* !once */, comterp_->force_nested() /* !nested */); ! ComValue retval(comterp_->pop_stack(false)); if (comterp_->delete_later()) { delete comterp_; comterp_ = nil; --- 227,233 ---- comterp_->_outfunc = (outfuncptr)&ComTerpServ::fd_fputs; int status = comterp_->ComTerp::run(false /* !once */, comterp_->force_nested() /* !nested */); ! if(comterp_->force_nested()) ComValue retval(comterp_->pop_stack(false)); if (comterp_->delete_later()) { delete comterp_; comterp_ = nil; Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.6 ComUnidraw/unifunc.c:1.7 *** ComUnidraw/unifunc.c:1.6 Fri Jan 22 07:05:45 2010 --- src/ComUnidraw/unifunc.c Mon Feb 1 11:45:44 2010 *************** *** 647,653 **** ComValue usecv(stack_key(usec_symid)); reset_stack(); comterpserv()->npause()++; - long usec = usecv.is_numeric() ? usecv.long_val() : -1; ComTextEditor* te = (ComTextEditor*) --- 647,652 ---- *************** *** 683,689 **** tv->insert_string(sbuf_e.str(), strlen(sbuf_e.str())); } ((OverlayUnidraw*)unidraw)->set_timeout(old_sec,old_usec); ! } } else { cerr << "this version of pause command only works with ComTextEditor\n"; } --- 682,688 ---- tv->insert_string(sbuf_e.str(), strlen(sbuf_e.str())); } ((OverlayUnidraw*)unidraw)->set_timeout(old_sec,old_usec); ! } } else { cerr << "this version of pause command only works with ComTextEditor\n"; } Index: include_interviews/session.h diff -c include_interviews/session.h:1.2 include_interviews/session.h:1.3 *** include_interviews/session.h:1.2 Fri Jan 22 07:05:47 2010 --- src/include/InterViews/session.h Mon Feb 1 11:45:46 2010 *************** *** 99,104 **** --- 99,105 ---- virtual boolean pending() const; virtual void read(Event&, boolean (*test)() = nil); virtual boolean read(long sec, long usec, Event&, boolean (*test)() = nil); + virtual boolean read(long* sec, long* usec, Event&, boolean (*test)() = nil); virtual void unread(Event&); virtual void poll(Event&); Index: OverlayUnidraw/ovunidraw.c diff -c OverlayUnidraw/ovunidraw.c:1.4 OverlayUnidraw/ovunidraw.c:1.5 *** OverlayUnidraw/ovunidraw.c:1.4 Fri Jan 22 07:05:44 2010 --- src/OverlayUnidraw/ovunidraw.c Mon Feb 1 11:45:43 2010 *************** *** 125,130 **** --- 125,131 ---- Iterator it; alive(true); _npause = _comterp ? _comterp->npause() : 0; + static long tempsec = 0, tempusec = 0; while (alive() && !session->done() && !npause_lessened()) { updated(false); *************** *** 134,141 **** // session->read(e, &unidraw_updated_or_command_pushed); if(_sec<0) session->read(e, &unidraw_updated_or_command_pushed_or_npause_lessened); ! else ! if( !session->read(_sec, _usec, e, &unidraw_updated_or_command_pushed_or_npause_lessened) ) break; if (!updated()) { e.handle(); --- 135,150 ---- // session->read(e, &unidraw_updated_or_command_pushed); if(_sec<0) session->read(e, &unidraw_updated_or_command_pushed_or_npause_lessened); ! else { ! if( tempsec==0 && tempusec==0 ) { ! tempsec = _sec; ! tempusec = _usec; ! } ! if( !session->read(&tempsec, &tempusec, e, &unidraw_updated_or_command_pushed_or_npause_lessened)){ ! if(_comterp && _comterp->npause()) _comterp->npause()--; ! break; ! } ! } if (!updated()) { e.handle(); *************** *** 160,166 **** } } _npause = _comterp ? _comterp->npause() : 0; - } void OverlayUnidraw::Log (Command* cmd, boolean dirty) { --- 169,174 ---- Index: OverlayUnidraw/ovunidraw.h diff -c OverlayUnidraw/ovunidraw.h:1.4 OverlayUnidraw/ovunidraw.h:1.5 *** OverlayUnidraw/ovunidraw.h:1.4 Fri Jan 22 07:05:44 2010 --- src/OverlayUnidraw/ovunidraw.h Mon Feb 1 11:45:43 2010 *************** *** 65,70 **** --- 65,71 ---- static boolean unidraw_updated_or_command_pushed(); static boolean unidraw_updated_or_command_pushed_or_npause_lessened(); static void pointer_tracker_func(Event&); + static int npause() { return _npause; } void CurrentViewer(OverlayViewer* viewer) { _ovviewer = viewer; } OverlayViewer* CurrentViewer() { return _ovviewer; } Index: src_interviews/session.c diff -c src_interviews/session.c:1.3 src_interviews/session.c:1.4 *** src_interviews/session.c:1.3 Fri Jan 22 07:05:40 2010 --- src/InterViews/session.c Mon Feb 1 11:45:38 2010 *************** *** 371,376 **** --- 371,397 ---- } /* + * Read an event as above, but time out after a given (sec, usec) delay. + * Return true if an event was read, false if the time-out expired. + * (this version checks test function, and updates sec/usec accounting) + */ + + boolean Session::read(long* sec, long* usec, Event& e, boolean (*test)()) { + boolean save = rep_->readinput_; + rep_->readinput_ = false; + while (!rep_->done_ && !rep_->check(e) && !rep_->done_) { + if (!(*sec > 0 || *usec > 0)) { + rep_->readinput_ = save; + return false; + } + Dispatcher::instance().dispatch(*sec, *usec); + if (test && (*test)()) return true; + } + rep_->readinput_ = save; + return true; + } + + /* * Check for a pending event, returning it if there is one. */ *** /dev/null Mon Feb 1 11:45:49 PST 2010 --- patches/ivtools-100201-johnston-034 *************** patches/ivtools-100201-johnston-034 *** 0 **** --- 1 ---- + ivtools-100201-johnston-034 --Apple-Mail-1-882039120 Content-Disposition: attachment; filename=ivtools-100122-johnston-033 Content-Type: application/octet-stream; x-unix-mode=0644; name="ivtools-100122-johnston-033" Content-Transfer-Encoding: 7bit Patch: ivtools-100122-johnston-033 For: ivtools-1.2 Author: [email protected] Subject: changes up to the point of getting finite pause working Requires: This is an intermediate patch to ivtools-1.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: Index: Attribute/attrvalue.c diff -c Attribute/attrvalue.c:1.6 Attribute/attrvalue.c:1.7 *** Attribute/attrvalue.c:1.6 Wed Aug 26 11:01:18 2009 --- src/Attribute/attrvalue.c Thu Jan 7 15:24:22 2010 *************** *** 393,399 **** case AttributeValue::StringType: return (boolean) int_val()!=-1; case AttributeValue::ObjectType: ! return (boolean) obj_val(); case AttributeValue::StreamType: return stream_mode() != 0; default: --- 393,399 ---- case AttributeValue::StringType: return (boolean) int_val()!=-1; case AttributeValue::ObjectType: ! return (boolean) (unsigned long) obj_val(); case AttributeValue::StreamType: return stream_mode() != 0; default: *************** *** 552,558 **** case AttributeValue::SymbolType: return (unsigned int) int_val(); case AttributeValue::ObjectType: ! return (unsigned int)obj_val(); default: return 0; } --- 552,558 ---- case AttributeValue::SymbolType: return (unsigned int) int_val(); case AttributeValue::ObjectType: ! return (unsigned int) (unsigned long) obj_val(); default: return 0; } *************** *** 585,591 **** case AttributeValue::SymbolType: return int_ref(); case AttributeValue::ObjectType: ! return (int)obj_val(); default: return 0; } --- 585,591 ---- case AttributeValue::SymbolType: return int_ref(); case AttributeValue::ObjectType: ! return (int) (long) obj_val(); default: return 0; } Index: ComTerp/comfunc.c diff -c ComTerp/comfunc.c:1.6 ComTerp/comfunc.c:1.7 *** ComTerp/comfunc.c:1.6 Wed Aug 26 09:21:33 2009 --- src/ComTerp/comfunc.c Thu Jan 7 15:24:23 2010 *************** *** 194,200 **** } int loc = comterp()->_pfnum + offtop + argcnt-1; ! return comterp()->_pfcomvals[loc]; } ComValue& ComFunc::stack_key_post --- 194,201 ---- } int loc = comterp()->_pfnum + offtop + argcnt-1; ! if (loc<0) fprintf(stderr, "unexpected negative index for _pfcomvals\n"); ! else return comterp()->_pfcomvals[loc]; } ComValue& ComFunc::stack_key_post Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.17 ComTerp/comterp.c:1.18 *** ComTerp/comterp.c:1.17 Fri Nov 6 08:19:28 2009 --- src/ComTerp/comterp.c Thu Jan 7 15:24:23 2010 *************** *** 131,137 **** /* Allocate servstate stack to initial size */ _ctsstack_top = -1; _ctsstack_siz = 256; ! if(dmm_calloc((void**)&_ctsstack, _ctsstack_siz, sizeof(ComFuncState)) != 0) KANRET("error in call to dmm_calloc"); _pfoff = 0; --- 131,137 ---- /* Allocate servstate stack to initial size */ _ctsstack_top = -1; _ctsstack_siz = 256; ! if(dmm_calloc((void**)&_ctsstack, _ctsstack_siz, sizeof(ComTerpState)) != 0) KANRET("error in call to dmm_calloc"); _pfoff = 0; *************** *** 162,167 **** --- 162,168 ---- _stepflag = 0; _echo_postfix = 0; _delim_func = 0; + _ignore_commands = 0; _autostream = 0; _running = 0; _muted = 0; *************** *** 174,179 **** --- 175,182 ---- KANRET ("error in call to dmm_free"); if(dmm_free((void**)&_fsstack) != 0) KANRET ("error in call to dmm_free"); + if(dmm_free((void**)&_ctsstack) != 0) + KANRET ("error in call to dmm_free"); delete _errbuf; } *************** *** 302,307 **** --- 305,311 ---- ComFunc* func = nil; int nargs = sv.narg(); int nkeys = sv.nkey(); + int func_for_next_expr_post_eval = 0; if (_func_for_next_expr) { func = _func_for_next_expr; _func_for_next_expr = nil; *************** *** 312,318 **** if (_delim_func && sv.nids()!=1) { ComValue nameval(sv.command_symid(), ComValue::SymbolType); push_stack(nameval); // this assumes it will be immediately popped off the stack ! nargs++; } func->push_funcstate(nargs, nkeys, pedepth, func->funcid()); } --- 316,325 ---- if (_delim_func && sv.nids()!=1) { ComValue nameval(sv.command_symid(), ComValue::SymbolType); push_stack(nameval); // this assumes it will be immediately popped off the stack ! if (!func->post_eval()) ! nargs++; ! else ! func_for_next_expr_post_eval = 1; } func->push_funcstate(nargs, nkeys, pedepth, func->funcid()); } *************** *** 360,367 **** int stack_base = _stack_top; if (!func->post_eval()) stack_base -= nargs+nkeys; ! else stack_base -= 1; func->execute(); func->pop_funcstate(); --- 367,376 ---- int stack_base = _stack_top; if (!func->post_eval()) stack_base -= nargs+nkeys; ! else { stack_base -= 1; + stack_base -= func_for_next_expr_post_eval; + } func->execute(); func->pop_funcstate(); *************** *** 736,742 **** if (sv->type() == ComValue::SymbolType) { void* vptr = nil; unsigned int command_symid = sv->int_val(); ! localtable()->find(vptr, command_symid); /* handle case where symbol has matched parens, and things are set up to invoke a delim-specific func. */ if (/*!vptr && */ _delim_func && sv->nids() != 1) { --- 745,759 ---- if (sv->type() == ComValue::SymbolType) { void* vptr = nil; unsigned int command_symid = sv->int_val(); ! if(!ignore_commands()) ! localtable()->find(vptr, command_symid); ! else if (strncmp(sv->symbol_ptr(), "__", 2)==0) { ! int bufsiz = strlen(sv->symbol_ptr()); ! char buf[bufsiz]; ! strcpy(buf, sv->symbol_ptr()+2); ! command_symid = symbol_add(buf); ! localtable()->find(vptr, command_symid); ! } /* handle case where symbol has matched parens, and things are set up to invoke a delim-specific func. */ if (/*!vptr && */ _delim_func && sv->nids() != 1) { Index: ComTerp/comterp.h diff -c ComTerp/comterp.h:1.6 ComTerp/comterp.h:1.7 *** ComTerp/comterp.h:1.6 Fri Feb 27 07:00:04 2009 --- src/ComTerp/comterp.h Thu Jan 7 15:24:23 2010 *************** *** 267,272 **** --- 267,278 ---- boolean delim_func() const { return _delim_func; } // return flag that indicates whether to run a delimeter selected func. + void ignore_commands(boolean flag) { _ignore_commands = flag; } + // set flag that indicates whether to ignore all built-in commands + + boolean ignore_commands() const { return _ignore_commands; } + // return flag that indicates whether to ignore all built-in commands + void autostream(boolean flag) { _autostream = flag; } // set flag that indicates whether to run a delimeter selected func. *************** *** 361,366 **** --- 367,375 ---- boolean _delim_func; // use delimeter selected func, passing symbol in ::command_symid() + boolean _ignore_commands; + // ignore any built-in commands. + boolean _autostream; // automatically iterates over stream if left on stack Index: ComTerp/comhandler.c diff -c ComTerp/comhandler.c:1.7 ComTerp/comhandler.c:1.8 *** ComTerp/comhandler.c:1.7 Fri Nov 6 11:34:43 2009 --- src/ComTerp/comhandler.c Fri Jan 22 07:05:39 2010 *************** *** 34,39 **** --- 34,40 ---- #include <ComTerp/comhandler.h> #include <ComTerp/comterpserv.h> + #include <ComTerp/comvalue.h> #include <signal.h> *************** *** 225,231 **** comterp_->_fd = fd; comterp_->_outfunc = (outfuncptr)&ComTerpServ::fd_fputs; ! int status = comterp_->ComTerp::run(false /* !once */, false /* !nested */); if (comterp_->delete_later()) { delete comterp_; comterp_ = nil; --- 226,233 ---- comterp_->_fd = fd; comterp_->_outfunc = (outfuncptr)&ComTerpServ::fd_fputs; ! int status = comterp_->ComTerp::run(false /* !once */, comterp_->force_nested() /* !nested */); ! ComValue retval(comterp_->pop_stack(false)); if (comterp_->delete_later()) { delete comterp_; comterp_ = nil; Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.18 ComTerp/comterp.c:1.19 *** ComTerp/comterp.c:1.18 Thu Jan 7 15:24:23 2010 --- src/ComTerp/comterp.c Fri Jan 22 07:05:39 2010 *************** *** 44,50 **** #include <ComTerp/charfunc.h> #include <ComTerp/comfunc.h> #include <ComTerp/comterp.h> ! #include <ComTerp/comterpserv.h> #include <ComTerp/comvalue.h> #include <ComTerp/condfunc.h> #include <ComTerp/ctrlfunc.h> --- 44,50 ---- #include <ComTerp/charfunc.h> #include <ComTerp/comfunc.h> #include <ComTerp/comterp.h> ! // #include <ComTerp/comterpserv.h> #include <ComTerp/comvalue.h> #include <ComTerp/condfunc.h> #include <ComTerp/ctrlfunc.h> *************** *** 84,89 **** --- 84,90 ---- #define STREAM_MECH extern int _detail_matched_delims; + extern int _no_bracesplus; using std::cerr; using std::cout; Index: ComTerp/comterp.h diff -c ComTerp/comterp.h:1.7 ComTerp/comterp.h:1.8 *** ComTerp/comterp.h:1.7 Thu Jan 7 15:24:23 2010 --- src/ComTerp/comterp.h Fri Jan 22 07:05:39 2010 *************** *** 291,296 **** --- 291,302 ---- boolean muted() const { return _muted; } // return flag that indicates whether to mute output + void force_nested(boolean flag) { _force_nested = flag; } + // set flag to ensure subsequent calls are nested + + boolean force_nested() { return _force_nested; } + // get flag to ensure subsequent calls are nested + protected: void incr_stack(); void incr_stack(int n); *************** *** 379,384 **** --- 385,393 ---- boolean _muted; // flag to mute any response from a ComTerp + boolean _force_nested; + // flag to ensure subsequent calls are nested + friend class ComFunc; friend class ComterpHandler; friend class ComTerpIOHandler; Index: ComTerp/ctrlfunc.h diff -c ComTerp/ctrlfunc.h:1.5 ComTerp/ctrlfunc.h:1.6 *** ComTerp/ctrlfunc.h:1.5 Fri Nov 6 08:19:28 2009 --- src/ComTerp/ctrlfunc.h Fri Jan 22 07:05:39 2010 *************** *** 150,163 **** }; //: usleep sleep microseconds ! // usleep(msec) -- sleep microseconds class USleepFunc : public ComFunc { public: USleepFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { ! return "%s(msec) -- sleep microseconds"; } }; --- 150,163 ---- }; //: usleep sleep microseconds ! // usleep(usec) -- sleep microseconds class USleepFunc : public ComFunc { public: USleepFunc(ComTerp*); virtual void execute(); virtual const char* docstring() { ! return "%s(usec) -- sleep microseconds"; } }; Index: ComUnidraw/unifunc.c diff -c ComUnidraw/unifunc.c:1.5 ComUnidraw/unifunc.c:1.6 *** ComUnidraw/unifunc.c:1.5 Wed Aug 26 09:21:39 2009 --- src/ComUnidraw/unifunc.c Fri Jan 22 07:05:45 2010 *************** *** 643,651 **** --- 643,655 ---- void UnidrawPauseFunc::execute() { ComValue msgstrv(stack_arg(0)); + static int usec_symid = symbol_add("usec"); + ComValue usecv(stack_key(usec_symid)); reset_stack(); comterpserv()->npause()++; + long usec = usecv.is_numeric() ? usecv.long_val() : -1; + ComTextEditor* te = (ComTextEditor*) ((OverlayEditor*)GetEditor())->TextEditor(); if (te) { *************** *** 655,671 **** tv->insert_string((char*)msgstrv.string_ptr(), strlen(msgstrv.string_ptr())); tv->insert_char('\n'); } ! std::ostrstream sbuf_s; ! sbuf_s << "pause(" << comterpserv()->npause() << "): enter command or press C/R to continue\n"; ! sbuf_s.put('\0'); ! tv->insert_string(sbuf_s.str(), strlen(sbuf_s.str())); comterpserv()->push_servstate(); unidraw->Run(); comterpserv()->pop_servstate(); ! std::ostrstream sbuf_e; ! sbuf_e << "end of pause(" << comterpserv()->npause()+1 << ")\n"; ! sbuf_e.put('\0'); ! tv->insert_string(sbuf_e.str(), strlen(sbuf_e.str())); } } else { cerr << "this version of pause command only works with ComTextEditor\n"; --- 659,688 ---- tv->insert_string((char*)msgstrv.string_ptr(), strlen(msgstrv.string_ptr())); tv->insert_char('\n'); } ! long old_sec, old_usec; ! ((OverlayUnidraw*)unidraw)->get_timeout(old_sec,old_usec); ! if(usec<0) { ! std::ostrstream sbuf_s; ! sbuf_s << "pause(" << comterpserv()->npause() << "): enter command or press C/R to continue\n"; ! sbuf_s.put('\0'); ! tv->insert_string(sbuf_s.str(), strlen(sbuf_s.str())); ! ((OverlayUnidraw*)unidraw)->set_timeout(-1, -1); ! } else ! ((OverlayUnidraw*)unidraw)->set_timeout(0,usec); comterpserv()->push_servstate(); + boolean nested = comterpserv()->force_nested(); + comterpserv()->force_nested(1); unidraw->Run(); + comterpserv()->force_nested(nested); + if (!unidraw->alive()) comterpserv()->exit(); comterpserv()->pop_servstate(); ! if(usec<0) { ! std::ostrstream sbuf_e; ! sbuf_e << "end of pause(" << comterpserv()->npause()+1 << ")\n"; ! sbuf_e.put('\0'); ! tv->insert_string(sbuf_e.str(), strlen(sbuf_e.str())); ! } ! ((OverlayUnidraw*)unidraw)->set_timeout(old_sec,old_usec); } } else { cerr << "this version of pause command only works with ComTextEditor\n"; Index: ComUnidraw/unifunc.h diff -c ComUnidraw/unifunc.h:1.1 ComUnidraw/unifunc.h:1.2 *** ComUnidraw/unifunc.h:1.1 Wed Aug 29 10:38:54 2007 --- src/ComUnidraw/unifunc.h Fri Jan 22 07:05:45 2010 *************** *** 184,190 **** UnidrawPauseFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "pause -- pause script execution until C/R"; } }; --- 184,190 ---- UnidrawPauseFunc(ComTerp*,Editor*); virtual void execute(); virtual const char* docstring() { ! return "pause(:usec usec) -- pause script execution until C/R (or usec)"; } }; Index: ComUtil/_parser.c diff -c ComUtil/_parser.c:1.5 ComUtil/_parser.c:1.6 *** ComUtil/_parser.c:1.5 Fri Feb 27 07:00:03 2009 --- src/ComUtil/_parser.c Fri Jan 22 07:05:38 2010 *************** *** 46,51 **** --- 46,52 ---- infuncptr _oneshot_infunc = NULL; int _detail_matched_delims = 0; int _sticky_matched_delims = 0; + int _no_bracesplus = 0; static int get_next_token(void *infile, char *(*infunc)(), int (*eoffunc)(), int (*errfunc)(), FILE *outfile, int (*outfunc)(), *************** *** 1219,1225 **** #endif if (toktype==TOK_RPAREN) commandid = parensplus_symid; else if (toktype==TOK_RBRACKET) commandid = bracketsplus_symid; ! else if (toktype==TOK_RBRACE) commandid = bracesplus_symid; else if (toktype==TOK_RANGBRACK) commandid = angbracksplus_symid; else commandid = dblangbracksplus_symid; } --- 1220,1233 ---- #endif if (toktype==TOK_RPAREN) commandid = parensplus_symid; else if (toktype==TOK_RBRACKET) commandid = bracketsplus_symid; ! else if (toktype==TOK_RBRACE) { ! if(_no_bracesplus) { ! commandid = braces_symid; ! ParenStack[TopOfParenStack].narg--; ! if (TopOfParenStack>0) ParenStack[TopOfParenStack-1].narg++; ! } else ! commandid = bracesplus_symid; ! } else if (toktype==TOK_RANGBRACK) commandid = angbracksplus_symid; else commandid = dblangbracksplus_symid; } Index: GraphUnidraw/edgecomp.c diff -c GraphUnidraw/edgecomp.c:1.6 GraphUnidraw/edgecomp.c:1.7 *** GraphUnidraw/edgecomp.c:1.6 Mon May 18 16:43:00 2009 --- src/GraphUnidraw/edgecomp.c Fri Jan 22 07:05:46 2010 *************** *** 92,109 **** --- 92,112 ---- int end_subedge) : OverlayComp(g, parent) { _edge = new TopoEdge(this); + _start_node = _end_node = -1; _start_subedge = start_subedge; _end_subedge = end_subedge; } EdgeComp::EdgeComp(istream& in, OverlayComp* parent) : OverlayComp(nil, parent) { + _start_node = _end_node = -1; _start_subedge = _end_subedge = -1; _edge = new TopoEdge(this); _valid = GetParamList()->read_args(in, this); } EdgeComp::EdgeComp(OverlayComp* parent) : OverlayComp(nil, parent) { + _start_node = _end_node = -1; _start_subedge = _end_subedge = -1; _edge = new TopoEdge(this); } *************** *** 136,142 **** } Component* EdgeComp::Copy() { ! EdgeComp* comp = NewEdgeComp((ArrowLine*) GetArrowLine()->Copy()); if (attrlist()) comp->SetAttributeList(new AttributeList(attrlist())); comp->_start_node = _start_node; comp->_end_node = _end_node; --- 139,146 ---- } Component* EdgeComp::Copy() { ! ! EdgeComp* comp = GetArrowLine() ? NewEdgeComp((ArrowLine*) GetArrowLine()->Copy()) : NewEdgeComp(); if (attrlist()) comp->SetAttributeList(new AttributeList(attrlist())); comp->_start_node = _start_node; comp->_end_node = _end_node; Index: GraphUnidraw/edgecomp.h diff -c GraphUnidraw/edgecomp.h:1.3 GraphUnidraw/edgecomp.h:1.4 *** GraphUnidraw/edgecomp.h:1.3 Fri Sep 28 13:08:35 2007 --- src/GraphUnidraw/edgecomp.h Fri Jan 22 07:05:46 2010 *************** *** 101,109 **** // return pointer to end node. int StartSubEdge() { return _start_subedge; } ! // index of connected edge in sub-graph of start node int EndSubEdge() { return _end_subedge; } ! // index of connected edge in sub-graph of end node virtual boolean operator == (OverlayComp&); --- 101,113 ---- // return pointer to end node. int StartSubEdge() { return _start_subedge; } ! // get index of connected edge in sub-graph of start node ! void StartSubEdge(int index) { _start_subedge = index; } ! // set index of connected edge in sub-graph of start node int EndSubEdge() { return _end_subedge; } ! // get index of connected edge in sub-graph of end node ! void EndSubEdge(int index) { _end_subedge = index; } ! // set index of connected edge in sub-graph of end node virtual boolean operator == (OverlayComp&); Index: GraphUnidraw/graphcomp.c diff -c GraphUnidraw/graphcomp.c:1.3 GraphUnidraw/graphcomp.c:1.4 *** GraphUnidraw/graphcomp.c:1.3 Mon May 18 16:43:00 2009 --- src/GraphUnidraw/graphcomp.c Fri Jan 22 07:05:46 2010 *************** *** 42,47 **** --- 42,48 ---- #include <OverlayUnidraw/paramlist.h> #include <TopoFace/topoedge.h> + #include <TopoFace/toponode.h> #include <UniIdraw/idarrows.h> *************** *** 156,161 **** --- 157,223 ---- return comps; } + GraphComp* GraphComp::GraphCopy () { + GraphComp* newgraph = (GraphComp*)Copy(); + + // you just copied a graph, reconnect it + Iterator it; + First(it); + Iterator kt; + newgraph->First(kt); + while(!Done(it)) { + OverlayComp* comp = (OverlayComp*)GetComp(it); + if (comp->IsA(EDGE_COMP)) { + + EdgeComp* edgecomp = (EdgeComp*)comp; + EdgeComp* newedge = (EdgeComp*)GetComp(kt); + + /* get pointers to upstream and downstream node */ + NodeComp* startnode = (NodeComp*)((EdgeComp*)comp)->Edge()->start_node()->value(); + NodeComp* endnode = (NodeComp*)((EdgeComp*)comp)->Edge()->start_node()->value(); + + /* find the offset of these nodes in the linked list */ + int startoff = -1; + int endoff = -1; + Iterator jt; + First(jt); + int offset = 0; + while(!Done(jt) && (startoff == -1 || endoff == -1)) { + OverlayComp* testcomp = (OverlayComp*)GetComp(jt); + if (testcomp==startnode) startoff = offset; + else if (testcomp==endnode) endoff = offset; + Next(jt); + offset++; + } + + /* find the equivalent nodes in the new linked list */ + newgraph->First(jt); + offset = 0; + NodeComp* startnew = nil; + NodeComp* endnew = nil; + while(!newgraph->Done(jt) && (startoff!=-1 || endoff!=-1)) { + if (startoff==offset) { + startnew = (NodeComp*)newgraph->GetComp(jt); + startoff=-1; + } + else if (endoff==offset) { + endnew = (NodeComp*)newgraph->GetComp(jt); + endoff=-1; + } + newgraph->Next(jt); + offset++; + } + + /* hook em up */ + newedge->Edge()->attach_nodes(startnew ? startnew->Node() : nil, endnew ? endnew->Node() : nil); + + } + Next(it); + newgraph->Next(kt); + } + return newgraph; + } + void GraphComp::GrowParamList(ParamList* pl) { pl->add_param("edges_nodes", ParamStruct::required, &ParamList::read_int, this, &_num_edge, &_num_node); Index: GraphUnidraw/graphcomp.h diff -c GraphUnidraw/graphcomp.h:1.1 GraphUnidraw/graphcomp.h:1.2 *** GraphUnidraw/graphcomp.h:1.1 Wed Aug 29 10:38:58 2007 --- src/GraphUnidraw/graphcomp.h Fri Jan 22 07:05:46 2010 *************** *** 45,51 **** virtual ClassId GetClassId(); virtual boolean IsA(ClassId); ! Component* Copy(); void AppendEdge(EdgeComp*); // add edge component to the graph. --- 45,52 ---- virtual ClassId GetClassId(); virtual boolean IsA(ClassId); ! virtual Component* Copy(); ! virtual GraphComp* GraphCopy(); void AppendEdge(EdgeComp*); // add edge component to the graph. Index: html_ivtools/README diff -c html_ivtools/README:1.1 html_ivtools/README:1.2 *** html_ivtools/README:1.1 Wed Aug 29 10:39:30 2007 --- src/html/README Fri Jan 22 07:05:49 2010 *************** *** 50,56 **** perl --version ! 2.3 Verify your copy of Perl is installed at /bin/perl: which perl --- 50,56 ---- perl --version ! 2.3 Verify your copy of Perl is installed at /usr/bin/perl: which perl *************** *** 63,69 **** mkdir classes cd .. ! perceps -d `pwd`/html/classes -o `pwd`/html/templates `cat ../MANIFEST.perceps` cd html The whole process takes some time, especially the generation of the --- 63,69 ---- mkdir classes cd .. ! html/perceps.pl -t html/templates -d html/classes `cat ../MANIFEST.perceps` cd html The whole process takes some time, especially the generation of the Index: include_interviews/session.h diff -c include_interviews/session.h:1.1 include_interviews/session.h:1.2 *** include_interviews/session.h:1.1 Wed Aug 29 10:39:10 2007 --- src/include/InterViews/session.h Fri Jan 22 07:05:47 2010 *************** *** 98,104 **** virtual boolean pending() const; virtual void read(Event&, boolean (*test)() = nil); ! virtual boolean read(long sec, long usec, Event&); virtual void unread(Event&); virtual void poll(Event&); --- 98,104 ---- virtual boolean pending() const; virtual void read(Event&, boolean (*test)() = nil); ! virtual boolean read(long sec, long usec, Event&, boolean (*test)() = nil); virtual void unread(Event&); virtual void poll(Event&); Index: OverlayUnidraw/ovcomps.h diff -c OverlayUnidraw/ovcomps.h:1.5 OverlayUnidraw/ovcomps.h:1.6 *** OverlayUnidraw/ovcomps.h:1.5 Wed Aug 26 09:21:38 2009 --- src/OverlayUnidraw/ovcomps.h Fri Jan 22 07:05:44 2010 *************** *** 80,85 **** --- 80,90 ---- boolean valid(); // for checking if istream constructor was successfull (if de-serialization // was successful). + boolean visited() { return _valid; } + // reuse of valid flag as visited flag + void visited(int flag) { _valid = flag; } + // reuse of valid flag as visited flag + const char* GetAnnotation(); // return pointer to annotation string for this component. void SetAnnotation(const char*); Index: OverlayUnidraw/ovunidraw.c diff -c OverlayUnidraw/ovunidraw.c:1.3 OverlayUnidraw/ovunidraw.c:1.4 *** OverlayUnidraw/ovunidraw.c:1.3 Fri Nov 6 08:19:35 2009 --- src/OverlayUnidraw/ovunidraw.c Fri Jan 22 07:05:44 2010 *************** *** 74,79 **** --- 74,80 ---- _comterp = nil; _npause = 0; _run_once = 0; + _sec = _usec = -1; /* replace default Painter with an OverlayPainter */ OverlayGraphic::new_painter(); *************** *** 86,91 **** --- 87,93 ---- _comterp = nil; _npause = 0; _run_once = 0; + _sec = _usec = -1; } OverlayUnidraw::~OverlayUnidraw () *************** *** 130,136 **** _updated_ptr = &_updated; // session->read(e, &unidraw_updated); // session->read(e, &unidraw_updated_or_command_pushed); ! session->read(e, &unidraw_updated_or_command_pushed_or_npause_lessened); if (!updated()) { e.handle(); session->default_display()->flush(); --- 132,142 ---- _updated_ptr = &_updated; // session->read(e, &unidraw_updated); // session->read(e, &unidraw_updated_or_command_pushed); ! if(_sec<0) ! session->read(e, &unidraw_updated_or_command_pushed_or_npause_lessened); ! else ! if( !session->read(_sec, _usec, e, &unidraw_updated_or_command_pushed_or_npause_lessened) ) break; ! if (!updated()) { e.handle(); session->default_display()->flush(); Index: OverlayUnidraw/ovunidraw.h diff -c OverlayUnidraw/ovunidraw.h:1.3 OverlayUnidraw/ovunidraw.h:1.4 *** OverlayUnidraw/ovunidraw.h:1.3 Fri Nov 6 08:19:35 2009 --- src/OverlayUnidraw/ovunidraw.h Fri Jan 22 07:05:44 2010 *************** *** 85,93 **** --- 85,101 ---- int run_once() { return _run_once; } virtual void RunOnce() { run_once(10);Run(); } // run OverlayUnidraw just once + + void set_timeout(long sec, long usec) { _sec = sec; _usec = usec; } + // set amount of delay before timing out Run() + + void get_timeout(long& sec, long& usec) { sec= _sec; usec = _usec; } + // get amount of delay before timing out Run() protected: int _run_once; + long _sec; // seconds of delay before exiting Run + long _usec; // micro-seconds of delay before exiting Run static MacroCmd* _cmdq; static boolean* _updated_ptr; OverlayViewer* _ovviewer; Index: OverlayUnidraw/ovviewer.h diff -c OverlayUnidraw/ovviewer.h:1.2 OverlayUnidraw/ovviewer.h:1.3 *** OverlayUnidraw/ovviewer.h:1.2 Fri Sep 28 13:08:33 2007 --- src/OverlayUnidraw/ovviewer.h Fri Jan 22 07:05:44 2010 *************** *** 135,140 **** --- 135,143 ---- // indirect command execution for distributed whiteboard mechanism. // bulk of mechanism implemented in ComEditor. + boolean needs_resize() { return _needs_resize; } + // goes false after initialization is done + protected: virtual void Zoom(Perspective&); virtual void Scroll(Perspective&); Index: src_interviews/session.c diff -c src_interviews/session.c:1.2 src_interviews/session.c:1.3 *** src_interviews/session.c:1.2 Fri May 16 10:47:39 2008 --- src/InterViews/session.c Fri Jan 22 07:05:40 2010 *************** *** 350,358 **** /* * Read an event as above, but time out after a given (sec, usec) delay. * Return true if an event was read, false if the time-out expired. */ ! boolean Session::read(long sec, long usec, Event& e) { long sec_left = sec; long usec_left = usec; boolean save = rep_->readinput_; --- 350,359 ---- /* * Read an event as above, but time out after a given (sec, usec) delay. * Return true if an event was read, false if the time-out expired. + * (this version also checks test function) */ ! boolean Session::read(long sec, long usec, Event& e, boolean (*test)()) { long sec_left = sec; long usec_left = usec; boolean save = rep_->readinput_; *************** *** 363,368 **** --- 364,370 ---- return false; } Dispatcher::instance().dispatch(sec_left, usec_left); + if (test && (*test)()) return true; } rep_->readinput_ = save; return true; Index: src_os/string.c diff -c src_os/string.c:1.5 src_os/string.c:1.6 *** src_os/string.c:1.5 Sat Nov 21 10:08:27 2009 --- src/OS/string.c Thu Jan 7 15:24:25 2010 *************** *** 300,306 **** */ String String::before(const char* str) const { ! char* ptr = strstr(string(), str); if (ptr) return substr(0, ptr-string()); else --- 300,306 ---- */ String String::before(const char* str) const { ! const char* ptr = strstr(string(), str); if (ptr) return substr(0, ptr-string()); else Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.6 top_ivtools/MANIFEST:1.7 *** top_ivtools/MANIFEST:1.6 Fri Nov 6 08:19:27 2009 --- ./MANIFEST Fri Jan 22 07:05:37 2010 *************** *** 1147,1152 **** --- 1147,1153 ---- ivtools-1.2/src/html/README ivtools-1.2/src/html/getman31.sh ivtools-1.2/src/html/getrefman31.sh + ivtools-1.2/src/html/perceps.pl ivtools-1.2/src/html/templates/CLASS.html.tmpl ivtools-1.2/src/html/templates/Imakefile ivtools-1.2/src/html/templates/Makefile *** /dev/null Fri Jan 22 07:05:50 PST 2010 --- patches/ivtools-100122-johnston-033 *************** patches/ivtools-100122-johnston-033 *** 0 **** --- 1 ---- + ivtools-100122-johnston-033 --Apple-Mail-1-882039120 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev --Apple-Mail-1-882039120 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ivtools-patch mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ivtools-patch --Apple-Mail-1-882039120--