diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-10 01:05:32 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-10 01:05:32 +0100 |
commit | 25e92d39e7c5f3c4bd6dc0aeeb9b5a6861c79995 (patch) | |
tree | da3b4d6a2c7ea62a0de9bdebef9f935e47285e8c /parse.c | |
parent | Minor general cleanup. (diff) | |
download | calp-25e92d39e7c5f3c4bd6dc0aeeb9b5a6861c79995.tar.gz calp-25e92d39e7c5f3c4bd6dc0aeeb9b5a6861c79995.tar.xz |
Add push_strbuf function.
Diffstat (limited to '')
-rw-r--r-- | parse.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -215,3 +215,29 @@ INIT_F(parse_ctx, char* filename) { strcpy(this->filename, filename); return 0; } + +int push_strbuf(strbuf* target, strbuf* src) { +#if 0 + if (src->ptr + 1 > keylen) { + keylen = str->ptr + 1; + /* + * Allow for key's longer than 100 octets. It + * currently is of no use, since key's can't be + * folded. + * TODO check if everything should be unfolded at 75 + * octets, or if that is only for values. + * + * TODO earlier there was a bug here. Test if that is + * fixed and reenable this line. + */ + // strbuf_realloc(&cline.key, keylen); + } +#endif + + strbuf_copy(target, src); + strbuf_cap(target); + strbuf_soft_reset(src); + + // continue; + return 0; +} |