-pedantic fixes by Rocco Corsi

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@285 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2000-11-15 03:50:02 +00:00
parent 2c9752291d
commit cbb0f8bde2
3 changed files with 10 additions and 7 deletions

View File

@ -12,8 +12,9 @@ CVS Code -
function mallocstrcpy which is sure to be a programmatic
nightmare, changed last_search, last_replace, answer to
pointers. New function not_found_msg in search.c for displaying
truncated strings in satusbar when the string is not found.
We disable this feature when using PICO_MSGS (-p).
truncated strings in satusbar when the string is not found
(-pedantic fixes by Rocco Corsi). We disable this feature when
using PICO_MSGS (-p).
- New spelling code by Rocco Corsi. New functions
do_int_speller, do_alt_speller, changes to do_spell in nano.c,
New functions search_init_globals and do_replace_loop, changes

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-11-14 20:24-0500\n"
"POT-Creation-Date: 2000-11-14 20:33-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -158,14 +158,16 @@ int search_init(int replacing)
void not_found_msg(char *str)
{
char foo[COLS];
if (strlen(str) < COLS / 2)
if (strlen(str) <= COLS / 2)
statusbar(_("\"%s\" not found"), str);
else {
strncpy(foo, str, COLS / 2);
char *foo = NULL;
foo = mallocstrcpy(foo, str);
foo[COLS / 2] = 0;
statusbar(_("\"%s...\" not found"), foo);
free(foo);
}
}