Searched refs:off (Results 1 - 25 of 47) sorted by relevance

12

/ast/src/lib/libast/stdio/
H A Dfseek.c31 fseek(Sfio_t* f, long off, int op) argument
33 STDIO_INT(f, "fseek", int, (Sfio_t*, long, int), (f, off, op))
35 return sfseek(f, (Sfoff_t)off, op|SF_SHARE) >= 0 ? 0 : -1;
41 fseek64(Sfio_t* f, int64_t off, int op) argument
43 STDIO_INT(f, "fseek64", int, (Sfio_t*, int64_t, int), (f, off, op))
45 return sfseek(f, (Sfoff_t)off, op|SF_SHARE) >= 0 ? 0 : -1;
H A Dfseeko.c31 fseeko(Sfio_t* f, off_t off, int op) argument
33 STDIO_INT(f, "fseeko", int, (Sfio_t*, off_t, int), (f, off, op))
35 return sfseek(f, (Sfoff_t)off, op|SF_SHARE) >= 0 ? 0 : -1;
41 fseeko64(Sfio_t* f, int64_t off, int op) argument
43 STDIO_INT(f, "fseeko64", int, (Sfio_t*, int64_t, int), (f, off, op))
45 return sfseek(f, (Sfoff_t)off, op|SF_SHARE) >= 0 ? 0 : -1;
/ast/src/cmd/3d/
H A Dread3d.c34 off_t off; local
50 off = LSEEK(fd, 0, SEEK_CUR) - r;
52 fscall(mp, r, MSG_read3d, fd, buf, n, off);
60 off = LSEEK(fd, 0, SEEK_CUR) - r;
62 fscall(mp, MSG_read3d, r, fd, buf, n, off);
H A Dwrite3d.c35 off_t off; local
50 off = LSEEK(fd, 0, SEEK_CUR) - r;
52 fscall(mp, MSG_write3d, r, fd, buf, n, off);
60 off = LSEEK(fd, 0, SEEK_CUR) - r;
62 fscall(mp, MSG_write3d, r, fd, buf, n, off);
H A Dlseek3d.c53 lseek64(int fd, off64_t off, int op) argument
63 if (!fscall(NiL, MSG_seek, 0, fd, off, op))
76 r = (*state.trap.intercept[m].call)(&state.trap.intercept[m], MSG_seek, SYS3D_lseek64, (void*)fd, (void*)&off, (void*)op, NiL, NiL, NiL) ? -1 : off;
80 r = (*seekf)(fd, off, op);
85 fscall(mp, MSG_seek, r, fd, off, op);
88 fscall(mp, MSG_seek, r, fd, off, op);
99 lseek3d(int fd, off_t off, int op) argument
108 if (!fscall(NiL, MSG_seek, 0, fd, off, op))
116 r = (*seekf)(fd, off, o
[all...]
/ast/src/lib/libast/misc/
H A Dfs3d.c48 static char off[] = FS3D_off; local
69 else if (!strncmp(v, off, sizeof(off) - 1) && v[sizeof(off)] == '=')
70 cur = FS3D_LIMIT((int)strtol(v + sizeof(off) + 1, NiL, 0));
78 v = off;
84 sfsprintf(val, sizeof(val), "%s=%d", off, FS3D_arg(op));
H A Dstk.c454 register int off=stktell(stream); local
456 if(off)
458 if(off > sizeof(buff))
460 if(!(tp = malloc(off)))
463 if(!sp->stkoverflow || !(tp = (*sp->stkoverflow)(off)))
467 memcpy(tp, stream->_data, off);
480 if(off)
482 _stkseek(stream,off);
483 memcpy(stream->_data, tp, off);
H A Dmagic.c282 * return pointer to data at offset off and size siz
286 getdata(register Magic_t* mp, register long off, register int siz) argument
290 if (off < 0)
292 if (off + siz <= mp->fbsz)
293 return mp->fbuf + off;
294 if (off < mp->xoff || off + siz > mp->xoff + mp->xbsz)
296 if (off + siz > mp->fbmx)
298 n = (off / (SF_BUFSIZE / 2)) * (SF_BUFSIZE / 2);
309 if (off
476 ckmagic(register Magic_t* mp, const char* file, char* buf, char* end, struct stat* st, unsigned long off) argument
2398 off_t off; local
[all...]
H A Dtranslate.c66 int off; /* string base offset */ member in struct:__anon297
94 tempuse(Sfio_t* sp, int off) argument
97 return sfstrbase(sp) + off;
/ast/src/lib/libast/tm/
H A Dtmzone.c56 static char off[16]; local
61 strlcpy(fixed.standard = fixed.daylight = off, name, sizeof(off));
/ast/src/cmd/tests/sfio/
H A Dtsync.c93 Sfoff_t off; local
118 if((off = sfmove(sfstdin,sfstdout,(Sfoff_t)SF_UNBOUND,-1)) != 4)
119 terror("Wrong # of bytes %lld", off);
168 if((off = sftell(f2)) != 1)
169 terror("Wrong sfseek location %lld", off);
171 if((off = (Sfoff_t)lseek(sffileno(f2), (off_t)0, 1)) != 1)
172 terror("Wrong lseek location %lld", off);
176 if((off = (Sfoff_t)lseek(dupf2, (off_t)0, 1)) != 1)
177 terror("Wrong lseek location %lld", off);
/ast/src/lib/libcmd/
H A Dstty.c471 register int i,off,off2; local
495 off = off2 = 1;
500 off = 0;
506 off = 0;
512 off = 0;
518 off = 0;
524 if(!flags && off==off2)
526 if(!off)
534 off = sp->c_cc[tp->mask];
537 if(!flags && off
636 register int c,off; local
[all...]
/ast/src/cmd/re/
H A Ded.c504 lineget(off_t off) argument
508 off &= ~(LINE_GLOBAL|LINE_MARKED);
509 if (sfseek(ed.tmp, off, SEEK_SET) != off)
512 error(ERROR_SYSTEM|2, "temp file read error at offset %I*d", sizeof(off), off);
519 off_t off; local
522 off = ed.tmpoff;
523 if (sfseek(ed.tmp, off, SEEK_SET) != off)
535 register off_t off; local
[all...]
/ast/src/lib/libast/regex/
H A Dregsubcomp.c195 op->off = 0;
289 if ((op->len = (t - sub->re_rhs) - op->off) && (n = ++op - sub->re_ops) >= nops)
299 op->off = t - sub->re_rhs;
334 if (op->len = (t - sub->re_rhs) - op->off)
337 op->off = c;
341 op->off = t - sub->re_rhs;
343 if ((op->len = (t - sub->re_rhs) - op->off) && (n = ++op - sub->re_ops) >= nops)
H A Dregsubexec.c84 if (op->off >= nmatch)
86 if ((c = match[op->off].rm_so) < 0)
89 if ((c = match[op->off].rm_eo) < 0)
132 s = b->re_rhs + op->off;
/ast/src/lib/libast/dir/
H A Dgetdents.c73 long off;
74 return(getdirentries(fd, buf, siz, &off));
/ast/src/cmd/ksh93/edit/
H A Dhexpand.c68 int off,n = 0;
71 off = staktell();
88 if(staktell() != off)
94 sb->str[n] = strdup(stakptr(off));
95 stakseek(off);
127 stakseek(off);
138 int off, /* stack offset */
182 if(off = staktell())
719 if(off)
720 stakset(sp,off);
[all...]
/ast/src/cmd/ksh93/sh/
H A Dexpand.c100 register int off; local
133 if(off = staktell())
160 for(cp=stakptr(off); *cp; cp++)
197 if(off)
198 stakset(sp,off);
H A Dlex.c145 off_t off = (fcseek(0)-(type+1))-(lp->lexd.first?lp->lexd.first:fcfirst()); local
149 off = (fcseek(0)-(type+1)) - lp->lexd.first;
150 r=kiaentity(lp,lp->lexd.first+lp->lexd.kiaoff+type,off-lp->lexd.kiaoff,'v',-1,-1,lp->current,'v',0,"");
156 off = offset + (fcseek(0)-(type+1)) - fcfirst();
160 if(off>offset)
161 sfwrite(stkp,fcfirst()+type,off-offset);
169 n = off-lp->lexd.kiaoff;
181 * If lexd.nocopy is off, then current token is saved on the stack
1561 int off, messages=0, assignok=lp->assignok, csub; local
1571 off
[all...]
H A Dio.c1038 Sfoff_t off; local
1052 off = sh_strnum(fname, &cp, 0);
1057 return(*cp?(Sfoff_t)-1:off);
1136 Sfoff_t off; local
1433 if((off = file_offset(shp,fn,fname))<0)
1437 off=sfseek(sp, off, SEEK_SET);
1441 off=lseek(fn, off, SEEK_SET);
1442 if(off<
1556 Sfoff_t off; local
[all...]
/ast/src/cmd/nmake/
H A Dobject.c1241 Sfoff_t off; local
1265 if (getstring(sp) && (off = sfgetu(sp)) && sfgetu(sp))
1266 while (!sfeof(sp) && sfseek(sp, off, SEEK_SET) == off && (off = sfgetu(sp)))
1268 off += sfseek(sp, (Sfoff_t)0, SEEK_CUR);
1463 Sfoff_t off; local
1571 off = sizeof(old_header) + rules * sizeof(old_rule) + lists * sizeof(old_list) + variables * sizeof(old_var);
1572 strings = st.st_size - sizeof(old_trailer) - off;
1573 if (sfeof(sp) || sfseek(sp, off, SEEK_SE
[all...]
/ast/src/cmd/std/
H A Dsplit.c341 Sfoff_t off = sftell(in); local
348 if (sfsize(in) - off <= len)
355 sfseek(in, off + n, SEEK_SET);
366 sfseek(in, off, SEEK_SET);
/ast/src/lib/libz/
H A Dsfdcgzip.c152 sfgzseek(Sfio_t* fp, Sfoff_t off, int op, Sfdisc_t* dp) argument
154 return sfsk(fp, off, op, dp);
/ast/src/lib/libdll/
H A Ddllscan.c46 int off; \
414 scan->off = sfprintf(scan->tmp, "%-.*s", scan->pe - scan->pb, scan->pb);
416 scan->off = sfprintf(scan->tmp, "%-.*s/%s", scan->pp - scan->pb, scan->pb, *scan->sp);
433 sfstrseek(scan->tmp, scan->off, SEEK_SET);
442 sfstrseek(scan->tmp, scan->off, SEEK_SET);
/ast/src/cmd/dsslib/flat/
H A Dflat.c146 size_t off; /* record data offset */ member in struct:Member_s
464 p->off = (char*)s - r->buf;
514 p->off = t - (unsigned char*)r->buf;
537 w->off = 0;
546 s = (unsigned char*)r->buf + w->off;
571 n = y->off + y->siz;
572 (++y)->off = n;
580 w->siz = r->siz - w->off;
624 w->ret.value.number = *(uint8_t*)(r->buf + w->off);
627 w->ret.value.number = *(uint16_t*)(r->buf + w->off);
1269 size_t off; local
[all...]

Completed in 465 milliseconds

12