Changeset 95f1c95 in clfs-sysroot


Ignore:
Timestamp:
Feb 6, 2007, 12:57:56 PM (17 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
master
Children:
b8f0f75
Parents:
7ea0123
Message:

Update patches.

Location:
patches
Files:
2 moved

Legend:

Unmodified
Added
Removed
  • patches/glibc-2.5-branch_update-3.patch

    r7ea0123 r95f1c95  
    11Submitted By: Jim Gifford <jim at linuxfromscratch dot org>
    22Original Submission By: Robert Connolly <robert at linuxfromscratch dot org>
    3 Date: 2007-01-12
     3Date: 2007-01-23
    44Initial Package Version: 2.5
    55Upstream Status: From Upstream
     
    1313diff -Naur glibc-2.5.orig/ChangeLog glibc-2.5/ChangeLog
    1414--- glibc-2.5.orig/ChangeLog    2006-09-29 11:45:39.000000000 -0700
    15 +++ glibc-2.5/ChangeLog 2007-01-12 09:20:08.000000000 -0800
    16 @@ -1,5 +1,283 @@
     15+++ glibc-2.5/ChangeLog 2007-01-12 10:24:52.000000000 -0800
     16@@ -1,5 +1,416 @@
     17+2007-01-05  Steven Munroe  <sjmunroe@us.ibm.com>
     18+
     19+       * stdlib/tst-makecontext.c: Include errno.h.  Change main()
     20+       to do_test().  Define TEST_FUNCTION. Include test-skeleton.c.
     21+       (do_test): Check errno and exit(0) if ENOSYS.
     22+
     23+2007-01-11  Jakub Jelinek  <jakub@redhat.com>
     24+
     25+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix handling of multi-byte
     26+       thousands separators.
     27+       * stdlib/Makefile: Add rules to build and run tst-strtod4.
     28+       * stdlib/tst-strtod4.c: New test.
     29+
     30+       [BZ #3855]
     31+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): 0x. not followed by
     32+       hexadecimal digit should accept just the initial 0.
     33+       * stdlib/tst-strtod2.c (tests): New variable.
     34+       (do_test): Run several tests rather than just one.
     35+
     36+2007-01-03  Ulrich Drepper  <drepper@redhat.com>
     37+
     38+       * stdlib/Makefile (tst-strtod3-ENV): Define.
     39+
     40+2006-12-11  Ulrich Drepper  <drepper@redhat.com>
     41+
     42+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand
     43+       separators also if no non-zero digits found.
     44+       * stdlib/Makefile (tests): Add tst-strtod3.
     45+
     46+2006-12-09  Ulrich Drepper  <drepper@redhat.com>
     47+
     48+       [BZ #3664]
     49+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix test to recognize
     50+       empty parsed strings.
     51+       * stdlib/Makefile (tests): Add tst-strtod2.
     52+       * stdlib/tst-strtod2.c: New file.
     53+
     54+       [BZ #3673]
     55+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix exp_limit
     56+       computation.
     57+       * stdlib/Makefile (tests): Add tst-atof2.
     58+       * stdlib/tst-atof2.c: New file.
     59+
     60+       [BZ #3674]
     61+       * stdlib/strtod_l.c (____STRTOF_INTERNAL): Adjust exponent value
     62+       correctly if removing trailing zero of hex-float.
     63+       * stdlib/Makefile (tests): Add tst-atof1.
     64+       * stdlib/tst-atof1.c: New file.
     65+
     66+2007-01-03  Ulrich Drepper  <drepper@redhat.com>
     67+
     68+       * string/Makefile (tst-strxfrm2-ENV): Define.
     69+
     70+2006-11-10  Jakub Jelinek  <jakub@redhat.com>
     71+
     72+       * string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization
     73+       if N is one bigger than return value.
     74+       * string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1
     75+       and l1 last arguments, if buf is defined, verify the return value
     76+       equals to strlen (buf) and verify no byte beyond passed length
     77+       is modified.
     78+
     79+2006-11-09  Ulrich Drepper  <drepper@redhat.com>
     80+
     81+       * string/Makefile (tests): Add tst-strxfrm2.
     82+       * string/tst-strxfrm2.c: New file.
     83+
     84+2006-11-08  Jakub Jelinek  <jakub@redhat.com>
     85+
     86+       * string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal
     87+       optimization even if needed > n.
     88+
     89+2006-12-22  Gavin Romig-Koch  <gavin@redhat.com>
     90+
     91+       * nis/nss_compat/compat-grp.c (internal_getgrgid_r): Don't
     92+       blacklist the group till after we look it up.
     93+
     94+2006-12-21  Ulrich Drepper  <drepper@redhat.com>
     95+
     96+       * include/atomic.h (atomic_forced_read): New macro.
     97+
     98+2006-12-19  Jakub Jelinek  <jakub@redhat.com>
     99+
     100+       * nss/getXXbyYY_r.c: Include atomic.h.
     101+       (INTERNAL (REENTRANT_NAME)): Write startp after start_fct,
     102+       add atomic_write_barrier () in between.
     103+
     104+2006-12-18  Jakub Jelinek  <jakub@redhat.com>
     105+
     106+       [BZ #3747]
     107+       * stdlib/jrand48_r.c (__jrand48_r): Make sure result is in the
     108+       [-231 .. 231) range.
     109+       * stdlib/tst-rand48.c (main): Fix expected values for 64-bit
     110+       targets.
     111+       * stdlib/tst-rand48-2.c: New test.
     112+       * stdlib/Makefile (tests): Add tst-rand48-2.
     113+
     114+2006-12-14  Jakub Jelinek  <jakub@redhat.com>
     115+
     116+       * misc/tst-pselect.c (do_test): Fix sigblock argument.
     117+
     118+2006-12-14  Ulrich Drepper  <drepper@redhat.com>
     119+
     120+       * misc/tst-pselect.c (do_test): Make sure the helper process is
     121+       terminating when the test is aborted.
     122+
     123+2006-12-13  Ulrich Drepper  <drepper@redhat.com>
     124+
     125+       [BZ #2337]
     126+       * libio/Makefile (tests): Add tst-setvbuf1.
     127+       * libio/tst-setvbuf1.c: New file.
     128+
     129+2006-12-08  Jakub Jelinek  <jakub@redhat.com>
     130+
     131+       [BZ #2337]
     132+       * libio/genops.c (__uflow): Fix a typo.
     133+       * libio/wfiledoalloc.c (_IO_wfile_doallocate): Don't stat
     134+       nor set _IO_LINE_BUF bit here.  Size the wide buffer based on
     135+       the narrow buffer size.
     136+
     137+2006-11-24  Jakub Jelinek  <jakub@redhat.com>
     138+
     139+       [BZ #2337]
     140+       * libio/libio.h (_IO_FLAGS2_USER_WBUF): Define.
     141+       * libio/wgenops.c (_IO_wsetb, _IO_wdefault_finish): Test and set
     142+       _IO_FLAGS2_USER_WBUF bit in _flags2 instead of _IO_USER_BUF bit
     143+       in _flags.
     144+       * libio/wstrops.c (_IO_wstr_overflow, enlarge_userbuf,
     145+       _IO_wstr_finish): Likewise.
     146+       * libio/wmemstream.c (open_wmemstream): Likewise.
     147+       * libio/fileops.c (_IO_new_file_close_it): Call _IO_set[bgp]
     148+       even for wide streams.
     149+
    17150+2006-12-09  Jakub Jelinek  <jakub@redhat.com>
    18151+
     
    660793+  return 0;
    661794+}
     795diff -Naur glibc-2.5.orig/include/atomic.h glibc-2.5/include/atomic.h
     796--- glibc-2.5.orig/include/atomic.h     2006-02-17 10:50:09.000000000 -0800
     797+++ glibc-2.5/include/atomic.h  2007-01-12 09:58:08.000000000 -0800
     798@@ -324,6 +324,12 @@
     799 #endif
     800 
     801 
     802+#ifndef atomic_forced_read
     803+# define atomic_forced_read(x) \
     804+  ({ __typeof (x) __x; __asm ("" : "=r" (__x) : "0" (x)); __x; })
     805+#endif
     806+
     807+
     808 #ifndef atomic_delay
     809 # define atomic_delay() do { /* nothing */ } while (0)
     810 #endif
    662811diff -Naur glibc-2.5.orig/include/features.h glibc-2.5/include/features.h
    663812--- glibc-2.5.orig/include/features.h   2006-04-25 13:34:32.000000000 -0700
     
    728877 distribute     := ftwtest-sh
    729878 
     879diff -Naur glibc-2.5.orig/io/tst-ttyname_r.c glibc-2.5/io/tst-ttyname_r.c
     880--- glibc-2.5.orig/io/tst-ttyname_r.c   1969-12-31 16:00:00.000000000 -0800
     881+++ glibc-2.5/io/tst-ttyname_r.c        2007-01-12 09:27:52.000000000 -0800
     882@@ -0,0 +1,42 @@
     883+#include <errno.h>
     884+#include <error.h>
     885+#include <fcntl.h>
     886+#include <stdio.h>
     887+#include <unistd.h>
     888+
     889+static void do_prepare (void);
     890+#define PREPARE(argc, argv) do_prepare ()
     891+static int do_test (void);
     892+#define TEST_FUNCTION do_test ()
     893+#include <test-skeleton.c>
     894+
     895+static int temp_fd;
     896+
     897+static void
     898+do_prepare (void)
     899+{
     900+  char *temp_file;
     901+  temp_fd = create_temp_file ("tst-ttyname_r.", &temp_file);
     902+  if (temp_fd == -1)
     903+    error (1, errno, "cannot create temporary file");
     904+}
     905+
     906+static int
     907+do_test (void)
     908+{
     909+  int ret = 0;
     910+  char buf[sysconf (_SC_TTY_NAME_MAX) + 1];
     911+  int res = ttyname_r (-1, buf, sizeof (buf));
     912+  if (res != EBADF)
     913+    {
     914+      printf ("1st ttyname_r returned with res %d\n", res);
     915+      ret++;
     916+    }
     917+  res = ttyname_r (temp_fd, buf, sizeof (buf));
     918+  if (res != ENOTTY)
     919+    {
     920+      printf ("2nd ttyname_r returned with res %d\n", res);
     921+      ret++;
     922+    }
     923+  return ret;
     924+}
    730925diff -Naur glibc-2.5.orig/libio/bug-wmemstream1.c glibc-2.5/libio/bug-wmemstream1.c
    731926--- glibc-2.5.orig/libio/bug-wmemstream1.c      2006-08-14 15:11:34.000000000 -0700
     
    738933 
    739934 static int
     935diff -Naur glibc-2.5.orig/libio/fileops.c glibc-2.5/libio/fileops.c
     936--- glibc-2.5.orig/libio/fileops.c      2006-01-18 16:38:35.000000000 -0800
     937+++ glibc-2.5/libio/fileops.c   2007-01-12 09:25:38.000000000 -0800
     938@@ -174,14 +174,8 @@
     939   close_status = _IO_SYSCLOSE (fp);
     940 
     941   /* Free buffer. */
     942-  if (fp->_mode <= 0)
     943-    {
     944-      INTUSE(_IO_setb) (fp, NULL, NULL, 0);
     945-      _IO_setg (fp, NULL, NULL, NULL);
     946-      _IO_setp (fp, NULL, NULL);
     947-    }
     948 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
     949-  else
     950+  if (fp->_mode > 0)
     951     {
     952       if (_IO_have_wbackup (fp))
     953        INTUSE(_IO_free_wbackup_area) (fp);
     954@@ -190,6 +184,9 @@
     955       _IO_wsetp (fp, NULL, NULL);
     956     }
     957 #endif
     958+  INTUSE(_IO_setb) (fp, NULL, NULL, 0);
     959+  _IO_setg (fp, NULL, NULL, NULL);
     960+  _IO_setp (fp, NULL, NULL);
     961 
     962   INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) fp);
     963   fp->_flags = _IO_MAGIC|CLOSED_FILEBUF_FLAGS;
     964diff -Naur glibc-2.5.orig/libio/genops.c glibc-2.5/libio/genops.c
     965--- glibc-2.5.orig/libio/genops.c       2006-02-28 21:32:48.000000000 -0800
     966+++ glibc-2.5/libio/genops.c    2007-01-12 09:25:38.000000000 -0800
     967@@ -367,7 +367,7 @@
     968 #endif
     969 
     970   if (fp->_mode == 0)
     971-    _IO_fwide (fp, -11);
     972+    _IO_fwide (fp, -1);
     973   if (_IO_in_put_mode (fp))
     974     if (INTUSE(_IO_switch_to_get_mode) (fp) == EOF)
     975       return EOF;
     976diff -Naur glibc-2.5.orig/libio/libio.h glibc-2.5/libio/libio.h
     977--- glibc-2.5.orig/libio/libio.h        2006-01-14 04:09:46.000000000 -0800
     978+++ glibc-2.5/libio/libio.h     2007-01-12 09:25:38.000000000 -0800
     979@@ -142,6 +142,7 @@
     980 #ifdef _LIBC
     981 # define _IO_FLAGS2_FORTIFY 4
     982 #endif
     983+#define _IO_FLAGS2_USER_WBUF 8
     984 
     985 /* These are "formatting flags" matching the iostream fmtflags enum values. */
     986 #define _IO_SKIPWS 01
     987diff -Naur glibc-2.5.orig/libio/Makefile glibc-2.5/libio/Makefile
     988--- glibc-2.5.orig/libio/Makefile       2006-08-14 15:12:27.000000000 -0700
     989+++ glibc-2.5/libio/Makefile    2007-01-12 09:25:38.000000000 -0800
     990@@ -57,7 +57,8 @@
     991        bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \
     992        tst-memstream1 tst-memstream2 \
     993        tst-wmemstream1 tst-wmemstream2 \
     994-       bug-memstream1 bug-wmemstream1
     995+       bug-memstream1 bug-wmemstream1 \
     996+       tst-setvbuf1
     997 test-srcs = test-freopen
     998 
     999 all: # Make this the default target; it will be defined in Rules.
     1000diff -Naur glibc-2.5.orig/libio/tst-setvbuf1.c glibc-2.5/libio/tst-setvbuf1.c
     1001--- glibc-2.5.orig/libio/tst-setvbuf1.c 1969-12-31 16:00:00.000000000 -0800
     1002+++ glibc-2.5/libio/tst-setvbuf1.c      2007-01-12 09:25:38.000000000 -0800
     1003@@ -0,0 +1,39 @@
     1004+/* Dereived from the test case in BZ #2337.  */
     1005+#include <errno.h>
     1006+#include <error.h>
     1007+#include <fcntl.h>
     1008+#include <locale.h>
     1009+#include <stdio.h>
     1010+#include <stdlib.h>
     1011+#include <string.h>
     1012+#include <unistd.h>
     1013+#include <wchar.h>
     1014+
     1015+
     1016+static char buf[512] __attribute__ ((aligned (4096)));
     1017+
     1018+
     1019+static int
     1020+do_test (void)
     1021+{
     1022+  setlocale (LC_ALL, "de_DE.UTF-8");
     1023+
     1024+  FILE *fp = fdopen (dup (STDOUT_FILENO), "a");
     1025+  if (fp == NULL)
     1026+    error (EXIT_FAILURE, errno, "fdopen(,\"a\")");
     1027+
     1028+  setvbuf (fp, buf, _IOFBF, sizeof (buf));
     1029+
     1030+  /* fwprintf to unbuffered stream.   */
     1031+  fwprintf (fp, L"hello.\n");
     1032+
     1033+  fclose (fp);
     1034+
     1035+  /* touch my buffer */
     1036+  buf[45] = 'a';
     1037+
     1038+  return 0;
     1039+}
     1040+
     1041+#define TEST_FUNCTION do_test ()
     1042+#include "../test-skeleton.c"
    7401043diff -Naur glibc-2.5.orig/libio/tst-wmemstream1.c glibc-2.5/libio/tst-wmemstream1.c
    7411044--- glibc-2.5.orig/libio/tst-wmemstream1.c      2006-01-11 18:02:27.000000000 -0800
     
    7561059 #define W(o) L##o
    7571060 #define OPEN_MEMSTREAM open_wmemstream
     1061diff -Naur glibc-2.5.orig/libio/wfiledoalloc.c glibc-2.5/libio/wfiledoalloc.c
     1062--- glibc-2.5.orig/libio/wfiledoalloc.c 2002-07-05 23:35:54.000000000 -0700
     1063+++ glibc-2.5/libio/wfiledoalloc.c      2007-01-12 09:25:38.000000000 -0800
     1064@@ -1,4 +1,5 @@
     1065-/* Copyright (C) 1993, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
     1066+/* Copyright (C) 1993, 1997, 1999, 2000, 2002, 2006
     1067+   Free Software Foundation, Inc.
     1068    This file is part of the GNU C Library.
     1069 
     1070    The GNU C Library is free software; you can redistribute it and/or
     1071@@ -85,35 +86,20 @@
     1072      _IO_FILE *fp;
     1073 {
     1074   _IO_size_t size;
     1075-  int couldbetty;
     1076   wchar_t *p;
     1077-  struct _G_stat64 st;
     1078 
     1079   /* Allocate room for the external buffer.  */
     1080   if (fp->_IO_buf_base == NULL)
     1081     INTUSE(_IO_file_doallocate) (fp);
     1082 
     1083-  if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
     1084-    {
     1085-      couldbetty = 0;
     1086-      size = _IO_BUFSIZ;
     1087-#if 0
     1088-      /* do not try to optimise fseek() */
     1089-      fp->_flags |= __SNPT;
     1090-#endif
     1091-    }
     1092-  else
     1093-    {
     1094-      couldbetty = S_ISCHR (st.st_mode);
     1095-#if _IO_HAVE_ST_BLKSIZE
     1096-      size = st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize;
     1097-#else
     1098-      size = _IO_BUFSIZ;
     1099-#endif
     1100-    }
     1101+  /* If narrow buffer is user allocated (set by setvbuf etc.),
     1102+     use that size as the size of the wide buffer, when it is
     1103+     allocated by _IO_file_doallocate, multiply that by size
     1104+     of the wide character.  */
     1105+  size = fp->_IO_buf_end - fp->_IO_buf_base;
     1106+  if ((fp->_flags & _IO_USER_BUF))
     1107+    size = (size + sizeof (wchar_t) - 1) / sizeof (wchar_t);
     1108   ALLOC_WBUF (p, size * sizeof (wchar_t), EOF);
     1109   INTUSE(_IO_wsetb) (fp, p, p + size, 1);
     1110-  if (couldbetty && isatty (fp->_fileno))
     1111-    fp->_flags |= _IO_LINE_BUF;
     1112   return 1;
     1113 }
     1114diff -Naur glibc-2.5.orig/libio/wgenops.c glibc-2.5/libio/wgenops.c
     1115--- glibc-2.5.orig/libio/wgenops.c      2006-02-12 13:20:57.000000000 -0800
     1116+++ glibc-2.5/libio/wgenops.c   2007-01-12 09:25:38.000000000 -0800
     1117@@ -115,14 +115,14 @@
     1118      wchar_t *eb;
     1119      int a;
     1120 {
     1121-  if (f->_wide_data->_IO_buf_base && !(f->_flags & _IO_USER_BUF))
     1122+  if (f->_wide_data->_IO_buf_base && !(f->_flags2 & _IO_FLAGS2_USER_WBUF))
     1123     FREE_BUF (f->_wide_data->_IO_buf_base, _IO_wblen (f) * sizeof (wchar_t));
     1124   f->_wide_data->_IO_buf_base = b;
     1125   f->_wide_data->_IO_buf_end = eb;
     1126   if (a)
     1127-    f->_flags &= ~_IO_USER_BUF;
     1128+    f->_flags2 &= ~_IO_FLAGS2_USER_WBUF;
     1129   else
     1130-    f->_flags |= _IO_USER_BUF;
     1131+    f->_flags2 |= _IO_FLAGS2_USER_WBUF;
     1132 }
     1133 INTDEF(_IO_wsetb)
     1134 
     1135@@ -198,7 +198,7 @@
     1136      int dummy;
     1137 {
     1138   struct _IO_marker *mark;
     1139-  if (fp->_wide_data->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
     1140+  if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF))
     1141     {
     1142       FREE_BUF (fp->_wide_data->_IO_buf_base,
     1143                _IO_wblen (fp) * sizeof (wchar_t));
    7581144diff -Naur glibc-2.5.orig/libio/wmemstream.c glibc-2.5/libio/wmemstream.c
    7591145--- glibc-2.5.orig/libio/wmemstream.c   2006-08-14 15:13:48.000000000 -0700
    760 +++ glibc-2.5/libio/wmemstream.c        2006-09-29 17:06:33.000000000 -0700
     1146+++ glibc-2.5/libio/wmemstream.c        2007-01-12 09:25:38.000000000 -0800
    7611147@@ -20,6 +20,7 @@
    7621148 #include "strfile.h"
     
    7671153 
    7681154 struct _IO_FILE_wmemstream
     1155@@ -91,7 +92,7 @@
     1156   _IO_fwide (&new_f->fp._sf._sbf._f, 1);
     1157   _IO_wstr_init_static (&new_f->fp._sf._sbf._f, buf,
     1158                        _IO_BUFSIZ / sizeof (wchar_t), buf);
     1159-  new_f->fp._sf._sbf._f._flags &= ~_IO_USER_BUF;
     1160+  new_f->fp._sf._sbf._f._flags2 &= ~_IO_FLAGS2_USER_WBUF;
     1161   new_f->fp._sf._s._allocate_buffer = (_IO_alloc_type) malloc;
     1162   new_f->fp._sf._s._free_buffer = (_IO_free_type) free;
     1163 
     1164diff -Naur glibc-2.5.orig/libio/wstrops.c glibc-2.5/libio/wstrops.c
     1165--- glibc-2.5.orig/libio/wstrops.c      2006-08-14 15:14:53.000000000 -0700
     1166+++ glibc-2.5/libio/wstrops.c   2007-01-12 09:25:38.000000000 -0800
     1167@@ -88,7 +88,7 @@
     1168   pos = fp->_wide_data->_IO_write_ptr - fp->_wide_data->_IO_write_base;
     1169   if (pos >= (_IO_size_t) (_IO_wblen (fp) + flush_only))
     1170     {
     1171-      if (fp->_flags & _IO_USER_BUF) /* not allowed to enlarge */
     1172+      if (fp->_flags2 & _IO_FLAGS2_USER_WBUF) /* not allowed to enlarge */
     1173        return WEOF;
     1174       else
     1175        {
     1176@@ -182,7 +182,7 @@
     1177   _IO_ssize_t oldend = wd->_IO_write_end - wd->_IO_write_base;
     1178 
     1179   /* Try to enlarge the buffer.  */
     1180-  if (fp->_flags & _IO_USER_BUF)
     1181+  if (fp->_flags2 & _IO_FLAGS2_USER_WBUF)
     1182     /* User-provided buffer.  */
     1183     return 1;
     1184 
     1185@@ -335,7 +335,7 @@
     1186      _IO_FILE *fp;
     1187      int dummy;
     1188 {
     1189-  if (fp->_wide_data->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
     1190+  if (fp->_wide_data->_IO_buf_base && !(fp->_flags2 & _IO_FLAGS2_USER_WBUF))
     1191     (((_IO_strfile *) fp)->_s._free_buffer) (fp->_wide_data->_IO_buf_base);
     1192   fp->_wide_data->_IO_buf_base = NULL;
     1193 
    7691194diff -Naur glibc-2.5.orig/localedata/ChangeLog glibc-2.5/localedata/ChangeLog
    7701195--- glibc-2.5.orig/localedata/ChangeLog 2006-09-29 11:30:52.000000000 -0700
     
    11551580+  return result;
    11561581+}
     1582diff -Naur glibc-2.5.orig/misc/tst-pselect.c glibc-2.5/misc/tst-pselect.c
     1583--- glibc-2.5.orig/misc/tst-pselect.c   2006-01-21 11:58:31.000000000 -0800
     1584+++ glibc-2.5/misc/tst-pselect.c        2007-01-12 09:49:04.000000000 -0800
     1585@@ -29,7 +29,16 @@
     1586       return 1;
     1587     }
     1588 
     1589-  if (sigblock (SIGUSR1) != 0)
     1590+  sa.sa_handler = SIG_IGN;
     1591+  sa.sa_flags = SA_NOCLDWAIT;
     1592+
     1593+  if (sigaction (SIGCHLD, &sa, NULL) != 0)
     1594+    {
     1595+      puts ("2nd sigaction failed");
     1596+      return 1;
     1597+    }
     1598+
     1599+  if (sigblock (sigmask (SIGUSR1)) != 0)
     1600     {
     1601       puts ("sigblock failed");
     1602       return 1;
     1603@@ -52,6 +61,7 @@
     1604 
     1605   struct timespec to = { .tv_sec = 0, .tv_nsec = 500000000 };
     1606 
     1607+  pid_t parent = getpid ();
     1608   pid_t p = fork ();
     1609   if (p == 0)
     1610     {
     1611@@ -63,6 +73,9 @@
     1612       int e;
     1613       do
     1614        {
     1615+         if (getppid () != parent)
     1616+           exit (2);
     1617+
     1618          errno = 0;
     1619          e = pselect (fds[0][0] + 1, &rfds, NULL, NULL, &to, &ss);
     1620        }
     1621@@ -108,12 +121,6 @@
     1622       return 1;
     1623     }
     1624 
     1625-  if (TEMP_FAILURE_RETRY (waitpid (p, NULL, 0)) != p)
     1626-    {
     1627-      puts ("waitpid failed");
     1628-      return 1;
     1629-    }
     1630-
     1631   return 0;
     1632 }
     1633 
    11571634diff -Naur glibc-2.5.orig/nis/Makefile glibc-2.5/nis/Makefile
    11581635--- glibc-2.5.orig/nis/Makefile 2006-04-13 22:45:49.000000000 -0700
     
    13141791 }
    13151792 libnsl_hidden_def (nis_list)
     1793diff -Naur glibc-2.5.orig/nis/nss_compat/compat-grp.c glibc-2.5/nis/nss_compat/compat-grp.c
     1794--- glibc-2.5.orig/nis/nss_compat/compat-grp.c  2006-07-31 16:33:04.000000000 -0700
     1795+++ glibc-2.5/nis/nss_compat/compat-grp.c       2007-01-12 09:59:51.000000000 -0800
     1796@@ -580,13 +580,17 @@
     1797       /* +group */
     1798       if (result->gr_name[0] == '+' && result->gr_name[1] != '\0')
     1799        {
     1800+         /* Yes, no +1, see the memcpy call below.  */
     1801+         size_t len = strlen (result->gr_name);
     1802+         char buf[len];
     1803          enum nss_status status;
     1804 
     1805          /* Store the group in the blacklist for the "+" at the end of
     1806             /etc/group */
     1807-         blacklist_store_name (&result->gr_name[1], ent);
     1808+         memcpy (buf, &result->gr_name[1], len);
     1809          status = getgrnam_plusgroup (&result->gr_name[1], result, ent,
     1810                                       buffer, buflen, errnop);
     1811+         blacklist_store_name (buf, ent);
     1812          if (status == NSS_STATUS_SUCCESS && result->gr_gid == gid)
     1813            break;
     1814          else
    13161815diff -Naur glibc-2.5.orig/nis/nss_nisplus/nisplus-grp.c glibc-2.5/nis/nss_nisplus/nisplus-grp.c
    13171816--- glibc-2.5.orig/nis/nss_nisplus/nisplus-grp.c        2006-05-20 12:20:19.000000000 -0700
     
    16032102   }
    16042103 }
     2104diff -Naur glibc-2.5.orig/nptl/ChangeLog glibc-2.5/nptl/ChangeLog
     2105--- glibc-2.5.orig/nptl/ChangeLog       2006-09-24 10:14:11.000000000 -0700
     2106+++ glibc-2.5/nptl/ChangeLog    2007-01-12 10:14:34.000000000 -0800
     2107@@ -1,3 +1,12 @@
     2108+2006-12-28  David S. Miller  <davem@davemloft.net>
     2109+
     2110+       * shlib-versions: Fix sparc64 linux target specification.
     2111+
     2112+2006-12-21  Jakub Jelinek  <jakub@redhat.com>
     2113+
     2114+       * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
     2115+       tid isn't reread from pd->tid in between ESRCH test and the syscall.
     2116+
     2117 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
     2118 
     2119        [BZ #3251]
     2120diff -Naur glibc-2.5.orig/nptl/shlib-versions glibc-2.5/nptl/shlib-versions
     2121--- glibc-2.5.orig/nptl/shlib-versions  2004-07-05 10:03:27.000000000 -0700
     2122+++ glibc-2.5/nptl/shlib-versions       2007-01-12 10:14:34.000000000 -0800
     2123@@ -1,5 +1,5 @@
     2124 mips.*-.*-linux.*      libpthread=0            GLIBC_2.0 GLIBC_2.2
     2125-sparc64-.*-linux.*     libpthread=0            GLIBC_2.2
     2126+sparc64.*-.*-linux.*   libpthread=0            GLIBC_2.2
     2127 sh.*-.*-linux.*                libpthread=0            GLIBC_2.2
     2128 ia64.*-.*-linux.*      libpthread=0            GLIBC_2.2
     2129 hppa.*-.*-linux.*      libpthread=0            GLIBC_2.2
     2130diff -Naur glibc-2.5.orig/nptl/sysdeps/unix/sysv/linux/pthread_kill.c glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
     2131--- glibc-2.5.orig/nptl/sysdeps/unix/sysv/linux/pthread_kill.c  2004-09-28 15:22:37.000000000 -0700
     2132+++ glibc-2.5/nptl/sysdeps/unix/sysv/linux/pthread_kill.c       2007-01-12 09:58:08.000000000 -0800
     2133@@ -1,4 +1,4 @@
     2134-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
     2135+/* Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
     2136    This file is part of the GNU C Library.
     2137    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
     2138 
     2139@@ -33,7 +33,15 @@
     2140   struct pthread *pd = (struct pthread *) threadid;
     2141 
     2142   /* Make sure the descriptor is valid.  */
     2143-  if (INVALID_TD_P (pd))
     2144+  if (DEBUGGING_P && INVALID_TD_P (pd))
     2145+    /* Not a valid thread handle.  */
     2146+    return ESRCH;
     2147+
     2148+  /* Force load of pd->tid into local variable or register.  Otherwise
     2149+     if a thread exits between ESRCH test and tgkill, we might return
     2150+     EINVAL, because pd->tid would be cleared by the kernel.  */
     2151+  pid_t tid = atomic_forced_read (pd->tid);
     2152+  if (__builtin_expect (tid <= 0, 0))
     2153     /* Not a valid thread handle.  */
     2154     return ESRCH;
     2155 
     2156@@ -53,15 +61,15 @@
     2157   int val;
     2158 #if __ASSUME_TGKILL
     2159   val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
     2160-                         pd->tid, signo);
     2161+                         tid, signo);
     2162 #else
     2163 # ifdef __NR_tgkill
     2164   val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
     2165-                         pd->tid, signo);
     2166+                         tid, signo);
     2167   if (INTERNAL_SYSCALL_ERROR_P (val, err)
     2168       && INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS)
     2169 # endif
     2170-    val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, signo);
     2171+    val = INTERNAL_SYSCALL (tkill, err, 2, tid, signo);
     2172 #endif
     2173 
     2174   return (INTERNAL_SYSCALL_ERROR_P (val, err)
    16052175diff -Naur glibc-2.5.orig/nptl_db/ChangeLog glibc-2.5/nptl_db/ChangeLog
    16062176--- glibc-2.5.orig/nptl_db/ChangeLog    2006-02-03 16:48:40.000000000 -0800
     
    17282298        }
    17292299 
     2300diff -Naur glibc-2.5.orig/nss/getXXbyYY_r.c glibc-2.5/nss/getXXbyYY_r.c
     2301--- glibc-2.5.orig/nss/getXXbyYY_r.c    2004-09-16 15:24:09.000000000 -0700
     2302+++ glibc-2.5/nss/getXXbyYY_r.c 2007-01-12 09:53:27.000000000 -0800
     2303@@ -1,4 +1,4 @@
     2304-/* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
     2305+/* Copyright (C) 1996-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
     2306    This file is part of the GNU C Library.
     2307    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
     2308 
     2309@@ -18,6 +18,7 @@
     2310    02111-1307 USA.  */
     2311 
     2312 #include <assert.h>
     2313+#include <atomic.h>
     2314 #include <errno.h>
     2315 #include <stdbool.h>
     2316 #include "nsswitch.h"
     2317@@ -173,9 +174,6 @@
     2318        startp = (service_user *) -1l;
     2319       else
     2320        {
     2321-         startp = nip;
     2322-         start_fct = fct.l;
     2323-
     2324 #ifdef NEED__RES
     2325          /* The resolver code will really be used so we have to
     2326             initialize it.  */
     2327@@ -190,6 +188,11 @@
     2328          if (!_res_hconf.initialized)
     2329            _res_hconf_init ();
     2330 #endif /* need _res_hconf */
     2331+
     2332+         start_fct = fct.l;
     2333+         /* Make sure start_fct is written before startp.  */
     2334+         atomic_write_barrier ();
     2335+         startp = nip;
     2336        }
     2337     }
     2338   else
    17302339diff -Naur glibc-2.5.orig/nss/nss_files/files-alias.c glibc-2.5/nss/nss_files/files-alias.c
    17312340--- glibc-2.5.orig/nss/nss_files/files-alias.c  2002-09-01 05:38:05.000000000 -0700
     
    4598846597 GNU/Hurd system, using configurations i[34567]86-*-gnu.
    4598946598 
     46599diff -Naur glibc-2.5.orig/stdlib/jrand48_r.c glibc-2.5/stdlib/jrand48_r.c
     46600--- glibc-2.5.orig/stdlib/jrand48_r.c   2001-07-05 21:55:41.000000000 -0700
     46601+++ glibc-2.5/stdlib/jrand48_r.c        2007-01-12 09:52:07.000000000 -0800
     46602@@ -1,4 +1,4 @@
     46603-/* Copyright (C) 1995, 1997, 1998, 2001 Free Software Foundation, Inc.
     46604+/* Copyright (C) 1995, 1997, 1998, 2001, 2006 Free Software Foundation, Inc.
     46605    This file is part of the GNU C Library.
     46606    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
     46607 
     46608@@ -30,7 +30,7 @@
     46609     return -1;
     46610 
     46611   /* Store the result.  */
     46612-  *result = ((xsubi[2] << 16) | xsubi[1]) & 0xffffffffl;
     46613+  *result = (int32_t) ((xsubi[2] << 16) | xsubi[1]);
     46614 
     46615   return 0;
     46616 }
     46617diff -Naur glibc-2.5.orig/stdlib/Makefile glibc-2.5/stdlib/Makefile
     46618--- glibc-2.5.orig/stdlib/Makefile      2006-08-21 14:02:11.000000000 -0700
     46619+++ glibc-2.5/stdlib/Makefile   2007-01-12 10:23:27.000000000 -0800
     46620@@ -1,4 +1,4 @@
     46621-# Copyright (C) 1991-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
     46622+# Copyright (C) 1991-2006, 2007 Free Software Foundation, Inc.
     46623 # This file is part of the GNU C Library.
     46624 
     46625 # The GNU C Library is free software; you can redistribute it and/or
     46626@@ -66,7 +66,9 @@
     46627                   test-canon test-canon2 tst-strtoll tst-environ           \
     46628                   tst-xpg-basename tst-random tst-random2 tst-bsearch      \
     46629                   tst-limits tst-rand48 bug-strtod tst-setcontext          \
     46630-                  test-a64l tst-qsort tst-system testmb2 bug-strtod2
     46631+                  test-a64l tst-qsort tst-system testmb2 bug-strtod2       \
     46632+                  tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \
     46633+                  tst-makecontext tst-strtod4
     46634 
     46635 include ../Makeconfig
     46636 
     46637@@ -115,6 +117,8 @@
     46638 test-canon-ARGS = --test-dir=${common-objpfx}stdlib
     46639 
     46640 tst-strtod-ENV = LOCPATH=$(common-objpfx)localedata
     46641+tst-strtod3-ENV = LOCPATH=$(common-objpfx)localedata
     46642+tst-strtod4-ENV = LOCPATH=$(common-objpfx)localedata
     46643 testmb2-ENV = LOCPATH=$(common-objpfx)localedata
     46644 
     46645 # Run a test on the header files we use.
     46646diff -Naur glibc-2.5.orig/stdlib/strtod_l.c glibc-2.5/stdlib/strtod_l.c
     46647--- glibc-2.5.orig/stdlib/strtod_l.c    2006-01-14 04:09:09.000000000 -0800
     46648+++ glibc-2.5/stdlib/strtod_l.c 2007-01-12 10:23:27.000000000 -0800
     46649@@ -1,5 +1,6 @@
     46650 /* Convert string representing a number to float value, using given locale.
     46651-   Copyright (C) 1997,1998,2002,2004,2005,2006 Free Software Foundation, Inc.
     46652+   Copyright (C) 1997,1998,2002,2004,2005,2006,2007
     46653+   Free Software Foundation, Inc.
     46654    This file is part of the GNU C Library.
     46655    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
     46656 
     46657@@ -650,10 +651,11 @@
     46658          if (c != '0')
     46659            {
     46660              for (cnt = 0; thousands[cnt] != '\0'; ++cnt)
     46661-               if (c != thousands[cnt])
     46662+               if (thousands[cnt] != cp[cnt])
     46663                  break;
     46664              if (thousands[cnt] != '\0')
     46665                break;
     46666+             cp += cnt - 1;
     46667            }
     46668          c = *++cp;
     46669        }
     46670@@ -662,20 +664,29 @@
     46671 
     46672   /* If no other digit but a '0' is found the result is 0.0.
     46673      Return current read pointer.  */
     46674-  if ((c < L_('0') || c > L_('9'))
     46675-      && (base == 16 && (c < (CHAR_TYPE) TOLOWER (L_('a'))
     46676-                        || c > (CHAR_TYPE) TOLOWER (L_('f'))))
     46677+  if (!((c >= L_('0') && c <= L_('9'))
     46678+       || (base == 16 && ((CHAR_TYPE) TOLOWER (c) >= L_('a')
     46679+                          && (CHAR_TYPE) TOLOWER (c) <= L_('f')))
     46680+       || (
     46681 #ifdef USE_WIDE_CHAR
     46682-      && c != (wint_t) decimal
     46683+           c == (wint_t) decimal
     46684 #else
     46685-      && ({ for (cnt = 0; decimal[cnt] != '\0'; ++cnt)
     46686-             if (decimal[cnt] != cp[cnt])
     46687-               break;
     46688-           decimal[cnt] != '\0'; })
     46689-#endif
     46690-      && (base == 16 && (cp == start_of_digits
     46691-                        || (CHAR_TYPE) TOLOWER (c) != L_('p')))
     46692-      && (base != 16 && (CHAR_TYPE) TOLOWER (c) != L_('e')))
     46693+           ({ for (cnt = 0; decimal[cnt] != '\0'; ++cnt)
     46694+                if (decimal[cnt] != cp[cnt])
     46695+                  break;
     46696+              decimal[cnt] == '\0'; })
     46697+#endif
     46698+           /* '0x.' alone is not a valid hexadecimal number.
     46699+              '.' alone is not valid either, but that has been checked
     46700+              already earlier.  */
     46701+           && (base != 16
     46702+               || cp != start_of_digits
     46703+               || (cp[decimal_len] >= L_('0') && cp[decimal_len] <= L_('9'))
     46704+               || ((CHAR_TYPE) TOLOWER (cp[decimal_len]) >= L_('a')
     46705+                   && (CHAR_TYPE) TOLOWER (cp[decimal_len]) <= L_('f'))))
     46706+       || (base == 16 && (cp != start_of_digits
     46707+                          && (CHAR_TYPE) TOLOWER (c) == L_('p')))
     46708+       || (base != 16 && (CHAR_TYPE) TOLOWER (c) == L_('e'))))
     46709     {
     46710 #ifdef USE_WIDE_CHAR
     46711       tp = __correctly_grouped_prefixwc (start_of_digits, cp, thousands,
     46712@@ -715,13 +726,14 @@
     46713                  break;
     46714              if (thousands[cnt] != '\0')
     46715                break;
     46716+             cp += cnt - 1;
     46717            }
     46718 #endif
     46719        }
     46720       c = *++cp;
     46721     }
     46722 
     46723-  if (grouping && dig_no > 0)
     46724+  if (grouping && cp > start_of_digits)
     46725     {
     46726       /* Check the grouping of the digits.  */
     46727 #ifdef USE_WIDE_CHAR
     46728@@ -759,13 +771,15 @@
     46729        }
     46730     }
     46731 
     46732-  /* We have the number digits in the integer part.  Whether these are all or
     46733-     any is really a fractional digit will be decided later.  */
     46734+  /* We have the number of digits in the integer part.  Whether these
     46735+     are all or any is really a fractional digit will be decided
     46736+     later.  */
     46737   int_no = dig_no;
     46738   lead_zero = int_no == 0 ? -1 : 0;
     46739 
     46740-  /* Read the fractional digits.  A special case are the 'american style'
     46741-     numbers like `16.' i.e. with decimal but without trailing digits.  */
     46742+  /* Read the fractional digits.  A special case are the 'american
     46743+     style' numbers like `16.' i.e. with decimal point but without
     46744+     trailing digits.  */
     46745   if (
     46746 #ifdef USE_WIDE_CHAR
     46747       c == (wint_t) decimal
     46748@@ -815,15 +829,16 @@
     46749          if (base == 16)
     46750            exp_limit = (exp_negative ?
     46751                         -MIN_EXP + MANT_DIG + 4 * int_no :
     46752-                        MAX_EXP - 4 * int_no + lead_zero);
     46753+                        MAX_EXP - 4 * int_no + 4 * lead_zero + 3);
     46754          else
     46755            exp_limit = (exp_negative ?
     46756                         -MIN_10_EXP + MANT_DIG + int_no :
     46757-                        MAX_10_EXP - int_no + lead_zero);
     46758+                        MAX_10_EXP - int_no + lead_zero + 1);
     46759 
     46760          do
     46761            {
     46762              exponent *= 10;
     46763+             exponent += c - L_('0');
     46764 
     46765              if (exponent > exp_limit)
     46766                /* The exponent is too large/small to represent a valid
     46767@@ -853,7 +868,6 @@
     46768                  /* NOTREACHED */
     46769                }
     46770 
     46771-             exponent += c - L_('0');
     46772              c = *++cp;
     46773            }
     46774          while (c >= L_('0') && c <= L_('9'));
     46775@@ -888,7 +902,7 @@
     46776        --expp;
     46777        --dig_no;
     46778        --int_no;
     46779-       ++exponent;
     46780+       exponent += base == 16 ? 4 : 1;
     46781       }
     46782     while (dig_no > 0 && exponent < 0);
     46783 
     46784diff -Naur glibc-2.5.orig/stdlib/tst-atof1.c glibc-2.5/stdlib/tst-atof1.c
     46785--- glibc-2.5.orig/stdlib/tst-atof1.c   1969-12-31 16:00:00.000000000 -0800
     46786+++ glibc-2.5/stdlib/tst-atof1.c        2007-01-12 10:07:19.000000000 -0800
     46787@@ -0,0 +1,19 @@
     46788+#include <stdio.h>
     46789+#include <stdlib.h>
     46790+#include <string.h>
     46791+
     46792+static int
     46793+do_test (void)
     46794+{
     46795+  char buf[100];
     46796+  snprintf (buf, sizeof (buf), "%g", atof ("0x10p-1"));
     46797+  if (strcmp (buf, "8") != 0)
     46798+    {
     46799+      printf ("got \"%s\", expected \"8\"\n", buf);
     46800+      return 1;
     46801+    }
     46802+  return 0;
     46803+}
     46804+
     46805+#define TEST_FUNCTION do_test ()
     46806+#include "../test-skeleton.c"
     46807diff -Naur glibc-2.5.orig/stdlib/tst-atof2.c glibc-2.5/stdlib/tst-atof2.c
     46808--- glibc-2.5.orig/stdlib/tst-atof2.c   1969-12-31 16:00:00.000000000 -0800
     46809+++ glibc-2.5/stdlib/tst-atof2.c        2007-01-12 10:07:19.000000000 -0800
     46810@@ -0,0 +1,55 @@
     46811+#include <stdio.h>
     46812+#include <stdlib.h>
     46813+#include <string.h>
     46814+
     46815+
     46816+static const struct
     46817+{
     46818+  const char *str;
     46819+  const char *expected;
     46820+} tests[] =
     46821+  {
     46822+    { "1e308", "1e+308" },
     46823+    { "100000000e300", "1e+308" },
     46824+    { "0x1p1023", "8.98847e+307" },
     46825+    { "0x1000p1011", "8.98847e+307" },
     46826+    { "0x1p1020", "1.12356e+307" },
     46827+    { "0x0.00001p1040", "1.12356e+307" },
     46828+    { "1e-307", "1e-307" },
     46829+    { "0.000001e-301", "1e-307" },
     46830+    { "0.0000001e-300", "1e-307" },
     46831+    { "0.00000001e-299", "1e-307" },
     46832+    { "1000000e-313", "1e-307" },
     46833+    { "10000000e-314", "1e-307" },
     46834+    { "100000000e-315", "1e-307" },
     46835+    { "0x1p-1021", "4.45015e-308" },
     46836+    { "0x1000p-1033", "4.45015e-308" },
     46837+    { "0x10000p-1037", "4.45015e-308" },
     46838+    { "0x0.001p-1009", "4.45015e-308" },
     46839+    { "0x0.0001p-1005", "4.45015e-308" },
     46840+  };
     46841+#define NTESTS (sizeof (tests) / sizeof (tests[0]))
     46842+
     46843+
     46844+static int
     46845+do_test (void)
     46846+{
     46847+  int status = 0;
     46848+
     46849+  for (int i = 0; i < NTESTS; ++i)
     46850+    {
     46851+      char buf[100];
     46852+      snprintf (buf, sizeof (buf), "%g", atof (tests[i].str));
     46853+      if (strcmp (buf, tests[i].expected) != 0)
     46854+       {
     46855+         printf ("%d: got \"%s\", expected \"%s\"\n",
     46856+                 i, buf, tests[i].expected);
     46857+         status = 1;
     46858+       }
     46859+    }
     46860+
     46861+  return status;
     46862+}
     46863+
     46864+#define TEST_FUNCTION do_test ()
     46865+#include "../test-skeleton.c"
     46866diff -Naur glibc-2.5.orig/stdlib/tst-makecontext.c glibc-2.5/stdlib/tst-makecontext.c
     46867--- glibc-2.5.orig/stdlib/tst-makecontext.c     1969-12-31 16:00:00.000000000 -0800
     46868+++ glibc-2.5/stdlib/tst-makecontext.c  2007-01-12 10:24:52.000000000 -0800
     46869@@ -0,0 +1,67 @@
     46870+/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
     46871+   This file is part of the GNU C Library.
     46872+
     46873+   The GNU C Library is free software; you can redistribute it and/or
     46874+   modify it under the terms of the GNU Lesser General Public
     46875+   License as published by the Free Software Foundation; either
     46876+   version 2.1 of the License, or (at your option) any later version.
     46877+
     46878+   The GNU C Library is distributed in the hope that it will be useful,
     46879+   but WITHOUT ANY WARRANTY; without even the implied warranty of
     46880+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     46881+   Lesser General Public License for more details.
     46882+
     46883+   You should have received a copy of the GNU Lesser General Public
     46884+   License along with the GNU C Library; if not, write to the Free
     46885+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
     46886+   02111-1307 USA.  */
     46887+
     46888+#include <errno.h>
     46889+#include <stdlib.h>
     46890+#include <stdio.h>
     46891+#include <ucontext.h>
     46892+
     46893+ucontext_t ucp;
     46894+char st1[8192];
     46895+__thread int thr;
     46896+
     46897+void
     46898+cf (int i)
     46899+{
     46900+  if (i != 78 || thr != 94)
     46901+    {
     46902+      printf ("i %d thr %d\n", i, thr);
     46903+      exit (1);
     46904+    }
     46905+  exit (0);
     46906+}
     46907+
     46908+int
     46909+do_test (void)
     46910+{
     46911+  if (getcontext (&ucp) != 0)
     46912+    {
     46913+      if (errno == ENOSYS)
     46914+       {
     46915+         puts ("context handling not supported");
     46916+         return 0;
     46917+       }
     46918+
     46919+      puts ("getcontext failed");
     46920+      return 1;
     46921+    }
     46922+  thr = 94;
     46923+  ucp.uc_link = NULL;
     46924+  ucp.uc_stack.ss_sp = st1;
     46925+  ucp.uc_stack.ss_size = sizeof st1;
     46926+  makecontext (&ucp, (void (*) (void)) cf, 1, 78);
     46927+  if (setcontext (&ucp) != 0)
     46928+    {
     46929+      puts ("setcontext failed");
     46930+      return 1;
     46931+    }
     46932+  return 2;
     46933+}
     46934+
     46935+#define TEST_FUNCTION do_test ()
     46936+#include "../test-skeleton.c"
     46937diff -Naur glibc-2.5.orig/stdlib/tst-rand48-2.c glibc-2.5/stdlib/tst-rand48-2.c
     46938--- glibc-2.5.orig/stdlib/tst-rand48-2.c        1969-12-31 16:00:00.000000000 -0800
     46939+++ glibc-2.5/stdlib/tst-rand48-2.c     2007-01-12 09:52:07.000000000 -0800
     46940@@ -0,0 +1,113 @@
     46941+#include <stdint.h>
     46942+#include <stdio.h>
     46943+#include <stdlib.h>
     46944+#include <time.h>
     46945+
     46946+int
     46947+main (void)
     46948+{
     46949+  time_t t = time (NULL);
     46950+  int i, ret = 0;
     46951+  double d;
     46952+  long int l;
     46953+  struct drand48_data data;
     46954+  unsigned short int buf[3];
     46955+
     46956+  srand48 ((long int) t);
     46957+  for (i = 0; i < 50; i++)
     46958+    if ((d = drand48 ()) < 0.0 || d >= 1.0)
     46959+      {
     46960+        printf ("drand48 %d %g\n", i, d);
     46961+        ret = 1;
     46962+      }
     46963+
     46964+  srand48_r ((long int) t, &data);
     46965+  for (i = 0; i < 50; i++)
     46966+    if (drand48_r (&data, &d) != 0 || d < 0.0 || d >= 1.0)
     46967+      {
     46968+        printf ("drand48_r %d %g\n", i, d);
     46969+        ret = 1;
     46970+      }
     46971+
     46972+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     46973+  for (i = 0; i < 50; i++)
     46974+    if ((d = erand48 (buf)) < 0.0 || d >= 1.0)
     46975+      {
     46976+        printf ("erand48 %d %g\n", i, d);
     46977+        ret = 1;
     46978+      }
     46979+
     46980+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     46981+  for (i = 0; i < 50; i++)
     46982+    if (erand48_r (buf, &data, &d) != 0 || d < 0.0 || d >= 1.0)
     46983+      {
     46984+        printf ("erand48_r %d %g\n", i, d);
     46985+        ret = 1;
     46986+      }
     46987+
     46988+  srand48 ((long int) t);
     46989+  for (i = 0; i < 50; i++)
     46990+    if ((l = lrand48 ()) < 0 || l > INT32_MAX)
     46991+      {
     46992+        printf ("lrand48 %d %ld\n", i, l);
     46993+        ret = 1;
     46994+      }
     46995+
     46996+  srand48_r ((long int) t, &data);
     46997+  for (i = 0; i < 50; i++)
     46998+    if (lrand48_r (&data, &l) != 0 || l < 0 || l > INT32_MAX)
     46999+      {
     47000+        printf ("lrand48_r %d %ld\n", i, l);
     47001+        ret = 1;
     47002+      }
     47003+
     47004+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     47005+  for (i = 0; i < 50; i++)
     47006+    if ((l = nrand48 (buf)) < 0 || l > INT32_MAX)
     47007+      {
     47008+        printf ("nrand48 %d %ld\n", i, l);
     47009+        ret = 1;
     47010+      }
     47011+
     47012+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     47013+  for (i = 0; i < 50; i++)
     47014+    if (nrand48_r (buf, &data, &l) != 0 || l < 0 || l > INT32_MAX)
     47015+      {
     47016+        printf ("nrand48_r %d %ld\n", i, l);
     47017+        ret = 1;
     47018+      }
     47019+
     47020+  srand48 ((long int) t);
     47021+  for (i = 0; i < 50; i++)
     47022+    if ((l = mrand48 ()) < INT32_MIN || l > INT32_MAX)
     47023+      {
     47024+        printf ("mrand48 %d %ld\n", i, l);
     47025+        ret = 1;
     47026+      }
     47027+
     47028+  srand48_r ((long int) t, &data);
     47029+  for (i = 0; i < 50; i++)
     47030+    if (mrand48_r (&data, &l) != 0 || l < INT32_MIN || l > INT32_MAX)
     47031+      {
     47032+        printf ("mrand48_r %d %ld\n", i, l);
     47033+        ret = 1;
     47034+      }
     47035+
     47036+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     47037+  for (i = 0; i < 50; i++)
     47038+    if ((l = jrand48 (buf)) < INT32_MIN || l > INT32_MAX)
     47039+      {
     47040+        printf ("jrand48 %d %ld\n", i, l);
     47041+        ret = 1;
     47042+      }
     47043+
     47044+  buf[2] = (t & 0xffff0000) >> 16; buf[1] = (t & 0xffff); buf[0] = 0x330e;
     47045+  for (i = 0; i < 50; i++)
     47046+    if (jrand48_r (buf, &data, &l) != 0 || l < INT32_MIN || l > INT32_MAX)
     47047+      {
     47048+        printf ("jrand48_r %d %ld\n", i, l);
     47049+        ret = 1;
     47050+      }
     47051+
     47052+  return ret;
     47053+}
     47054diff -Naur glibc-2.5.orig/stdlib/tst-rand48.c glibc-2.5/stdlib/tst-rand48.c
     47055--- glibc-2.5.orig/stdlib/tst-rand48.c  2001-01-19 19:32:19.000000000 -0800
     47056+++ glibc-2.5/stdlib/tst-rand48.c       2007-01-12 09:52:07.000000000 -0800
     47057@@ -44,10 +44,10 @@
     47058     }
     47059 
     47060   l = mrand48 ();
     47061-  if (l != 0xa28c1003l)
     47062+  if (l != -0x5d73effdl)
     47063     {
     47064       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47065-             __LINE__ - 4, 0xa28c1003l, l);
     47066+             __LINE__ - 4, -0x5d73effdl, l);
     47067       result = 1;
     47068     }
     47069 
     47070@@ -60,10 +60,10 @@
     47071     }
     47072 
     47073   l = mrand48 ();
     47074-  if (l != 0x9e88f474l)
     47075+  if (l != -0x61770b8cl)
     47076     {
     47077       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47078-             __LINE__ - 4, 0x9e88f474l, l);
     47079+             __LINE__ - 4, -0x61770b8cl, l);
     47080       result = 1;
     47081     }
     47082 
     47083@@ -92,10 +92,10 @@
     47084     }
     47085 
     47086   l = mrand48 ();
     47087-  if (l != 0xeb7a1fa3l)
     47088+  if (l != -0x1485e05dl)
     47089     {
     47090       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47091-             __LINE__ - 4, 0xeb7a1fa3l, l);
     47092+             __LINE__ - 4, -0x1485e05dl, l);
     47093       result = 1;
     47094     }
     47095 
     47096@@ -171,10 +171,10 @@
     47097     }
     47098 
     47099   l = mrand48 ();
     47100-  if (l != 0xa28c1003l)
     47101+  if (l != -0x5d73effdl)
     47102     {
     47103       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47104-             __LINE__ - 4, 0xa28c1003l, l);
     47105+             __LINE__ - 4, -0x5d73effdl, l);
     47106       result = 1;
     47107     }
     47108 
     47109@@ -187,10 +187,10 @@
     47110     }
     47111 
     47112   l = mrand48 ();
     47113-  if (l != 0x9e88f474l)
     47114+  if (l != -0x61770b8cl)
     47115     {
     47116       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47117-             __LINE__ - 4, 0x9e88f474l, l);
     47118+             __LINE__ - 4, -0x61770b8cl, l);
     47119       result = 1;
     47120     }
     47121 
     47122@@ -231,10 +231,10 @@
     47123     }
     47124 
     47125   l = mrand48 ();
     47126-  if (l != 0xeb7a1fa3l)
     47127+  if (l != -0x1485e05dl)
     47128     {
     47129       printf ("mrand48() in line %d failed: expected %lx, seen %lx\n",
     47130-             __LINE__ - 4, 0xeb7a1fa3l, l);
     47131+             __LINE__ - 4, -0x1485e05dl, l);
     47132       result = 1;
     47133     }
     47134 
     47135@@ -287,10 +287,10 @@
     47136     }
     47137 
     47138   l = jrand48 (xs);
     47139-  if (l != 0xf568c7a0l)
     47140+  if (l != -0xa973860l)
     47141     {
     47142       printf ("jrand48() in line %d failed: expected %lx, seen %lx\n",
     47143-             __LINE__ - 4, 0xf568c7a0l, l);
     47144+             __LINE__ - 4, -0xa973860l, l);
     47145       result = 1;
     47146     }
     47147 
     47148diff -Naur glibc-2.5.orig/stdlib/tst-strtod2.c glibc-2.5/stdlib/tst-strtod2.c
     47149--- glibc-2.5.orig/stdlib/tst-strtod2.c 1969-12-31 16:00:00.000000000 -0800
     47150+++ glibc-2.5/stdlib/tst-strtod2.c      2007-01-12 10:23:27.000000000 -0800
     47151@@ -0,0 +1,44 @@
     47152+#include <stdio.h>
     47153+#include <stdlib.h>
     47154+
     47155+struct test
     47156+{
     47157+  const char *str;
     47158+  double result;
     47159+  size_t offset;
     47160+} tests[] =
     47161+{
     47162+  { "0xy", 0.0, 1 },
     47163+  { "0x.y", 0.0, 1 },
     47164+  { "0x0.y", 0.0, 4 },
     47165+  { "0x.0y", 0.0, 4 },
     47166+  { ".y", 0.0, 0 },
     47167+  { "0.y", 0.0, 2 },
     47168+  { ".0y", 0.0, 2 }
     47169+};
     47170+
     47171+static int
     47172+do_test (void)
     47173+{
     47174+  int status = 0;
     47175+  for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
     47176+    {
     47177+      char *ep;
     47178+      double r = strtod (tests[i].str, &ep);
     47179+      if (r != tests[i].result)
     47180+       {
     47181+         printf ("test %zu r = %g, expect %g\n", i, r, tests[i].result);
     47182+         status = 1;
     47183+       }
     47184+      if (ep != tests[i].str + tests[i].offset)
     47185+       {
     47186+         printf ("test %zu strtod parsed %ju characters, expected %zu\n",
     47187+                 i, ep - tests[i].str, tests[i].offset);
     47188+         status = 1;
     47189+       }
     47190+    }
     47191+  return status;
     47192+}
     47193+
     47194+#define TEST_FUNCTION do_test ()
     47195+#include "../test-skeleton.c"
     47196diff -Naur glibc-2.5.orig/stdlib/tst-strtod3.c glibc-2.5/stdlib/tst-strtod3.c
     47197--- glibc-2.5.orig/stdlib/tst-strtod3.c 1969-12-31 16:00:00.000000000 -0800
     47198+++ glibc-2.5/stdlib/tst-strtod3.c      2007-01-12 10:07:19.000000000 -0800
     47199@@ -0,0 +1,55 @@
     47200+#include <locale.h>
     47201+#include <stdio.h>
     47202+#include <stdlib.h>
     47203+#include <string.h>
     47204+
     47205+static const struct
     47206+{
     47207+  const char *in;
     47208+  const char *out;
     47209+  double expected;
     47210+} tests[] =
     47211+  {
     47212+    { "000,,,e1", ",,,e1", 0.0 },
     47213+    { "000e1", "", 0.0 },
     47214+    { "000,1e1", ",1e1", 0.0 }
     47215+  };
     47216+#define NTESTS (sizeof (tests) / sizeof (tests[0]))
     47217+
     47218+
     47219+static int
     47220+do_test (void)
     47221+{
     47222+  if (setlocale (LC_ALL, "en_US.ISO-8859-1") == NULL)
     47223+    {
     47224+      puts ("could not set locale");
     47225+      return 1;
     47226+    }
     47227+
     47228+  int status = 0;
     47229+
     47230+  for (int i = 0; i < NTESTS; ++i)
     47231+    {
     47232+      char *ep;
     47233+      double r = __strtod_internal (tests[i].in, &ep, 1);
     47234+
     47235+      if (strcmp (ep, tests[i].out) != 0)
     47236+       {
     47237+         printf ("%d: got rest string \"%s\", expected \"%s\"\n",
     47238+                 i, ep, tests[i].out);
     47239+         status = 1;
     47240+       }
     47241+
     47242+      if (r != tests[i].expected)
     47243+       {
     47244+         printf ("%d: got wrong results %g, expected %g\n",
     47245+                 i, r, tests[i].expected);
     47246+         status = 1;
     47247+       }
     47248+    }
     47249+
     47250+  return status;
     47251+}
     47252+
     47253+#define TEST_FUNCTION do_test ()
     47254+#include "../test-skeleton.c"
     47255diff -Naur glibc-2.5.orig/stdlib/tst-strtod4.c glibc-2.5/stdlib/tst-strtod4.c
     47256--- glibc-2.5.orig/stdlib/tst-strtod4.c 1969-12-31 16:00:00.000000000 -0800
     47257+++ glibc-2.5/stdlib/tst-strtod4.c      2007-01-12 10:23:27.000000000 -0800
     47258@@ -0,0 +1,56 @@
     47259+#include <locale.h>
     47260+#include <stdio.h>
     47261+#include <stdlib.h>
     47262+#include <string.h>
     47263+
     47264+#define NBSP "\xc2\xa0"
     47265+
     47266+static const struct
     47267+{
     47268+  const char *in;
     47269+  const char *out;
     47270+  double expected;
     47271+} tests[] =
     47272+  {
     47273+    { "000"NBSP"000"NBSP"000", "", 0.0 },
     47274+    { "1"NBSP"000"NBSP"000,5x", "x", 1000000.5 }
     47275+  };
     47276+#define NTESTS (sizeof (tests) / sizeof (tests[0]))
     47277+
     47278+
     47279+static int
     47280+do_test (void)
     47281+{
     47282+  if (setlocale (LC_ALL, "cs_CZ.UTF-8") == NULL)
     47283+    {
     47284+      puts ("could not set locale");
     47285+      return 1;
     47286+    }
     47287+
     47288+  int status = 0;
     47289+
     47290+  for (int i = 0; i < NTESTS; ++i)
     47291+    {
     47292+      char *ep;
     47293+      double r = __strtod_internal (tests[i].in, &ep, 1);
     47294+
     47295+      if (strcmp (ep, tests[i].out) != 0)
     47296+       {
     47297+         printf ("%d: got rest string \"%s\", expected \"%s\"\n",
     47298+                 i, ep, tests[i].out);
     47299+         status = 1;
     47300+       }
     47301+
     47302+      if (r != tests[i].expected)
     47303+       {
     47304+         printf ("%d: got wrong results %g, expected %g\n",
     47305+                 i, r, tests[i].expected);
     47306+         status = 1;
     47307+       }
     47308+    }
     47309+
     47310+  return status;
     47311+}
     47312+
     47313+#define TEST_FUNCTION do_test ()
     47314+#include "../test-skeleton.c"
     47315diff -Naur glibc-2.5.orig/string/Makefile glibc-2.5/string/Makefile
     47316--- glibc-2.5.orig/string/Makefile      2006-06-04 09:35:25.000000000 -0700
     47317+++ glibc-2.5/string/Makefile   2007-01-12 10:02:24.000000000 -0800
     47318@@ -1,4 +1,4 @@
     47319-# Copyright (C) 1991-2002, 2005, 2006 Free Software Foundation, Inc.
     47320+# Copyright (C) 1991-2002, 2005, 2006, 2007 Free Software Foundation, Inc.
     47321 # This file is part of the GNU C Library.
     47322 
     47323 # The GNU C Library is free software; you can redistribute it and/or
     47324@@ -54,7 +54,7 @@
     47325                   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap      \
     47326                   tst-strtok tst-strxfrm bug-strcoll1 tst-strfry       \
     47327                   bug-strtok1 $(addprefix test-,$(strop-tests))        \
     47328-                  bug-envz1
     47329+                  bug-envz1 tst-strxfrm2
     47330 distribute     := memcopy.h pagecopy.h tst-svc.expect test-string.h
     47331 
     47332 
     47333@@ -64,6 +64,7 @@
     47334 inl-tester-ENV = LANGUAGE=C
     47335 noinl-tester-ENV = LANGUAGE=C
     47336 tst-strxfrm-ENV = LOCPATH=$(common-objpfx)localedata
     47337+tst-strxfrm2-ENV = LOCPATH=$(common-objpfx)localedata
     47338 bug-strcoll1-ENV = LOCPATH=$(common-objpfx)localedata
     47339 CFLAGS-inl-tester.c = -fno-builtin
     47340 CFLAGS-noinl-tester.c = -fno-builtin
     47341diff -Naur glibc-2.5.orig/string/strxfrm_l.c glibc-2.5/string/strxfrm_l.c
     47342--- glibc-2.5.orig/string/strxfrm_l.c   2005-10-15 13:49:18.000000000 -0700
     47343+++ glibc-2.5/string/strxfrm_l.c        2007-01-12 10:02:24.000000000 -0800
     47344@@ -1,4 +1,5 @@
     47345-/* Copyright (C) 1995,96,97,2002, 2004, 2005 Free Software Foundation, Inc.
     47346+/* Copyright (C) 1995, 1996, 1997, 2002, 2004, 2005, 2006
     47347+   Free Software Foundation, Inc.
     47348    This file is part of the GNU C Library.
     47349    Written by Ulrich Drepper <drepper@gnu.org>, 1995.
     47350 
     47351@@ -96,6 +97,7 @@
     47352   const int32_t *indirect;
     47353   uint_fast32_t pass;
     47354   size_t needed;
     47355+  size_t last_needed;
     47356   const USTRING_TYPE *usrc;
     47357   size_t srclen = STRLEN (src);
     47358   int32_t *idxarr;
     47359@@ -197,6 +199,7 @@
     47360         this is true for all of them.  */
     47361       int position = rule & sort_position;
     47362 
     47363+      last_needed = needed;
     47364       if (position == 0)
     47365        {
     47366          for (idxcnt = 0; idxcnt < idxmax; ++idxcnt)
     47367@@ -426,11 +429,11 @@
     47368      a `position' rule at the end and if no non-ignored character
     47369      is found the last \1 byte is immediately followed by a \0 byte
     47370      signalling this.  We can avoid the \1 byte(s).  */
     47371-  if (needed <= n && needed > 2 && dest[needed - 2] == L('\1'))
     47372+  if (needed > 2 && needed == last_needed + 1)
     47373     {
     47374       /* Remove the \1 byte.  */
     47375-      --needed;
     47376-      dest[needed - 1] = L('\0');
     47377+      if (--needed <= n)
     47378+       dest[needed - 1] = L('\0');
     47379     }
     47380 
     47381   /* Free the memory if needed.  */
     47382diff -Naur glibc-2.5.orig/string/tst-strxfrm2.c glibc-2.5/string/tst-strxfrm2.c
     47383--- glibc-2.5.orig/string/tst-strxfrm2.c        1969-12-31 16:00:00.000000000 -0800
     47384+++ glibc-2.5/string/tst-strxfrm2.c     2007-01-12 10:02:24.000000000 -0800
     47385@@ -0,0 +1,83 @@
     47386+#include <locale.h>
     47387+#include <stdio.h>
     47388+#include <string.h>
     47389+
     47390+static int
     47391+do_test (void)
     47392+{
     47393+  int res = 0;
     47394+
     47395+  char buf[20];
     47396+  size_t l1 = strxfrm (NULL, "ab", 0);
     47397+  size_t l2 = strxfrm (buf, "ab", 1);
     47398+  size_t l3 = strxfrm (buf, "ab", sizeof (buf));
     47399+  if (l3 < sizeof (buf) && strlen (buf) != l3)
     47400+    {
     47401+      puts ("C locale l3 test failed");
     47402+      res = 1;
     47403+    }
     47404+
     47405+  size_t l4 = strxfrm (buf, "ab", l1 + 1);
     47406+  if (l4 < l1 + 1 && strlen (buf) != l4)
     47407+    {
     47408+      puts ("C locale l4 test failed");
     47409+      res = 1;
     47410+    }
     47411+
     47412+  buf[l1] = 'Z';
     47413+  size_t l5 = strxfrm (buf, "ab", l1);
     47414+  if (buf[l1] != 'Z')
     47415+    {
     47416+      puts ("C locale l5 test failed");
     47417+      res = 1;
     47418+    }
     47419+
     47420+  if (l1 != l2 || l1 != l3 || l1 != l4 || l1 != l5)
     47421+    {
     47422+      puts ("C locale retval test failed");
     47423+      res = 1;
     47424+    }
     47425+
     47426+  if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
     47427+    {
     47428+      puts ("setlocale failed");
     47429+      res = 1;
     47430+    }
     47431+  else
     47432+    {
     47433+      l1 = strxfrm (NULL, "ab", 0);
     47434+      l2 = strxfrm (buf, "ab", 1);
     47435+      l3 = strxfrm (buf, "ab", sizeof (buf));
     47436+      if (l3 < sizeof (buf) && strlen (buf) != l3)
     47437+       {
     47438+         puts ("UTF-8 locale l3 test failed");
     47439+         res = 1;
     47440+       }
     47441+
     47442+      l4 = strxfrm (buf, "ab", l1 + 1);
     47443+      if (l4 < l1 + 1 && strlen (buf) != l4)
     47444+       {
     47445+         puts ("UTF-8 locale l4 test failed");
     47446+         res = 1;
     47447+       }
     47448+
     47449+      buf[l1] = 'Z';
     47450+      l5 = strxfrm (buf, "ab", l1);
     47451+      if (buf[l1] != 'Z')
     47452+       {
     47453+         puts ("UTF-8 locale l5 test failed");
     47454+         res = 1;
     47455+       }
     47456+
     47457+      if (l1 != l2 || l1 != l3 || l1 != l4 || l1 != l5)
     47458+       {
     47459+         puts ("UTF-8 locale retval test failed");
     47460+         res = 1;
     47461+       }
     47462+    }
     47463+
     47464+  return res;
     47465+}
     47466+
     47467+#define TEST_FUNCTION do_test ()
     47468+#include "../test-skeleton.c"
    4599047469diff -Naur glibc-2.5.orig/sunrpc/Makefile glibc-2.5/sunrpc/Makefile
    4599147470--- glibc-2.5.orig/sunrpc/Makefile      2005-06-26 11:24:19.000000000 -0700
     
    4649247971 #define _PUSHARGS_6    pushl %ebp; cfi_adjust_cfa_offset (4); \
    4649347972                        cfi_rel_offset (ebp, 0); L(PUSHBP1): _PUSHARGS_5
     47973diff -Naur glibc-2.5.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S
     47974--- glibc-2.5.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S      2006-01-06 19:51:11.000000000 -0800
     47975+++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S   2007-01-12 09:55:39.000000000 -0800
     47976@@ -26,9 +26,7 @@
     47977 
     47978 ENTRY(__makecontext)
     47979        /* Set up the first 7 args to the function in its registers */
     47980-       addi    r11,r3,_UC_REG_SPACE+12
     47981-       clrrwi  r11,r11,4
     47982-       stw     r11,_UC_REGS_PTR(r3)
     47983+       lwz     r11,_UC_REGS_PTR(r3)
     47984        stw     r6,_UC_GREGS+(PT_R3*4)(r11)
     47985        stw     r7,_UC_GREGS+(PT_R4*4)(r11)
     47986        stw     r8,_UC_GREGS+(PT_R5*4)(r11)
     47987diff -Naur glibc-2.5.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
     47988--- glibc-2.5.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S       2005-12-29 13:03:38.000000000 -0800
     47989+++ glibc-2.5/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S    2007-01-12 09:55:39.000000000 -0800
     47990@@ -1,5 +1,5 @@
     47991 /* Jump to a new context.
     47992-   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
     47993+   Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
     47994    This file is part of the GNU C Library.
     47995 
     47996    The GNU C Library is free software; you can redistribute it and/or
     47997@@ -20,6 +20,7 @@
     47998 #include <sysdep.h>
     47999 #include <rtld-global-offsets.h>
     48000 #include <shlib-compat.h>
     48001+#include <kernel-features.h>
     48002 
     48003 #define __ASSEMBLY__
     48004 #include <asm/ptrace.h>
    4649448005diff -Naur glibc-2.5.orig/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
    4649548006--- glibc-2.5.orig/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c        2006-08-14 22:27:23.000000000 -0700
  • patches/vim-7.0-fixes-22.patch

    r7ea0123 r95f1c95  
    11Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
    2 Date: 12-05-2006
     2Date: 01-23-2007
    33Initial Package Version: 7.0
    44Origin: Upstream
    55Upstream Status: Applied
    6 Description: Contains all upstream patches up to 7.0.178
     6Description: Contains all upstream patches up to 7.0.188
    77             The following patches were skipped
    8              005 027 028 032 045 057 065 074 108 130 131 132 138 156 161 170 171
     8             005 027 028 032 045 057 065 074 108 130 131 132 138 156 161 170 171 180
    99
    1010diff -Naur vim70.orig/configure vim70/configure
    1111--- vim70.orig/configure        2004-07-05 02:02:24.000000000 -0700
    12 +++ vim70/configure     2006-12-05 19:57:51.000000000 -0800
     12+++ vim70/configure     2007-01-23 17:14:51.000000000 -0800
    1313@@ -3,4 +3,4 @@
    1414 # This is just a stub for the Unix configure script, to provide support for
     
    1919diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim
    2020--- vim70.orig/runtime/autoload/ccomplete.vim   2006-05-03 07:35:56.000000000 -0700
    21 +++ vim70/runtime/autoload/ccomplete.vim        2006-12-05 19:57:40.000000000 -0800
     21+++ vim70/runtime/autoload/ccomplete.vim        2007-01-23 17:14:45.000000000 -0800
    2222@@ -1,7 +1,7 @@
    2323 " Vim completion script
     
    4040diff -Naur vim70.orig/runtime/autoload/gzip.vim vim70/runtime/autoload/gzip.vim
    4141--- vim70.orig/runtime/autoload/gzip.vim        2006-03-31 07:12:15.000000000 -0800
    42 +++ vim70/runtime/autoload/gzip.vim     2006-12-05 19:58:04.000000000 -0800
     42+++ vim70/runtime/autoload/gzip.vim     2007-01-23 17:15:02.000000000 -0800
    4343@@ -1,6 +1,6 @@
    4444 " Vim autoload file for editing compressed files.
     
    101101diff -Naur vim70.orig/runtime/autoload/paste.vim vim70/runtime/autoload/paste.vim
    102102--- vim70.orig/runtime/autoload/paste.vim       2006-04-21 11:31:01.000000000 -0700
    103 +++ vim70/runtime/autoload/paste.vim    2006-12-05 19:57:46.000000000 -0800
     103+++ vim70/runtime/autoload/paste.vim    2007-01-23 17:14:49.000000000 -0800
    104104@@ -1,6 +1,6 @@
    105105 " Vim support file to help with paste mappings and menus
     
    121121diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim
    122122--- vim70.orig/runtime/autoload/spellfile.vim   2006-02-01 04:12:24.000000000 -0800
    123 +++ vim70/runtime/autoload/spellfile.vim        2006-12-05 19:57:58.000000000 -0800
     123+++ vim70/runtime/autoload/spellfile.vim        2007-01-23 17:14:56.000000000 -0800
    124124@@ -1,9 +1,9 @@
    125125 " Vim script to download a missing spell file
     
    175175+  endif
    176176+endfunc
     177diff -Naur vim70.orig/runtime/doc/autocmd.txt vim70/runtime/doc/autocmd.txt
     178--- vim70.orig/runtime/doc/autocmd.txt  2006-05-07 05:16:44.000000000 -0700
     179+++ vim70/runtime/doc/autocmd.txt       2007-01-23 17:15:23.000000000 -0800
     180@@ -1,4 +1,4 @@
     181-*autocmd.txt*   For Vim version 7.0.  Last change: 2006 May 06
     182+*autocmd.txt*   For Vim version 7.0.  Last change: 2007 Jan 16
     183 
     184 
     185                  VIM REFERENCE MANUAL    by Bram Moolenaar
     186@@ -279,6 +279,7 @@
     187 |FuncUndefined|                a user function is used but it isn't defined
     188 |SpellFileMissing|     a spell file is used but it can't be found
     189 |SourcePre|            before sourcing a Vim script
     190+|SourceCmd|            before sourcing a Vim script |Cmd-event|
     191 
     192 |VimResized|           after the Vim window size changed
     193 |FocusGained|          Vim got input focus
     194@@ -690,10 +691,17 @@
     195                                Can be used to check for any changed files.
     196                                                        *SourcePre*
     197 SourcePre                      Before sourcing a Vim script. |:source|
     198+                               <afile> is the name of the file being sourced.
     199+                                                       *SourceCmd*
     200+SourceCmd                      When sourcing a Vim script. |:source|
     201+                               <afile> is the name of the file being sourced.
     202+                               The autocommand must source this file.
     203+                               |Cmd-event|
     204                                                        *SpellFileMissing*
     205 SpellFileMissing               When trying to load a spell checking file and
     206-                               it can't be found.  <amatch> is the language,
     207-                               'encoding' also matters.  See
     208+                               it can't be found.  The pattern is matched
     209+                               against the language.  <amatch> is the
     210+                               language, 'encoding' also matters.  See
     211                                |spell-SpellFileMissing|.
     212                                                        *StdinReadPost*
     213 StdinReadPost                  After reading from the stdin into the buffer,
     214@@ -1219,8 +1227,8 @@
     215 
     216                                                        *Cmd-event*
     217 When using one of the "*Cmd" events, the matching autocommands are expected to
     218-do the file reading or writing.  This can be used when working with a special
     219-kind of file, for example on a remote system.
     220+do the file reading, writing or sourcing.  This can be used when working with
     221+a special kind of file, for example on a remote system.
     222 CAREFUL: If you use these events in a wrong way, it may have the effect of
     223 making it impossible to read or write the matching files!  Make sure you test
     224 your autocommands properly.  Best is to use a pattern that will never match a
     225@@ -1233,9 +1241,10 @@
     226 original file isn't needed for recovery.  You might want to do this only when
     227 you expect the file to be modified.
     228 
     229-The |v:cmdarg| variable holds the "++enc=" and "++ff=" argument that are
     230-effective.  These should be used for the command that reads/writes the file.
     231-The |v:cmdbang| variable is one when "!" was used, zero otherwise.
     232+For file read and write commands the |v:cmdarg| variable holds the "++enc="
     233+and "++ff=" argument that are effective.  These should be used for the command
     234+that reads/writes the file.  The |v:cmdbang| variable is one when "!" was
     235+used, zero otherwise.
     236 
     237 See the $VIMRUNTIME/plugin/netrw.vim for examples.
     238 
    177239diff -Naur vim70.orig/runtime/doc/eval.txt vim70/runtime/doc/eval.txt
    178240--- vim70.orig/runtime/doc/eval.txt     2006-05-07 05:16:44.000000000 -0700
    179 +++ vim70/runtime/doc/eval.txt  2006-12-05 19:58:10.000000000 -0800
     241+++ vim70/runtime/doc/eval.txt  2007-01-23 17:15:09.000000000 -0800
    180242@@ -1,4 +1,4 @@
    181243-*eval.txt*      For Vim version 7.0.  Last change: 2006 May 06
     
    257319diff -Naur vim70.orig/runtime/doc/netbeans.txt vim70/runtime/doc/netbeans.txt
    258320--- vim70.orig/runtime/doc/netbeans.txt 2006-05-07 05:16:45.000000000 -0700
    259 +++ vim70/runtime/doc/netbeans.txt      2006-12-05 19:58:11.000000000 -0800
     321+++ vim70/runtime/doc/netbeans.txt      2007-01-23 17:15:10.000000000 -0800
    260322@@ -1,4 +1,4 @@
    261323-*netbeans.txt*  For Vim version 7.0.  Last change: 2006 Mar 09
     
    293355diff -Naur vim70.orig/runtime/menu.vim vim70/runtime/menu.vim
    294356--- vim70.orig/runtime/menu.vim 2006-04-17 06:47:28.000000000 -0700
    295 +++ vim70/runtime/menu.vim      2006-12-05 19:58:04.000000000 -0800
     357+++ vim70/runtime/menu.vim      2007-01-23 17:15:02.000000000 -0800
    296358@@ -2,7 +2,7 @@
    297359 " You can also use this as a start for your own set of menus.
     
    360422diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim
    361423--- vim70.orig/runtime/plugin/matchparen.vim    2006-04-27 06:31:26.000000000 -0700
    362 +++ vim70/runtime/plugin/matchparen.vim 2006-12-05 19:58:01.000000000 -0800
     424+++ vim70/runtime/plugin/matchparen.vim 2007-01-23 17:15:00.000000000 -0800
    363425@@ -1,6 +1,6 @@
    364426 " Vim plugin for showing matching parens
     
    403465diff -Naur vim70.orig/runtime/scripts.vim vim70/runtime/scripts.vim
    404466--- vim70.orig/runtime/scripts.vim      2006-03-28 11:30:49.000000000 -0800
    405 +++ vim70/runtime/scripts.vim   2006-12-05 19:57:51.000000000 -0800
     467+++ vim70/runtime/scripts.vim   2007-01-23 17:14:51.000000000 -0800
    406468@@ -1,7 +1,7 @@
    407469 " Vim support file to detect file types in scripts
     
    428490diff -Naur vim70.orig/runtime/tutor/Makefile vim70/runtime/tutor/Makefile
    429491--- vim70.orig/runtime/tutor/Makefile   2004-06-07 07:32:39.000000000 -0700
    430 +++ vim70/runtime/tutor/Makefile        2006-12-05 19:58:01.000000000 -0800
     492+++ vim70/runtime/tutor/Makefile        2007-01-23 17:15:00.000000000 -0800
    431493@@ -2,8 +2,13 @@
    432494 #
     
    462524diff -Naur vim70.orig/runtime/tutor/tutor.gr.utf-8 vim70/runtime/tutor/tutor.gr.utf-8
    463525--- vim70.orig/runtime/tutor/tutor.gr.utf-8     1969-12-31 16:00:00.000000000 -0800
    464 +++ vim70/runtime/tutor/tutor.gr.utf-8  2006-12-05 19:58:01.000000000 -0800
     526+++ vim70/runtime/tutor/tutor.gr.utf-8  2007-01-23 17:15:00.000000000 -0800
    465527@@ -0,0 +1,815 @@
    466528+===============================================================================
     
    14951557diff -Naur vim70.orig/runtime/tutor/tutor.ru.utf-8 vim70/runtime/tutor/tutor.ru.utf-8
    14961558--- vim70.orig/runtime/tutor/tutor.ru.utf-8     1969-12-31 16:00:00.000000000 -0800
    1497 +++ vim70/runtime/tutor/tutor.ru.utf-8  2006-12-05 19:57:59.000000000 -0800
     1559+++ vim70/runtime/tutor/tutor.ru.utf-8  2007-01-23 17:14:56.000000000 -0800
    14981560@@ -0,0 +1,834 @@
    14991561+===============================================================================
     
    24162478diff -Naur vim70.orig/runtime/tutor/tutor.vim vim70/runtime/tutor/tutor.vim
    24172479--- vim70.orig/runtime/tutor/tutor.vim  2006-03-18 12:20:36.000000000 -0800
    2418 +++ vim70/runtime/tutor/tutor.vim       2006-12-05 19:58:01.000000000 -0800
     2480+++ vim70/runtime/tutor/tutor.vim       2007-01-23 17:15:00.000000000 -0800
    24192481@@ -1,6 +1,6 @@
    24202482 " Vim tutor support file
     
    24682530diff -Naur vim70.orig/src/auto/configure vim70/src/auto/configure
    24692531--- vim70.orig/src/auto/configure       2006-05-04 03:46:19.000000000 -0700
    2470 +++ vim70/src/auto/configure    2006-12-05 19:58:07.000000000 -0800
     2532+++ vim70/src/auto/configure    2007-01-23 17:15:06.000000000 -0800
    24712533@@ -4014,7 +4014,7 @@
    24722534       LDFLAGS=$ldflags_save
     
    25092571diff -Naur vim70.orig/src/buffer.c vim70/src/buffer.c
    25102572--- vim70.orig/src/buffer.c     2006-04-26 14:37:23.000000000 -0700
    2511 +++ vim70/src/buffer.c  2006-12-05 19:58:11.000000000 -0800
     2573+++ vim70/src/buffer.c  2007-01-23 17:15:10.000000000 -0800
    25122574@@ -434,12 +434,8 @@
    25132575     if (usingNetbeans)
     
    26602722diff -Naur vim70.orig/src/configure vim70/src/configure
    26612723--- vim70.orig/src/configure    2006-05-07 07:17:49.000000000 -0700
    2662 +++ vim70/src/configure 2006-12-05 19:57:51.000000000 -0800
     2724+++ vim70/src/configure 2007-01-23 17:14:51.000000000 -0800
    26632725@@ -2,5 +2,9 @@
    26642726 # run the automatically generated configure script
     
    26732735diff -Naur vim70.orig/src/configure.in vim70/src/configure.in
    26742736--- vim70.orig/src/configure.in 2006-05-04 03:46:11.000000000 -0700
    2675 +++ vim70/src/configure.in      2006-12-05 19:58:07.000000000 -0800
     2737+++ vim70/src/configure.in      2007-01-23 17:15:06.000000000 -0800
    26762738@@ -508,7 +508,8 @@
    26772739       LDFLAGS=$ldflags_save
     
    27162778diff -Naur vim70.orig/src/edit.c vim70/src/edit.c
    27172779--- vim70.orig/src/edit.c       2006-05-07 04:48:51.000000000 -0700
    2718 +++ vim70/src/edit.c    2006-12-05 19:58:11.000000000 -0800
     2780+++ vim70/src/edit.c    2007-01-23 17:15:10.000000000 -0800
    27192781@@ -129,7 +129,7 @@
    27202782 
     
    33373399diff -Naur vim70.orig/src/eval.c vim70/src/eval.c
    33383400--- vim70.orig/src/eval.c       2006-05-05 10:15:26.000000000 -0700
    3339 +++ vim70/src/eval.c    2006-12-05 19:58:24.000000000 -0800
     3401+++ vim70/src/eval.c    2007-01-23 17:15:12.000000000 -0800
    33403402@@ -166,7 +166,6 @@
    33413403     int                uf_tm_count;    /* nr of calls */
     
    33993461 static void copy_tv __ARGS((typval_T *from, typval_T *to));
    34003462 static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID));
    3401 @@ -2260,7 +2262,7 @@
     3463@@ -896,6 +898,7 @@
     3464 }
     3465 
     3466 static lval_T  *redir_lval = NULL;
     3467+static garray_T redir_ga;      /* only valid when redir_lval is not NULL */
     3468 static char_u  *redir_endp = NULL;
     3469 static char_u  *redir_varname = NULL;
     3470 
     3471@@ -930,6 +933,9 @@
     3472        return FAIL;
     3473     }
     3474 
     3475+    /* The output is stored in growarray "redir_ga" until redirection ends. */
     3476+    ga_init2(&redir_ga, (int)sizeof(char), 500);
     3477+
     3478     /* Parse the variable name (can be a dict or list entry). */
     3479     redir_endp = get_lval(redir_varname, NULL, redir_lval, FALSE, FALSE, FALSE,
     3480                                                             FNE_CHECK_START);
     3481@@ -972,42 +978,36 @@
     3482 }
     3483 
     3484 /*
     3485- * Append "value[len]" to the variable set by var_redir_start().
     3486+ * Append "value[value_len]" to the variable set by var_redir_start().
     3487+ * The actual appending is postponed until redirection ends, because the value
     3488+ * appended may in fact be the string we write to, changing it may cause freed
     3489+ * memory to be used:
     3490+ *   :redir => foo
     3491+ *   :let foo
     3492+ *   :redir END
     3493  */
     3494     void
     3495-var_redir_str(value, len)
     3496+var_redir_str(value, value_len)
     3497     char_u     *value;
     3498-    int                len;
     3499+    int                value_len;
     3500 {
     3501-    char_u     *val;
     3502-    typval_T   tv;
     3503-    int                save_emsg;
     3504-    int                err;
     3505+    size_t     len;
     3506 
     3507     if (redir_lval == NULL)
     3508        return;
     3509 
     3510-    if (len == -1)
     3511-       /* Append the entire string */
     3512-       val = vim_strsave(value);
     3513+    if (value_len == -1)
     3514+       len = STRLEN(value);    /* Append the entire string */
     3515     else
     3516-       /* Append only the specified number of characters */
     3517-       val = vim_strnsave(value, len);
     3518-    if (val == NULL)
     3519-       return;
     3520+       len = value_len;        /* Append only "value_len" characters */
     3521 
     3522-    tv.v_type = VAR_STRING;
     3523-    tv.vval.v_string = val;
     3524-
     3525-    save_emsg = did_emsg;
     3526-    did_emsg = FALSE;
     3527-    set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)".");
     3528-    err = did_emsg;
     3529-    did_emsg |= save_emsg;
     3530-    if (err)
     3531+    if (ga_grow(&redir_ga, (int)len) == OK)
     3532+    {
     3533+       mch_memmove((char *)redir_ga.ga_data + redir_ga.ga_len, value, len);
     3534+       redir_ga.ga_len += len;
     3535+    }
     3536+    else
     3537        var_redir_stop();
     3538-
     3539-    vim_free(tv.vval.v_string);
     3540 }
     3541 
     3542 /*
     3543@@ -1016,8 +1016,19 @@
     3544     void
     3545 var_redir_stop()
     3546 {
     3547+    typval_T   tv;
     3548+
     3549     if (redir_lval != NULL)
     3550     {
     3551+       /* Append the trailing NUL. */
     3552+       ga_append(&redir_ga, NUL);
     3553+
     3554+       /* Assign the text to the variable. */
     3555+       tv.v_type = VAR_STRING;
     3556+       tv.vval.v_string = redir_ga.ga_data;
     3557+       set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)".");
     3558+       vim_free(tv.vval.v_string);
     3559+
     3560        clear_lval(redir_lval);
     3561        vim_free(redir_lval);
     3562        redir_lval = NULL;
     3563@@ -2260,7 +2271,7 @@
    34023564            EMSG(_(e_letunexp));
    34033565        else
     
    34083570 
    34093571            p = get_tv_string_chk(tv);
    3410 @@ -2269,7 +2271,7 @@
     3572@@ -2269,7 +2280,7 @@
    34113573                s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE);
    34123574                if (s != NULL)
     
    34173579                }
    34183580            }
    3419 @@ -2278,7 +2280,7 @@
     3581@@ -2278,7 +2289,7 @@
    34203582                write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE);
    34213583                arg_end = arg + 1;
     
    34263588     }
    34273589 
    3428 @@ -3125,7 +3127,12 @@
     3590@@ -3125,7 +3136,12 @@
    34293591     funcdict_T fudi;
    34303592 
     
    34403602        return;
    34413603 
    3442 @@ -3177,9 +3184,18 @@
     3604@@ -3177,9 +3193,18 @@
    34433605            failed = TRUE;
    34443606            break;
     
    34593621         * occurred or an exception was thrown but not caught.
    34603622         * get_func_tv() returned OK, so that the check for trailing
    3461 @@ -3364,6 +3380,8 @@
     3623@@ -3364,6 +3389,8 @@
    34623624        hi = hash_find(ht, varname);
    34633625        if (!HASHITEM_EMPTY(hi))
     
    34683630                return FAIL;
    34693631            delete_var(ht, hi);
    3470 @@ -4895,7 +4913,7 @@
     3632@@ -4895,7 +4922,7 @@
    34713633                    {
    34723634                        if (list_append_tv(l, &item->li_tv) == FAIL)
     
    34773639                        }
    34783640                        item = item->li_next;
    3479 @@ -5295,7 +5313,7 @@
     3641@@ -5295,7 +5322,7 @@
    34803642        EMSG2(_("E697: Missing end of List ']': %s"), *arg);
    34813643 failret:
     
    34863648     }
    34873649 
    3488 @@ -5359,8 +5377,8 @@
     3650@@ -5359,8 +5386,8 @@
    34893651 list_unref(l)
    34903652     list_T *l;
     
    34973659 
    34983660 /*
    3499 @@ -5368,14 +5386,12 @@
     3661@@ -5368,14 +5395,12 @@
    35003662  * Ignores the reference count.
    35013663  */
     
    35153677     if (l->lv_used_prev == NULL)
    35163678        first_list = l->lv_used_next;
    3517 @@ -5388,7 +5404,10 @@
     3679@@ -5388,7 +5413,10 @@
    35183680     {
    35193681        /* Remove the item before deleting it. */
     
    35273689     vim_free(l);
    35283690 }
    3529 @@ -5448,6 +5467,8 @@
     3691@@ -5448,6 +5476,8 @@
    35303692 {
    35313693     listitem_T *item1, *item2;
     
    35363698        return FALSE;
    35373699 
    3538 @@ -5484,6 +5505,8 @@
     3700@@ -5484,6 +5514,8 @@
    35393701     dictitem_T *item2;
    35403702     int                todo;
     
    35453707        return FALSE;
    35463708 
    3547 @@ -5516,19 +5539,29 @@
     3709@@ -5516,19 +5548,29 @@
    35483710 {
    35493711     char_u     buf1[NUMBUFLEN], buf2[NUMBUFLEN];
     
    35793741        case VAR_FUNC:
    35803742            return (tv1->vval.v_string != NULL
    3581 @@ -6059,6 +6092,10 @@
     3743@@ -6059,6 +6101,10 @@
    35823744     tabpage_T  *tp;
    35833745 #endif
     
    35903752      * 1. Go through all accessible variables and mark all lists and dicts
    35913753      *    with copyID.
    3592 @@ -6097,7 +6134,10 @@
     3754@@ -6097,7 +6143,10 @@
    35933755     for (dd = first_dict; dd != NULL; )
    35943756        if (dd->dv_copyID != copyID)
     
    36023764 
    36033765            /* restart, next dict may also have been freed */
    3604 @@ -6114,7 +6154,10 @@
     3766@@ -6114,7 +6163,10 @@
    36053767     for (ll = first_list; ll != NULL; )
    36063768        if (ll->lv_copyID != copyID && ll->lv_watch == NULL)
     
    36143776 
    36153777            /* restart, next list may also have been freed */
    3616 @@ -6207,11 +6250,12 @@
     3778@@ -6207,11 +6259,12 @@
    36173779     d = (dict_T *)alloc(sizeof(dict_T));
    36183780     if (d != NULL)
     
    36283790        hash_init(&d->dv_hashtab);
    36293791        d->dv_lock = 0;
    3630 @@ -6229,8 +6273,8 @@
     3792@@ -6229,8 +6282,8 @@
    36313793 dict_unref(d)
    36323794     dict_T *d;
     
    36393801 
    36403802 /*
    3641 @@ -6238,16 +6282,14 @@
     3803@@ -6238,16 +6291,14 @@
    36423804  * Ignores the reference count.
    36433805  */
     
    36593821     if (d->dv_used_prev == NULL)
    36603822        first_dict = d->dv_used_next;
    3661 @@ -6267,7 +6309,10 @@
     3823@@ -6267,7 +6318,10 @@
    36623824             * something recursive causing trouble. */
    36633825            di = HI2DI(hi);
     
    36713833        }
    36723834     }
    3673 @@ -6718,7 +6763,7 @@
     3835@@ -6718,7 +6772,7 @@
    36743836        EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg);
    36753837 failret:
     
    36803842     }
    36813843 
    3682 @@ -7139,6 +7184,7 @@
     3844@@ -7139,6 +7193,7 @@
    36833845     {"setreg",         2, 3, f_setreg},
    36843846     {"settabwinvar",   4, 4, f_settabwinvar},
     
    36883850     {"sort",           1, 2, f_sort},
    36893851     {"soundfold",      1, 1, f_soundfold},
    3690 @@ -7595,8 +7641,8 @@
     3852@@ -7595,8 +7650,8 @@
    36913853  * Give an error message with a function name.  Handle <SNR> things.
    36923854  */
     
    36993861 {
    37003862     char_u     *p;
    3701 @@ -7605,7 +7651,7 @@
     3863@@ -7605,7 +7660,7 @@
    37023864        p = concat_str((char_u *)"<SNR>", name + 3);
    37033865     else
     
    37083870        vim_free(p);
    37093871 }
    3710 @@ -8252,6 +8298,12 @@
     3872@@ -8252,6 +8307,12 @@
    37113873        EMSG(_("E785: complete() can only be used in Insert mode"));
    37123874        return;
     
    37213883     {
    37223884        EMSG(_(e_invarg));
    3723 @@ -9173,25 +9225,25 @@
     3885@@ -9173,25 +9234,25 @@
    37243886     typval_T   save_key;
    37253887     int                rem;
     
    37513913     }
    37523914 
    3753 @@ -9223,7 +9275,7 @@
     3915@@ -9223,7 +9284,7 @@
    37543916                {
    37553917                    --todo;
     
    37603922                    vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
    37613923                    if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL
    3762 @@ -9242,7 +9294,7 @@
     3924@@ -9242,7 +9303,7 @@
    37633925        {
    37643926            for (li = l->lv_first; li != NULL; li = nli)
     
    37693931                nli = li->li_next;
    37703932                if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL
    3771 @@ -9598,7 +9650,9 @@
     3933@@ -9598,7 +9659,9 @@
    37723934     typval_T   *argvars;
    37733935     typval_T   *rettv;
     
    37803942 
    37813943 /*
    3782 @@ -9792,6 +9846,9 @@
     3944@@ -9792,6 +9855,9 @@
    37833945     varnumber_T                n;
    37843946     int                        error = FALSE;
     
    37903952     ++allow_keys;
    37913953     if (argvars[0].v_type == VAR_UNKNOWN)
    3792 @@ -9809,6 +9866,10 @@
     3954@@ -9809,6 +9875,10 @@
    37933955     --no_mapping;
    37943956     --allow_keys;
     
    38013963     if (IS_SPECIAL(n) || mod_mask != 0)
    38023964     {
    3803 @@ -9837,6 +9898,53 @@
     3965@@ -9837,6 +9907,53 @@
    38043966        temp[i++] = NUL;
    38053967        rettv->v_type = VAR_STRING;
     
    38554017 }
    38564018 
    3857 @@ -10412,20 +10520,14 @@
     4019@@ -10412,20 +10529,14 @@
    38584020 
    38594021     if (win != NULL && varname != NULL)
     
    38824044        {
    38834045            if (*varname == NUL)
    3884 @@ -10438,6 +10540,10 @@
     4046@@ -10438,6 +10549,10 @@
    38854047            if (v != NULL)
    38864048                copy_tv(&v->di_tv, rettv);
     
    38934055 
    38944056     --emsg_off;
    3895 @@ -11312,14 +11418,19 @@
     4057@@ -11312,14 +11427,19 @@
    38964058 
    38974059 static int inputsecret_flag = 0;
     
    39164078     char_u     *prompt = get_tv_string_chk(&argvars[0]);
    39174079     char_u     *p = NULL;
    3918 @@ -11369,10 +11480,10 @@
     4080@@ -11369,10 +11489,10 @@
    39194081            if (defstr != NULL)
    39204082                stuffReadbuffSpec(defstr);
     
    39294091 
    39304092                rettv->vval.v_string = NULL;
    3931 @@ -11404,6 +11515,18 @@
     4093@@ -11404,6 +11524,18 @@
    39324094 }
    39334095 
     
    39484110  */
    39494111     static void
    3950 @@ -11443,7 +11566,7 @@
     4112@@ -11443,7 +11575,7 @@
    39514113     }
    39524114     else
     
    39574119 
    39584120 /*
    3959 @@ -11471,6 +11594,7 @@
     4121@@ -11471,6 +11603,7 @@
    39604122     }
    39614123 
     
    39654127     msg_scroll = TRUE;
    39664128     msg_clr_eos();
    3967 @@ -13250,7 +13374,7 @@
     4129@@ -13250,7 +13383,7 @@
    39684130        if (argvars[2].v_type != VAR_UNKNOWN)
    39694131            EMSG2(_(e_toomanyarg), "remove()");
     
    39744136            key = get_tv_string_chk(&argvars[1]);
    39754137            if (key != NULL)
    3976 @@ -13270,7 +13394,7 @@
     4138@@ -13270,7 +13403,7 @@
    39774139     else if (argvars[0].v_type != VAR_LIST)
    39784140        EMSG2(_(e_listdictarg), "remove()");
     
    39834145        int         error = FALSE;
    39844146 
    3985 @@ -14157,11 +14281,7 @@
     4147@@ -14157,11 +14290,7 @@
    39864148     typval_T   *rettv;
    39874149 {
     
    39954157     typval_T   *varp;
    39964158     char_u     nbuf[NUMBUFLEN];
    3997 @@ -14178,12 +14298,7 @@
     4159@@ -14178,12 +14307,7 @@
    39984160     if (buf != NULL && varname != NULL && varp != NULL)
    39994161     {
     
    40084170        if (*varname == '&')
    40094171        {
    4010 @@ -14210,11 +14325,7 @@
     4172@@ -14210,11 +14334,7 @@
    40114173        }
    40124174 
     
    40204182 }
    40214183 
    4022 @@ -14582,6 +14693,18 @@
     4184@@ -14582,6 +14702,18 @@
    40234185 }
    40244186 
     
    40394201  */
    40404202     static void
    4041 @@ -15950,6 +16073,10 @@
     4203@@ -15950,6 +16082,10 @@
    40424204        }
    40434205     }
     
    40504212 }
    40514213 
    4052 @@ -16173,7 +16300,7 @@
     4214@@ -16173,7 +16309,7 @@
    40534215        curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant");
    40544216        curwin->w_set_curswant = FALSE;
     
    40594221        curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill");
    40604222 #endif
    4061 @@ -16218,6 +16345,7 @@
     4223@@ -16218,6 +16354,7 @@
    40624224 #ifdef FEAT_VIRTUALEDIT
    40634225     dict_add_nr_str(dict, "coladd", (long)curwin->w_cursor.coladd, NULL);
     
    40674229 
    40684230     dict_add_nr_str(dict, "topline", (long)curwin->w_topline, NULL);
    4069 @@ -16438,9 +16566,12 @@
     4231@@ -16438,9 +16575,12 @@
    40704232     long       i = 0;
    40714233     long       n;
     
    40834245 
    40844246     if (fnump != NULL)
    4085 @@ -16466,8 +16597,9 @@
     4247@@ -16466,8 +16606,9 @@
    40864248 #ifdef FEAT_VIRTUALEDIT
    40874249     n = list_find_nr(l, i, NULL);
     
    40954257 
    40964258     return OK;
    4097 @@ -17759,6 +17891,13 @@
     4259@@ -17759,6 +17900,13 @@
    40984260     }
    40994261     else                   /* add a new variable */
     
    41094271        for (p = varname; *p != NUL; ++p)
    41104272            if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p))
    4111 @@ -17792,7 +17931,7 @@
     4273@@ -17792,7 +17940,7 @@
    41124274 }
    41134275 
     
    41184280  */
    41194281     static int
    4120 @@ -17814,6 +17953,23 @@
     4282@@ -17814,6 +17962,23 @@
    41214283 }
    41224284 
     
    41424304  * Also give an error message, using "name".
    41434305  */
    4144 @@ -18396,12 +18552,14 @@
     4306@@ -18396,12 +18561,14 @@
    41454307 
    41464308     if (!eap->skip)
     
    41594321            if (*arg == K_SPECIAL)
    41604322                j = 3;
    4161 @@ -18786,6 +18944,7 @@
     4323@@ -18786,6 +18953,7 @@
    41624324                if (dict_add(fudi.fd_dict, fudi.fd_di) == FAIL)
    41634325                {
     
    41674329                }
    41684330            }
    4169 @@ -18963,7 +19122,8 @@
     4331@@ -18963,7 +19131,8 @@
    41704332     else if (lead > 0)
    41714333     {
     
    41774339            /* It's "s:" or "<SID>" */
    41784340            if (current_SID <= 0)
    4179 @@ -19618,6 +19778,7 @@
     4341@@ -19618,6 +19787,7 @@
    41804342     char_u     *name;
    41814343 #ifdef FEAT_PROFILE
     
    41854347 
    41864348     /* If depth of calling is getting too high, don't execute the function */
    4187 @@ -19685,6 +19846,7 @@
     4349@@ -19685,6 +19855,7 @@
    41884350     v->di_tv.vval.v_list = &fc.l_varlist;
    41894351     vim_memset(&fc.l_varlist, 0, sizeof(list_T));
     
    41934355     /*
    41944356      * Set a:firstline to "firstline" and a:lastline to "lastline".
    4195 @@ -19761,7 +19923,7 @@
     4357@@ -19761,7 +19932,7 @@
    41964358            if (p_verbose >= 14)
    41974359            {
     
    42024364 
    42034365                msg_puts((char_u *)"(");
    4204 @@ -19773,8 +19935,8 @@
     4366@@ -19773,8 +19944,8 @@
    42054367                        msg_outnum((long)argvars[i].vval.v_number);
    42064368                    else
     
    42134375                        vim_free(tofree);
    42144376                    }
    4215 @@ -19796,7 +19958,7 @@
     4377@@ -19796,7 +19967,7 @@
    42164378                       || (fc.caller != NULL && &fc.caller->func->uf_profiling))
    42174379        {
     
    42224384        }
    42234385        script_prof_save(&wait_start);
    4224 @@ -19826,14 +19988,14 @@
     4386@@ -19826,14 +19997,14 @@
    42254387     if (do_profiling == PROF_YES && (fp->uf_profiling
    42264388                    || (fc.caller != NULL && &fc.caller->func->uf_profiling)))
     
    42434405     }
    42444406 #endif
    4245 @@ -19852,13 +20014,13 @@
     4407@@ -19852,13 +20023,13 @@
    42464408        else
    42474409        {
     
    42614423diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c
    42624424--- vim70.orig/src/ex_cmds2.c   2006-04-17 03:19:07.000000000 -0700
    4263 +++ vim70/src/ex_cmds2.c        2006-12-05 19:57:56.000000000 -0800
    4264 @@ -3648,13 +3648,13 @@
     4425+++ vim70/src/ex_cmds2.c        2007-01-23 17:15:23.000000000 -0800
     4426@@ -2811,6 +2811,17 @@
     4427     }
     4428 
     4429 #ifdef FEAT_AUTOCMD
     4430+    /* Apply SourceCmd autocommands, they should get the file and source it. */
     4431+    if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL)
     4432+           && apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp,
     4433+                                                              FALSE, curbuf))
     4434+# ifdef FEAT_EVAL
     4435+       return aborting() ? FAIL : OK;
     4436+# else
     4437+       return OK;
     4438+# endif
     4439+
     4440+    /* Apply SourcePre autocommands, they may get the file. */
     4441     apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
     4442 #endif
     4443 
     4444@@ -3648,13 +3659,13 @@
    42654445  * Return FALSE when not sourcing a file.
    42664446  */
     
    42824462diff -Naur vim70.orig/src/ex_cmds.c vim70/src/ex_cmds.c
    42834463--- vim70.orig/src/ex_cmds.c    2006-04-22 11:56:56.000000000 -0700
    4284 +++ vim70/src/ex_cmds.c 2006-12-05 19:58:00.000000000 -0800
     4464+++ vim70/src/ex_cmds.c 2007-01-23 17:14:59.000000000 -0800
    42854465@@ -95,7 +95,10 @@
    42864466                _("<%s>%s%s  %d,  Hex %02x,  Octal %03o"),
     
    43934573diff -Naur vim70.orig/src/ex_cmds.h vim70/src/ex_cmds.h
    43944574--- vim70.orig/src/ex_cmds.h    2006-04-07 02:44:46.000000000 -0700
    4395 +++ vim70/src/ex_cmds.h 2006-12-05 19:57:46.000000000 -0800
     4575+++ vim70/src/ex_cmds.h 2007-01-23 17:14:49.000000000 -0800
    43964576@@ -262,7 +262,7 @@
    43974577 EX(CMD_comclear,       "comclear",     ex_comclear,
     
    44054585diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c
    44064586--- vim70.orig/src/ex_docmd.c   2006-05-05 09:33:19.000000000 -0700
    4407 +++ vim70/src/ex_docmd.c        2006-12-05 19:58:21.000000000 -0800
     4587+++ vim70/src/ex_docmd.c        2007-01-23 17:15:11.000000000 -0800
    44084588@@ -58,9 +58,9 @@
    44094589 #endif
     
    48685048diff -Naur vim70.orig/src/ex_eval.c vim70/src/ex_eval.c
    48695049--- vim70.orig/src/ex_eval.c    2006-04-22 12:22:27.000000000 -0700
    4870 +++ vim70/src/ex_eval.c 2006-12-05 19:58:21.000000000 -0800
     5050+++ vim70/src/ex_eval.c 2007-01-23 17:15:11.000000000 -0800
    48715051@@ -340,7 +340,7 @@
    48725052 
     
    48945074diff -Naur vim70.orig/src/ex_getln.c vim70/src/ex_getln.c
    48955075--- vim70.orig/src/ex_getln.c   2006-04-30 08:32:01.000000000 -0700
    4896 +++ vim70/src/ex_getln.c        2006-12-05 19:58:12.000000000 -0800
     5076+++ vim70/src/ex_getln.c        2007-01-23 17:15:10.000000000 -0800
    48975077@@ -34,7 +34,7 @@
    48985078     int                xp_context;     /* type of expansion */
     
    50445224diff -Naur vim70.orig/src/fileio.c vim70/src/fileio.c
    50455225--- vim70.orig/src/fileio.c     2006-04-30 08:28:57.000000000 -0700
    5046 +++ vim70/src/fileio.c  2006-12-05 19:58:02.000000000 -0800
     5226+++ vim70/src/fileio.c  2007-01-23 17:15:23.000000000 -0800
    50475227@@ -316,6 +316,9 @@
    50485228      * display the line. */
     
    50555235      * For Unix: Use the short file name whenever possible.
    50565236      * Avoids problems with networks and when directory names are changed.
     5237@@ -6151,8 +6154,8 @@
     5238     if (retval != FAIL)
     5239     {
     5240        curbuf = frombuf;
     5241-       while (!bufempty())
     5242-           if (ml_delete(curbuf->b_ml.ml_line_count, FALSE) == FAIL)
     5243+       for (lnum = curbuf->b_ml.ml_line_count; lnum > 0; --lnum)
     5244+           if (ml_delete(lnum, FALSE) == FAIL)
     5245            {
     5246                /* Oops!  We could try putting back the saved lines, but that
     5247                 * might fail again... */
    50575248@@ -6450,17 +6453,10 @@
    50585249     int                old_ro = buf->b_p_ro;
     
    50965287     {"InsertEnter",    EVENT_INSERTENTER},
    50975288     {"InsertLeave",    EVENT_INSERTLEAVE},
    5098 @@ -8088,6 +8080,7 @@
     5289@@ -7003,6 +6995,7 @@
     5290     {"ShellCmdPost",   EVENT_SHELLCMDPOST},
     5291     {"ShellFilterPost",        EVENT_SHELLFILTERPOST},
     5292     {"SourcePre",      EVENT_SOURCEPRE},
     5293+    {"SourceCmd",      EVENT_SOURCECMD},
     5294     {"SpellFileMissing",EVENT_SPELLFILEMISSING},
     5295     {"StdinReadPost",  EVENT_STDINREADPOST},
     5296     {"StdinReadPre",   EVENT_STDINREADPRE},
     5297@@ -8088,6 +8081,7 @@
    50995298  * Search a window for the current buffer.  Save the cursor position and
    51005299  * screen offset.
     
    51045303     void
    51055304 aucmd_prepbuf(aco, buf)
    5106 @@ -8151,6 +8144,7 @@
     5305@@ -8151,6 +8145,7 @@
    51075306 /*
    51085307  * Cleanup after executing autocommands for a (hidden) buffer.
     
    51125311     void
    51135312 aucmd_restbuf(aco)
    5114 @@ -8295,7 +8289,11 @@
     5313@@ -8295,7 +8290,11 @@
    51155314 {
    51165315     int                state;
     
    51255324        state = get_real_state();
    51265325        if (state == NORMAL_BUSY || (state & INSERT) != 0)
    5127 @@ -9063,8 +9061,38 @@
     5326@@ -9063,8 +9062,38 @@
    51285327     return retval;
    51295328 }
     
    51665365diff -Naur vim70.orig/src/fold.c vim70/src/fold.c
    51675366--- vim70.orig/src/fold.c       2006-04-22 12:35:56.000000000 -0700
    5168 +++ vim70/src/fold.c    2006-12-05 19:58:10.000000000 -0800
     5367+++ vim70/src/fold.c    2007-01-23 17:15:09.000000000 -0800
    51695368@@ -2971,7 +2971,11 @@
    51705369     else
     
    51815380diff -Naur vim70.orig/src/getchar.c vim70/src/getchar.c
    51825381--- vim70.orig/src/getchar.c    2006-05-03 10:29:21.000000000 -0700
    5183 +++ vim70/src/getchar.c 2006-12-05 19:58:33.000000000 -0800
     5382+++ vim70/src/getchar.c 2007-01-23 17:15:12.000000000 -0800
    51845383@@ -76,7 +76,7 @@
    51855384  */
     
    53165515diff -Naur vim70.orig/src/globals.h vim70/src/globals.h
    53175516--- vim70.orig/src/globals.h    2006-04-30 06:16:23.000000000 -0700
    5318 +++ vim70/src/globals.h 2006-12-05 19:58:06.000000000 -0800
     5517+++ vim70/src/globals.h 2007-01-23 17:15:05.000000000 -0800
    53195518@@ -166,6 +166,7 @@
    53205519 EXTERN int     emsg_off INIT(= 0);         /* don't display errors for now,
     
    53565555diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c
    53575556--- vim70.orig/src/gui_at_fs.c  2005-07-09 04:30:17.000000000 -0700
    5358 +++ vim70/src/gui_at_fs.c       2006-12-05 19:57:43.000000000 -0800
     5557+++ vim70/src/gui_at_fs.c       2007-01-23 17:14:47.000000000 -0800
    53595558@@ -1861,27 +1861,27 @@
    53605559     XtPointer  pnew;
     
    54725671diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c
    54735672--- vim70.orig/src/gui_beval.c  2006-05-04 12:29:51.000000000 -0700
    5474 +++ vim70/src/gui_beval.c       2006-12-05 19:57:56.000000000 -0800
     5673+++ vim70/src/gui_beval.c       2007-01-23 17:14:55.000000000 -0800
    54755674@@ -926,7 +926,7 @@
    54765675 #  define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \
     
    55115710diff -Naur vim70.orig/src/gui.c vim70/src/gui.c
    55125711--- vim70.orig/src/gui.c        2006-05-03 04:00:59.000000000 -0700
    5513 +++ vim70/src/gui.c     2006-12-05 19:58:06.000000000 -0800
     5712+++ vim70/src/gui.c     2007-01-23 17:15:05.000000000 -0800
    55145713@@ -187,9 +187,10 @@
    55155714 #endif
     
    56145813diff -Naur vim70.orig/src/gui_gtk.c vim70/src/gui_gtk.c
    56155814--- vim70.orig/src/gui_gtk.c    2006-05-05 04:52:52.000000000 -0700
    5616 +++ vim70/src/gui_gtk.c 2006-12-05 19:58:10.000000000 -0800
     5815+++ vim70/src/gui_gtk.c 2007-01-23 17:15:08.000000000 -0800
    56175816@@ -957,15 +957,15 @@
    56185817 get_menu_position(vimmenu_T *menu)
     
    57125911diff -Naur vim70.orig/src/gui_gtk_x11.c vim70/src/gui_gtk_x11.c
    57135912--- vim70.orig/src/gui_gtk_x11.c        2006-05-04 23:58:59.000000000 -0700
    5714 +++ vim70/src/gui_gtk_x11.c     2006-12-05 19:57:56.000000000 -0800
     5913+++ vim70/src/gui_gtk_x11.c     2007-01-23 17:14:55.000000000 -0800
    57155914@@ -3233,12 +3233,12 @@
    57165915 on_select_tab(
     
    57775976diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c
    57785977--- vim70.orig/src/gui_xmebw.c  2006-04-30 08:32:32.000000000 -0700
    5779 +++ vim70/src/gui_xmebw.c       2006-12-05 19:58:10.000000000 -0800
     5978+++ vim70/src/gui_xmebw.c       2007-01-23 17:15:08.000000000 -0800
    57805979@@ -47,13 +47,13 @@
    57815980 #include "gui_xmebwp.h"
     
    59066105diff -Naur vim70.orig/src/hardcopy.c vim70/src/hardcopy.c
    59076106--- vim70.orig/src/hardcopy.c   2006-05-04 03:09:58.000000000 -0700
    5908 +++ vim70/src/hardcopy.c        2006-12-05 19:57:56.000000000 -0800
     6107+++ vim70/src/hardcopy.c        2007-01-23 17:14:55.000000000 -0800
    59096108@@ -1794,29 +1794,27 @@
    59106109     static int
     
    60096208diff -Naur vim70.orig/src/if_cscope.c vim70/src/if_cscope.c
    60106209--- vim70.orig/src/if_cscope.c  2006-04-18 01:54:15.000000000 -0700
    6011 +++ vim70/src/if_cscope.c       2006-12-05 19:58:12.000000000 -0800
    6012 @@ -989,8 +989,7 @@
     6210+++ vim70/src/if_cscope.c       2007-01-23 17:15:15.000000000 -0800
     6211@@ -627,10 +627,11 @@
     6212         * If the database is out of date, or there's some other problem,
     6213         * cscope will output error messages before the number-of-lines output.
     6214         * Display/discard any output that doesn't match what we want.
     6215+        * Accept "\S*cscope: X lines", also matches "mlcscope".
     6216         */
     6217        if ((stok = strtok(buf, (const char *)" ")) == NULL)
     6218            continue;
     6219-       if (strcmp((const char *)stok, "cscope:"))
     6220+       if (strstr((const char *)stok, "cscope:") == NULL)
     6221            continue;
     6222 
     6223        if ((stok = strtok(NULL, (const char *)" ")) == NULL)
     6224@@ -989,8 +990,7 @@
    60136225 {
    60146226     int i;
     
    60206232     char cmdletter;
    60216233     char *qfpos;
    6022 @@ -1009,7 +1008,7 @@
     6234@@ -1009,7 +1009,7 @@
    60236235     totmatches = 0;
    60246236     for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
     
    60296241 
    60306242        /* send cmd to cscope */
    6031 @@ -1101,38 +1100,44 @@
     6243@@ -1101,38 +1101,44 @@
    60326244     if (qfpos != NULL && *qfpos != '0' && totmatches > 0)
    60336245     {
     
    60966308        mch_remove(tmp);
    60976309        vim_free(tmp);
    6098 @@ -1141,6 +1146,9 @@
     6310@@ -1141,6 +1147,9 @@
    60996311     else
    61006312 #endif /* FEAT_QUICKFIX */
     
    61066318        cs_fill_results((char *)pat, totmatches, nummatches, &matches,
    61076319                                                         &contexts, &matched);
    6108 @@ -1721,7 +1729,7 @@
     6320@@ -1721,7 +1730,7 @@
    61096321               continue;
    61106322 
     
    61156327 
    61166328           if (strcmp(cntx, "<global>")==0)
    6117 @@ -1729,7 +1737,7 @@
     6329@@ -1729,7 +1738,7 @@
    61186330           else
    61196331               sprintf(context, "<<%s>>", cntx);
     
    61266338diff -Naur vim70.orig/src/if_perl.xs vim70/src/if_perl.xs
    61276339--- vim70.orig/src/if_perl.xs   2006-03-06 10:57:16.000000000 -0800
    6128 +++ vim70/src/if_perl.xs        2006-12-05 19:57:54.000000000 -0800
     6340+++ vim70/src/if_perl.xs        2007-01-23 17:14:52.000000000 -0800
    61296341@@ -155,8 +155,8 @@
    61306342 static int (*perl_run)(PerlInterpreter*);
     
    62416453diff -Naur vim70.orig/src/if_python.c vim70/src/if_python.c
    62426454--- vim70.orig/src/if_python.c  2006-04-30 08:31:36.000000000 -0700
    6243 +++ vim70/src/if_python.c       2006-12-05 19:58:04.000000000 -0800
     6455+++ vim70/src/if_python.c       2007-01-23 17:15:02.000000000 -0800
    62446456@@ -1463,7 +1463,7 @@
    62456457     if (this->buf && this->buf != INVALID_BUFFER_VALUE)
     
    62806492diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c
    62816493--- vim70.orig/src/if_ruby.c    2006-04-30 08:37:52.000000000 -0700
    6282 +++ vim70/src/if_ruby.c 2006-12-05 19:57:54.000000000 -0800
     6494+++ vim70/src/if_ruby.c 2007-01-23 17:14:52.000000000 -0800
    62836495@@ -643,11 +643,14 @@
    62846496 
     
    63956607diff -Naur vim70.orig/src/macros.h vim70/src/macros.h
    63966608--- vim70.orig/src/macros.h     2006-03-01 04:01:10.000000000 -0800
    6397 +++ vim70/src/macros.h  2006-12-05 19:58:00.000000000 -0800
     6609+++ vim70/src/macros.h  2007-01-23 17:14:57.000000000 -0800
    63986610@@ -276,3 +276,9 @@
    63996611 # define MB_CHARLEN(p)         STRLEN(p)
     
    64086620diff -Naur vim70.orig/src/main.c vim70/src/main.c
    64096621--- vim70.orig/src/main.c       2006-05-03 10:36:44.000000000 -0700
    6410 +++ vim70/src/main.c    2006-12-05 19:58:11.000000000 -0800
     6622+++ vim70/src/main.c    2007-01-23 17:15:10.000000000 -0800
    64116623@@ -564,7 +564,11 @@
    64126624      */
     
    66026814diff -Naur vim70.orig/src/Makefile vim70/src/Makefile
    66036815--- vim70.orig/src/Makefile     2006-05-07 06:25:27.000000000 -0700
    6604 +++ vim70/src/Makefile  2006-12-05 19:57:59.000000000 -0800
     6816+++ vim70/src/Makefile  2007-01-23 17:14:56.000000000 -0800
    66056817@@ -2177,6 +2177,7 @@
    66066818        cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
     
    66226834diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c
    66236835--- vim70.orig/src/mbyte.c      2006-04-30 04:51:01.000000000 -0700
    6624 +++ vim70/src/mbyte.c   2006-12-05 19:58:39.000000000 -0800
     6836+++ vim70/src/mbyte.c   2007-01-23 17:15:12.000000000 -0800
    66256837@@ -311,7 +311,11 @@
    66266838 
     
    67196931diff -Naur vim70.orig/src/memfile.c vim70/src/memfile.c
    67206932--- vim70.orig/src/memfile.c    2006-03-06 00:59:15.000000000 -0800
    6721 +++ vim70/src/memfile.c 2006-12-05 19:58:11.000000000 -0800
     6933+++ vim70/src/memfile.c 2007-01-23 17:15:10.000000000 -0800
    67226934@@ -517,7 +517,7 @@
    67236935        mf_ins_free(mfp, hp);   /* put *hp in the free list */
     
    67766988diff -Naur vim70.orig/src/memline.c vim70/src/memline.c
    67776989--- vim70.orig/src/memline.c    2006-04-20 14:00:21.000000000 -0700
    6778 +++ vim70/src/memline.c 2006-12-05 19:58:12.000000000 -0800
     6990+++ vim70/src/memline.c 2007-01-23 17:15:12.000000000 -0800
    67796991@@ -215,7 +215,7 @@
    67806992 #define ML_FLUSH       0x02        /* flush locked block */
     
    68077019        else
    68087020            set_b0_dir_flag(b0p, buf);
    6809 @@ -1325,6 +1325,7 @@
     7021@@ -1325,7 +1325,11 @@
    68107022            mf_put(mfp, hp, FALSE, FALSE);
    68117023        mf_close(mfp, FALSE);       /* will also vim_free(mfp->mf_fname) */
    68127024     }
    6813 +    vim_free(buf->b_ml.ml_stack);
    6814      vim_free(buf);
     7025-    vim_free(buf);
     7026+    if (buf != NULL)
     7027+    {
     7028+       vim_free(buf->b_ml.ml_stack);
     7029+       vim_free(buf);
     7030+    }
    68157031     if (serious_error && called_from_main)
    68167032        ml_close(curbuf, TRUE);
    6817 @@ -1633,6 +1634,7 @@
     7033 #ifdef FEAT_AUTOCMD
     7034@@ -1633,6 +1637,7 @@
    68187035     int                    fd;
    68197036     struct block0   b0;
     
    68237040     char_u         uname[B0_UNAME_SIZE];
    68247041 #endif
    6825 @@ -1652,8 +1654,11 @@
     7042@@ -1652,8 +1657,11 @@
    68267043 #endif
    68277044            MSG_PUTS(_("             dated: "));
     
    68377054 
    68387055     /*
    6839 @@ -3652,6 +3657,7 @@
     7056@@ -3652,6 +3660,7 @@
    68407057 {
    68417058     struct stat st;
     
    68457062     ++no_wait_return;
    68467063     (void)EMSG(_("E325: ATTENTION"));
    6847 @@ -3666,7 +3672,11 @@
     7064@@ -3666,7 +3675,11 @@
    68487065     {
    68497066        MSG_PUTS(_("             dated: "));
     
    68607077diff -Naur vim70.orig/src/menu.c vim70/src/menu.c
    68617078--- vim70.orig/src/menu.c       2006-05-03 10:30:48.000000000 -0700
    6862 +++ vim70/src/menu.c    2006-12-05 19:58:28.000000000 -0800
     7079+++ vim70/src/menu.c    2007-01-23 17:15:12.000000000 -0800
    68637080@@ -511,6 +511,14 @@
    68647081         * name (without mnemonic and accelerator text). */
     
    69467163diff -Naur vim70.orig/src/message.c vim70/src/message.c
    69477164--- vim70.orig/src/message.c    2006-05-06 13:07:37.000000000 -0700
    6948 +++ vim70/src/message.c 2006-12-05 19:58:06.000000000 -0800
     7165+++ vim70/src/message.c 2007-01-23 17:15:17.000000000 -0800
    69497166@@ -53,7 +53,6 @@
    69507167 static struct msg_hist *first_msg_hist = NULL;
     
    69557172 /*
    69567173  * When writing messages to the screen, there are many different situations.
    6957 @@ -1925,7 +1924,8 @@
     7174@@ -1557,7 +1556,7 @@
     7175     int                c_extra = 0;
     7176     char_u     *p_extra = NULL;            /* init to make SASC shut up */
     7177     int                n;
     7178-    int                attr= 0;
     7179+    int                attr = 0;
     7180     char_u     *trail = NULL;
     7181 #ifdef FEAT_MBYTE
     7182     int                l;
     7183@@ -1582,7 +1581,7 @@
     7184 
     7185     while (!got_int)
     7186     {
     7187-       if (n_extra)
     7188+       if (n_extra > 0)
     7189        {
     7190            --n_extra;
     7191            if (c_extra)
     7192@@ -1596,7 +1595,7 @@
     7193            col += (*mb_ptr2cells)(s);
     7194            mch_memmove(buf, s, (size_t)l);
     7195            buf[l] = NUL;
     7196-           msg_puts_attr(buf, attr);
     7197+           msg_puts(buf);
     7198            s += l;
     7199            continue;
     7200        }
     7201@@ -1636,6 +1635,9 @@
     7202                p_extra = transchar_byte(c);
     7203                c_extra = NUL;
     7204                c = *p_extra++;
     7205+               /* Use special coloring to be able to distinguish <hex> from
     7206+                * the same in plain text. */
     7207+               attr = hl_attr(HLF_8);
     7208            }
     7209            else if (c == ' ' && trail != NULL && s > trail)
     7210            {
     7211@@ -1925,7 +1927,8 @@
    69587212             * If screen is completely filled and 'more' is set then wait
    69597213             * for a character.
     
    69657219            {
    69667220 #ifdef FEAT_CON_DIALOG
    6967 @@ -4123,8 +4123,6 @@
     7221@@ -4123,8 +4126,6 @@
    69687222            case 'c':
    69697223            case 's':
     
    69747228                switch (fmt_spec)
    69757229                {
    6976 @@ -4175,15 +4173,16 @@
     7230@@ -4175,15 +4176,16 @@
    69777231                        str_arg_l = 0;
    69787232                    else
     
    69997253diff -Naur vim70.orig/src/misc1.c vim70/src/misc1.c
    70007254--- vim70.orig/src/misc1.c      2006-04-30 08:30:02.000000000 -0700
    7001 +++ vim70/src/misc1.c   2006-12-05 19:58:10.000000000 -0800
     7255+++ vim70/src/misc1.c   2007-01-23 17:15:07.000000000 -0800
    70027256@@ -1761,15 +1761,13 @@
    70037257      * Add column offset for 'number', 'foldcolumn', etc.
     
    71147368diff -Naur vim70.orig/src/misc2.c vim70/src/misc2.c
    71157369--- vim70.orig/src/misc2.c      2006-05-04 05:12:38.000000000 -0700
    7116 +++ vim70/src/misc2.c   2006-12-05 19:58:04.000000000 -0800
     7370+++ vim70/src/misc2.c   2007-01-23 17:15:02.000000000 -0800
    71177371@@ -1229,6 +1229,94 @@
    71187372     return escaped_string;
     
    72127466diff -Naur vim70.orig/src/netbeans.c vim70/src/netbeans.c
    72137467--- vim70.orig/src/netbeans.c   2006-04-22 11:00:05.000000000 -0700
    7214 +++ vim70/src/netbeans.c        2006-12-05 19:58:11.000000000 -0800
     7468+++ vim70/src/netbeans.c        2007-01-23 17:15:10.000000000 -0800
    72157469@@ -61,7 +61,7 @@
    72167470 
     
    74217675diff -Naur vim70.orig/src/normal.c vim70/src/normal.c
    74227676--- vim70.orig/src/normal.c     2006-04-29 06:11:18.000000000 -0700
    7423 +++ vim70/src/normal.c  2006-12-05 19:58:33.000000000 -0800
     7677+++ vim70/src/normal.c  2007-01-23 17:15:12.000000000 -0800
    74247678@@ -651,9 +651,8 @@
    74257679        /* Fake a "c"hange command.  When "restart_edit" is set (e.g., because
     
    75207774diff -Naur vim70.orig/src/ops.c vim70/src/ops.c
    75217775--- vim70.orig/src/ops.c        2006-04-30 08:13:44.000000000 -0700
    7522 +++ vim70/src/ops.c     2006-12-05 19:58:11.000000000 -0800
     7776+++ vim70/src/ops.c     2007-01-23 17:15:10.000000000 -0800
    75237777@@ -95,8 +95,8 @@
    75247778 static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp));
     
    77207974diff -Naur vim70.orig/src/option.c vim70/src/option.c
    77217975--- vim70.orig/src/option.c     2006-05-03 10:32:28.000000000 -0700
    7722 +++ vim70/src/option.c  2006-12-05 19:58:09.000000000 -0800
     7976+++ vim70/src/option.c  2007-01-23 17:15:07.000000000 -0800
    77237977@@ -2294,7 +2294,7 @@
    77247978                            {(char_u *)0L, (char_u *)0L}
     
    78368090diff -Naur vim70.orig/src/os_unix.c vim70/src/os_unix.c
    78378091--- vim70.orig/src/os_unix.c    2006-05-01 01:13:15.000000000 -0700
    7838 +++ vim70/src/os_unix.c 2006-12-05 19:57:56.000000000 -0800
     8092+++ vim70/src/os_unix.c 2007-01-23 17:14:55.000000000 -0800
    78398093@@ -3934,7 +3934,7 @@
    78408094                    {
     
    78958149diff -Naur vim70.orig/src/popupmnu.c vim70/src/popupmnu.c
    78968150--- vim70.orig/src/popupmnu.c   2006-04-20 13:18:37.000000000 -0700
    7897 +++ vim70/src/popupmnu.c        2006-12-05 19:57:54.000000000 -0800
     8151+++ vim70/src/popupmnu.c        2007-01-23 17:14:53.000000000 -0800
    78988152@@ -552,6 +552,9 @@
    78998153 {
     
    79088162diff -Naur vim70.orig/src/proto/buffer.pro vim70/src/proto/buffer.pro
    79098163--- vim70.orig/src/proto/buffer.pro     2006-05-07 06:08:29.000000000 -0700
    7910 +++ vim70/src/proto/buffer.pro  2006-12-05 19:58:00.000000000 -0800
     8164+++ vim70/src/proto/buffer.pro  2007-01-23 17:14:57.000000000 -0800
    79118165@@ -10,6 +10,7 @@
    79128166 extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit));
     
    79198173diff -Naur vim70.orig/src/proto/eval.pro vim70/src/proto/eval.pro
    79208174--- vim70.orig/src/proto/eval.pro       2006-05-07 06:08:33.000000000 -0700
    7921 +++ vim70/src/proto/eval.pro    2006-12-05 19:58:07.000000000 -0800
     8175+++ vim70/src/proto/eval.pro    2007-01-23 17:15:06.000000000 -0800
    79228176@@ -44,7 +44,7 @@
    79238177 extern char_u *get_user_var_name __ARGS((expand_T *xp, int idx));
     
    79318185diff -Naur vim70.orig/src/proto/menu.pro vim70/src/proto/menu.pro
    79328186--- vim70.orig/src/proto/menu.pro       2006-05-07 06:08:51.000000000 -0700
    7933 +++ vim70/src/proto/menu.pro    2006-12-05 19:57:54.000000000 -0800
     8187+++ vim70/src/proto/menu.pro    2007-01-23 17:14:53.000000000 -0800
    79348188@@ -10,6 +10,7 @@
    79358189 extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu));
     
    79428196diff -Naur vim70.orig/src/proto/misc2.pro vim70/src/proto/misc2.pro
    79438197--- vim70.orig/src/proto/misc2.pro      2006-05-07 06:08:54.000000000 -0700
    7944 +++ vim70/src/proto/misc2.pro   2006-12-05 19:58:04.000000000 -0800
     8198+++ vim70/src/proto/misc2.pro   2007-01-23 17:15:02.000000000 -0800
    79458199@@ -29,6 +29,7 @@
    79468200 extern char_u *vim_strnsave __ARGS((char_u *string, int len));
     
    79538207diff -Naur vim70.orig/src/proto/ops.pro vim70/src/proto/ops.pro
    79548208--- vim70.orig/src/proto/ops.pro        2006-05-07 06:08:58.000000000 -0700
    7955 +++ vim70/src/proto/ops.pro     2006-12-05 19:58:11.000000000 -0800
     8209+++ vim70/src/proto/ops.pro     2007-01-23 17:15:10.000000000 -0800
    79568210@@ -17,10 +17,10 @@
    79578211 extern void put_register __ARGS((int name, void *reg));
     
    79698223diff -Naur vim70.orig/src/proto/undo.pro vim70/src/proto/undo.pro
    79708224--- vim70.orig/src/proto/undo.pro       2006-05-07 06:09:11.000000000 -0700
    7971 +++ vim70/src/proto/undo.pro    2006-12-05 19:57:47.000000000 -0800
     8225+++ vim70/src/proto/undo.pro    2007-01-23 17:14:49.000000000 -0800
    79728226@@ -4,6 +4,7 @@
    79738227 extern int u_savesub __ARGS((linenr_T lnum));
     
    79808234diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c
    79818235--- vim70.orig/src/quickfix.c   2006-05-03 00:47:42.000000000 -0700
    7982 +++ vim70/src/quickfix.c        2006-12-05 19:58:09.000000000 -0800
     8236+++ vim70/src/quickfix.c        2007-01-23 17:15:07.000000000 -0800
    79838237@@ -500,8 +500,6 @@
    79848238        {
     
    82358489diff -Naur vim70.orig/src/regexp.c vim70/src/regexp.c
    82368490--- vim70.orig/src/regexp.c     2006-04-30 08:31:50.000000000 -0700
    8237 +++ vim70/src/regexp.c  2006-12-05 19:58:09.000000000 -0800
     8491+++ vim70/src/regexp.c  2007-01-23 17:15:07.000000000 -0800
    82388492@@ -3777,8 +3777,8 @@
    82398493 
     
    83728626diff -Naur vim70.orig/src/screen.c vim70/src/screen.c
    83738627--- vim70.orig/src/screen.c     2006-05-05 03:13:55.000000000 -0700
    8374 +++ vim70/src/screen.c  2006-12-05 19:58:12.000000000 -0800
     8628+++ vim70/src/screen.c  2007-01-23 17:15:11.000000000 -0800
    83758629@@ -455,6 +455,7 @@
    83768630                    && curwin->w_topline == curwin->w_lines[0].wl_lnum)
     
    85568810diff -Naur vim70.orig/src/search.c vim70/src/search.c
    85578811--- vim70.orig/src/search.c     2006-05-05 05:12:13.000000000 -0700
    8558 +++ vim70/src/search.c  2006-12-05 19:58:06.000000000 -0800
    8559 @@ -1259,7 +1259,7 @@
     8812+++ vim70/src/search.c  2007-01-23 17:15:26.000000000 -0800
     8813@@ -812,7 +812,11 @@
     8814 #ifdef FEAT_MBYTE
     8815                        if (has_mbyte)
     8816                        {
     8817-                           ptr = ml_get_buf(buf, pos->lnum, FALSE);
     8818+                           /* 'e' offset may put us just below the last line */
     8819+                           if (pos->lnum > buf->b_ml.ml_line_count)
     8820+                               ptr = (char_u *)"";
     8821+                           else
     8822+                               ptr = ml_get_buf(buf, pos->lnum, FALSE);
     8823                            pos->col -= (*mb_head_off)(ptr, ptr + pos->col);
     8824                        }
     8825 #endif
     8826@@ -1259,7 +1263,7 @@
    85608827        /*
    85618828         * Add character and/or line offset
     
    85668833            if (spats[0].off.line)      /* Add the offset to the line number. */
    85678834            {
    8568 @@ -4688,6 +4688,7 @@
     8835@@ -4688,6 +4692,7 @@
    85698836 #ifdef FEAT_INS_EXPAND
    85708837                    if (action == ACTION_EXPAND)
     
    85748841                                _("Scanning included file: %s"),
    85758842                                (char *)new_fname);
    8576 @@ -4826,15 +4827,20 @@
     8843@@ -4826,15 +4831,20 @@
    85778844 
    85788845                if ((compl_cont_status & CONT_ADDING) && i == compl_length)
     
    86028869 
    86038870                    /* we read a line, set "already" to check this "line" later
    8604 @@ -4871,7 +4877,7 @@
     8871@@ -4871,7 +4881,7 @@
    86058872                        goto exit_matched;
    86068873                }
     
    86138880diff -Naur vim70.orig/src/spell.c vim70/src/spell.c
    86148881--- vim70.orig/src/spell.c      2006-05-05 00:49:58.000000000 -0700
    8615 +++ vim70/src/spell.c   2006-12-05 19:58:02.000000000 -0800
     8882+++ vim70/src/spell.c   2007-01-23 17:15:01.000000000 -0800
    86168883@@ -1483,7 +1483,7 @@
    86178884            else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND
     
    89449211diff -Naur vim70.orig/src/structs.h vim70/src/structs.h
    89459212--- vim70.orig/src/structs.h    2006-04-09 10:57:46.000000000 -0700
    8946 +++ vim70/src/structs.h 2006-12-05 19:57:54.000000000 -0800
     9213+++ vim70/src/structs.h 2007-01-23 17:14:52.000000000 -0800
    89479214@@ -2213,18 +2213,20 @@
    89489215 
     
    89709237diff -Naur vim70.orig/src/syntax.c vim70/src/syntax.c
    89719238--- vim70.orig/src/syntax.c     2006-04-26 05:49:45.000000000 -0700
    8972 +++ vim70/src/syntax.c  2006-12-05 19:58:10.000000000 -0800
     9239+++ vim70/src/syntax.c  2007-01-23 17:15:09.000000000 -0800
    89739240@@ -977,6 +977,7 @@
    89749241 {
     
    90749341diff -Naur vim70.orig/src/tag.c vim70/src/tag.c
    90759342--- vim70.orig/src/tag.c        2006-04-27 06:11:21.000000000 -0700
    9076 +++ vim70/src/tag.c     2006-12-05 19:58:07.000000000 -0800
     9343+++ vim70/src/tag.c     2007-01-23 17:15:06.000000000 -0800
    90779344@@ -911,7 +911,7 @@
    90789345 
     
    91169383diff -Naur vim70.orig/src/term.c vim70/src/term.c
    91179384--- vim70.orig/src/term.c       2006-05-03 10:34:57.000000000 -0700
    9118 +++ vim70/src/term.c    2006-12-05 19:58:10.000000000 -0800
     9385+++ vim70/src/term.c    2007-01-23 17:15:08.000000000 -0800
    91199386@@ -3137,25 +3137,32 @@
    91209387            screenalloc(FALSE);
     
    91809447diff -Naur vim70.orig/src/testdir/test56.in vim70/src/testdir/test56.in
    91819448--- vim70.orig/src/testdir/test56.in    2005-05-18 08:37:37.000000000 -0700
    9182 +++ vim70/src/testdir/test56.in 2006-12-05 19:58:00.000000000 -0800
     9449+++ vim70/src/testdir/test56.in 2007-01-23 17:14:57.000000000 -0800
    91839450@@ -3,7 +3,7 @@
    91849451 STARTTEST
     
    91929459diff -Naur vim70.orig/src/ui.c vim70/src/ui.c
    91939460--- vim70.orig/src/ui.c 2006-03-27 11:15:09.000000000 -0800
    9194 +++ vim70/src/ui.c      2006-12-05 19:57:56.000000000 -0800
     9461+++ vim70/src/ui.c      2007-01-23 17:14:55.000000000 -0800
    91959462@@ -1137,7 +1137,6 @@
    91969463     int                len;
     
    92129479diff -Naur vim70.orig/src/undo.c vim70/src/undo.c
    92139480--- vim70.orig/src/undo.c       2006-04-21 02:30:59.000000000 -0700
    9214 +++ vim70/src/undo.c    2006-12-05 19:57:56.000000000 -0800
     9481+++ vim70/src/undo.c    2007-01-23 17:15:12.000000000 -0800
    92159482@@ -84,7 +84,6 @@
    92169483 static void u_unch_branch __ARGS((u_header_T *uhp));
     
    92309497 {
    92319498     /* Don't allow changes when 'modifiable' is off.  */
    9232 @@ -1188,7 +1187,7 @@
     9499@@ -342,11 +341,15 @@
     9500        uhp->uh_alt_next = old_curhead;
     9501        if (old_curhead != NULL)
     9502        {
     9503+           uhp->uh_alt_prev = old_curhead->uh_alt_prev;
     9504+           if (uhp->uh_alt_prev != NULL)
     9505+               uhp->uh_alt_prev->uh_alt_next = uhp;
     9506            old_curhead->uh_alt_prev = uhp;
     9507            if (curbuf->b_u_oldhead == old_curhead)
     9508                curbuf->b_u_oldhead = uhp;
     9509        }
     9510-       uhp->uh_alt_prev = NULL;
     9511+       else
     9512+           uhp->uh_alt_prev = NULL;
     9513        if (curbuf->b_u_newhead != NULL)
     9514            curbuf->b_u_newhead->uh_prev = uhp;
     9515 
     9516@@ -857,6 +860,11 @@
     9517        uhp = curbuf->b_u_curhead;
     9518        while (uhp != NULL)
     9519        {
     9520+           /* Go back to the first branch with a mark. */
     9521+           while (uhp->uh_alt_prev != NULL
     9522+                                       && uhp->uh_alt_prev->uh_walk == mark)
     9523+               uhp = uhp->uh_alt_prev;
     9524+
     9525            /* Find the last branch with a mark, that's the one. */
     9526            last = uhp;
     9527            while (last->uh_alt_next != NULL
     9528@@ -866,6 +874,8 @@
     9529            {
     9530                /* Make the used branch the first entry in the list of
     9531                 * alternatives to make "u" and CTRL-R take this branch. */
     9532+               while (uhp->uh_alt_prev != NULL)
     9533+                   uhp = uhp->uh_alt_prev;
     9534                if (last->uh_alt_next != NULL)
     9535                    last->uh_alt_next->uh_alt_prev = last->uh_alt_prev;
     9536                last->uh_alt_prev->uh_alt_next = last->uh_alt_next;
     9537@@ -1188,7 +1198,7 @@
    92339538     int                did_undo;       /* just did an undo */
    92349539     int                absolute;       /* used ":undo N" */
     
    92399544     char_u     msgbuf[80];
    92409545 
    9241 @@ -1206,20 +1205,20 @@
     9546@@ -1206,20 +1216,20 @@
    92429547 
    92439548     u_oldcount -= u_newcount;
     
    92669571 
    92679572     if (curbuf->b_u_curhead != NULL)
    9268 @@ -1245,7 +1244,7 @@
     9573@@ -1245,7 +1255,7 @@
    92699574 
    92709575     smsg((char_u *)_("%ld %s; %s #%ld  %s"),
     
    92779582diff -Naur vim70.orig/src/version.c vim70/src/version.c
    92789583--- vim70.orig/src/version.c    2006-05-03 00:50:42.000000000 -0700
    9279 +++ vim70/src/version.c 2006-12-05 19:58:39.000000000 -0800
    9280 @@ -667,6 +667,328 @@
     9584+++ vim70/src/version.c 2007-01-23 17:15:26.000000000 -0800
     9585@@ -667,6 +667,346 @@
    92819586 static int included_patches[] =
    92829587 {   /* Add new patch number below this line */
    92839588 /**/
     9589+    188,
     9590+/**/
     9591+    187,
     9592+/**/
     9593+    186,
     9594+/**/
     9595+    185,
     9596+/**/
     9597+    184,
     9598+/**/
     9599+    183,
     9600+/**/
     9601+    182,
     9602+/**/
     9603+    181,
     9604+/**/
     9605+    179,
     9606+/**/
    92849607+    178,
    92859608+/**/
     
    96079930 };
    96089931 
    9609 @@ -731,7 +1053,11 @@
     9932@@ -731,7 +1071,11 @@
    96109933     /* Only MS VC 4.1 and earlier can do Win32s */
    96119934     MSG_PUTS(_("\nMS-Windows 16/32 bit GUI version"));
     
    96219944diff -Naur vim70.orig/src/vim.h vim70/src/vim.h
    96229945--- vim70.orig/src/vim.h        2006-04-30 08:32:38.000000000 -0700
    9623 +++ vim70/src/vim.h     2006-12-05 19:58:11.000000000 -0800
     9946+++ vim70/src/vim.h     2007-01-23 17:15:23.000000000 -0800
    96249947@@ -585,7 +585,6 @@
    96259948 #define INSERT         0x10    /* Insert mode */
     
    96409963 #define FORWARD                        1
    96419964 #define BACKWARD               (-1)
     9965@@ -1100,7 +1102,7 @@
     9966     EVENT_COLORSCHEME,         /* after loading a colorscheme */
     9967     EVENT_FILEAPPENDPOST,      /* after appending to a file */
     9968     EVENT_FILEAPPENDPRE,       /* before appending to a file */
     9969-    EVENT_FILEAPPENDCMD,       /* appende to a file using command */
     9970+    EVENT_FILEAPPENDCMD,       /* append to a file using command */
     9971     EVENT_FILECHANGEDSHELL,    /* after shell command that changed file */
     9972     EVENT_FILECHANGEDSHELLPOST,        /* after (not) reloading changed file */
     9973     EVENT_FILECHANGEDRO,       /* before first change to read-only file */
    96429974@@ -1118,6 +1120,7 @@
    96439975     EVENT_FOCUSGAINED,         /* got the focus */
     
    96489980     EVENT_INSERTENTER,         /* when entering Insert mode */
    96499981     EVENT_INSERTLEAVE,         /* when leaving Insert mode */
    9650 @@ -1666,7 +1669,10 @@
     9982@@ -1144,6 +1147,7 @@
     9983     EVENT_REMOTEREPLY,         /* upon string reception from a remote vim */
     9984     EVENT_SWAPEXISTS,          /* found existing swap file */
     9985     EVENT_SOURCEPRE,           /* before sourcing a Vim script */
     9986+    EVENT_SOURCECMD,           /* sourcing a Vim script using command */
     9987     EVENT_SPELLFILEMISSING,    /* spell file missing */
     9988     EVENT_CURSORMOVED,         /* cursor was moved */
     9989     EVENT_CURSORMOVEDI,                /* cursor was moved in Insert mode */
     9990@@ -1666,7 +1670,10 @@
    96519991 #define VV_SWAPCHOICE  46
    96529992 #define VV_SWAPCOMMAND 47
     
    966210002diff -Naur vim70.orig/src/window.c vim70/src/window.c
    966310003--- vim70.orig/src/window.c     2006-05-06 03:54:51.000000000 -0700
    9664 +++ vim70/src/window.c  2006-12-05 19:58:12.000000000 -0800
     10004+++ vim70/src/window.c  2007-01-23 17:15:11.000000000 -0800
    966510005@@ -340,10 +340,10 @@
    966610006                {
Note: See TracChangeset for help on using the changeset viewer.