diff options
author | scuri <scuri> | 2009-06-23 03:18:33 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-06-23 03:18:33 +0000 |
commit | 0610dd4f3064220a2e8fb1d8dc120044eb6c64a8 (patch) | |
tree | a5d0d3b6c79e967cd4e80c7668b906e8b422f902 /src/intcgm | |
parent | 09be96e0606d05b056f82b5f9254208a2d0e4c88 (diff) |
*** empty log message ***
Diffstat (limited to 'src/intcgm')
-rw-r--r-- | src/intcgm/bparse.c | 6 | ||||
-rw-r--r-- | src/intcgm/intcgm2.c | 6 | ||||
-rw-r--r-- | src/intcgm/tparse.c | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/intcgm/bparse.c b/src/intcgm/bparse.c index ad08179..c0ffada 100644 --- a/src/intcgm/bparse.c +++ b/src/intcgm/bparse.c @@ -179,7 +179,7 @@ int cgmb_intpre ( void ) int cgmb_realpr ( void ) { - short mode, i1; + short mode = 0, i1; long i2, i3; if ( cgmb_e ( &i1 ) ) return 1; @@ -543,7 +543,7 @@ int cgmb_vdcipr ( void ) int cgmb_vdcrpr ( void ) { short i1; - long mode, i2, i3; + long mode = 0, i2, i3; if ( cgmb_e ( &i1 ) ) return 1; if ( cgmb_i ( &i2 ) ) return 1; @@ -1320,7 +1320,7 @@ int cgmb_txftin ( void ) font = (char *) cgm_GetList ( intcgm_text_att.font_list, intcgm_text_att.font_index ); - if ( font==NULL ) font = (char*)strdup ( "SYSTEM" ); + if ( font==NULL ) font = "SYSTEM"; intcgm_text_att.font = 0; for ( i=0; font_array[i]!=NULL; i++ ) diff --git a/src/intcgm/intcgm2.c b/src/intcgm/intcgm2.c index f16c916..b6be7ee 100644 --- a/src/intcgm/intcgm2.c +++ b/src/intcgm/intcgm2.c @@ -1171,7 +1171,7 @@ int cgmb_r ( double *d ) int cgmb_s ( char **str ) { - register unsigned i; + register unsigned i = 0; unsigned char l; unsigned short l1; unsigned short cont; @@ -1206,9 +1206,7 @@ int cgmb_s ( char **str ) } s[i] = '\0'; - *str = (char*)strdup ( s ); - - free ( s ); + *str = s; return 0; } diff --git a/src/intcgm/tparse.c b/src/intcgm/tparse.c index 0402ce6..9bc47b3 100644 --- a/src/intcgm/tparse.c +++ b/src/intcgm/tparse.c @@ -1021,7 +1021,7 @@ int cgmt_txftin ( void ) /* text font index */ font = (char *) cgm_GetList ( intcgm_text_att.font_list, intcgm_text_att.font_index ); - if ( font==NULL ) font = (char*)strdup ( "SYSTEM" ); + if ( font==NULL ) font = "SYSTEM"; intcgm_text_att.font = 0; for ( i=0; font_array[i]!=NULL; i++ ) |