# lib/stringbuf.h File Reference

More...

Go to the source code of this file.

## Defines

#define | appendStringBuf(sb, s) appendStringBufAux(sb, s, 0)
#define | appendLineStringBuf(sb, s) appendStringBufAux(sb, s, 1)

## Typedefs

typedef StringBufRec * | StringBuf

## Functions

StringBuf | newStringBuf (void)
StringBuf | freeStringBuf (StringBuf sb)
void | truncStringBuf (StringBuf sb)
char * | getStringBuf (StringBuf sb)
void | stripTrailingBlanksStringBuf (StringBuf sb)
void | appendStringBufAux (StringBuf sb, const char *s, int nl)

## Detailed Description

Definition in file stringbuf.h.

## Define Documentation

#define appendLineStringBuf | ( | sb,
|  | s |  | ) | appendStringBufAux(sb, s, 1)

| Definition at line 48 of file stringbuf.h. Referenced by addFileToTag(), doPatchMacro(), doSetupMacro(), generateDepends(), parseDescription(), parseForSimple(), parsePrep(), and processSourceFiles().

#define appendStringBuf | ( | sb,
|  | s |  | ) | appendStringBufAux(sb, s, 0)

| Definition at line 44 of file stringbuf.h. Referenced by addFileToTagAux(), doSetupMacro(), generateDepends(), getOutputFrom(), parseBuildInstallClean(), parseChangelog(), parseFiles(), parseForSimple(), parsePrep(), parseScript(), processPackageFiles(), and rpmReadPackageManifest().

## Typedef Documentation

typedef struct StringBufRec* StringBuf

Definition at line 10 of file stringbuf.h.

Referenced by addChangelog(), addFileToArrayTag(), addFileToTag(), addFileToTagAux(), appendStringBufAux(), doScript(), doSetupMacro(), freeStringBuf(), generateDepends(), getOutputFrom(), getStringBuf(), newStringBuf(), parseBuildInstallClean(), parseChangelog(), parseDescription(), parsePrep(), parseScript(), processSourceFiles(), rpmReadPackageManifest(), stripTrailingBlanksStringBuf(), and truncStringBuf().

## Function Documentation

void appendStringBufAux | ( | StringBuf | sb,
|  | const char * | s,
|  | int | nl
| ) |

| Definition at line 83 of file stringbuf.c. References StringBufRec::allocated, StringBufRec::buf, BUF_CHUNK, StringBufRec::free, StringBuf, StringBufRec::tail, and xrealloc().

StringBuf freeStringBuf | ( | StringBuf | sb | ) |

| Definition at line 50 of file stringbuf.c. References _free(), StringBufRec::buf, and StringBuf. Referenced by addFileToArrayTag(), addFileToTag(), addFileToTagAux(), doSetupMacro(), freePackage(), freeSpec(), generateDepends(), parseChangelog(), parseDescription(), parsePrep(), parseScript(), processSourceFiles(), and rpmReadPackageManifest().

char* getStringBuf | ( | StringBuf | sb | ) |

| Definition at line 78 of file stringbuf.c. References StringBufRec::buf, and StringBuf. Referenced by addChangelog(), addFileToArrayTag(), addFileToTag(), doScript(), doSetupMacro(), generateDepends(), parseDescription(), parsePrep(), parseScript(), processPackageFiles(), processSourceFiles(), and rpmReadPackageManifest().

StringBuf newStringBuf | ( | void |  | ) |

Definition at line 38 of file stringbuf.c.

References StringBufRec::allocated, StringBufRec::buf, BUF_CHUNK, StringBufRec::free, StringBuf, StringBufRec::tail, xcalloc(), and xmalloc().

Referenced by addFileToArrayTag(), addFileToTag(), doSetupMacro(), generateDepends(), getOutputFrom(), parseBuildInstallClean(), parseChangelog(), parseDescription(), parseFiles(), parseForSimple(), parsePrep(), parseScript(), processSourceFiles(), and rpmReadPackageManifest().

void stripTrailingBlanksStringBuf | ( | StringBuf | sb | ) |

| Definition at line 66 of file stringbuf.c. References StringBufRec::allocated, StringBufRec::free, StringBuf, StringBufRec::tail, and xisspace(). Referenced by parseDescription(), and parseScript().

void truncStringBuf | ( | StringBuf | sb | ) |

| Definition at line 59 of file stringbuf.c. References StringBufRec::allocated, StringBufRec::buf, StringBufRec::free, StringBuf, and StringBufRec::tail.