mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-23 16:46:25 +02:00
26 lines
630 B
C
26 lines
630 B
C
/*
|
|
* vstring.h - Variable-length strings
|
|
*
|
|
* Copyright 2012 by Werner Almesberger
|
|
*
|
|
* 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 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef VSTRING_H
|
|
#define VSTRING_H
|
|
|
|
|
|
void append_n(char **res, int *res_len, const char *s, int len);
|
|
void append(char **res, int *res_len, const char *s);
|
|
|
|
|
|
static inline void append_char(char **res, int *res_len, char c)
|
|
{
|
|
append_n(res, res_len, &c, 1);
|
|
}
|
|
|
|
#endif /* !VSTRING_H */
|