Logo Search packages:      
Sourcecode: bglibs version File versions

int str_init ( str s  ) 

Initialize a string, giving it a small empty allocation.

Definition at line 22 of file init.c.

References len, s, size, and STR_BLOCKSIZE.

{
  char* p;
  if ((p = malloc(STR_BLOCKSIZE)) == 0) return 0;
  p[0] = 0;
  s->s = p;
  s->len = 0;
  s->size = STR_BLOCKSIZE;
  return 1;
}


Generated by  Doxygen 1.6.0   Back to index