diff -ru pl240src/src.broken/proc_annotate.c pl240src/src/proc_annotate.c --- pl240src/src.broken/proc_annotate.c 2007-11-23 15:24:57.000000000 -0500 +++ pl240src/src/proc_annotate.c 2008-03-27 14:48:38.000000000 -0400 @@ -141,7 +141,7 @@ } else do_arrows(); -if( PLS.clickmap && (mapurl != "" || maplabel != "" )) { +if( PLS.clickmap && ((mapurl && *mapurl) || (maplabel && *maplabel) )) { if( backdim && do_ellipse ) { /* need to solve back to ulx,uly in this case.. */ ulx = (((boxw/2.0)-cx)*-1.0); diff -ru pl240src/src.broken/proc_areadef.c pl240src/src/proc_areadef.c --- pl240src/src.broken/proc_areadef.c 2008-01-14 11:14:51.000000000 -0500 +++ pl240src/src/proc_areadef.c 2008-03-27 14:48:45.000000000 -0400 @@ -328,7 +328,7 @@ if( areacolor[0] != '\0' ) Ecblock( EXlo, EYlo, EXhi, EYhi, areacolor, 0 ); -if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) { +if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) { PL_clickmap_adjust( clickmap_adjx, clickmap_adjy ); /* set adjustment, if any. added scg 10/24/06 */ if( GL_slmember( mapurl, "*@XVAL*" ) || GL_slmember( mapurl, "*@YVAL*" )) clickmap_seturlt( mapurl ); else clickmap_entry( 'r', mapurl, 0, EXlo, EYlo, EXhi, EYhi, 0, 0, maplabel ); diff -ru pl240src/src.broken/proc_bars.c pl240src/src/proc_bars.c --- pl240src/src.broken/proc_bars.c 2008-01-09 15:19:43.000000000 -0500 +++ pl240src/src/proc_bars.c 2008-03-27 14:46:57.000000000 -0400 @@ -438,7 +438,7 @@ /* now do the bar.. */ /* allow @field substitutions into url */ - if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) { + if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) { expandedurl = PL_bigbuf; expandedlabel = &PL_bigbuf[2000]; do_subst( expandedurl, mapurl, irow, URL_ENCODED ); @@ -465,7 +465,7 @@ if( y0_endin ) Elin( xleft, Ea( Y, y0 ) ); } - if( PLS.clickmap && (mapurl != "" || maplabel != "" )) { + if( PLS.clickmap && ((mapurl && *mapurl) || (maplabel && *maplabel))) { if( Eflip ) clickmap_entry( 'r', expandedurl, 0, Ea( Y, y0 ), xleft, Ea( Y, y ), xright, 0, 0, expandedlabel ); else clickmap_entry( 'r', expandedurl, 0, xleft, Ea( Y, y0 ), xright, Ea( Y, y ), 0, 0, expandedlabel ); } diff -ru pl240src/src.broken/proc_categories.c pl240src/src/proc_categories.c --- pl240src/src.broken/proc_categories.c 2008-01-11 16:14:30.000000000 -0500 +++ pl240src/src/proc_categories.c 2008-03-27 14:50:37.000000000 -0400 @@ -94,7 +94,7 @@ sprintf( buf, "datafield=%s %s%s", catspec, (selectex[0]=='\0')?"":"selectrows=", selectex ); /* combine with selectex */ catspec = buf; /* make catspec point to the whole thing.. */ } -if( catspec != "" ) PL_setcats( axis, catspec ); +if( catspec && *catspec ) PL_setcats( axis, catspec ); /* things to be done after filling list.. */ for( i = 0; i < nextra; i++ ) if( ecattype[i] == '>' ) PL_addcat( axis, "post", ecat[i] ); /* post- extras */ diff -ru pl240src/src.broken/proc_drawcommands.c pl240src/src/proc_drawcommands.c --- pl240src/src.broken/proc_drawcommands.c 2007-11-23 16:40:38.000000000 -0500 +++ pl240src/src/proc_drawcommands.c 2008-03-27 14:49:16.000000000 -0400 @@ -50,7 +50,7 @@ /* -------------------------- */ /* now do the plotting work.. */ /* -------------------------- */ -if( commands != "" ) { +if( commands && *commands ) { sprintf( buf, "%s_Z", PLS.tmpname ); fp = fopen( buf, "w" ); /* temp file, unlinked below */ if( fp == NULL ) return( Eerr( 522, "Cannot open draw commands file", buf )); @@ -60,9 +60,9 @@ unlink( buf ); } -else if( dcfile != "" ) do_drawcommands( dcfile ); +else if( dcfile && *dcfile ) do_drawcommands( dcfile ); -else if( dumpfile != "" ) { +else if( dumpfile && *dumpfile ) { fp = fopen( dumpfile, "r" ); if( fp == NULL ) return( Eerr( 523, "Cannot open dump file", dumpfile ) ); while( fgets( buf, 1023, fp ) != NULL ) { diff -ru pl240src/src.broken/proc_getdata.c pl240src/src/proc_getdata.c --- pl240src/src.broken/proc_getdata.c 2008-01-11 15:13:44.000000000 -0500 +++ pl240src/src/proc_getdata.c 2008-03-27 14:53:37.000000000 -0400 @@ -369,7 +369,7 @@ READ_DONE: PL_finishdataset( nrecords, nfields ); -if( nscriptrows > 0 && pfnames != "" ) definefieldnames( pfnames ); /* assign any post-filter field names.. */ +if( nscriptrows > 0 && pfnames && *pfnames ) definefieldnames( pfnames ); /* assign any post-filter field names.. */ if( showdata ) { getfname( 1, buf ); diff -ru pl240src/src.broken/proc_image.c pl240src/src/proc_image.c --- pl240src/src.broken/proc_image.c 2007-11-23 16:42:06.000000000 -0500 +++ pl240src/src/proc_image.c 2008-03-27 14:50:28.000000000 -0400 @@ -50,7 +50,7 @@ * for SVG, image alignment (centering, etc) is done here, and image width and height must be given in order to do alignment. */ -if( filename == "" ) return( Eerr( 72509, "image file not specified", "" )); +if( !filename || !*filename ) return( Eerr( 72509, "image file not specified", "" )); if( height == 0 || width == 0 ) { Eerr( 75935, "warning, image height and width (in pixels) expected but not specified", "" ); @@ -81,7 +81,7 @@ Emov( x, y ); Elin( x+aw, y ); Elin( x+aw, y-ah ); Elin( x, y-ah ); Elin( x, y ); } -if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) clickmap_entry( 'r', mapurl, 0, x, y-ah, x+aw, y, 0, 0, maplabel ); +if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) clickmap_entry( 'r', mapurl, 0, x, y-ah, x+aw, y, 0, 0, maplabel ); return( 0 ); } diff -ru pl240src/src.broken/proc_legend.c pl240src/src/proc_legend.c --- pl240src/src.broken/proc_legend.c 2007-11-28 15:31:50.000000000 -0500 +++ pl240src/src/proc_legend.c 2008-03-27 14:48:57.000000000 -0400 @@ -170,7 +170,7 @@ /* fprintf( stderr, "%d|%s|%s|%s\n", LEtype[i], &Ltext[LElabel[i]], &Ltext[LEparm1[i]], &Ltext[LEparm2[i]] ); */ - if( specifyorder != "" ) { + if( specifyorder && *specifyorder ) { /* get next line in orderspec.. */ NEXTORDERLINE: GL_getchunk( buf, specifyorder, &ix, "\n" ); diff -ru pl240src/src.broken/proc_pie.c pl240src/src/proc_pie.c --- pl240src/src.broken/proc_pie.c 2007-11-23 16:51:57.000000000 -0500 +++ pl240src/src/proc_pie.c 2008-03-27 14:48:28.000000000 -0400 @@ -221,7 +221,7 @@ if( PLS.bignumspacer ) rewritenums( pctstr ); /* added 4/5/03 */ if( lblfld >= 0 ) strcpy( lbl, da( irow, lblfld ) ); - else if( labels != "" ) GL_getseg( lbl, labels, &ibb, "\n" ); + else if( labels && *labels ) GL_getseg( lbl, labels, &ibb, "\n" ); else if( lblfmtstring[0] != '\0' ) { /* added scg 8/20/04 */ strcpy( buf, lblfmtstring ); GL_varsub( buf, "@PCT", pctstr ); @@ -232,7 +232,7 @@ convertnl( lbl ); /* allow @field substitutions into url */ - if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) { + if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) { expandedurl = PL_bigbuf; expandedlabel = &PL_bigbuf[2000]; do_subst( expandedurl, mapurl, irow, URL_ENCODED ); @@ -265,14 +265,14 @@ else { x1 = labx; x2 = labx + boxwid; } y1 = laby-boxhi; y2 = laby; - if( labelback != "" ) Ecblock( x1-0.1, y1+(Ecurtextheight*0.6), x2+0.1, y2+Ecurtextheight, labelback, labelbackoutline ); + if( labelback && *labelback ) Ecblock( x1-0.1, y1+(Ecurtextheight*0.6), x2+0.1, y2+Ecurtextheight, labelback, labelbackoutline ); textdet( "textdetails", textdetails, &align, &adjx, &adjy, -2,"R", 1.0 ); Emov( labx, laby ); if( !centerit && x < cx ) Erightjust( lbl ); else if( !centerit && x >= cx ) Etext( lbl ); else Ecentext( lbl ); - if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) + if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) clickmap_entry( 'r', expandedurl, 0, x1, y1+Ecurtextheight, x2, y2+Ecurtextheight, 1, 0, expandedlabel ); linedet( "linedetails", outlinedetails, 0.5 ); /* restore */ } @@ -311,7 +311,7 @@ Emov( labx, laby ); Erightjust( lbl ); - if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) + if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) clickmap_entry( 'r', expandedurl, 0, labx-boxwid, laby-boxhi+Ecurtextheight, labx, laby+Ecurtextheight, 1, 0, expandedlabel ); @@ -326,7 +326,7 @@ labx+boxwid+0.1, laby+Ecurtextheight, labelback, labelbackoutline ); Emov( labx, laby ); Etext( lbl ); - if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) + if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) clickmap_entry( 'r', expandedurl, 0, labx, laby-boxhi+Ecurtextheight, labx+boxwid, laby+Ecurtextheight, 1, 0, expandedlabel ); diff -ru pl240src/src.broken/proc_processdata.c pl240src/src/proc_processdata.c --- pl240src/src.broken/proc_processdata.c 2007-11-28 16:18:01.000000000 -0500 +++ pl240src/src/proc_processdata.c 2008-03-27 14:50:03.000000000 -0400 @@ -166,7 +166,7 @@ } for( i = 0; i < MAXFLD; i++ ) accum[i] = 0.0; -if( outfile == "" ) { +if( !outfile || !*outfile ) { stat = PL_begindataset(); if( stat != 0 ) return( stat ); } @@ -377,7 +377,7 @@ if( select_result == 0 || stat ) continue; /* reject */ } - if( binsize != "" ) { + if( binsize && *binsize ) { fbin = atof( binsize ); if( fbin != 0.0 ) { fval = atof( da( i, fld[0] )); @@ -811,10 +811,10 @@ if( strncmp( action, "tot", 3 )==0 ) return( 0 ); } -if( outfile != "" ) fclose( outfp ); +if( outfile && *outfile ) fclose( outfp ); else PL_finishdataset( 0, 0 ); -if( fieldnames != "" ) definefieldnames( fieldnames ); +if( fieldnames && *fieldnames ) definefieldnames( fieldnames ); if( showdata ) { getfname( 1, buf ); @@ -861,7 +861,7 @@ static int bor( ) { -if( outfile == "" ) return( PL_startdatarow() ); +if( !outfile || !*outfile ) return( PL_startdatarow() ); else return( 0 ); } @@ -869,7 +869,7 @@ out( s ) char *s; { -if( outfile != "" ) fprintf( outfp, "%s ", s ); +if( outfile && *outfile ) fprintf( outfp, "%s ", s ); else PL_catitem( s ); return( 0 ); } @@ -877,7 +877,7 @@ static int eor() { -if( outfile != "" ) fprintf( outfp, "\n" ); +if( outfile && *outfile ) fprintf( outfp, "\n" ); else PL_enddatarow(); return( 0 ); } diff -ru pl240src/src.broken/proc_rect.c pl240src/src/proc_rect.c --- pl240src/src.broken/proc_rect.c 2007-11-23 17:08:49.000000000 -0500 +++ pl240src/src/proc_rect.c 2008-03-27 14:50:13.000000000 -0400 @@ -63,7 +63,7 @@ if( bevelsize > 0.0 || shadowsize > 0.0 ) Ecblockdress( xlo, ylo, xhi, yhi, bevelsize, lowbevelcolor, hibevelcolor, shadowsize, shadowcolor); -if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) clickmap_entry( 'r', mapurl, 0, xlo, ylo, xhi, yhi, 0, 0, maplabel ); +if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) clickmap_entry( 'r', mapurl, 0, xlo, ylo, xhi, yhi, 0, 0, maplabel ); return( 0 ); } diff -ru pl240src/src.broken/proc_scatterplot.c pl240src/src/proc_scatterplot.c --- pl240src/src.broken/proc_scatterplot.c 2007-11-23 16:54:31.000000000 -0500 +++ pl240src/src/proc_scatterplot.c 2008-03-27 14:51:48.000000000 -0400 @@ -87,7 +87,7 @@ else if( strcmp( attr, "clickmaplabel" )==0 ) maplabel = lineval; else if( strcmp( attr, "clickmaplabeltext" )==0 ) maplabel = getmultiline( lineval, "get" ); else if( strcmp( attr, "linelen" )==0 ) { - if( lineval == "" ) linelen = -1.0; + if( !lineval || !*lineval ) linelen = -1.0; else { linelen = ftokncpy( lineval ); if( PLS.usingcm ) linelen /= 2.54; } } else if( strcmp( attr, "linedir" )==0 ) reqlinedir = lineval[0]; @@ -256,7 +256,7 @@ /* in the following, text must come before symbol.. */ if( text[0] != '\0' || lblfield >= 0 ) textdet( "textdetails", textdetails, &align, &adjx, &adjy, -3, "R", 1.0 ); -if( symbol != "" ) symdet( "symbol", symbol, symcode, &radius ); +if( symbol && *symbol ) symdet( "symbol", symbol, symcode, &radius ); if( linelen > 0.0 || rectoutline ) linedet( "linedetails", linedetails, 0.5 ); @@ -317,7 +317,7 @@ } /* allow @field substitutions into url */ - if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) { + if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) { expandedurl = &PL_bigbuf[0]; expandedlabel = &PL_bigbuf[2000]; do_subst( expandedurl, mapurl, realrow, URL_ENCODED ); @@ -330,16 +330,16 @@ /* text can be combined with mark if text and symbol both specified */ /* symbol or rectangle.. */ - if( symbol != "" || dorect || ( text[0] == '\0' && linelen <= 0.0 && lblfield < 0 ) ) { + if( (symbol && *symbol) || dorect || ( text[0] == '\0' && linelen <= 0.0 && lblfield < 0 ) ) { if( symfield >= 0 ) { /* look it up in legend list.. */ if( symfield_userange ) symbol = PL_get_legent_rg( atof( da( realrow, symfield ) ) ); else symbol = PL_get_legent( da( realrow, symfield )); - if( symbol == "" ) Eerr( 7429, "warning: symfield: no matching legend entry tag found", da( realrow, symfield ) ); + if( !symbol || !*symbol ) Eerr( 7429, "warning: symfield: no matching legend entry tag found", da( realrow, symfield ) ); if( !dorect ) symdet( "symfield", symbol, symcode, &radius ); } if( dupsleg ) { /* look it up in legend list.. */ symbol = PL_get_legent_rg( (double)dupcount+1 ); - if( symbol == "" ) Eerr( 7692, "warning: dupsleg: no appropriate legend entry tag\n", da( realrow, symfield ) ); + if( !symbol || !*symbol ) Eerr( 7692, "warning: dupsleg: no appropriate legend entry tag\n", da( realrow, symfield ) ); if( !dorect ) symdet( "symfield", symbol, symcode, &radius ); /* note: currently all marks will be rendered; the last one will be on "top" */ } @@ -373,7 +373,7 @@ if( doing_alt == 1 ) symdet( "symbol", symbol, symcode, &radius ); /* restore */ } - if( PLS.clickmap && (mapurl != "" || maplabel != "" )) { + if( PLS.clickmap && ((mapurl && *mapurl) || (maplabel && *maplabel) )) { if( dorect ) clickmap_entry( 'r', expandedurl, 0, x-rectw, y-recth, x+rectw, y+recth, 0, 0, expandedlabel ); else clickmap_entry( 'r', expandedurl, 0, x-radius, y-radius, x+radius, y+radius, 0, 0, expandedlabel ); } @@ -382,7 +382,7 @@ /* text */ if( text[0] != '\0' ) { - if( symbol != "" ) /* set text color etc... */ + if( symbol && *symbol ) /* set text color etc... */ textdet( "textdetails", textdetails, &align, &adjx, &adjy, -3, "R", 1.0 ); if( sizefield >= 0 ) Etextsize( (int) (atof( da( realrow, sizefield ) ) * sizescale) ); if( verttext ) { ptx = (x+cy)+adjx; pty = y; } /* cy puts midheight of character on point */ @@ -392,10 +392,10 @@ Emov( ptx, pty ); if( align == '?' ) Edotext( text, 'C' ); else Edotext( text, align ); - if( symbol != "" ) /* restore symbol color etc... */ + if( symbol && *symbol ) /* restore symbol color etc... */ symdet( "symbol", symbol, symcode, &radius ); - if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) + if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) clickmap_entry( 'r', expandedurl, 0, ptx-hw, pty, x+hw, y+txhi, 0, 0, expandedlabel ); } @@ -412,7 +412,7 @@ if( align == '?' ) Edotext( buf, 'C' ); else Edotext( buf, align ); - if( PLS.clickmap && ( mapurl != "" || maplabel != "" )) { + if( PLS.clickmap && ( (mapurl && *mapurl) || (maplabel && *maplabel) )) { hw = strlen( buf ) * Ecurtextwidth * 0.5; if( GL_member( align, "C?" ))clickmap_entry( 'r', expandedurl, 0, ptx-hw, pty, x+hw, y+txhi, 0, 0, expandedlabel ); else if( align == 'L' ) clickmap_entry( 'r', expandedurl, 0, ptx, pty, x+(hw*2.0), y+txhi, 0, 0, expandedlabel ); @@ -445,7 +445,7 @@ GL_varsub( legendlabel, "@NVALUES", s ); if( linelen <= 0.0 && lblfield < 0 && text[0] == '\0' ) PL_add_legent( LEGEND_SYMBOL, legendlabel, "", symbol, "", "" ); - else if( symbol != "" && text[0] != '\0' ) + else if( symbol && *symbol && text[0] != '\0' ) PL_add_legent( LEGEND_SYMBOL+LEGEND_TEXT, legendlabel, "", text, textdetails, symbol ); else if( linelen > 0.0 ) { char dirstr[8];