src/server/util/util.h

changeset 24
1a7853a4257e
parent 14
b8bf95b39952
child 48
37a512d7b8f6
equal deleted inserted replaced
23:a2c8fc23c90e 24:1a7853a4257e
68 68
69 /* --- Begin common function prototypes --- */ 69 /* --- Begin common function prototypes --- */
70 70
71 #ifdef INTNSAPI 71 #ifdef INTNSAPI
72 72
73 NSPR_BEGIN_EXTERN_C 73 #ifdef __cplusplus
74 extern "C" {
75 #endif
74 76
75 NSAPI_PUBLIC 77 NSAPI_PUBLIC
76 int INTutil_init_PRNetAddr(PRNetAddr * naddr, char * ipstr, int iplen, int type); 78 int INTutil_init_PRNetAddr(PRNetAddr * naddr, char * ipstr, int iplen, int type);
77 79
78 NSAPI_PUBLIC 80 NSAPI_PUBLIC
144 146
145 NSAPI_PUBLIC int INTutil_mime_separator(char *sep); 147 NSAPI_PUBLIC int INTutil_mime_separator(char *sep);
146 148
147 NSAPI_PUBLIC int INTutil_itoa(int i, char *a); 149 NSAPI_PUBLIC int INTutil_itoa(int i, char *a);
148 150
149 NSAPI_PUBLIC int INTutil_i64toa(PRInt64 i, char *a); 151 NSAPI_PUBLIC int INTutil_i64toa(int64_t i, char *a);
150 152
151 153
152 NSAPI_PUBLIC 154 NSAPI_PUBLIC
153 int INTutil_vsprintf(char *s, register const char *fmt, va_list args); 155 int INTutil_vsprintf(char *s, register const char *fmt, va_list args);
154 156
184 NSAPI_PUBLIC void INTutil_random(void *buf, size_t sz); 186 NSAPI_PUBLIC void INTutil_random(void *buf, size_t sz);
185 187
186 NSAPI_PUBLIC PRBool INTutil_format_http_version(const char *v, int *protv_num, char *buffer, int size); 188 NSAPI_PUBLIC PRBool INTutil_format_http_version(const char *v, int *protv_num, char *buffer, int size);
187 189
188 NSAPI_PUBLIC int INTutil_getboolean(const char *v, int def); 190 NSAPI_PUBLIC int INTutil_getboolean(const char *v, int def);
189 NSAPI_PUBLIC PRIntervalTime INTutil_getinterval(const char *v, PRIntervalTime def); 191
192 // TODO
193 //NSAPI_PUBLIC PRIntervalTime INTutil_getinterval(const char *v, PRIntervalTime def);
190 194
191 #ifdef NEED_STRCASECMP 195 #ifdef NEED_STRCASECMP
192 NSAPI_PUBLIC int INTutil_strcasecmp(const char *one, const char *two); 196 NSAPI_PUBLIC int INTutil_strcasecmp(const char *one, const char *two);
193 #endif /* NEED_STRCASECMP */ 197 #endif /* NEED_STRCASECMP */
194 198
208 212
209 NSAPI_PUBLIC char *util_strlower(char *s); 213 NSAPI_PUBLIC char *util_strlower(char *s);
210 214
211 NSAPI_PUBLIC char *util_decrement_string(char *s); 215 NSAPI_PUBLIC char *util_decrement_string(char *s);
212 216
213 NSAPI_PUBLIC PRInt64 util_atoi64(const char *a); 217 NSAPI_PUBLIC int64_t util_atoi64(const char *a);
214 218
215 NSAPI_PUBLIC char *util_html_escape(const char *s); 219 NSAPI_PUBLIC char *util_html_escape(const char *s);
216 220
217 NSAPI_PUBLIC int util_qtoi(const char *q, const char **p); 221 NSAPI_PUBLIC int util_qtoi(const char *q, const char **p);
218 222
247 251
248 #endif /* XP_WIN32 */ 252 #endif /* XP_WIN32 */
249 253
250 /* --- End Windows-only function prototypes --- */ 254 /* --- End Windows-only function prototypes --- */
251 255
252 NSPR_END_EXTERN_C 256 #ifdef __cplusplus
257 }
258 #endif
253 259
254 #ifdef __cplusplus 260 #ifdef __cplusplus
255 261
256 NSAPI_PUBLIC char *util_host_port_suffix(char *h); 262 NSAPI_PUBLIC char *util_host_port_suffix(char *h);
257 263

mercurial