]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.055
- updated to 7.2.102
[packages/vim.git] / 7.2.055
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.055
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.2.055
11 Problem:    Various compiler warnings with strict checking.
12 Solution:   Avoid the warnings by using return values and renaming.
13 Files:      src/diff.c, src/eval.c, src/ex_cmds.c, src/ex_docmd.c,
14             src/fileio.c, src/fold.c, src/globals.h, src/gui.c,
15             src/gui_at_sb.c, src/gui_gtk_x11.c, src/gui_xmdlg.c,
16             src/gui_xmebw.c, src/main.c, src/mbyte.c, src/message.c,
17             src/netbeans.c, src/option.c, src/os_unix.c, src/spell.c,
18             src/ui.c, src/window.c
19
20
21 *** ../vim-7.2.054/src/diff.c   Fri Jan 18 17:39:32 2008
22 --- src/diff.c  Fri Nov 28 17:23:35 2008
23 ***************
24 *** 661,666 ****
25 --- 665,671 ----
26       char_u    *tmp_diff;
27       FILE      *fd;
28       int               ok;
29 +     int               io_error = FALSE;
30   
31       /* Delete all diffblocks. */
32       diff_clear(curtab);
33 ***************
34 *** 697,714 ****
35       {
36         ok = FALSE;
37         fd = mch_fopen((char *)tmp_orig, "w");
38 !       if (fd != NULL)
39         {
40 !           fwrite("line1\n", (size_t)6, (size_t)1, fd);
41             fclose(fd);
42             fd = mch_fopen((char *)tmp_new, "w");
43 !           if (fd != NULL)
44             {
45 !               fwrite("line2\n", (size_t)6, (size_t)1, fd);
46                 fclose(fd);
47                 diff_file(tmp_orig, tmp_new, tmp_diff);
48                 fd = mch_fopen((char *)tmp_diff, "r");
49 !               if (fd != NULL)
50                 {
51                     char_u      linebuf[LBUFLEN];
52   
53 --- 702,727 ----
54       {
55         ok = FALSE;
56         fd = mch_fopen((char *)tmp_orig, "w");
57 !       if (fd == NULL)
58 !           io_error = TRUE;
59 !       else
60         {
61 !           if (fwrite("line1\n", (size_t)6, (size_t)1, fd) != 1)
62 !               io_error = TRUE;
63             fclose(fd);
64             fd = mch_fopen((char *)tmp_new, "w");
65 !           if (fd == NULL)
66 !               io_error = TRUE;
67 !           else
68             {
69 !               if (fwrite("line2\n", (size_t)6, (size_t)1, fd) != 1)
70 !                   io_error = TRUE;
71                 fclose(fd);
72                 diff_file(tmp_orig, tmp_new, tmp_diff);
73                 fd = mch_fopen((char *)tmp_diff, "r");
74 !               if (fd == NULL)
75 !                   io_error = TRUE;
76 !               else
77                 {
78                     char_u      linebuf[LBUFLEN];
79   
80 ***************
81 *** 761,766 ****
82 --- 774,781 ----
83       }
84       if (!ok)
85       {
86 +       if (io_error)
87 +           EMSG(_("E810: Cannot read or write temp files"));
88         EMSG(_("E97: Cannot create diffs"));
89         diff_a_works = MAYBE;
90   #if defined(MSWIN) || defined(MSDOS)
91 ***************
92 *** 925,934 ****
93       {
94   # ifdef TEMPDIRNAMES
95         if (vim_tempdir != NULL)
96 !           mch_chdir((char *)vim_tempdir);
97         else
98   # endif
99 !           mch_chdir("/tmp");
100         shorten_fnames(TRUE);
101       }
102   #endif
103 --- 940,949 ----
104       {
105   # ifdef TEMPDIRNAMES
106         if (vim_tempdir != NULL)
107 !           ignored = mch_chdir((char *)vim_tempdir);
108         else
109   # endif
110 !           ignored = mch_chdir("/tmp");
111         shorten_fnames(TRUE);
112       }
113   #endif
114 *** ../vim-7.2.054/src/eval.c   Fri Nov 28 11:15:10 2008
115 --- src/eval.c  Fri Nov 28 12:23:13 2008
116 ***************
117 *** 10641,10647 ****
118   # ifdef FEAT_WINDOWS
119             win_T       *wp;
120   # endif
121 !           int         n = 1;
122   
123             if (row >= 0 && col >= 0)
124             {
125 --- 10641,10647 ----
126   # ifdef FEAT_WINDOWS
127             win_T       *wp;
128   # endif
129 !           int         winnr = 1;
130   
131             if (row >= 0 && col >= 0)
132             {
133 ***************
134 *** 10651,10659 ****
135                 (void)mouse_comp_pos(win, &row, &col, &lnum);
136   # ifdef FEAT_WINDOWS
137                 for (wp = firstwin; wp != win; wp = wp->w_next)
138 !                   ++n;
139   # endif
140 !               vimvars[VV_MOUSE_WIN].vv_nr = n;
141                 vimvars[VV_MOUSE_LNUM].vv_nr = lnum;
142                 vimvars[VV_MOUSE_COL].vv_nr = col + 1;
143             }
144 --- 10651,10659 ----
145                 (void)mouse_comp_pos(win, &row, &col, &lnum);
146   # ifdef FEAT_WINDOWS
147                 for (wp = firstwin; wp != win; wp = wp->w_next)
148 !                   ++winnr;
149   # endif
150 !               vimvars[VV_MOUSE_WIN].vv_nr = winnr;
151                 vimvars[VV_MOUSE_LNUM].vv_nr = lnum;
152                 vimvars[VV_MOUSE_COL].vv_nr = col + 1;
153             }
154 *** ../vim-7.2.054/src/ex_cmds.c        Sat Nov 15 14:10:23 2008
155 --- src/ex_cmds.c       Fri Nov 28 17:24:08 2008
156 ***************
157 *** 1941,1947 ****
158              * root.
159              */
160             if (fp_out != NULL)
161 !               (void)fchown(fileno(fp_out), st_old.st_uid, st_old.st_gid);
162   #endif
163         }
164       }
165 --- 1941,1947 ----
166              * root.
167              */
168             if (fp_out != NULL)
169 !               ignored = fchown(fileno(fp_out), st_old.st_uid, st_old.st_gid);
170   #endif
171         }
172       }
173 *** ../vim-7.2.054/src/ex_docmd.c       Sat Nov 15 14:10:23 2008
174 --- src/ex_docmd.c      Fri Nov 28 17:26:13 2008
175 ***************
176 *** 8753,8760 ****
177                 else if (*dirnow != NUL
178                         && (ssop_flags & SSOP_CURDIR) && globaldir != NULL)
179                 {
180 !                   (void)mch_chdir((char *)globaldir);
181 !                   shorten_fnames(TRUE);
182                 }
183   
184                 failed |= (makeopens(fd, dirnow) == FAIL);
185 --- 8753,8760 ----
186                 else if (*dirnow != NUL
187                         && (ssop_flags & SSOP_CURDIR) && globaldir != NULL)
188                 {
189 !                   if (mch_chdir((char *)globaldir) == OK)
190 !                       shorten_fnames(TRUE);
191                 }
192   
193                 failed |= (makeopens(fd, dirnow) == FAIL);
194 *** ../vim-7.2.054/src/fileio.c Wed Nov 12 16:04:43 2008
195 --- src/fileio.c        Fri Nov 28 17:35:54 2008
196 ***************
197 *** 2214,2220 ****
198       {
199         /* Use stderr for stdin, makes shell commands work. */
200         close(0);
201 !       dup(2);
202       }
203   #endif
204   
205 --- 2214,2220 ----
206       {
207         /* Use stderr for stdin, makes shell commands work. */
208         close(0);
209 !       ignored = dup(2);
210       }
211   #endif
212   
213 ***************
214 *** 3449,3455 ****
215                 {
216   # ifdef UNIX
217   #  ifdef HAVE_FCHOWN
218 !                   fchown(fd, st_old.st_uid, st_old.st_gid);
219   #  endif
220                     if (mch_stat((char *)IObuff, &st) < 0
221                             || st.st_uid != st_old.st_uid
222 --- 3449,3455 ----
223                 {
224   # ifdef UNIX
225   #  ifdef HAVE_FCHOWN
226 !                   ignored = fchown(fd, st_old.st_uid, st_old.st_gid);
227   #  endif
228                     if (mch_stat((char *)IObuff, &st) < 0
229                             || st.st_uid != st_old.st_uid
230 ***************
231 *** 4365,4371 ****
232                 || st.st_uid != st_old.st_uid
233                 || st.st_gid != st_old.st_gid)
234         {
235 !           fchown(fd, st_old.st_uid, st_old.st_gid);
236             if (perm >= 0)      /* set permission again, may have changed */
237                 (void)mch_setperm(wfname, perm);
238         }
239 --- 4365,4371 ----
240                 || st.st_uid != st_old.st_uid
241                 || st.st_gid != st_old.st_gid)
242         {
243 !           ignored = fchown(fd, st_old.st_uid, st_old.st_gid);
244             if (perm >= 0)      /* set permission again, may have changed */
245                 (void)mch_setperm(wfname, perm);
246         }
247 ***************
248 *** 6030,6038 ****
249         {
250             tbuf[FGETS_SIZE - 2] = NUL;
251   #ifdef USE_CR
252 !           fgets_cr((char *)tbuf, FGETS_SIZE, fp);
253   #else
254 !           fgets((char *)tbuf, FGETS_SIZE, fp);
255   #endif
256         } while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n');
257       }
258 --- 6030,6038 ----
259         {
260             tbuf[FGETS_SIZE - 2] = NUL;
261   #ifdef USE_CR
262 !           ignoredp = fgets_cr((char *)tbuf, FGETS_SIZE, fp);
263   #else
264 !           ignoredp = fgets((char *)tbuf, FGETS_SIZE, fp);
265   #endif
266         } while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n');
267       }
268 *** ../vim-7.2.054/src/fold.c   Wed Aug  6 18:59:40 2008
269 --- src/fold.c  Fri Nov 28 12:24:16 2008
270 ***************
271 *** 48,54 ****
272   static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp));
273   static int foldLevelWin __ARGS((win_T *wp, linenr_T lnum));
274   static void checkupdate __ARGS((win_T *wp));
275 ! static void setFoldRepeat __ARGS((linenr_T lnum, long count, int open));
276   static linenr_T setManualFold __ARGS((linenr_T lnum, int opening, int recurse, int *donep));
277   static linenr_T setManualFoldWin __ARGS((win_T *wp, linenr_T lnum, int opening, int recurse, int *donep));
278   static void foldOpenNested __ARGS((fold_T *fpr));
279 --- 48,54 ----
280   static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp));
281   static int foldLevelWin __ARGS((win_T *wp, linenr_T lnum));
282   static void checkupdate __ARGS((win_T *wp));
283 ! static void setFoldRepeat __ARGS((linenr_T lnum, long count, int do_open));
284   static linenr_T setManualFold __ARGS((linenr_T lnum, int opening, int recurse, int *donep));
285   static linenr_T setManualFoldWin __ARGS((win_T *wp, linenr_T lnum, int opening, int recurse, int *donep));
286   static void foldOpenNested __ARGS((fold_T *fpr));
287 ***************
288 *** 1241,1250 ****
289    * Repeat "count" times.
290    */
291       static void
292 ! setFoldRepeat(lnum, count, open)
293       linenr_T  lnum;
294       long      count;
295 !     int               open;
296   {
297       int               done;
298       long      n;
299 --- 1241,1250 ----
300    * Repeat "count" times.
301    */
302       static void
303 ! setFoldRepeat(lnum, count, do_open)
304       linenr_T  lnum;
305       long      count;
306 !     int               do_open;
307   {
308       int               done;
309       long      n;
310 ***************
311 *** 1252,1258 ****
312       for (n = 0; n < count; ++n)
313       {
314         done = DONE_NOTHING;
315 !       (void)setManualFold(lnum, open, FALSE, &done);
316         if (!(done & DONE_ACTION))
317         {
318             /* Only give an error message when no fold could be opened. */
319 --- 1252,1258 ----
320       for (n = 0; n < count; ++n)
321       {
322         done = DONE_NOTHING;
323 !       (void)setManualFold(lnum, do_open, FALSE, &done);
324         if (!(done & DONE_ACTION))
325         {
326             /* Only give an error message when no fold could be opened. */
327 *** ../vim-7.2.054/src/globals.h        Thu Sep 18 21:29:07 2008
328 --- src/globals.h       Fri Nov 28 17:35:50 2008
329 ***************
330 *** 1549,1554 ****
331 --- 1549,1562 ----
332   EXTERN time_t starttime;
333   
334   /*
335 +  * Some compilers warn for not using a return value, but in some situations we
336 +  * can't do anything useful with the value.  Assign to this variable to avoid
337 +  * the warning.
338 +  */
339 + EXTERN int ignored;
340 + EXTERN char *ignoredp;
341
342 + /*
343    * Optional Farsi support.  Include it here, so EXTERN and INIT are defined.
344    */
345   #ifdef FEAT_FKMAP
346 *** ../vim-7.2.054/src/gui.c    Wed Aug  6 14:37:26 2008
347 --- src/gui.c   Fri Nov 28 18:48:31 2008
348 ***************
349 *** 139,145 ****
350                 /* The read returns when the child closes the pipe (or when
351                  * the child dies for some reason). */
352                 close(pipefd[1]);
353 !               (void)read(pipefd[0], &dummy, (size_t)1);
354                 close(pipefd[0]);
355             }
356   
357 --- 139,145 ----
358                 /* The read returns when the child closes the pipe (or when
359                  * the child dies for some reason). */
360                 close(pipefd[1]);
361 !               ignored = (int)read(pipefd[0], &dummy, (size_t)1);
362                 close(pipefd[0]);
363             }
364   
365 *** ../vim-7.2.054/src/gui_at_sb.c      Sun Jun 13 21:37:13 2004
366 --- src/gui_at_sb.c     Fri Nov 28 12:19:19 2008
367 ***************
368 *** 1078,1083 ****
369 --- 1078,1089 ----
370       Cardinal  *num_params;    /* unused */
371   {
372       ScrollbarWidget sbw = (ScrollbarWidget)w;
373 +     /* Use a union to avoid a warning for the weird conversion from float to
374 +      * XtPointer.  Comes from Xaw/Scrollbar.c. */
375 +     union {
376 +       XtPointer xtp;
377 +       float xtf;
378 +     } xtpf;
379   
380       if (LookAhead(w, event))
381         return;
382 ***************
383 *** 1085,1091 ****
384       /* thumbProc is not pretty, but is necessary for backwards
385          compatibility on those architectures for which it work{s,ed};
386          the intent is to pass a (truncated) float by value. */
387 !     XtCallCallbacks(w, XtNthumbProc, *(XtPointer*)&sbw->scrollbar.top);
388       XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top);
389   }
390   
391 --- 1091,1098 ----
392       /* thumbProc is not pretty, but is necessary for backwards
393          compatibility on those architectures for which it work{s,ed};
394          the intent is to pass a (truncated) float by value. */
395 !     xtpf.xtf = sbw->scrollbar.top;
396 !     XtCallCallbacks(w, XtNthumbProc, xtpf.xtp);
397       XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top);
398   }
399   
400 *** ../vim-7.2.054/src/gui_gtk_x11.c    Tue Jul  8 12:46:08 2008
401 --- src/gui_gtk_x11.c   Fri Nov 28 21:06:38 2008
402 ***************
403 *** 4070,4083 ****
404   
405         if (mask & (XValue | YValue))
406         {
407 !           int w, h;
408 !           gui_mch_get_screen_dimensions(&w, &h);
409 !           h += p_ghr + get_menu_tool_height();
410 !           w += get_menu_tool_width();
411             if (mask & XNegative)
412 !               x += w - pixel_width;
413             if (mask & YNegative)
414 !               y += h - pixel_height;
415   #ifdef HAVE_GTK2
416             gtk_window_move(GTK_WINDOW(gui.mainwin), x, y);
417   #else
418 --- 4070,4083 ----
419   
420         if (mask & (XValue | YValue))
421         {
422 !           int ww, hh;
423 !           gui_mch_get_screen_dimensions(&ww, &hh);
424 !           hh += p_ghr + get_menu_tool_height();
425 !           ww += get_menu_tool_width();
426             if (mask & XNegative)
427 !               x += ww - pixel_width;
428             if (mask & YNegative)
429 !               y += hh - pixel_height;
430   #ifdef HAVE_GTK2
431             gtk_window_move(GTK_WINDOW(gui.mainwin), x, y);
432   #else
433 *** ../vim-7.2.054/src/gui_xmdlg.c      Tue Jun 24 23:39:32 2008
434 --- src/gui_xmdlg.c     Fri Nov 28 21:04:08 2008
435 ***************
436 *** 369,378 ****
437       char      buf[TEMP_BUF_SIZE];
438       XmString  items[MAX_ENTRIES_IN_LIST];
439       int               i;
440 !     int               index;
441   
442 !     for (index = (int)ENCODING; index < (int)NONE; ++index)
443 !       count[index] = 0;
444   
445       /* First we insert the wild char into every single list. */
446       if (fix != ENCODING)
447 --- 369,378 ----
448       char      buf[TEMP_BUF_SIZE];
449       XmString  items[MAX_ENTRIES_IN_LIST];
450       int               i;
451 !     int               idx;
452   
453 !     for (idx = (int)ENCODING; idx < (int)NONE; ++idx)
454 !       count[idx] = 0;
455   
456       /* First we insert the wild char into every single list. */
457       if (fix != ENCODING)
458 ***************
459 *** 503,516 ****
460       /*
461        * Now loop trough the remaining lists and set them up.
462        */
463 !     for (index = (int)NAME; index < (int)NONE; ++index)
464       {
465         Widget w;
466   
467 !       if (fix == (enum ListSpecifier)index)
468             continue;
469   
470 !       switch ((enum ListSpecifier)index)
471         {
472             case NAME:
473                 w = data->list[NAME];
474 --- 503,516 ----
475       /*
476        * Now loop trough the remaining lists and set them up.
477        */
478 !     for (idx = (int)NAME; idx < (int)NONE; ++idx)
479       {
480         Widget w;
481   
482 !       if (fix == (enum ListSpecifier)idx)
483             continue;
484   
485 !       switch ((enum ListSpecifier)idx)
486         {
487             case NAME:
488                 w = data->list[NAME];
489 ***************
490 *** 525,545 ****
491                 w = (Widget)0;  /* for lint */
492         }
493   
494 !       for (i = 0; i < count[index]; ++i)
495         {
496 !           items[i] = XmStringCreateLocalized(list[index][i]);
497 !           XtFree(list[index][i]);
498         }
499         XmListDeleteAllItems(w);
500 !       XmListAddItems(w, items, count[index], 1);
501 !       if (data->sel[index])
502         {
503             XmStringFree(items[0]);
504 !           items[0] = XmStringCreateLocalized(data->sel[index]);
505             XmListSelectItem(w, items[0], False);
506             XmListSetBottomItem(w, items[0]);
507         }
508 !       for (i = 0; i < count[index]; ++i)
509             XmStringFree(items[i]);
510       }
511   }
512 --- 525,545 ----
513                 w = (Widget)0;  /* for lint */
514         }
515   
516 !       for (i = 0; i < count[idx]; ++i)
517         {
518 !           items[i] = XmStringCreateLocalized(list[idx][i]);
519 !           XtFree(list[idx][i]);
520         }
521         XmListDeleteAllItems(w);
522 !       XmListAddItems(w, items, count[idx], 1);
523 !       if (data->sel[idx])
524         {
525             XmStringFree(items[0]);
526 !           items[0] = XmStringCreateLocalized(data->sel[idx]);
527             XmListSelectItem(w, items[0], False);
528             XmListSetBottomItem(w, items[0]);
529         }
530 !       for (i = 0; i < count[idx]; ++i)
531             XmStringFree(items[i]);
532       }
533   }
534 ***************
535 *** 695,708 ****
536         int         n;
537         XmString    str;
538         Arg         args[4];
539 !       char        *msg = _("no specific match");
540   
541         n = 0;
542 !       str = XmStringCreateLocalized(msg);
543         XtSetArg(args[n], XmNlabelString, str); ++n;
544         XtSetValues(data->sample, args, n);
545         apply_fontlist(data->sample);
546 !       XmTextSetString(data->name, msg);
547         XmStringFree(str);
548   
549         return False;
550 --- 695,708 ----
551         int         n;
552         XmString    str;
553         Arg         args[4];
554 !       char        *nomatch_msg = _("no specific match");
555   
556         n = 0;
557 !       str = XmStringCreateLocalized(nomatch_msg);
558         XtSetArg(args[n], XmNlabelString, str); ++n;
559         XtSetValues(data->sample, args, n);
560         apply_fontlist(data->sample);
561 !       XmTextSetString(data->name, nomatch_msg);
562         XmStringFree(str);
563   
564         return False;
565 ***************
566 *** 886,906 ****
567       {
568         int     i;
569         int     max;
570 !       int     index = 0;
571         int     size;
572 !       char    str[128];
573   
574         for (i = 0, max = 0; i < data->num; i++)
575         {
576 !           get_part(fn(data, i), 7, str);
577 !           size = atoi(str);
578             if ((size > max) && (size < MAX_DISPLAY_SIZE))
579             {
580 !               index = i;
581                 max = size;
582             }
583         }
584 !       strcpy(big_font, fn(data, index));
585       }
586       data->old = XLoadQueryFont(XtDisplay(parent), big_font);
587       data->old_list = gui_motif_create_fontlist(data->old);
588 --- 886,906 ----
589       {
590         int     i;
591         int     max;
592 !       int     idx = 0;
593         int     size;
594 !       char    buf[128];
595   
596         for (i = 0, max = 0; i < data->num; i++)
597         {
598 !           get_part(fn(data, i), 7, buf);
599 !           size = atoi(buf);
600             if ((size > max) && (size < MAX_DISPLAY_SIZE))
601             {
602 !               idx = i;
603                 max = size;
604             }
605         }
606 !       strcpy(big_font, fn(data, idx));
607       }
608       data->old = XLoadQueryFont(XtDisplay(parent), big_font);
609       data->old_list = gui_motif_create_fontlist(data->old);
610 ***************
611 *** 1217,1244 ****
612   
613         if (i != 0)
614         {
615 !           char name[TEMP_BUF_SIZE];
616 !           char style[TEMP_BUF_SIZE];
617 !           char size[TEMP_BUF_SIZE];
618 !           char encoding[TEMP_BUF_SIZE];
619             char *found;
620   
621             found = names[0];
622   
623 !           name_part(found, name);
624 !           style_part(found, style);
625 !           size_part(found, size, data->in_pixels);
626 !           encoding_part(found, encoding);
627
628 !           if (strlen(name) > 0
629 !                   && strlen(style) > 0
630 !                   && strlen(size) > 0
631 !                   && strlen(encoding) > 0)
632             {
633 !               data->sel[NAME] = XtNewString(name);
634 !               data->sel[STYLE] = XtNewString(style);
635 !               data->sel[SIZE] = XtNewString(size);
636 !               data->sel[ENCODING] = XtNewString(encoding);
637                 data->font_name = XtNewString(names[0]);
638                 display_sample(data);
639                 XmTextSetString(data->name, data->font_name);
640 --- 1217,1244 ----
641   
642         if (i != 0)
643         {
644 !           char namebuf[TEMP_BUF_SIZE];
645 !           char stylebuf[TEMP_BUF_SIZE];
646 !           char sizebuf[TEMP_BUF_SIZE];
647 !           char encodingbuf[TEMP_BUF_SIZE];
648             char *found;
649   
650             found = names[0];
651   
652 !           name_part(found, namebuf);
653 !           style_part(found, stylebuf);
654 !           size_part(found, sizebuf, data->in_pixels);
655 !           encoding_part(found, encodingbuf);
656
657 !           if (strlen(namebuf) > 0
658 !                   && strlen(stylebuf) > 0
659 !                   && strlen(sizebuf) > 0
660 !                   && strlen(encodingbuf) > 0)
661             {
662 !               data->sel[NAME] = XtNewString(namebuf);
663 !               data->sel[STYLE] = XtNewString(stylebuf);
664 !               data->sel[SIZE] = XtNewString(sizebuf);
665 !               data->sel[ENCODING] = XtNewString(encodingbuf);
666                 data->font_name = XtNewString(names[0]);
667                 display_sample(data);
668                 XmTextSetString(data->name, data->font_name);
669 *** ../vim-7.2.054/src/gui_xmebw.c      Thu Nov  8 20:48:14 2007
670 --- src/gui_xmebw.c     Fri Nov 28 18:58:53 2008
671 ***************
672 *** 1256,1262 ****
673       }
674       else
675       {
676 !       int adjust = 0;
677   
678   #if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
679         /*
680 --- 1256,1262 ----
681       }
682       else
683       {
684 !       adjust = 0;
685   
686   #if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
687         /*
688 ***************
689 *** 1268,1279 ****
690         {
691             case XmEXTERNAL_HIGHLIGHT:
692                 adjust = (eb->primitive.highlight_thickness -
693 !                       (eb->pushbutton.default_button_shadow_thickness ?
694 !                        Xm3D_ENHANCE_PIXEL : 0));
695                 break;
696   
697             case XmINTERNAL_HIGHLIGHT:
698 -               adjust = 0;
699                 break;
700   
701             default:
702 --- 1268,1278 ----
703         {
704             case XmEXTERNAL_HIGHLIGHT:
705                 adjust = (eb->primitive.highlight_thickness -
706 !                        (eb->pushbutton.default_button_shadow_thickness
707 !                         ?  Xm3D_ENHANCE_PIXEL : 0));
708                 break;
709   
710             case XmINTERNAL_HIGHLIGHT:
711                 break;
712   
713             default:
714 *** ../vim-7.2.054/src/main.c   Thu Nov 20 14:11:47 2008
715 --- src/main.c  Fri Nov 28 18:32:48 2008
716 ***************
717 *** 2372,2378 ****
718        * Is there any other system that cannot do this?
719        */
720       close(0);
721 !     dup(2);
722   #endif
723   }
724   
725 --- 2372,2378 ----
726        * Is there any other system that cannot do this?
727        */
728       close(0);
729 !     ignored = dup(2);
730   #endif
731   }
732   
733 *** ../vim-7.2.054/src/mbyte.c  Thu Nov 20 17:09:09 2008
734 --- src/mbyte.c Fri Nov 28 18:44:05 2008
735 ***************
736 *** 717,723 ****
737                      * where mblen() returns 0 for invalid character.
738                      * Therefore, following condition includes 0.
739                      */
740 !                   (void)mblen(NULL, 0);       /* First reset the state. */
741                     if (mblen(buf, (size_t)1) <= 0)
742                         n = 2;
743                     else
744 --- 717,723 ----
745                      * where mblen() returns 0 for invalid character.
746                      * Therefore, following condition includes 0.
747                      */
748 !                   ignored = mblen(NULL, 0);   /* First reset the state. */
749                     if (mblen(buf, (size_t)1) <= 0)
750                         n = 2;
751                     else
752 ***************
753 *** 5278,5284 ****
754   
755   /*ARGSUSED*/
756       static void
757 ! preedit_start_cbproc(XIC xic, XPointer client_data, XPointer call_data)
758   {
759   #ifdef XIM_DEBUG
760       xim_log("xim_decide_input_style()\n");
761 --- 5278,5284 ----
762   
763   /*ARGSUSED*/
764       static void
765 ! preedit_start_cbproc(XIC thexic, XPointer client_data, XPointer call_data)
766   {
767   #ifdef XIM_DEBUG
768       xim_log("xim_decide_input_style()\n");
769 ***************
770 *** 5312,5318 ****
771   
772   /*ARGSUSED*/
773       static void
774 ! preedit_draw_cbproc(XIC xic, XPointer client_data, XPointer call_data)
775   {
776       XIMPreeditDrawCallbackStruct *draw_data;
777       XIMText   *text;
778 --- 5312,5318 ----
779   
780   /*ARGSUSED*/
781       static void
782 ! preedit_draw_cbproc(XIC thexic, XPointer client_data, XPointer call_data)
783   {
784       XIMPreeditDrawCallbackStruct *draw_data;
785       XIMText   *text;
786 ***************
787 *** 5453,5459 ****
788   
789   /*ARGSUSED*/
790       static void
791 ! preedit_caret_cbproc(XIC xic, XPointer client_data, XPointer call_data)
792   {
793   #ifdef XIM_DEBUG
794       xim_log("preedit_caret_cbproc()\n");
795 --- 5453,5459 ----
796   
797   /*ARGSUSED*/
798       static void
799 ! preedit_caret_cbproc(XIC thexic, XPointer client_data, XPointer call_data)
800   {
801   #ifdef XIM_DEBUG
802       xim_log("preedit_caret_cbproc()\n");
803 ***************
804 *** 5462,5468 ****
805   
806   /*ARGSUSED*/
807       static void
808 ! preedit_done_cbproc(XIC xic, XPointer client_data, XPointer call_data)
809   {
810   #ifdef XIM_DEBUG
811       xim_log("preedit_done_cbproc()\n");
812 --- 5462,5468 ----
813   
814   /*ARGSUSED*/
815       static void
816 ! preedit_done_cbproc(XIC thexic, XPointer client_data, XPointer call_data)
817   {
818   #ifdef XIM_DEBUG
819       xim_log("preedit_done_cbproc()\n");
820 *** ../vim-7.2.054/src/message.c        Sun Jul 13 19:18:44 2008
821 --- src/message.c       Fri Nov 28 12:26:56 2008
822 ***************
823 *** 4585,4645 ****
824                         if (remove_trailing_zeroes)
825                         {
826                             int i;
827 !                           char *p;
828   
829                             /* Using %g or %G: remove superfluous zeroes. */
830                             if (fmt_spec == 'f')
831 !                               p = tmp + str_arg_l - 1;
832                             else
833                             {
834 !                               p = (char *)vim_strchr((char_u *)tmp,
835                                                  fmt_spec == 'e' ? 'e' : 'E');
836 !                               if (p != NULL)
837                                 {
838                                     /* Remove superfluous '+' and leading
839                                      * zeroes from the exponent. */
840 !                                   if (p[1] == '+')
841                                     {
842                                         /* Change "1.0e+07" to "1.0e07" */
843 !                                       STRMOVE(p + 1, p + 2);
844                                         --str_arg_l;
845                                     }
846 !                                   i = (p[1] == '-') ? 2 : 1;
847 !                                   while (p[i] == '0')
848                                     {
849                                         /* Change "1.0e07" to "1.0e7" */
850 !                                       STRMOVE(p + i, p + i + 1);
851                                         --str_arg_l;
852                                     }
853 !                                   --p;
854                                 }
855                             }
856   
857 !                           if (p != NULL && !precision_specified)
858                                 /* Remove trailing zeroes, but keep the one
859                                  * just after a dot. */
860 !                               while (p > tmp + 2 && *p == '0' && p[-1] != '.')
861                                 {
862 !                                   STRMOVE(p, p + 1);
863 !                                   --p;
864                                     --str_arg_l;
865                                 }
866                         }
867                         else
868                         {
869 !                           char *p;
870   
871                             /* Be consistent: some printf("%e") use 1.0e+12
872                              * and some 1.0e+012.  Remove one zero in the last
873                              * case. */
874 !                           p = (char *)vim_strchr((char_u *)tmp,
875                                                  fmt_spec == 'e' ? 'e' : 'E');
876 !                           if (p != NULL && (p[1] == '+' || p[1] == '-')
877 !                                         && p[2] == '0'
878 !                                         && vim_isdigit(p[3])
879 !                                         && vim_isdigit(p[4]))
880                             {
881 !                               STRMOVE(p + 2, p + 3);
882                                 --str_arg_l;
883                             }
884                         }
885 --- 4585,4646 ----
886                         if (remove_trailing_zeroes)
887                         {
888                             int i;
889 !                           char *tp;
890   
891                             /* Using %g or %G: remove superfluous zeroes. */
892                             if (fmt_spec == 'f')
893 !                               tp = tmp + str_arg_l - 1;
894                             else
895                             {
896 !                               tp = (char *)vim_strchr((char_u *)tmp,
897                                                  fmt_spec == 'e' ? 'e' : 'E');
898 !                               if (tp != NULL)
899                                 {
900                                     /* Remove superfluous '+' and leading
901                                      * zeroes from the exponent. */
902 !                                   if (tp[1] == '+')
903                                     {
904                                         /* Change "1.0e+07" to "1.0e07" */
905 !                                       STRMOVE(tp + 1, tp + 2);
906                                         --str_arg_l;
907                                     }
908 !                                   i = (tp[1] == '-') ? 2 : 1;
909 !                                   while (tp[i] == '0')
910                                     {
911                                         /* Change "1.0e07" to "1.0e7" */
912 !                                       STRMOVE(tp + i, tp + i + 1);
913                                         --str_arg_l;
914                                     }
915 !                                   --tp;
916                                 }
917                             }
918   
919 !                           if (tp != NULL && !precision_specified)
920                                 /* Remove trailing zeroes, but keep the one
921                                  * just after a dot. */
922 !                               while (tp > tmp + 2 && *tp == '0'
923 !                                                            && tp[-1] != '.')
924                                 {
925 !                                   STRMOVE(tp, tp + 1);
926 !                                   --tp;
927                                     --str_arg_l;
928                                 }
929                         }
930                         else
931                         {
932 !                           char *tp;
933   
934                             /* Be consistent: some printf("%e") use 1.0e+12
935                              * and some 1.0e+012.  Remove one zero in the last
936                              * case. */
937 !                           tp = (char *)vim_strchr((char_u *)tmp,
938                                                  fmt_spec == 'e' ? 'e' : 'E');
939 !                           if (tp != NULL && (tp[1] == '+' || tp[1] == '-')
940 !                                         && tp[2] == '0'
941 !                                         && vim_isdigit(tp[3])
942 !                                         && vim_isdigit(tp[4]))
943                             {
944 !                               STRMOVE(tp + 2, tp + 3);
945                                 --str_arg_l;
946                             }
947                         }
948 *** ../vim-7.2.054/src/netbeans.c       Sat Nov 15 14:10:23 2008
949 --- src/netbeans.c      Fri Nov 28 18:51:43 2008
950 ***************
951 *** 1043,1049 ****
952         nbdebug(("EVT: %s", buf));
953   /*    nb_send(buf, "netbeans_end");    avoid "write failed" messages */
954         if (sd >= 0)
955 !           sock_write(sd, buf, (int)STRLEN(buf));  /* ignore errors */
956       }
957   }
958   
959 --- 1043,1049 ----
960         nbdebug(("EVT: %s", buf));
961   /*    nb_send(buf, "netbeans_end");    avoid "write failed" messages */
962         if (sd >= 0)
963 !           ignored = sock_write(sd, buf, (int)STRLEN(buf));
964       }
965   }
966   
967 ***************
968 *** 2277,2285 ****
969             int serNum;
970             int localTypeNum;
971             int typeNum;
972 - # ifdef NBDEBUG
973 -           int len;
974 - # endif
975             pos_T *pos;
976   
977             if (buf == NULL || buf->bufp == NULL)
978 --- 2277,2282 ----
979 ***************
980 *** 2303,2315 ****
981             pos = get_off_or_lnum(buf->bufp, &args);
982   
983             cp = (char *)args;
984 ! # ifdef NBDEBUG
985 !           len =
986 ! # endif
987 !               strtol(cp, &cp, 10);
988             args = (char_u *)cp;
989   # ifdef NBDEBUG
990 !           if (len != -1)
991             {
992                 nbdebug(("    partial line annotation -- Not Yet Implemented!\n"));
993             }
994 --- 2300,2309 ----
995             pos = get_off_or_lnum(buf->bufp, &args);
996   
997             cp = (char *)args;
998 !           ignored = (int)strtol(cp, &cp, 10);
999             args = (char_u *)cp;
1000   # ifdef NBDEBUG
1001 !           if (ignored != -1)
1002             {
1003                 nbdebug(("    partial line annotation -- Not Yet Implemented!\n"));
1004             }
1005 *** ../vim-7.2.054/src/option.c Sun Nov  9 13:43:25 2008
1006 --- src/option.c        Fri Nov 28 12:27:34 2008
1007 ***************
1008 *** 8232,8244 ****
1009             {
1010                 if (number == 0 && string != NULL)
1011                 {
1012 !                   int index;
1013   
1014                     /* Either we are given a string or we are setting option
1015                      * to zero. */
1016 !                   for (index = 0; string[index] == '0'; ++index)
1017                         ;
1018 !                   if (string[index] != NUL || index == 0)
1019                     {
1020                         /* There's another character after zeros or the string
1021                          * is empty.  In both cases, we are trying to set a
1022 --- 8232,8244 ----
1023             {
1024                 if (number == 0 && string != NULL)
1025                 {
1026 !                   int idx;
1027   
1028                     /* Either we are given a string or we are setting option
1029                      * to zero. */
1030 !                   for (idx = 0; string[idx] == '0'; ++idx)
1031                         ;
1032 !                   if (string[idx] != NUL || idx == 0)
1033                     {
1034                         /* There's another character after zeros or the string
1035                          * is empty.  In both cases, we are trying to set a
1036 *** ../vim-7.2.054/src/os_unix.c        Wed Nov 12 14:09:38 2008
1037 --- src/os_unix.c       Fri Nov 28 18:39:55 2008
1038 ***************
1039 *** 315,326 ****
1040       {-1,          "Unknown!", FALSE}
1041   };
1042   
1043       void
1044   mch_write(s, len)
1045       char_u    *s;
1046       int               len;
1047   {
1048 !     write(1, (char *)s, len);
1049       if (p_wd)         /* Unix is too fast, slow down a bit more */
1050         RealWaitForChar(read_cmd_fd, p_wd, NULL);
1051   }
1052 --- 315,329 ----
1053       {-1,          "Unknown!", FALSE}
1054   };
1055   
1056 + /*
1057 +  * Write s[len] to the screen.
1058 +  */
1059       void
1060   mch_write(s, len)
1061       char_u    *s;
1062       int               len;
1063   {
1064 !     ignored = (int)write(1, (char *)s, len);
1065       if (p_wd)         /* Unix is too fast, slow down a bit more */
1066         RealWaitForChar(read_cmd_fd, p_wd, NULL);
1067   }
1068 ***************
1069 *** 3927,3935 ****
1070                  */
1071                 if (fd >= 0)
1072                 {
1073 !                   dup(fd); /* To replace stdin  (file descriptor 0) */
1074 !                   dup(fd); /* To replace stdout (file descriptor 1) */
1075 !                   dup(fd); /* To replace stderr (file descriptor 2) */
1076   
1077                     /* Don't need this now that we've duplicated it */
1078                     close(fd);
1079 --- 3930,3938 ----
1080                  */
1081                 if (fd >= 0)
1082                 {
1083 !                   ignored = dup(fd); /* To replace stdin  (fd 0) */
1084 !                   ignored = dup(fd); /* To replace stdout (fd 1) */
1085 !                   ignored = dup(fd); /* To replace stderr (fd 2) */
1086   
1087                     /* Don't need this now that we've duplicated it */
1088                     close(fd);
1089 ***************
1090 *** 3997,4009 ****
1091   
1092                     /* set up stdin/stdout/stderr for the child */
1093                     close(0);
1094 !                   dup(pty_slave_fd);
1095                     close(1);
1096 !                   dup(pty_slave_fd);
1097                     if (gui.in_use)
1098                     {
1099                         close(2);
1100 !                       dup(pty_slave_fd);
1101                     }
1102   
1103                     close(pty_slave_fd);    /* has been dupped, close it now */
1104 --- 4000,4012 ----
1105   
1106                     /* set up stdin/stdout/stderr for the child */
1107                     close(0);
1108 !                   ignored = dup(pty_slave_fd);
1109                     close(1);
1110 !                   ignored = dup(pty_slave_fd);
1111                     if (gui.in_use)
1112                     {
1113                         close(2);
1114 !                       ignored = dup(pty_slave_fd);
1115                     }
1116   
1117                     close(pty_slave_fd);    /* has been dupped, close it now */
1118 ***************
1119 *** 4014,4026 ****
1120                     /* set up stdin for the child */
1121                     close(fd_toshell[1]);
1122                     close(0);
1123 !                   dup(fd_toshell[0]);
1124                     close(fd_toshell[0]);
1125   
1126                     /* set up stdout for the child */
1127                     close(fd_fromshell[0]);
1128                     close(1);
1129 !                   dup(fd_fromshell[1]);
1130                     close(fd_fromshell[1]);
1131   
1132   # ifdef FEAT_GUI
1133 --- 4017,4029 ----
1134                     /* set up stdin for the child */
1135                     close(fd_toshell[1]);
1136                     close(0);
1137 !                   ignored = dup(fd_toshell[0]);
1138                     close(fd_toshell[0]);
1139   
1140                     /* set up stdout for the child */
1141                     close(fd_fromshell[0]);
1142                     close(1);
1143 !                   ignored = dup(fd_fromshell[1]);
1144                     close(fd_fromshell[1]);
1145   
1146   # ifdef FEAT_GUI
1147 ***************
1148 *** 4028,4034 ****
1149                     {
1150                         /* set up stderr for the child */
1151                         close(2);
1152 !                       dup(1);
1153                     }
1154   # endif
1155                 }
1156 --- 4031,4037 ----
1157                     {
1158                         /* set up stderr for the child */
1159                         close(2);
1160 !                       ignored = dup(1);
1161                     }
1162   # endif
1163                 }
1164 ***************
1165 *** 4159,4165 ****
1166                                             && (lnum !=
1167                                                     curbuf->b_ml.ml_line_count
1168                                                     || curbuf->b_p_eol)))
1169 !                                   write(toshell_fd, "\n", (size_t)1);
1170                                 ++lnum;
1171                                 if (lnum > curbuf->b_op_end.lnum)
1172                                 {
1173 --- 4162,4169 ----
1174                                             && (lnum !=
1175                                                     curbuf->b_ml.ml_line_count
1176                                                     || curbuf->b_p_eol)))
1177 !                                   ignored = write(toshell_fd, "\n",
1178 !                                                                  (size_t)1);
1179                                 ++lnum;
1180                                 if (lnum > curbuf->b_op_end.lnum)
1181                                 {
1182 *** ../vim-7.2.054/src/spell.c  Fri Nov 28 10:08:05 2008
1183 --- src/spell.c Fri Nov 28 12:28:24 2008
1184 ***************
1185 *** 4950,4956 ****
1186   static void put_sugtime __ARGS((spellinfo_T *spin, FILE *fd));
1187   static int write_vim_spell __ARGS((spellinfo_T *spin, char_u *fname));
1188   static void clear_node __ARGS((wordnode_T *node));
1189 ! static int put_node __ARGS((FILE *fd, wordnode_T *node, int index, int regionmask, int prefixtree));
1190   static void spell_make_sugfile __ARGS((spellinfo_T *spin, char_u *wfname));
1191   static int sug_filltree __ARGS((spellinfo_T *spin, slang_T *slang));
1192   static int sug_maketable __ARGS((spellinfo_T *spin));
1193 --- 4950,4956 ----
1194   static void put_sugtime __ARGS((spellinfo_T *spin, FILE *fd));
1195   static int write_vim_spell __ARGS((spellinfo_T *spin, char_u *fname));
1196   static void clear_node __ARGS((wordnode_T *node));
1197 ! static int put_node __ARGS((FILE *fd, wordnode_T *node, int idx, int regionmask, int prefixtree));
1198   static void spell_make_sugfile __ARGS((spellinfo_T *spin, char_u *wfname));
1199   static int sug_filltree __ARGS((spellinfo_T *spin, slang_T *slang));
1200   static int sug_maketable __ARGS((spellinfo_T *spin));
1201 *** ../vim-7.2.054/src/ui.c     Sun Sep 14 15:57:54 2008
1202 --- src/ui.c    Fri Nov 28 19:04:36 2008
1203 ***************
1204 *** 1820,1826 ****
1205   #ifdef HAVE_DUP
1206             /* Use stderr for stdin, also works for shell commands. */
1207             close(0);
1208 !           dup(2);
1209   #else
1210             read_cmd_fd = 2;    /* read from stderr instead of stdin */
1211   #endif
1212 --- 1820,1826 ----
1213   #ifdef HAVE_DUP
1214             /* Use stderr for stdin, also works for shell commands. */
1215             close(0);
1216 !           ignored = dup(2);
1217   #else
1218             read_cmd_fd = 2;    /* read from stderr instead of stdin */
1219   #endif
1220 *** ../vim-7.2.054/src/window.c Sat Nov 15 14:10:23 2008
1221 --- src/window.c        Fri Nov 28 18:46:45 2008
1222 ***************
1223 *** 4029,4042 ****
1224             if (mch_dirname(cwd, MAXPATHL) == OK)
1225                 globaldir = vim_strsave(cwd);
1226         }
1227 !       mch_chdir((char *)curwin->w_localdir);
1228 !       shorten_fnames(TRUE);
1229       }
1230       else if (globaldir != NULL)
1231       {
1232         /* Window doesn't have a local directory and we are not in the global
1233          * directory: Change to the global directory. */
1234 !       mch_chdir((char *)globaldir);
1235         vim_free(globaldir);
1236         globaldir = NULL;
1237         shorten_fnames(TRUE);
1238 --- 4029,4042 ----
1239             if (mch_dirname(cwd, MAXPATHL) == OK)
1240                 globaldir = vim_strsave(cwd);
1241         }
1242 !       if (mch_chdir((char *)curwin->w_localdir) == 0)
1243 !           shorten_fnames(TRUE);
1244       }
1245       else if (globaldir != NULL)
1246       {
1247         /* Window doesn't have a local directory and we are not in the global
1248          * directory: Change to the global directory. */
1249 !       ignored = mch_chdir((char *)globaldir);
1250         vim_free(globaldir);
1251         globaldir = NULL;
1252         shorten_fnames(TRUE);
1253 *** ../vim-7.2.054/src/version.c        Fri Nov 28 12:05:07 2008
1254 --- src/version.c       Fri Nov 28 21:12:42 2008
1255 ***************
1256 *** 678,679 ****
1257 --- 678,681 ----
1258   {   /* Add new patch number below this line */
1259 + /**/
1260 +     55,
1261   /**/
1262
1263 -- 
1264 PRINCE:    He's come to rescue me, father.
1265 LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ...
1266                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
1267
1268  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
1269 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
1270 \\\        download, build and distribute -- http://www.A-A-P.org        ///
1271  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.16362 seconds and 3 git commands to generate.