Home
last modified time | relevance | path

Searched refs:shf (Results 1 – 25 of 25) sorted by relevance

/openbsd/src/bin/ksh/
Dshf.c29 static int shf_fillbuf(struct shf *);
30 static int shf_emptybuf(struct shf *, int);
36 struct shf *
39 struct shf *shf; in shf_open() local
44 shf = alloc(sizeof(struct shf) + bsize, ATEMP); in shf_open()
45 shf->areap = ATEMP; in shf_open()
46 shf->buf = (unsigned char *) &shf[1]; in shf_open()
47 shf->bsize = bsize; in shf_open()
48 shf->flags = SHF_ALLOCS; in shf_open()
53 afree(shf, shf->areap); in shf_open()
[all …]
Dtree.c13 #define tputc(c, shf) shf_putchar(c, shf); argument
14 static void ptree(struct op *, int, struct shf *);
15 static void pioact(struct shf *, int, struct ioword *);
16 static void tputC(int, struct shf *);
17 static void tputS(char *, struct shf *);
18 static void vfptreef(struct shf *, int, const char *, va_list);
27 ptree(struct op *t, int indent, struct shf *shf) in ptree() argument
40 fptreef(shf, indent, "%S ", *w++); in ptree()
42 fptreef(shf, indent, "#no-vars# "); in ptree()
45 fptreef(shf, indent, "%S ", *w++); in ptree()
[all …]
Dshf.h12 #define shf_getc(shf) ((shf)->rnleft > 0 ? (shf)->rnleft--, *(shf)->rp++ : \ argument
13 shf_getchar(shf))
14 #define shf_putc(c, shf) ((shf)->wnleft == 0 ? shf_putchar((c), (shf)) : \ argument
15 ((shf)->wnleft--, *(shf)->wp++ = (c)))
16 #define shf_eof(shf) ((shf)->flags & SHF_EOF) argument
17 #define shf_error(shf) ((shf)->flags & SHF_ERROR) argument
18 #define shf_clearerr(shf) ((shf)->flags &= ~(SHF_EOF | SHF_ERROR)) argument
42 struct shf { struct
57 extern struct shf shf_iob[];
59 struct shf *shf_open(const char *, int, int, int);
[all …]
Dc_sh.c21 static void p_tv(struct shf *, int, struct timeval *, int, char *, char *);
22 static void p_ts(struct shf *, int, struct timespec *, int, char *, char *);
258 struct shf *shf; in c_read() local
298 shf = shf_reopen(fd, SHF_RD | SHF_INTERRUPT | can_seek(fd), shl_spare); in c_read()
332 c = shf_getc(shf); in c_read()
335 if (c == EOF && shf_error(shf) && in c_read()
336 shf->errno_ == EINTR) { in c_read()
345 shf_clearerr(shf); in c_read()
394 shf_flush(shf); in c_read()
401 shf_flush(shf); in c_read()
[all …]
Dmain.c353 s->u.shf = shf_open(s->file, O_RDONLY, 0, SHF_MAPHI|SHF_CLEXEC); in main()
354 if (s->u.shf == NULL) { in main()
363 s->u.shf = shf_fdopen(0, SHF_RD | can_seek(0), NULL); in main()
368 s->u.shf->flags |= SHF_INTERRUPT; in main()
474 struct shf *shf; in include() local
479 shf = shf_open(name, O_RDONLY, 0, SHF_MAPHI|SHF_CLEXEC); in include()
480 if (shf == NULL) in include()
493 quitenv(s ? s->u.shf : NULL); in include()
524 s->u.shf = shf; in include()
527 quitenv(s->u.shf); in include()
[all …]
Dhistory.c55 struct shf *shf; in c_fc() local
217 if (!(shf = tf->shf)) { in c_fc()
224 shf_fprintf(shf, "%s\n", *hp); in c_fc()
225 if (shf_close(shf) == EOF) { in c_fc()
249 if (!(shf = shf_open(tf->name, O_RDONLY, 0, 0))) { in c_fc()
254 n = fstat(shf->fd, &statb) == -1 ? 128 : in c_fc()
257 while ((n = shf_read(xp, Xnleft(xs, xp), shf)) > 0) { in c_fc()
264 tf->name, strerror(shf->errno_)); in c_fc()
265 shf_close(shf); in c_fc()
268 shf_close(shf); in c_fc()
Deval.c33 struct shf *shf;/* file */ member
549 if (x.u.shf == NULL) /* $(< ...) failed, fake EOF */ in expand()
555 while ((c = shf_getc(x.u.shf)) == 0 || c == '\n') in expand()
559 shf_ungetc(c, x.u.shf); in expand()
566 if (x.u.shf != NULL) in expand()
567 shf_close(x.u.shf); in expand()
571 subst_exstat = (x.u.shf == NULL); in expand()
889 struct shf *shf; in comsub() local
909 shf = shf_open(name = evalstr(io->name, DOTILDE), O_RDONLY, 0, in comsub()
911 if (shf == NULL) in comsub()
[all …]
Dlex.h18 struct shf *shf; /* shell file */ member
Dio.c166 static struct shf *kshdebug_shf;
229 struct shf shf_iob[3];
450 tp->shf = NULL; in maketemp()
455 tp->shf = shf_fdopen(fd, SHF_WR, NULL); in maketemp()
Djobs.c129 static struct shf *shl_j;
139 static void j_print(Job *, int, struct shf *);
1307 j_print(Job *j, int how, struct shf *shf) in j_print() argument
1323 shf_fprintf(shf, "%d\n", j->pgrp ? j->pgrp : in j_print()
1371 shf_fprintf(shf, "[%d] %c ", j->job, jobchar); in j_print()
1373 shf_fprintf(shf, "%s", filler); in j_print()
1377 shf_fprintf(shf, "%5d ", p->pid); in j_print()
1382 shf_fprintf(shf, "%s%s ", in j_print()
1387 shf_fprintf(shf, "%-20s %s%s%s", buf, p->command, in j_print()
1397 shf_fprintf(shf, "%s%5d %-20s %s%s", filler, p->pid, in j_print()
[all …]
Dexec.c1188 struct shf *volatile shf; in herein() local
1202 if (!(shf = h->shf) || (fd = open(h->name, O_RDONLY)) == -1) { in herein()
1204 !shf ? "create" : "open", in herein()
1206 if (shf) in herein()
1207 shf_close(shf); in herein()
1216 quitenv(shf); in herein()
1228 shf_puts(evalstr(yylval.cp, 0), shf); in herein()
1230 shf_puts(content, shf); in herein()
1234 if (shf_close(shf) == EOF) { in herein()
Dsh.h195 struct shf *shf; member
527 void quitenv(struct shf *);
551 void print_columns(struct shf *, int, char *(*)(void *, int, char *, int),
DMakefile9 misc.c path.c shf.c syn.c table.c trap.c tree.c tty.c var.c \
Dmisc.c1008 print_columns(struct shf *shf, int n, char *(*func) (void *, int, char *, int), in print_columns() argument
1045 shf_fprintf(shf, "%-*s", in print_columns()
1049 shf_fprintf(shf, "%*s", nspace, ""); in print_columns()
1052 shf_putchar('\n', shf); in print_columns()
Dtree.h139 void fptreef(struct shf *, int, const char *, ...);
Dlex.c1111 char *p = shf_getse(xp, Xnleft(s->xs, xp), s->u.shf); in getsc_line()
1113 if (!p && shf_error(s->u.shf) && in getsc_line()
1114 s->u.shf->errno_ == EINTR) { in getsc_line()
1115 shf_clearerr(s->u.shf); in getsc_line()
1134 shf_flush(s->u.shf); in getsc_line()
1149 shf_fdclose(s->u.shf); in getsc_line()
/openbsd/src/gnu/llvm/llvm/lib/Target/Mips/
DMSA.txt24 constant since shf.w covers exactly the same cases. shf.w is used
48 It is not possible to emit splati.w since shf.w covers the same cases.
49 shf.w will be emitted instead.
DMipsScheduleP5600.td337 // aver?_[us].[bhwd], shf.[bhw], fill[bhwd], splat?.[bhwd]
DMipsMSAInstrInfo.td2548 class SHF_B_DESC : MSA_I8_SHF_DESC_BASE<"shf.b", MSA128BOpnd>;
2549 class SHF_H_DESC : MSA_I8_SHF_DESC_BASE<"shf.h", MSA128HOpnd>;
2550 class SHF_W_DESC : MSA_I8_SHF_DESC_BASE<"shf.w", MSA128WOpnd>;
DMipsScheduleGeneric.td1465 // shf.[bhw], fill[bhwd], splat?.[bhwd]
/openbsd/src/distrib/special/ksh/
DMakefile6 misc.c path.c shf.c syn.c table.c trap.c tree.c tty.c var.c \
/openbsd/src/gnu/gcc/gcc/config/mcore/
Dmcore.c745 unsigned bit, shf, rot; in try_constant_tricks() local
808 shf = value; in try_constant_tricks()
829 if (shf & 1) in try_constant_tricks()
830 shf = 0; /* Can't use logical shift, low order bit is one. */ in try_constant_tricks()
832 shf >>= 1; in try_constant_tricks()
834 if (shf != 0 && const_ok_for_mcore (shf)) in try_constant_tricks()
837 *x = shf; in try_constant_tricks()
/openbsd/src/gnu/usr.bin/gcc/gcc/config/mcore/
Dmcore.c705 unsigned bit, shf, rot; local
768 shf = value;
789 if (shf & 1)
790 shf = 0; /* Can't use logical shift, low order bit is one. */
792 shf >>= 1;
794 if (shf != 0 && const_ok_for_mcore (shf))
797 *x = shf;
/openbsd/src/gnu/llvm/llvm/lib/Target/NVPTX/
DNVPTXInstrInfo.td1444 // Rotate: Use ptx shf instruction if available.
1449 // r2 = shf.l r1, r1, n
1452 "shf.l.wrap.b32 \t$dst, $src, $src, $amt;",
1458 "shf.l.wrap.b32 \t$dst, $src, $src, $amt;",
1464 // r2 = shf.r r1, r1, n
1467 "shf.r.wrap.b32 \t$dst, $src, $src, $amt;",
1473 "shf.r.wrap.b32 \t$dst, $src, $src, $amt;",
1592 "shf.l.clamp.b32 \t$dst, $lo, $hi, $amt;",
1599 "shf.r.clamp.b32 \t$dst, $lo, $hi, $amt;",
DNVPTXIntrinsics.td2553 "shf.l.wrap.b32 \t$dst, $src, $src, $amt;",
2561 "shf.l.wrap.b32 \t$dst, $src, $src, $amt;",
2606 "shf.l.wrap.b32 \t$dst, $lo, $hi, $amt;",[]>,
2612 "shf.l.wrap.b32 \t$dst, $lo, $hi, $amt;",[]>,
2618 "shf.r.wrap.b32 \t$dst, $lo, $hi, $amt;",[]>,
2624 "shf.r.wrap.b32 \t$dst, $lo, $hi, $amt;",[]>,