version 1.3, 2010/12/30 10:26:00 |
version 1.6, 2011/01/01 21:23:01 |
|
|
#include <ctype.h> |
#include <ctype.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
#include <time.h> |
|
|
#include "mandoc.h" |
#include "mandoc.h" |
#include "libmandoc.h" |
#include "libmandoc.h" |
Line 68 data(struct tbl *tbl, struct tbl_span *dp, |
|
Line 69 data(struct tbl *tbl, struct tbl_span *dp, |
|
if (p[*pos]) |
if (p[*pos]) |
(*pos)++; |
(*pos)++; |
|
|
/* XXX: do the strcmps, then malloc(). */ |
|
|
|
if ( ! strcmp(dat->string, "_")) |
if ( ! strcmp(dat->string, "_")) |
dat->flags |= TBL_DATA_HORIZ; |
dat->pos = TBL_DATA_HORIZ; |
else if ( ! strcmp(dat->string, "=")) |
else if ( ! strcmp(dat->string, "=")) |
dat->flags |= TBL_DATA_DHORIZ; |
dat->pos = TBL_DATA_DHORIZ; |
else if ( ! strcmp(dat->string, "\\_")) |
else if ( ! strcmp(dat->string, "\\_")) |
dat->flags |= TBL_DATA_NHORIZ; |
dat->pos = TBL_DATA_NHORIZ; |
else if ( ! strcmp(dat->string, "\\=")) |
else if ( ! strcmp(dat->string, "\\=")) |
dat->flags |= TBL_DATA_NDHORIZ; |
dat->pos = TBL_DATA_NDHORIZ; |
|
else |
|
dat->pos = TBL_DATA_DATA; |
} |
} |
|
|
int |
int |
Line 91 tbl_data(struct tbl *tbl, int ln, const char *p) |
|
Line 92 tbl_data(struct tbl *tbl, int ln, const char *p) |
|
|
|
if ('\0' == p[pos]) { |
if ('\0' == p[pos]) { |
TBL_MSG(tbl, MANDOCERR_TBL, ln, pos); |
TBL_MSG(tbl, MANDOCERR_TBL, ln, pos); |
return(1); |
return(0); |
} |
} |
|
|
/* |
/* |
Line 119 tbl_data(struct tbl *tbl, int ln, const char *p) |
|
Line 120 tbl_data(struct tbl *tbl, int ln, const char *p) |
|
tbl->last_span = tbl->first_span = dp; |
tbl->last_span = tbl->first_span = dp; |
|
|
if ( ! strcmp(p, "_")) { |
if ( ! strcmp(p, "_")) { |
dp->flags |= TBL_SPAN_HORIZ; |
dp->pos = TBL_SPAN_HORIZ; |
return(1); |
return(1); |
} else if ( ! strcmp(p, "=")) { |
} else if ( ! strcmp(p, "=")) { |
dp->flags |= TBL_SPAN_DHORIZ; |
dp->pos = TBL_SPAN_DHORIZ; |
return(1); |
return(1); |
} |
} |
|
|
|
dp->pos = TBL_SPAN_DATA; |
|
|
while ('\0' != p[pos]) |
while ('\0' != p[pos]) |
data(tbl, dp, ln, p, &pos); |
data(tbl, dp, ln, p, &pos); |