From 31c76660ed2bb7616eaa95b059d7fd8ed925e6a7 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Tue, 21 Nov 2000 06:20:20 +0000 Subject: [PATCH] Changed check from argc == 1 to argv[optind] == NULL to display "New File" in statusbar or not git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@306 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 5 +++++ nano.c | 5 ++++- po/nano.pot | 12 ++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index de254503..ad24649d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ CVS code - - AUTHORS - Added Rocco Corsi. +- nano.c: + main() + - Changed check for argc == 1 to argv[optind] == NULL to decide + whether or not to display "New File" in the statusbar. - search.c: findnextstr() - Fix curent_x increment bug by using another variable (Rocco Corsi). @@ -10,6 +14,7 @@ CVS code - - nano.1, nano.1.html - Updated man page for new -p definition. + nano 0.9.20 - 11/18/2000 - General - Ran source through indent -kr again. Make everything pretty. diff --git a/nano.c b/nano.c index 7aadc2f6..5d30e3f5 100644 --- a/nano.c +++ b/nano.c @@ -2117,7 +2117,10 @@ int main(int argc, char *argv[]) #endif titlebar(); - if (argc == 1) + + /* Now we check to see if argv[optind] is non-null to determine if + we're dealing with a new file or not, not argc == 1... */ + if (argv[optind] == NULL) new_file(); else open_file(filename, 0, 0); diff --git a/po/nano.pot b/po/nano.pot index 64a57740..cbd61529 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-20 17:19-0500\n" +"POT-Creation-Date: 2000-11-21 01:19-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -702,27 +702,27 @@ msgstr "" msgid "Main: open file\n" msgstr "" -#: nano.c:2150 +#: nano.c:2153 #, c-format msgid "I got Alt-O-%c! (%d)\n" msgstr "" -#: nano.c:2172 +#: nano.c:2175 #, c-format msgid "I got Alt-[-1-%c! (%d)\n" msgstr "" -#: nano.c:2205 +#: nano.c:2208 #, c-format msgid "I got Alt-[-2-%c! (%d)\n" msgstr "" -#: nano.c:2253 +#: nano.c:2256 #, c-format msgid "I got Alt-[-%c! (%d)\n" msgstr "" -#: nano.c:2279 +#: nano.c:2282 #, c-format msgid "I got Alt-%c! (%d)\n" msgstr "" -- 2.39.5