Ignore:
Timestamp:
Oct 29, 2008, 8:59:18 PM (16 years ago)
Author:
katerina
Message:

Bugfixes for log monitoring, samba logfile parser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/sh_string.h

    r183 r185  
    3333
    3434#define sh_string_copy(a)  ((a) ? sh_string_new_from_lchar(((a)->str), ((a)->len)) : NULL)
    35 #define sh_string_add(a,b) ((a && b) ? sh_string_add_from_lchar((a), ((b)->str), ((b)->len)) : NULL)
     35#define sh_string_add(a,b) ((a && b) ? sh_string_cat_lchar((a), ((b)->str), ((b)->len)) : NULL)
    3636
    3737/* create new sh_string from three arrays of given length
     
    5353 */
    5454size_t sh_string_read(sh_string * s, FILE * fp, size_t maxlen);
     55
     56/* Read a string from a file, with maxlen. Return 0 on EOF,
     57 * -1 on error, and -2 if a line exceeds maxlen.
     58 * If 'cont' != NULL, continuation lines starting with a char
     59 * in 'cont' are concatenated.
     60 */
     61size_t sh_string_read_cont(sh_string * s, FILE * fp, size_t maxlen, char *cont);
    5562
    5663/* Split array at delim in at most nfields fields.
Note: See TracChangeset for help on using the changeset viewer.