rpm 5.2.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
rpmiob.c File Reference
RPMIO.
`#include "system.h"`
`#include <rpmiotypes.h>`
`#include <rpmio.h>`
`#include "debug.h"`
Include dependency graph for rpmiob.c:

Go to the source code of this file.

## Macros
#define | _RPMIOB_INTERNAL

## Functions
static void | rpmiobFini (void *_iob)
static rpmiob | rpmiobGetPool (rpmioPool pool)
rpmiob | rpmiobNew (size_t len)
| Create an I/O buffer. More...
rpmiob | rpmiobEmpty (rpmiob iob)
| Empty an I/O buffer. More...
rpmiob | rpmiobRTrim (rpmiob iob)
| Trim trailing white space. More...
rpmiob | rpmiobAppend (rpmiob iob, const char *s, size_t nl)
| Append string to I/O buffer. More...
rpmuint8_t * | rpmiobBuf (rpmiob iob)
| Return I/O buffer. More...
char * | rpmiobStr (rpmiob iob)
| Return I/O buffer (as string). More...
size_t | rpmiobLen (rpmiob iob)
| Return I/O buffer len. More...
int | rpmiobSlurp (const char *fn, rpmiob *iobp)

## Variables
size_t | _rpmiob_chunk = 1024
int | _rpmiob_debug
rpmioPool | _rpmiobPool

## Macro Definition Documentation

#define _RPMIOB_INTERNAL

Definition at line 5 of file rpmiob.c.

## Function Documentation

rpmiob rpmiobAppend | ( | rpmiob | iob,
|  | const char * | s,
|  | size_t | nl
| ) |  |

Append string to I/O buffer.

Parameters

  iob | I/O buffer
  s | string
  nl | append NL?

Returns
  I/O buffer

Definition at line 70 of file rpmiob.c.

References _rpmiob_chunk, stpcpy(), and xrealloc().

Referenced by addFileToTag(), addFileToTagAux(), checkUnpackagedFiles(), doPatchMacro(), doSetupMacro(), fiIntersect(), getOutputFrom(), initSourceHeader(), parseBuildInstallClean(), parseChangelog(), parseDescription(), parseFiles(), parseForSimple(), parsePrep(), parseScript(), pkgUnpackagedSubdirs(), processPackageFiles(), rpmcliEvalSlurp(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), rpmfcHelper(), and rpmReadPackageManifest().

rpmuint8_t* rpmiobBuf | ( | rpmiob | iob | ) |

Return I/O buffer.

Parameters

  iob | I/O buffer

Returns
  I/O buffer (as string)

Definition at line 93 of file rpmiob.c.

rpmiob rpmiobEmpty | ( | rpmiob | iob | ) |

Empty an I/O buffer.

Parameters

  iob | I/O buffer

Returns
  I/O buffer

Definition at line 53 of file rpmiob.c.

Referenced by rpmfcGenerateScriptletDeps().

static void rpmiobFini | ( | void * | _iob | ) |
| static

Definition at line 16 of file rpmiob.c.

References _free().

Referenced by rpmiobGetPool().

static rpmiob rpmiobGetPool | ( | rpmioPool | pool | ) |
| static

Definition at line 28 of file rpmiob.c.

References _rpmiob_debug, _rpmiobPool, rpmiobFini(), rpmioGetPool(), and rpmioNewPool().

Referenced by rpmiobNew(), and rpmiobSlurp().

size_t rpmiobLen | ( | rpmiob | iob | ) |

Return I/O buffer len.

Parameters

  iob | I/O buffer

Returns
  I/O buffer length

Definition at line 109 of file rpmiob.c.

Referenced by rpmfcExec().

rpmiob rpmiobNew | ( | size_t | len | ) |

Create an I/O buffer.

Parameters

  len | no. of octets to allocate

Returns
  new I/O buffer

Definition at line 42 of file rpmiob.c.

References _rpmiob_chunk, rpmiobGetPool(), rpmiobLink(), and xcalloc().

Referenced by addFileToArrayTag(), addFileToTag(), checkUnpackagedFiles(), doSetupMacro(), fiIntersect(), getOutputFrom(), initSourceHeader(), parseBuildInstallClean(), parseChangelog(), parseDescription(), parseFiles(), parseForSimple(), parsePrep(), parseScript(), pkgUnpackagedSubdirs(), processSourceFiles(), rpmcliEvalSlurp(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), rpmfcHelper(), rpmkuFindPubkey(), rpmReadPackageManifest(), and rpmtsFindPubkey().

rpmiob rpmiobRTrim | ( | rpmiob | iob | ) |

Trim trailing white space.

Parameters

  iob | I/O buffer

Returns
  I/O buffer

Definition at line 61 of file rpmiob.c.

References xisspace().

Referenced by parseDescription(), parseScript(), and rpmfcGenerateScriptletDeps().

int rpmiobSlurp | ( | const char * | fn,
|  | rpmiob * | iobp
| ) |  |

Definition at line 114 of file rpmiob.c.

References _free(), Fclose(), Ferror(), Fileno(), Fopen(), Fread(), Fstat(), rpmiobGetPool(), xmalloc(), and xrealloc().

Referenced by pgpReadPkts(), processMetadataFile(), rpmcliEvalSlurp(), rpmdcParseZeroInstall(), rpmdsCpuinfo(), rpmnsProbeSignature(), and rpmPlatform().

char* rpmiobStr | ( | rpmiob | iob | ) |

Return I/O buffer (as string).

Parameters

  iob | I/O buffer

Returns
  I/O buffer (as string)

Definition at line 101 of file rpmiob.c.

Referenced by addChangelog(), addFileToArrayTag(), addFileToTag(), checkUnpackagedFiles(), doSetupMacro(), fiIntersect(), initSourceHeader(), initSourceHeaderScriptlet(), parseDescription(), parsePrep(), parseScript(), pkgUnpackagedSubdirs(), processPackageFiles(), processSourceFiles(), rpmfcExec(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), rpmfcHelper(), rpmReadPackageManifest(), spec_get_build(), spec_get_check(), spec_get_clean(), spec_get_install(), and spec_get_prep().

## Variable Documentation

int _rpmiob_debug

Definition at line 14 of file rpmiob.c.

Referenced by rpmiobGetPool().

rpmioPool _rpmiobPool

Definition at line 26 of file rpmiob.c.

Referenced by rpmiobGetPool(), and rpmioClean().