Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/editors
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30674

Modified Files:
        nano-cur.info nano-cur.patch 
Log Message:
Updating nano-cur to current svn version


Index: nano-cur.info
===================================================================
RCS file: 
/cvsroot/fink/dists/10.4/unstable/main/finkinfo/editors/nano-cur.info,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- nano-cur.info       18 Aug 2009 10:43:24 -0000      1.8
+++ nano-cur.info       3 Nov 2009 07:07:59 -0000       1.9
@@ -1,6 +1,6 @@
 Package: nano-cur
-Version: 2.1.10
-Revision: 1003
+Version: 2.1.11
+Revision: 4414
 Description: Free Pico clone with some new features (dev)
 License: GPL
 Maintainer: Andreas Gockel <[email protected]>
@@ -14,15 +14,16 @@
 Replaces: nano-unstable, nano-small, nano-noutf8, nano
 Conflicts: nano-unstable, nano-small, nano-noutf8, nano
 Source: http://www.nano-editor.org/dist/v2.1/nano-%v.tar.gz
-Source-MD5: f55bd9efeccf9da98950b54a4b0d872e
+Source-MD5: 15d8c0717c646de2e946e1eb408feec7
 PatchFile: %n.patch
-PatchFile-MD5: 45018c889a180dba96c3e127b56167b4
+PatchFile-MD5: 30906d231aca6bdbdd47d8f17d0e76f9
+PatchScript: patch -p2 <%{PatchFile}
 SetCPPFLAGS: -I%p/include/ncursesw
 ConfigureParams: --disable-dependency-tracking --enable-utf8
 ###
 # Debugging:
-#  SetCFLAGS: -Wall -Wextra -std=gnu99 -pedantic
-#  ConfigureParams: --enable-dependency-tracking --enable-utf8 --enable-debug
+#SetCFLAGS: -Wall -Wextra -std=gnu99 -pedantic
+#ConfigureParams: --enable-dependency-tracking --enable-utf8 --enable-debug
 ###
 InstallScript: <<
  /usr/bin/make install prefix=%i
@@ -54,6 +55,6 @@
  The sample config was in %p/share/doc/nano/nanorc.sample and %p/etc/nanorc
 <<
 DescPort: <<
- This version of nano includes all changes from svn since 2.1.10 release.
- Current svn version is: r4403
+ This version of nano includes all changes from svn since 2.1.11 release.
+ Current svn version is: r4414
 <<

