New arg --enable-extra, checks for ./configure options, oher stuff :-)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@316 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
650e8a406b
Коммит
8a0de3bb3f
@ -6,6 +6,8 @@ CVS code -
|
|||||||
- Username tab completion code, and cleaned up existing tabcomp
|
- Username tab completion code, and cleaned up existing tabcomp
|
||||||
code. New functions real_dir_from_tide(), append_slash_if_dir(),
|
code. New functions real_dir_from_tide(), append_slash_if_dir(),
|
||||||
username_tab_completion is more than a stub now =-).
|
username_tab_completion is more than a stub now =-).
|
||||||
|
- New options --enable-extra. New code in nano.c:version() to
|
||||||
|
print out various options from ./configure, function do_credits().
|
||||||
- files.c:
|
- files.c:
|
||||||
write_file()
|
write_file()
|
||||||
- Unsetting modified on temp files bug fixed (Rocco Corsi).
|
- Unsetting modified on temp files bug fixed (Rocco Corsi).
|
||||||
|
@ -24,5 +24,8 @@
|
|||||||
/* Define to use the slang wrappers for curses instead of native curses */
|
/* Define to use the slang wrappers for curses instead of native curses */
|
||||||
#undef USE_SLANG
|
#undef USE_SLANG
|
||||||
|
|
||||||
|
/* Define this to enable the extra stuff */
|
||||||
|
#undef NANO_EXTRA
|
||||||
|
|
||||||
/* Define to disable the tab completion code Chris worked so hard on! */
|
/* Define to disable the tab completion code Chris worked so hard on! */
|
||||||
#undef DISABLE_TABCOMP
|
#undef DISABLE_TABCOMP
|
||||||
|
@ -76,6 +76,9 @@
|
|||||||
/* Define to use the slang wrappers for curses instead of native curses */
|
/* Define to use the slang wrappers for curses instead of native curses */
|
||||||
#undef USE_SLANG
|
#undef USE_SLANG
|
||||||
|
|
||||||
|
/* Define this to enable the extra stuff */
|
||||||
|
#undef NANO_EXTRA
|
||||||
|
|
||||||
/* Define to disable the tab completion code Chris worked so hard on! */
|
/* Define to disable the tab completion code Chris worked so hard on! */
|
||||||
#undef DISABLE_TABCOMP
|
#undef DISABLE_TABCOMP
|
||||||
|
|
||||||
|
370
configure
поставляемый
370
configure
поставляемый
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
@ -21,6 +21,12 @@ AC_ARG_ENABLE(tiny,
|
|||||||
AC_DEFINE(NANO_SMALL) tiny_support=yes
|
AC_DEFINE(NANO_SMALL) tiny_support=yes
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(extra,
|
||||||
|
[ --enable-extra Enable extra (optional) functions, including easter eggs],
|
||||||
|
[if test x$enableval = xyes; then
|
||||||
|
AC_DEFINE(NANO_EXTRA) extra_support=yes
|
||||||
|
fi])
|
||||||
|
|
||||||
AC_ARG_ENABLE(tabcomp,
|
AC_ARG_ENABLE(tabcomp,
|
||||||
[ --disable-tabcomp Disables tab completion code for a smaller binary],
|
[ --disable-tabcomp Disables tab completion code for a smaller binary],
|
||||||
[if test x$enableval != xyes; then
|
[if test x$enableval != xyes; then
|
||||||
|
11
files.c
11
files.c
@ -455,6 +455,9 @@ int write_file(char *name, int tmp)
|
|||||||
int do_writeout(int exiting)
|
int do_writeout(int exiting)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
#ifdef NANO_EXTRA
|
||||||
|
static int did_cred = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
answer = mallocstrcpy(answer, filename);
|
answer = mallocstrcpy(answer, filename);
|
||||||
|
|
||||||
@ -481,6 +484,14 @@ int do_writeout(int exiting)
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, _("filename is %s"), answer);
|
fprintf(stderr, _("filename is %s"), answer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NANO_EXTRA
|
||||||
|
if (exiting && !ISSET(TEMP_OPT) && !strcasecmp(answer, "zzy") && !did_cred) {
|
||||||
|
do_credits();
|
||||||
|
did_cred = 1;
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (strcmp(answer, filename)) {
|
if (strcmp(answer, filename)) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (!stat(answer, &st)) {
|
if (!stat(answer, &st)) {
|
||||||
|
20
nano.c
20
nano.c
@ -417,7 +417,25 @@ void version(void)
|
|||||||
printf(_(" nano version %s by Chris Allegretta (compiled %s, %s)\n"),
|
printf(_(" nano version %s by Chris Allegretta (compiled %s, %s)\n"),
|
||||||
VERSION, __TIME__, __DATE__);
|
VERSION, __TIME__, __DATE__);
|
||||||
printf(_
|
printf(_
|
||||||
(" Email: nano@nano-editor.org Web: http://www.nano-editor.org\n"));
|
(" Email: nano@nano-editor.org Web: http://www.nano-editor.org"));
|
||||||
|
|
||||||
|
#if defined(NANO_SMALL) || defined(NANO_EXTRA) || defined(DISABLE_TABCOMP) || defined(USE_SLANG)
|
||||||
|
printf(_("\n Compiled options:"));
|
||||||
|
#endif
|
||||||
|
#ifdef NANO_SMALL
|
||||||
|
printf(" --enable-tiny");
|
||||||
|
#endif
|
||||||
|
#ifdef NANO_EXTRA
|
||||||
|
printf(" --enable-extra");
|
||||||
|
#endif
|
||||||
|
#ifdef DISABLE_TABCOMP
|
||||||
|
printf(" --disable-tabcomp");
|
||||||
|
#endif
|
||||||
|
#ifdef USE_SLANG
|
||||||
|
printf(" --with-slang");
|
||||||
|
#endif
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
filestruct *make_new_node(filestruct * prevnode)
|
filestruct *make_new_node(filestruct * prevnode)
|
||||||
|
141
po/cat-id-tbl.c
141
po/cat-id-tbl.c
@ -169,70 +169,81 @@ Usage: nano [option] +LINE <file>\n\
|
|||||||
{" -z \t\tEnable suspend\n", 136},
|
{" -z \t\tEnable suspend\n", 136},
|
||||||
{" +LINE\t\tStart at line number LINE\n", 137},
|
{" +LINE\t\tStart at line number LINE\n", 137},
|
||||||
{" nano version %s by Chris Allegretta (compiled %s, %s)\n", 138},
|
{" nano version %s by Chris Allegretta (compiled %s, %s)\n", 138},
|
||||||
{" Email: nano@nano-editor.org\tWeb: http://www.nano-editor.org\n", 139},
|
{" Email: nano@nano-editor.org\tWeb: http://www.nano-editor.org", 139},
|
||||||
{"Mark Set", 140},
|
{"\
|
||||||
{"Mark UNset", 141},
|
\n\
|
||||||
{"check_wrap called with inptr->data=\"%s\"\n", 142},
|
Compiled options:", 140},
|
||||||
{"current->data now = \"%s\"\n", 143},
|
{"Mark Set", 141},
|
||||||
{"After, data = \"%s\"\n", 144},
|
{"Mark UNset", 142},
|
||||||
{"Edit a replacement", 145},
|
{"check_wrap called with inptr->data=\"%s\"\n", 143},
|
||||||
{"Could not create a temporary filename: %s", 146},
|
{"current->data now = \"%s\"\n", 144},
|
||||||
{"Finished checking spelling", 147},
|
{"After, data = \"%s\"\n", 145},
|
||||||
{"Spell checking failed", 148},
|
{"Edit a replacement", 146},
|
||||||
{"Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? ", 149},
|
{"Could not create a temporary filename: %s", 147},
|
||||||
{"Cannot resize top win", 150},
|
{"Finished checking spelling", 148},
|
||||||
{"Cannot move top win", 151},
|
{"Spell checking failed", 149},
|
||||||
{"Cannot resize edit win", 152},
|
{"Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? ", 150},
|
||||||
{"Cannot move edit win", 153},
|
{"Cannot resize top win", 151},
|
||||||
{"Cannot resize bottom win", 154},
|
{"Cannot move top win", 152},
|
||||||
{"Cannot move bottom win", 155},
|
{"Cannot resize edit win", 153},
|
||||||
{"Justify Complete", 156},
|
{"Cannot move edit win", 154},
|
||||||
{"%s enable/disable", 157},
|
{"Cannot resize bottom win", 155},
|
||||||
{"enabled", 158},
|
{"Cannot move bottom win", 156},
|
||||||
{"disabled", 159},
|
{"Justify Complete", 157},
|
||||||
{"Main: set up windows\n", 160},
|
{"%s enable/disable", 158},
|
||||||
{"Main: bottom win\n", 161},
|
{"enabled", 159},
|
||||||
{"Main: open file\n", 162},
|
{"disabled", 160},
|
||||||
{"I got Alt-O-%c! (%d)\n", 163},
|
{"Main: set up windows\n", 161},
|
||||||
{"I got Alt-[-1-%c! (%d)\n", 164},
|
{"Main: bottom win\n", 162},
|
||||||
{"I got Alt-[-2-%c! (%d)\n", 165},
|
{"Main: open file\n", 163},
|
||||||
{"I got Alt-[-%c! (%d)\n", 166},
|
{"I got Alt-O-%c! (%d)\n", 164},
|
||||||
{"I got Alt-%c! (%d)\n", 167},
|
{"I got Alt-[-1-%c! (%d)\n", 165},
|
||||||
{"Case Sensitive Regexp Search%s%s", 168},
|
{"I got Alt-[-2-%c! (%d)\n", 166},
|
||||||
{"Regexp Search%s%s", 169},
|
{"I got Alt-[-%c! (%d)\n", 167},
|
||||||
{"Case Sensitive Search%s%s", 170},
|
{"I got Alt-%c! (%d)\n", 168},
|
||||||
{"Search%s%s", 171},
|
{"Case Sensitive Regexp Search%s%s", 169},
|
||||||
{" (to replace)", 172},
|
{"Regexp Search%s%s", 170},
|
||||||
{"Search Cancelled", 173},
|
{"Case Sensitive Search%s%s", 171},
|
||||||
{"\"%s...\" not found", 174},
|
{"Search%s%s", 172},
|
||||||
{"Search Wrapped", 175},
|
{" (to replace)", 173},
|
||||||
{"Replaced %d occurences", 176},
|
{"Search Cancelled", 174},
|
||||||
{"Replaced 1 occurence", 177},
|
{"\"%s...\" not found", 175},
|
||||||
{"Replace Cancelled", 178},
|
{"Search Wrapped", 176},
|
||||||
{"Replace this instance?", 179},
|
{"Replaced %d occurences", 177},
|
||||||
{"Replace failed: unknown subexpression!", 180},
|
{"Replaced 1 occurence", 178},
|
||||||
{"Replace with [%s]", 181},
|
{"Replace Cancelled", 179},
|
||||||
{"Replace with", 182},
|
{"Replace this instance?", 180},
|
||||||
{"Enter line number", 183},
|
{"Replace failed: unknown subexpression!", 181},
|
||||||
{"Aborted", 184},
|
{"Replace with [%s]", 182},
|
||||||
{"Come on, be reasonable", 185},
|
{"Replace with", 183},
|
||||||
{"Only %d lines available, skipping to last line", 186},
|
{"Enter line number", 184},
|
||||||
{"actual_x_from_start for xplus=%d returned %d\n", 187},
|
{"Aborted", 185},
|
||||||
{"input '%c' (%d)\n", 188},
|
{"Come on, be reasonable", 186},
|
||||||
{"New Buffer", 189},
|
{"Only %d lines available, skipping to last line", 187},
|
||||||
{" File: ...", 190},
|
{"actual_x_from_start for xplus=%d returned %d\n", 188},
|
||||||
{"Modified", 191},
|
{"input '%c' (%d)\n", 189},
|
||||||
{"Moved to (%d, %d) in edit buffer\n", 192},
|
{"New Buffer", 190},
|
||||||
{"current->data = \"%s\"\n", 193},
|
{" File: ...", 191},
|
||||||
{"I got \"%s\"\n", 194},
|
{"Modified", 192},
|
||||||
{"Yes", 195},
|
{"Moved to (%d, %d) in edit buffer\n", 193},
|
||||||
{"All", 196},
|
{"current->data = \"%s\"\n", 194},
|
||||||
{"No", 197},
|
{"I got \"%s\"\n", 195},
|
||||||
{"do_cursorpos: linepct = %f, bytepct = %f\n", 198},
|
{"Yes", 196},
|
||||||
{"line %d of %d (%.0f%%), character %d of %d (%.0f%%)", 199},
|
{"All", 197},
|
||||||
{"Dumping file buffer to stderr...\n", 200},
|
{"No", 198},
|
||||||
{"Dumping cutbuffer to stderr...\n", 201},
|
{"do_cursorpos: linepct = %f, bytepct = %f\n", 199},
|
||||||
{"Dumping a buffer to stderr...\n", 202},
|
{"line %d of %d (%.0f%%), character %d of %d (%.0f%%)", 200},
|
||||||
|
{"Dumping file buffer to stderr...\n", 201},
|
||||||
|
{"Dumping cutbuffer to stderr...\n", 202},
|
||||||
|
{"Dumping a buffer to stderr...\n", 203},
|
||||||
|
{"The nano text editor", 204},
|
||||||
|
{"version ", 205},
|
||||||
|
{"Brought to you by:", 206},
|
||||||
|
{"Special thanks to:", 207},
|
||||||
|
{"The Free Software Foundation", 208},
|
||||||
|
{"Pavel Curtis, Zeyd Ben-Halim and Eric S. Raymond for ncurses", 209},
|
||||||
|
{"and anyone else we forgot...", 210},
|
||||||
|
{"Thank you for using nano!\n", 211},
|
||||||
};
|
};
|
||||||
|
|
||||||
int _msg_tbl_length = 202;
|
int _msg_tbl_length = 211;
|
||||||
|
142
po/nano.pot
142
po/nano.pot
@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2000-11-24 09:04-0500\n"
|
"POT-Creation-Date: 2000-11-24 15:45-0500\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -55,7 +55,7 @@ msgstr ""
|
|||||||
msgid "File to insert [from ./] "
|
msgid "File to insert [from ./] "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:276 files.c:301 files.c:498 nano.c:1355
|
#: files.c:276 files.c:301 files.c:509 nano.c:1373
|
||||||
msgid "Cancelled"
|
msgid "Cancelled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -94,20 +94,20 @@ msgstr ""
|
|||||||
msgid "Wrote %d lines"
|
msgid "Wrote %d lines"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:477
|
#: files.c:480
|
||||||
msgid "File Name to write"
|
msgid "File Name to write"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:482
|
#: files.c:485
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "filename is %s"
|
msgid "filename is %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:487
|
#: files.c:498
|
||||||
msgid "File exists, OVERWRITE ?"
|
msgid "File exists, OVERWRITE ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:921
|
#: files.c:932
|
||||||
msgid "(more)"
|
msgid "(more)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ msgid "Case Sens"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:344 global.c:364 global.c:375 global.c:385 global.c:401
|
#: global.c:344 global.c:364 global.c:375 global.c:385 global.c:401
|
||||||
#: global.c:405 global.c:411 winio.c:1025
|
#: global.c:405 global.c:411 winio.c:1026
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -602,127 +602,133 @@ msgid " nano version %s by Chris Allegretta (compiled %s, %s)\n"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:420
|
#: nano.c:420
|
||||||
msgid " Email: nano@nano-editor.org\tWeb: http://www.nano-editor.org\n"
|
msgid " Email: nano@nano-editor.org\tWeb: http://www.nano-editor.org"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:455
|
#: nano.c:423
|
||||||
|
msgid ""
|
||||||
|
"\n"
|
||||||
|
" Compiled options:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: nano.c:473
|
||||||
msgid "Mark Set"
|
msgid "Mark Set"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:460
|
#: nano.c:478
|
||||||
msgid "Mark UNset"
|
msgid "Mark UNset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:887
|
#: nano.c:905
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "check_wrap called with inptr->data=\"%s\"\n"
|
msgid "check_wrap called with inptr->data=\"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:938
|
#: nano.c:956
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "current->data now = \"%s\"\n"
|
msgid "current->data now = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:991
|
#: nano.c:1009
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "After, data = \"%s\"\n"
|
msgid "After, data = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1093
|
#: nano.c:1111
|
||||||
msgid "Edit a replacement"
|
msgid "Edit a replacement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1304
|
#: nano.c:1322
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not create a temporary filename: %s"
|
msgid "Could not create a temporary filename: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1320
|
#: nano.c:1338
|
||||||
msgid "Finished checking spelling"
|
msgid "Finished checking spelling"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1322
|
#: nano.c:1340
|
||||||
msgid "Spell checking failed"
|
msgid "Spell checking failed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1342
|
#: nano.c:1360
|
||||||
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1505
|
#: nano.c:1523
|
||||||
msgid "Cannot resize top win"
|
msgid "Cannot resize top win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1507
|
#: nano.c:1525
|
||||||
msgid "Cannot move top win"
|
msgid "Cannot move top win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1509
|
#: nano.c:1527
|
||||||
msgid "Cannot resize edit win"
|
msgid "Cannot resize edit win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1511
|
#: nano.c:1529
|
||||||
msgid "Cannot move edit win"
|
msgid "Cannot move edit win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1513
|
#: nano.c:1531
|
||||||
msgid "Cannot resize bottom win"
|
msgid "Cannot resize bottom win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1515
|
#: nano.c:1533
|
||||||
msgid "Cannot move bottom win"
|
msgid "Cannot move bottom win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1786
|
#: nano.c:1804
|
||||||
msgid "Justify Complete"
|
msgid "Justify Complete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1854
|
#: nano.c:1872
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s enable/disable"
|
msgid "%s enable/disable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1866
|
#: nano.c:1884
|
||||||
msgid "enabled"
|
msgid "enabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1867
|
#: nano.c:1885
|
||||||
msgid "disabled"
|
msgid "disabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2097
|
#: nano.c:2115
|
||||||
msgid "Main: set up windows\n"
|
msgid "Main: set up windows\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2110
|
#: nano.c:2128
|
||||||
msgid "Main: bottom win\n"
|
msgid "Main: bottom win\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2116
|
#: nano.c:2134
|
||||||
msgid "Main: open file\n"
|
msgid "Main: open file\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2153
|
#: nano.c:2171
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-O-%c! (%d)\n"
|
msgid "I got Alt-O-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2175
|
#: nano.c:2193
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-[-1-%c! (%d)\n"
|
msgid "I got Alt-[-1-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2208
|
#: nano.c:2226
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-[-2-%c! (%d)\n"
|
msgid "I got Alt-[-2-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2256
|
#: nano.c:2274
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-[-%c! (%d)\n"
|
msgid "I got Alt-[-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2282
|
#: nano.c:2300
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-%c! (%d)\n"
|
msgid "I got Alt-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -812,72 +818,104 @@ msgstr ""
|
|||||||
msgid "Only %d lines available, skipping to last line"
|
msgid "Only %d lines available, skipping to last line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:120
|
#: winio.c:121
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "actual_x_from_start for xplus=%d returned %d\n"
|
msgid "actual_x_from_start for xplus=%d returned %d\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:438
|
#: winio.c:439
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "input '%c' (%d)\n"
|
msgid "input '%c' (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:476
|
#: winio.c:477
|
||||||
msgid "New Buffer"
|
msgid "New Buffer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:479
|
#: winio.c:480
|
||||||
msgid " File: ..."
|
msgid " File: ..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:487
|
#: winio.c:488
|
||||||
msgid "Modified"
|
msgid "Modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:939
|
#: winio.c:940
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Moved to (%d, %d) in edit buffer\n"
|
msgid "Moved to (%d, %d) in edit buffer\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:950
|
#: winio.c:951
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "current->data = \"%s\"\n"
|
msgid "current->data = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:995
|
#: winio.c:996
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got \"%s\"\n"
|
msgid "I got \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1020
|
#: winio.c:1021
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1022
|
#: winio.c:1023
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1024
|
#: winio.c:1025
|
||||||
msgid "No"
|
msgid "No"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1161
|
#: winio.c:1162
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
|
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1165
|
#: winio.c:1166
|
||||||
msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)"
|
msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1293
|
#: winio.c:1294
|
||||||
msgid "Dumping file buffer to stderr...\n"
|
msgid "Dumping file buffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1295
|
#: winio.c:1296
|
||||||
msgid "Dumping cutbuffer to stderr...\n"
|
msgid "Dumping cutbuffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1297
|
#: winio.c:1298
|
||||||
msgid "Dumping a buffer to stderr...\n"
|
msgid "Dumping a buffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: winio.c:1339
|
||||||
|
msgid "The nano text editor"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: winio.c:1340
|
||||||
|
msgid "version "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: winio.c:1341
|
||||||
|
msgid "Brought to you by:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: winio.c:1342
|
||||||
|
msgid "Special thanks to:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: winio.c:1343
|
||||||
|
msgid "The Free Software Foundation"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: winio.c:1344
|
||||||
|
msgid "Pavel Curtis, Zeyd Ben-Halim and Eric S. Raymond for ncurses"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: winio.c:1345
|
||||||
|
msgid "and anyone else we forgot..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: winio.c:1346
|
||||||
|
msgid "Thank you for using nano!\n"
|
||||||
|
msgstr ""
|
||||||
|
3
proto.h
3
proto.h
@ -131,6 +131,9 @@ void page_up_center(void);
|
|||||||
void blank_edit(void);
|
void blank_edit(void);
|
||||||
void search_init_globals(void);
|
void search_init_globals(void);
|
||||||
void replace_abort(void);
|
void replace_abort(void);
|
||||||
|
#ifdef NANO_EXTRA
|
||||||
|
void do_credits(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
int do_writeout_void(void), do_exit(void), do_gotoline_void(void);
|
int do_writeout_void(void), do_exit(void), do_gotoline_void(void);
|
||||||
int do_insertfile(void), do_search(void), page_up(void), page_down(void);
|
int do_insertfile(void), do_search(void), page_up(void), page_down(void);
|
||||||
|
95
winio.c
95
winio.c
@ -22,6 +22,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "proto.h"
|
#include "proto.h"
|
||||||
#include "nano.h"
|
#include "nano.h"
|
||||||
@ -1327,3 +1328,97 @@ void fix_editbot(void)
|
|||||||
for (i = 0; (i <= editwinrows - 1) && (editbot->next != NULL)
|
for (i = 0; (i <= editwinrows - 1) && (editbot->next != NULL)
|
||||||
&& (editbot != filebot); i++, editbot = editbot->next);
|
&& (editbot != filebot); i++, editbot = editbot->next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NANO_EXTRA
|
||||||
|
#define CREDIT_LEN 43
|
||||||
|
void do_credits(void)
|
||||||
|
{
|
||||||
|
int i, j = 0, place = 0, start_x;
|
||||||
|
char *what;
|
||||||
|
|
||||||
|
char *nanotext = _("The nano text editor");
|
||||||
|
char *version = _("version ");
|
||||||
|
char *brought = _("Brought to you by:");
|
||||||
|
char *specialthx = _("Special thanks to:");
|
||||||
|
char *fsf = _("The Free Software Foundation");
|
||||||
|
char *ncurses = _("Pavel Curtis, Zeyd Ben-Halim and Eric S. Raymond for ncurses");
|
||||||
|
char *anyonelse = _("and anyone else we forgot...");
|
||||||
|
char *thankyou = _("Thank you for using nano!\n");
|
||||||
|
|
||||||
|
char *credits[CREDIT_LEN] = {nanotext,
|
||||||
|
version,
|
||||||
|
VERSION,
|
||||||
|
"",
|
||||||
|
brought,
|
||||||
|
"Chris Allegretta",
|
||||||
|
"Jordi Mallach",
|
||||||
|
"Adam Rogoyski",
|
||||||
|
"Rob Siemborski",
|
||||||
|
"Rocco Corsi",
|
||||||
|
"Ken Tyler",
|
||||||
|
"Sven Guckes",
|
||||||
|
"Florian KЎnig",
|
||||||
|
"Pauli Virtanen",
|
||||||
|
"Daniele Medri",
|
||||||
|
"Clement Laforet",
|
||||||
|
"Tedi Heriyanto",
|
||||||
|
"Erik Anderson",
|
||||||
|
"Big Gaute",
|
||||||
|
"Joshua Jensen",
|
||||||
|
"",
|
||||||
|
specialthx,
|
||||||
|
"Plattsburgh State University",
|
||||||
|
"Benet Laboratories",
|
||||||
|
"Amy Allegretta",
|
||||||
|
"Linda Young",
|
||||||
|
"Jeremy Robichaud",
|
||||||
|
"Richard Kolb II",
|
||||||
|
fsf,
|
||||||
|
"Linus Torvalds",
|
||||||
|
ncurses,
|
||||||
|
anyonelse,
|
||||||
|
thankyou,
|
||||||
|
"", "", "", "",
|
||||||
|
"(c) 2000 Chris Allegretta",
|
||||||
|
"", "", "", "",
|
||||||
|
"www.nano-editor.org"
|
||||||
|
};
|
||||||
|
|
||||||
|
curs_set(0);
|
||||||
|
nodelay(edit, TRUE);
|
||||||
|
blank_bottombars();
|
||||||
|
mvwaddstr(topwin, 0, 0, hblank);
|
||||||
|
wrefresh(bottomwin);
|
||||||
|
wrefresh(topwin);
|
||||||
|
|
||||||
|
while (wgetch(edit) == ERR) {
|
||||||
|
blank_edit();
|
||||||
|
for (i = editwinrows / 2 - 1; i >= (editwinrows / 2 - 1 - j); i--) {
|
||||||
|
mvwaddstr(edit, i * 2, 0, hblank);
|
||||||
|
|
||||||
|
if (place - (editwinrows / 2 - 1 - i) < CREDIT_LEN)
|
||||||
|
what = credits[place - (editwinrows / 2 - 1 - i)];
|
||||||
|
else
|
||||||
|
what = "";
|
||||||
|
|
||||||
|
start_x = center_x - strlen(what) / 2 - 1;
|
||||||
|
mvwaddstr(edit, i * 2, start_x, what);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (j < editwinrows / 2 - 1)
|
||||||
|
j++;
|
||||||
|
|
||||||
|
place++;
|
||||||
|
wrefresh(edit);
|
||||||
|
sleep(1);
|
||||||
|
|
||||||
|
if (place >= CREDIT_LEN + editwinrows / 2)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
nodelay(edit, FALSE);
|
||||||
|
curs_set(1);
|
||||||
|
display_main_list();
|
||||||
|
total_refresh();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user