Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Aug 2004 17:03:38 -0700
From:      Nate Lawson <nate@cryptography.com>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/bin/dd args.c
Message-ID:  <410D84DA.3040701@cryptography.com>
In-Reply-To: <20040731151315.99E5916A539@hub.freebsd.org>
References:  <20040731151315.99E5916A539@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Pawel Jakub Dawidek wrote:
> pjd         2004-07-31 15:13:08 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     bin/dd               args.c 
>   Log:
>   Allow for capital letters as size suffixes.
>   
>   Inspired by:    le
>   Approved by:    green (maintainer)
>   
>   Revision  Changes    Path
>   1.39      +20 -8     src/bin/dd/args.c
>
> @@ -361,18 +361,23 @@
>  
>  	mult = 0;
>  	switch (*expr) {
> +	case 'B':
>  	case 'b':
>  		mult = 512;
>  		break;

Instead of doubling the case statements, it's simpler to do
"switch (tolower(*expr))" or toupper().

-Nate




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?410D84DA.3040701>