version 1.104, 2009/08/22 08:56:16 |
version 1.106, 2009/09/23 11:53:45 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
|
#include <sys/types.h> |
|
|
#include <assert.h> |
#include <assert.h> |
#include <ctype.h> |
#include <ctype.h> |
#include <stdarg.h> |
#include <stdarg.h> |
Line 230 mdoc_free(struct mdoc *mdoc) |
|
Line 232 mdoc_free(struct mdoc *mdoc) |
|
{ |
{ |
|
|
mdoc_free1(mdoc); |
mdoc_free1(mdoc); |
if (mdoc->htab) |
|
mdoc_hash_free(mdoc->htab); |
|
free(mdoc); |
free(mdoc); |
} |
} |
|
|
Line 249 mdoc_alloc(void *data, int pflags, const struct mdoc_c |
|
Line 249 mdoc_alloc(void *data, int pflags, const struct mdoc_c |
|
if (cb) |
if (cb) |
(void)memcpy(&p->cb, cb, sizeof(struct mdoc_cb)); |
(void)memcpy(&p->cb, cb, sizeof(struct mdoc_cb)); |
|
|
|
mdoc_hash_init(); |
|
|
p->data = data; |
p->data = data; |
p->pflags = pflags; |
p->pflags = pflags; |
|
|
if (NULL == (p->htab = mdoc_hash_alloc())) { |
if (mdoc_alloc1(p)) |
free(p); |
|
return(NULL); |
|
} else if (mdoc_alloc1(p)) |
|
return(p); |
return(p); |
|
|
free(p); |
free(p); |
Line 725 parsemacro(struct mdoc *m, int ln, char *buf) |
|
Line 724 parsemacro(struct mdoc *m, int ln, char *buf) |
|
return(1); |
return(1); |
} |
} |
|
|
if (MDOC_MAX == (c = mdoc_hash_find(m->htab, mac))) { |
if (MDOC_MAX == (c = mdoc_hash_find(mac))) { |
if ( ! macrowarn(m, ln, mac)) |
if ( ! macrowarn(m, ln, mac)) |
goto err; |
goto err; |
return(1); |
return(1); |