version 1.7, 2009/03/06 14:13:47 |
version 1.9, 2009/03/08 19:47:41 |
Line 35 extern size_t strlcpy(char *, const char *, size_t); |
|
Line 35 extern size_t strlcpy(char *, const char *, size_t); |
|
|
|
|
|
int |
int |
xstrncmp(const char *p1, const char *p2, size_t sz) |
|
{ |
|
|
|
return(0 == strncmp(p1, p2, sz)); |
|
} |
|
|
|
int |
|
xstrcmp(const char *p1, const char *p2) |
xstrcmp(const char *p1, const char *p2) |
{ |
{ |
|
|
Line 103 xstrlcpys(char *buf, const struct mdoc_node *n, size_t |
|
Line 96 xstrlcpys(char *buf, const struct mdoc_node *n, size_t |
|
|
|
for ( ; n; n = n->next) { |
for ( ; n; n = n->next) { |
assert(MDOC_TEXT == n->type); |
assert(MDOC_TEXT == n->type); |
p = n->data.text.string; |
p = n->string; |
if ( ! xstrlcat(buf, p, sz)) |
if ( ! xstrlcat(buf, p, sz)) |
return(0); |
return(0); |
if (n->next && ! xstrlcat(buf, " ", sz)) |
if (n->next && ! xstrlcat(buf, " ", sz)) |