rpm 5.2.1

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

- File List
- Globals

Macros | Functions
parseChangelog.c File Reference
RPMBUILD.

Parse changelog section from spec file. More...

`#include "system.h"`
`#include <rpmio.h>`
`#include <rpmiotypes.h>`
`#include <rpmlog.h>`
`#include "rpmbuild.h"`
`#include "debug.h"`
Include dependency graph for parseChangelog.c:

Go to the source code of this file.

## Macros
#define | mySKIPSPACE(s) { while (*(s) && isspace(*(s))) (s)++; }
#define | mySKIPNONSPACE(s) { while (*(s) && !isspace(*(s))) (s)++; }

## Functions
void | addChangelogEntry (Header h, time_t time, const char *name, const char *text)
| Add changelog entry to header. More...
static int | dateToTimet (const char *datestr, time_t *secs)
| Parse date string to seconds. More...
time_t | get_date (const char *p, void *now)
static rpmRC | addChangelog (Header h, rpmiob iob)
| Add changelog section to header. More...
int | parseChangelog (Spec spec)
| Parse %changelog section of a spec file. More...

## Detailed Description

Parse changelog section from spec file.

Definition in file parseChangelog.c.

## Macro Definition Documentation

#define mySKIPNONSPACE | ( |  | s | ) | { while (*(s) && !isspace(*(s))) (s)++; }

Definition at line 15 of file parseChangelog.c.

Referenced by addChangelog(), and dateToTimet().

#define mySKIPSPACE | ( |  | s | ) | { while (*(s) && isspace(*(s))) (s)++; }

Definition at line 14 of file parseChangelog.c.

Referenced by addChangelog(), and dateToTimet().

## Function Documentation

static rpmRC addChangelog | ( | Header | h,
|  | rpmiob | iob
| ) |  |
| static

Add changelog section to header.

Parameters

  h | header
  iob | changelog strings

Returns
  RPMRC_OK on success

Definition at line 135 of file parseChangelog.c.

References _, _free(), addChangelogEntry(), dateToTimet(), get_date(), mySKIPNONSPACE, mySKIPSPACE, name, rpmExpand(), rpmiobStr(), rpmlog(), RPMLOG_ERR, RPMRC_FAIL, and xisspace().

Referenced by parseChangelog().

static int dateToTimet | ( | const char * | datestr,
|  | time_t * | secs
| ) |  |
| static

Parse date string to seconds.

Parameters

  datestr | date string (e.g. 'Wed Jan 1 1997')

Return values

  secs | secs since the unix epoch

Returns
  0 on success, -1 on error

Definition at line 54 of file parseChangelog.c.

References alloca(), mySKIPNONSPACE, and mySKIPSPACE.

Referenced by addChangelog().

time_t get_date | ( | const char * | p,
|  | void * | now
| ) |  |

Referenced by addChangelog(), and installArgCallback().