*** CMB MacBook Pro HD:Users:cmbarton:grass_dev:grass_src:scripts:d.vect.thematic:d.vect.thematic	2007-12-09 22:52:57.%N -0700--- CMB MacBook Pro HD:Users:cmbarton:Desktop:diff2:d.vect.thematic	2008-01-24 20:23:53.%N -0700****************** 334,340 ****--- 334,342 ----  trap "exitprocedure" 2 3 15    # identify current monitor or start monitor+ if [ "$GIS_FLAG_S" -ne 1 ] ; then      currmon=`eval d.mon -L | grep "(selected)" | awk '{print $1}'`+ fi    if [ -z "$currmon" -a "$GIS_FLAG_S" -ne 1 ] ; then          g.message -e message='*** You must open a display monitor ***'****************** 342,347 ****--- 344,362 ----  	exit 2  fi  + # if running in the GUI, do not create a graphic legend in an xmon+ if [ "$GIS_FLAG_S" -eq 1 ] ; then+     GIS_FLAG_L=0+     # if running in GUI, turn off immediate mode rendering so that the+     # iterated d.vect commands will composite using the display driver+     rendermode=$GRASS_RENDER_IMMEDIATE+     pngread=$GRASS_PNG_READ+     GRASS_PNG_READ=TRUE+     export GRASS_PNG_READ+     GRASS_PNG_AUTO_WRITE=FALSE+     export GRASS_PNG_AUTO_WRITE+ fi+   table=`v.db.connect $GIS_OPT_MAP -g | grep -w $GIS_OPT_LAYER | awk '{print $2}'`  database=`v.db.connect $GIS_OPT_MAP -g | grep -w $GIS_OPT_LAYER | awk '{print $4}'`  driver=`v.db.connect $GIS_OPT_MAP -g | grep -w $GIS_OPT_LAYER | awk '{print $5}'`****************** 622,639 ****      i=1      first="true"  - 	# if running in GUI, turn off immediate mode rendering so that the- 	# iterated d.vect commands will composite using the display driver- 	if [ "$GIS_FLAG_S"  -eq 1 ] ; then- 		rendermode=$GRASS_RENDER_IMMEDIATE- 		autowrite=$GRASS_PNG_AUTO_WRITE- 		GRASS_RENDER_IMMEDIATE=FALSE- 		export GRASS_RENDER_IMMEDIATE- 		GRASS_PNG_AUTO_WRITE=FALSE- 		export GRASS_PNG_AUTO_WRITE- 		d.mon start=PNG- 	fi-       while [ $i -le $numint ]               do           if [ "$GIS_FLAG_M" -eq 1 ] ; then--- 636,641 ----****************** 869,885 ****          line3=`expr $line3 - 4`      done      -     # reset rendering for GUI use- 	if [ "$GIS_FLAG_S"  -eq 1 ] ; then- 		d.mon stop=PNG- 		if [ -n "$currmon" ] ; then- 		    d.mon select=$currmon- 		fi- 		GRASS_RENDER_IMMEDIATE=$rendermodeexport- 		export GRASS_RENDER_IMMEDIATE- 		GRASS_PNG_AUTO_WRITE=$autowrite- 		export GRASS_PNG_AUTO_WRITE- 	fi  fi    #graduated points and line widths thematic mapping--- 871,876 ----****************** 970,987 ****      i=$numint      ptsize=$GIS_OPT_MAXSIZE  - 	# if running in GUI, turn off immediate mode rendering so that the- 	# iterated d.vect commands will composite using the display driver- 	if [ "$GIS_FLAG_S"  -eq 1 ] ; then- 		rendermode=$GRASS_RENDER_IMMEDIATE- 		autowrite=$GRASS_PNG_AUTO_WRITE- 		GRASS_RENDER_IMMEDIATE=FALSE- 		export GRASS_RENDER_IMMEDIATE- 		GRASS_PNG_AUTO_WRITE=FALSE- 		export GRASS_PNG_AUTO_WRITE- 		d.mon start=PNG- 	fi-       while [ $i -ge 1 ]               do           if [ "$GIS_FLAG_M" -eq 1 ] ; then--- 961,966 ----****************** 1166,1183 ****          line2=`expr $line2 - $lineht`          i=`expr $i - 1`      done!     # reset rendering for GUI use! 	if [ "$GIS_FLAG_S"  -eq 1 ] ; then! 		d.mon stop=PNG! 		if [ -n "$currmon" ] ; then ! 		    d.mon select=$currmon  		fi  		GRASS_RENDER_IMMEDIATE=$rendermode  		export GRASS_RENDER_IMMEDIATE- 		GRASS_PNG_AUTO_WRITE=$autowrite- 		export GRASS_PNG_AUTO_WRITE- 	fi-   fi    # Create graphic legend--- 1145,1160 ----          line2=`expr $line2 - $lineht`          i=`expr $i - 1`      done!   fi+ + if [ "$GIS_FLAG_S" -eq 1 ] ; then+     # reset display parameters+     #GRASS_PNG_READ=$pngread+     GRASS_PNG_READ=FALSE+     export GRASS_PNG_READ      GRASS_RENDER_IMMEDIATE=$rendermode      export GRASS_RENDER_IMMEDIATE  fi    # Create graphic legend