version 1.72, 2009/10/30 18:43:24 |
version 1.75, 2009/10/31 06:10:57 |
|
|
|
|
#include <assert.h> |
#include <assert.h> |
#include <ctype.h> |
#include <ctype.h> |
#include <err.h> |
|
#include <stdio.h> |
#include <stdio.h> |
#include <stdarg.h> |
#include <stdarg.h> |
#include <stdint.h> |
#include <stdint.h> |
Line 102 html_alloc(char *outopts) |
|
Line 101 html_alloc(char *outopts) |
|
|
|
h = calloc(1, sizeof(struct html)); |
h = calloc(1, sizeof(struct html)); |
if (NULL == h) { |
if (NULL == h) { |
fprintf(stderr, "memory exhausted\n"); |
perror(NULL); |
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |
} |
} |
|
|
Line 355 print_otag(struct html *h, enum htmltag tag, |
|
Line 354 print_otag(struct html *h, enum htmltag tag, |
|
if ( ! (HTML_NOSTACK & htmltags[tag].flags)) { |
if ( ! (HTML_NOSTACK & htmltags[tag].flags)) { |
t = malloc(sizeof(struct tag)); |
t = malloc(sizeof(struct tag)); |
if (NULL == t) { |
if (NULL == t) { |
fprintf(stderr, "memory exhausted\n"); |
perror(NULL); |
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |
} |
} |
t->tag = tag; |
t->tag = tag; |
Line 673 html_idcat(char *dst, const char *src, int sz) |
|
Line 672 html_idcat(char *dst, const char *src, int sz) |
|
sz--; |
sz--; |
|
|
for ( ; *src != '\0' && sz > 1; src++) { |
for ( ; *src != '\0' && sz > 1; src++) { |
ssz = snprintf(dst, sz, "%.2x", *src); |
ssz = snprintf(dst, (size_t)sz, "%.2x", *src); |
sz -= ssz; |
sz -= ssz; |
dst += ssz; |
dst += ssz; |
} |
} |