Logo Search packages:      
Sourcecode: nbsmtp version File versions  Download package

void str_incr_space ( string_t buffer,
int  incr 

Increases memory for a string_t.

[in,out] buffer Pointer to string_t
[in] incr Number of bytes (chars) to increment buffer size

Definition at line 45 of file util.c.

References string::len, and string::str.

Referenced by parse_mail().

      int i = buffer->len;
      buffer->str = realloc(buffer->str, buffer->len+(incr*sizeof(char)));
      buffer->len += incr;

      for (; i < buffer->len; i++ )
            buffer->str[i] = 0;

Generated by  Doxygen 1.6.0   Back to index