int append_double_katcl(struct katcl_line *l, int flags, double v) { struct katcl_parse *p; int result; p = before_append_katcl(l, flags); if(p == NULL){ return -1; } result = add_double_parse_katcl(p, flags, v); return after_append_katcl(l, flags, result); }
int append_hex_long_katcl(struct katcl_line *l, int flags, unsigned long v) { struct katcl_parse *p; int result; p = before_append_katcl(l, flags); if(p == NULL){ return -1; } result = add_hex_long_parse_katcl(p, flags, v); return after_append_katcl(l, flags, result); }
int append_string_katcl(struct katcl_line *l, int flags, char *buffer) { struct katcl_parse *p; int result; p = before_append_katcl(l, flags); if(p == NULL){ return -1; } result = add_string_parse_katcl(p, flags, buffer); return after_append_katcl(l, flags, result); }
int append_vargs_katcl(struct katcl_line *l, int flags, char *fmt, va_list args) { struct katcl_parse *p; int result; p = before_append_katcl(l, flags); if(p == NULL){ return -1; } result = add_vargs_parse_katcl(p, flags, fmt, args); return after_append_katcl(l, flags, result); }
int append_parameter_katcl(struct katcl_line *l, int flags, struct katcl_parse *px, unsigned int index) { struct katcl_parse *p; int result; p = before_append_katcl(l, flags); if(p == NULL){ #ifdef DEBUG fprintf(stderr, "append: before_append failed\n"); #endif return -1; } result = add_parameter_parse_katcl(p, flags, px, index); return after_append_katcl(l, flags, result); }
int append_buffer_katcl(struct katcl_line *l, int flags, void *buffer, int len) { struct katcl_parse *p; int result; p = before_append_katcl(l, flags); if(p == NULL){ #ifdef DEBUG fprintf(stderr, "append: before_append failed\n"); #endif return -1; } result = add_buffer_parse_katcl(p, flags, buffer, len); return after_append_katcl(l, flags, result); }
int append_end_katcl(struct katcl_line *l) { struct katcl_parse *p; int result; p = before_append_katcl(l, KATCP_FLAG_LAST); if(p == NULL){ #ifdef DEBUG fprintf(stderr, "append: before_append failed at end\n"); #endif return -1; } result = add_end_parse_katcl(p); return after_append_katcl(l, KATCP_FLAG_LAST, result); }
int append_timestamp_katcl(struct katcl_line *l, int flags, struct timeval *tv) { struct katcl_parse *p; int result; p = before_append_katcl(l, flags); if(p == NULL){ #ifdef DEBUG fprintf(stderr, "append: before_append failed\n"); #endif return -1; } result = add_timestamp_parse_katcl(p, flags, tv); return after_append_katcl(l, flags, result); }