util: virxml: Fix formatting of virxml.h

Remove the "block" formatting of function declarations and use uniform
spacing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
Peter Krempa 2021-04-14 13:32:12 +02:00
parent 876f994db1
commit 6f29230a46

View File

@ -32,60 +32,80 @@
xmlXPathContextPtr virXMLXPathContextNew(xmlDocPtr xml)
G_GNUC_WARN_UNUSED_RESULT;
int virXPathBoolean(const char *xpath,
int
virXPathBoolean(const char *xpath,
xmlXPathContextPtr ctxt);
char * virXPathString(const char *xpath,
char *
virXPathString(const char *xpath,
xmlXPathContextPtr ctxt);
char * virXPathStringLimit(const char *xpath,
char *
virXPathStringLimit(const char *xpath,
size_t maxlen,
xmlXPathContextPtr ctxt);
int virXPathNumber(const char *xpath,
int
virXPathNumber(const char *xpath,
xmlXPathContextPtr ctxt,
double *value);
int virXPathInt(const char *xpath,
int
virXPathInt(const char *xpath,
xmlXPathContextPtr ctxt,
int *value);
int virXPathUInt(const char *xpath,
int
virXPathUInt(const char *xpath,
xmlXPathContextPtr ctxt,
unsigned int *value);
int virXPathLong(const char *xpath,
int
virXPathLong(const char *xpath,
xmlXPathContextPtr ctxt,
long *value);
int virXPathULong(const char *xpath,
int
virXPathULong(const char *xpath,
xmlXPathContextPtr ctxt,
unsigned long *value);
int virXPathULongLong(const char *xpath,
int
virXPathULongLong(const char *xpath,
xmlXPathContextPtr ctxt,
unsigned long long *value);
int virXPathLongLong(const char *xpath,
int
virXPathLongLong(const char *xpath,
xmlXPathContextPtr ctxt,
long long *value);
int virXPathLongHex(const char *xpath,
int
virXPathLongHex(const char *xpath,
xmlXPathContextPtr ctxt,
long *value);
int virXPathULongHex(const char *xpath,
int
virXPathULongHex(const char *xpath,
xmlXPathContextPtr ctxt,
unsigned long *value);
xmlNodePtr virXPathNode(const char *xpath,
xmlNodePtr
virXPathNode(const char *xpath,
xmlXPathContextPtr ctxt);
int virXPathNodeSet(const char *xpath,
int
virXPathNodeSet(const char *xpath,
xmlXPathContextPtr ctxt,
xmlNodePtr **list);
char * virXMLPropString(xmlNodePtr node,
char *
virXMLPropString(xmlNodePtr node,
const char *name);
char * virXMLPropStringLimit(xmlNodePtr node,
char *
virXMLPropStringLimit(xmlNodePtr node,
const char *name,
size_t maxlen);
char * virXMLNodeContentString(xmlNodePtr node);
char *
virXMLNodeContentString(xmlNodePtr node);
/* Internal function; prefer the macros below. */
xmlDocPtr virXMLParseHelper(int domcode,
xmlDocPtr
virXMLParseHelper(int domcode,
const char *filename,
const char *xmlStr,
const char *url,
xmlXPathContextPtr *pctxt);
const char *virXMLPickShellSafeComment(const char *str1, const char *str2);
const char *
virXMLPickShellSafeComment(const char *str1,
const char *str2);
/**
* virXMLParse:
* @filename: file to parse, or NULL for string parsing
@ -164,30 +184,39 @@ const char *virXMLPickShellSafeComment(const char *str1, const char *str2);
#define virXMLParseFileCtxt(filename, pctxt) \
virXMLParseHelper(VIR_FROM_THIS, filename, NULL, NULL, pctxt)
int virXMLSaveFile(const char *path,
int
virXMLSaveFile(const char *path,
const char *warnName,
const char *warnCommand,
const char *xml);
char *virXMLNodeToString(xmlDocPtr doc, xmlNodePtr node);
char *
virXMLNodeToString(xmlDocPtr doc,
xmlNodePtr node);
bool virXMLNodeNameEqual(xmlNodePtr node,
bool
virXMLNodeNameEqual(xmlNodePtr node,
const char *name);
xmlNodePtr virXMLFindChildNodeByNs(xmlNodePtr root,
xmlNodePtr
virXMLFindChildNodeByNs(xmlNodePtr root,
const char *uri);
int virXMLExtractNamespaceXML(xmlNodePtr root,
int
virXMLExtractNamespaceXML(xmlNodePtr root,
const char *uri,
char **doc);
int virXMLInjectNamespace(xmlNodePtr node,
int
virXMLInjectNamespace(xmlNodePtr node,
const char *uri,
const char *key);
void virXMLNodeSanitizeNamespaces(xmlNodePtr node);
void
virXMLNodeSanitizeNamespaces(xmlNodePtr node);
int virXMLCheckIllegalChars(const char *nodeName,
int
virXMLCheckIllegalChars(const char *nodeName,
const char *str,
const char *illegal);
@ -255,9 +284,11 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(xmlXPathContext, xmlXPathFreeContext);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(xmlBuffer, xmlBufferFree);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(xmlNode, xmlFreeNode);
typedef int (*virXMLNamespaceParse)(xmlXPathContextPtr ctxt, void **nsdata);
typedef int (*virXMLNamespaceParse)(xmlXPathContextPtr ctxt,
void **nsdata);
typedef void (*virXMLNamespaceFree)(void *nsdata);
typedef int (*virXMLNamespaceFormat)(virBuffer *buf, void *nsdata);
typedef int (*virXMLNamespaceFormat)(virBuffer *buf,
void *nsdata);
typedef const char *(*virXMLNamespaceHref)(void);
struct _virXMLNamespace {
@ -276,7 +307,8 @@ int
virXMLNamespaceRegister(xmlXPathContextPtr ctxt,
virXMLNamespace const *ns);
int virParseScaledValue(const char *xpath,
int
virParseScaledValue(const char *xpath,
const char *units_xpath,
xmlXPathContextPtr ctxt,
unsigned long long *val,