Lines Matching full:this

6  * This file is a part of GNU VMSLIB, the GNU library for porting GNU
39 /* This won't work with GCC, but it won't cause any problems either. */
101 struct PIPE *this; local
104 this = phead;
105 while (this)
107 if (this->self != this)
112 if (!this->iosb.status)
114 fflush (this->file);
115 if (this->mode == O_WRONLY)
116 sys$qio (0, this->chan, IO$_WRITEOF, &iosb,
118 fclose (this->file);
119 sys$synch (evf, &this->iosb);
122 fclose(this->file);
123 sys$dassgn (this->chan);
124 this = this->next;
142 struct PIPE *this = phead; local
144 while (this && this->self == this && this->file != stream)
145 this = this->next;
148 if (!this)
150 else if (this->self != this)
154 if (!this->iosb.status)
156 fflush (this->file);
157 if (this->mode == O_WRONLY)
158 sys$qio (0, this->chan, IO$_WRITEOF, &iosb,
160 fclose (this->file);
161 sys$synch (evf, &this->iosb);
164 fclose (this->file);
165 sys$dassgn (this->chan);
167 /* Remove `this' from the list of pipes and free its storage */
168 if (this == ptail)
169 ptail = this->prev;
170 if (this == phead)
171 phead = this->next;
172 if (this->prev)
173 this->prev->next = this->next;
174 if (this->next)
175 this->next->prev = this->prev;
176 free (this);
178 if (this->status & STS$M_SUCCESS != STS$M_SUCCESS)
179 return this->status;
191 pdone (this) in pdone() argument
192 struct PIPE *this; in pdone()
196 if (this->self != this)
198 this->iosb.status = 1;
199 this->pid = 0;
200 if (this->has_jmpbuf)
202 this->has_jmpbuf = 0;
203 longjmp (this->jmpbuf, 1);
212 struct PIPE *this = phead; local
214 while (this)
215 if (fileno (this->file) == fd)
217 memcpy (this->jmpbuf, jmpbuf, sizeof (jmp_buf));
218 this->has_jmpbuf = 1;
219 if (this->pid == 0)
221 this->has_jmpbuf = 0;
222 longjmp (this->jmpbuf, 1);
227 this = this->next;
234 struct PIPE *this = phead; local
236 while (this)
237 if (fileno (this->file) == fd)
239 this->has_jmpbuf = 0;
243 this = this->next;
284 struct PIPE *this; local
287 this = (struct PIPE *) calloc (1, sizeof(struct PIPE));
288 if (!this)
295 this->self = this;
303 free (this);
311 status = sys$crembx (0, &this->chan, mbxsize, mbxsize, 0, 0, 0, 0);
316 free (this);
322 status = sys$getdviw (0, this->chan, 0, &mbxlist, &iosb, 0, 0, 0);
327 sys$dassgn (this->chan);
328 free (this);
347 status = lib$spawn (&cmddsc, &mbxdsc, 0, &flags, 0, &this->pid,
348 &this->status, &evf, &pdone, this->self);
349 this->mode = O_WRONLY;
353 status = lib$spawn (&cmddsc, 0, &mbxdsc, &flags, 0, &this->pid,
354 &this->status, &evf, &pdone, this->self);
355 this->mode = O_RDONLY;
361 sys$dassgn (this->chan);
362 free (this);
375 sys$dassgn (this->chan);
376 sys$delprc (&this->pid, 0);
377 free (this);
385 if (this->mode == O_WRONLY)
386 this->file = fopen (mbxname.body, "wb");
388 this->file = fopen (mbxname.body, "rb");
391 if (!this->file)
393 sys$dassgn (this->chan);
394 sys$delprc (this->pid);
395 free (this);
400 this->has_jmpbuf = 0;
405 ptail->next = this;
406 this->prev = ptail;
407 ptail = this;
410 phead = ptail = this;
412 return (this->file);