- Timestamp:
- Feb 6, 2007, 12:57:56 PM (18 years ago)
- Branches:
- master
- Children:
- b8f0f75
- Parents:
- 7ea0123
- Location:
- patches
- Files:
-
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/glibc-2.5-branch_update-3.patch
r7ea0123 r95f1c95 1 1 Submitted By: Jim Gifford <jim at linuxfromscratch dot org> 2 2 Original Submission By: Robert Connolly <robert at linuxfromscratch dot org> 3 Date: 2007-01- 123 Date: 2007-01-23 4 4 Initial Package Version: 2.5 5 5 Upstream Status: From Upstream … … 13 13 diff -Naur glibc-2.5.orig/ChangeLog glibc-2.5/ChangeLog 14 14 --- 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 + 17 150 +2006-12-09 Jakub Jelinek <jakub@redhat.com> 18 151 + … … 660 793 + return 0; 661 794 +} 795 diff -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 662 811 diff -Naur glibc-2.5.orig/include/features.h glibc-2.5/include/features.h 663 812 --- glibc-2.5.orig/include/features.h 2006-04-25 13:34:32.000000000 -0700 … … 728 877 distribute := ftwtest-sh 729 878 879 diff -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 +} 730 925 diff -Naur glibc-2.5.orig/libio/bug-wmemstream1.c glibc-2.5/libio/bug-wmemstream1.c 731 926 --- glibc-2.5.orig/libio/bug-wmemstream1.c 2006-08-14 15:11:34.000000000 -0700 … … 738 933 739 934 static int 935 diff -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; 964 diff -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; 976 diff -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 987 diff -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. 1000 diff -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" 740 1043 diff -Naur glibc-2.5.orig/libio/tst-wmemstream1.c glibc-2.5/libio/tst-wmemstream1.c 741 1044 --- glibc-2.5.orig/libio/tst-wmemstream1.c 2006-01-11 18:02:27.000000000 -0800 … … 756 1059 #define W(o) L##o 757 1060 #define OPEN_MEMSTREAM open_wmemstream 1061 diff -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 } 1114 diff -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)); 758 1144 diff -Naur glibc-2.5.orig/libio/wmemstream.c glibc-2.5/libio/wmemstream.c 759 1145 --- glibc-2.5.orig/libio/wmemstream.c 2006-08-14 15:13:48.000000000 -0700 760 +++ glibc-2.5/libio/wmemstream.c 200 6-09-29 17:06:33.000000000 -07001146 +++ glibc-2.5/libio/wmemstream.c 2007-01-12 09:25:38.000000000 -0800 761 1147 @@ -20,6 +20,7 @@ 762 1148 #include "strfile.h" … … 767 1153 768 1154 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 1164 diff -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 769 1194 diff -Naur glibc-2.5.orig/localedata/ChangeLog glibc-2.5/localedata/ChangeLog 770 1195 --- glibc-2.5.orig/localedata/ChangeLog 2006-09-29 11:30:52.000000000 -0700 … … 1155 1580 + return result; 1156 1581 +} 1582 diff -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 1157 1634 diff -Naur glibc-2.5.orig/nis/Makefile glibc-2.5/nis/Makefile 1158 1635 --- glibc-2.5.orig/nis/Makefile 2006-04-13 22:45:49.000000000 -0700 … … 1314 1791 } 1315 1792 libnsl_hidden_def (nis_list) 1793 diff -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 1316 1815 diff -Naur glibc-2.5.orig/nis/nss_nisplus/nisplus-grp.c glibc-2.5/nis/nss_nisplus/nisplus-grp.c 1317 1816 --- glibc-2.5.orig/nis/nss_nisplus/nisplus-grp.c 2006-05-20 12:20:19.000000000 -0700 … … 1603 2102 } 1604 2103 } 2104 diff -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] 2120 diff -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 2130 diff -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) 1605 2175 diff -Naur glibc-2.5.orig/nptl_db/ChangeLog glibc-2.5/nptl_db/ChangeLog 1606 2176 --- glibc-2.5.orig/nptl_db/ChangeLog 2006-02-03 16:48:40.000000000 -0800 … … 1728 2298 } 1729 2299 2300 diff -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 1730 2339 diff -Naur glibc-2.5.orig/nss/nss_files/files-alias.c glibc-2.5/nss/nss_files/files-alias.c 1731 2340 --- glibc-2.5.orig/nss/nss_files/files-alias.c 2002-09-01 05:38:05.000000000 -0700 … … 45988 46597 GNU/Hurd system, using configurations i[34567]86-*-gnu. 45989 46598 46599 diff -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 } 46617 diff -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. 46646 diff -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 46784 diff -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" 46807 diff -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" 46866 diff -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" 46937 diff -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 +} 47054 diff -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 47148 diff -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" 47196 diff -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" 47255 diff -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" 47315 diff -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 47341 diff -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. */ 47382 diff -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" 45990 47469 diff -Naur glibc-2.5.orig/sunrpc/Makefile glibc-2.5/sunrpc/Makefile 45991 47470 --- glibc-2.5.orig/sunrpc/Makefile 2005-06-26 11:24:19.000000000 -0700 … … 46492 47971 #define _PUSHARGS_6 pushl %ebp; cfi_adjust_cfa_offset (4); \ 46493 47972 cfi_rel_offset (ebp, 0); L(PUSHBP1): _PUSHARGS_5 47973 diff -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) 47987 diff -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> 46494 48005 diff -Naur glibc-2.5.orig/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c glibc-2.5/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c 46495 48006 --- 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 1 1 Submitted By: Jim Gifford (jim at linuxfromscratch dot org) 2 Date: 12-05-20062 Date: 01-23-2007 3 3 Initial Package Version: 7.0 4 4 Origin: Upstream 5 5 Upstream Status: Applied 6 Description: Contains all upstream patches up to 7.0.1 786 Description: Contains all upstream patches up to 7.0.188 7 7 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 9 9 10 10 diff -Naur vim70.orig/configure vim70/configure 11 11 --- vim70.orig/configure 2004-07-05 02:02:24.000000000 -0700 12 +++ vim70/configure 200 6-12-05 19:57:51.000000000 -080012 +++ vim70/configure 2007-01-23 17:14:51.000000000 -0800 13 13 @@ -3,4 +3,4 @@ 14 14 # This is just a stub for the Unix configure script, to provide support for … … 19 19 diff -Naur vim70.orig/runtime/autoload/ccomplete.vim vim70/runtime/autoload/ccomplete.vim 20 20 --- vim70.orig/runtime/autoload/ccomplete.vim 2006-05-03 07:35:56.000000000 -0700 21 +++ vim70/runtime/autoload/ccomplete.vim 200 6-12-05 19:57:40.000000000 -080021 +++ vim70/runtime/autoload/ccomplete.vim 2007-01-23 17:14:45.000000000 -0800 22 22 @@ -1,7 +1,7 @@ 23 23 " Vim completion script … … 40 40 diff -Naur vim70.orig/runtime/autoload/gzip.vim vim70/runtime/autoload/gzip.vim 41 41 --- vim70.orig/runtime/autoload/gzip.vim 2006-03-31 07:12:15.000000000 -0800 42 +++ vim70/runtime/autoload/gzip.vim 200 6-12-05 19:58:04.000000000 -080042 +++ vim70/runtime/autoload/gzip.vim 2007-01-23 17:15:02.000000000 -0800 43 43 @@ -1,6 +1,6 @@ 44 44 " Vim autoload file for editing compressed files. … … 101 101 diff -Naur vim70.orig/runtime/autoload/paste.vim vim70/runtime/autoload/paste.vim 102 102 --- vim70.orig/runtime/autoload/paste.vim 2006-04-21 11:31:01.000000000 -0700 103 +++ vim70/runtime/autoload/paste.vim 200 6-12-05 19:57:46.000000000 -0800103 +++ vim70/runtime/autoload/paste.vim 2007-01-23 17:14:49.000000000 -0800 104 104 @@ -1,6 +1,6 @@ 105 105 " Vim support file to help with paste mappings and menus … … 121 121 diff -Naur vim70.orig/runtime/autoload/spellfile.vim vim70/runtime/autoload/spellfile.vim 122 122 --- vim70.orig/runtime/autoload/spellfile.vim 2006-02-01 04:12:24.000000000 -0800 123 +++ vim70/runtime/autoload/spellfile.vim 200 6-12-05 19:57:58.000000000 -0800123 +++ vim70/runtime/autoload/spellfile.vim 2007-01-23 17:14:56.000000000 -0800 124 124 @@ -1,9 +1,9 @@ 125 125 " Vim script to download a missing spell file … … 175 175 + endif 176 176 +endfunc 177 diff -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 177 239 diff -Naur vim70.orig/runtime/doc/eval.txt vim70/runtime/doc/eval.txt 178 240 --- vim70.orig/runtime/doc/eval.txt 2006-05-07 05:16:44.000000000 -0700 179 +++ vim70/runtime/doc/eval.txt 200 6-12-05 19:58:10.000000000 -0800241 +++ vim70/runtime/doc/eval.txt 2007-01-23 17:15:09.000000000 -0800 180 242 @@ -1,4 +1,4 @@ 181 243 -*eval.txt* For Vim version 7.0. Last change: 2006 May 06 … … 257 319 diff -Naur vim70.orig/runtime/doc/netbeans.txt vim70/runtime/doc/netbeans.txt 258 320 --- vim70.orig/runtime/doc/netbeans.txt 2006-05-07 05:16:45.000000000 -0700 259 +++ vim70/runtime/doc/netbeans.txt 200 6-12-05 19:58:11.000000000 -0800321 +++ vim70/runtime/doc/netbeans.txt 2007-01-23 17:15:10.000000000 -0800 260 322 @@ -1,4 +1,4 @@ 261 323 -*netbeans.txt* For Vim version 7.0. Last change: 2006 Mar 09 … … 293 355 diff -Naur vim70.orig/runtime/menu.vim vim70/runtime/menu.vim 294 356 --- vim70.orig/runtime/menu.vim 2006-04-17 06:47:28.000000000 -0700 295 +++ vim70/runtime/menu.vim 200 6-12-05 19:58:04.000000000 -0800357 +++ vim70/runtime/menu.vim 2007-01-23 17:15:02.000000000 -0800 296 358 @@ -2,7 +2,7 @@ 297 359 " You can also use this as a start for your own set of menus. … … 360 422 diff -Naur vim70.orig/runtime/plugin/matchparen.vim vim70/runtime/plugin/matchparen.vim 361 423 --- vim70.orig/runtime/plugin/matchparen.vim 2006-04-27 06:31:26.000000000 -0700 362 +++ vim70/runtime/plugin/matchparen.vim 200 6-12-05 19:58:01.000000000 -0800424 +++ vim70/runtime/plugin/matchparen.vim 2007-01-23 17:15:00.000000000 -0800 363 425 @@ -1,6 +1,6 @@ 364 426 " Vim plugin for showing matching parens … … 403 465 diff -Naur vim70.orig/runtime/scripts.vim vim70/runtime/scripts.vim 404 466 --- vim70.orig/runtime/scripts.vim 2006-03-28 11:30:49.000000000 -0800 405 +++ vim70/runtime/scripts.vim 200 6-12-05 19:57:51.000000000 -0800467 +++ vim70/runtime/scripts.vim 2007-01-23 17:14:51.000000000 -0800 406 468 @@ -1,7 +1,7 @@ 407 469 " Vim support file to detect file types in scripts … … 428 490 diff -Naur vim70.orig/runtime/tutor/Makefile vim70/runtime/tutor/Makefile 429 491 --- vim70.orig/runtime/tutor/Makefile 2004-06-07 07:32:39.000000000 -0700 430 +++ vim70/runtime/tutor/Makefile 200 6-12-05 19:58:01.000000000 -0800492 +++ vim70/runtime/tutor/Makefile 2007-01-23 17:15:00.000000000 -0800 431 493 @@ -2,8 +2,13 @@ 432 494 # … … 462 524 diff -Naur vim70.orig/runtime/tutor/tutor.gr.utf-8 vim70/runtime/tutor/tutor.gr.utf-8 463 525 --- vim70.orig/runtime/tutor/tutor.gr.utf-8 1969-12-31 16:00:00.000000000 -0800 464 +++ vim70/runtime/tutor/tutor.gr.utf-8 200 6-12-05 19:58:01.000000000 -0800526 +++ vim70/runtime/tutor/tutor.gr.utf-8 2007-01-23 17:15:00.000000000 -0800 465 527 @@ -0,0 +1,815 @@ 466 528 +=============================================================================== … … 1495 1557 diff -Naur vim70.orig/runtime/tutor/tutor.ru.utf-8 vim70/runtime/tutor/tutor.ru.utf-8 1496 1558 --- vim70.orig/runtime/tutor/tutor.ru.utf-8 1969-12-31 16:00:00.000000000 -0800 1497 +++ vim70/runtime/tutor/tutor.ru.utf-8 200 6-12-05 19:57:59.000000000 -08001559 +++ vim70/runtime/tutor/tutor.ru.utf-8 2007-01-23 17:14:56.000000000 -0800 1498 1560 @@ -0,0 +1,834 @@ 1499 1561 +=============================================================================== … … 2416 2478 diff -Naur vim70.orig/runtime/tutor/tutor.vim vim70/runtime/tutor/tutor.vim 2417 2479 --- vim70.orig/runtime/tutor/tutor.vim 2006-03-18 12:20:36.000000000 -0800 2418 +++ vim70/runtime/tutor/tutor.vim 200 6-12-05 19:58:01.000000000 -08002480 +++ vim70/runtime/tutor/tutor.vim 2007-01-23 17:15:00.000000000 -0800 2419 2481 @@ -1,6 +1,6 @@ 2420 2482 " Vim tutor support file … … 2468 2530 diff -Naur vim70.orig/src/auto/configure vim70/src/auto/configure 2469 2531 --- vim70.orig/src/auto/configure 2006-05-04 03:46:19.000000000 -0700 2470 +++ vim70/src/auto/configure 200 6-12-05 19:58:07.000000000 -08002532 +++ vim70/src/auto/configure 2007-01-23 17:15:06.000000000 -0800 2471 2533 @@ -4014,7 +4014,7 @@ 2472 2534 LDFLAGS=$ldflags_save … … 2509 2571 diff -Naur vim70.orig/src/buffer.c vim70/src/buffer.c 2510 2572 --- vim70.orig/src/buffer.c 2006-04-26 14:37:23.000000000 -0700 2511 +++ vim70/src/buffer.c 200 6-12-05 19:58:11.000000000 -08002573 +++ vim70/src/buffer.c 2007-01-23 17:15:10.000000000 -0800 2512 2574 @@ -434,12 +434,8 @@ 2513 2575 if (usingNetbeans) … … 2660 2722 diff -Naur vim70.orig/src/configure vim70/src/configure 2661 2723 --- vim70.orig/src/configure 2006-05-07 07:17:49.000000000 -0700 2662 +++ vim70/src/configure 200 6-12-05 19:57:51.000000000 -08002724 +++ vim70/src/configure 2007-01-23 17:14:51.000000000 -0800 2663 2725 @@ -2,5 +2,9 @@ 2664 2726 # run the automatically generated configure script … … 2673 2735 diff -Naur vim70.orig/src/configure.in vim70/src/configure.in 2674 2736 --- vim70.orig/src/configure.in 2006-05-04 03:46:11.000000000 -0700 2675 +++ vim70/src/configure.in 200 6-12-05 19:58:07.000000000 -08002737 +++ vim70/src/configure.in 2007-01-23 17:15:06.000000000 -0800 2676 2738 @@ -508,7 +508,8 @@ 2677 2739 LDFLAGS=$ldflags_save … … 2716 2778 diff -Naur vim70.orig/src/edit.c vim70/src/edit.c 2717 2779 --- vim70.orig/src/edit.c 2006-05-07 04:48:51.000000000 -0700 2718 +++ vim70/src/edit.c 200 6-12-05 19:58:11.000000000 -08002780 +++ vim70/src/edit.c 2007-01-23 17:15:10.000000000 -0800 2719 2781 @@ -129,7 +129,7 @@ 2720 2782 … … 3337 3399 diff -Naur vim70.orig/src/eval.c vim70/src/eval.c 3338 3400 --- vim70.orig/src/eval.c 2006-05-05 10:15:26.000000000 -0700 3339 +++ vim70/src/eval.c 200 6-12-05 19:58:24.000000000 -08003401 +++ vim70/src/eval.c 2007-01-23 17:15:12.000000000 -0800 3340 3402 @@ -166,7 +166,6 @@ 3341 3403 int uf_tm_count; /* nr of calls */ … … 3399 3461 static void copy_tv __ARGS((typval_T *from, typval_T *to)); 3400 3462 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 @@ 3402 3564 EMSG(_(e_letunexp)); 3403 3565 else … … 3408 3570 3409 3571 p = get_tv_string_chk(tv); 3410 @@ -2269,7 +22 71,7 @@3572 @@ -2269,7 +2280,7 @@ 3411 3573 s = get_reg_contents(*arg == '@' ? '"' : *arg, TRUE, TRUE); 3412 3574 if (s != NULL) … … 3417 3579 } 3418 3580 } 3419 @@ -2278,7 +228 0,7 @@3581 @@ -2278,7 +2289,7 @@ 3420 3582 write_reg_contents(*arg == '@' ? '"' : *arg, p, -1, FALSE); 3421 3583 arg_end = arg + 1; … … 3426 3588 } 3427 3589 3428 @@ -3125,7 +31 27,12 @@3590 @@ -3125,7 +3136,12 @@ 3429 3591 funcdict_T fudi; 3430 3592 … … 3440 3602 return; 3441 3603 3442 @@ -3177,9 +31 84,18 @@3604 @@ -3177,9 +3193,18 @@ 3443 3605 failed = TRUE; 3444 3606 break; … … 3459 3621 * occurred or an exception was thrown but not caught. 3460 3622 * get_func_tv() returned OK, so that the check for trailing 3461 @@ -3364,6 +338 0,8 @@3623 @@ -3364,6 +3389,8 @@ 3462 3624 hi = hash_find(ht, varname); 3463 3625 if (!HASHITEM_EMPTY(hi)) … … 3468 3630 return FAIL; 3469 3631 delete_var(ht, hi); 3470 @@ -4895,7 +49 13,7 @@3632 @@ -4895,7 +4922,7 @@ 3471 3633 { 3472 3634 if (list_append_tv(l, &item->li_tv) == FAIL) … … 3477 3639 } 3478 3640 item = item->li_next; 3479 @@ -5295,7 +53 13,7 @@3641 @@ -5295,7 +5322,7 @@ 3480 3642 EMSG2(_("E697: Missing end of List ']': %s"), *arg); 3481 3643 failret: … … 3486 3648 } 3487 3649 3488 @@ -5359,8 +53 77,8 @@3650 @@ -5359,8 +5386,8 @@ 3489 3651 list_unref(l) 3490 3652 list_T *l; … … 3497 3659 3498 3660 /* 3499 @@ -5368,14 +53 86,12 @@3661 @@ -5368,14 +5395,12 @@ 3500 3662 * Ignores the reference count. 3501 3663 */ … … 3515 3677 if (l->lv_used_prev == NULL) 3516 3678 first_list = l->lv_used_next; 3517 @@ -5388,7 +54 04,10 @@3679 @@ -5388,7 +5413,10 @@ 3518 3680 { 3519 3681 /* Remove the item before deleting it. */ … … 3527 3689 vim_free(l); 3528 3690 } 3529 @@ -5448,6 +54 67,8 @@3691 @@ -5448,6 +5476,8 @@ 3530 3692 { 3531 3693 listitem_T *item1, *item2; … … 3536 3698 return FALSE; 3537 3699 3538 @@ -5484,6 +55 05,8 @@3700 @@ -5484,6 +5514,8 @@ 3539 3701 dictitem_T *item2; 3540 3702 int todo; … … 3545 3707 return FALSE; 3546 3708 3547 @@ -5516,19 +55 39,29 @@3709 @@ -5516,19 +5548,29 @@ 3548 3710 { 3549 3711 char_u buf1[NUMBUFLEN], buf2[NUMBUFLEN]; … … 3579 3741 case VAR_FUNC: 3580 3742 return (tv1->vval.v_string != NULL 3581 @@ -6059,6 +6 092,10 @@3743 @@ -6059,6 +6101,10 @@ 3582 3744 tabpage_T *tp; 3583 3745 #endif … … 3590 3752 * 1. Go through all accessible variables and mark all lists and dicts 3591 3753 * with copyID. 3592 @@ -6097,7 +61 34,10 @@3754 @@ -6097,7 +6143,10 @@ 3593 3755 for (dd = first_dict; dd != NULL; ) 3594 3756 if (dd->dv_copyID != copyID) … … 3602 3764 3603 3765 /* restart, next dict may also have been freed */ 3604 @@ -6114,7 +61 54,10 @@3766 @@ -6114,7 +6163,10 @@ 3605 3767 for (ll = first_list; ll != NULL; ) 3606 3768 if (ll->lv_copyID != copyID && ll->lv_watch == NULL) … … 3614 3776 3615 3777 /* restart, next list may also have been freed */ 3616 @@ -6207,11 +625 0,12 @@3778 @@ -6207,11 +6259,12 @@ 3617 3779 d = (dict_T *)alloc(sizeof(dict_T)); 3618 3780 if (d != NULL) … … 3628 3790 hash_init(&d->dv_hashtab); 3629 3791 d->dv_lock = 0; 3630 @@ -6229,8 +62 73,8 @@3792 @@ -6229,8 +6282,8 @@ 3631 3793 dict_unref(d) 3632 3794 dict_T *d; … … 3639 3801 3640 3802 /* 3641 @@ -6238,16 +62 82,14 @@3803 @@ -6238,16 +6291,14 @@ 3642 3804 * Ignores the reference count. 3643 3805 */ … … 3659 3821 if (d->dv_used_prev == NULL) 3660 3822 first_dict = d->dv_used_next; 3661 @@ -6267,7 +63 09,10 @@3823 @@ -6267,7 +6318,10 @@ 3662 3824 * something recursive causing trouble. */ 3663 3825 di = HI2DI(hi); … … 3671 3833 } 3672 3834 } 3673 @@ -6718,7 +67 63,7 @@3835 @@ -6718,7 +6772,7 @@ 3674 3836 EMSG2(_("E723: Missing end of Dictionary '}': %s"), *arg); 3675 3837 failret: … … 3680 3842 } 3681 3843 3682 @@ -7139,6 +71 84,7 @@3844 @@ -7139,6 +7193,7 @@ 3683 3845 {"setreg", 2, 3, f_setreg}, 3684 3846 {"settabwinvar", 4, 4, f_settabwinvar}, … … 3688 3850 {"sort", 1, 2, f_sort}, 3689 3851 {"soundfold", 1, 1, f_soundfold}, 3690 @@ -7595,8 +76 41,8 @@3852 @@ -7595,8 +7650,8 @@ 3691 3853 * Give an error message with a function name. Handle <SNR> things. 3692 3854 */ … … 3699 3861 { 3700 3862 char_u *p; 3701 @@ -7605,7 +76 51,7 @@3863 @@ -7605,7 +7660,7 @@ 3702 3864 p = concat_str((char_u *)"<SNR>", name + 3); 3703 3865 else … … 3708 3870 vim_free(p); 3709 3871 } 3710 @@ -8252,6 +8 298,12 @@3872 @@ -8252,6 +8307,12 @@ 3711 3873 EMSG(_("E785: complete() can only be used in Insert mode")); 3712 3874 return; … … 3721 3883 { 3722 3884 EMSG(_(e_invarg)); 3723 @@ -9173,25 +92 25,25 @@3885 @@ -9173,25 +9234,25 @@ 3724 3886 typval_T save_key; 3725 3887 int rem; … … 3751 3913 } 3752 3914 3753 @@ -9223,7 +92 75,7 @@3915 @@ -9223,7 +9284,7 @@ 3754 3916 { 3755 3917 --todo; … … 3760 3922 vimvars[VV_KEY].vv_str = vim_strsave(di->di_key); 3761 3923 if (filter_map_one(&di->di_tv, expr, map, &rem) == FAIL 3762 @@ -9242,7 +9 294,7 @@3924 @@ -9242,7 +9303,7 @@ 3763 3925 { 3764 3926 for (li = l->lv_first; li != NULL; li = nli) … … 3769 3931 nli = li->li_next; 3770 3932 if (filter_map_one(&li->li_tv, expr, map, &rem) == FAIL 3771 @@ -9598,7 +965 0,9 @@3933 @@ -9598,7 +9659,9 @@ 3772 3934 typval_T *argvars; 3773 3935 typval_T *rettv; … … 3780 3942 3781 3943 /* 3782 @@ -9792,6 +98 46,9 @@3944 @@ -9792,6 +9855,9 @@ 3783 3945 varnumber_T n; 3784 3946 int error = FALSE; … … 3790 3952 ++allow_keys; 3791 3953 if (argvars[0].v_type == VAR_UNKNOWN) 3792 @@ -9809,6 +98 66,10 @@3954 @@ -9809,6 +9875,10 @@ 3793 3955 --no_mapping; 3794 3956 --allow_keys; … … 3801 3963 if (IS_SPECIAL(n) || mod_mask != 0) 3802 3964 { 3803 @@ -9837,6 +9 898,53 @@3965 @@ -9837,6 +9907,53 @@ 3804 3966 temp[i++] = NUL; 3805 3967 rettv->v_type = VAR_STRING; … … 3855 4017 } 3856 4018 3857 @@ -10412,20 +1052 0,14 @@4019 @@ -10412,20 +10529,14 @@ 3858 4020 3859 4021 if (win != NULL && varname != NULL) … … 3882 4044 { 3883 4045 if (*varname == NUL) 3884 @@ -10438,6 +1054 0,10 @@4046 @@ -10438,6 +10549,10 @@ 3885 4047 if (v != NULL) 3886 4048 copy_tv(&v->di_tv, rettv); … … 3893 4055 3894 4056 --emsg_off; 3895 @@ -11312,14 +114 18,19 @@4057 @@ -11312,14 +11427,19 @@ 3896 4058 3897 4059 static int inputsecret_flag = 0; … … 3916 4078 char_u *prompt = get_tv_string_chk(&argvars[0]); 3917 4079 char_u *p = NULL; 3918 @@ -11369,10 +1148 0,10 @@4080 @@ -11369,10 +11489,10 @@ 3919 4081 if (defstr != NULL) 3920 4082 stuffReadbuffSpec(defstr); … … 3929 4091 3930 4092 rettv->vval.v_string = NULL; 3931 @@ -11404,6 +115 15,18 @@4093 @@ -11404,6 +11524,18 @@ 3932 4094 } 3933 4095 … … 3948 4110 */ 3949 4111 static void 3950 @@ -11443,7 +115 66,7 @@4112 @@ -11443,7 +11575,7 @@ 3951 4113 } 3952 4114 else … … 3957 4119 3958 4120 /* 3959 @@ -11471,6 +11 594,7 @@4121 @@ -11471,6 +11603,7 @@ 3960 4122 } 3961 4123 … … 3965 4127 msg_scroll = TRUE; 3966 4128 msg_clr_eos(); 3967 @@ -13250,7 +133 74,7 @@4129 @@ -13250,7 +13383,7 @@ 3968 4130 if (argvars[2].v_type != VAR_UNKNOWN) 3969 4131 EMSG2(_(e_toomanyarg), "remove()"); … … 3974 4136 key = get_tv_string_chk(&argvars[1]); 3975 4137 if (key != NULL) 3976 @@ -13270,7 +13 394,7 @@4138 @@ -13270,7 +13403,7 @@ 3977 4139 else if (argvars[0].v_type != VAR_LIST) 3978 4140 EMSG2(_(e_listdictarg), "remove()"); … … 3983 4145 int error = FALSE; 3984 4146 3985 @@ -14157,11 +142 81,7 @@4147 @@ -14157,11 +14290,7 @@ 3986 4148 typval_T *rettv; 3987 4149 { … … 3995 4157 typval_T *varp; 3996 4158 char_u nbuf[NUMBUFLEN]; 3997 @@ -14178,12 +14 298,7 @@4159 @@ -14178,12 +14307,7 @@ 3998 4160 if (buf != NULL && varname != NULL && varp != NULL) 3999 4161 { … … 4008 4170 if (*varname == '&') 4009 4171 { 4010 @@ -14210,11 +143 25,7 @@4172 @@ -14210,11 +14334,7 @@ 4011 4173 } 4012 4174 … … 4020 4182 } 4021 4183 4022 @@ -14582,6 +14 693,18 @@4184 @@ -14582,6 +14702,18 @@ 4023 4185 } 4024 4186 … … 4039 4201 */ 4040 4202 static void 4041 @@ -15950,6 +160 73,10 @@4203 @@ -15950,6 +16082,10 @@ 4042 4204 } 4043 4205 } … … 4050 4212 } 4051 4213 4052 @@ -16173,7 +1630 0,7 @@4214 @@ -16173,7 +16309,7 @@ 4053 4215 curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); 4054 4216 curwin->w_set_curswant = FALSE; … … 4059 4221 curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill"); 4060 4222 #endif 4061 @@ -16218,6 +163 45,7 @@4223 @@ -16218,6 +16354,7 @@ 4062 4224 #ifdef FEAT_VIRTUALEDIT 4063 4225 dict_add_nr_str(dict, "coladd", (long)curwin->w_cursor.coladd, NULL); … … 4067 4229 4068 4230 dict_add_nr_str(dict, "topline", (long)curwin->w_topline, NULL); 4069 @@ -16438,9 +165 66,12 @@4231 @@ -16438,9 +16575,12 @@ 4070 4232 long i = 0; 4071 4233 long n; … … 4083 4245 4084 4246 if (fnump != NULL) 4085 @@ -16466,8 +16 597,9 @@4247 @@ -16466,8 +16606,9 @@ 4086 4248 #ifdef FEAT_VIRTUALEDIT 4087 4249 n = list_find_nr(l, i, NULL); … … 4095 4257 4096 4258 return OK; 4097 @@ -17759,6 +17 891,13 @@4259 @@ -17759,6 +17900,13 @@ 4098 4260 } 4099 4261 else /* add a new variable */ … … 4109 4271 for (p = varname; *p != NUL; ++p) 4110 4272 if (!eval_isnamec1(*p) && (p == varname || !VIM_ISDIGIT(*p)) 4111 @@ -17792,7 +179 31,7 @@4273 @@ -17792,7 +17940,7 @@ 4112 4274 } 4113 4275 … … 4118 4280 */ 4119 4281 static int 4120 @@ -17814,6 +179 53,23 @@4282 @@ -17814,6 +17962,23 @@ 4121 4283 } 4122 4284 … … 4142 4304 * Also give an error message, using "name". 4143 4305 */ 4144 @@ -18396,12 +185 52,14 @@4306 @@ -18396,12 +18561,14 @@ 4145 4307 4146 4308 if (!eap->skip) … … 4159 4321 if (*arg == K_SPECIAL) 4160 4322 j = 3; 4161 @@ -18786,6 +189 44,7 @@4323 @@ -18786,6 +18953,7 @@ 4162 4324 if (dict_add(fudi.fd_dict, fudi.fd_di) == FAIL) 4163 4325 { … … 4167 4329 } 4168 4330 } 4169 @@ -18963,7 +191 22,8 @@4331 @@ -18963,7 +19131,8 @@ 4170 4332 else if (lead > 0) 4171 4333 { … … 4177 4339 /* It's "s:" or "<SID>" */ 4178 4340 if (current_SID <= 0) 4179 @@ -19618,6 +197 78,7 @@4341 @@ -19618,6 +19787,7 @@ 4180 4342 char_u *name; 4181 4343 #ifdef FEAT_PROFILE … … 4185 4347 4186 4348 /* If depth of calling is getting too high, don't execute the function */ 4187 @@ -19685,6 +198 46,7 @@4349 @@ -19685,6 +19855,7 @@ 4188 4350 v->di_tv.vval.v_list = &fc.l_varlist; 4189 4351 vim_memset(&fc.l_varlist, 0, sizeof(list_T)); … … 4193 4355 /* 4194 4356 * Set a:firstline to "firstline" and a:lastline to "lastline". 4195 @@ -19761,7 +199 23,7 @@4357 @@ -19761,7 +19932,7 @@ 4196 4358 if (p_verbose >= 14) 4197 4359 { … … 4202 4364 4203 4365 msg_puts((char_u *)"("); 4204 @@ -19773,8 +199 35,8 @@4366 @@ -19773,8 +19944,8 @@ 4205 4367 msg_outnum((long)argvars[i].vval.v_number); 4206 4368 else … … 4213 4375 vim_free(tofree); 4214 4376 } 4215 @@ -19796,7 +199 58,7 @@4377 @@ -19796,7 +19967,7 @@ 4216 4378 || (fc.caller != NULL && &fc.caller->func->uf_profiling)) 4217 4379 { … … 4222 4384 } 4223 4385 script_prof_save(&wait_start); 4224 @@ -19826,14 +199 88,14 @@4386 @@ -19826,14 +19997,14 @@ 4225 4387 if (do_profiling == PROF_YES && (fp->uf_profiling 4226 4388 || (fc.caller != NULL && &fc.caller->func->uf_profiling))) … … 4243 4405 } 4244 4406 #endif 4245 @@ -19852,13 +200 14,13 @@4407 @@ -19852,13 +20023,13 @@ 4246 4408 else 4247 4409 { … … 4261 4423 diff -Naur vim70.orig/src/ex_cmds2.c vim70/src/ex_cmds2.c 4262 4424 --- 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 @@ 4265 4445 * Return FALSE when not sourcing a file. 4266 4446 */ … … 4282 4462 diff -Naur vim70.orig/src/ex_cmds.c vim70/src/ex_cmds.c 4283 4463 --- vim70.orig/src/ex_cmds.c 2006-04-22 11:56:56.000000000 -0700 4284 +++ vim70/src/ex_cmds.c 200 6-12-05 19:58:00.000000000 -08004464 +++ vim70/src/ex_cmds.c 2007-01-23 17:14:59.000000000 -0800 4285 4465 @@ -95,7 +95,10 @@ 4286 4466 _("<%s>%s%s %d, Hex %02x, Octal %03o"), … … 4393 4573 diff -Naur vim70.orig/src/ex_cmds.h vim70/src/ex_cmds.h 4394 4574 --- vim70.orig/src/ex_cmds.h 2006-04-07 02:44:46.000000000 -0700 4395 +++ vim70/src/ex_cmds.h 200 6-12-05 19:57:46.000000000 -08004575 +++ vim70/src/ex_cmds.h 2007-01-23 17:14:49.000000000 -0800 4396 4576 @@ -262,7 +262,7 @@ 4397 4577 EX(CMD_comclear, "comclear", ex_comclear, … … 4405 4585 diff -Naur vim70.orig/src/ex_docmd.c vim70/src/ex_docmd.c 4406 4586 --- vim70.orig/src/ex_docmd.c 2006-05-05 09:33:19.000000000 -0700 4407 +++ vim70/src/ex_docmd.c 200 6-12-05 19:58:21.000000000 -08004587 +++ vim70/src/ex_docmd.c 2007-01-23 17:15:11.000000000 -0800 4408 4588 @@ -58,9 +58,9 @@ 4409 4589 #endif … … 4868 5048 diff -Naur vim70.orig/src/ex_eval.c vim70/src/ex_eval.c 4869 5049 --- vim70.orig/src/ex_eval.c 2006-04-22 12:22:27.000000000 -0700 4870 +++ vim70/src/ex_eval.c 200 6-12-05 19:58:21.000000000 -08005050 +++ vim70/src/ex_eval.c 2007-01-23 17:15:11.000000000 -0800 4871 5051 @@ -340,7 +340,7 @@ 4872 5052 … … 4894 5074 diff -Naur vim70.orig/src/ex_getln.c vim70/src/ex_getln.c 4895 5075 --- vim70.orig/src/ex_getln.c 2006-04-30 08:32:01.000000000 -0700 4896 +++ vim70/src/ex_getln.c 200 6-12-05 19:58:12.000000000 -08005076 +++ vim70/src/ex_getln.c 2007-01-23 17:15:10.000000000 -0800 4897 5077 @@ -34,7 +34,7 @@ 4898 5078 int xp_context; /* type of expansion */ … … 5044 5224 diff -Naur vim70.orig/src/fileio.c vim70/src/fileio.c 5045 5225 --- vim70.orig/src/fileio.c 2006-04-30 08:28:57.000000000 -0700 5046 +++ vim70/src/fileio.c 200 6-12-05 19:58:02.000000000 -08005226 +++ vim70/src/fileio.c 2007-01-23 17:15:23.000000000 -0800 5047 5227 @@ -316,6 +316,9 @@ 5048 5228 * display the line. */ … … 5055 5235 * For Unix: Use the short file name whenever possible. 5056 5236 * 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... */ 5057 5248 @@ -6450,17 +6453,10 @@ 5058 5249 int old_ro = buf->b_p_ro; … … 5096 5287 {"InsertEnter", EVENT_INSERTENTER}, 5097 5288 {"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 @@ 5099 5298 * Search a window for the current buffer. Save the cursor position and 5100 5299 * screen offset. … … 5104 5303 void 5105 5304 aucmd_prepbuf(aco, buf) 5106 @@ -8151,6 +814 4,7 @@5305 @@ -8151,6 +8145,7 @@ 5107 5306 /* 5108 5307 * Cleanup after executing autocommands for a (hidden) buffer. … … 5112 5311 void 5113 5312 aucmd_restbuf(aco) 5114 @@ -8295,7 +82 89,11 @@5313 @@ -8295,7 +8290,11 @@ 5115 5314 { 5116 5315 int state; … … 5125 5324 state = get_real_state(); 5126 5325 if (state == NORMAL_BUSY || (state & INSERT) != 0) 5127 @@ -9063,8 +906 1,38 @@5326 @@ -9063,8 +9062,38 @@ 5128 5327 return retval; 5129 5328 } … … 5166 5365 diff -Naur vim70.orig/src/fold.c vim70/src/fold.c 5167 5366 --- vim70.orig/src/fold.c 2006-04-22 12:35:56.000000000 -0700 5168 +++ vim70/src/fold.c 200 6-12-05 19:58:10.000000000 -08005367 +++ vim70/src/fold.c 2007-01-23 17:15:09.000000000 -0800 5169 5368 @@ -2971,7 +2971,11 @@ 5170 5369 else … … 5181 5380 diff -Naur vim70.orig/src/getchar.c vim70/src/getchar.c 5182 5381 --- vim70.orig/src/getchar.c 2006-05-03 10:29:21.000000000 -0700 5183 +++ vim70/src/getchar.c 200 6-12-05 19:58:33.000000000 -08005382 +++ vim70/src/getchar.c 2007-01-23 17:15:12.000000000 -0800 5184 5383 @@ -76,7 +76,7 @@ 5185 5384 */ … … 5316 5515 diff -Naur vim70.orig/src/globals.h vim70/src/globals.h 5317 5516 --- vim70.orig/src/globals.h 2006-04-30 06:16:23.000000000 -0700 5318 +++ vim70/src/globals.h 200 6-12-05 19:58:06.000000000 -08005517 +++ vim70/src/globals.h 2007-01-23 17:15:05.000000000 -0800 5319 5518 @@ -166,6 +166,7 @@ 5320 5519 EXTERN int emsg_off INIT(= 0); /* don't display errors for now, … … 5356 5555 diff -Naur vim70.orig/src/gui_at_fs.c vim70/src/gui_at_fs.c 5357 5556 --- vim70.orig/src/gui_at_fs.c 2005-07-09 04:30:17.000000000 -0700 5358 +++ vim70/src/gui_at_fs.c 200 6-12-05 19:57:43.000000000 -08005557 +++ vim70/src/gui_at_fs.c 2007-01-23 17:14:47.000000000 -0800 5359 5558 @@ -1861,27 +1861,27 @@ 5360 5559 XtPointer pnew; … … 5472 5671 diff -Naur vim70.orig/src/gui_beval.c vim70/src/gui_beval.c 5473 5672 --- vim70.orig/src/gui_beval.c 2006-05-04 12:29:51.000000000 -0700 5474 +++ vim70/src/gui_beval.c 200 6-12-05 19:57:56.000000000 -08005673 +++ vim70/src/gui_beval.c 2007-01-23 17:14:55.000000000 -0800 5475 5674 @@ -926,7 +926,7 @@ 5476 5675 # define IS_NONPRINTABLE(c) (((c) < 0x20 && (c) != TAB && (c) != NL) \ … … 5511 5710 diff -Naur vim70.orig/src/gui.c vim70/src/gui.c 5512 5711 --- vim70.orig/src/gui.c 2006-05-03 04:00:59.000000000 -0700 5513 +++ vim70/src/gui.c 200 6-12-05 19:58:06.000000000 -08005712 +++ vim70/src/gui.c 2007-01-23 17:15:05.000000000 -0800 5514 5713 @@ -187,9 +187,10 @@ 5515 5714 #endif … … 5614 5813 diff -Naur vim70.orig/src/gui_gtk.c vim70/src/gui_gtk.c 5615 5814 --- vim70.orig/src/gui_gtk.c 2006-05-05 04:52:52.000000000 -0700 5616 +++ vim70/src/gui_gtk.c 200 6-12-05 19:58:10.000000000 -08005815 +++ vim70/src/gui_gtk.c 2007-01-23 17:15:08.000000000 -0800 5617 5816 @@ -957,15 +957,15 @@ 5618 5817 get_menu_position(vimmenu_T *menu) … … 5712 5911 diff -Naur vim70.orig/src/gui_gtk_x11.c vim70/src/gui_gtk_x11.c 5713 5912 --- vim70.orig/src/gui_gtk_x11.c 2006-05-04 23:58:59.000000000 -0700 5714 +++ vim70/src/gui_gtk_x11.c 200 6-12-05 19:57:56.000000000 -08005913 +++ vim70/src/gui_gtk_x11.c 2007-01-23 17:14:55.000000000 -0800 5715 5914 @@ -3233,12 +3233,12 @@ 5716 5915 on_select_tab( … … 5777 5976 diff -Naur vim70.orig/src/gui_xmebw.c vim70/src/gui_xmebw.c 5778 5977 --- vim70.orig/src/gui_xmebw.c 2006-04-30 08:32:32.000000000 -0700 5779 +++ vim70/src/gui_xmebw.c 200 6-12-05 19:58:10.000000000 -08005978 +++ vim70/src/gui_xmebw.c 2007-01-23 17:15:08.000000000 -0800 5780 5979 @@ -47,13 +47,13 @@ 5781 5980 #include "gui_xmebwp.h" … … 5906 6105 diff -Naur vim70.orig/src/hardcopy.c vim70/src/hardcopy.c 5907 6106 --- vim70.orig/src/hardcopy.c 2006-05-04 03:09:58.000000000 -0700 5908 +++ vim70/src/hardcopy.c 200 6-12-05 19:57:56.000000000 -08006107 +++ vim70/src/hardcopy.c 2007-01-23 17:14:55.000000000 -0800 5909 6108 @@ -1794,29 +1794,27 @@ 5910 6109 static int … … 6009 6208 diff -Naur vim70.orig/src/if_cscope.c vim70/src/if_cscope.c 6010 6209 --- 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 @@ 6013 6225 { 6014 6226 int i; … … 6020 6232 char cmdletter; 6021 6233 char *qfpos; 6022 @@ -1009,7 +100 8,7 @@6234 @@ -1009,7 +1009,7 @@ 6023 6235 totmatches = 0; 6024 6236 for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++) … … 6029 6241 6030 6242 /* send cmd to cscope */ 6031 @@ -1101,38 +110 0,44 @@6243 @@ -1101,38 +1101,44 @@ 6032 6244 if (qfpos != NULL && *qfpos != '0' && totmatches > 0) 6033 6245 { … … 6096 6308 mch_remove(tmp); 6097 6309 vim_free(tmp); 6098 @@ -1141,6 +114 6,9 @@6310 @@ -1141,6 +1147,9 @@ 6099 6311 else 6100 6312 #endif /* FEAT_QUICKFIX */ … … 6106 6318 cs_fill_results((char *)pat, totmatches, nummatches, &matches, 6107 6319 &contexts, &matched); 6108 @@ -1721,7 +17 29,7 @@6320 @@ -1721,7 +1730,7 @@ 6109 6321 continue; 6110 6322 … … 6115 6327 6116 6328 if (strcmp(cntx, "<global>")==0) 6117 @@ -1729,7 +173 7,7 @@6329 @@ -1729,7 +1738,7 @@ 6118 6330 else 6119 6331 sprintf(context, "<<%s>>", cntx); … … 6126 6338 diff -Naur vim70.orig/src/if_perl.xs vim70/src/if_perl.xs 6127 6339 --- vim70.orig/src/if_perl.xs 2006-03-06 10:57:16.000000000 -0800 6128 +++ vim70/src/if_perl.xs 200 6-12-05 19:57:54.000000000 -08006340 +++ vim70/src/if_perl.xs 2007-01-23 17:14:52.000000000 -0800 6129 6341 @@ -155,8 +155,8 @@ 6130 6342 static int (*perl_run)(PerlInterpreter*); … … 6241 6453 diff -Naur vim70.orig/src/if_python.c vim70/src/if_python.c 6242 6454 --- vim70.orig/src/if_python.c 2006-04-30 08:31:36.000000000 -0700 6243 +++ vim70/src/if_python.c 200 6-12-05 19:58:04.000000000 -08006455 +++ vim70/src/if_python.c 2007-01-23 17:15:02.000000000 -0800 6244 6456 @@ -1463,7 +1463,7 @@ 6245 6457 if (this->buf && this->buf != INVALID_BUFFER_VALUE) … … 6280 6492 diff -Naur vim70.orig/src/if_ruby.c vim70/src/if_ruby.c 6281 6493 --- vim70.orig/src/if_ruby.c 2006-04-30 08:37:52.000000000 -0700 6282 +++ vim70/src/if_ruby.c 200 6-12-05 19:57:54.000000000 -08006494 +++ vim70/src/if_ruby.c 2007-01-23 17:14:52.000000000 -0800 6283 6495 @@ -643,11 +643,14 @@ 6284 6496 … … 6395 6607 diff -Naur vim70.orig/src/macros.h vim70/src/macros.h 6396 6608 --- vim70.orig/src/macros.h 2006-03-01 04:01:10.000000000 -0800 6397 +++ vim70/src/macros.h 200 6-12-05 19:58:00.000000000 -08006609 +++ vim70/src/macros.h 2007-01-23 17:14:57.000000000 -0800 6398 6610 @@ -276,3 +276,9 @@ 6399 6611 # define MB_CHARLEN(p) STRLEN(p) … … 6408 6620 diff -Naur vim70.orig/src/main.c vim70/src/main.c 6409 6621 --- vim70.orig/src/main.c 2006-05-03 10:36:44.000000000 -0700 6410 +++ vim70/src/main.c 200 6-12-05 19:58:11.000000000 -08006622 +++ vim70/src/main.c 2007-01-23 17:15:10.000000000 -0800 6411 6623 @@ -564,7 +564,11 @@ 6412 6624 */ … … 6602 6814 diff -Naur vim70.orig/src/Makefile vim70/src/Makefile 6603 6815 --- vim70.orig/src/Makefile 2006-05-07 06:25:27.000000000 -0700 6604 +++ vim70/src/Makefile 200 6-12-05 19:57:59.000000000 -08006816 +++ vim70/src/Makefile 2007-01-23 17:14:56.000000000 -0800 6605 6817 @@ -2177,6 +2177,7 @@ 6606 6818 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* . … … 6622 6834 diff -Naur vim70.orig/src/mbyte.c vim70/src/mbyte.c 6623 6835 --- vim70.orig/src/mbyte.c 2006-04-30 04:51:01.000000000 -0700 6624 +++ vim70/src/mbyte.c 200 6-12-05 19:58:39.000000000 -08006836 +++ vim70/src/mbyte.c 2007-01-23 17:15:12.000000000 -0800 6625 6837 @@ -311,7 +311,11 @@ 6626 6838 … … 6719 6931 diff -Naur vim70.orig/src/memfile.c vim70/src/memfile.c 6720 6932 --- vim70.orig/src/memfile.c 2006-03-06 00:59:15.000000000 -0800 6721 +++ vim70/src/memfile.c 200 6-12-05 19:58:11.000000000 -08006933 +++ vim70/src/memfile.c 2007-01-23 17:15:10.000000000 -0800 6722 6934 @@ -517,7 +517,7 @@ 6723 6935 mf_ins_free(mfp, hp); /* put *hp in the free list */ … … 6776 6988 diff -Naur vim70.orig/src/memline.c vim70/src/memline.c 6777 6989 --- vim70.orig/src/memline.c 2006-04-20 14:00:21.000000000 -0700 6778 +++ vim70/src/memline.c 200 6-12-05 19:58:12.000000000 -08006990 +++ vim70/src/memline.c 2007-01-23 17:15:12.000000000 -0800 6779 6991 @@ -215,7 +215,7 @@ 6780 6992 #define ML_FLUSH 0x02 /* flush locked block */ … … 6807 7019 else 6808 7020 set_b0_dir_flag(b0p, buf); 6809 @@ -1325, 6 +1325,7@@7021 @@ -1325,7 +1325,11 @@ 6810 7022 mf_put(mfp, hp, FALSE, FALSE); 6811 7023 mf_close(mfp, FALSE); /* will also vim_free(mfp->mf_fname) */ 6812 7024 } 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 + } 6815 7031 if (serious_error && called_from_main) 6816 7032 ml_close(curbuf, TRUE); 6817 @@ -1633,6 +1634,7 @@ 7033 #ifdef FEAT_AUTOCMD 7034 @@ -1633,6 +1637,7 @@ 6818 7035 int fd; 6819 7036 struct block0 b0; … … 6823 7040 char_u uname[B0_UNAME_SIZE]; 6824 7041 #endif 6825 @@ -1652,8 +165 4,11 @@7042 @@ -1652,8 +1657,11 @@ 6826 7043 #endif 6827 7044 MSG_PUTS(_(" dated: ")); … … 6837 7054 6838 7055 /* 6839 @@ -3652,6 +36 57,7 @@7056 @@ -3652,6 +3660,7 @@ 6840 7057 { 6841 7058 struct stat st; … … 6845 7062 ++no_wait_return; 6846 7063 (void)EMSG(_("E325: ATTENTION")); 6847 @@ -3666,7 +367 2,11 @@7064 @@ -3666,7 +3675,11 @@ 6848 7065 { 6849 7066 MSG_PUTS(_(" dated: ")); … … 6860 7077 diff -Naur vim70.orig/src/menu.c vim70/src/menu.c 6861 7078 --- vim70.orig/src/menu.c 2006-05-03 10:30:48.000000000 -0700 6862 +++ vim70/src/menu.c 200 6-12-05 19:58:28.000000000 -08007079 +++ vim70/src/menu.c 2007-01-23 17:15:12.000000000 -0800 6863 7080 @@ -511,6 +511,14 @@ 6864 7081 * name (without mnemonic and accelerator text). */ … … 6946 7163 diff -Naur vim70.orig/src/message.c vim70/src/message.c 6947 7164 --- vim70.orig/src/message.c 2006-05-06 13:07:37.000000000 -0700 6948 +++ vim70/src/message.c 200 6-12-05 19:58:06.000000000 -08007165 +++ vim70/src/message.c 2007-01-23 17:15:17.000000000 -0800 6949 7166 @@ -53,7 +53,6 @@ 6950 7167 static struct msg_hist *first_msg_hist = NULL; … … 6955 7172 /* 6956 7173 * 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 @@ 6958 7212 * If screen is completely filled and 'more' is set then wait 6959 7213 * for a character. … … 6965 7219 { 6966 7220 #ifdef FEAT_CON_DIALOG 6967 @@ -4123,8 +412 3,6 @@7221 @@ -4123,8 +4126,6 @@ 6968 7222 case 'c': 6969 7223 case 's': … … 6974 7228 switch (fmt_spec) 6975 7229 { 6976 @@ -4175,15 +417 3,16 @@7230 @@ -4175,15 +4176,16 @@ 6977 7231 str_arg_l = 0; 6978 7232 else … … 6999 7253 diff -Naur vim70.orig/src/misc1.c vim70/src/misc1.c 7000 7254 --- vim70.orig/src/misc1.c 2006-04-30 08:30:02.000000000 -0700 7001 +++ vim70/src/misc1.c 200 6-12-05 19:58:10.000000000 -08007255 +++ vim70/src/misc1.c 2007-01-23 17:15:07.000000000 -0800 7002 7256 @@ -1761,15 +1761,13 @@ 7003 7257 * Add column offset for 'number', 'foldcolumn', etc. … … 7114 7368 diff -Naur vim70.orig/src/misc2.c vim70/src/misc2.c 7115 7369 --- vim70.orig/src/misc2.c 2006-05-04 05:12:38.000000000 -0700 7116 +++ vim70/src/misc2.c 200 6-12-05 19:58:04.000000000 -08007370 +++ vim70/src/misc2.c 2007-01-23 17:15:02.000000000 -0800 7117 7371 @@ -1229,6 +1229,94 @@ 7118 7372 return escaped_string; … … 7212 7466 diff -Naur vim70.orig/src/netbeans.c vim70/src/netbeans.c 7213 7467 --- vim70.orig/src/netbeans.c 2006-04-22 11:00:05.000000000 -0700 7214 +++ vim70/src/netbeans.c 200 6-12-05 19:58:11.000000000 -08007468 +++ vim70/src/netbeans.c 2007-01-23 17:15:10.000000000 -0800 7215 7469 @@ -61,7 +61,7 @@ 7216 7470 … … 7421 7675 diff -Naur vim70.orig/src/normal.c vim70/src/normal.c 7422 7676 --- vim70.orig/src/normal.c 2006-04-29 06:11:18.000000000 -0700 7423 +++ vim70/src/normal.c 200 6-12-05 19:58:33.000000000 -08007677 +++ vim70/src/normal.c 2007-01-23 17:15:12.000000000 -0800 7424 7678 @@ -651,9 +651,8 @@ 7425 7679 /* Fake a "c"hange command. When "restart_edit" is set (e.g., because … … 7520 7774 diff -Naur vim70.orig/src/ops.c vim70/src/ops.c 7521 7775 --- vim70.orig/src/ops.c 2006-04-30 08:13:44.000000000 -0700 7522 +++ vim70/src/ops.c 200 6-12-05 19:58:11.000000000 -08007776 +++ vim70/src/ops.c 2007-01-23 17:15:10.000000000 -0800 7523 7777 @@ -95,8 +95,8 @@ 7524 7778 static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp)); … … 7720 7974 diff -Naur vim70.orig/src/option.c vim70/src/option.c 7721 7975 --- vim70.orig/src/option.c 2006-05-03 10:32:28.000000000 -0700 7722 +++ vim70/src/option.c 200 6-12-05 19:58:09.000000000 -08007976 +++ vim70/src/option.c 2007-01-23 17:15:07.000000000 -0800 7723 7977 @@ -2294,7 +2294,7 @@ 7724 7978 {(char_u *)0L, (char_u *)0L} … … 7836 8090 diff -Naur vim70.orig/src/os_unix.c vim70/src/os_unix.c 7837 8091 --- vim70.orig/src/os_unix.c 2006-05-01 01:13:15.000000000 -0700 7838 +++ vim70/src/os_unix.c 200 6-12-05 19:57:56.000000000 -08008092 +++ vim70/src/os_unix.c 2007-01-23 17:14:55.000000000 -0800 7839 8093 @@ -3934,7 +3934,7 @@ 7840 8094 { … … 7895 8149 diff -Naur vim70.orig/src/popupmnu.c vim70/src/popupmnu.c 7896 8150 --- vim70.orig/src/popupmnu.c 2006-04-20 13:18:37.000000000 -0700 7897 +++ vim70/src/popupmnu.c 200 6-12-05 19:57:54.000000000 -08008151 +++ vim70/src/popupmnu.c 2007-01-23 17:14:53.000000000 -0800 7898 8152 @@ -552,6 +552,9 @@ 7899 8153 { … … 7908 8162 diff -Naur vim70.orig/src/proto/buffer.pro vim70/src/proto/buffer.pro 7909 8163 --- vim70.orig/src/proto/buffer.pro 2006-05-07 06:08:29.000000000 -0700 7910 +++ vim70/src/proto/buffer.pro 200 6-12-05 19:58:00.000000000 -08008164 +++ vim70/src/proto/buffer.pro 2007-01-23 17:14:57.000000000 -0800 7911 8165 @@ -10,6 +10,7 @@ 7912 8166 extern int do_buffer __ARGS((int action, int start, int dir, int count, int forceit)); … … 7919 8173 diff -Naur vim70.orig/src/proto/eval.pro vim70/src/proto/eval.pro 7920 8174 --- vim70.orig/src/proto/eval.pro 2006-05-07 06:08:33.000000000 -0700 7921 +++ vim70/src/proto/eval.pro 200 6-12-05 19:58:07.000000000 -08008175 +++ vim70/src/proto/eval.pro 2007-01-23 17:15:06.000000000 -0800 7922 8176 @@ -44,7 +44,7 @@ 7923 8177 extern char_u *get_user_var_name __ARGS((expand_T *xp, int idx)); … … 7931 8185 diff -Naur vim70.orig/src/proto/menu.pro vim70/src/proto/menu.pro 7932 8186 --- vim70.orig/src/proto/menu.pro 2006-05-07 06:08:51.000000000 -0700 7933 +++ vim70/src/proto/menu.pro 200 6-12-05 19:57:54.000000000 -08008187 +++ vim70/src/proto/menu.pro 2007-01-23 17:14:53.000000000 -0800 7934 8188 @@ -10,6 +10,7 @@ 7935 8189 extern int menu_is_child_of_popup __ARGS((vimmenu_T *menu)); … … 7942 8196 diff -Naur vim70.orig/src/proto/misc2.pro vim70/src/proto/misc2.pro 7943 8197 --- vim70.orig/src/proto/misc2.pro 2006-05-07 06:08:54.000000000 -0700 7944 +++ vim70/src/proto/misc2.pro 200 6-12-05 19:58:04.000000000 -08008198 +++ vim70/src/proto/misc2.pro 2007-01-23 17:15:02.000000000 -0800 7945 8199 @@ -29,6 +29,7 @@ 7946 8200 extern char_u *vim_strnsave __ARGS((char_u *string, int len)); … … 7953 8207 diff -Naur vim70.orig/src/proto/ops.pro vim70/src/proto/ops.pro 7954 8208 --- vim70.orig/src/proto/ops.pro 2006-05-07 06:08:58.000000000 -0700 7955 +++ vim70/src/proto/ops.pro 200 6-12-05 19:58:11.000000000 -08008209 +++ vim70/src/proto/ops.pro 2007-01-23 17:15:10.000000000 -0800 7956 8210 @@ -17,10 +17,10 @@ 7957 8211 extern void put_register __ARGS((int name, void *reg)); … … 7969 8223 diff -Naur vim70.orig/src/proto/undo.pro vim70/src/proto/undo.pro 7970 8224 --- vim70.orig/src/proto/undo.pro 2006-05-07 06:09:11.000000000 -0700 7971 +++ vim70/src/proto/undo.pro 200 6-12-05 19:57:47.000000000 -08008225 +++ vim70/src/proto/undo.pro 2007-01-23 17:14:49.000000000 -0800 7972 8226 @@ -4,6 +4,7 @@ 7973 8227 extern int u_savesub __ARGS((linenr_T lnum)); … … 7980 8234 diff -Naur vim70.orig/src/quickfix.c vim70/src/quickfix.c 7981 8235 --- vim70.orig/src/quickfix.c 2006-05-03 00:47:42.000000000 -0700 7982 +++ vim70/src/quickfix.c 200 6-12-05 19:58:09.000000000 -08008236 +++ vim70/src/quickfix.c 2007-01-23 17:15:07.000000000 -0800 7983 8237 @@ -500,8 +500,6 @@ 7984 8238 { … … 8235 8489 diff -Naur vim70.orig/src/regexp.c vim70/src/regexp.c 8236 8490 --- vim70.orig/src/regexp.c 2006-04-30 08:31:50.000000000 -0700 8237 +++ vim70/src/regexp.c 200 6-12-05 19:58:09.000000000 -08008491 +++ vim70/src/regexp.c 2007-01-23 17:15:07.000000000 -0800 8238 8492 @@ -3777,8 +3777,8 @@ 8239 8493 … … 8372 8626 diff -Naur vim70.orig/src/screen.c vim70/src/screen.c 8373 8627 --- vim70.orig/src/screen.c 2006-05-05 03:13:55.000000000 -0700 8374 +++ vim70/src/screen.c 200 6-12-05 19:58:12.000000000 -08008628 +++ vim70/src/screen.c 2007-01-23 17:15:11.000000000 -0800 8375 8629 @@ -455,6 +455,7 @@ 8376 8630 && curwin->w_topline == curwin->w_lines[0].wl_lnum) … … 8556 8810 diff -Naur vim70.orig/src/search.c vim70/src/search.c 8557 8811 --- 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 @@ 8560 8827 /* 8561 8828 * Add character and/or line offset … … 8566 8833 if (spats[0].off.line) /* Add the offset to the line number. */ 8567 8834 { 8568 @@ -4688,6 +46 88,7 @@8835 @@ -4688,6 +4692,7 @@ 8569 8836 #ifdef FEAT_INS_EXPAND 8570 8837 if (action == ACTION_EXPAND) … … 8574 8841 _("Scanning included file: %s"), 8575 8842 (char *)new_fname); 8576 @@ -4826,15 +48 27,20 @@8843 @@ -4826,15 +4831,20 @@ 8577 8844 8578 8845 if ((compl_cont_status & CONT_ADDING) && i == compl_length) … … 8602 8869 8603 8870 /* we read a line, set "already" to check this "line" later 8604 @@ -4871,7 +48 77,7 @@8871 @@ -4871,7 +4881,7 @@ 8605 8872 goto exit_matched; 8606 8873 } … … 8613 8880 diff -Naur vim70.orig/src/spell.c vim70/src/spell.c 8614 8881 --- vim70.orig/src/spell.c 2006-05-05 00:49:58.000000000 -0700 8615 +++ vim70/src/spell.c 200 6-12-05 19:58:02.000000000 -08008882 +++ vim70/src/spell.c 2007-01-23 17:15:01.000000000 -0800 8616 8883 @@ -1483,7 +1483,7 @@ 8617 8884 else if ((mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND … … 8944 9211 diff -Naur vim70.orig/src/structs.h vim70/src/structs.h 8945 9212 --- vim70.orig/src/structs.h 2006-04-09 10:57:46.000000000 -0700 8946 +++ vim70/src/structs.h 200 6-12-05 19:57:54.000000000 -08009213 +++ vim70/src/structs.h 2007-01-23 17:14:52.000000000 -0800 8947 9214 @@ -2213,18 +2213,20 @@ 8948 9215 … … 8970 9237 diff -Naur vim70.orig/src/syntax.c vim70/src/syntax.c 8971 9238 --- vim70.orig/src/syntax.c 2006-04-26 05:49:45.000000000 -0700 8972 +++ vim70/src/syntax.c 200 6-12-05 19:58:10.000000000 -08009239 +++ vim70/src/syntax.c 2007-01-23 17:15:09.000000000 -0800 8973 9240 @@ -977,6 +977,7 @@ 8974 9241 { … … 9074 9341 diff -Naur vim70.orig/src/tag.c vim70/src/tag.c 9075 9342 --- vim70.orig/src/tag.c 2006-04-27 06:11:21.000000000 -0700 9076 +++ vim70/src/tag.c 200 6-12-05 19:58:07.000000000 -08009343 +++ vim70/src/tag.c 2007-01-23 17:15:06.000000000 -0800 9077 9344 @@ -911,7 +911,7 @@ 9078 9345 … … 9116 9383 diff -Naur vim70.orig/src/term.c vim70/src/term.c 9117 9384 --- vim70.orig/src/term.c 2006-05-03 10:34:57.000000000 -0700 9118 +++ vim70/src/term.c 200 6-12-05 19:58:10.000000000 -08009385 +++ vim70/src/term.c 2007-01-23 17:15:08.000000000 -0800 9119 9386 @@ -3137,25 +3137,32 @@ 9120 9387 screenalloc(FALSE); … … 9180 9447 diff -Naur vim70.orig/src/testdir/test56.in vim70/src/testdir/test56.in 9181 9448 --- vim70.orig/src/testdir/test56.in 2005-05-18 08:37:37.000000000 -0700 9182 +++ vim70/src/testdir/test56.in 200 6-12-05 19:58:00.000000000 -08009449 +++ vim70/src/testdir/test56.in 2007-01-23 17:14:57.000000000 -0800 9183 9450 @@ -3,7 +3,7 @@ 9184 9451 STARTTEST … … 9192 9459 diff -Naur vim70.orig/src/ui.c vim70/src/ui.c 9193 9460 --- vim70.orig/src/ui.c 2006-03-27 11:15:09.000000000 -0800 9194 +++ vim70/src/ui.c 200 6-12-05 19:57:56.000000000 -08009461 +++ vim70/src/ui.c 2007-01-23 17:14:55.000000000 -0800 9195 9462 @@ -1137,7 +1137,6 @@ 9196 9463 int len; … … 9212 9479 diff -Naur vim70.orig/src/undo.c vim70/src/undo.c 9213 9480 --- vim70.orig/src/undo.c 2006-04-21 02:30:59.000000000 -0700 9214 +++ vim70/src/undo.c 200 6-12-05 19:57:56.000000000 -08009481 +++ vim70/src/undo.c 2007-01-23 17:15:12.000000000 -0800 9215 9482 @@ -84,7 +84,6 @@ 9216 9483 static void u_unch_branch __ARGS((u_header_T *uhp)); … … 9230 9497 { 9231 9498 /* 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 @@ 9233 9538 int did_undo; /* just did an undo */ 9234 9539 int absolute; /* used ":undo N" */ … … 9239 9544 char_u msgbuf[80]; 9240 9545 9241 @@ -1206,20 +12 05,20 @@9546 @@ -1206,20 +1216,20 @@ 9242 9547 9243 9548 u_oldcount -= u_newcount; … … 9266 9571 9267 9572 if (curbuf->b_u_curhead != NULL) 9268 @@ -1245,7 +12 44,7 @@9573 @@ -1245,7 +1255,7 @@ 9269 9574 9270 9575 smsg((char_u *)_("%ld %s; %s #%ld %s"), … … 9277 9582 diff -Naur vim70.orig/src/version.c vim70/src/version.c 9278 9583 --- vim70.orig/src/version.c 2006-05-03 00:50:42.000000000 -0700 9279 +++ vim70/src/version.c 200 6-12-05 19:58:39.000000000 -08009280 @@ -667,6 +667,3 28@@9584 +++ vim70/src/version.c 2007-01-23 17:15:26.000000000 -0800 9585 @@ -667,6 +667,346 @@ 9281 9586 static int included_patches[] = 9282 9587 { /* Add new patch number below this line */ 9283 9588 /**/ 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 +/**/ 9284 9607 + 178, 9285 9608 +/**/ … … 9607 9930 }; 9608 9931 9609 @@ -731,7 +10 53,11 @@9932 @@ -731,7 +1071,11 @@ 9610 9933 /* Only MS VC 4.1 and earlier can do Win32s */ 9611 9934 MSG_PUTS(_("\nMS-Windows 16/32 bit GUI version")); … … 9621 9944 diff -Naur vim70.orig/src/vim.h vim70/src/vim.h 9622 9945 --- vim70.orig/src/vim.h 2006-04-30 08:32:38.000000000 -0700 9623 +++ vim70/src/vim.h 200 6-12-05 19:58:11.000000000 -08009946 +++ vim70/src/vim.h 2007-01-23 17:15:23.000000000 -0800 9624 9947 @@ -585,7 +585,6 @@ 9625 9948 #define INSERT 0x10 /* Insert mode */ … … 9640 9963 #define FORWARD 1 9641 9964 #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 */ 9642 9974 @@ -1118,6 +1120,7 @@ 9643 9975 EVENT_FOCUSGAINED, /* got the focus */ … … 9648 9980 EVENT_INSERTENTER, /* when entering Insert mode */ 9649 9981 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 @@ 9651 9991 #define VV_SWAPCHOICE 46 9652 9992 #define VV_SWAPCOMMAND 47 … … 9662 10002 diff -Naur vim70.orig/src/window.c vim70/src/window.c 9663 10003 --- vim70.orig/src/window.c 2006-05-06 03:54:51.000000000 -0700 9664 +++ vim70/src/window.c 200 6-12-05 19:58:12.000000000 -080010004 +++ vim70/src/window.c 2007-01-23 17:15:11.000000000 -0800 9665 10005 @@ -340,10 +340,10 @@ 9666 10006 {
Note:
See TracChangeset
for help on using the changeset viewer.