• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/lukemftp-13.92.1/tnftp/libnetbsd/

Lines Matching refs:dst

101 #define HVIS(dst, c, flag, nextc, extra)				      \
104 *dst++ = '%'; \
105 *dst++ = xtoa(((unsigned int)c >> 4) & 0xf); \
106 *dst++ = xtoa((unsigned int)c & 0xf); \
108 SVIS(dst, c, flag, nextc, extra); \
114 * dst: Pointer to the destination buffer
121 #define SVIS(dst, c, flag, nextc, extra) \
127 *dst++ = c; \
133 *dst++ = '\\'; *dst++ = 'n'; \
136 *dst++ = '\\'; *dst++ = 'r'; \
139 *dst++ = '\\'; *dst++ = 'b'; \
142 *dst++ = '\\'; *dst++ = 'a'; \
145 *dst++ = '\\'; *dst++ = 'v'; \
148 *dst++ = '\\'; *dst++ = 't'; \
151 *dst++ = '\\'; *dst++ = 'f'; \
154 *dst++ = '\\'; *dst++ = 's'; \
157 *dst++ = '\\'; *dst++ = '0'; \
159 *dst++ = '0'; \
160 *dst++ = '0'; \
165 *dst++ = '\\'; *dst++ = c; \
171 *dst++ = '\\'; \
172 *dst++ = (unsigned char)(((uint32_t)(unsigned char)c >> 6) & 03) + '0'; \
173 *dst++ = (unsigned char)(((uint32_t)(unsigned char)c >> 3) & 07) + '0'; \
174 *dst++ = (c & 07) + '0'; \
176 if ((flag & VIS_NOSLASH) == 0) *dst++ = '\\'; \
178 c &= 0177; *dst++ = 'M'; \
181 *dst++ = '^'; \
183 *dst++ = '?'; \
185 *dst++ = c + '@'; \
187 *dst++ = '-'; *dst++ = c; \
198 svis(char *dst, int c, int flag, int nextc, const char *extra)
204 *dst = '\0'; /* can't create nextra, return "" */
205 return dst;
208 HVIS(dst, c, flag, nextc, nextra);
210 SVIS(dst, c, flag, nextc, nextra);
212 *dst = '\0';
213 return dst;
218 * strsvis, strsvisx - visually encode characters from src into dst
226 * expansion. The length of dst, not including the trailing NULL,
229 * Strsvisx encodes exactly len bytes from src into dst.
233 strsvis(char *dst, const char *csrc, int flag, const char *extra)
242 *dst = '\0'; /* can't create nextra, return "" */
246 for (start = dst; (c = *src++) != '\0'; /* empty */)
247 HVIS(dst, c, flag, *src, nextra);
249 for (start = dst; (c = *src++) != '\0'; /* empty */)
250 SVIS(dst, c, flag, *src, nextra);
253 *dst = '\0';
254 return (dst - start);
259 strsvisx(char *dst, const char *csrc, size_t len, int flag, const char *extra)
268 *dst = '\0'; /* can't create nextra, return "" */
273 for (start = dst; len > 0; len--) {
275 HVIS(dst, c, flag, len ? *src : '\0', nextra);
278 for (start = dst; len > 0; len--) {
280 SVIS(dst, c, flag, len ? *src : '\0', nextra);
284 *dst = '\0';
285 return (dst - start);
292 vis(char *dst, int c, int flag, int nextc)
299 *dst = '\0'; /* can't create extra, return "" */
300 return dst;
303 HVIS(dst, uc, flag, nextc, extra);
305 SVIS(dst, uc, flag, nextc, extra);
307 *dst = '\0';
308 return dst;
313 * strvis, strvisx - visually encode characters from src into dst
316 * expansion. The length of dst, not including the trailing NULL,
319 * Strvisx encodes exactly len bytes from src into dst.
323 strvis(char *dst, const char *src, int flag)
330 *dst = '\0'; /* can't create extra, return "" */
333 rv = strsvis(dst, src, flag, extra);
340 strvisx(char *dst, const char *src, size_t len, int flag)
347 *dst = '\0'; /* can't create extra, return "" */
350 rv = strsvisx(dst, src, len, flag, extra);