Index: nano-cur.patch
===================================================================
RCS file: 
/cvsroot/fink/dists/10.4/unstable/main/finkinfo/editors/nano-cur.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- nano-cur.patch      18 Aug 2009 07:31:08 -0000      1.1
+++ nano-cur.patch      3 Nov 2009 07:07:59 -0000       1.2
@@ -1,729 +1,62 @@
-diff -x .svn -rauN nano_2_1_10/ChangeLog trunk/nano/ChangeLog
---- nano_2_1_10/ChangeLog      2009-08-18 06:20:40.000000000 +0000
-+++ trunk/nano/ChangeLog       2009-08-18 06:13:46.000000000 +0000
-@@ -1,4 +1,18 @@
-+2009-08-17 Mike Frysinger <[email protected]>
-+      * doc/syntax/(gentoo|sh|tcl).nanorc: Fix problems with empty regexes on 
POSIX.
-+        Fixes Savannah bug 27175.
-+
-+2009-08-17 Chris Allegretta <[email protected]>
-+      * Initial soft line wrapping implementation.  Command line flags
-+        -$ or --softwrap.  
-+      * nano.c, text.c: Clean up some fprintf warnings in debug mode due to 
printing
-+        a size_t without using the zd specifier.
-+2009-08-13 Chris Allegretta <[email protected]>
-+      * New global flag implementation courtesy of Adam Wysocki 
<[email protected]>, allows
-+        previous undo flag to be implemented consistent with other flags.
-+
- GNU nano 2.1.10 - 2009.07.28
-+
- 2009-07-27 Chris Allegretta <[email protected]>
-       * text.c (undo_cut, redo_cut): Don't actually try and undo/redo an 
empty cut, i.e. the magicline. 
-         Fixes crash on cutting last line discovered by Eitan Adler 
<[email protected]>.
-diff -x .svn -rauN nano_2_1_10/TODO trunk/nano/TODO
---- nano_2_1_10/TODO   2009-08-18 06:20:40.000000000 +0000
-+++ trunk/nano/TODO    2009-08-18 06:13:46.000000000 +0000
-@@ -24,7 +24,6 @@
-   allow movement between them with a single keystroke? (we're running 
-   out of keystrokes)
- - Allow searching for and replacing newlines.
--- Allow soft wrapping as well as hard wrapping?
- - Fix handling of bad/incomplete UTF-8 sequences to display one Unicode
-   FFFD (Replacement Character) per sequence instead of one per byte.
- 
-@@ -48,6 +47,7 @@
- - Allow nano to work like a pager (read from stdin) [DONE]
- - Allow color syntaxes to be selected based on more than just filename
-   extension, [DONE]
-+- Allow soft wrapping as well as hard wrapping? [DONE]
- 
- For version 2.0:
- - UTF-8 support. [DONE]
-@@ -95,4 +95,4 @@
- - Unjustify command (^U after ^J) [DONE =-].
- - Username completion (~user) [DONE =-].
- 
--$Id$
-+$Id$
-diff -x .svn -rauN nano_2_1_10/doc/man/nano.1 trunk/nano/doc/man/nano.1
---- nano_2_1_10/doc/man/nano.1 2009-08-18 06:19:19.000000000 +0000
-+++ trunk/nano/doc/man/nano.1  2009-08-18 06:12:35.000000000 +0000
-@@ -18,7 +18,7 @@
- .\"   Documentation License along with this program.  If not, see
- .\"   <http://www.gnu.org/licenses/>.
- .\"
--.\" $Id$
-+.\" $Id$
- .TH NANO 1 "version 2.0.0" "August 23, 2007"
- .\" Please adjust this date whenever revising the manpage.
- .\"
-@@ -205,6 +205,13 @@
- .B \-z (\-\-suspend)
- Enable suspend ability.
- .TP
-+.B \-$ (\-\-softwrap)
-+Enable 'soft wrapping'.  Nano will attempt to display lines the entire 
-+contents of a line, even if it is longer than the screen width.
-+Since '$' normally refers to a variable in the Unix shell, you should
-+specify this option last when using other options (e.g. 'nano -wS$') 
-+or pass it separately (e.g. 'nano -wS -$'). 
-+.TP
- .B \-a, \-b, \-e, \-f, \-g, \-j
- Ignored, for compatibility with Pico.
- 
-diff -x .svn -rauN nano_2_1_10/doc/man/nanorc.5 trunk/nano/doc/man/nanorc.5
---- nano_2_1_10/doc/man/nanorc.5       2009-08-18 06:19:19.000000000 +0000
-+++ trunk/nano/doc/man/nanorc.5        2009-08-18 06:12:35.000000000 +0000
-@@ -18,7 +18,7 @@
- .\"   Documentation License along with this program.  If not, see
- .\"   <http://www.gnu.org/licenses/>.
- .\"
--.\" $Id$
-+.\" $Id$
- .TH NANORC 5 "version 2.0.0" "August 23, 2007"
- .\" Please adjust this date whenever revising the manpage.
- .\"
-@@ -185,6 +185,9 @@
- .B set/unset smooth
- Use smooth scrolling by default.
- .TP
-+.B set/unset softwrap
-+Enable soft line wrapping for easier viewing of very long lones.
-+.TP
- .B set speller "\fIspellprog\fP"
- Use spelling checker \fIspellprog\fP instead of the built-in one, which
- calls \fIspell\fP.
-@@ -208,6 +211,9 @@
- .B set/unset view
- Disallow file modification.
- .TP
-+.B set/unset softwrap
-+Enable soft line wrapping for easier viewing of very long lones.
-+.TP
- .B set whitespace "\fIstring\fP"
- Set the two characters used to display the first characters of tabs and
- spaces.  They must be single-column characters.
-diff -x .svn -rauN nano_2_1_10/doc/syntax/gentoo.nanorc 
trunk/nano/doc/syntax/gentoo.nanorc
---- nano_2_1_10/doc/syntax/gentoo.nanorc       2009-08-18 06:19:13.000000000 
+0000
-+++ trunk/nano/doc/syntax/gentoo.nanorc        2009-08-18 06:12:30.000000000 
+0000
-@@ -20,10 +20,10 @@
- color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>" 
"\<e(aclocal|auto(reconf|header|conf|make))\>"
- color brightblue "\<built_with_use\>" "\<make_desktop_entry\>" 
"\<unpack(_(makeself|pdv))?\>"
- color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" 
"\<(has|best)_version\>"
--color brightblue 
"\<(do|new)(ins|(games)?s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
-+color brightblue 
"\<(do|new)(ins|(games)?s?bin|doc|lib(\.so|\.a)?|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
- color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
--color brightblue "prepall(|docs|info|man|strip)" 
"prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)"
--color brightblue "\<(|doc|ins|exe)into\>" "\<(f|games)(owners|perms)\>" 
"\<(exe|ins|dir)opts\>"
-+color brightblue "prepall(docs|info|man|strip)?" 
"prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)"
-+color brightblue "\<(doc|ins|exe)?into\>" "\<(f|games)(owners|perms)\>" 
"\<(exe|ins|dir)opts\>"
- ## Highlight common commands used in ebuilds
- color blue "\<make\>" 
"\<(awk|cat|cd|chmod|chown|cp|echo|env|export|find|e?grep|ln|mkdir|mv|rm|sed|set|tar|touch|unset|xargs)\>"
- ## Highlight comments (doesnt work that well)
-diff -x .svn -rauN nano_2_1_10/doc/syntax/sh.nanorc 
trunk/nano/doc/syntax/sh.nanorc
---- nano_2_1_10/doc/syntax/sh.nanorc   2009-08-18 06:19:13.000000000 +0000
-+++ trunk/nano/doc/syntax/sh.nanorc    2009-08-18 06:12:30.000000000 +0000
-@@ -1,7 +1,7 @@
- ## Here is an example for Bourne shell scripts.
- ##
- syntax "sh" "\.sh$"
--header "^#!.*/(ba|k|pdk|)sh[-0-9_]*"
-+header "^#!.*/(ba|k|pdk)?sh[-0-9_]*"
- icolor brightgreen "^[0-9A-Z_]+\(\)"
- color green 
"\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
- color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
-diff -x .svn -rauN nano_2_1_10/doc/syntax/tcl.nanorc 
trunk/nano/doc/syntax/tcl.nanorc
---- nano_2_1_10/doc/syntax/tcl.nanorc  2009-08-18 06:19:13.000000000 +0000
-+++ trunk/nano/doc/syntax/tcl.nanorc   2009-08-18 06:12:30.000000000 +0000
-@@ -13,4 +13,4 @@
- color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
- icolor brightred "\$\{?[0-9a-...@#$*?-]+\}?"
- color ,green "[[:space:]]+$"
--color ,magenta "^([[:space:]]+|)#.*"
-+color ,magenta "^[[:space:]]*#.*"
-diff -x .svn -rauN nano_2_1_10/src/global.c trunk/nano/src/global.c
---- nano_2_1_10/src/global.c   2009-08-18 06:19:05.000000000 +0000
-+++ trunk/nano/src/global.c    2009-08-18 06:12:27.000000000 +0000
-@@ -1,4 +1,4 @@
--/* $Id$ */
-+/* $Id$ */
- /**************************************************************************
-  *   global.c                                                             *
-  *                                                                        *
-@@ -36,9 +36,6 @@
- bool jump_buf_main = FALSE;
-       /* Have we set jump_buf so that we return to main() after a
-        * SIGWINCH? */
--bool use_undo = FALSE;
--      /* Are we actually using the undo code - disabled by default
--         as the undo code is too unstable */
- #endif
- 
- #ifndef DISABLE_WRAPJUSTIFY
-@@ -55,7 +52,7 @@
- char *last_replace = NULL;
-       /* The last replacement string we searched for. */
- 
--long flags = 0;
-+unsigned flags[4] = {0, 0, 0, 0};
-       /* Our flag containing the states of all global options. */
- WINDOW *topwin;
-       /* The top portion of the window, where we display the version
-@@ -781,7 +778,7 @@
-     add_to_funcs(DO_UNINDENT, MMAIN, N_("Unindent Text"),
-       IFSCHELP(nano_unindent_msg), FALSE, NOVIEW);
- 
--    if (use_undo) {
-+    if (ISSET(UNDOABLE)) {
-       add_to_funcs(DO_UNDO, MMAIN, N_("Undo"),
-           IFSCHELP(nano_undo_msg), FALSE, NOVIEW);
- 
-@@ -1069,7 +1066,7 @@
-     add_to_sclist(MMAIN, "M-6", DO_COPY_TEXT, 0, TRUE);
-     add_to_sclist(MMAIN, "M-}", DO_INDENT_VOID, 0, TRUE);
-     add_to_sclist(MMAIN, "M-{", DO_UNINDENT, 0, TRUE);
--    if (use_undo) {
-+    if (ISSET(UNDOABLE)) {
-       add_to_sclist(MMAIN, "M-U", DO_UNDO, 0, TRUE);
-       add_to_sclist(MMAIN, "M-E", DO_REDO, 0, TRUE);
-     }
-@@ -1167,6 +1164,7 @@
-     add_to_sclist(MMAIN, "M-M", DO_TOGGLE, USE_MOUSE, TRUE);
-     add_to_sclist(MMAIN, "M-N", DO_TOGGLE, NO_CONVERT, TRUE);
-     add_to_sclist(MMAIN, "M-Z", DO_TOGGLE, SUSPEND, TRUE);
-+    add_to_sclist(MMAIN, "M-$", DO_TOGGLE, SOFTWRAP, TRUE);
- #endif
-     add_to_sclist(MGOTOLINE, "^T",  GOTOTEXT_MSG, 0, FALSE);
-     add_to_sclist(MINSERTFILE|MEXTCMD, "M-F",  NEW_BUFFER_MSG, 0, FALSE);
-@@ -1379,6 +1377,8 @@
-             return N_("No conversion from DOS/Mac format");
-         case SUSPEND:
-             return N_("Suspension");
-+        case SOFTWRAP:
-+            return N_("Soft line wrapping");
-         default:
-             return "?????";
-     }
-diff -x .svn -rauN nano_2_1_10/src/nano.c trunk/nano/src/nano.c
---- nano_2_1_10/src/nano.c     2009-08-18 06:19:05.000000000 +0000
-+++ trunk/nano/src/nano.c      2009-08-18 06:12:27.000000000 +0000
-@@ -1,4 +1,4 @@
--/* $Id$ */ 
-+/* $Id$ */ 
- /**************************************************************************
-  *   nano.c                                                               *
-  *                                                                        *
-@@ -901,6 +901,7 @@
- #endif
-     print_opt("-x", "--nohelp", N_("Don't show the two help lines"));
-     print_opt("-z", "--suspend", N_("Enable suspension"));
-+    print_opt("-$", "--softwrap", N_("Enable soft line wrapping"));
- 
-     /* This is a special case. */
-     print_opt("-a, -b, -e,", "", NULL);
-@@ -1333,6 +1334,9 @@
-           edit_refresh();
-           break;
- #endif
-+      case SOFTWRAP:
-+          total_refresh();
-+          break;
-     }
- 
-     enabled = ISSET(flag);
-@@ -1733,7 +1737,7 @@
- 
- 
- #ifdef DEBUG
--          fprintf(stderr, "working on lineno %d\n", fileptr->lineno);
-+          fprintf(stderr, "working on lineno %zd\n", fileptr->lineno);
- #endif
- 
-               alloc_multidata_if_needed(fileptr);
-@@ -1766,7 +1770,7 @@
-                   for (endptr = fileptr->next; endptr != NULL; endptr = 
endptr->next) {
- 
- #ifdef DEBUG
--          fprintf(stderr, "advancing to line %d to find end...\n", 
endptr->lineno);
-+          fprintf(stderr, "advancing to line %zd to find end...\n", 
endptr->lineno);
- #endif
-                       /* Check for keyboard input  again */
-                       if ((cur_check = time(NULL)) - last_check > 1) {
-@@ -1794,18 +1798,18 @@
-                       lines in between and the ends properly */
-                   fileptr->multidata[tmpcolor->id] |= CENDAFTER;
- #ifdef DEBUG
--                  fprintf(stderr, "marking line %d as CENDAFTER\n", 
fileptr->lineno);
-+                  fprintf(stderr, "marking line %zd as CENDAFTER\n", 
fileptr->lineno);
- #endif
-                   for (fileptr = fileptr->next; fileptr != endptr; fileptr = 
fileptr->next) {
-                       alloc_multidata_if_needed(fileptr);
-                       fileptr->multidata[tmpcolor->id] = CWHOLELINE;
- #ifdef DEBUG
--                      fprintf(stderr, "marking intermediary line %d as 
CWHOLELINE\n", fileptr->lineno);
-+                      fprintf(stderr, "marking intermediary line %zd as 
CWHOLELINE\n", fileptr->lineno);
- #endif
-                   }
-                   alloc_multidata_if_needed(endptr);
- #ifdef DEBUG
--                  fprintf(stderr, "marking line %d as BEGINBEFORE\n", 
fileptr->lineno);
-+                  fprintf(stderr, "marking line %zd as BEGINBEFORE\n", 
fileptr->lineno);
- #endif
-                   endptr->multidata[tmpcolor->id] |= CBEGINBEFORE;
-                   /* We should be able to skip all the way to the line of the 
match.
-@@ -1813,12 +1817,12 @@
-                   fileptr = endptr;
-                   startx = endmatch.rm_eo;
- #ifdef DEBUG
--                  fprintf(stderr, "jumping to line %d pos %d to continue\n", 
endptr->lineno, startx);
-+                  fprintf(stderr, "jumping to line %zd pos %d to continue\n", 
endptr->lineno, startx);
- #endif
-               }
-               if (nostart && startx == 0) {
- #ifdef DEBUG
--                  fprintf(stderr, "no start found on line %d, continuing\n", 
fileptr->lineno);
-+                  fprintf(stderr, "no start found on line %zd, continuing\n", 
fileptr->lineno);
- #endif
-                   fileptr->multidata[tmpcolor->id] = CNONE;
-                   continue;
-@@ -2020,6 +2024,7 @@
-       {"wordbounds", 0, NULL, 'W'},
-       {"autoindent", 0, NULL, 'i'},
-       {"cut", 0, NULL, 'k'},
-+      {"softwrap", 0, NULL, '$'},
- #endif
-       {NULL, 0, NULL, 0}
-     };
-@@ -2058,11 +2063,11 @@
-     while ((optchr =
- #ifdef HAVE_GETOPT_LONG
-       getopt_long(argc, argv,
--              "h?ABC:DEFHIKLNOQ:RST:UVWY:abcdefgijklmo:pqr:s:tuvwxz",
-+              "h?ABC:DEFHIKLNOQ:RST:UVWY:abcdefgijklmo:pqr:s:tuvwxz$",
-               long_options, NULL)
- #else
-       getopt(argc, argv,
--              "h?ABC:DEFHIKLNOQ:RST:UVWY:abcdefgijklmo:pqr:s:tuvwxz")
-+              "h?ABC:DEFHIKLNOQ:RST:UVWY:abcdefgijklmo:pqr:s:tuvwxz$")
- #endif
-               ) != -1) {
-       switch (optchr) {
-@@ -2213,7 +2218,7 @@
-               break;
- #ifndef NANO_TINY
-           case 'u':
--              use_undo = TRUE;
-+              SET(UNDOABLE);
-               break;
- #endif
-           case 'v':
-@@ -2230,6 +2235,11 @@
-           case 'z':
-               SET(SUSPEND);
-               break;
-+#ifndef NANO_TINY
-+          case '$':
-+              SET(SOFTWRAP);
-+              break;
-+#endif
-           default:
-               usage();
-       }
-@@ -2277,7 +2287,10 @@
-       char *alt_speller_cpy = alt_speller;
- #endif
-       ssize_t tabsize_cpy = tabsize;
--      long flags_cpy = flags;
-+      unsigned flags_cpy[sizeof(flags) / sizeof(flags[0])];
-+      size_t i;
+diff -rauNx .svn tags/nano_2_1_11/ChangeLog trunk/nano/ChangeLog
+--- tags/nano_2_1_11/ChangeLog 2009-11-02 11:55:30.000000000 +0000
++++ trunk/nano/ChangeLog       2009-11-02 11:53:24.000000000 +0000
+@@ -1,3 +1,11 @@
++2009-10-27 Chris Allegretta <[email protected]>
++      * browser.c (browser_init): Set column width to something sane when 
++        initializing in a directory with no file entries.  Fixes Savannah
++        bug 24163 found (and initial patch) by Paul Wise.
 +
-+      memcpy(flags_cpy, flags, sizeof(flags_cpy));
- 
- #ifndef DISABLE_OPERATINGDIR
-       operating_dir = NULL;
-@@ -2329,7 +2342,9 @@
- #endif
-       if (tabsize_cpy != -1)
-           tabsize = tabsize_cpy;
--      flags |= flags_cpy;
++2009-09-15 Chris Allegretta <[email protected]>
++      * winio.c: Clean up some unused variables from the soft wrapping code.
 +
-+      for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++)
-+          flags[i] |= flags_cpy[i];
-     }
- #ifdef DISABLE_ROOTWRAPPING
-     /* If we don't have any rcfiles, --disable-wrapping-as-root is used,
-diff -x .svn -rauN nano_2_1_10/src/nano.h trunk/nano/src/nano.h
---- nano_2_1_10/src/nano.h     2009-08-18 06:19:05.000000000 +0000
-+++ trunk/nano/src/nano.h      2009-08-18 06:12:27.000000000 +0000
-@@ -1,4 +1,4 @@
--/* $Id$ */
-+/* $Id$ */
- /**************************************************************************
-  *   nano.h                                                               *
-  *                                                                        *
-@@ -55,10 +55,13 @@
- #endif
- 
- /* Macros for flags. */
--#define SET(bit) flags |= bit
--#define UNSET(bit) flags &= ~bit
--#define ISSET(bit) ((flags & bit) != 0)
--#define TOGGLE(bit) flags ^= bit
-+#define FLAGOFF(flag) ((flag) / (sizeof(unsigned) * 8))
-+#define FLAGMASK(flag) (1 << ((flag) % (sizeof(unsigned) * 8)))
-+#define FLAGS(flag) flags[FLAGOFF(flag)]
-+#define SET(flag) FLAGS(flag) |= FLAGMASK(flag)
-+#define UNSET(flag) FLAGS(flag) &= ~FLAGMASK(flag)
-+#define ISSET(flag) ((FLAGS(flag) & FLAGMASK(flag)) != 0)
-+#define TOGGLE(flag) FLAGS(flag) ^= FLAGMASK(flag)
- 
- /* Macros for character allocation and more. */
- #define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char))
-@@ -450,40 +453,45 @@
- } subnfunc;
- 
- 
--/* Bitwise flags so that we can save space (or, more correctly, not
-- * waste it). */
--#define CASE_SENSITIVE                        (1<<0)
--#define CONST_UPDATE                  (1<<1)
--#define NO_HELP                               (1<<2)
--#define NOFOLLOW_SYMLINKS             (1<<3)
--#define SUSPEND                               (1<<4)
--#define NO_WRAP                               (1<<5)
--#define AUTOINDENT                    (1<<6)
--#define VIEW_MODE                     (1<<7)
--#define USE_MOUSE                     (1<<8)
--#define USE_REGEXP                    (1<<9)
--#define TEMP_FILE                     (1<<10)
--#define CUT_TO_END                    (1<<11)
--#define BACKWARDS_SEARCH              (1<<12)
--#define MULTIBUFFER                   (1<<13)
--#define SMOOTH_SCROLL                 (1<<14)
--#define REBIND_DELETE                 (1<<15)
--#define REBIND_KEYPAD                 (1<<16)
--#define NO_CONVERT                    (1<<17)
--#define BACKUP_FILE                   (1<<18)
--#define NO_COLOR_SYNTAX                       (1<<19)
--#define PRESERVE                      (1<<20)
--#define HISTORYLOG                    (1<<21)
--#define RESTRICTED                    (1<<22)
--#define SMART_HOME                    (1<<23)
--#define WHITESPACE_DISPLAY            (1<<24)
--#define MORE_SPACE                    (1<<25)
--#define TABS_TO_SPACES                        (1<<26)
--#define QUICK_BLANK                   (1<<27)
--#define WORD_BOUNDS                   (1<<28)
--#define NO_NEWLINES                   (1<<29)
--#define BOLD_TEXT                     (1<<30)
--#define QUIET                         (1<<31)
-+/* Enumeration to be used in flags table. See FLAGBIT and FLAGOFF 
-+ * definitions. */
-+enum
-+{
-+    CASE_SENSITIVE,
-+    CONST_UPDATE,
-+    NO_HELP,
-+    NOFOLLOW_SYMLINKS,
-+    SUSPEND,
-+    NO_WRAP,
-+    AUTOINDENT,
-+    VIEW_MODE,
-+    USE_MOUSE,
-+    USE_REGEXP,
-+    TEMP_FILE,
-+    CUT_TO_END,
-+    BACKWARDS_SEARCH,
-+    MULTIBUFFER,
-+    SMOOTH_SCROLL,
-+    REBIND_DELETE,
-+    REBIND_KEYPAD,
-+    NO_CONVERT,
-+    BACKUP_FILE,
-+    NO_COLOR_SYNTAX,
-+    PRESERVE,
-+    HISTORYLOG,
-+    RESTRICTED,
-+    SMART_HOME,
-+    WHITESPACE_DISPLAY,
-+    MORE_SPACE,
-+    TABS_TO_SPACES,
-+    QUICK_BLANK,
-+    WORD_BOUNDS,
-+    NO_NEWLINES,
-+    BOLD_TEXT,
-+    QUIET,
-+    UNDOABLE,
-+    SOFTWRAP,
-+};
- 
- /* Flags for which menus in which a given function should be present */
- #define MMAIN                         (1<<0)
-diff -x .svn -rauN nano_2_1_10/src/proto.h trunk/nano/src/proto.h
---- nano_2_1_10/src/proto.h    2009-08-18 06:19:05.000000000 +0000
-+++ trunk/nano/src/proto.h     2009-08-18 06:12:27.000000000 +0000
-@@ -1,4 +1,4 @@
--/* $Id$ */
-+/* $Id$ */
- /**************************************************************************
-  *   proto.h                                                              *
-  *                                                                        *
-@@ -41,7 +41,7 @@
- extern char *last_search;
- extern char *last_replace;
- 
--extern long flags;
-+extern unsigned flags[4];
- extern WINDOW *topwin;
- extern WINDOW *edit;
- extern WINDOW *bottomwin;
-@@ -765,7 +765,7 @@
- void reset_cursor(void);
- void edit_draw(filestruct *fileptr, const char *converted, int
-       line, size_t start);
--void update_line(filestruct *fileptr, size_t index);
-+int update_line(filestruct *fileptr, size_t index);
- bool need_horizontal_update(size_t pww_save);
- bool need_vertical_update(size_t pww_save);
- void edit_scroll(scroll_dir direction, ssize_t nlines);
-diff -x .svn -rauN nano_2_1_10/src/rcfile.c trunk/nano/src/rcfile.c
---- nano_2_1_10/src/rcfile.c   2009-08-18 06:19:05.000000000 +0000
-+++ trunk/nano/src/rcfile.c    2009-08-18 06:12:27.000000000 +0000
+ GNU nano 2.1.11 - 2009.09.14
+ 2009-09-12 Chris Allegretta <[email protected]>
+       * winio.c (edit_update) - properly update edittop when using soft 
wrapping.
+diff -rauNx .svn tags/nano_2_1_11/src/browser.c trunk/nano/src/browser.c
+--- tags/nano_2_1_11/src/browser.c     2009-11-02 11:55:22.000000000 +0000
++++ trunk/nano/src/browser.c   2009-11-02 11:53:16.000000000 +0000
 @@ -1,4 +1,4 @@
 -/* $Id$ */
 +/* $Id$ */
  /**************************************************************************
-  *   rcfile.c                                                             *
-  *                                                                        *
-@@ -92,6 +92,7 @@
-     {"undo", 0},
-     {"whitespace", 0},
-     {"wordbounds", WORD_BOUNDS},
-+    {"softwrap", SOFTWRAP},
- #endif
-     {NULL, 0}
- };
-@@ -909,15 +910,6 @@
-       option = ptr;
-       ptr = parse_next_word(ptr);
- 
--#ifndef NANO_TINY
--      /* FIXME: Hack which should go away ASAP */
--      if (strcasecmp(option,  "undo") == 0) {
--          use_undo = TRUE;
--          shortcut_init(0);
--          continue;
--      }
--#endif
--
-       for (i = 0; rcopts[i].name != NULL; i++) {
-           if (strcasecmp(option, rcopts[i].name) == 0) {
- #ifdef DEBUG
-diff -x .svn -rauN nano_2_1_10/src/text.c trunk/nano/src/text.c
---- nano_2_1_10/src/text.c     2009-08-18 06:19:05.000000000 +0000
-+++ trunk/nano/src/text.c      2009-08-18 06:12:27.000000000 +0000
-@@ -1,4 +1,4 @@
--/* $Id$ */ 
-+/* $Id$ */ 
- /**************************************************************************
-  *   text.c                                                               *
+  *   browser.c                                                            *
   *                                                                        *
-@@ -409,7 +409,7 @@
-       for (c = u->cutbuffer, t = openfile->current; c->next != NULL && 
t->next != NULL; ) {
- 
- #ifdef DEBUG
--      fprintf(stderr, "Advancing, lineno  = %d, data = \"%s\"\n", t->lineno, 
t->data);
-+      fprintf(stderr, "Advancing, lineno  = %zd, data = \"%s\"\n", t->lineno, 
t->data);
- #endif
-           c = c->next;
-           t = t->next;
-@@ -837,7 +837,7 @@
-     static undo *last_cutu = NULL; /* Last thing we cut to set up the undo 
for uncut */
-     ssize_t wrap_loc; /* For calculating split beginning */
- 
--    if (!use_undo)
-+    if (!ISSET(UNDOABLE))
-       return;
- 
-     /* Ugh, if we were called while cutting not-to-end, non-marked and on the 
same lineno,
-@@ -943,7 +943,7 @@
+@@ -534,9 +534,9 @@
      }
  
- #ifdef DEBUG
--    fprintf(stderr, "fs->current->data = \"%s\", current_x = %d, u->begin = 
%d, type = %d\n",
-+    fprintf(stderr, "fs->current->data = \"%s\", current_x = %zd, u->begin = 
%d, type = %d\n",
-                       fs->current->data,  fs->current_x, u->begin, 
current_action);
-     fprintf(stderr, "left add_undo...\n");
- #endif
-@@ -962,14 +962,14 @@
-     int len = 0;
-     openfilestruct *fs = openfile;
- 
--    if (!use_undo)
-+    if (!ISSET(UNDOABLE))
-       return;
+     /* If width isn't initialized yet, and we've taken up only one line,
+-     * it means that width is equal to (COLS % longest). */
++     * it means that width is equal to longest. */
+     if (width == 0)
+-      width = COLS % longest;
++      width = longest;
+ }
  
- #ifdef DEBUG
--        fprintf(stderr, "action = %d, fs->last_action = %d,  
openfile->current->lineno = %d",
-+        fprintf(stderr, "action = %d, fs->last_action = %d,  
openfile->current->lineno = %zd",
-               action, fs->last_action, openfile->current->lineno);
-       if (fs->current_undo)
--          fprintf(stderr, "fs->current_undo->lineno = %d\n",  
fs->current_undo->lineno);
-+          fprintf(stderr, "fs->current_undo->lineno = %zd\n",  
fs->current_undo->lineno);
-       else
-           fprintf(stderr, "\n");
- #endif
-@@ -989,7 +989,7 @@
-     switch (u->type) {
-     case ADD:
- #ifdef DEBUG
--        fprintf(stderr, "fs->current->data = \"%s\", current_x = %d, u->begin 
= %d\n",
-+        fprintf(stderr, "fs->current->data = \"%s\", current_x = %zd, 
u->begin = %d\n",
-                       fs->current->data,  fs->current_x, u->begin);
- #endif
-         len = strlen(u->strdata) + 2;
-diff -x .svn -rauN nano_2_1_10/src/winio.c trunk/nano/src/winio.c
---- nano_2_1_10/src/winio.c    2009-08-18 06:19:05.000000000 +0000
-+++ trunk/nano/src/winio.c     2009-08-18 06:12:27.000000000 +0000
+ /* Determine the shortcut key corresponding to the values of kbinput
+diff -rauNx .svn tags/nano_2_1_11/src/winio.c trunk/nano/src/winio.c
+--- tags/nano_2_1_11/src/winio.c       2009-11-02 11:55:22.000000000 +0000
++++ trunk/nano/src/winio.c     2009-11-02 11:53:16.000000000 +0000
 @@ -1,4 +1,4 @@
 -/* $Id$ */
 +/* $Id$ */
  /**************************************************************************
   *   winio.c                                                              *
   *                                                                        *
-@@ -2426,6 +2426,7 @@
-  * in the edit window at (current_y, current_x). */
- void reset_cursor(void)
- {
-+    size_t xpt;
-     /* If we haven't opened any files yet, put the cursor in the top
-      * left corner of the edit window and get out. */
-     if (openfile == NULL) {
-@@ -2433,13 +2434,24 @@
-       return;
-     }
- 
--    openfile->current_y = openfile->current->lineno -
--      openfile->edittop->lineno;
--    if (openfile->current_y < editwinrows) {
--      size_t xpt = xplustabs();
-+    xpt = xplustabs();
- 
--      wmove(edit, openfile->current_y, xpt - get_page_start(xpt));
--     }
-+    if (ISSET(SOFTWRAP)) {
-+      openfile->current_y = 0;
-+      filestruct *tmp;
-+      for (tmp = openfile->edittop; tmp != openfile->current; tmp = tmp->next)
-+          openfile->current_y += 1 + strlenpt(tmp->data) / COLS;
-+
-+      openfile->current_y += xplustabs() / COLS;
-+      if (openfile->current_y < editwinrows)
-+          wmove(edit, openfile->current_y, xpt % COLS);
-+    } else {
-+      openfile->current_y = openfile->current->lineno -
-+          openfile->edittop->lineno;
-+
-+      if (openfile->current_y < editwinrows)
-+          wmove(edit, openfile->current_y, xpt - get_page_start(xpt));
-+    }
- }
- 
- /* edit_draw() takes care of the job of actually painting a line into
-@@ -2813,19 +2825,35 @@
- 
- /* Just update one line in the edit buffer.  This is basically a wrapper
-  * for edit_draw().  The line will be displayed starting with
-- * fileptr->data[index].  Likely arguments are current_x or zero. */
--void update_line(filestruct *fileptr, size_t index)
-+ * fileptr->data[index].  Likely arguments are current_x or zero.
-+ * Returns: Number of additiona lines consumed (needed for SOFTWRAP)
-+ */
-+int update_line(filestruct *fileptr, size_t index)
- {
--    int line;
-+    int line = 0;
-+    int extralinesused = 0;
-       /* The line in the edit window that we want to update. */
-     char *converted;
-       /* fileptr->data converted to have tabs and control characters
-        * expanded. */
-     size_t page_start;
-+    filestruct *tmp;
- 
-     assert(fileptr != NULL);
- 
--    line = fileptr->lineno - openfile->edittop->lineno;
-+    if (ISSET(SOFTWRAP)) {
-+      for (tmp = openfile->edittop; tmp != fileptr; tmp = tmp->next) {
-+          line += 1 + (strlenpt(tmp->data) / COLS);
-+#ifdef DEBUG
-+          fprintf(stderr, "update_line(): inside loop, line = %d\n", line);
-+#endif
-+      }
-+    } else
-+      line = fileptr->lineno - openfile->edittop->lineno;
-+
-+#ifdef DEBUG
-+      fprintf(stderr, "update_line(): line = %d\n", line);
-+#endif
+@@ -2849,7 +2849,7 @@
+       line = fileptr->lineno - openfile->edittop->lineno;
  
      if (line < 0 || line >= editwinrows)
-       return;
-@@ -2835,7 +2863,10 @@
- 
-     /* Next, convert variables that index the line to their equivalent
-      * positions in the expanded line. */
--    index = strnlenpt(fileptr->data, index);
-+    if (ISSET(SOFTWRAP))
-+      index = 0;
-+    else
-+      index = strnlenpt(fileptr->data, index);
-     page_start = get_page_start(index);
- 
-     /* Expand the line, replacing tabs with spaces, and control
-@@ -2846,10 +2877,31 @@
-     edit_draw(fileptr, converted, line, page_start);
-     free(converted);
- 
--    if (page_start > 0)
--      mvwaddch(edit, line, 0, '$');
--    if (strlenpt(fileptr->data) > page_start + COLS)
--      mvwaddch(edit, line, COLS - 1, '$');
-+    if (!ISSET(SOFTWRAP)) {
-+      if (page_start > 0)
-+          mvwaddch(edit, line, 0, '$');
-+      if (strlenpt(fileptr->data) > page_start + COLS)
-+          mvwaddch(edit, line, COLS - 1, '$');
-+    } else {
-+        int full_length = strlenpt(fileptr->data);
-+      for (index += COLS; index < full_length && line < editwinrows; index += 
COLS) {
-+          line++;
-+#ifdef DEBUG
-+          fprintf(stderr, "update_line(): Softwrap code, moving to %d\n", 
line);
-+#endif
-+          blank_line(edit, line, 0, COLS);
-+
-+          /* Expand the line, replacing tabs with spaces, and control
-+           * characters with their displayed forms. */
-+          converted = display_string(fileptr->data, index, COLS, TRUE);
-+
-+          /* Paint the line. */
-+          edit_draw(fileptr, converted, line, index);
-+          free(converted);
-+          extralinesused++;
-+      }
-+    }
-+    return extralinesused;
- }
+-      return;
++      return 1;
  
- /* Return TRUE if we need an update after moving horizontally, and FALSE
-@@ -3115,7 +3167,7 @@
- #endif
+     /* First, blank out the line. */
+     blank_line(edit, line, 0, COLS);
+@@ -3076,7 +3076,6 @@
+     bool do_redraw = need_vertical_update(0) ||
+       need_vertical_update(pww_save);
+     filestruct *foo = NULL;
+-    ssize_t i = 0, extracuzsoft = 0;
  
-     for (nlines = 0; nlines < editwinrows && foo != NULL; nlines++) {
--      update_line(foo, (foo == openfile->current) ?
-+      nlines += update_line(foo, (foo == openfile->current) ?
-               openfile->current_x : 0);
-       foo = foo->next;
-     }
+     /* If either old_current or current is offscreen, scroll the edit
+      * window until it's onscreen and get out. */


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to