version 1.9, 2011/04/03 10:05:37 |
version 1.14, 2011/04/30 10:18:24 |
|
|
* 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. |
*/ |
*/ |
|
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
|
#endif |
|
|
#include <sys/stat.h> |
#include <sys/stat.h> |
#include <sys/mman.h> |
#include <sys/mman.h> |
|
|
Line 138 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
Line 142 static const char * const mandocerrs[MANDOCERR_MAX] = |
|
"tab in non-literal context", |
"tab in non-literal context", |
"end of line whitespace", |
"end of line whitespace", |
"bad comment style", |
"bad comment style", |
"unknown escape sequence", |
"bad escape sequence", |
"unterminated quoted string", |
"unterminated quoted string", |
|
|
"generic error", |
"generic error", |
Line 350 mparse_buf_r(struct mparse *curp, struct buf blk, int |
|
Line 354 mparse_buf_r(struct mparse *curp, struct buf blk, int |
|
continue; |
continue; |
} |
} |
|
|
if ('"' == blk.buf[i + 1]) { |
if ('"' == blk.buf[i + 1] || '#' == blk.buf[i + 1]) { |
i += 2; |
i += 2; |
/* Comment, skip to end of line */ |
/* Comment, skip to end of line */ |
for (; i < (int)blk.sz; ++i) { |
for (; i < (int)blk.sz; ++i) { |
|
|
|
|
/* |
/* |
* If input parsers have not been allocated, do so now. |
* If input parsers have not been allocated, do so now. |
* We keep these instanced betwen parsers, but set them |
* We keep these instanced between parsers, but set them |
* locally per parse routine since we can use different |
* locally per parse routine since we can use different |
* parsers with each one. |
* parsers with each one. |
*/ |
*/ |
|
|
mparse_alloc(enum mparset inttype, enum mandoclevel wlevel, mandocmsg mmsg, void *arg) |
mparse_alloc(enum mparset inttype, enum mandoclevel wlevel, mandocmsg mmsg, void *arg) |
{ |
{ |
struct mparse *curp; |
struct mparse *curp; |
|
|
|
assert(wlevel <= MANDOCLEVEL_FATAL); |
|
|
curp = mandoc_calloc(1, sizeof(struct mparse)); |
curp = mandoc_calloc(1, sizeof(struct mparse)); |
|
|