| /plan9/sys/src/cmd/gs/libpng/ |
| H A D | pngerror.c | 40 int offset; in png_error() local 41 for (offset=1; offset<15; offset++) in png_error() 42 if (*(error_message+offset) == ' ') in png_error() 47 for (i=0; i<offset-1; i++) in png_error() 53 error_message+=offset; in png_error() 82 int offset = 0; in png_warning() local 89 for (offset=1; offset<15; offset++) in png_warning() 90 if (*(warning_message+offset) == ' ') in png_warning() 95 (*(png_ptr->warning_fn))(png_ptr, warning_message+offset); in png_warning() 97 png_default_warning(png_ptr, warning_message+offset); in png_warning() [all …]
|
| /plan9/sys/src/cmd/gs/src/ |
| H A D | gsflip.c | 45 flip3x1(byte * buffer, const byte ** planes, int offset, int nbytes) in flip3x1() argument 48 const byte *in1 = planes[0] + offset; in flip3x1() 49 const byte *in2 = planes[1] + offset; in flip3x1() 50 const byte *in3 = planes[2] + offset; in flip3x1() 68 flip3x2(byte * buffer, const byte ** planes, int offset, int nbytes) in flip3x2() argument 71 const byte *in1 = planes[0] + offset; in flip3x2() 72 const byte *in2 = planes[1] + offset; in flip3x2() 73 const byte *in3 = planes[2] + offset; in flip3x2() 91 flip3x4(byte * buffer, const byte ** planes, int offset, int nbytes) in flip3x4() argument 94 const byte *in1 = planes[0] + offset; in flip3x4() [all …]
|
| H A D | gdevpcl.c | 261 int offset, cbyte; in gdev_pcl_mode3compress() local 279 offset = diff - run; in gdev_pcl_mode3compress() 281 if (offset < 31) in gdev_pcl_mode3compress() 282 *out++ = cbyte + offset; in gdev_pcl_mode3compress() 285 offset -= 31; in gdev_pcl_mode3compress() 286 while (offset >= 255) in gdev_pcl_mode3compress() 287 *out++ = 255, offset -= 255; in gdev_pcl_mode3compress() 288 *out++ = offset; in gdev_pcl_mode3compress() 316 int offset; in gdev_pcl_mode9compress() local 333 offset = diff - run; in gdev_pcl_mode9compress() [all …]
|
| H A D | gsgdata.c | 45 gs_glyph_data_substring(gs_glyph_data_t *pgd, uint offset, uint size) in gs_glyph_data_substring() argument 47 if (offset > pgd->bits.size || size > pgd->bits.size - offset) in gs_glyph_data_substring() 49 return pgd->procs->substring(pgd, offset, size); in gs_glyph_data_substring() 68 glyph_data_substring_permanent(gs_glyph_data_t *pgd, uint offset, uint size) in glyph_data_substring_permanent() argument 70 pgd->bits.data += offset; in glyph_data_substring_permanent() 83 glyph_data_substring_by_font(gs_glyph_data_t *pgd, uint offset, uint size) in glyph_data_substring_by_font() argument 89 return glyph_data_substring_permanent(pgd, offset, size); in glyph_data_substring_by_font() 90 if (offset > 0) in glyph_data_substring_by_font() 91 memmove(data, data + offset, size); in glyph_data_substring_by_font() 123 uint offset, uint size, gs_font *font) in gs_glyph_data_from_bytes() argument [all …]
|
| H A D | mkromfs.c | 45 unsigned long offset; member 82 int i, offset = 0; in inode_write() local 87 p += put_int32(p, node->offset); in inode_write() 94 printf(" offset %ld\n", node->offset); in inode_write() 101 offset += fwrite(buf, 3, 4, out); in inode_write() 103 offset += fwrite(node->name, 1, strlen(node->name), out); in inode_write() 105 offset += fwrite(node->data_lengths, node->blocks, sizeof(*node->data_lengths), out); in inode_write() 108 offset += fwrite(node->data[i], 1, node->data_lengths[i], out); in inode_write() 110 printf(" wrote %d bytes in all\n", offset); in inode_write() 111 return offset; in inode_write() [all …]
|
| /plan9/sys/src/9/mtx/ |
| H A D | devarch.c | 252 archread(Chan *c, void *a, long n, vlong offset) in archread() argument 267 port = offset; in archread() 268 checkport(offset, offset+n); in archread() 269 for(p = a; port < offset+n; port++) in archread() 274 if((n & 0x01) || (offset & 0x01)) in archread() 276 checkport(offset, offset+n+1); in archread() 279 for(port = offset; port < offset+n; port += 2) in archread() 284 if((n & 0x03) || (offset & 0x03)) in archread() 286 checkport(offset, offset+n+3); in archread() 289 for(port = offset; port < offset+n; port += 4) in archread() [all …]
|
| H A D | devrtc.c | 127 ulong offset = off; in rtcread() local 137 n = readnum(offset, buf, n, t, 12); in rtcread() 140 offset += NVOFF; in rtcread() 141 if(offset > NVLEN) in rtcread() 143 if(n > NVLEN - offset) in rtcread() 144 n = NVLEN - offset; in rtcread() 148 p[i] = nvget(i+offset); in rtcread() 163 ulong offset = off; in rtcwrite() local 167 if(offset!=0) in rtcwrite() 192 offset += NVOFF; in rtcwrite() [all …]
|
| /plan9/sys/src/cmd/aquarela/ |
| H A D | smbcomwrite.c | 6 dirfwstatlength(int fd, vlong offset) in dirfwstatlength() argument 11 d.length = offset; in dirfwstatlength() 16 smbtruncatefile(SmbSession *s, SmbFile *f, vlong offset) in smbtruncatefile() argument 30 if (length == offset) in smbtruncatefile() 33 rv = dirfwstatlength(f->fd, offset); in smbtruncatefile() 39 if (length > offset) { in smbtruncatefile() 42 if (offset > INMEMORYTRUNCTHRESH) { in smbtruncatefile() 43 smblogprint(-1, "smbcomwrite: truncation beyond %lud not supported\n", offset); in smbtruncatefile() 47 db = smbemalloc(offset); in smbtruncatefile() 48 if (pread(f->fd, db, offset, 0) != offset) { in smbtruncatefile() [all …]
|
| H A D | smbcomlocking.c | 84 uvlong offset; in smbcomlockingandx() local 86 if (!getlock(b, large, &pid, &offset, &length)) { in smbcomlockingandx() 91 pid, offset, length); in smbcomlockingandx() 92 smbsharedfileunlock(f->sf, s, h->pid, offset, offset + length); in smbcomlockingandx() 96 uvlong offset; in smbcomlockingandx() local 98 if (!getlock(b, large, &pid, &offset, &length)) { in smbcomlockingandx() 103 pid, offset, length); in smbcomlockingandx() 104 if (!smbsharedfilelock(f->sf, s, h->pid, offset, offset + length)) in smbcomlockingandx() 110 uvlong offset; in smbcomlockingandx() local 114 assert(getlock(b, large, &pid, &offset, &length)); in smbcomlockingandx() [all …]
|
| /plan9/sys/src/libventi/ |
| H A D | debugpacket.c | 98 packetcopy(Packet *p, uchar *buf, int offset, int n) in packetcopy() argument 101 if(offset < 0 || n < 0) in packetcopy() 103 if(offset > p->len) in packetcopy() 105 if(offset+n > p->len) in packetcopy() 106 n = p->len - offset; in packetcopy() 107 memmove(buf, p->data+offset, n); in packetcopy() 112 packetdup(Packet *p, int offset, int n) in packetdup() argument 117 if(offset < 0 || n < 0) in packetdup() 119 if(offset > p->len) in packetdup() 121 if(offset+n > p->len) in packetdup() [all …]
|
| H A D | file.c | 36 vtfilealloc(VtCache *c, VtBlock *b, VtFile *p, u32int offset, int mode) in vtfilealloc() argument 46 assert(offset == 0); in vtfilealloc() 61 if(vtentryunpack(&e, b->data, offset % epb) < 0){ in vtfilealloc() 62 fprint(2, "vtentryunpack failed: %r (%.*H)\n", VtEntrySize, b->data+VtEntrySize*(offset%epb)); in vtfilealloc() 103 r->offset = offset; in vtfilealloc() 155 vtfileopen(VtFile *r, u32int offset, int mode) in vtfileopen() argument 166 bn = offset/(r->dsize/VtEntrySize); in vtfileopen() 171 r = vtfilealloc(r->c, b, r, offset, mode); in vtfileopen() 191 u32int offset; in _vtfilecreate() local 210 offset = lnrand(size+1); in _vtfilecreate() [all …]
|
| /plan9/sys/src/cmd/venti/srv/ |
| H A D | fixarenas.c | 128 readdisk(uchar *buf, vlong offset, int len) in readdisk() argument 132 if(offset >= partend){ in readdisk() 137 if(offset+len > partend){ in readdisk() 139 len = partend - offset; in readdisk() 142 if(readpart(part, offset, buf, len) >= 0) in readdisk() 155 if(readpart(part, offset+i, buf+i, n) >= 0) in readdisk() 161 if(readpart(part, offset+j, buf+j, n) >= 0) in readdisk() 164 if(readpart(part, offset+k, buf+k, 512) >= 0) in readdisk() 182 vlong offset; member 209 sbupdate(Shabuf *sb, uchar *p, vlong offset, int len) in sbupdate() argument [all …]
|
| H A D | printarena.c | 13 rdarena(Arena *arena, u64int offset) in rdarena() argument 25 if(offset != ~(u64int)0) { in rdarena() 26 if(offset >= e-a) in rdarena() 28 offset, e-a); in rdarena() 29 aa = offset; in rdarena() 69 u64int offset, aoffset; in threadmain() local 85 offset = ~(u64int)0; in threadmain() local 90 offset = strtoull(argv[1], 0, 0); in threadmain() 124 rdarena(arena, offset); in threadmain()
|
| /plan9/sys/src/cmd/5a/ |
| H A D | a.y | 29 %type <lval> con expr oexpr pointer offset sreg spreg creg 144 g.offset = $6; 153 g.offset = $4; 238 g.offset = 264 $7.offset = $9; 296 $$.offset = $1 + pc; 298 | LNAME offset 305 $$.offset = $2; 307 | LLAB offset 312 $$.offset = $1->value + $2; [all …]
|
| /plan9/sys/src/lib9p/ |
| H A D | ramfs.c | 21 vlong offset; in fsread() local 25 offset = r->ifcall.offset; in fsread() 29 if(offset >= rf->ndata){ in fsread() 35 if(offset+count >= rf->ndata) in fsread() 36 count = rf->ndata - offset; in fsread() 38 memmove(r->ofcall.data, rf->data+offset, count); in fsread() 48 vlong offset; in fswrite() local 52 offset = r->ifcall.offset; in fswrite() 55 if(offset+count >= rf->ndata){ in fswrite() 56 v = realloc(rf->data, offset+count); in fswrite() [all …]
|
| /plan9/sys/src/cmd/6a/ |
| H A D | a.y | 25 %type <lval> con expr pointer offset 230 $$.from.offset = $5; 240 $$.to.offset = $1.offset; 281 $$.offset = $1 + pc; 283 | LNAME offset 290 $$.offset = $2; 292 | LLAB offset 297 $$.offset = $1->value + $2; 342 $$.offset = $2; 389 $$.offset = $1; [all …]
|
| /plan9/sys/src/9/kw/ |
| H A D | flashkw.c | 327 erasezone(Flash *f, Flashregion *r, ulong offset) in erasezone() argument 335 " start %#lux, end %#lux\n", offset, r->n, r->start, in erasezone() 341 if(offset & (r->erasesize - 1)) { in erasezone() 342 print("flashkw: erase offset %lud not block aligned\n", offset); in erasezone() 345 page = offset >> r->pageshift; in erasezone() 402 write1page(Flash *f, ulong offset, void *buf) in write1page() argument 414 page = offset >> r->pageshift; in write1page() 417 offset, page); in write1page() 419 if(offset & (r->pagesize - 1)) { in write1page() 420 print("flashkw: write offset %lud not page aligned\n", offset); in write1page() [all …]
|
| /plan9/sys/src/cmd/8a/ |
| H A D | a.y | 29 %type <lval> con expr pointer offset 269 $$.offset = $1 + pc; 271 | LNAME offset 278 $$.offset = $2; 280 | LLAB offset 285 $$.offset = $1->value + $2; 320 $$.offset = $2; 363 $$.offset = $2.v1; 398 $$.offset = $1; 404 $$.offset = $1; [all …]
|
| /plan9/sys/src/cmd/snap/ |
| H A D | snapfs.c | 49 memread(Proc *p, File *f, void *buf, long *count, vlong offset) in memread() argument 54 po = offset%Pagesize; in memread() 55 if(!(pg = findpage(p, p->pid, f->name[0], offset-po))) in memread() 66 dataread(Data *d, void *buf, long *count, vlong offset) in dataread() argument 70 if(offset >= d->len) { in dataread() 75 if(offset+*count >= d->len) in dataread() 76 *count = d->len - offset; in dataread() 78 memmove(buf, d->data+offset, *count); in dataread() 89 vlong offset; in fsread() local 94 offset = r->ifcall.offset; in fsread() [all …]
|
| /plan9/sys/src/cmd/qa/ |
| H A D | a.y | 29 %type <lval> con expr pointer offset sreg 317 r = $2.offset; 318 $2.offset = 0; 324 r = $4.offset; 325 $4.offset = 0; 402 g.offset = $2; 410 g.offset = $2; 418 g.offset = $2; 636 $$.offset = $1 + pc; 638 | LNAME offset [all …]
|
| /plan9/sys/src/cmd/exportfs/ |
| H A D | pattern.c | 100 preaddir(Fid *f, uchar *data, int n, vlong offset) in preaddir() argument 105 DEBUG(DFD, "\tpreaddir n=%d wo=%lld fo=%lld\n", n, offset, f->offset); in preaddir() 106 if(offset == 0 && f->offset != 0){ in preaddir() 109 f->offset = f->cdir = f->ndir = 0; in preaddir() 112 }else if(offset != f->offset){ in preaddir() 113 werrstr("can't seek dir %lld to %lld", f->offset, offset); in preaddir() 145 f->offset += m; in preaddir()
|
| /plan9/sys/src/9/port/ |
| H A D | devflash.c | 217 flashread(Chan *c, void *buf, long n, vlong offset) in flashread() argument 235 offset += fp->start; in flashread() 236 if(offset >= fp->end) in flashread() 238 if(offset+n > fp->end) in flashread() 239 n = fp->end - offset; in flashread() 240 n = readflash(f, buf, offset, n); in flashread() 271 n = readstr(offset, buf, n, s); in flashread() 297 flashwrite(Chan *c, void *buf, long n, vlong offset) in flashwrite() argument 315 offset += fp->start; in flashwrite() 316 if(offset >= fp->end) in flashwrite() [all …]
|
| H A D | devproc.c | 366 c->offset = 0; in procopen() 387 tc->offset = 0; in procopen() 512 procoffset(long offset, char *va, int *np) in procoffset() argument 514 if(offset > 0) { in procoffset() 515 offset -= *np; in procoffset() 516 if(offset < 0) { in procoffset() 517 memmove(va, va+*np+offset, -offset); in procoffset() 518 *np = -offset; in procoffset() 523 return offset; in procoffset() 546 c->iounit, c->offset, c->path->s); in procfdprint() [all …]
|
| /plan9/sys/src/cmd/va/ |
| H A D | a.y | 28 %type <lval> con expr pointer offset sreg 260 $$.offset = $1 + pc; 262 | LNAME offset 269 $$.offset = $2; 271 | LLAB offset 276 $$.offset = $1->value + $2; 364 $$.offset = $2; 416 $$.offset = 0; 425 $$.offset = $1; 442 $$.offset = 0; [all …]
|
| /plan9/sys/src/cmd/aux/vga/ |
| H A D | io.c | 202 doreadbios(char* buf, long len, long offset) in doreadbios() argument 217 seek(biosfd, biosoffset+offset, 0); in doreadbios() 222 readbios(long len, long offset) in readbios() argument 229 if(biosoffset <= offset && offset+len <= biosoffset+bioslen) in readbios() 230 return bios+(offset - biosoffset); in readbios() 233 error("enormous bios len %ld at %lux\n", len, offset); in readbios() 235 n = doreadbios(bios, sizeof(bios), offset); in readbios() 237 error("short bios read %ld at %lux got %d\n", len,offset, n); in readbios() 239 biosoffset = offset; in readbios() 248 long offset; in dumpbios() local [all …]
|