Uninitialized vector entry?
[minix3.git] / lib / ack / libp / wrs.c
bloba10951c61e667893e60b86abce57dfe0eca7907a
1 /* $Header$ */
2 /*
3 * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
5 * This product is part of the Amsterdam Compiler Kit.
7 * Permission to use, sell, duplicate or disclose this software must be
8 * obtained in writing. Requests for such permissions may be sent to
10 * Dr. Andrew S. Tanenbaum
11 * Wiskundig Seminarium
12 * Vrije Universiteit
13 * Postbox 7161
14 * 1007 MC Amsterdam
15 * The Netherlands
19 /* Author: J.W. Stevenson */
21 #include <pc_err.h>
22 #include <pc_file.h>
24 extern _wf();
25 extern _outcpt();
27 _wstrin(width,len,buf,f) int width,len; char *buf; struct file *f; {
29 _wf(f);
30 for (width -= len; width>0; width--) {
31 *f->ptr = ' ';
32 _outcpt(f);
34 while (--len >= 0) {
35 *f->ptr = *buf++;
36 _outcpt(f);
40 _wsc(w,c,f) int w; char c; struct file *f; {
42 if (w < 0) _trp(EWIDTH);
43 _wss(w,1,&c,f);
46 _wss(w,len,s,f) int w,len; char *s; struct file *f; {
48 if (w < 0 || len < 0) _trp(EWIDTH);
49 if (w < len)
50 len = w;
51 _wstrin(w,len,s,f);
54 _wrs(len,s,f) int len; char *s; struct file *f; {
55 if (len < 0) _trp(EWIDTH);
56 _wss(len,len,s,f);
59 _wsb(w,b,f) int w,b; struct file *f; {
60 if (b)
61 _wss(w,4,"true",f);
62 else
63 _wss(w,5,"false",f);
66 _wrb(b,f) int b; struct file *f; {
67 _wsb(5,b,f);