version 1.18, 2015/01/26 13:03:48 |
version 1.23, 2018/12/13 02:06:07 |
|
|
#include <string.h> |
#include <string.h> |
|
|
#include "mandoc.h" |
#include "mandoc.h" |
|
#include "tbl.h" |
#include "libmandoc.h" |
#include "libmandoc.h" |
#include "libroff.h" |
#include "tbl_int.h" |
|
|
#define KEY_DPOINT 0 |
#define KEY_DPOINT 0 |
#define KEY_DELIM 1 |
#define KEY_DELIM 1 |
Line 80 arg(struct tbl_node *tbl, int ln, const char *p, int * |
|
Line 81 arg(struct tbl_node *tbl, int ln, const char *p, int * |
|
|
|
switch (key) { |
switch (key) { |
case KEY_DELIM: |
case KEY_DELIM: |
mandoc_msg(MANDOCERR_TBLEQN, tbl->parse, ln, *pos, NULL); |
mandoc_vmsg(MANDOCERR_TBLOPT_EQN, tbl->parse, |
|
ln, *pos, "%.*s", len, p + *pos); |
want = 2; |
want = 2; |
break; |
break; |
case KEY_TAB: |
case KEY_TAB: |
Line 98 arg(struct tbl_node *tbl, int ln, const char *p, int * |
|
Line 100 arg(struct tbl_node *tbl, int ln, const char *p, int * |
|
break; |
break; |
default: |
default: |
abort(); |
abort(); |
/* NOTREACHED */ |
|
} |
} |
|
|
if (len == 0) |
if (len == 0) |
Line 120 arg(struct tbl_node *tbl, int ln, const char *p, int * |
|
Line 121 arg(struct tbl_node *tbl, int ln, const char *p, int * |
|
* and some options are followed by arguments. |
* and some options are followed by arguments. |
*/ |
*/ |
void |
void |
tbl_option(struct tbl_node *tbl, int ln, const char *p) |
tbl_option(struct tbl_node *tbl, int ln, const char *p, int *offs) |
{ |
{ |
int i, pos, len; |
int i, pos, len; |
|
|
pos = 0; |
pos = *offs; |
for (;;) { |
for (;;) { |
while (p[pos] == ' ' || p[pos] == '\t' || p[pos] == ',') |
while (p[pos] == ' ' || p[pos] == '\t' || p[pos] == ',') |
pos++; |
pos++; |
|
|
if (p[pos] == ';') |
if (p[pos] == ';') { |
|
*offs = pos + 1; |
return; |
return; |
|
} |
|
|
/* Parse one option name. */ |
/* Parse one option name. */ |
|
|