version 1.28, 2009/10/10 10:05:12 |
version 1.32, 2009/10/18 19:03:37 |
|
|
#include "out.h" |
#include "out.h" |
#include "html.h" |
#include "html.h" |
#include "mdoc.h" |
#include "mdoc.h" |
|
#include "main.h" |
|
|
#define INDENT 5 |
#define INDENT 5 |
#define HALFINDENT 3 |
#define HALFINDENT 3 |
|
|
a2width(const char *p, struct roffsu *su) |
a2width(const char *p, struct roffsu *su) |
{ |
{ |
|
|
if (a2roffsu(p, su)) |
if ( ! a2roffsu(p, su, SCALE_MAX)) { |
return; |
su->unit = SCALE_EM; |
su->unit = SCALE_EM; |
su->scale = (int)strlen(p); |
su->scale = (int)strlen(p); |
} |
} |
} |
|
|
|
|
|
|
a2offs(const char *p, struct roffsu *su) |
a2offs(const char *p, struct roffsu *su) |
{ |
{ |
|
|
|
/* FIXME: "right"? */ |
|
|
if (0 == strcmp(p, "left")) |
if (0 == strcmp(p, "left")) |
SCALE_HS_INIT(su, 0); |
SCALE_HS_INIT(su, 0); |
else if (0 == strcmp(p, "indent")) |
else if (0 == strcmp(p, "indent")) |
SCALE_HS_INIT(su, INDENT); |
SCALE_HS_INIT(su, INDENT); |
else if (0 == strcmp(p, "indent-two")) |
else if (0 == strcmp(p, "indent-two")) |
SCALE_HS_INIT(su, INDENT * 2); |
SCALE_HS_INIT(su, INDENT * 2); |
else if ( ! a2roffsu(p, su)) { |
else if ( ! a2roffsu(p, su, SCALE_MAX)) { |
su->unit = SCALE_EM; |
su->unit = SCALE_EM; |
su->scale = (int)strlen(p); |
su->scale = (int)strlen(p); |
} |
} |
Line 1356 mdoc_bd_pre(MDOC_ARGS) |
|
Line 1359 mdoc_bd_pre(MDOC_ARGS) |
|
case (MDOC_Compact): |
case (MDOC_Compact): |
comp = 1; |
comp = 1; |
break; |
break; |
|
case (MDOC_Centred): |
|
/* FALLTHROUGH */ |
case (MDOC_Ragged): |
case (MDOC_Ragged): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (MDOC_Filled): |
case (MDOC_Filled): |
Line 1365 mdoc_bd_pre(MDOC_ARGS) |
|
Line 1370 mdoc_bd_pre(MDOC_ARGS) |
|
case (MDOC_Literal): |
case (MDOC_Literal): |
type = bl->args->argv[i].arg; |
type = bl->args->argv[i].arg; |
break; |
break; |
|
default: |
|
break; |
} |
} |
|
|
|
/* FIXME: -centered, etc. formatting. */ |
|
|
if (MDOC_BLOCK == n->type) { |
if (MDOC_BLOCK == n->type) { |
bufcat_su(h, "margin-left", &su); |
bufcat_su(h, "margin-left", &su); |