diff src/configfile.c @ 134:7dfbb1c20a81 noffle

[svn] k and m suffices on filter numbers
author bears
date Wed, 16 Aug 2000 00:08:13 +0100
parents 8897b7e3b108
children 1c7303c71f66
line wrap: on
line diff
--- a/src/configfile.c	Mon Aug 14 20:51:51 2000 +0100
+++ b/src/configfile.c	Wed Aug 16 00:08:13 2000 +0100
@@ -6,7 +6,7 @@
     SPOOLDIR
     VERSION
 
-  $Id: configfile.c 189 2000-08-09 21:19:17Z bears $
+  $Id: configfile.c 199 2000-08-15 23:08:13Z bears $
 */
 
 #if HAVE_CONFIG_H
@@ -712,8 +712,17 @@
 	else
 	{
 	    char * endVal;
+	    int suffix;
 
 	    rule.data.amount = strtoul( value, &endVal, 0 );
+	    suffix = tolower( *endVal );
+	    if ( suffix == 'k' || suffix == 'm' )
+	    {
+		rule.data.amount *= 1024;
+		if ( suffix == 'm' )
+		    rule.data.amount *= 1024;
+		endVal++;
+	    }
 	    if ( *endVal != '\0' && ! isspace( *endVal ) )
 		goto synErr;
 	}