Exemple #1
0
int main(int ac, char **av)
{
  str_pool_t *pool = str_pool_create();
  char buf[1024];

  //msg_setverbosity(MSG_WARNING);

  while( fgets(buf, sizeof buf, stdin) )
  {
    buf[strcspn(buf,"\r\n")]=0;

    str_pool_add(pool, buf);

    //unsigned h = hash_str(buf);
    //printf("%08x %s\n", h, buf);
  }
  str_pool_emit(pool);
  str_pool_delete(pool);
  return 0;
}
Exemple #2
0
static void _str_check_global( void )
{
   if (!global) global = str_pool_create();
}