From 09a808494397a120af4180fb3ff164638515505c Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Thu, 30 Nov 2000 02:31:13 +0000 Subject: [PATCH] DISABLE_TABCOMP checks - #ifdef around check_wildchar_match and don't call real_dir_from_tilde in do_insertfile() if set git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@354 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 9 +++++---- files.c | 4 ++++ po/nano.pot | 26 +++++++++++++------------- utils.c | 2 ++ 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 66b4e8bb..ed696dc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ CVS code - - General - - Added configure argument --disable tabcomp. Affects - configure.in, configure, bottom of files.c and write_file, and - winio.c:nanogettsr(). + - Added configure argument --disable-tabcomp. Affects + configure.in, configure, bottom of files.c and write_file, + utils.c:check_wildcard_match() and winio.c:nanogettsr(). - Username tab completion code, and cleaned up existing tabcomp code. New functions real_dir_from_tide(), append_slash_if_dir(), username_tab_completion is more than a stub now =-). @@ -16,7 +16,8 @@ CVS code - write_file() - Unsetting modified on temp files bug fixed (Rocco Corsi). do_insertfile() - - Added call to real_name_from tilde, oops. + - Added call to real_name_from tilde, oops. Added check for + DISABLE_TABCOMP. read_file() - Added check for fileptr == NULL. - global.c: diff --git a/files.c b/files.c index 3cc2dfc6..bed3cd31 100644 --- a/files.c +++ b/files.c @@ -256,7 +256,11 @@ int do_insertfile(void) fprintf(stderr, "filename is %s", answer); #endif +#ifndef DISABLE_TABCOMP realname = real_dir_from_tilde(answer); +#else + realname = mallocstrcpy(realname, answer); +#endif i = open_file(realname, 1, 0); free(realname); diff --git a/po/nano.pot b/po/nano.pot index 2510b4bd..f9ac71a2 100644 --- a/po/nano.pot +++ b/po/nano.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-11-29 18:56-0500\n" +"POT-Creation-Date: 2000-11-29 21:22-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -55,59 +55,59 @@ msgstr "" msgid "File to insert [from ./] " msgstr "" -#: files.c:280 files.c:305 files.c:513 nano.c:1381 +#: files.c:284 files.c:309 files.c:517 nano.c:1381 msgid "Cancelled" msgstr "" -#: files.c:335 files.c:356 files.c:370 files.c:387 files.c:393 +#: files.c:339 files.c:360 files.c:374 files.c:391 files.c:397 #, c-format msgid "Could not open file for writing: %s" msgstr "" -#: files.c:344 +#: files.c:348 msgid "Could not open file: Path length exceeded." msgstr "" -#: files.c:375 +#: files.c:379 #, c-format msgid "Wrote >%s\n" msgstr "" -#: files.c:402 +#: files.c:406 #, c-format msgid "Could not close %s: %s" msgstr "" #. Try a rename?? -#: files.c:423 files.c:434 files.c:439 +#: files.c:427 files.c:438 files.c:443 #, c-format msgid "Could not open %s for writing: %s" msgstr "" -#: files.c:445 +#: files.c:449 #, c-format msgid "Could not set permissions %o on %s: %s" msgstr "" -#: files.c:452 +#: files.c:456 #, c-format msgid "Wrote %d lines" msgstr "" -#: files.c:484 +#: files.c:488 msgid "File Name to write" msgstr "" -#: files.c:489 +#: files.c:493 #, c-format msgid "filename is %s" msgstr "" -#: files.c:502 +#: files.c:506 msgid "File exists, OVERWRITE ?" msgstr "" -#: files.c:991 +#: files.c:995 msgid "(more)" msgstr "" diff --git a/utils.c b/utils.c index e38d88f1..1270a9ee 100644 --- a/utils.c +++ b/utils.c @@ -154,6 +154,7 @@ void new_magicline(void) totlines++; } +#ifndef DISABLE_TABCOMP /* * Routine to see if a text string is matched by a wildcard pattern. * Returns TRUE if the text is matched, or FALSE if it is not matched @@ -253,3 +254,4 @@ int check_wildcard_match(const char *text, const char *pattern) return TRUE; } +#endif -- 2.39.5