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-d3aeb78583b8master
parent
12642edfc9
commit
698263ca5c
|
@ -51,6 +51,11 @@ CVS code -
|
||||||
do_justify()
|
do_justify()
|
||||||
- For consistency, preserve placewewant if we didn't unjustify
|
- For consistency, preserve placewewant if we didn't unjustify
|
||||||
instead of setting it to 0. (DLR)
|
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
|
GNU nano 1.3.5 - 2004.11.22
|
||||||
- General:
|
- General:
|
||||||
|
|
|
@ -531,7 +531,7 @@ int get_translated_kbinput(int kbinput, seq_type *seq
|
||||||
, bool reset
|
, bool reset
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
int get_ascii_kbinput(int kbinput, size_t ascii_digits
|
int get_ascii_kbinput(int kbinput, int ascii_digits
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
, bool reset
|
, bool reset
|
||||||
#endif
|
#endif
|
||||||
|
|
12
src/winio.c
12
src/winio.c
|
@ -271,7 +271,7 @@ int get_translated_kbinput(int kbinput, seq_type *seq
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static int escapes = 0;
|
static int escapes = 0;
|
||||||
static size_t ascii_digits = 0;
|
static int ascii_digits = 0;
|
||||||
int retval = ERR;
|
int retval = ERR;
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
@ -498,7 +498,7 @@ int get_translated_kbinput(int kbinput, seq_type *seq
|
||||||
*seq = UTF8_SEQ;
|
*seq = UTF8_SEQ;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#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
|
#endif
|
||||||
|
|
||||||
/* Return the result. */
|
/* 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
|
/* Translate an ASCII character sequence: turn a three-digit decimal
|
||||||
* ASCII code from 000-255 into its corresponding ASCII character. */
|
* 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
|
#ifndef NANO_SMALL
|
||||||
, bool reset
|
, bool reset
|
||||||
#endif
|
#endif
|
||||||
|
@ -594,7 +594,7 @@ int get_ascii_kbinput(int kbinput, size_t ascii_digits
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#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
|
#endif
|
||||||
|
|
||||||
/* If the result is an ASCII character, reset the ASCII character
|
/* 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
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
static size_t ascii_digits = 0;
|
static int ascii_digits = 0;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
|
@ -1337,7 +1337,7 @@ int get_untranslated_kbinput(int kbinput, size_t position, bool
|
||||||
retval = kbinput;
|
retval = kbinput;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#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
|
#endif
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|
Loading…
Reference in New Issue