last 2 patches leading up to 1.2.4
ivtools patch distribution <[email protected]> Thu, 20 Jul 2006 14:14:41 -0700
| Newsgroups | gmane.comp.lib.ivtools.patches |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-6--970777992 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=ivtools-060612-johnston-015 Content-Disposition: attachment; filename=ivtools-060612-johnston-015 Patch: ivtools-060612-johnston-015 For: ivtools-1.2.3 Author: [email protected] Subject: fixes for latest version of gcc Requires: This is an intermediate patch to ivtools-1.2.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: evolution of comterp to allow multi-line socket commands Index: Attribute/_comutil.h diff -c Attribute/_comutil.h:1.1 Attribute/_comutil.h:1.2 *** Attribute/_comutil.h:1.1 Tue Jun 15 08:53:30 2004 --- src/Attribute/_comutil.h Mon Jun 12 07:43:01 2006 *************** *** 17,21 **** --- 17,22 ---- { if (_symid<0) _symid=symbol_add((char*)class_name()); return _symid;} \ protected: \ static int _symid; + #endif /* !defined(__comutil.h) */ Index: Attribute/attrlist.h diff -c Attribute/attrlist.h:1.1 Attribute/attrlist.h:1.2 *** Attribute/attrlist.h:1.1 Tue Jun 15 08:53:30 2004 --- src/Attribute/attrlist.h Mon Jun 12 07:43:01 2006 *************** *** 197,202 **** --- 197,207 ---- void Remove(AttributeValue*); // remove AttributeValue from list, returning responsibility for freeing the // associated memory. + void Remove(ALIterator&); + // remove AttributeValue pointed to by iterator from the list, + // returning responsibility for freeing the associated memory. + // This requires saving a pointer to the AttributeValue before calling this method. + AttributeValue* GetAttrVal(ALIterator); // get AttributeValue pointed to by iterator. *************** *** 223,233 **** // get flag to insert in a nested fashion protected: - void Remove(ALIterator&); - // remove AttributeValue pointed to by iterator from the list, - // returning responsibility for freeing the associated memory. - // This requires saving a pointer to the AttributeValue before calling this method. - AList* _alist; unsigned int _count; boolean _nested_insert; --- 228,233 ---- Index: Attribute/attrvalue.c diff -c Attribute/attrvalue.c:1.2 Attribute/attrvalue.c:1.3 *** Attribute/attrvalue.c:1.2 Tue Jan 25 09:27:26 2005 --- src/Attribute/attrvalue.c Mon Jun 12 07:43:01 2006 *************** *** 1,5 **** /* ! * Copyright (c) 2001 Scott E. Johnston * Copyright (c) 2000 IET Inc. * Copyright (c) 1994-1997 Vectaport Inc. * --- 1,5 ---- /* ! * Copyright (c) 2001,2006 Scott E. Johnston * Copyright (c) 2000 IET Inc. * Copyright (c) 1994-1997 Vectaport Inc. * *************** *** 1104,1106 **** --- 1104,1111 ---- _state = val; } + boolean AttributeValue::is_object(int class_symid) { + if (!is_type(ObjectType)) return false; + if (this->class_symid() == class_symid) return true; + return false; + } Index: Attribute/attrvalue.h diff -c Attribute/attrvalue.h:1.1 Attribute/attrvalue.h:1.2 *** Attribute/attrvalue.h:1.1 Tue Jun 15 08:53:30 2004 --- src/Attribute/attrvalue.h Mon Jun 12 07:43:01 2006 *************** *** 1,5 **** /* ! * Copyright (c) 2001 Scott E. Johnston * Copyright (c) 2000 IET Inc. * Copyright (c) 1994-1999 Vectaport Inc. * --- 1,5 ---- /* ! * Copyright (c) 2001,2006 Scott E. Johnston * Copyright (c) 2000 IET Inc. * Copyright (c) 1994-1999 Vectaport Inc. * *************** *** 320,328 **** // returns true if CommandType (for use of ComTerp). boolean is_object() { return is_type(ObjectType); } // returns true if ObjectType. ! boolean is_object(int class_symid) { return is_type(ObjectType) && ! this->class_symid() == class_symid; } ! // returns true if ObjectType and matching class_symid. static boolean is_char(ValueType t) { return t==CharType || t==UCharType; } --- 320,327 ---- // returns true if CommandType (for use of ComTerp). boolean is_object() { return is_type(ObjectType); } // returns true if ObjectType. ! boolean is_object(int class_symid); ! // returns true if ObjectType and class_symid matches or belongs to a parent class. static boolean is_char(ValueType t) { return t==CharType || t==UCharType; } *************** *** 355,361 **** // returns true if ObjectType with an Attribute object. void* geta(int type); ! // return a pointer if ObjectType matches friend ostream& operator << (ostream& s, const AttributeValue&); // output AttributeValue to ostream. --- 354,360 ---- // returns true if ObjectType with an Attribute object. void* geta(int type); ! // return a pointer if ObjectType matches or is a parent class friend ostream& operator << (ostream& s, const AttributeValue&); // output AttributeValue to ostream. Index: ComTerp/boolfunc.c diff -c ComTerp/boolfunc.c:1.1 ComTerp/boolfunc.c:1.2 *** ComTerp/boolfunc.c:1.1 Tue Jun 15 08:53:38 2004 --- src/ComTerp/boolfunc.c Mon Jun 12 07:43:02 2006 *************** *** 255,260 **** --- 255,265 ---- result.boolean_ref() = operand2.type() == ComValue::ArrayType && operand1.array_val() == operand2.array_val(); break; + case ComValue::ObjectType: + result.boolean_ref() = operand2.type() == ComValue::ObjectType && + operand1.obj_val() == operand2.obj_val() && + operand1.class_symid() == operand2.class_symid(); + break; default: result.boolean_ref() = operand1.is_type(ComValue::UnknownType) && operand2.is_type(ComValue::UnknownType); Index: ComTerp/comterp.c diff -c ComTerp/comterp.c:1.4 ComTerp/comterp.c:1.5 *** ComTerp/comterp.c:1.4 Tue Nov 22 10:25:25 2005 --- src/ComTerp/comterp.c Mon Jun 12 07:43:02 2006 *************** *** 359,369 **** } else if (sv.is_object(Attribute::class_symid())) { push_stack(*((Attribute*)sv.obj_val())->Value()); } else if (sv.type() == ComValue::BlankType) { ! eval_expr_internals(pedepth); } else { /* everything else*/ --- 359,370 ---- } else if (sv.is_object(Attribute::class_symid())) { + push_stack(*((Attribute*)sv.obj_val())->Value()); } else if (sv.type() == ComValue::BlankType) { ! if (!stack_empty()) eval_expr_internals(pedepth); } else { /* everything else*/ *************** *** 422,429 **** stack_top(0).array_val()->nested_insert(true); } else if (stack_top(0).is_symbol()) { AttributeValue* av = lookup_symval(&stack_top(0)); ! if (av->is_array()) av->array_val()->nested_insert(true); ! } } _pfoff++; if (stack_top().type() == ComValue::CommandType && --- 423,430 ---- stack_top(0).array_val()->nested_insert(true); } else if (stack_top(0).is_symbol()) { AttributeValue* av = lookup_symval(&stack_top(0)); ! if (av && av->is_array()) av->array_val()->nested_insert(true); ! } } _pfoff++; if (stack_top().type() == ComValue::CommandType && *************** *** 754,761 **** return lookup_symval(stacktop); else return stacktop; ! } else return ComValue::blankval(); } ComValue& ComTerp::lookup_symval(ComValue& comval) { --- 755,764 ---- return lookup_symval(stacktop); else return stacktop; ! } else { ! cerr << "stack empty, blank returned\n"; return ComValue::blankval(); + } } ComValue& ComTerp::lookup_symval(ComValue& comval) { *************** *** 1061,1066 **** --- 1064,1070 ---- add_command("run", new RunFunc(this)); add_command("help", new HelpFunc(this)); + add_command("optable", new OptableFunc(this)); add_command("trace", new ComterpTraceFunc(this)); add_command("pause", new ComterpPauseFunc(this)); add_command("step", new ComterpStepFunc(this)); *************** *** 1432,1436 **** *ctss = cts_state; } ! ! --- 1436,1439 ---- *ctss = cts_state; } ! boolean ComTerp::stack_empty() { return _stack_top<0; } Index: ComTerp/comterp.h diff -c ComTerp/comterp.h:1.2 ComTerp/comterp.h:1.3 *** ComTerp/comterp.h:1.2 Tue Nov 22 10:25:25 2005 --- src/ComTerp/comterp.h Mon Jun 12 07:43:03 2006 *************** *** 137,143 **** // copy the state of an AttributeValue into a ComValue on the stack, // incrementing the reference count of any AttributeValueList, // otherwise replicating data. ! boolean stack_empty() { return _stack_top<0; } ComValue& expr_top(int n=0); // top of currently evaluating expression buffer. --- 137,143 ---- // copy the state of an AttributeValue into a ComValue on the stack, // incrementing the reference count of any AttributeValueList, // otherwise replicating data. ! boolean stack_empty(); ComValue& expr_top(int n=0); // top of currently evaluating expression buffer. Index: ComTerp/comterpserv.c diff -c ComTerp/comterpserv.c:1.3 ComTerp/comterpserv.c:1.4 *** ComTerp/comterpserv.c:1.3 Fri Oct 14 13:58:05 2005 --- src/ComTerp/comterpserv.c Mon Jun 12 07:43:03 2006 *************** *** 64,69 **** --- 64,72 ---- /* inform the parser which infunc is the oneshot infunc */ _oneshot_infunc = (infuncptr)&s_fgets; + + /* initialize shadow copy too */ + __oneshot_infunc = (infuncptr)&s_fgets; _logger_mode = 0; } Index: ComTerp/helpfunc.c diff -c ComTerp/helpfunc.c:1.1 ComTerp/helpfunc.c:1.2 *** ComTerp/helpfunc.c:1.1 Tue Jun 15 08:53:41 2004 --- src/ComTerp/helpfunc.c Mon Jun 12 07:43:03 2006 *************** *** 1,5 **** /* ! * Copyright (c) 2001 Scott E. Johnston * Copyright (c) 1998 Vectaport Inc. * * Permission to use, copy, modify, distribute, and sell this software and --- 1,5 ---- /* ! * Copyright (c) 2001,2005 Scott E. Johnston * Copyright (c) 1998 Vectaport Inc. * * Permission to use, copy, modify, distribute, and sell this software and *************** *** 243,245 **** --- 243,255 ---- } + /*****************************************************************************/ + + OptableFunc::OptableFunc(ComTerp* comterp) : ComFunc(comterp) { + } + + void OptableFunc::execute() { + reset_stack(); + opr_tbl_print(stdout, OPBY_PRIORITY); + return; + } Index: ComTerp/helpfunc.h diff -c ComTerp/helpfunc.h:1.1 ComTerp/helpfunc.h:1.2 *** ComTerp/helpfunc.h:1.1 Tue Jun 15 08:53:41 2004 --- src/ComTerp/helpfunc.h Mon Jun 12 07:43:03 2006 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2005 Scott E. Johnston * Copyright (c) 1998,1999 Vectaport Inc. * * Permission to use, copy, modify, distribute, and sell this software and *************** *** 44,49 **** --- 45,61 ---- return "%s([command] [command...] :all :posteval) -- help for commands"; } }; + //: print contents of operator table + // optable() -- print contents of operator table to stdout + class OptableFunc : public ComFunc { + public: + OptableFunc(ComTerp*); + virtual void execute(); + + virtual const char* docstring() { + return "%s() -- print contents of operator table"; } + }; + #endif /* !defined(_helpfunc_h) */ Index: ComTerp/parser.c diff -c ComTerp/parser.c:1.2 ComTerp/parser.c:1.3 *** ComTerp/parser.c:1.2 Tue Nov 22 10:25:25 2005 --- src/ComTerp/parser.c Mon Jun 12 07:43:03 2006 *************** *** 34,39 **** --- 34,41 ---- extern int _continuation_prompt_disabled; extern int _skip_shell_comments; extern infuncptr _oneshot_infunc; + extern int _detail_matched_delims; + extern int _ignore_numerics; extern int _angle_brackets; extern unsigned _token_state_save; *************** *** 97,102 **** --- 99,112 ---- if(opr_tbl_default() != 0) KANRET("error in creating and loading default operator table"); + /* initialize the backup copies of all the globals */ + __continuation_prompt = 0; + __continuation_prompt_disabled = 0; + __skip_shell_comments = 0; + __detail_matched_delims = 0; + __angle_brackets = 0; + __token_state_save = TOK_WHITESPACE; + __ignore_numerics = 0; } *************** *** 198,211 **** if (parser_client==NULL) parser_client = (void*)this; else if (parser_client != (void*)this) { if (_linenum != 0) { - parser_client = (void*)this; - _continuation_prompt = __continuation_prompt; - _continuation_prompt_disabled = __continuation_prompt_disabled; - _skip_shell_comments = __skip_shell_comments; - _oneshot_infunc = __oneshot_infunc; - _angle_brackets = __angle_brackets ; - _token_state_save = __token_state_save; expecting = _expecting; ParenStack = _ParenStack; TopOfParenStack = _TopOfParenStack; --- 208,223 ---- if (parser_client==NULL) parser_client = (void*)this; else if (parser_client != (void*)this) { + parser_client = (void*)this; + _continuation_prompt = __continuation_prompt; + _continuation_prompt_disabled = __continuation_prompt_disabled; + _skip_shell_comments = __skip_shell_comments; + _oneshot_infunc = __oneshot_infunc; + _detail_matched_delims = __detail_matched_delims; + _ignore_numerics = __ignore_numerics; + _angle_brackets = __angle_brackets ; + _token_state_save = __token_state_save; if (_linenum != 0) { expecting = _expecting; ParenStack = _ParenStack; TopOfParenStack = _TopOfParenStack; *************** *** 221,226 **** --- 233,243 ---- NextLinenum = _NextLinenum; for (int i=0; i<OPTYPE_NUM; i++) NextOp_ids[i] = _NextOp_ids[i]; + opr_tbl_ptr_set(_opr_tbl_ptr); + opr_tbl_numop_set(_opr_tbl_numop); + opr_tbl_maxop_set(_opr_tbl_maxop); + opr_tbl_maxpri_set(_opr_tbl_maxpri); + opr_tbl_lastop_set(_opr_tbl_lastop); } } } *************** *** 230,235 **** --- 247,254 ---- __continuation_prompt_disabled = _continuation_prompt_disabled; __skip_shell_comments = _skip_shell_comments; __oneshot_infunc = _oneshot_infunc; + __detail_matched_delims = _detail_matched_delims; + __ignore_numerics = _ignore_numerics; __angle_brackets = _angle_brackets ; __token_state_save = _token_state_save; _expecting = expecting; *************** *** 247,250 **** --- 266,274 ---- _NextLinenum = NextLinenum; for (int i=0; i<OPTYPE_NUM; i++) _NextOp_ids[i] = NextOp_ids[i]; + _opr_tbl_ptr = opr_tbl_ptr_get(); + _opr_tbl_numop = opr_tbl_numop_get(); + _opr_tbl_maxop = opr_tbl_maxop_get(); + _opr_tbl_maxpri = opr_tbl_maxpri_get(); + _opr_tbl_lastop = opr_tbl_lastop_get(); } Index: ComTerp/parser.h diff -c ComTerp/parser.h:1.2 ComTerp/parser.h:1.3 *** ComTerp/parser.h:1.2 Tue Nov 22 10:25:25 2005 --- src/ComTerp/parser.h Mon Jun 12 07:43:03 2006 *************** *** 76,86 **** --- 76,95 ---- int __continuation_prompt_disabled; int __skip_shell_comments; infuncptr __oneshot_infunc; + int __detail_matched_delims; + int __ignore_numerics; int __angle_brackets; unsigned __token_state_save; unsigned _expecting; /* Type of operator expected next */ + /* copy of operator table */ + void* _opr_tbl_ptr; + unsigned _opr_tbl_numop; + unsigned _opr_tbl_maxop; + unsigned _opr_tbl_maxpri; + int _opr_tbl_lastop; + paren_stack* _ParenStack; /* Stack to count args and keywords */ int _TopOfParenStack; /* Top of ParenStack */ int _SizeOfParenStack; /* Allocated size of ParenStack */ Index: ComTerp/postfunc.c diff -c ComTerp/postfunc.c:1.1 ComTerp/postfunc.c:1.2 *** ComTerp/postfunc.c:1.1 Tue Jun 15 08:53:41 2004 --- src/ComTerp/postfunc.c Mon Jun 12 07:43:03 2006 *************** *** 40,45 **** --- 40,47 ---- #define TITLE "PostFunc" + extern int _detail_matched_delims; + /*****************************************************************************/ PostFixFunc::PostFixFunc(ComTerp* comterp) : ComFunc(comterp) { *************** *** 66,79 **** ComValue argoff(comterp()->stack_top()); int topptr = argoff.int_val()-(comterp()->pfnum()-1); ! for (int i=topptr-numargs; i<=topptr; i++) { ComValue& val = comterp()->expr_top(i); val.comterp(comterp()); out << val; ! if (val.is_type(AttributeValue::CommandType)) { ! out << "[" << val.narg() << "|" << val.nkey() << "]"; ! ComFunc* func = (ComFunc*)val.obj_val(); ! if (func->post_eval()) out << "*"; } else if (val.is_type(AttributeValue::SymbolType) && (val.narg() || val.nkey())) --- 68,94 ---- ComValue argoff(comterp()->stack_top()); int topptr = argoff.int_val()-(comterp()->pfnum()-1); ! for (int i=topptr-numargs; i<=topptr-1; i++) { ComValue& val = comterp()->expr_top(i); val.comterp(comterp()); out << val; ! if (val.is_type(AttributeValue::CommandType) || ! (_detail_matched_delims && val.is_type(AttributeValue::SymbolType) && ! val.nids() >= TOK_RPAREN )) { ! if (!_detail_matched_delims) { ! out << "[" << val.narg() << "|" << val.nkey() << "]"; ! ComFunc* func = (ComFunc*)val.obj_val(); ! if (func->post_eval()) out << "*"; ! } else { ! char ldelim, rdelim; ! if (val.nids()==TOK_RPAREN) {ldelim = '('; rdelim = ')'; } ! else if (val.nids()==TOK_RBRACKET) {ldelim = '['; rdelim = ']'; } ! else if (val.nids()==TOK_RBRACE) {ldelim = '{'; rdelim = '}'; } ! else if (val.nids()==TOK_RANGBRACK) {ldelim = '<'; rdelim = '>'; } ! else {ldelim = ':'; rdelim = 0x0;}; ! out << ldelim << val.narg(); ! if (rdelim) out << rdelim; ! } } else if (val.is_type(AttributeValue::SymbolType) && (val.narg() || val.nkey())) *************** *** 200,207 **** } void SeqFunc::execute() { ! ComValue arg1(stack_arg_post_eval(0)); ! ComValue arg2(stack_arg_post_eval(1)); reset_stack(); push_stack(arg2); } --- 215,222 ---- } void SeqFunc::execute() { ! ComValue arg1(stack_arg_post_eval(0, true)); ! ComValue arg2(stack_arg_post_eval(1, true)); reset_stack(); push_stack(arg2); } Index: comterp_/README diff -c comterp_/README:1.1 comterp_/README:1.2 *** comterp_/README:1.1 Tue Jun 15 08:53:46 2004 --- src/comterp_/README Mon Jun 12 07:43:05 2006 *************** *** 215,220 **** --- 215,222 ---- help(cmdname [cmdname ...] :all :posteval) -- help for commands + optable() -- print contents of operator table + val=trace([flag] :get) -- toggle or set trace mode [str]=print(fmtstr val :string|:str :err) -- print value with format string Index: ComUtil/_lexscan.c diff -c ComUtil/_lexscan.c:1.3 ComUtil/_lexscan.c:1.4 *** ComUtil/_lexscan.c:1.3 Tue Nov 22 10:25:21 2005 --- src/ComUtil/_lexscan.c Mon Jun 12 07:42:59 2006 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2005 Scott E. Johnston * Copyright (c) 2000 IET Inc. * Copyright (c) 1993-1995 Vectaport Inc. * Copyright (c) 1989 Triple Vision, Inc. *************** *** 44,49 **** --- 45,51 ---- extern int _continuation_prompt_disabled; unsigned _token_state_save = TOK_WHITESPACE; /* variable to save token state between calls */ + int _ignore_numerics = 0; /* MACROS */ *************** *** 363,369 **** } /* Start of identifier */ ! else if( isident( CURR_CHAR )) { token_state = TOK_IDENTIFIER; TOKEN_ADD( CURR_CHAR ); } --- 365,371 ---- } /* Start of identifier */ ! else if( isident( CURR_CHAR ) || (_ignore_numerics && isdigit( CURR_CHAR))) { token_state = TOK_IDENTIFIER; TOKEN_ADD( CURR_CHAR ); } Index: ComUtil/_parser.c diff -c ComUtil/_parser.c:1.4 ComUtil/_parser.c:1.5 *** ComUtil/_parser.c:1.4 Tue Nov 22 10:25:22 2005 --- src/ComUtil/_parser.c Mon Jun 12 07:42:59 2006 *************** *** 42,48 **** int _continuation_prompt; int _continuation_prompt_disabled = 0; int _skip_shell_comments = 0; ! infuncptr _oneshot_infunc; static int get_next_token(void *infile, char *(*infunc)(), int (*eoffunc)(), int (*errfunc)(), FILE *outfile, int (*outfunc)(), --- 42,49 ---- int _continuation_prompt; int _continuation_prompt_disabled = 0; int _skip_shell_comments = 0; ! infuncptr _oneshot_infunc = NULL; ! int _detail_matched_delims = 0; static int get_next_token(void *infile, char *(*infunc)(), int (*eoffunc)(), int (*errfunc)(), FILE *outfile, int (*outfunc)(), *************** *** 180,186 **** (toktype == TOK_LPAREN || toktype == TOK_LBRACKET || toktype == TOK_LBRACE || toktype == TOK_LANGBRACK) #define RIGHT_PAREN( toktype ) \ ! (toktype == TOK_RPAREN || toktype == TOK_RBRACKET || toktype == TOK_RBRACE || toktype == TOK_LANGBRACK) #define PROCEEDING_WHITESPACE( tokstart ) \ (tokstart == 0 || isspace( buffer[tokstart-1] )) --- 181,187 ---- (toktype == TOK_LPAREN || toktype == TOK_LBRACKET || toktype == TOK_LBRACE || toktype == TOK_LANGBRACK) #define RIGHT_PAREN( toktype ) \ ! (toktype == TOK_RPAREN || toktype == TOK_RBRACKET || toktype == TOK_RBRACE || toktype == TOK_RANGBRACK) #define PROCEEDING_WHITESPACE( tokstart ) \ (tokstart == 0 || isspace( buffer[tokstart-1] )) *************** *** 190,196 **** #define UNEXPECTED_NEW_EXPRESSION \ (TopOfParenStack >= 0 && \ ! (ParenStack[ TopOfParenStack ].comm_id < 0 || \ ParenStack[ TopOfParenStack ].nkey > 0 )) --- 191,197 ---- #define UNEXPECTED_NEW_EXPRESSION \ (TopOfParenStack >= 0 && \ ! ((ParenStack[ TopOfParenStack ].comm_id < 0 && !_detail_matched_delims) || \ ParenStack[ TopOfParenStack ].nkey > 0 )) *************** *** 205,210 **** --- 206,215 ---- #define AMBIGUITY( op_ids )\ (UNARY_AMBIGUITY(op_ids)||BINARY_AMBIGUITY(op_ids)) + static int parens_symid = -1; + static int brackets_symid = -1; + static int braces_symid = -1; + static int angbracks_symid = -1; /* === Static functions ================================================== */ *************** *** 847,853 **** /* separation between free format parameters */ if( expecting == OPTYPE_BINARY ) { ! if( !PROCEEDING_WHITESPACE( tokstart ) || UNEXPECTED_NEW_EXPRESSION ) { COMERR_SET2( ERR_UNEXPECTED_IDENTIFIER, *linenum, symbol_pntr( *(int *)token ) ); --- 852,858 ---- /* separation between free format parameters */ if( expecting == OPTYPE_BINARY ) { ! if( !PROCEEDING_WHITESPACE( tokstart ) && !_detail_matched_delims || UNEXPECTED_NEW_EXPRESSION ) { COMERR_SET2( ERR_UNEXPECTED_IDENTIFIER, *linenum, symbol_pntr( *(int *)token ) ); *************** *** 974,980 **** /* If next token type is KEY or right_paren just output this keyword */ /* because it has no argument. Otherwise place this one on the stack */ ! /* Note that this means that a Keyword on the stack implies theat it */ /* has an argument. */ LOOK_AHEAD; if ( (NextToktype == TOK_KEYWORD) || --- 979,985 ---- /* If next token type is KEY or right_paren just output this keyword */ /* because it has no argument. Otherwise place this one on the stack */ ! /* Note that this means that a Keyword on the stack implies that it */ /* has an argument. */ LOOK_AHEAD; if ( (NextToktype == TOK_KEYWORD) || *************** *** 994,1008 **** /*-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-*/ /*-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-*/ /*-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-*/ case TOK_LPAREN: case TOK_LBRACKET: case TOK_LBRACE: /* Expecting a binary is either an error, or an indicator of */ /* separation between free format parameters */ if( expecting == OPTYPE_BINARY ) { ! if( !PROCEEDING_WHITESPACE( tokstart ) || UNEXPECTED_NEW_EXPRESSION ) { UNEXPECTED_LPAREN_ERROR( toktype ); } --- 999,1015 ---- /*-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-LPAREN-*/ /*-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-LBRACKET-*/ /*-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-LBRACE-*/ + /*-LANGBRACK-LANGBRACK-LANGBRACK-LANGBRACK-LANGBRACK-LANGBRACK-LANGBRACK-*/ case TOK_LPAREN: case TOK_LBRACKET: case TOK_LBRACE: + case TOK_LANGBRACK: /* Expecting a binary is either an error, or an indicator of */ /* separation between free format parameters */ if( expecting == OPTYPE_BINARY ) { ! if( (!PROCEEDING_WHITESPACE( tokstart ) && !_detail_matched_delims) || UNEXPECTED_NEW_EXPRESSION ) { UNEXPECTED_LPAREN_ERROR( toktype ); } *************** *** 1031,1040 **** --- 1038,1049 ---- /*-RPAREN-RPAREN-RPAREN-RPAREN-RPAREN-RPAREN-RPAREN-RPAREN-RPAREN-RPAREN-*/ /*-RBRACKET-RBRACKET-RBRACKET-RBRACKET-RBRACKET-RBRACKET-RBRACKET-RBRACKET-*/ /*-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-RBRACE-*/ + /*-RANGBRACK-RANGBRACK-RANGBRACK-RANGBRACK-RANGBRACK-RANGBRACK-RANGBRACK-*/ case TOK_RPAREN: case TOK_RBRACKET: case TOK_RBRACE: + case TOK_RANGBRACK: /* Parenthesis integrity checking */ if( TopOfParenStack < 0 || *************** *** 1052,1058 **** ParenStack[TopOfParenStack].paren_type != TOK_LBRACKET || toktype == TOK_RBRACE && ! ParenStack[TopOfParenStack].paren_type != TOK_LBRACE ) { UNEXPECTED_RPAREN_ERROR(toktype); } --- 1061,1070 ---- ParenStack[TopOfParenStack].paren_type != TOK_LBRACKET || toktype == TOK_RBRACE && ! ParenStack[TopOfParenStack].paren_type != TOK_LBRACE || ! ! toktype == TOK_RANGBRACK && ! ParenStack[TopOfParenStack].paren_type != TOK_LANGBRACK ) { UNEXPECTED_RPAREN_ERROR(toktype); } *************** *** 1084,1090 **** /* If this parenthesis corresponds to a command, set up the */ /* the number of embedded arguments and keywords, and output */ ! if( ParenStack[TopOfParenStack].comm_id >= 0 ) { if( expecting == OPTYPE_BINARY) { --- 1096,1102 ---- /* If this parenthesis corresponds to a command, set up the */ /* the number of embedded arguments and keywords, and output */ ! if( ParenStack[TopOfParenStack].comm_id >= 0 || _detail_matched_delims) { if( expecting == OPTYPE_BINARY) { *************** *** 1102,1113 **** for (i = 0; i < lp; i++) { ! PFOUT( TOK_COMMAND, ! ParenStack[TopOfParenStack].comm_id, ! ParenStack[TopOfParenStack].narg, ! ParenStack[TopOfParenStack].nkey, ! ParenStack[TopOfParenStack].nids ); ! --TopOfParenStack; } } else --- 1114,1146 ---- for (i = 0; i < lp; i++) { ! if (!_detail_matched_delims) { ! PFOUT( TOK_COMMAND, ! ParenStack[TopOfParenStack].comm_id, ! ParenStack[TopOfParenStack].narg, ! ParenStack[TopOfParenStack].nkey, ! ParenStack[TopOfParenStack].nids ); ! } else { ! if (parens_symid==-1) { ! parens_symid = symbol_add("parens"); ! brackets_symid = symbol_add("brackets"); ! braces_symid = symbol_add("braces"); ! angbracks_symid = symbol_add("angbracks"); ! } ! int commandid = ParenStack[TopOfParenStack].comm_id; ! if (commandid<0) { ! if (toktype==TOK_RPAREN) commandid = parens_symid; ! else if (toktype==TOK_RBRACKET) commandid = brackets_symid; ! else if (toktype==TOK_RBRACE) commandid = braces_symid; ! else commandid = angbracks_symid; ! } ! PFOUT( TOK_COMMAND, ! commandid, ! ParenStack[TopOfParenStack].narg, ! ParenStack[TopOfParenStack].nkey, ! toktype ); ! } ! --TopOfParenStack; } } else Index: ComUtil/optable.c diff -c ComUtil/optable.c:1.2 ComUtil/optable.c:1.3 *** ComUtil/optable.c:1.2 Fri Oct 14 13:58:03 2005 --- src/ComUtil/optable.c Mon Jun 12 07:43:00 2006 *************** *** 65,70 **** --- 65,78 ---- /* Minimum can always be considered zero */ static int last_operid = -1; + /* variables for preserving default table once created */ + static opr_tbl_is_default = 0; + static opr_tbl_entry* opr_tbl_default_table = NULL; + static unsigned opr_tbl_default_numop; + static unsigned opr_tbl_default_maxop; + static unsigned opr_tbl_default_maxpri; + static int opr_tbl_default_lastop; + void* opr_tbl_ptr_get() { return (void*)OperatorTable; } void opr_tbl_ptr_set(void* ptr) { OperatorTable = ptr; } unsigned opr_tbl_numop_get() { return NumOperators; } *************** *** 186,191 **** --- 194,201 ---- NumOperators = 0; MaxOperators = maxop; MaxPriority = 0; + last_operid = -1; + opr_tbl_is_default = 0; return FUNCOK; *************** *** 961,969 **** sizeof( struct _opr_tbl_default_entry ); int index; ! if (OperatorTable) return 0; /* Initalize table to the right size */ if( opr_tbl_create( table_size ) != 0 ) KAPUT( "Unable to create default operator table" ); --- 971,991 ---- sizeof( struct _opr_tbl_default_entry ); int index; ! if (OperatorTable && opr_tbl_is_default) return 0; + /* restore from saved pointers if previously constructed */ + if (opr_tbl_default_table) { + opr_tbl_ptr_set(opr_tbl_default_table); + opr_tbl_numop_set(opr_tbl_default_numop); + opr_tbl_maxop_set(opr_tbl_default_maxop); + opr_tbl_maxpri_set(opr_tbl_default_maxpri); + opr_tbl_lastop_set(opr_tbl_default_lastop); + return 0; + } + + OperatorTable = NULL; + /* Initalize table to the right size */ if( opr_tbl_create( table_size ) != 0 ) KAPUT( "Unable to create default operator table" ); *************** *** 976,981 **** --- 998,1009 ---- DefaultOperatorTable[index].rtol, DefaultOperatorTable[index].optype ) != 0 ) KAPUT1( "Unable to add the %d entry to the default operator table", index ); + opr_tbl_is_default = 1; + opr_tbl_default_table = opr_tbl_ptr_get(); + opr_tbl_default_numop = opr_tbl_numop_get(); + opr_tbl_default_maxop = opr_tbl_maxop_get(); + opr_tbl_default_maxpri = opr_tbl_maxpri_get(); + opr_tbl_default_lastop = opr_tbl_lastop_get(); return 0; Index: FrameUnidraw/framecmds.h diff -c FrameUnidraw/framecmds.h:1.1 FrameUnidraw/framecmds.h:1.2 *** FrameUnidraw/framecmds.h:1.1 Tue Jun 15 08:56:36 2004 --- src/FrameUnidraw/framecmds.h Mon Jun 12 07:43:21 2006 *************** *** 125,131 **** static MoveFrameCmd* default_instance() { return _default; } // return a default instance of the MoveFrameCmd. ! static void MoveFrameCmd::default_instance(MoveFrameCmd* cmd) { _default = cmd; } // set a default instance of the MoveFrameCmd. --- 125,131 ---- static MoveFrameCmd* default_instance() { return _default; } // return a default instance of the MoveFrameCmd. ! static void default_instance(MoveFrameCmd* cmd) { _default = cmd; } // set a default instance of the MoveFrameCmd. *************** *** 315,321 **** virtual boolean Reversible(); static AutoNewFrameCmd* default_instance() { return _default; } ! static void AutoNewFrameCmd::default_instance(AutoNewFrameCmd* cmd) { _default = cmd; } protected: --- 315,321 ---- virtual boolean Reversible(); static AutoNewFrameCmd* default_instance() { return _default; } ! static void default_instance(AutoNewFrameCmd* cmd) { _default = cmd; } protected: Index: GraphUnidraw/edgecomp.c diff -c GraphUnidraw/edgecomp.c:1.1 GraphUnidraw/edgecomp.c:1.2 *** GraphUnidraw/edgecomp.c:1.1 Tue Jun 15 08:56:42 2004 --- src/GraphUnidraw/edgecomp.c Mon Jun 12 07:43:22 2006 *************** *** 101,106 **** --- 101,110 ---- _valid = GetParamList()->read_args(in, this); } + EdgeComp::EdgeComp(OverlayComp* parent) : OverlayComp(nil, parent) { + _edge = new TopoEdge(this); + } + EdgeComp::~EdgeComp() { delete _edge; } Index: GraphUnidraw/edgecomp.h diff -c GraphUnidraw/edgecomp.h:1.1 GraphUnidraw/edgecomp.h:1.2 *** GraphUnidraw/edgecomp.h:1.1 Tue Jun 15 08:56:42 2004 --- src/GraphUnidraw/edgecomp.h Mon Jun 12 07:43:22 2006 *************** *** 54,59 **** --- 54,61 ---- EdgeComp(istream&, OverlayComp* parent = nil); // construct edge component from istream, relying on GraphCatalog // to re-establish connections between edges and nodes. + EdgeComp(OverlayComp* parent = nil); + // construct edge component but defer anything graphical virtual ~EdgeComp(); virtual Component* Copy(); Index: GraphUnidraw/nodecomp.c diff -c GraphUnidraw/nodecomp.c:1.2 GraphUnidraw/nodecomp.c:1.3 *** GraphUnidraw/nodecomp.c:1.2 Fri Sep 9 10:58:54 2005 --- src/GraphUnidraw/nodecomp.c Mon Jun 12 07:43:23 2006 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2006 Scott E. Johnston * Copyright (c) 1994-1996, 1999 Vectaport Inc. * * Permission to use, copy, modify, distribute, and sell this software and *************** *** 184,190 **** NodeComp::NodeComp(OverlayComp* parent) : OverlayComp(nil, parent) { _graph = nil; ! _node = nil; } NodeComp::NodeComp(istream& in, OverlayComp* parent) : OverlayComp(nil, parent) { --- 185,191 ---- NodeComp::NodeComp(OverlayComp* parent) : OverlayComp(nil, parent) { _graph = nil; ! _node = new TopoNode(this); } NodeComp::NodeComp(istream& in, OverlayComp* parent) : OverlayComp(nil, parent) { Index: GraphUnidraw/nodecomp.h diff -c GraphUnidraw/nodecomp.h:1.1 GraphUnidraw/nodecomp.h:1.2 *** GraphUnidraw/nodecomp.h:1.1 Tue Jun 15 08:56:43 2004 --- src/GraphUnidraw/nodecomp.h Mon Jun 12 07:43:23 2006 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2006 Scott E. Johnston * Copyright (c) 1994,1999 Vectaport Inc. * * Permission to use, copy, modify, distribute, and sell this software and *************** *** 66,71 **** --- 67,74 ---- NodeComp(istream&, OverlayComp* parent = nil); // construct node component from istream, relying on GraphCatalog // to re-establish connections between edges and nodes. + NodeComp(OverlayComp* parent = nil); + // construct node component but defer anything graphical virtual ~NodeComp(); void SetGraph(GraphComp*); *************** *** 127,133 **** virtual boolean operator == (OverlayComp&); protected: - NodeComp(OverlayComp* parent = nil); GraphComp* _graph; TopoNode* _node; --- 130,135 ---- Index: include_unidraw/path.h diff -c include_unidraw/path.h:1.1 include_unidraw/path.h:1.2 *** include_unidraw/path.h:1.1 Tue Jun 15 08:57:36 2004 --- src/include/Unidraw/path.h Mon Jun 12 07:43:27 2006 *************** *** 38,44 **** class Connector; class UList; ! //: transmission path for state variable propogation // accumulates information about the transmission path during // state variable propagation. // <p><a href=../man3.1/Path.html>man page</a> --- 38,44 ---- class Connector; class UList; ! //: transmission path for state variable propagation // accumulates information about the transmission path during // state variable propagation. // <p><a href=../man3.1/Path.html>man page</a> Index: OverlayUnidraw/ovcmds.h diff -c OverlayUnidraw/ovcmds.h:1.1 OverlayUnidraw/ovcmds.h:1.2 *** OverlayUnidraw/ovcmds.h:1.1 Tue Jun 15 08:56:19 2004 --- src/OverlayUnidraw/ovcmds.h Mon Jun 12 07:43:18 2006 *************** *** 259,265 **** static OvNewViewCmd* default_instance() { return _default; } // return default instance of this command. ! static void OvNewViewCmd::default_instance(OvNewViewCmd* cmd) { _default = cmd; } // set default instance of this command. --- 259,265 ---- static OvNewViewCmd* default_instance() { return _default; } // return default instance of this command. ! static void default_instance(OvNewViewCmd* cmd) { _default = cmd; } // set default instance of this command. Index: OverlayUnidraw/ovcomps.h diff -c OverlayUnidraw/ovcomps.h:1.1 OverlayUnidraw/ovcomps.h:1.2 *** OverlayUnidraw/ovcomps.h:1.1 Tue Jun 15 08:56:19 2004 --- src/OverlayUnidraw/ovcomps.h Mon Jun 12 07:43:18 2006 *************** *** 52,58 **** //: derived GraphicComp // derived GraphicComp with extensions for property lists of arbitrary ! // AttributeValue objects, event propogation inherited from Observer and // Observable, and new persistence mechanisms (serialization) derived from // ExternView (OverlayScript). class OverlayComp : public GraphicComp, public Observer, public Observable { --- 52,58 ---- //: derived GraphicComp // derived GraphicComp with extensions for property lists of arbitrary ! // AttributeValue objects, event propagation inherited from Observer and // Observable, and new persistence mechanisms (serialization) derived from // ExternView (OverlayScript). class OverlayComp : public GraphicComp, public Observer, public Observable { Index: src_interviews/style.c diff -c src_interviews/style.c:1.1 src_interviews/style.c:1.2 *** src_interviews/style.c:1.1 Tue Jun 15 08:53:55 2004 --- src/InterViews/style.c Mon Jun 12 07:43:06 2006 *************** *** 118,124 **** const UniqueString& name, const StyleAttributeTableEntry&, const StyleList&, long s_index, String& value ); ! int StyleRep::finish_match( const StyleList&, long s_index, const UniqueStringList&, long p_index ); }; --- 118,124 ---- const UniqueString& name, const StyleAttributeTableEntry&, const StyleList&, long s_index, String& value ); ! int finish_match( const StyleList&, long s_index, const UniqueStringList&, long p_index ); }; Index: src_tiff/tiffcompat.h diff -c src_tiff/tiffcompat.h:1.2 src_tiff/tiffcompat.h:1.3 *** src_tiff/tiffcompat.h:1.2 Fri Oct 7 11:09:57 2005 --- src/TIFF/tiffcompat.h Mon Jun 12 07:43:08 2006 *************** *** 177,188 **** #if defined(MSDOS) #include <malloc.h> #else /* !MSDOS */ - #if defined(_IBMR2) #include <stdlib.h> - #else /* !_IBMR2 */ - extern char *malloc(); - extern char *realloc(); - #endif /* _IBMR2 */ #endif /* !MSDOS */ #endif /* !__MACH__ */ --- 177,183 ---- Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.4 top_ivtools/INSTALL:1.5 *** top_ivtools/INSTALL:1.4 Fri Oct 7 11:09:51 2005 --- ./INSTALL Mon Jun 12 07:42:57 2006 *************** *** 58,64 **** 0.e. If you want to use the polygon intersection tools, acquire and build clippoly, a LGPLed library for polygon clipping from: ! http://www.ph.tn.tudelft.nl/People/klamer/clippoly_entry.html Add -fPIC to the CCFLAGS in the Makefile, then do a make, then build a shared library in the clippoly directory with: "gcc -shared -o --- 58,64 ---- 0.e. If you want to use the polygon intersection tools, acquire and build clippoly, a LGPLed library for polygon clipping from: ! http://clippoly.sourceforge.net Add -fPIC to the CCFLAGS in the Makefile, then do a make, then build a shared library in the clippoly directory with: "gcc -shared -o *** /dev/null Mon Jun 12 07:43:32 PDT 2006 --- patches/ivtools-060612-johnston-015 *************** patches/ivtools-060612-johnston-015 *** 0 **** --- 1 ---- + ivtools-060612-johnston-015 --Apple-Mail-6--970777992 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=ivtools-060720-johnston-016 Content-Disposition: attachment; filename=ivtools-060720-johnston-016 Patch: ivtools-060720-johnston-016 For: ivtools-1.2.3 Author: [email protected] Subject: Requires: This is an intermediate patch to ivtools-1.2.3. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: bringing it up to 1.2.4 Index: config_ivtools/params.def diff -c config_ivtools/params.def:1.7 config_ivtools/params.def:1.8 *** config_ivtools/params.def:1.7 Fri Oct 14 13:58:23 2005 --- config/params.def Thu Jul 20 13:56:59 2006 *************** *** 27,33 **** * Name of the software release */ #ifndef Release ! #define Release ivtools-1.2.3 #endif RELEASE = Release --- 27,33 ---- * Name of the software release */ #ifndef Release ! #define Release ivtools-1.2.4 #endif RELEASE = Release *************** *** 36,42 **** * VersionNumber */ #ifndef Version ! #define Version 1.2.3 #endif VERSION = Version --- 36,42 ---- * VersionNumber */ #ifndef Version ! #define Version 1.2.4 #endif VERSION = Version Index: include_std/version.h diff -c include_std/version.h:1.4 include_std/version.h:1.5 *** include_std/version.h:1.4 Fri Oct 7 11:10:16 2005 --- src/include/ivstd/version.h Thu Jul 20 13:56:55 2006 *************** *** 1,3 **** ! #define IvtoolsVersion 1.2.3 ! #define VersionString "1.2.3" ! #define ReleaseString "ivtools-1.2.3" --- 1,3 ---- ! #define IvtoolsVersion 1.2.4 ! #define VersionString "1.2.4" ! #define ReleaseString "ivtools-1.2.4" Index: top_ivtools/CHANGES diff -c top_ivtools/CHANGES:1.4 top_ivtools/CHANGES:1.5 *** top_ivtools/CHANGES:1.4 Fri Oct 7 11:09:51 2005 --- ./CHANGES Thu Jul 20 13:56:31 2006 *************** *** 1,3 **** --- 1,11 ---- + July 20th, 2006 ivtools-1.2.4 + + - changes for compiling with gcc-4.0 + + - changes to socket-driven (ACE) use of comterp to support multi-line commands + + - changes to allow re-use of scanner/parser with multiple operator tables + October 7th, 2005 ivtools-1.2.3 - add support for an external libtiff with a --with-tiff (and Index: top_ivtools/INSTALL diff -c top_ivtools/INSTALL:1.5 top_ivtools/INSTALL:1.6 *** top_ivtools/INSTALL:1.5 Mon Jun 12 07:42:57 2006 --- ./INSTALL Thu Jul 20 13:56:31 2006 *************** *** 1,7 **** INSTALL for ivtools-1.2 ! Instructions for building ivtools-1.2.3 from source, the short version: ./configure make --- 1,7 ---- INSTALL for ivtools-1.2 ! Instructions for building ivtools-1.2.4 from source, the short version: ./configure make *************** *** 10,16 **** And if that doesn't work... ! Instructions for building ivtools-1.2.3 from source, the long version: 0. Compilation Environment --- 10,16 ---- And if that doesn't work... ! Instructions for building ivtools-1.2.4 from source, the long version: 0. Compilation Environment Index: top_ivtools/README diff -c top_ivtools/README:1.4 top_ivtools/README:1.5 *** top_ivtools/README:1.4 Fri Oct 7 11:09:51 2005 --- ./README Thu Jul 20 13:56:31 2006 *************** *** 2,8 **** README for ivtools 1.2 ! This directory contains a release of ivtools 1.2.3. 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.4. 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 Fri Oct 7 11:09:51 2005 --- ./VERSION Thu Jul 20 13:56:31 2006 *************** *** 1 **** ! Release 1.2.3 --- 1 ---- ! Release 1.2.4 *** /dev/null Thu Jul 20 13:57:01 PDT 2006 --- patches/ivtools-060720-johnston-016 *************** patches/ivtools-060720-johnston-016 *** 0 **** --- 1 ---- + ivtools-060720-johnston-016 --Apple-Mail-6--970777992 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --Apple-Mail-6--970777992 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-6--970777992--