A mail formatter.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

68 lines
1.4 KiB

/*
* sbuffer - Incenp.org Notch Library: string buffer module
* Copyright (C) 2011 Damien Goutte-Gattat
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ICP20110203_SBUFFER_H
#define ICP20110203_SBUFFER_H
#include <stdlib.h>
#include <stdarg.h>
#ifdef __cpluscplus
extern "C" {
#endif
typedef struct string_buffer_t string_buffer_t;
string_buffer_t *
sb_new(size_t);
void
sb_free(string_buffer_t *);
const char *
sb_get(string_buffer_t *);
char *
sb_get_copy(string_buffer_t *);
size_t
sb_len(string_buffer_t *);
int
sb_empty(string_buffer_t *);
int
sb_addc(string_buffer_t *, char);
int
sb_add(string_buffer_t *, const char *);
int
sb_addn(string_buffer_t *, const char *, size_t);
int
sb_vaddf(string_buffer_t *, const char *, va_list);
int
sb_addf(string_buffer_t *, const char *, ...);
#ifdef __cplusplus
}
#endif
#endif /* !ICP20110203_SBUFFER_H */