From: Mark O'D. <mar...@lu...> - 2000-08-29 13:00:37
|
Ok I've fixed the ones below as we all agreed. Have a quick look, remember that It's been 6 years since I seriously did some C, Java/C++ - well that's another story. Like I said, no test suite, (yet) so peer review here counts for a lot. Cheers Mark Ann Harrison wrote: > At 05:24 PM 8/26/00 +1000, Mark O'Donohue wrote: > > > >In burp/backup.e > > > >The following code occurs in two places: > > > > STUFF (name_len); > > for (; c = *name++, name_len--; name_len) > > STUFF (c); > > > >Obvioulsy the ; name_len) does nothing. > > > Changed to: STUFF (name_len); while(name_len--) { c = *name++; STUFF (c); } > > My preference, when a for loop degenerates to its exit > condition is to change loop types. > > >In burp/burp.c > > > > for (p = redirect, string = OUTPUT_SUPPRESS, > >tdgbl->sw_redirect = NOOUTPUT; c = *p++; *string) > > { > > if (UPPER (c) != *string++) > > { > > tdgbl->sw_redirect = TRUE; > > break; > > } > > } > > > > > >Changed to: > p = redirect; string = OUTPUT_SUPPRESS; tdgbl->sw_redirect = NOOUTPUT; while (c = *p++) { if (UPPER (c) != *string++) { tdgbl->sw_redirect = TRUE; break; } } > > >In dudley/parse.c > > > >static FUNCARG parse_function_arg ( > > FUNC function, > > USHORT *position) > >{ > >... > > > >KEYWORD (KW_BY); > >LEX_token(); > > The lexeme "by" is used in the GDL (groton data language) in > two ways: a column can be COMPUTED [BY] an expression and a > function parameter can be passed [BY] {VALUE | REFERENCE ...} > > The wrong macro is used here. It should be MATCH (KW_BY) which > is the way to skip a noise word. > Done. > > >In isql/isql.e > > > >void ISQL_warning ( STATUS *status) { > >... > > status[2] == gds_arg_end; > >Changed to: > > status[2] = gds_arg_end; > > Exactly. > > >In qli/meta.e > > > >The statement > >length; > >doesn't add a lot of value in the function make_symbol > |