/src/bin/ksh/ |
shf.h | 1 /* $NetBSD: shf.h,v 1.3 1999/10/20 15:10:00 hubertf Exp $ */ 9 /* $Id: shf.h,v 1.3 1999/10/20 15:10:00 hubertf Exp $ */ 13 #define shf_fileno(shf) ((shf)->fd) 14 #define shf_setfileno(shf,nfd) ((shf)->fd = (nfd)) 15 #define shf_getc(shf) ((shf)->rnleft > 0 ? (shf)->rnleft--, *(shf)->rp++ : 46 struct shf { struct [all...] |
tree.c | 17 #define tputc(c, shf) shf_putchar(c, shf); 18 static void ptree ARGS((struct op *t, int indent, struct shf *f)); 19 static void pioact ARGS((struct shf *f, int indent, struct ioword *iop)); 20 static void tputC ARGS((int c, struct shf *shf)); 21 static void tputS ARGS((char *wp, struct shf *shf)); 22 static void vfptreef ARGS((struct shf *shf, int indent, const char *fmt, va_list va)) 394 struct shf shf; local in function:snptreef 600 struct shf shf; local in function:wdstrip [all...] |
main.c | 298 s->u.shf = shf_open(s->file, O_RDONLY, 0, SHF_MAPHI|SHF_CLEXEC); 299 if (s->u.shf == NULL) { 308 s->u.shf = shf_fdopen(0, SHF_RD | can_seek(0), 309 (struct shf *) 0); 314 s->u.shf->flags |= SHF_INTERRUPT; 425 struct shf *shf; local in function:include 430 shf = shf_open(name, O_RDONLY, 0, SHF_MAPHI|SHF_CLEXEC); 431 if (shf == NULL) 445 shf_close(s->u.shf); [all...] |
c_sh.c | 254 struct shf *shf; local in function:c_read 297 shf = shf_reopen(fd, SHF_RD | SHF_INTERRUPT | can_seek(fd), shl_spare); 333 c = shf_getc(shf); 337 if (c == EOF && shf_error(shf) 338 && shf_errno(shf) == EINTR) 348 shf_clearerr(shf); 397 shf_flush(shf); 404 shf_flush(shf); 409 shf_flush(shf); [all...] |
shf.c | 1 /* $NetBSD: shf.c,v 1.16 2024/02/05 21:20:09 andvar Exp $ */ 9 __RCSID("$NetBSD: shf.c,v 1.16 2024/02/05 21:20:09 andvar Exp $"); 28 static int shf_fillbuf ARGS((struct shf *shf)); 29 static int shf_emptybuf ARGS((struct shf *shf, int flags)); 35 struct shf * 42 struct shf *shf; local in function:shf_open 47 shf = (struct shf *) alloc(sizeof(struct shf) + bsize, ATEMP) 776 struct shf shf; local in function:shf_snprintf 795 struct shf shf; local in function:shf_smprintf [all...] |
exec.c | 1262 struct shf *volatile shf; local in function:herein 1276 if (!(shf = h->shf) || (fd = open(h->name, O_RDONLY, 0)) < 0) { 1278 !shf ? "create" : "open", 1280 if (shf) 1281 shf_close(shf); 1291 shf_close(shf); /* after quitenv */ 1303 shf_puts(evalstr(yylval.cp, 0), shf); 1305 shf_puts(content, shf); [all...] |
lex.c | 1031 char *p = shf_getse(xp, Xnleft(s->xs, xp), s->u.shf); 1033 if (!p && shf_error(s->u.shf) 1034 && shf_errno(s->u.shf) == EINTR) 1036 shf_clearerr(s->u.shf); 1052 * todo: reduce size of shf buffer (~128?) if SSTDIN 1055 shf_flush(s->u.shf); 1073 shf_fdclose(s->u.shf); 1114 struct shf *shf; local in function:set_prompt 1119 shf = shf_sopen((char *) 0, strlen(ps1) * 2 [all...] |
lex.h | 18 struct shf *shf; /* shell file */ member in union:source::__anon022314e9010a
|
history.c | 82 struct shf *shf; local in function:c_fc 236 if (!(shf = tf->shf)) { 243 shf_fprintf(shf, "%s\n", *hp); 244 if (shf_close(shf) == EOF) { 269 if (!(shf = shf_open(tf->name, O_RDONLY, 0, 0))) { 274 n = fstat(shf_fileno(shf), &statb) < 0 ? 128 277 while ((n = shf_read(xp, Xnleft(xs, xp), shf)) > 0) { 284 tf->name, strerror(shf_errno(shf))); [all...] |
eval.c | 32 struct shf *shf;/* file */ member in union:Expand::__anon37599a23010a 530 while ((c = shf_getc(x.u.shf)) == 0 || c == '\n') 534 shf_ungetc(c, x.u.shf); 541 shf_close(x.u.shf); 854 struct shf *shf; local in function:comsub 874 shf = shf_open(name = evalstr(io->name, DOTILDE), O_RDONLY, 0, 876 if (shf == NULL) 882 shf = shf_fdopen(pv[0], SHF_RD, (struct shf *) 0) [all...] |
sh.h | 340 struct shf *shf; member in struct:temp 521 #include "shf.h"
|