jabberd2  2.3.1
Functions
str.c File Reference
#include "pool.h"
#include "util.h"

Go to the source code of this file.

Functions

char * j_strdup (const char *str)
 
More...
 
char * j_strcat (char *dest, const char *txt)
 
int j_strcmp (const char *a, const char *b)
 
int j_strcasecmp (const char *a, const char *b)
 
int j_strncmp (const char *a, const char *b, int i)
 
int j_strncasecmp (const char *a, const char *b, int i)
 
int j_strlen (const char *a)
 
int j_atoi (const char *a, int def)
 
char * j_attr (const char **atts, const char *attr)
 
char * j_strnchr (const char *s, int c, int n)
 like strchr, but only searches n chars More...
 
spool spool_new (pool_t p)
 
static void _spool_add (spool s, const char *goodstr)
 
void spool_add (spool s, const char *str)
 
void spool_escape (spool s, const char *raw, int len)
 
void spooler (spool s,...)
 
const char * spool_print (spool s)
 
const char * spools (pool_t p,...)
 convenience :) More...
 
char * strunescape (pool_t p, char *buf)
 
char * strescape (pool_t p, const char *buf, int len)
 
void shahash_r (const char *str, char hashbuf[41])
 convenience (originally by Thomas Muldowney) More...
 
void shahash_raw (const char *str, unsigned char hashval[20])
 

Function Documentation

char* j_strdup ( const char *  str)


Definition at line 24 of file str.c.

char* j_strcat ( char *  dest,
const char *  txt 
)

Definition at line 32 of file str.c.

Referenced by spool_print().

int j_strcmp ( const char *  a,
const char *  b 
)

Definition at line 43 of file str.c.

Referenced by j_attr().

int j_strcasecmp ( const char *  a,
const char *  b 
)

Definition at line 55 of file str.c.

int j_strncmp ( const char *  a,
const char *  b,
int  i 
)

Definition at line 63 of file str.c.

int j_strncasecmp ( const char *  a,
const char *  b,
int  i 
)

Definition at line 71 of file str.c.

int j_strlen ( const char *  a)

Definition at line 79 of file str.c.

int j_atoi ( const char *  a,
int  def 
)
char* j_attr ( const char **  atts,
const char *  attr 
)
char* j_strnchr ( const char *  s,
int  c,
int  n 
)

like strchr, but only searches n chars

Definition at line 109 of file str.c.

spool spool_new ( pool_t  p)

Definition at line 119 of file str.c.

References spool_struct::first, spool_struct::last, spool_struct::len, spool_struct::p, and pmalloc().

Referenced by spools().

static void _spool_add ( spool  s,
const char *  goodstr 
)
static
void spool_add ( spool  s,
const char *  str 
)

Definition at line 147 of file str.c.

References _spool_add(), spool_struct::p, and pstrdup().

Referenced by spooler(), and spools().

void spool_escape ( spool  s,
const char *  raw,
int  len 
)

Definition at line 155 of file str.c.

References _spool_add(), spool_struct::p, and strescape().

void spooler ( spool  s,
  ... 
)

Definition at line 163 of file str.c.

References spool_add().

const char* spool_print ( spool  s)
const char* spools ( pool_t  p,
  ... 
)

convenience :)

Definition at line 209 of file str.c.

References spool_add(), spool_new(), and spool_print().

char* strunescape ( pool_t  p,
char *  buf 
)

Definition at line 238 of file str.c.

References pmalloc().

char* strescape ( pool_t  p,
const char *  buf,
int  len 
)

Definition at line 285 of file str.c.

References pmalloc().

Referenced by spool_escape().

void shahash_r ( const char *  str,
char  hashbuf[41] 
)

convenience (originally by Thomas Muldowney)

old convenience function, now in str.c

Definition at line 358 of file str.c.

References hex_from_raw(), and shahash_raw().

Referenced by _authreg_auth_set(), _pbx_process_command(), _router_process_handshake(), _sm_generate_id(), jid_random_part(), and s2s_db_key().

void shahash_raw ( const char *  str,
unsigned char  hashval[20] 
)

Definition at line 364 of file str.c.

References sha1_hash().

Referenced by _router_process_route(), and shahash_r().