rpm
5.4.15
|
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"
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)++; } |
#define | CVS_RCSID "$""Log: " |
#define | CVS_REVISION "Revision " |
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... | |
Parse changelog section from spec file.
Definition in file parseChangelog.c.
#define CVS_RCSID "$""Log: " |
Definition at line 17 of file parseChangelog.c.
Referenced by addChangelog().
#define CVS_REVISION "Revision " |
Definition at line 18 of file parseChangelog.c.
Referenced by addChangelog().
#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().
Add changelog section to header.
h | header |
iob | changelog strings |
Definition at line 138 of file parseChangelog.c.
References _, _free(), addChangelogEntry(), CVS_RCSID, CVS_REVISION, dateToTimet(), get_date(), i, mySKIPNONSPACE, mySKIPSPACE, name, out, rpmExpand(), rpmExpandNumeric(), rpmiobStr(), rpmlog(), RPMLOG_ERR, RPMLOG_WARNING, RPMRC_FAIL, time, and xisspace().
Referenced by parseChangelog().
void addChangelogEntry | ( | Header | h, |
time_t | time, | ||
const char * | name, | ||
const char * | text | ||
) |
Add changelog entry to header.
h | header |
time | time of change |
name | person who made the change |
text | description of change |
Definition at line 20 of file parseChangelog.c.
References alloca(), _HE_s::append, rpmDataType_u::argv, _HE_s::c, headerPut(), name, _HE_s::p, RPM_STRING_ARRAY_TYPE, RPM_UINT32_TYPE, RPMTAG_CHANGELOGNAME, RPMTAG_CHANGELOGTEXT, RPMTAG_CHANGELOGTIME, _HE_s::t, _HE_s::tag, and rpmDataType_u::ui32p.
Referenced by addChangelog().
|
static |
Parse date string to seconds.
datestr | date string (e.g. 'Wed Jan 1 1997') |
secs | secs since the unix epoch |
Definition at line 57 of file parseChangelog.c.
References alloca(), mySKIPNONSPACE, mySKIPSPACE, and secs.
Referenced by addChangelog().
time_t get_date | ( | const char * | p, |
void * | now | ||
) |
Referenced by addChangelog().
int parseChangelog | ( | Spec | spec | ) |
Parse %changelog section of a spec file.
spec | spec file control structure |
Definition at line 302 of file parseChangelog.c.
References _free(), addChangelog(), Spec_s::clean, Package_s::header, isPart(), Spec_s::line, Spec_s::packages, PART_CLEAN, PART_NONE, readLine(), rpmiobAppend(), rpmiobFree(), rpmiobNew(), RPMRC_OK, STRIP_COMMENTS, STRIP_NOEXPAND, xstrdup(), and xstrtolocale().
Referenced by parseSpec().