]>
Commit | Line | Data |
---|---|---|
d02ad552 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.161 (extra) | |
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 6.2.161 (extra) | |
11 | Problem: VMS: Missing header file. Reading input busy loops. | |
12 | Solution: Include termdef.h. Avoid the use of a wait function in | |
13 | vms_read(). (Frank Ries) | |
14 | Files: src/os_unix.h, src/os_vms.c | |
15 | ||
16 | ||
17 | *** ../vim-6.2.160/src/os_unix.h Mon Jan 20 21:14:13 2003 | |
18 | --- src/os_unix.h Mon Nov 10 10:53:44 2003 | |
19 | *************** | |
20 | *** 218,223 **** | |
21 | --- 218,224 ---- | |
22 | #include <tt2def.h> | |
23 | #include <jpidef.h> | |
24 | #include <rms.h> | |
25 | + #include <trmdef.h> | |
26 | #include <string.h> | |
27 | #include <starlet.h> | |
28 | #include <socket.h> | |
29 | *** ../vim-6.2.160/src/os_vms.c Wed Oct 29 14:40:27 2003 | |
30 | --- src/os_vms.c Tue Dec 23 14:30:31 2003 | |
31 | *************** | |
32 | *** 53,62 **** | |
33 | static short iochan; /* TTY I/O channel */ | |
34 | static short iosb[4]; /* IO status block */ | |
35 | ||
36 | ! int vms_match_num = 0; | |
37 | ! int vms_match_alloced = 0; | |
38 | ! int vms_match_free = 0; | |
39 | ! char_u **vms_fmatch = NULL; | |
40 | static char *Fspec_Rms; /* rms file spec, passed implicitly between routines */ | |
41 | ||
42 | ||
43 | --- 53,61 ---- | |
44 | static short iochan; /* TTY I/O channel */ | |
45 | static short iosb[4]; /* IO status block */ | |
46 | ||
47 | ! static int vms_match_num = 0; | |
48 | ! static int vms_match_free = 0; | |
49 | ! static char_u **vms_fmatch = NULL; | |
50 | static char *Fspec_Rms; /* rms file spec, passed implicitly between routines */ | |
51 | ||
52 | ||
53 | *************** | |
54 | *** 145,151 **** | |
55 | return; | |
56 | } | |
57 | ||
58 | ! static TT_MODE | |
59 | get_tty(void) | |
60 | { | |
61 | ||
62 | --- 144,150 ---- | |
63 | return; | |
64 | } | |
65 | ||
66 | ! static TT_MODE | |
67 | get_tty(void) | |
68 | { | |
69 | ||
70 | *************** | |
71 | *** 299,322 **** | |
72 | int | |
73 | vms_read(char *inbuf, size_t nbytes) | |
74 | { | |
75 | ! int status, function, len; | |
76 | ! float wait = 0.05; | |
77 | ! TT_MODE tt_mode; | |
78 | ||
79 | /* whatever happened earlier we need an iochan here */ | |
80 | if (!iochan) | |
81 | ! tt_mode = get_tty(); | |
82 | ||
83 | ! function = (IO$_READLBLK | IO$M_NOECHO | IO$M_TIMED | IO$M_ESCAPE); | |
84 | memset(inbuf, 0, nbytes); | |
85 | ||
86 | while (1) | |
87 | { | |
88 | ! status = sys$qiow(0,iochan,function,&iosb,0,0,inbuf,nbytes-1,0,0,0,0); | |
89 | len = strlen(inbuf); | |
90 | if (len > 0) | |
91 | break; | |
92 | - lib$wait(&wait); | |
93 | } | |
94 | return len; | |
95 | } | |
96 | --- 298,327 ---- | |
97 | int | |
98 | vms_read(char *inbuf, size_t nbytes) | |
99 | { | |
100 | ! int status, function, len; | |
101 | ! TT_MODE tt_mode; | |
102 | ! ITEM itmlst[2]; | |
103 | ! static long trm_mask[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; | |
104 | ||
105 | /* whatever happened earlier we need an iochan here */ | |
106 | if (!iochan) | |
107 | ! tt_mode = get_tty(); | |
108 | ! | |
109 | ! vul_item(&itmlst[0], 0, TRM$_MODIFIERS, | |
110 | ! (char *)(TRM$M_TM_ESCAPE | TRM$M_TM_NOECHO | TRM$M_TM_NOEDIT | | |
111 | ! TRM$M_TM_NOFILTR | TRM$M_TM_NORECALL | TRM$M_TM_TRMNOECHO), 0); | |
112 | ! vul_item(&itmlst[1], sizeof(trm_mask), TRM$_TERM, (char *)&trm_mask, 0); | |
113 | ||
114 | ! function = (IO$_READLBLK | IO$M_EXTEND); | |
115 | memset(inbuf, 0, nbytes); | |
116 | ||
117 | while (1) | |
118 | { | |
119 | ! status = sys$qiow(0, iochan, function, &iosb, 0, 0, inbuf, nbytes - 1, | |
120 | ! 0, 0, &itmlst, sizeof(itmlst)); | |
121 | len = strlen(inbuf); | |
122 | if (len > 0) | |
123 | break; | |
124 | } | |
125 | return len; | |
126 | } | |
127 | *************** | |
128 | *** 328,338 **** | |
129 | * Returns: 1 - continue finding matches | |
130 | * 0 - stop trying to find any further mathces | |
131 | */ | |
132 | ! static int | |
133 | vms_wproc(char *name, int val) | |
134 | { | |
135 | int i; | |
136 | int nlen; | |
137 | ||
138 | if (val != DECC$K_FILE) /* Directories and foreing non VMS files are not counting */ | |
139 | return 1; | |
140 | --- 333,344 ---- | |
141 | * Returns: 1 - continue finding matches | |
142 | * 0 - stop trying to find any further mathces | |
143 | */ | |
144 | ! static int | |
145 | vms_wproc(char *name, int val) | |
146 | { | |
147 | int i; | |
148 | int nlen; | |
149 | + static int vms_match_alloced = 0; | |
150 | ||
151 | if (val != DECC$K_FILE) /* Directories and foreing non VMS files are not counting */ | |
152 | return 1; | |
153 | *** ../vim-6.2.160/src/version.c Mon Dec 29 20:32:43 2003 | |
154 | --- src/version.c Mon Dec 29 20:34:56 2003 | |
155 | *************** | |
156 | *** 639,640 **** | |
157 | --- 639,642 ---- | |
158 | { /* Add new patch number below this line */ | |
159 | + /**/ | |
160 | + 161, | |
161 | /**/ | |
162 | ||
163 | -- | |
164 | From "know your smileys": | |
165 | [:-) Frankenstein's monster | |
166 | ||
167 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
168 | /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ | |
169 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
170 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |