Lines Matching refs:gp
1396 Ssgroup_t* gp;
1398 if (!(gp = vmnewof(ss->vm, 0, Ssgroup_t, 1, strlen(id) + 1)))
1404 strcpy(gp->id = (char*)(gp + 1), id);
1406 fp->lastgroup->next = gp;
1408 fp->group = gp;
1409 fp->lastgroup = gp;
1410 gp->next = fp->group;
1909 Ssgroup_t* gp;
1918 if (gp = fp->group)
1921 sfprintf(io, " %s", gp->id);
1922 if (gp->name)
1923 sfprintf(io, "=%s", gp->name);
1924 } while ((gp = gp->next) != fp->group);
2061 register Ssgroup_t* gp;
2067 if ((gp = fp->group) != fp->group)
2068 fp->group = gp->next;
2075 if ((gp->end - gp->cur) < r)
2077 if ((z = gp->cur - gp->beg) && sfwrite(gp->io, gp->beg, z) != z)
2080 (*ss->disc->errorf)(NiL, ss->disc, ERROR_SYSTEM|2, "%s: write error", gp->name);
2084 if (!(gp->beg = (unsigned char*)sfreserve(gp->io, z, SF_LOCKR)))
2086 if ((z = sfvalue(gp->io)) < r)
2088 if (!(gp->beg = (unsigned char*)sfreserve(gp->io, z, SF_LOCKR)))
2091 (*ss->disc->errorf)(NiL, ss->disc, ERROR_SYSTEM|1, "%s: write buffer error", gp->name);
2095 gp->end = (gp->cur = gp->beg) + z;
2097 t = gp->cur + v;
2127 s = gp->cur;
2134 gp->cur = t;
2484 register Ssgroup_t* gp;
2505 if (gp = ep = fp->group)
2510 if (!gp->io)
2513 if (streq(gp->id, dd->id) || streq(gp->id, dd->alt))
2515 if (gp->name)
2518 (*ss->disc->errorf)(NiL, ss->disc, 2, "%s: auxiliary file %s already named %s", dd->name, gp->id, gp->name);
2524 if (!gp->name && (s || (s = getenv(sfprints("%s%s", SS_DD_OUT, gp->id)))))
2543 if (!(gp->name = vmstrdup(ss->vm, s)))
2549 else if (!list && !(gp->io = sfopen(NiL, gp->name, "w")))
2552 (*ss->disc->errorf)(NiL, ss->disc, ERROR_SYSTEM|2, "%s: cannot write auxiliary file %s", gp->name, gp->id);
2565 if (gp->io && !fstat(sffileno(gp->io), &ws) && SAME(&ws, &ns))
2567 sfclose(gp->io);
2568 gp->io = 0;
2570 if (gp->io || list)
2572 if (gp->io != sfstdout)
2575 pg->next = gp;
2577 fp->group = gp;
2578 pg = gp;
2580 } while ((gp = gp->next) != ep);
2614 register Ssgroup_t* gp;
2618 if (gp = ep = fp->group)
2623 if (gp->io)
2625 if (rsfilewrite(rs, gp->io, gp->name))
2628 pg->next = gp;
2630 fp->group = gp;
2631 pg = gp;
2633 } while ((gp = gp->next) != ep);
2650 register Ssgroup_t* gp;
2658 if (gp = fp->group)
2661 if (gp->io && ((z = gp->cur - gp->beg) >= 0 && sfwrite(gp->io, gp->beg, z) != z || ((fp == ss->file || gp->io == sfstdout) ? sfsync(gp->io) : sfclose(gp->io))))
2664 (*ss->disc->errorf)(NiL, ss->disc, ERROR_SYSTEM|2, "%s: write error", gp->name);
2667 } while ((gp = gp->next) != fp->group);