Lines Matching refs:w
54 int w, s; in __sfvwrite() local
85 w = (*fp->_write)(fp->_cookie, p, MIN(len, INT_MAX)); in __sfvwrite()
86 if (w <= 0) in __sfvwrite()
88 p += w; in __sfvwrite()
89 len -= w; in __sfvwrite()
90 } while ((uio->uio_resid -= w) != 0); in __sfvwrite()
124 w = fp->_w; in __sfvwrite()
126 if (len < w) in __sfvwrite()
127 w = len; in __sfvwrite()
128 COPY(w); /* copy MIN(fp->_w,len), */ in __sfvwrite()
129 fp->_w -= w; in __sfvwrite()
130 fp->_p += w; in __sfvwrite()
131 w = len; /* but pretend copied all */ in __sfvwrite()
132 } else if (fp->_p > fp->_bf._base && len > w) { in __sfvwrite()
134 COPY(w); in __sfvwrite()
136 fp->_p += w; in __sfvwrite()
139 } else if (len >= (w = fp->_bf._size)) { in __sfvwrite()
147 if (w != 0) in __sfvwrite()
148 w = MIN(w * (len / w), INT_MAX); in __sfvwrite()
149 w = (*fp->_write)(fp->_cookie, p, w); in __sfvwrite()
150 if (w <= 0) in __sfvwrite()
154 w = len; in __sfvwrite()
155 COPY(w); in __sfvwrite()
156 fp->_w -= w; in __sfvwrite()
157 fp->_p += w; in __sfvwrite()
159 p += w; in __sfvwrite()
160 len -= w; in __sfvwrite()
161 } while ((uio->uio_resid -= w) != 0); in __sfvwrite()
180 w = fp->_w + fp->_bf._size; in __sfvwrite()
181 if (fp->_p > fp->_bf._base && s > w) { in __sfvwrite()
182 COPY(w); in __sfvwrite()
184 fp->_p += w; in __sfvwrite()
187 } else if (s >= (w = fp->_bf._size)) { in __sfvwrite()
188 w = (*fp->_write)(fp->_cookie, p, w); in __sfvwrite()
189 if (w <= 0) in __sfvwrite()
192 w = s; in __sfvwrite()
193 COPY(w); in __sfvwrite()
194 fp->_w -= w; in __sfvwrite()
195 fp->_p += w; in __sfvwrite()
197 if ((nldist -= w) == 0) { in __sfvwrite()
203 p += w; in __sfvwrite()
204 len -= w; in __sfvwrite()
205 } while ((uio->uio_resid -= w) != 0); in __sfvwrite()