Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

lib/formats.c File Reference

More...

#include "system.h"
#include <rpmlib.h>
#include <rpmmacro.h>
#include "misc.h"
#include "debug.h"

Go to the source code of this file.

Functions

char* permsString (int mode)
 Return ls-like formatted mode string. More...

char* triggertypeFormat (int_32 type, const void * data, char * formatPrefix, int padding, int element)
char* permsFormat (int_32 type, const void * data, char * formatPrefix, int padding, int element)
char* fflagsFormat (int_32 type, const void * data, char * formatPrefix, int padding, int element)
char* depflagsFormat (int_32 type, const void * data, char * formatPrefix, int padding, int element)
int fsnamesTag ( Header h, int_32 * type, void ** data, int_32 * count, int * freeData)
int instprefixTag (Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)
int fssizesTag (Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)
int triggercondsTag (Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)
int triggertypeTag (Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)
int filenamesTag (Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)
int i18nTag (Header h, int_32 tag, int_32 * type, const void ** data, int_32 * count, int * freeData)
int summaryTag (Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)
int descriptionTag (Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)
int groupTag (Header h, int_32 * type, const void ** data, int_32 * count, int * freeData)

Variables

int _nl_msg_cat_cntr
const char* language = "LANGUAGE"
char* _macro_i18ndomains = "%{?_i18ndomains:%{_i18ndomains}}"
const struct headerSprintfExtension rpmHeaderFormats []
 Table of query format extensions. More...


Detailed Description

Definition in file formats.c.


Function Documentation

char * depflagsFormat ( int_32 type,
const void * data,
char * formatPrefix,
int padding,
int element ) [static]
 

Parameters:
type   tag type
data   tag value
formatPrefix  
padding  
element   (unused)
Returns:
formatted string

Definition at line 173 of file formats.c.

Referenced by triggercondsTag().

int descriptionTag ( Header h,
int_32 * type,
const void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 568 of file formats.c.

char * fflagsFormat ( int_32 type,
const void * data,
char * formatPrefix,
int padding,
int element ) [static]
 

Parameters:
type   tag type
data   tag value
formatPrefix  
padding  
element   (unused)
Returns:
formatted string

Definition at line 132 of file formats.c.

int filenamesTag ( Header h,
int_32 * type,
const void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 437 of file formats.c.

int fsnamesTag ( Header h,
int_32 * type,
void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 209 of file formats.c.

int fssizesTag ( Header h,
int_32 * type,
const void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 266 of file formats.c.

int groupTag ( Header h,
int_32 * type,
const void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 584 of file formats.c.

int i18nTag ( Header h,
int_32 tag,
int_32 * type,
const void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
tag   tag
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 468 of file formats.c.

Referenced by descriptionTag(), groupTag(), and summaryTag().

int instprefixTag ( Header h,
int_32 * type,
const void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 236 of file formats.c.

char * permsFormat ( int_32 type,
const void * data,
char * formatPrefix,
int padding,
int element ) [static]
 

Parameters:
type   tag type
data   tag value
formatPrefix  
padding  
element   (unused)
Returns:
formatted string

Definition at line 104 of file formats.c.

char * permsString ( int mode ) [static]
 

Return ls-like formatted mode string.

Parameters:
mode   file mode
Returns:
formatted mode string (malloc'ed)

Definition at line 16 of file formats.c.

Referenced by permsFormat(), and printFileInfo().

int summaryTag ( Header h,
int_32 * type,
const void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 552 of file formats.c.

int triggercondsTag ( Header h,
int_32 * type,
const void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 317 of file formats.c.

char * triggertypeFormat ( int_32 type,
const void * data,
char * formatPrefix,
int padding,
int element ) [static]
 

Parameters:
type   tag type
data   tag value
formatPrefix   (unused)
padding   (unused)
element   (unused)
Returns:
formatted string

Definition at line 78 of file formats.c.

int triggertypeTag ( Header h,
int_32 * type,
const void ** data,
int_32 * count,
int * freeData ) [static]
 

Parameters:
h   header
Return values:
type   address of tag type
data   address of tag value pointer
count   address of no. of data items
freedata   address of data-was-malloc'ed indicator
Returns:
0 on success

Definition at line 387 of file formats.c.


Variable Documentation

char * _macro_i18ndomains = "%{?_i18ndomains:%{_i18ndomains}}" [static]
 

Definition at line 457 of file formats.c.

int _nl_msg_cat_cntr
 

Definition at line 454 of file formats.c.

const char * language = "LANGUAGE" [static]
 

Definition at line 455 of file formats.c.

const struct headerSprintfExtension rpmHeaderFormats[]
 

Initializer:

{
    { HEADER_EXT_TAG, "RPMTAG_GROUP", { groupTag } },
    { HEADER_EXT_TAG, "RPMTAG_DESCRIPTION", { descriptionTag } },
    { HEADER_EXT_TAG, "RPMTAG_SUMMARY", { summaryTag } },
    { HEADER_EXT_TAG, "RPMTAG_FILENAMES", { filenamesTag } },
    { HEADER_EXT_TAG, "RPMTAG_FSSIZES", { fssizesTag } },
    { HEADER_EXT_TAG, "RPMTAG_FSNAMES", { fsnamesTag } },
    { HEADER_EXT_TAG, "RPMTAG_INSTALLPREFIX", { instprefixTag } },
    { HEADER_EXT_TAG, "RPMTAG_TRIGGERCONDS", { triggercondsTag } },
    { HEADER_EXT_TAG, "RPMTAG_TRIGGERTYPE", { triggertypeTag } },
    { HEADER_EXT_FORMAT, "depflags", { depflagsFormat } },
    { HEADER_EXT_FORMAT, "fflags", { fflagsFormat } },
    { HEADER_EXT_FORMAT, "perms", { permsFormat } },
    { HEADER_EXT_FORMAT, "permissions", { permsFormat } },
    { HEADER_EXT_FORMAT, "triggertype", { triggertypeFormat } },
    { HEADER_EXT_MORE, NULL, { (void *) headerDefaultFormats } }
}
Table of query format extensions.

Note:
Chains to headerDefaultFormats[].

Definition at line 592 of file formats.c.


Generated at Sun Apr 8 18:43:03 2001 for rpm by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000