Lines Matching refs:sp
33 * print buffer s,n on sp
36 #define PUT(c) (r++,sfputc(sp,(c)))
39 buffer(register Sfio_t* sp, register char* s, int n)
45 if (n < 0) return sfprintf(sp, " %p", s);
97 * list msg on sp
101 msglist(Sfio_t* sp, register Msg_call_t* msg, int flags, unsigned long terse)
121 r += sfprintf(sp, "[");
123 r += sfprintf(sp, " %5d %5d", MSG_CHANNEL_USR(msg->channel), MSG_CHANNEL_SYS(msg->channel));
127 r += sfprintf(sp, " %lu", msg->stamp);
129 r += sfprintf(sp, " %s", fmttime("%?%K", (time_t)msg->stamp));
131 r += sfprintf(sp, " ] ");
133 r += sfprintf(sp, "%s (", msgname(msg->call));
143 r += sfprintf(sp, " [");
146 r += sfprintf(sp, " %lu", *np++);
147 r += sfprintf(sp, " ]");
151 r += sfprintf(sp, " %lu", ip->fid[0]);
153 r += sfprintf(sp, "%s%ld", ip->fid[n] >= 0 ? "+" : "", ip->fid[n]);
157 if (MSG_MASK(msg->call) & terse) r += sfprintf(sp, " %p", p);
158 else r += buffer(sp, p, (ap)->number);
168 r += sfprintf(sp, " [");
172 r += sfprintf(sp, " %lu", dp->d_fileno);
175 r += buffer(sp, dp->d_name, i);
183 r += sfprintf(sp, " ]");
189 r += sfprintf(sp, " %lu", ip->fid[0]);
191 r += sfprintf(sp, "%s%ld", ip->fid[n] >= 0 ? "+" : "", ip->fid[n]);
197 r += sfprintf(sp, " [ dev=%d ino=%u mode=0%o nlink=%d uid=%d gid=%d size=%lu", st->st_dev, st->st_ino, st->st_mode, st->st_nlink, st->st_uid, st->st_gid, st->st_size);
199 r += sfprintf(sp, " blocks=%u", st->st_blocks);
202 r += sfprintf(sp, " blksize=%u", st->st_blksize);
204 r += sfprintf(sp, " atime=%lu mtime=%lu ctime=%lu ]", st->st_atime, st->st_mtime, st->st_ctime);
208 r += sfprintf(sp, " [ bsize=%d frsize=%d blocks=%d bfree=%d bavail=%d files=%d ffree=%d favail=%d", fp->f_bsize, fp->f_frsize, fp->f_blocks, fp->f_bfree, fp->f_bavail, fp->f_files, fp->f_ffree, fp->f_favail);
210 r += sfprintf(sp, " fsid=%u", fp->f_fsid);
213 r += sfprintf(sp, " basetype=%s", fp->f_basetype);
215 r += sfprintf(sp, " flag=%o namemax=%d", fp->f_flag, fp->f_namemax);
217 r += sfprintf(sp, " fstr=%s", fp->f_fstr);
219 r += sfprintf(sp, " ]");
223 r += buffer(sp, p, msg->ret.number);
231 r += sfprintf(sp, n > 0xffff ? " 0x%x" : " %lu", n);
234 if (p = (ap++)->pointer) r += buffer(sp, p, strlen(p));
235 else r += sfprintf(sp, " 0");
239 if (MSG_MASK(msg->call) & terse) r += sfprintf(sp, " %p", vp);
242 r += sfprintf(sp, " [");
244 r += buffer(sp, p, strlen(p));
245 r += sfprintf(sp, " ]");
251 r += sfprintf(sp, " )");
258 r += sfprintf(sp, " = %lu", ip->fid[0]);
260 r += sfprintf(sp, "%s%ld", ip->fid[n] >= 0 ? "+" : "", ip->fid[n]);
263 r += sfprintf(sp, " = %ld", msg->ret.number);
267 r += sfprintf(sp, " + ack ( 0x%08x %lu %lu )", msg->ack.addr, msg->ack.port, msg->stamp);
268 r += sfprintf(sp, "\n");