-/* $Id: html.c,v 1.108 2010/07/21 20:35:03 kristaps Exp $ */
+/* $Id: html.c,v 1.112 2010/09/04 20:18:53 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
h = calloc(1, sizeof(struct html));
if (NULL == h) {
perror(NULL);
- exit(EXIT_FAILURE);
+ exit((int)MANDOCLEVEL_SYSERR);
}
h->type = type;
t = malloc(sizeof(struct tag));
if (NULL == t) {
perror(NULL);
- exit(EXIT_FAILURE);
+ exit((int)MANDOCLEVEL_SYSERR);
}
t->tag = tag;
t->next = h->tags.head;
printf(" ");
}
+ if ( ! (h->flags & HTML_NONOSPACE))
+ h->flags &= ~HTML_NOSPACE;
+ else
+ h->flags |= HTML_NOSPACE;
+
/* Print out the tag name and attributes. */
printf("<%s", htmltags[tag].name);
assert(word);
if ( ! print_encode(h, word, 0))
- h->flags &= ~HTML_NOSPACE;
+ if ( ! (h->flags & HTML_NONOSPACE))
+ h->flags &= ~HTML_NOSPACE;
/*
* Note that we don't process the pipe: the parser sees it as