summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.2.178
blob: 84fe670f0f9862ce781a8a35d195d15f6060c96b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
To: vim-dev@vim.org
Subject: Patch 7.2.178
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.178
Problem:    Using negative value for device number might not work.
Solution:   Use a separate flag for whether ffv_dev was set.
Files:	    src/misc2.c


*** ../vim-7.2.177/src/misc2.c	2009-04-29 11:00:09.000000000 +0200
--- src/misc2.c	2009-05-16 21:05:10.000000000 +0200
***************
*** 2841,2847 ****
  get_key_name(i)
      int	    i;
  {
!     if (i >= KEY_NAMES_TABLE_LEN)
  	return NULL;
      return  key_names_table[i].name;
  }
--- 2841,2847 ----
  get_key_name(i)
      int	    i;
  {
!     if (i >= (int)KEY_NAMES_TABLE_LEN)
  	return NULL;
      return  key_names_table[i].name;
  }
***************
*** 3869,3875 ****
       * use filename.
       */
  #ifdef UNIX
!     int			ffv_dev;	/* device number (-1 if not set) */
      ino_t		ffv_ino;	/* inode number */
  #endif
      /* The memory for this struct is allocated according to the length of
--- 3869,3876 ----
       * use filename.
       */
  #ifdef UNIX
!     int			ffv_dev_valid;	/* ffv_dev and ffv_ino were set */
!     dev_t		ffv_dev;	/* device number */
      ino_t		ffv_ino;	/* inode number */
  #endif
      /* The memory for this struct is allocated according to the length of
***************
*** 4059,4071 ****
   * This function silently ignores a few errors, vim_findfile() will have
   * limited functionality then.
   */
- /*ARGSUSED*/
      void *
  vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what,
  					   search_ctx_arg, tagfile, rel_fname)
      char_u	*path;
      char_u	*filename;
!     char_u	*stopdirs;
      int		level;
      int		free_visited;
      int		find_what;
--- 4060,4071 ----
   * This function silently ignores a few errors, vim_findfile() will have
   * limited functionality then.
   */
      void *
  vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what,
  					   search_ctx_arg, tagfile, rel_fname)
      char_u	*path;
      char_u	*filename;
!     char_u	*stopdirs UNUSED;
      int		level;
      int		free_visited;
      int		find_what;
***************
*** 5063,5072 ****
      {
  	if (
  #ifdef UNIX
! 		!url
! 		    ? (vp->ffv_dev == st.st_dev
! 			&& vp->ffv_ino == st.st_ino)
! 		    :
  #endif
  		fnamecmp(vp->ffv_fname, ff_expand_buffer) == 0
  	   )
--- 5063,5071 ----
      {
  	if (
  #ifdef UNIX
! 		!url ? (vp->ffv_dev_valid && vp->ffv_dev == st.st_dev
! 						  && vp->ffv_ino == st.st_ino)
! 		     :
  #endif
  		fnamecmp(vp->ffv_fname, ff_expand_buffer) == 0
  	   )
***************
*** 5091,5104 ****
  #ifdef UNIX
  	if (!url)
  	{
  	    vp->ffv_ino = st.st_ino;
  	    vp->ffv_dev = st.st_dev;
  	    vp->ffv_fname[0] = NUL;
  	}
  	else
  	{
! 	    vp->ffv_ino = 0;
! 	    vp->ffv_dev = -1;
  #endif
  	    STRCPY(vp->ffv_fname, ff_expand_buffer);
  #ifdef UNIX
--- 5090,5103 ----
  #ifdef UNIX
  	if (!url)
  	{
+ 	    vp->ffv_dev_valid = TRUE;
  	    vp->ffv_ino = st.st_ino;
  	    vp->ffv_dev = st.st_dev;
  	    vp->ffv_fname[0] = NUL;
  	}
  	else
  	{
! 	    vp->ffv_dev_valid = FALSE;
  #endif
  	    STRCPY(vp->ffv_fname, ff_expand_buffer);
  #ifdef UNIX
*** ../vim-7.2.177/src/version.c	2009-05-16 17:29:37.000000000 +0200
--- src/version.c	2009-05-16 21:00:15.000000000 +0200
***************
*** 678,679 ****
--- 678,681 ----
  {   /* Add new patch number below this line */
+ /**/
+     178,
  /**/

-- 
FATAL ERROR! SYSTEM HALTED! - Press any key to continue doing nothing.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///