ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/tools.h
(Generate patch)

Comparing ermyth/include/tools.h (file contents):
Revision 1.4 by pippijn, Tue Aug 28 17:08:07 2007 UTC vs.
Revision 1.5 by pippijn, Wed Aug 29 08:04:32 2007 UTC

3 * Copyright © 2005-2006 Atheme Development Group 3 * Copyright © 2005-2006 Atheme Development Group
4 * Rights to this code are as documented in doc/pod/license.pod. 4 * Rights to this code are as documented in doc/pod/license.pod.
5 * 5 *
6 * Misc tools 6 * Misc tools
7 * 7 *
8 * $Id: tools.h,v 1.4 2007/08/28 17:08:07 pippijn Exp $ 8 * $Id: tools.h,v 1.5 2007/08/29 08:04:32 pippijn Exp $
9 */ 9 */
10 10
11#ifndef _TOOLS_H 11#ifndef _TOOLS_H
12#define _TOOLS_H 12#define _TOOLS_H
13 13
227 227
228/* tokenize.c */ 228/* tokenize.c */
229E int sjtoken (char *message, char delimiter, char **parv, int limit = 256); 229E int sjtoken (char *message, char delimiter, char **parv, int limit = 256);
230E int tokenize (char *message, char **parv); 230E int tokenize (char *message, char **parv);
231 231
232inline int
233sjtoken (char const * const message, char delimiter, char **parv, int limit = 256)
234{
235 char *tmp = sstrdup (message);
236 int parc = sjtoken (tmp, delimiter, parv, limit);
237 free (tmp);
238
239 return parc;
240}
241
232/* ubase64.c */ 242/* ubase64.c */
233E char const * const uinttobase64 (char *buf, uint64_t v, int64_t count); 243E char const * const uinttobase64 (char *buf, uint64_t v, int64_t count);
234E unsigned int base64touint (char *buf); 244E unsigned int base64touint (char *buf);
235 245
236#endif 246#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines