From 698263ca5ca05965dd55e2c5627ce235a321be7d Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Thu, 25 Nov 2004 05:05:41 +0000 Subject: [PATCH] in the low-level input routines, make the ascii_digits variables ints instead of size_t's, since they will only hold very small values git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2136 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 5 +++++ src/proto.h | 2 +- src/winio.c | 12 ++++++------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4741eaeb..23670bc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -51,6 +51,11 @@ CVS code - do_justify() - For consistency, preserve placewewant if we didn't unjustify instead of setting it to 0. (DLR) +- winio.c: + get_kbinput(), get_translated_kbinput(), get_ascii_kbinput(), + get_untranslated_kbinput() + - Make the ascii_digits variables ints instead of size_t's, + since they will only hold very small values. (DLR) GNU nano 1.3.5 - 2004.11.22 - General: diff --git a/src/proto.h b/src/proto.h index 621f3d92..bd7b952f 100644 --- a/src/proto.h +++ b/src/proto.h @@ -531,7 +531,7 @@ int get_translated_kbinput(int kbinput, seq_type *seq , bool reset #endif ); -int get_ascii_kbinput(int kbinput, size_t ascii_digits +int get_ascii_kbinput(int kbinput, int ascii_digits #ifndef NANO_SMALL , bool reset #endif diff --git a/src/winio.c b/src/winio.c index 6b466b90..f1e7426e 100644 --- a/src/winio.c +++ b/src/winio.c @@ -271,7 +271,7 @@ int get_translated_kbinput(int kbinput, seq_type *seq ) { static int escapes = 0; - static size_t ascii_digits = 0; + static int ascii_digits = 0; int retval = ERR; #ifndef NANO_SMALL @@ -498,7 +498,7 @@ int get_translated_kbinput(int kbinput, seq_type *seq *seq = UTF8_SEQ; #ifdef DEBUG - fprintf(stderr, "get_translated_kbinput(): kbinput = %d, seq = %d, escapes = %d, ascii_digits = %lu, retval = %d\n", kbinput, (int)*seq, escapes, (unsigned long)ascii_digits, retval); + fprintf(stderr, "get_translated_kbinput(): kbinput = %d, seq = %d, escapes = %d, ascii_digits = %d, retval = %d\n", kbinput, (int)*seq, escapes, ascii_digits, retval); #endif /* Return the result. */ @@ -507,7 +507,7 @@ int get_translated_kbinput(int kbinput, seq_type *seq /* Translate an ASCII character sequence: turn a three-digit decimal * ASCII code from 000-255 into its corresponding ASCII character. */ -int get_ascii_kbinput(int kbinput, size_t ascii_digits +int get_ascii_kbinput(int kbinput, int ascii_digits #ifndef NANO_SMALL , bool reset #endif @@ -594,7 +594,7 @@ int get_ascii_kbinput(int kbinput, size_t ascii_digits } #ifdef DEBUG - fprintf(stderr, "get_ascii_kbinput(): kbinput = %d, ascii_digits = %lu, ascii_kbinput = %d, retval = %d\n", kbinput, (unsigned long)ascii_digits, ascii_kbinput, retval); + fprintf(stderr, "get_ascii_kbinput(): kbinput = %d, ascii_digits = %d, ascii_kbinput = %d, retval = %d\n", kbinput, ascii_digits, ascii_kbinput, retval); #endif /* If the result is an ASCII character, reset the ASCII character @@ -1290,7 +1290,7 @@ int get_untranslated_kbinput(int kbinput, size_t position, bool #endif ) { - static size_t ascii_digits = 0; + static int ascii_digits = 0; int retval; #ifndef NANO_SMALL @@ -1337,7 +1337,7 @@ int get_untranslated_kbinput(int kbinput, size_t position, bool retval = kbinput; #ifdef DEBUG - fprintf(stderr, "get_untranslated_kbinput(): kbinput = %d, position = %lu, ascii_digits = %lu\n", kbinput, (unsigned long)position, (unsigned long)ascii_digits); + fprintf(stderr, "get_untranslated_kbinput(): kbinput = %d, position = %lu, ascii_digits = %d\n", kbinput, (unsigned long)position, ascii_digits); #endif return retval;