MCPcopy Create free account
hub / github.com/NetHack/NetHack / cnf_parser_init

Function cnf_parser_init

src/cfgfiles.c:1661–1673  ·  view source on GitHub ↗

Initialize config parser data */

Source from the content-addressed store, hash-verified

1659
1660/* Initialize config parser data */
1661staticfn void
1662cnf_parser_init(struct _cnf_parser_state *parser)
1663{
1664 parser->rv = TRUE; /* assume successful parse */
1665 parser->ep = parser->buf = (char *) 0;
1666 parser->skip = FALSE;
1667 parser->morelines = FALSE;
1668 parser->inbufsz = 4 * BUFSZ;
1669 parser->inbuf = (char *) alloc(parser->inbufsz);
1670 parser->cont = FALSE;
1671 parser->pbreak = FALSE;
1672 memset(parser->inbuf, 0, parser->inbufsz);
1673}
1674
1675/* caller has finished with 'parser' (except for 'rv' so leave that intact) */
1676staticfn void

Callers 2

parse_conf_strFunction · 0.85
parse_conf_fileFunction · 0.85

Calls 1

allocFunction · 0.70

Tested by

no test coverage detected