mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
In some places when generating XML output in C code we use some clever
macros:
start_element ("memory") {
attribute ("unit", "MiB");
string_format ("%d", g->memsize);
} end_element ();
This commit which is mostly refactoring moves the repeated definitions
of these macros into a common header file.
I also took this opportunity to change / clean up the macros:
- The macros are now documented properly.
- comment() and empty_element() macros are now available everywhere.
- Error handling has been made generic.
- Added do..while(0) around some of the macros to make them safe to
use in all contexts.
This directory contains miscellaneous manual pages which don't fit elsewhere. Most libguestfs documentation is in manual pages. The source for those manual pages are POD files (*.pod), and they are normally located next to the source files they relate to (eg. guestfish documentation is in fish/guestfish.pod). All manual pages are available online at http://libguestfs.org/ The main API documentation is: http://libguestfs.org/guestfs.3.html