Changeset 185 for trunk/include


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

Bugfixes for log monitoring, samba logfile parser.

Location:
trunk/include
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/sh_cat.h

    r183 r185  
    277277 MSG_E_HASH,     
    278278 MSG_E_ACCESS,   
    279  MSG_E_READ,     
     279 MSG_E_READ,
     280 MSG_E_NOTREG,
    280281 MSG_E_TIMEOUT,
    281282 MSG_NODEV,       
  • trunk/include/sh_log_check.h

    r183 r185  
    6464                               struct sh_logfile * logfile);
    6565
     66/* Continued line reader.   */
     67sh_string * sh_cont_reader (sh_string * record,
     68                            struct sh_logfile * logfile, char * cont);
     69
    6670/* Binary reader */
    6771sh_string * sh_binary_reader (void * s, size_t size, struct sh_logfile * logfile);
     
    8185/* Parses a pacct record. */
    8286struct sh_logrecord * sh_parse_pacct (sh_string * logline, void * fileinfo);
     87
     88/* Get a samba record */
     89sh_string * sh_read_samba (sh_string * record, struct sh_logfile * logfile);
     90
     91/* Parses a samba record. */
     92struct sh_logrecord * sh_parse_samba (sh_string * logline, void * fileinfo);
     93
    8394
    8495/**
  • 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.
  • trunk/include/sh_utils.h

    r170 r185  
    178178char * sh_util_safe_name (const char * name) SH_GNUC_MALLOC SH_GNUC_PURE;
    179179
     180char * sh_util_safe_name_keepspace (const char * name) SH_GNUC_MALLOC SH_GNUC_PURE;
     181
    180182/* check max size of printf result string
    181183 */
Note: See TracChangeset for help on using the changeset viewer.