--- ./src/frontend/measure.c 2009-08-30 12:56:50.000000000 +0200 +++ measure.c 2009-12-05 20:22:20.000000000 +0100 @@ -99,12 +99,12 @@ /*global variable measures_passed out: set to FALSE if .meas syntax is violated (used with autostop)*/ ) { - struct line *meas_card, *meas_results = NULL, *end = NULL, *newcard; + struct line *meas_card, *meas_results = NULL, *end = NULL, *newcard, *morenewcard; char *line, *an_name, *an_type, *resname, *meastype, *str_ptr, out_line[1000]; int idx = 0, ok = 0; int fail; double result = 0; - bool first_time = TRUE; + bool first_time = TRUE, paramval = FALSE; wordlist *measure_word_list ; int precision = measure_get_precision() ; @@ -158,6 +158,9 @@ /* skip param|expr measurement types for now -- will be done after other measurements */ if ( strncmp( meastype, "param", 5 ) == 0 || strncmp( meastype, "expr", 4 ) == 0 ) continue; + /* if parameter follows val, then skip evaluation for now */ + if (strstr(line, "val") && strstr(line, "10000")) continue; + /* skip .meas line, if analysis type from line and name of analysis performed differ */ if ( strcmp( an_name, an_type ) != 0 ) { txfree(an_type); txfree(resname); txfree(meastype); @@ -234,15 +237,59 @@ if ( strncmp( meastype, "param", 5 ) != 0 && strncmp( meastype, "expr", 4 ) != 0 ) { - if ( just_chk_meas != TRUE ) fprintf( stdout, "%s", newcard->li_line ); - end = newcard; - newcard = newcard->li_next; - - txfree( end->li_line ); - txfree( end ); - - txfree(an_type); txfree(resname); txfree(meastype); - continue; + /* if parameter follows val, then skip evaluation for now */ + if (strstr(line, "val") && strstr(line, "10000")) { + if ( just_chk_meas != TRUE ) { + ok = nupa_eval( meas_card->li_line, meas_card->li_linenum ); + /* New way of processing measure statements using common code + in fcn get_measure2() (com_measure2.c)*/ + out_line[0] = EOS ; + measure_word_list = measure_parse_line( meas_card->li_line) ; + if( measure_word_list ){ + fail = get_measure2(measure_word_list,&result,out_line,chk_only) ; + if( fail ){ + measure_valid[idx++] = FALSE; + measures_passed = FALSE; + } else { + nupa_add_param( resname, result ); + measure_valid[idx++] = TRUE; + } + wl_free( measure_word_list ) ; + } else { + measure_valid[idx++] = FALSE; + measures_passed = FALSE; + } +/* fprintf( stdout, "%-20s=", resname ); + fprintf( stdout, " %.*e\n", precision, result ); + fprintf( stdout, "\n" ); */ + + morenewcard = alloc(struct line); + morenewcard->li_line = strdup(out_line); + morenewcard->li_next = NULL; + fprintf( stdout, "%s", morenewcard->li_line ); + if ( meas_results == NULL ) meas_results = end = newcard; + else { + end->li_next = morenewcard; + end = morenewcard; + } + + txfree(an_type); txfree(resname); txfree(meastype); + + } + + } else { + + if ( just_chk_meas != TRUE ) fprintf( stdout, "%s", newcard->li_line ); + end = newcard; + newcard = newcard->li_next; + + txfree( end->li_line ); + txfree( end ); + + txfree(an_type); txfree(resname); txfree(meastype); + continue; + } + continue; } if ( just_chk_meas != TRUE ) fprintf( stdout, "%-20s=", resname );