-#define prstr(string) do { \
- int len = strlen(string); \
- if(linelen+len >= MARGIN) { \
- newline(); \
- ap_snprintf(line, sizeof(line), "%*s", indent, ""); \
- linelen = indent; \
- } \
- line[sizeof(line)-1] = '\0'; \
- strncat(line, (string), sizeof(line)-strlen(line)); \
- linelen += len; \
-} while (0)
-
-/* Print a text "variable" */
-#define prvar(var, val) do { \
- str = newvstralloc(str, (var), "=\\\"", (val), "\\\"", NULL); \
- prstr(str); \
-} while(0)
-
-/* Print a undef "variable" */
-#define prundefvar(var) do { \
- str = newvstralloc(str, (var), "=UNDEF", NULL); \
- prstr(str); \
-} while(0)
-
-/* Print a numeric "variable" */
-#define prnum(var, val) do { \
- char number[NUM_STR_SIZE]; \
- ap_snprintf(number, sizeof(number), "%ld", (long)(val)); \
- str = newvstralloc(str, (var), "=", number, NULL); \
- prstr(str); \
-} while(0)
-
-int main()