2 Proprietary Rand Corporation
, 1981.
3 Further distribution of
this software
4 subject to the terms of the Rand
8 #include "../h/iobuf.h"
9 #define NBUFFED 256 /* limit on fmt buffer */
11 extern struct iobuf fout
;
14 fmt(fmtstrng
, arg1
, arg2
, arg3
)
17 int svfildes
, svnleft
, svnextp
;
20 svfildes
= fout
.b_fildes
;
21 svnleft
= fout
.b_nleft
;
22 svnextp
= fout
.b_nextp
;
24 /* a very illegal file handle */
26 /* use last half of fout buffer */
27 fout
.b_nleft
= NBUFFED
;
28 fout
.b_nextp
= &fout
.b_buff
[512-NBUFFED
];
29 printf("%r", &fmtstrng
); /* and pass the buck ... */
30 fmtlen
= fout
.b_nextp
- &fout
.b_buff
[512-NBUFFED
];
33 fout
.b_fildes
= svfildes
;
34 fout
.b_nleft
= svnleft
;
35 fout
.b_nextp
= svnextp
;
37 return(&fout
.b_buff
[512-NBUFFED
]);