4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Lint warnings: Duplicate function prototypes, duplicate macros,
12 use of a zero character instead of a zero pointer, unused
13 variable. Clearing allocated memory in a complicated way.
14 Solution: Remove the function prototypes from farsi.h. Remove the
15 duplicated lines in keymap.h. Change getvcol() argument from NUL
16 to NULL. Remove the "col" variable in regmatch(). Use
17 lalloc_clear() instead of lalloc(). (Walter Briscoe)
18 Files: src/farsi.h, src/keymap.h, src/ops.c, src/regexp.c, src/search.c
21 *** ../vim-6.2.262/src/farsi.h Sat Apr 14 22:20:29 2001
22 --- src/farsi.h Wed Feb 11 15:12:51 2004
30 - int fkmap __ARGS((int c));
31 - int toF_TyA __ARGS((int c));
32 - int F_isalpha __ARGS((int c));
33 - int F_isdigit __ARGS((int c));
34 - int F_ischar __ARGS((int c));
35 - int cmdl_fkmap __ARGS((int c));
36 - void cmd_pchar __ARGS((int c, int offset));
37 - int cmd_gchar __ARGS((int offset));
38 - void conv_to_pvim __ARGS((void));
39 - void conv_to_pstd __ARGS((void));
40 - char_u *lrswap __ARGS((char_u *ibuf));
41 - char_u *lrFswap __ARGS((char_u *cmdbuf, int len));
42 - char_u *lrF_sub __ARGS((char_u *ibuf));
43 - void farsi_fkey __ARGS((cmdarg_T *cap));
45 /* special Farsi text messages */
47 EXTERN char_u farsi_text_1[]
49 *** ../vim-6.2.262/src/keymap.h Sun May 4 22:43:37 2003
50 --- src/keymap.h Wed Feb 11 15:14:54 2004
53 #define K_XF3 TERMCAP2KEY(KS_EXTRA, KE_XF3)
54 #define K_XF4 TERMCAP2KEY(KS_EXTRA, KE_XF4)
56 - /* extra set of function keys F1-F4, for vt100 compatible xterm */
57 - #define K_XF1 TERMCAP2KEY(KS_EXTRA, KE_XF1)
58 - #define K_XF2 TERMCAP2KEY(KS_EXTRA, KE_XF2)
59 - #define K_XF3 TERMCAP2KEY(KS_EXTRA, KE_XF3)
60 - #define K_XF4 TERMCAP2KEY(KS_EXTRA, KE_XF4)
62 #define K_F1 TERMCAP2KEY('k', '1') /* function keys */
63 #define K_F2 TERMCAP2KEY('k', '2')
64 #define K_F3 TERMCAP2KEY('k', '3')
66 *** ../vim-6.2.262/src/ops.c Sun Jan 25 20:37:29 2004
67 --- src/ops.c Wed Feb 11 15:17:11 2004
70 #ifdef FEAT_VIRTUALEDIT
73 ! getvcol(curwin, &oap->start, &cs, NUL, &ce);
74 if (ce != cs && oap->start.coladd > 0)
76 /* Part of a tab selected -- but don't
78 #ifdef FEAT_VIRTUALEDIT
81 ! getvcol(curwin, &oap->start, &cs, NULL, &ce);
82 if (ce != cs && oap->start.coladd > 0)
84 /* Part of a tab selected -- but don't
87 #ifdef FEAT_VIRTUALEDIT
90 ! getvcol(curwin, &oap->end, &cs, NUL, &ce);
91 if (p[endcol] == NUL || (cs + oap->end.coladd < ce
93 /* Don't add space for double-wide
95 #ifdef FEAT_VIRTUALEDIT
98 ! getvcol(curwin, &oap->end, &cs, NULL, &ce);
99 if (p[endcol] == NUL || (cs + oap->end.coladd < ce
101 /* Don't add space for double-wide
102 *** ../vim-6.2.262/src/regexp.c Tue Feb 3 16:55:34 2004
103 --- src/regexp.c Wed Feb 11 15:20:02 2004
106 if (SETJMP(lc_jump_env) != 0)
110 if (lc_signal != SIGINT)
112 EMSG(_("E361: Crash intercepted; regexp too complex?"));
116 if (SETJMP(lc_jump_env) != 0)
120 if (lc_signal != SIGINT)
122 EMSG(_("E361: Crash intercepted; regexp too complex?"));
127 regsave_T save_after, save_start;
128 regsave_T save_behind_pos;
129 int needmatch = (op == BEHIND);
133 * Look back in the input of the operand matches or not. This
138 save_behind_pos = behind_pos;
139 behind_pos = save_start;
140 ! for (col = 0; ; ++col)
142 reg_restore(&save_start);
143 if (regmatch(OPERAND(scan))
146 save_behind_pos = behind_pos;
147 behind_pos = save_start;
150 reg_restore(&save_start);
151 if (regmatch(OPERAND(scan))
152 *** ../vim-6.2.262/src/search.c Sun Jan 25 20:21:35 2004
153 --- src/search.c Wed Feb 11 15:22:04 2004
157 def_regmatch.rm_ic = FALSE; /* don't ignore case in define pat. */
159 ! files = (SearchedFile *)lalloc((long_u)
160 (max_path_depth * sizeof(SearchedFile)), TRUE);
163 - for (i = 0; i < max_path_depth; i++)
165 - files[i].fp = NULL;
166 - files[i].name = NULL;
168 - files[i].matched = FALSE;
170 old_files = max_path_depth;
171 depth = depth_displayed = -1;
175 def_regmatch.rm_ic = FALSE; /* don't ignore case in define pat. */
177 ! files = (SearchedFile *)lalloc_clear((long_u)
178 (max_path_depth * sizeof(SearchedFile)), TRUE);
181 old_files = max_path_depth;
182 depth = depth_displayed = -1;
184 *** ../vim-6.2.262/src/version.c Sun Feb 15 13:47:16 2004
185 --- src/version.c Sun Feb 15 13:48:35 2004
189 { /* Add new patch number below this line */
195 hundred-and-one symptoms of being an internet addict:
196 148. You find it easier to dial-up the National Weather Service
197 Weather/your_town/now.html than to simply look out the window.
199 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
200 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
201 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
202 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///