summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.2.055
blob: ffab9a267df425c48042b663cd39d68b9c1b2ef1 (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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
To: vim-dev@vim.org
Subject: Patch 7.2.055
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.055
Problem:    Various compiler warnings with strict checking.
Solution:   Avoid the warnings by using return values and renaming.
Files:	    src/diff.c, src/eval.c, src/ex_cmds.c, src/ex_docmd.c,
	    src/fileio.c, src/fold.c, src/globals.h, src/gui.c,
	    src/gui_at_sb.c, src/gui_gtk_x11.c, src/gui_xmdlg.c,
	    src/gui_xmebw.c, src/main.c, src/mbyte.c, src/message.c,
	    src/netbeans.c, src/option.c, src/os_unix.c, src/spell.c,
	    src/ui.c, src/window.c


*** ../vim-7.2.054/src/diff.c	Fri Jan 18 17:39:32 2008
--- src/diff.c	Fri Nov 28 17:23:35 2008
***************
*** 661,666 ****
--- 665,671 ----
      char_u	*tmp_diff;
      FILE	*fd;
      int		ok;
+     int		io_error = FALSE;
  
      /* Delete all diffblocks. */
      diff_clear(curtab);
***************
*** 697,714 ****
      {
  	ok = FALSE;
  	fd = mch_fopen((char *)tmp_orig, "w");
! 	if (fd != NULL)
  	{
! 	    fwrite("line1\n", (size_t)6, (size_t)1, fd);
  	    fclose(fd);
  	    fd = mch_fopen((char *)tmp_new, "w");
! 	    if (fd != NULL)
  	    {
! 		fwrite("line2\n", (size_t)6, (size_t)1, fd);
  		fclose(fd);
  		diff_file(tmp_orig, tmp_new, tmp_diff);
  		fd = mch_fopen((char *)tmp_diff, "r");
! 		if (fd != NULL)
  		{
  		    char_u	linebuf[LBUFLEN];
  
--- 702,727 ----
      {
  	ok = FALSE;
  	fd = mch_fopen((char *)tmp_orig, "w");
! 	if (fd == NULL)
! 	    io_error = TRUE;
! 	else
  	{
! 	    if (fwrite("line1\n", (size_t)6, (size_t)1, fd) != 1)
! 		io_error = TRUE;
  	    fclose(fd);
  	    fd = mch_fopen((char *)tmp_new, "w");
! 	    if (fd == NULL)
! 		io_error = TRUE;
! 	    else
  	    {
! 		if (fwrite("line2\n", (size_t)6, (size_t)1, fd) != 1)
! 		    io_error = TRUE;
  		fclose(fd);
  		diff_file(tmp_orig, tmp_new, tmp_diff);
  		fd = mch_fopen((char *)tmp_diff, "r");
! 		if (fd == NULL)
! 		    io_error = TRUE;
! 		else
  		{
  		    char_u	linebuf[LBUFLEN];
  
***************
*** 761,766 ****
--- 774,781 ----
      }
      if (!ok)
      {
+ 	if (io_error)
+ 	    EMSG(_("E810: Cannot read or write temp files"));
  	EMSG(_("E97: Cannot create diffs"));
  	diff_a_works = MAYBE;
  #if defined(MSWIN) || defined(MSDOS)
***************
*** 925,934 ****
      {
  # ifdef TEMPDIRNAMES
  	if (vim_tempdir != NULL)
! 	    mch_chdir((char *)vim_tempdir);
  	else
  # endif
! 	    mch_chdir("/tmp");
  	shorten_fnames(TRUE);
      }
  #endif
--- 940,949 ----
      {
  # ifdef TEMPDIRNAMES
  	if (vim_tempdir != NULL)
! 	    ignored = mch_chdir((char *)vim_tempdir);
  	else
  # endif
! 	    ignored = mch_chdir("/tmp");
  	shorten_fnames(TRUE);
      }
  #endif
*** ../vim-7.2.054/src/eval.c	Fri Nov 28 11:15:10 2008
--- src/eval.c	Fri Nov 28 12:23:13 2008
***************
*** 10641,10647 ****
  # ifdef FEAT_WINDOWS
  	    win_T	*wp;
  # endif
! 	    int		n = 1;
  
  	    if (row >= 0 && col >= 0)
  	    {
--- 10641,10647 ----
  # ifdef FEAT_WINDOWS
  	    win_T	*wp;
  # endif
! 	    int		winnr = 1;
  
  	    if (row >= 0 && col >= 0)
  	    {
***************
*** 10651,10659 ****
  		(void)mouse_comp_pos(win, &row, &col, &lnum);
  # ifdef FEAT_WINDOWS
  		for (wp = firstwin; wp != win; wp = wp->w_next)
! 		    ++n;
  # endif
! 		vimvars[VV_MOUSE_WIN].vv_nr = n;
  		vimvars[VV_MOUSE_LNUM].vv_nr = lnum;
  		vimvars[VV_MOUSE_COL].vv_nr = col + 1;
  	    }
--- 10651,10659 ----
  		(void)mouse_comp_pos(win, &row, &col, &lnum);
  # ifdef FEAT_WINDOWS
  		for (wp = firstwin; wp != win; wp = wp->w_next)
! 		    ++winnr;
  # endif
! 		vimvars[VV_MOUSE_WIN].vv_nr = winnr;
  		vimvars[VV_MOUSE_LNUM].vv_nr = lnum;
  		vimvars[VV_MOUSE_COL].vv_nr = col + 1;
  	    }
*** ../vim-7.2.054/src/ex_cmds.c	Sat Nov 15 14:10:23 2008
--- src/ex_cmds.c	Fri Nov 28 17:24:08 2008
***************
*** 1941,1947 ****
  	     * root.
  	     */
  	    if (fp_out != NULL)
! 		(void)fchown(fileno(fp_out), st_old.st_uid, st_old.st_gid);
  #endif
  	}
      }
--- 1941,1947 ----
  	     * root.
  	     */
  	    if (fp_out != NULL)
! 		ignored = fchown(fileno(fp_out), st_old.st_uid, st_old.st_gid);
  #endif
  	}
      }
*** ../vim-7.2.054/src/ex_docmd.c	Sat Nov 15 14:10:23 2008
--- src/ex_docmd.c	Fri Nov 28 17:26:13 2008
***************
*** 8753,8760 ****
  		else if (*dirnow != NUL
  			&& (ssop_flags & SSOP_CURDIR) && globaldir != NULL)
  		{
! 		    (void)mch_chdir((char *)globaldir);
! 		    shorten_fnames(TRUE);
  		}
  
  		failed |= (makeopens(fd, dirnow) == FAIL);
--- 8753,8760 ----
  		else if (*dirnow != NUL
  			&& (ssop_flags & SSOP_CURDIR) && globaldir != NULL)
  		{
! 		    if (mch_chdir((char *)globaldir) == OK)
! 			shorten_fnames(TRUE);
  		}
  
  		failed |= (makeopens(fd, dirnow) == FAIL);
*** ../vim-7.2.054/src/fileio.c	Wed Nov 12 16:04:43 2008
--- src/fileio.c	Fri Nov 28 17:35:54 2008
***************
*** 2214,2220 ****
      {
  	/* Use stderr for stdin, makes shell commands work. */
  	close(0);
! 	dup(2);
      }
  #endif
  
--- 2214,2220 ----
      {
  	/* Use stderr for stdin, makes shell commands work. */
  	close(0);
! 	ignored = dup(2);
      }
  #endif
  
***************
*** 3449,3455 ****
  		{
  # ifdef UNIX
  #  ifdef HAVE_FCHOWN
! 		    fchown(fd, st_old.st_uid, st_old.st_gid);
  #  endif
  		    if (mch_stat((char *)IObuff, &st) < 0
  			    || st.st_uid != st_old.st_uid
--- 3449,3455 ----
  		{
  # ifdef UNIX
  #  ifdef HAVE_FCHOWN
! 		    ignored = fchown(fd, st_old.st_uid, st_old.st_gid);
  #  endif
  		    if (mch_stat((char *)IObuff, &st) < 0
  			    || st.st_uid != st_old.st_uid
***************
*** 4365,4371 ****
  		|| st.st_uid != st_old.st_uid
  		|| st.st_gid != st_old.st_gid)
  	{
! 	    fchown(fd, st_old.st_uid, st_old.st_gid);
  	    if (perm >= 0)	/* set permission again, may have changed */
  		(void)mch_setperm(wfname, perm);
  	}
--- 4365,4371 ----
  		|| st.st_uid != st_old.st_uid
  		|| st.st_gid != st_old.st_gid)
  	{
! 	    ignored = fchown(fd, st_old.st_uid, st_old.st_gid);
  	    if (perm >= 0)	/* set permission again, may have changed */
  		(void)mch_setperm(wfname, perm);
  	}
***************
*** 6030,6038 ****
  	{
  	    tbuf[FGETS_SIZE - 2] = NUL;
  #ifdef USE_CR
! 	    fgets_cr((char *)tbuf, FGETS_SIZE, fp);
  #else
! 	    fgets((char *)tbuf, FGETS_SIZE, fp);
  #endif
  	} while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n');
      }
--- 6030,6038 ----
  	{
  	    tbuf[FGETS_SIZE - 2] = NUL;
  #ifdef USE_CR
! 	    ignoredp = fgets_cr((char *)tbuf, FGETS_SIZE, fp);
  #else
! 	    ignoredp = fgets((char *)tbuf, FGETS_SIZE, fp);
  #endif
  	} while (tbuf[FGETS_SIZE - 2] != NUL && tbuf[FGETS_SIZE - 2] != '\n');
      }
*** ../vim-7.2.054/src/fold.c	Wed Aug  6 18:59:40 2008
--- src/fold.c	Fri Nov 28 12:24:16 2008
***************
*** 48,54 ****
  static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp));
  static int foldLevelWin __ARGS((win_T *wp, linenr_T lnum));
  static void checkupdate __ARGS((win_T *wp));
! static void setFoldRepeat __ARGS((linenr_T lnum, long count, int open));
  static linenr_T setManualFold __ARGS((linenr_T lnum, int opening, int recurse, int *donep));
  static linenr_T setManualFoldWin __ARGS((win_T *wp, linenr_T lnum, int opening, int recurse, int *donep));
  static void foldOpenNested __ARGS((fold_T *fpr));
--- 48,54 ----
  static int foldFind __ARGS((garray_T *gap, linenr_T lnum, fold_T **fpp));
  static int foldLevelWin __ARGS((win_T *wp, linenr_T lnum));
  static void checkupdate __ARGS((win_T *wp));
! static void setFoldRepeat __ARGS((linenr_T lnum, long count, int do_open));
  static linenr_T setManualFold __ARGS((linenr_T lnum, int opening, int recurse, int *donep));
  static linenr_T setManualFoldWin __ARGS((win_T *wp, linenr_T lnum, int opening, int recurse, int *donep));
  static void foldOpenNested __ARGS((fold_T *fpr));
***************
*** 1241,1250 ****
   * Repeat "count" times.
   */
      static void
! setFoldRepeat(lnum, count, open)
      linenr_T	lnum;
      long	count;
!     int		open;
  {
      int		done;
      long	n;
--- 1241,1250 ----
   * Repeat "count" times.
   */
      static void
! setFoldRepeat(lnum, count, do_open)
      linenr_T	lnum;
      long	count;
!     int		do_open;
  {
      int		done;
      long	n;
***************
*** 1252,1258 ****
      for (n = 0; n < count; ++n)
      {
  	done = DONE_NOTHING;
! 	(void)setManualFold(lnum, open, FALSE, &done);
  	if (!(done & DONE_ACTION))
  	{
  	    /* Only give an error message when no fold could be opened. */
--- 1252,1258 ----
      for (n = 0; n < count; ++n)
      {
  	done = DONE_NOTHING;
! 	(void)setManualFold(lnum, do_open, FALSE, &done);
  	if (!(done & DONE_ACTION))
  	{
  	    /* Only give an error message when no fold could be opened. */
*** ../vim-7.2.054/src/globals.h	Thu Sep 18 21:29:07 2008
--- src/globals.h	Fri Nov 28 17:35:50 2008
***************
*** 1549,1554 ****
--- 1549,1562 ----
  EXTERN time_t starttime;
  
  /*
+  * Some compilers warn for not using a return value, but in some situations we
+  * can't do anything useful with the value.  Assign to this variable to avoid
+  * the warning.
+  */
+ EXTERN int ignored;
+ EXTERN char *ignoredp;
+ 
+ /*
   * Optional Farsi support.  Include it here, so EXTERN and INIT are defined.
   */
  #ifdef FEAT_FKMAP
*** ../vim-7.2.054/src/gui.c	Wed Aug  6 14:37:26 2008
--- src/gui.c	Fri Nov 28 18:48:31 2008
***************
*** 139,145 ****
  		/* The read returns when the child closes the pipe (or when
  		 * the child dies for some reason). */
  		close(pipefd[1]);
! 		(void)read(pipefd[0], &dummy, (size_t)1);
  		close(pipefd[0]);
  	    }
  
--- 139,145 ----
  		/* The read returns when the child closes the pipe (or when
  		 * the child dies for some reason). */
  		close(pipefd[1]);
! 		ignored = (int)read(pipefd[0], &dummy, (size_t)1);
  		close(pipefd[0]);
  	    }
  
*** ../vim-7.2.054/src/gui_at_sb.c	Sun Jun 13 21:37:13 2004
--- src/gui_at_sb.c	Fri Nov 28 12:19:19 2008
***************
*** 1078,1083 ****
--- 1078,1089 ----
      Cardinal	*num_params;	/* unused */
  {
      ScrollbarWidget sbw = (ScrollbarWidget)w;
+     /* Use a union to avoid a warning for the weird conversion from float to
+      * XtPointer.  Comes from Xaw/Scrollbar.c. */
+     union {
+ 	XtPointer xtp;
+ 	float xtf;
+     } xtpf;
  
      if (LookAhead(w, event))
  	return;
***************
*** 1085,1091 ****
      /* thumbProc is not pretty, but is necessary for backwards
         compatibility on those architectures for which it work{s,ed};
         the intent is to pass a (truncated) float by value. */
!     XtCallCallbacks(w, XtNthumbProc, *(XtPointer*)&sbw->scrollbar.top);
      XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top);
  }
  
--- 1091,1098 ----
      /* thumbProc is not pretty, but is necessary for backwards
         compatibility on those architectures for which it work{s,ed};
         the intent is to pass a (truncated) float by value. */
!     xtpf.xtf = sbw->scrollbar.top;
!     XtCallCallbacks(w, XtNthumbProc, xtpf.xtp);
      XtCallCallbacks(w, XtNjumpProc, (XtPointer)&sbw->scrollbar.top);
  }
  
*** ../vim-7.2.054/src/gui_gtk_x11.c	Tue Jul  8 12:46:08 2008
--- src/gui_gtk_x11.c	Fri Nov 28 21:06:38 2008
***************
*** 4070,4083 ****
  
  	if (mask & (XValue | YValue))
  	{
! 	    int w, h;
! 	    gui_mch_get_screen_dimensions(&w, &h);
! 	    h += p_ghr + get_menu_tool_height();
! 	    w += get_menu_tool_width();
  	    if (mask & XNegative)
! 		x += w - pixel_width;
  	    if (mask & YNegative)
! 		y += h - pixel_height;
  #ifdef HAVE_GTK2
  	    gtk_window_move(GTK_WINDOW(gui.mainwin), x, y);
  #else
--- 4070,4083 ----
  
  	if (mask & (XValue | YValue))
  	{
! 	    int ww, hh;
! 	    gui_mch_get_screen_dimensions(&ww, &hh);
! 	    hh += p_ghr + get_menu_tool_height();
! 	    ww += get_menu_tool_width();
  	    if (mask & XNegative)
! 		x += ww - pixel_width;
  	    if (mask & YNegative)
! 		y += hh - pixel_height;
  #ifdef HAVE_GTK2
  	    gtk_window_move(GTK_WINDOW(gui.mainwin), x, y);
  #else
*** ../vim-7.2.054/src/gui_xmdlg.c	Tue Jun 24 23:39:32 2008
--- src/gui_xmdlg.c	Fri Nov 28 21:04:08 2008
***************
*** 369,378 ****
      char	buf[TEMP_BUF_SIZE];
      XmString	items[MAX_ENTRIES_IN_LIST];
      int		i;
!     int		index;
  
!     for (index = (int)ENCODING; index < (int)NONE; ++index)
! 	count[index] = 0;
  
      /* First we insert the wild char into every single list. */
      if (fix != ENCODING)
--- 369,378 ----
      char	buf[TEMP_BUF_SIZE];
      XmString	items[MAX_ENTRIES_IN_LIST];
      int		i;
!     int		idx;
  
!     for (idx = (int)ENCODING; idx < (int)NONE; ++idx)
! 	count[idx] = 0;
  
      /* First we insert the wild char into every single list. */
      if (fix != ENCODING)
***************
*** 503,516 ****
      /*
       * Now loop trough the remaining lists and set them up.
       */
!     for (index = (int)NAME; index < (int)NONE; ++index)
      {
  	Widget w;
  
! 	if (fix == (enum ListSpecifier)index)
  	    continue;
  
! 	switch ((enum ListSpecifier)index)
  	{
  	    case NAME:
  		w = data->list[NAME];
--- 503,516 ----
      /*
       * Now loop trough the remaining lists and set them up.
       */
!     for (idx = (int)NAME; idx < (int)NONE; ++idx)
      {
  	Widget w;
  
! 	if (fix == (enum ListSpecifier)idx)
  	    continue;
  
! 	switch ((enum ListSpecifier)idx)
  	{
  	    case NAME:
  		w = data->list[NAME];
***************
*** 525,545 ****
  		w = (Widget)0;	/* for lint */
  	}
  
! 	for (i = 0; i < count[index]; ++i)
  	{
! 	    items[i] = XmStringCreateLocalized(list[index][i]);
! 	    XtFree(list[index][i]);
  	}
  	XmListDeleteAllItems(w);
! 	XmListAddItems(w, items, count[index], 1);
! 	if (data->sel[index])
  	{
  	    XmStringFree(items[0]);
! 	    items[0] = XmStringCreateLocalized(data->sel[index]);
  	    XmListSelectItem(w, items[0], False);
  	    XmListSetBottomItem(w, items[0]);
  	}
! 	for (i = 0; i < count[index]; ++i)
  	    XmStringFree(items[i]);
      }
  }
--- 525,545 ----
  		w = (Widget)0;	/* for lint */
  	}
  
! 	for (i = 0; i < count[idx]; ++i)
  	{
! 	    items[i] = XmStringCreateLocalized(list[idx][i]);
! 	    XtFree(list[idx][i]);
  	}
  	XmListDeleteAllItems(w);
! 	XmListAddItems(w, items, count[idx], 1);
! 	if (data->sel[idx])
  	{
  	    XmStringFree(items[0]);
! 	    items[0] = XmStringCreateLocalized(data->sel[idx]);
  	    XmListSelectItem(w, items[0], False);
  	    XmListSetBottomItem(w, items[0]);
  	}
! 	for (i = 0; i < count[idx]; ++i)
  	    XmStringFree(items[i]);
      }
  }
***************
*** 695,708 ****
  	int	    n;
  	XmString    str;
  	Arg	    args[4];
! 	char	    *msg = _("no specific match");
  
  	n = 0;
! 	str = XmStringCreateLocalized(msg);
  	XtSetArg(args[n], XmNlabelString, str); ++n;
  	XtSetValues(data->sample, args, n);
  	apply_fontlist(data->sample);
! 	XmTextSetString(data->name, msg);
  	XmStringFree(str);
  
  	return False;
--- 695,708 ----
  	int	    n;
  	XmString    str;
  	Arg	    args[4];
! 	char	    *nomatch_msg = _("no specific match");
  
  	n = 0;
! 	str = XmStringCreateLocalized(nomatch_msg);
  	XtSetArg(args[n], XmNlabelString, str); ++n;
  	XtSetValues(data->sample, args, n);
  	apply_fontlist(data->sample);
! 	XmTextSetString(data->name, nomatch_msg);
  	XmStringFree(str);
  
  	return False;
***************
*** 886,906 ****
      {
  	int	i;
  	int	max;
! 	int	index = 0;
  	int	size;
! 	char	str[128];
  
  	for (i = 0, max = 0; i < data->num; i++)
  	{
! 	    get_part(fn(data, i), 7, str);
! 	    size = atoi(str);
  	    if ((size > max) && (size < MAX_DISPLAY_SIZE))
  	    {
! 		index = i;
  		max = size;
  	    }
  	}
! 	strcpy(big_font, fn(data, index));
      }
      data->old = XLoadQueryFont(XtDisplay(parent), big_font);
      data->old_list = gui_motif_create_fontlist(data->old);
--- 886,906 ----
      {
  	int	i;
  	int	max;
! 	int	idx = 0;
  	int	size;
! 	char	buf[128];
  
  	for (i = 0, max = 0; i < data->num; i++)
  	{
! 	    get_part(fn(data, i), 7, buf);
! 	    size = atoi(buf);
  	    if ((size > max) && (size < MAX_DISPLAY_SIZE))
  	    {
! 		idx = i;
  		max = size;
  	    }
  	}
! 	strcpy(big_font, fn(data, idx));
      }
      data->old = XLoadQueryFont(XtDisplay(parent), big_font);
      data->old_list = gui_motif_create_fontlist(data->old);
***************
*** 1217,1244 ****
  
  	if (i != 0)
  	{
! 	    char name[TEMP_BUF_SIZE];
! 	    char style[TEMP_BUF_SIZE];
! 	    char size[TEMP_BUF_SIZE];
! 	    char encoding[TEMP_BUF_SIZE];
  	    char *found;
  
  	    found = names[0];
  
! 	    name_part(found, name);
! 	    style_part(found, style);
! 	    size_part(found, size, data->in_pixels);
! 	    encoding_part(found, encoding);
! 
! 	    if (strlen(name) > 0
! 		    && strlen(style) > 0
! 		    && strlen(size) > 0
! 		    && strlen(encoding) > 0)
  	    {
! 		data->sel[NAME] = XtNewString(name);
! 		data->sel[STYLE] = XtNewString(style);
! 		data->sel[SIZE] = XtNewString(size);
! 		data->sel[ENCODING] = XtNewString(encoding);
  		data->font_name = XtNewString(names[0]);
  		display_sample(data);
  		XmTextSetString(data->name, data->font_name);
--- 1217,1244 ----
  
  	if (i != 0)
  	{
! 	    char namebuf[TEMP_BUF_SIZE];
! 	    char stylebuf[TEMP_BUF_SIZE];
! 	    char sizebuf[TEMP_BUF_SIZE];
! 	    char encodingbuf[TEMP_BUF_SIZE];
  	    char *found;
  
  	    found = names[0];
  
! 	    name_part(found, namebuf);
! 	    style_part(found, stylebuf);
! 	    size_part(found, sizebuf, data->in_pixels);
! 	    encoding_part(found, encodingbuf);
! 
! 	    if (strlen(namebuf) > 0
! 		    && strlen(stylebuf) > 0
! 		    && strlen(sizebuf) > 0
! 		    && strlen(encodingbuf) > 0)
  	    {
! 		data->sel[NAME] = XtNewString(namebuf);
! 		data->sel[STYLE] = XtNewString(stylebuf);
! 		data->sel[SIZE] = XtNewString(sizebuf);
! 		data->sel[ENCODING] = XtNewString(encodingbuf);
  		data->font_name = XtNewString(names[0]);
  		display_sample(data);
  		XmTextSetString(data->name, data->font_name);
*** ../vim-7.2.054/src/gui_xmebw.c	Thu Nov  8 20:48:14 2007
--- src/gui_xmebw.c	Fri Nov 28 18:58:53 2008
***************
*** 1256,1262 ****
      }
      else
      {
! 	int adjust = 0;
  
  #if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
  	/*
--- 1256,1262 ----
      }
      else
      {
! 	adjust = 0;
  
  #if !defined(LESSTIF_VERSION) && (XmVersion > 1002)
  	/*
***************
*** 1268,1279 ****
  	{
  	    case XmEXTERNAL_HIGHLIGHT:
  		adjust = (eb->primitive.highlight_thickness -
! 			(eb->pushbutton.default_button_shadow_thickness ?
! 			 Xm3D_ENHANCE_PIXEL : 0));
  		break;
  
  	    case XmINTERNAL_HIGHLIGHT:
- 		adjust = 0;
  		break;
  
  	    default:
--- 1268,1278 ----
  	{
  	    case XmEXTERNAL_HIGHLIGHT:
  		adjust = (eb->primitive.highlight_thickness -
! 			 (eb->pushbutton.default_button_shadow_thickness
! 			  ?  Xm3D_ENHANCE_PIXEL : 0));
  		break;
  
  	    case XmINTERNAL_HIGHLIGHT:
  		break;
  
  	    default:
*** ../vim-7.2.054/src/main.c	Thu Nov 20 14:11:47 2008
--- src/main.c	Fri Nov 28 18:32:48 2008
***************
*** 2372,2378 ****
       * Is there any other system that cannot do this?
       */
      close(0);
!     dup(2);
  #endif
  }
  
--- 2372,2378 ----
       * Is there any other system that cannot do this?
       */
      close(0);
!     ignored = dup(2);
  #endif
  }
  
*** ../vim-7.2.054/src/mbyte.c	Thu Nov 20 17:09:09 2008
--- src/mbyte.c	Fri Nov 28 18:44:05 2008
***************
*** 717,723 ****
  		     * where mblen() returns 0 for invalid character.
  		     * Therefore, following condition includes 0.
  		     */
! 		    (void)mblen(NULL, 0);	/* First reset the state. */
  		    if (mblen(buf, (size_t)1) <= 0)
  			n = 2;
  		    else
--- 717,723 ----
  		     * where mblen() returns 0 for invalid character.
  		     * Therefore, following condition includes 0.
  		     */
! 		    ignored = mblen(NULL, 0);	/* First reset the state. */
  		    if (mblen(buf, (size_t)1) <= 0)
  			n = 2;
  		    else
***************
*** 5278,5284 ****
  
  /*ARGSUSED*/
      static void
! preedit_start_cbproc(XIC xic, XPointer client_data, XPointer call_data)
  {
  #ifdef XIM_DEBUG
      xim_log("xim_decide_input_style()\n");
--- 5278,5284 ----
  
  /*ARGSUSED*/
      static void
! preedit_start_cbproc(XIC thexic, XPointer client_data, XPointer call_data)
  {
  #ifdef XIM_DEBUG
      xim_log("xim_decide_input_style()\n");
***************
*** 5312,5318 ****
  
  /*ARGSUSED*/
      static void
! preedit_draw_cbproc(XIC xic, XPointer client_data, XPointer call_data)
  {
      XIMPreeditDrawCallbackStruct *draw_data;
      XIMText	*text;
--- 5312,5318 ----
  
  /*ARGSUSED*/
      static void
! preedit_draw_cbproc(XIC thexic, XPointer client_data, XPointer call_data)
  {
      XIMPreeditDrawCallbackStruct *draw_data;
      XIMText	*text;
***************
*** 5453,5459 ****
  
  /*ARGSUSED*/
      static void
! preedit_caret_cbproc(XIC xic, XPointer client_data, XPointer call_data)
  {
  #ifdef XIM_DEBUG
      xim_log("preedit_caret_cbproc()\n");
--- 5453,5459 ----
  
  /*ARGSUSED*/
      static void
! preedit_caret_cbproc(XIC thexic, XPointer client_data, XPointer call_data)
  {
  #ifdef XIM_DEBUG
      xim_log("preedit_caret_cbproc()\n");
***************
*** 5462,5468 ****
  
  /*ARGSUSED*/
      static void
! preedit_done_cbproc(XIC xic, XPointer client_data, XPointer call_data)
  {
  #ifdef XIM_DEBUG
      xim_log("preedit_done_cbproc()\n");
--- 5462,5468 ----
  
  /*ARGSUSED*/
      static void
! preedit_done_cbproc(XIC thexic, XPointer client_data, XPointer call_data)
  {
  #ifdef XIM_DEBUG
      xim_log("preedit_done_cbproc()\n");
*** ../vim-7.2.054/src/message.c	Sun Jul 13 19:18:44 2008
--- src/message.c	Fri Nov 28 12:26:56 2008
***************
*** 4585,4645 ****
  			if (remove_trailing_zeroes)
  			{
  			    int i;
! 			    char *p;
  
  			    /* Using %g or %G: remove superfluous zeroes. */
  			    if (fmt_spec == 'f')
! 				p = tmp + str_arg_l - 1;
  			    else
  			    {
! 				p = (char *)vim_strchr((char_u *)tmp,
  						 fmt_spec == 'e' ? 'e' : 'E');
! 				if (p != NULL)
  				{
  				    /* Remove superfluous '+' and leading
  				     * zeroes from the exponent. */
! 				    if (p[1] == '+')
  				    {
  					/* Change "1.0e+07" to "1.0e07" */
! 					STRMOVE(p + 1, p + 2);
  					--str_arg_l;
  				    }
! 				    i = (p[1] == '-') ? 2 : 1;
! 				    while (p[i] == '0')
  				    {
  					/* Change "1.0e07" to "1.0e7" */
! 					STRMOVE(p + i, p + i + 1);
  					--str_arg_l;
  				    }
! 				    --p;
  				}
  			    }
  
! 			    if (p != NULL && !precision_specified)
  				/* Remove trailing zeroes, but keep the one
  				 * just after a dot. */
! 				while (p > tmp + 2 && *p == '0' && p[-1] != '.')
  				{
! 				    STRMOVE(p, p + 1);
! 				    --p;
  				    --str_arg_l;
  				}
  			}
  			else
  			{
! 			    char *p;
  
  			    /* Be consistent: some printf("%e") use 1.0e+12
  			     * and some 1.0e+012.  Remove one zero in the last
  			     * case. */
! 			    p = (char *)vim_strchr((char_u *)tmp,
  						 fmt_spec == 'e' ? 'e' : 'E');
! 			    if (p != NULL && (p[1] == '+' || p[1] == '-')
! 					  && p[2] == '0'
! 					  && vim_isdigit(p[3])
! 					  && vim_isdigit(p[4]))
  			    {
! 				STRMOVE(p + 2, p + 3);
  				--str_arg_l;
  			    }
  			}
--- 4585,4646 ----
  			if (remove_trailing_zeroes)
  			{
  			    int i;
! 			    char *tp;
  
  			    /* Using %g or %G: remove superfluous zeroes. */
  			    if (fmt_spec == 'f')
! 				tp = tmp + str_arg_l - 1;
  			    else
  			    {
! 				tp = (char *)vim_strchr((char_u *)tmp,
  						 fmt_spec == 'e' ? 'e' : 'E');
! 				if (tp != NULL)
  				{
  				    /* Remove superfluous '+' and leading
  				     * zeroes from the exponent. */
! 				    if (tp[1] == '+')
  				    {
  					/* Change "1.0e+07" to "1.0e07" */
! 					STRMOVE(tp + 1, tp + 2);
  					--str_arg_l;
  				    }
! 				    i = (tp[1] == '-') ? 2 : 1;
! 				    while (tp[i] == '0')
  				    {
  					/* Change "1.0e07" to "1.0e7" */
! 					STRMOVE(tp + i, tp + i + 1);
  					--str_arg_l;
  				    }
! 				    --tp;
  				}
  			    }
  
! 			    if (tp != NULL && !precision_specified)
  				/* Remove trailing zeroes, but keep the one
  				 * just after a dot. */
! 				while (tp > tmp + 2 && *tp == '0'
! 							     && tp[-1] != '.')
  				{
! 				    STRMOVE(tp, tp + 1);
! 				    --tp;
  				    --str_arg_l;
  				}
  			}
  			else
  			{
! 			    char *tp;
  
  			    /* Be consistent: some printf("%e") use 1.0e+12
  			     * and some 1.0e+012.  Remove one zero in the last
  			     * case. */
! 			    tp = (char *)vim_strchr((char_u *)tmp,
  						 fmt_spec == 'e' ? 'e' : 'E');
! 			    if (tp != NULL && (tp[1] == '+' || tp[1] == '-')
! 					  && tp[2] == '0'
! 					  && vim_isdigit(tp[3])
! 					  && vim_isdigit(tp[4]))
  			    {
! 				STRMOVE(tp + 2, tp + 3);
  				--str_arg_l;
  			    }
  			}
*** ../vim-7.2.054/src/netbeans.c	Sat Nov 15 14:10:23 2008
--- src/netbeans.c	Fri Nov 28 18:51:43 2008
***************
*** 1043,1049 ****
  	nbdebug(("EVT: %s", buf));
  /*	nb_send(buf, "netbeans_end");    avoid "write failed" messages */
  	if (sd >= 0)
! 	    sock_write(sd, buf, (int)STRLEN(buf));  /* ignore errors */
      }
  }
  
--- 1043,1049 ----
  	nbdebug(("EVT: %s", buf));
  /*	nb_send(buf, "netbeans_end");    avoid "write failed" messages */
  	if (sd >= 0)
! 	    ignored = sock_write(sd, buf, (int)STRLEN(buf));
      }
  }
  
***************
*** 2277,2285 ****
  	    int serNum;
  	    int localTypeNum;
  	    int typeNum;
- # ifdef NBDEBUG
- 	    int len;
- # endif
  	    pos_T *pos;
  
  	    if (buf == NULL || buf->bufp == NULL)
--- 2277,2282 ----
***************
*** 2303,2315 ****
  	    pos = get_off_or_lnum(buf->bufp, &args);
  
  	    cp = (char *)args;
! # ifdef NBDEBUG
! 	    len =
! # endif
! 		strtol(cp, &cp, 10);
  	    args = (char_u *)cp;
  # ifdef NBDEBUG
! 	    if (len != -1)
  	    {
  		nbdebug(("    partial line annotation -- Not Yet Implemented!\n"));
  	    }
--- 2300,2309 ----
  	    pos = get_off_or_lnum(buf->bufp, &args);
  
  	    cp = (char *)args;
! 	    ignored = (int)strtol(cp, &cp, 10);
  	    args = (char_u *)cp;
  # ifdef NBDEBUG
! 	    if (ignored != -1)
  	    {
  		nbdebug(("    partial line annotation -- Not Yet Implemented!\n"));
  	    }
*** ../vim-7.2.054/src/option.c	Sun Nov  9 13:43:25 2008
--- src/option.c	Fri Nov 28 12:27:34 2008
***************
*** 8232,8244 ****
  	    {
  		if (number == 0 && string != NULL)
  		{
! 		    int index;
  
  		    /* Either we are given a string or we are setting option
  		     * to zero. */
! 		    for (index = 0; string[index] == '0'; ++index)
  			;
! 		    if (string[index] != NUL || index == 0)
  		    {
  			/* There's another character after zeros or the string
  			 * is empty.  In both cases, we are trying to set a
--- 8232,8244 ----
  	    {
  		if (number == 0 && string != NULL)
  		{
! 		    int idx;
  
  		    /* Either we are given a string or we are setting option
  		     * to zero. */
! 		    for (idx = 0; string[idx] == '0'; ++idx)
  			;
! 		    if (string[idx] != NUL || idx == 0)
  		    {
  			/* There's another character after zeros or the string
  			 * is empty.  In both cases, we are trying to set a
*** ../vim-7.2.054/src/os_unix.c	Wed Nov 12 14:09:38 2008
--- src/os_unix.c	Fri Nov 28 18:39:55 2008
***************
*** 315,326 ****
      {-1,	    "Unknown!", FALSE}
  };
  
      void
  mch_write(s, len)
      char_u	*s;
      int		len;
  {
!     write(1, (char *)s, len);
      if (p_wd)		/* Unix is too fast, slow down a bit more */
  	RealWaitForChar(read_cmd_fd, p_wd, NULL);
  }
--- 315,329 ----
      {-1,	    "Unknown!", FALSE}
  };
  
+ /*
+  * Write s[len] to the screen.
+  */
      void
  mch_write(s, len)
      char_u	*s;
      int		len;
  {
!     ignored = (int)write(1, (char *)s, len);
      if (p_wd)		/* Unix is too fast, slow down a bit more */
  	RealWaitForChar(read_cmd_fd, p_wd, NULL);
  }
***************
*** 3927,3935 ****
  		 */
  		if (fd >= 0)
  		{
! 		    dup(fd); /* To replace stdin  (file descriptor 0) */
! 		    dup(fd); /* To replace stdout (file descriptor 1) */
! 		    dup(fd); /* To replace stderr (file descriptor 2) */
  
  		    /* Don't need this now that we've duplicated it */
  		    close(fd);
--- 3930,3938 ----
  		 */
  		if (fd >= 0)
  		{
! 		    ignored = dup(fd); /* To replace stdin  (fd 0) */
! 		    ignored = dup(fd); /* To replace stdout (fd 1) */
! 		    ignored = dup(fd); /* To replace stderr (fd 2) */
  
  		    /* Don't need this now that we've duplicated it */
  		    close(fd);
***************
*** 3997,4009 ****
  
  		    /* set up stdin/stdout/stderr for the child */
  		    close(0);
! 		    dup(pty_slave_fd);
  		    close(1);
! 		    dup(pty_slave_fd);
  		    if (gui.in_use)
  		    {
  			close(2);
! 			dup(pty_slave_fd);
  		    }
  
  		    close(pty_slave_fd);    /* has been dupped, close it now */
--- 4000,4012 ----
  
  		    /* set up stdin/stdout/stderr for the child */
  		    close(0);
! 		    ignored = dup(pty_slave_fd);
  		    close(1);
! 		    ignored = dup(pty_slave_fd);
  		    if (gui.in_use)
  		    {
  			close(2);
! 			ignored = dup(pty_slave_fd);
  		    }
  
  		    close(pty_slave_fd);    /* has been dupped, close it now */
***************
*** 4014,4026 ****
  		    /* set up stdin for the child */
  		    close(fd_toshell[1]);
  		    close(0);
! 		    dup(fd_toshell[0]);
  		    close(fd_toshell[0]);
  
  		    /* set up stdout for the child */
  		    close(fd_fromshell[0]);
  		    close(1);
! 		    dup(fd_fromshell[1]);
  		    close(fd_fromshell[1]);
  
  # ifdef FEAT_GUI
--- 4017,4029 ----
  		    /* set up stdin for the child */
  		    close(fd_toshell[1]);
  		    close(0);
! 		    ignored = dup(fd_toshell[0]);
  		    close(fd_toshell[0]);
  
  		    /* set up stdout for the child */
  		    close(fd_fromshell[0]);
  		    close(1);
! 		    ignored = dup(fd_fromshell[1]);
  		    close(fd_fromshell[1]);
  
  # ifdef FEAT_GUI
***************
*** 4028,4034 ****
  		    {
  			/* set up stderr for the child */
  			close(2);
! 			dup(1);
  		    }
  # endif
  		}
--- 4031,4037 ----
  		    {
  			/* set up stderr for the child */
  			close(2);
! 			ignored = dup(1);
  		    }
  # endif
  		}
***************
*** 4159,4165 ****
  					    && (lnum !=
  						    curbuf->b_ml.ml_line_count
  						    || curbuf->b_p_eol)))
! 				    write(toshell_fd, "\n", (size_t)1);
  				++lnum;
  				if (lnum > curbuf->b_op_end.lnum)
  				{
--- 4162,4169 ----
  					    && (lnum !=
  						    curbuf->b_ml.ml_line_count
  						    || curbuf->b_p_eol)))
! 				    ignored = write(toshell_fd, "\n",
! 								   (size_t)1);
  				++lnum;
  				if (lnum > curbuf->b_op_end.lnum)
  				{
*** ../vim-7.2.054/src/spell.c	Fri Nov 28 10:08:05 2008
--- src/spell.c	Fri Nov 28 12:28:24 2008
***************
*** 4950,4956 ****
  static void put_sugtime __ARGS((spellinfo_T *spin, FILE *fd));
  static int write_vim_spell __ARGS((spellinfo_T *spin, char_u *fname));
  static void clear_node __ARGS((wordnode_T *node));
! static int put_node __ARGS((FILE *fd, wordnode_T *node, int index, int regionmask, int prefixtree));
  static void spell_make_sugfile __ARGS((spellinfo_T *spin, char_u *wfname));
  static int sug_filltree __ARGS((spellinfo_T *spin, slang_T *slang));
  static int sug_maketable __ARGS((spellinfo_T *spin));
--- 4950,4956 ----
  static void put_sugtime __ARGS((spellinfo_T *spin, FILE *fd));
  static int write_vim_spell __ARGS((spellinfo_T *spin, char_u *fname));
  static void clear_node __ARGS((wordnode_T *node));
! static int put_node __ARGS((FILE *fd, wordnode_T *node, int idx, int regionmask, int prefixtree));
  static void spell_make_sugfile __ARGS((spellinfo_T *spin, char_u *wfname));
  static int sug_filltree __ARGS((spellinfo_T *spin, slang_T *slang));
  static int sug_maketable __ARGS((spellinfo_T *spin));
*** ../vim-7.2.054/src/ui.c	Sun Sep 14 15:57:54 2008
--- src/ui.c	Fri Nov 28 19:04:36 2008
***************
*** 1820,1826 ****
  #ifdef HAVE_DUP
  	    /* Use stderr for stdin, also works for shell commands. */
  	    close(0);
! 	    dup(2);
  #else
  	    read_cmd_fd = 2;	/* read from stderr instead of stdin */
  #endif
--- 1820,1826 ----
  #ifdef HAVE_DUP
  	    /* Use stderr for stdin, also works for shell commands. */
  	    close(0);
! 	    ignored = dup(2);
  #else
  	    read_cmd_fd = 2;	/* read from stderr instead of stdin */
  #endif
*** ../vim-7.2.054/src/window.c	Sat Nov 15 14:10:23 2008
--- src/window.c	Fri Nov 28 18:46:45 2008
***************
*** 4029,4042 ****
  	    if (mch_dirname(cwd, MAXPATHL) == OK)
  		globaldir = vim_strsave(cwd);
  	}
! 	mch_chdir((char *)curwin->w_localdir);
! 	shorten_fnames(TRUE);
      }
      else if (globaldir != NULL)
      {
  	/* Window doesn't have a local directory and we are not in the global
  	 * directory: Change to the global directory. */
! 	mch_chdir((char *)globaldir);
  	vim_free(globaldir);
  	globaldir = NULL;
  	shorten_fnames(TRUE);
--- 4029,4042 ----
  	    if (mch_dirname(cwd, MAXPATHL) == OK)
  		globaldir = vim_strsave(cwd);
  	}
! 	if (mch_chdir((char *)curwin->w_localdir) == 0)
! 	    shorten_fnames(TRUE);
      }
      else if (globaldir != NULL)
      {
  	/* Window doesn't have a local directory and we are not in the global
  	 * directory: Change to the global directory. */
! 	ignored = mch_chdir((char *)globaldir);
  	vim_free(globaldir);
  	globaldir = NULL;
  	shorten_fnames(TRUE);
*** ../vim-7.2.054/src/version.c	Fri Nov 28 12:05:07 2008
--- src/version.c	Fri Nov 28 21:12:42 2008
***************
*** 678,679 ****
--- 678,681 ----
  {   /* Add new patch number below this line */
+ /**/
+     55,
  /**/

-- 
PRINCE:    He's come to rescue me, father.
LAUNCELOT: (embarrassed) Well, let's not jump to conclusions ...
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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    ///