6 /* vsf_ascii_ascii_to_bin()
8 * This function converts an input buffer from ascii format to binary format.
9 * This entails ripping out all occurences of '\r' that are followed by '\n'.
10 * The result is stored in "p_out".
12 * p_in - the input and output buffer, which MUST BE at least as big as
13 * "in_len" PLUS ONE. This is to cater for a leading '\r' in the
14 * buffer if certain conditions are met.
15 * in_len - the length in bytes of the buffer.
16 * prev_cr - set to non-zero if this buffer fragment was immediately
17 * preceeded by a '\r'.
19 * The number of characters stored in the buffer, the buffer address, and
20 * if we ended on a '\r'.
22 struct ascii_to_bin_ret
28 struct ascii_to_bin_ret
vsf_ascii_ascii_to_bin(
29 char* p_in
, unsigned int in_len
, int prev_cr
);
31 /* vsf_ascii_bin_to_ascii()
33 * This function converts an input buffer from binary format to ascii format.
34 * This entails replacing all occurences of '\n' with '\r\n'. The result is
37 * p_in - the input buffer, which is not modified
38 * p_out - the output buffer, which MUST BE at least TWICE as big as
40 * in_len - the length in bytes of the input buffer
41 * prev_cr - set to non-zero if this buffer fragment was immediately
42 * preceeded by a '\r'.
44 * The number of characters stored in the output buffer, and whether the last
45 * character stored was '\r'.
47 struct bin_to_ascii_ret
52 struct bin_to_ascii_ret
vsf_ascii_bin_to_ascii(const char* p_in
,
57 #endif /* VSFTP_ASCII_H */