diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-01-17 22:55:59 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-01-17 22:55:59 +0000 |
| commit | dde07463cf29c5473bc606ecbe622ffdf7868d1a (patch) | |
| tree | 83d4b235db557b7afc87201c716ad9fd6983b828 | |
| parent | 3a99ffc355a07b3b92eefe232494748fee705a53 (diff) | |
Notes
| -rw-r--r-- | bin/dd/dd.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bin/dd/dd.c b/bin/dd/dd.c index dbef8c19326b..dc55aed0b6c3 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: dd.c,v 1.2 1994/09/24 02:54:52 davidg Exp $ */ #ifndef lint @@ -195,8 +195,18 @@ setup() if (islower(cnt)) ctab[cnt] = ctab[toupper(cnt)]; } - else + else { ctab = ddflags & C_LCASE ? u2l : l2u; + if (ddflags & C_LCASE) { + for (cnt = 0; cnt < 0377; ++cnt) + if (isupper(cnt)) + ctab[cnt] = tolower(cnt); + } else { + for (cnt = 0; cnt < 0377; ++cnt) + if (islower(cnt)) + ctab[cnt] = toupper(cnt); + } + } (void)time(&st.start); /* Statistics timestamp. */ } |
