reactos/rosapps/smartpdf/baseutils/netstr.h
Klemens Friedl 435a566751 SmartPDF - lightweight pdf viewer app for rosapps
* sumatrapdf - vendor import
* everything compiles (libjpeg, poppler, fitz, sumatrapdf)
* does NOT link

(remove the comment tags in the parent directory.rbuild file (rosapps dir) to build it)

svn path=/trunk/; revision=29295
2007-09-29 08:39:35 +00:00

28 lines
877 B
C

/* Written by Krzysztof Kowalczyk (http://blog.kowalczyk.info)
The author disclaims copyright to this source code. */
#ifndef NETSTR_H__
#define NETSTR_H__
#ifdef __cplusplus
extern "C"
{
#endif
#define NETSTR_SEP_TC _T(':')
#define NETSTR_END_TC _T(',')
size_t digits_for_number(int num);
size_t netstr_int_serialized_len_cb(int num);
size_t netstr_tstr_serialized_len_cb(const TCHAR *str);
size_t netstr_tstrn_serialized_len_cb(size_t str_len_cch);
int netstr_tstr_serialize(const TCHAR *str, TCHAR **buf_ptr, size_t *buf_len_cb_ptr);
int netstr_int_serialize(int num, TCHAR **buf_ptr, size_t *buf_len_cb_ptr);
int netstr_parse_str(const TCHAR **str_ptr, size_t *str_len_cb_ptr, const TCHAR **str_out, size_t *str_len_cch_out);
int netstr_parse_int(const TCHAR **str_ptr, size_t *str_len_cb_ptr, int *int_out);
#ifdef __cplusplus
}
#endif
#endif