diff --git a/ChangeLog b/ChangeLog index 794dbbbce..37811e95a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-10-09 Robert Larice + * src/frontend/measure.c , + * src/frontend/numparam/mystring.c , + * src/include/dstring.h , + * src/misc/dstring.c : + remove #define for EOS use '\0' instead + 2010-10-09 Robert Larice * src/frontend/terminal.c , * src/include/complex.h , diff --git a/src/frontend/measure.c b/src/frontend/measure.c index 3db54945e..5e0b549af 100644 --- a/src/frontend/measure.c +++ b/src/frontend/measure.c @@ -21,8 +21,6 @@ #include "error.h" /* controlled_exit() */ -#define EOS '\0' - static wordlist *measure_parse_line( char *line ) ; static bool measure_valid[20000];/* TRUE: if measurement no. [xxx] has been done successfully @@ -264,7 +262,7 @@ do_measure( /* New way of processing measure statements using common code in fcn get_measure2() (com_measure2.c)*/ - out_line[0] = EOS ; + out_line[0] = '\0' ; 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) ; diff --git a/src/frontend/numparam/mystring.c b/src/frontend/numparam/mystring.c index 8e1c839e0..cbcde7dd6 100644 --- a/src/frontend/numparam/mystring.c +++ b/src/frontend/numparam/mystring.c @@ -22,8 +22,6 @@ #include "../error.h" /* controlled_exit() */ -#define EOS '\0' - /***** primitive input-output ***/ int @@ -347,7 +345,7 @@ pscopy (SPICE_DSTRINGPTR dstr_p, char *t, int start, int leng) s_p = spice_dstring_value(dstr_p) ; for (i = 0; i < leng; i++) s_p[i] = t[start + i]; - s_p[leng] = EOS ; + s_p[leng] = '\0' ; } else { s_p = spice_dstring_reinit(dstr_p) ; } @@ -373,7 +371,7 @@ pscopy_up (SPICE_DSTRINGPTR dstr_p, char *t, int start, int leng) s_p = spice_dstring_value(dstr_p) ; for (i = 0; i < leng; i++) s_p[i] = upcase ( t[start + i] ) ; - s_p[leng] = EOS ; + s_p[leng] = '\0' ; } else { s_p = spice_dstring_reinit(dstr_p) ; } diff --git a/src/include/dstring.h b/src/include/dstring.h index bea92ebfe..5e37d852a 100644 --- a/src/include/dstring.h +++ b/src/include/dstring.h @@ -3,7 +3,6 @@ #ifndef DSTRING_H #define DSTRING_H -#define EOS '\0' /* ----------------------------------------------------------------- * This structure is modified from Tcl. We do this to avoid a * conflict and later add a conditional compile to just use the Tcl diff --git a/src/misc/dstring.c b/src/misc/dstring.c index 39fac66c0..7ebf34972 100644 --- a/src/misc/dstring.c +++ b/src/misc/dstring.c @@ -4,7 +4,10 @@ DESCRIPTION:This file contains the routines for manipulating dynamic strings. CONTENTS: DATE: Wed Mar 24 18:38:28 CDT 2010 REVISIONS: $Log$ -REVISIONS: Revision 1.2 2010-07-01 19:52:26 rlar +REVISIONS: Revision 1.3 2010-10-09 11:42:10 rlar +REVISIONS: remove #define for EOS use '\0' instead +REVISIONS: +REVISIONS: Revision 1.2 2010/07/01 19:52:26 rlar REVISIONS: cast the return values of malloc() function calls REVISIONS: REVISIONS: Revision 1.1 2010/03/25 22:44:38 dwarning @@ -43,7 +46,7 @@ void spice_dstring_init(SPICE_DSTRINGPTR dsPtr) dsPtr->string = dsPtr->staticSpace ; dsPtr->length = 0 ; dsPtr->spaceAvl = SPICE_DSTRING_STATIC_SIZE ; - dsPtr->staticSpace[0] = EOS; + dsPtr->staticSpace[0] = '\0'; } /* end spice_dstring_init() */ /* @@ -103,7 +106,7 @@ char *spice_dstring_append(SPICE_DSTRINGPTR dsPtr,char *string,int length) string < end; string++, dst++) { *dst = *string ; } - *dst = EOS ; + *dst = '\0' ; dsPtr->length += length ; return(dsPtr->string) ; @@ -119,7 +122,7 @@ char *spice_dstring_append_char( SPICE_DSTRINGPTR dstr_p, char c) char *val_p ; /* return value */ tmp_str[0] = c ; - tmp_str[1] = EOS ; + tmp_str[1] = '\0' ; val_p = spice_dstring_append( dstr_p, tmp_str, -1 ) ; return(val_p) ; } /* end spice_dstring_append_char() */ @@ -319,7 +322,7 @@ char *spice_dstring_setlength(SPICE_DSTRINGPTR dsPtr,int length) char *str_p ; /* newly create string */ str_p = _spice_dstring_setlength( dsPtr,length) ; - str_p[length] = EOS ; + str_p[length] = '\0' ; return( str_p ) ; } /* end spice_dstring_setlength() */ @@ -350,6 +353,6 @@ void spice_dstring_free(SPICE_DSTRINGPTR dsPtr) dsPtr->string = dsPtr->staticSpace ; dsPtr->length = 0 ; dsPtr->spaceAvl = SPICE_DSTRING_STATIC_SIZE; - dsPtr->staticSpace[0] = EOS ; + dsPtr->staticSpace[0] = '\0' ; } /* end spice_dstring_free() */