Root/
| 1 | /* |
| 2 | * vstring.h - Variable-length strings |
| 3 | * |
| 4 | * Copyright 2012 by Werner Almesberger |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | */ |
| 11 | |
| 12 | #ifndef VSTRING_H |
| 13 | #define VSTRING_H |
| 14 | |
| 15 | |
| 16 | void append_n(char **res, int *res_len, const char *s, int len); |
| 17 | void append(char **res, int *res_len, const char *s); |
| 18 | |
| 19 | |
| 20 | static inline void append_char(char **res, int *res_len, char c) |
| 21 | { |
| 22 | append_n(res, res_len, &c, 1); |
| 23 | } |
| 24 | |
| 25 | #endif /* !VSTRING_H */ |
| 26 |
Branches:
master
