Internal
[COMMON]

Functions to be used from within the OpenSCAP library. More...

Data Structures

struct  oscap_text_traits
 oscap_text traits More...
struct  oscap_text
 Representation of internationalizable character strings. More...

Variables

bool oscap_text_traits::can_override: 1
  can override parent's value.
bool oscap_text_traits::can_substitute: 1
 can proces the sub element and such
bool oscap_text_traits::overrides: 1
 overrides parent's value
char * oscap_text::text
struct oscap_text_traits oscap_text::traits

Debugging



int __debuglog_level
void __oscap_dprintf (const char *, const char *, size_t, const char *,...)
#define oscap_dprintf(...)   __oscap_dprintf (__FILE__, __PRETTY_FUNCTION__, __LINE__, __VA_ARGS__)
#define OSCAP_DEBUG_FILE   "oscap_debug.log"
#define OSCAP_DEBUG_FILE_ENV   "OSCAP_DEBUG_FILE"
#define OSCAP_DEBUG_LEVEL_ENV   "OSCAP_DEBUG_LEVEL"
#define debug(l)   if ((__debuglog_level = (__debuglog_level == -1 ? atoi (getenv (OSCAP_DEBUG_LEVEL_ENV) == NULL ? "0" : getenv (OSCAP_DEBUG_LEVEL_ENV)) : __debuglog_level)) && __debuglog_level >= (l))
#define oscap_dlprintf(l,...)   do { debug(l) { oscap_dprintf(__VA_ARGS__); }} while(0)

oscap_text internals



 OSCAP_HIDDEN_START
struct oscap_text_traits OSCAP_TEXT_TRAITS_PLAIN
 Basic traits for plain text.
struct oscap_text_traits OSCAP_TEXT_TRAITS_HTML
 Basic traits for HTML text.
 OSCAP_HIDDEN_END
struct oscap_textoscap_text_new_full (struct oscap_text_traits traits, const char *string, const char *lang)
 full-featured constructor
struct oscap_textoscap_text_new_parse (struct oscap_text_traits traits, xmlTextReaderPtr reader)
 Return a new string by parsing an xml element.

Memory allocation



void * __oscap_alloc_dbg (size_t s, const char *f, size_t l)
__P void * oscap_alloc (size_t s)
void * __oscap_calloc_dbg (size_t n, size_t s, const char *f, size_t l)
__P void * oscap_calloc (size_t n, size_t s)
void * __oscap_realloc_dbg (void *p, size_t s, const char *f, size_t l)
__P void * oscap_realloc (void *p, size_t s)
void * __oscap_reallocf_dbg (void *p, size_t s, const char *f, size_t l)
__P void * oscap_reallocf (void *p, size_t s)
void __oscap_free_dbg (void **p, const char *f, size_t l)
__P void oscap_free (void *p)
#define __P   __attribute__ ((unused)) static
#define oscap_alloc(s)   __oscap_alloc_dbg (s, __PRETTY_FUNCTION__, __LINE__)
 malloc wrapper
#define oscap_calloc(n, s)   __oscap_calloc_dbg (n, s, __PRETTY_FUNCTION__, __LINE__)
 calloc wrapper
#define oscap_realloc(p, s)   __oscap_realloc_dbg ((void *)(p), s, __PRETTY_FUNCTION__, __LINE__)
 realloc wrapper
#define oscap_reallocf(p, s)   __oscap_reallocf_dbg ((void *)(p), s, __PRETTY_FUNCTION__, __LINE__)
 realloc wrapper freeing old memory on failure
#define oscap_free(p)   __oscap_free_dbg ((void **)((void *)&(p)), __PRETTY_FUNCTION__, __LINE__)
 free wrapper
#define oscap_talloc(T)   ((T *) oscap_alloc(sizeof(T)))
#define oscap_valloc(v)   ((typeof(v) *) oscap_alloc(sizeof v))
#define _A(x)   assert(x)

Detailed Description

Functions to be used from within the OpenSCAP library.


Function Documentation

struct oscap_text* oscap_text_new_full ( struct oscap_text_traits  traits,
const char *  string,
const char *  lang 
) [read]

full-featured constructor

Parameters:
traits text features
string text data
lang text language

Generated on 26 Feb 2010 for Open SCAP Library by  doxygen 1.6.1