Searched defs:sp (Results 1 - 25 of 335) sorted by relevance

1234567891011>>

/ast/src/lib/libcodex/
H A Dcodexdata.c31 codexdata(Sfio_t* sp, Codexdata_t* data) argument
33 return sfraise(sp, CODEX_DATA, data);
H A Dcodexsize.c31 codexsize(Sfio_t* sp, Sfoff_t size) argument
33 return sfraise(sp, CODEX_SIZE, &size);
/ast/src/lib/libcoshell/
H A Dcostash.c33 costash(Sfio_t* sp) argument
37 if (!(s = sfstruse(sp)))
H A Dcoquote.c25 * single quote s into sp
32 coquote(register Sfio_t* sp, register const char* s, int type) argument
40 sfputc(sp, c);
43 sfputc(sp, '\\');
44 sfputc(sp, '\'');
45 sfputc(sp, '\'');
56 sfprintf(sp, "'$%s'", CO_ENV_TYPE);
/ast/src/lib/libexpr/
H A Dexstash.c35 exstash(Sfio_t* sp, Vmalloc_t* vp) argument
39 return ((s = sfstruse(sp)) && (!vp || (s = vmstrdup(vp, s)))) ? s : exnospace();
H A Dexerror.c37 Sfio_t* sp; local
39 if (expr.program->disc->errorf && !expr.program->errors && (sp = sfstropen()))
47 sfputr(sp, buf, -1);
49 sfvprintf(sp, format, ap);
51 if (!(s = sfstruse(sp)))
54 sfclose(sp);
/ast/src/lib/libpp/
H A Dppprintf.c34 Sfio_t* sp; local
36 if (!(sp = sfnew(NiL, pp.outp, MAXTOKEN, -1, SF_WRITE|SF_STRING)))
39 sfvprintf(sp, format, ap);
41 pp.outp += sfseek(sp, 0L, SEEK_CUR);
43 sfclose(sp);
H A Dppincref.c34 register struct ppinstk* sp; local
42 for (sp = pp.in; sp; sp = sp->prev)
43 if (sp->type == IN_FILE)
/ast/src/cmd/dsslib/ip_t/
H A Dptdump.c26 * dump table a on sp
30 ptdump(Pt_t* a, Sfio_t* sp) argument
35 sfprintf(sp, "%0*I*x %0*I*x %-16s %-16s\n", sizeof(p->min) * 2, sizeof(p->min), p->min, sizeof(p->max) * 2, sizeof(p->max), p->max, fmtip4(p->min, -1), fmtip4(p->max, -1));
36 return sfsync(sp);
H A Dptprint.c26 * print table a in normal form on sp
30 ptprint(Pt_t* a, Sfio_t* sp) argument
32 PTSCAN(a, x, b, m, sfprintf(sp, "%s\n", fmtip4(x, b)));
33 return sfsync(sp);
H A Dptvdump.c26 * dump table a on sp
30 ptvdump(Ptv_t* a, Sfio_t* sp) argument
35 sfprintf(sp, "%s %s %-24s %-24s\n", fmtfv(a->size, p->min, 16, 0, 0), fmtfv(a->size, p->max, 16, 0, 0), fmtip6(p->min, -1), fmtip6(p->max, -1));
36 return sfsync(sp);
H A Dptvprint.c26 * print table a in normal form on sp
30 ptvprint(Ptv_t* a, Sfio_t* sp) argument
32 PTVSCAN(a, b, sfprintf(sp, "%s\n", fmtip6(a->r[0], b)));
33 return sfsync(sp);
/ast/src/cmd/3d/
H A Dchdir3d.c29 register char* sp; local
51 if (!(sp = pathreal(path, P_SAFE, NiL)))
53 if (CHDIR(sp))
65 sp = buf + state.pwdsize;
66 *sp++ = '/';
69 sp = buf;
70 strcpy(sp, path);
74 if ((sp = pathcanon(buf, sizeof(buf), 0)) && *(sp - 1) == '.' && *(sp
[all...]
H A Dstatvfs3d.c31 register char* sp; local
39 if (!(sp = pathreal(path, 0, NiL)))
41 if (STATVFS(sp, fs))
H A Daccess3d.c29 register char* sp; local
37 sp = 0;
41 if (!(sp = pathreal(path, 0, &st)))
57 if (state.path.level && (st.st_mode&(S_IWUSR|S_IWGRP|S_IWOTH)) && !ACCESS(sp, R_OK))
66 if (sp)
68 return(ACCESS(sp, mode));
H A Dchown3d.c31 register char* sp; local
41 if (!(sp = pathreal(path, P_SAFE|P_TOP, NiL)))
43 r = CHOWN(sp, uid, gid);
H A Dpathconf3d.c31 register char* sp; local
41 if (!(sp = pathreal(path, 0, NiL)))
45 r = PATHCONF(sp, op);
51 fscall(mp, MSG_pathconf, 0, sp, op);
54 fscall(mp, MSG_pathconf, 0, sp, op);
H A Dunlink3d.c29 register char* sp; local
38 if (!(sp = pathreal(path, P_PATHONLY|P_SAFE, NiL)))
42 if (!(r = LSTAT(sp, &state.path.st)))
44 if (S_ISLNK(state.path.st.st_mode) && !checklink(sp, &state.path.st, P_PATHONLY|P_LSTAT) && state.path.linksize > 0)
50 r = strlen(sp) - (sizeof(state.vdefault) - 1);
51 if (r > 3 && streq(sp + r, state.vdefault))
54 r = UNLINK(sp);
/ast/src/lib/libast/stdio/
H A Dgetline.c31 getline(char** sp, size_t* np, Sfio_t* f) argument
33 STDIO_INT(f, "getline", ssize_t, (char**, size_t*, Sfio_t*), (sp, np, f))
35 return getdelim(sp, np, '\n', f);
/ast/src/lib/libast/hash/
H A Dhashview.c47 register Hash_bucket_t** sp; local
61 sp = &top->table[0];
62 while (sp < sx)
63 for (b = *sp++; b; b = b->next)
76 sp = &top->table[0];
77 while (sp < sx)
78 for (b = *sp++; b; b = b->next)
/ast/src/lib/libast/misc/
H A Doptesc.c27 * escape optget() special chars in s and write to sp
35 optesc(Sfio_t* sp, register const char* s, int esc) argument
45 sfprintf(sp, "%-.*s", c - 4, s + 3);
58 sfputc(sp, '\b');
59 sfwrite(sp, m, s - m);
60 sfputc(sp, '\b');
61 sfwrite(sp, s, 3);
65 sfwrite(sp, m, s - m);
78 sfputc(sp, '\b');
79 sfwrite(sp,
[all...]
/ast/src/lib/librecsort/
H A Drsfile.c24 * announce sp open for write on path
28 int rsfilewrite(Rs_t* rs, Sfio_t* sp, const char* path) argument
30 int rsfilewrite(rs, sp, path)
32 Sfio_t* sp;
36 if ((rs->events & RS_FILE_WRITE) && rsnotify(rs, RS_FILE_WRITE, sp, (Void_t*)path, rs->disc) < 0)
42 * announce sp open for read on path
46 int rsfileread(Rs_t* rs, Sfio_t* sp, const char* path) argument
48 int rsfileread(rs, sp, path)
50 Sfio_t* sp;
54 if ((rs->events & RS_FILE_READ) && rsnotify(rs, RS_FILE_READ, sp, (Void_
64 rsfileclose(Rs_t* rs, Sfio_t* sp) argument
[all...]
H A Drskeydump.c31 dump(register Rskey_t* kp, Sfio_t* sp, register Rskeyfield_t* fp, const char* type) argument
33 dump(kp, sp, fp, type)
35 Sfio_t* sp;
40 sfprintf(sp, "%s[%d]\n", type, fp->index);
41 sfprintf(sp, "\tbegin field = %d\n", fp->begin.field);
42 sfprintf(sp, "\t begin char = %d\n", fp->begin.index);
43 sfprintf(sp, "\t end field = %d\n", fp->end.field);
44 sfprintf(sp, "\t end char = %d\n", fp->end.index);
45 sfprintf(sp, "\t ccode = %d\n", fp->code);
46 sfprintf(sp, "\
61 rskeydump(register Rskey_t* kp, register Sfio_t* sp) argument
[all...]
/ast/src/cmd/pax/
H A Dnocom.c57 register Sfio_t* sp; local
84 if (!(sp = sfopen(NiL, s, "r")))
88 if (nocomment(sp, sfstdout) < 0)
90 sfclose(sp);
/ast/src/lib/libcs/
H A Dcsinfo.c35 Sfio_t* sp = 0; local
42 if (strmatch(file, "*[ \t\n=]*")) sp = tokline(file, SF_STRING, line);
43 else if (!strchr(file, '/') || stat(file, &st) || S_ISDIR(st.st_mode) || !(sp = tokline(file, SF_READ, line)))
49 sp = tokline(buf, SF_READ, line);
53 if (!sp) messagef((state->id, NiL, -1, "info: %s: not found", file));
54 return sp;

Completed in 43 milliseconds

1234567891011>>