Index: /lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol
===================================================================
--- /lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol	(revision 4286)
+++ /lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/fancontrol	(revision 4440)
@@ -3,5 +3,5 @@
 # Simple script implementing a temperature dependent fan speed control
 #
-# Version 0.63
+# Version 0.64
 #
 # Usage: fancontrol [CONFIGFILE]
@@ -189,5 +189,5 @@
 		pwmo=${AFCPWM[$fcvcount]}
 		pwmdisable $pwmo
-		fcvcount=$fcvcount+1
+		let fcvcount=$fcvcount+1
 	done
 	echo 'Verify fans have returned to full speed'
@@ -288,5 +288,5 @@
 			echo "new pwmval=$pwmval"
 		fi
-		fcvcount=$fcvcount+1
+		let fcvcount=$fcvcount+1
 	done
 }
@@ -303,5 +303,5 @@
 		restorefans
 	fi
-	fcvcount=$fcvcount+1
+	let fcvcount=$fcvcount+1
 done
 
@@ -314,39 +314,2 @@
 	sleep $INTERVAL
 done
-
-# some old stuff/missing features, will clean this up soon
-#if ( test "$regulationtype" = "quad" ) ; then
-#  while true ; do
-#    temp=`cat ${temp1} | cut -b 12-13`
-#    if (( ${temp} < ${mintemp} )) ;
-#    	then pwm=0
-#    elif (( ${temp} > ${maxtemp} )) ;
-#    	then pwm=255
-#    else
-#	pwm=`calc "((10/(${maxtemp}-${mintemp})*(${temp}-${mintemp}))^2/1000*(${maxtemp}-${mintemp})*(255-${minspeed})+${minspeed})"`
-#	#no optimization here for readability (or sloth :))
-#    fi ;
-#    echo $pwm > ${pwm1} ;
-#
-#    sleep 10 ;
-#  done ;
-
-#elif ( test "$regulationtype" = "exp" ) ; then
-  #add support for exponential calculation here
-
-#else
-#  pwmconst=$[(255-${minspeed})/(${maxtemp}-${mintemp})]
-#  while true ; do
-#    let temp=`cat temp1 | cut -b 12-13` ;
-#    if (( ${temp} < ${mintemp} )) ;
-#        then pwm=0
-#    elif (( ${temp} > ${maxtemp} )) ;
-#        then pwm=255
-#    else
-#    	pwm=$[(${temp}-${mintemp})*${pwmconst}+${minspeed}]
-#    fi ;
-#    echo $pwm > pwm2 ;
-#
-#    sleep 10 ;
-#  done ;
-#fi
Index: /lm-sensors/branches/lm-sensors-3.0.0/CHANGES
===================================================================
--- /lm-sensors/branches/lm-sensors-3.0.0/CHANGES	(revision 4434)
+++ /lm-sensors/branches/lm-sensors-3.0.0/CHANGES	(revision 4440)
@@ -20,4 +20,5 @@
                    Fix Super-I/O exit sequence for Winbond/Fintek chips
   Program mkpatch: Delete
+  Program fancontrol: Use let for arithmetic evaluation
   Program pwmconfig: Use smaller steps for low PWM values
   Program rrd: Support only hwmon class devices
