aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/eqn.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-10-12 20:08:58 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-10-12 20:08:58 +0000
commit1e5949c792388e676eb6854670e69cb5b6586672 (patch)
tree5424f98636895ce19ca1548d8b47b770d4e1df81 /eqn.c
parent9bdc68b0e9c4ef307f52f16b3727a115cf20e060 (diff)
downloadmandoc-1e5949c792388e676eb6854670e69cb5b6586672.tar.gz
mandoc-1e5949c792388e676eb6854670e69cb5b6586672.tar.zst
mandoc-1e5949c792388e676eb6854670e69cb5b6586672.zip
bugfix: do not parse quoted strings for tokens; fixes glFrustum(3)
Diffstat (limited to 'eqn.c')
-rw-r--r--eqn.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/eqn.c b/eqn.c
index 0274e5f6..1cc0874a 100644
--- a/eqn.c
+++ b/eqn.c
@@ -1,6 +1,7 @@
-/* $Id: eqn.c,v 1.52 2014/10/12 19:31:41 schwarze Exp $ */
+/* $Id: eqn.c,v 1.53 2014/10/12 20:08:58 schwarze Exp $ */
/*
* Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -486,13 +487,22 @@ eqn_tok_parse(struct eqn_node *ep, char **p)
{
const char *start;
size_t i, sz;
+ int quoted;
if (NULL != p)
*p = NULL;
+ quoted = ep->data[ep->cur] == '"';
+
if (NULL == (start = eqn_nexttok(ep, &sz)))
return(EQN_TOK_EOF);
+ if (quoted) {
+ if (p != NULL)
+ *p = mandoc_strndup(start, sz);
+ return(EQN_TOK__MAX);
+ }
+
for (i = 0; i < EQN_TOK__MAX; i++) {
if (NULL == eqn_toks[i])
continue;