diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-11-23 08:11:42 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-11-23 08:11:42 +0200 |
commit | d6990c3ab1095e0637a5113fe062b9eb6e1a2238 (patch) | |
tree | 46324b8abb0f0a02fff37fb7e9a0a2962f6be8b7 /rpmio/rpmstring.h | |
parent | abeea80a38682069fe97e69c0c8ca71475497ba0 (diff) | |
download | librpm-tizen-d6990c3ab1095e0637a5113fe062b9eb6e1a2238.tar.gz librpm-tizen-d6990c3ab1095e0637a5113fe062b9eb6e1a2238.tar.bz2 librpm-tizen-d6990c3ab1095e0637a5113fe062b9eb6e1a2238.zip |
Move stringbuf into librpmio, rename header
- rename header to more generic rpmstring.h for collecting misc string
helper functions
Diffstat (limited to 'rpmio/rpmstring.h')
-rw-r--r-- | rpmio/rpmstring.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/rpmio/rpmstring.h b/rpmio/rpmstring.h new file mode 100644 index 000000000..ff0bdebbd --- /dev/null +++ b/rpmio/rpmstring.h @@ -0,0 +1,52 @@ +#ifndef _RPMSTRING_H_ +#define _RPMSTRING_H_ + +/** \file rpmio/rpmstring.h + * + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + */ +typedef struct StringBufRec *StringBuf; + +/** + */ +StringBuf newStringBuf(void); + +/** + */ +StringBuf freeStringBuf( StringBuf sb); + +/** + */ +void truncStringBuf(StringBuf sb); + +/** + */ +char * getStringBuf(StringBuf sb); + +/** + */ +void stripTrailingBlanksStringBuf(StringBuf sb); + +/** + */ +#define appendStringBuf(sb, s) appendStringBufAux(sb, s, 0) + +/** + */ +#define appendLineStringBuf(sb, s) appendStringBufAux(sb, s, 1) + +/** + */ +void appendStringBufAux(StringBuf sb, const char * s, int nl); + +#ifdef __cplusplus +} +#endif + +#endif /* _RPMSTRING_H_ */ |