ref: bbde779f213eaabbde86aba59de478b6e38c751e
parent: efdb89bcc0403e7ce60b49eea80ff52c10e5c92a
author: Ali Gholami Rudi <[email protected]>
date: Fri Feb 28 09:21:00 EST 2014
roff.h: replace SC_HT with SC_EM
--- a/draw.c
+++ b/draw.c
@@ -69,7 +69,7 @@
{
int w, n, i, rem, hw, neg;
neg = l < 0;
- w = SC_HT; /* character height */
+ w = SC_EM; /* character height */
hw = cwid(c); /* character width */
/* negative length; moving backwards */
if (l < 0) {
@@ -197,13 +197,13 @@
if (wb_wid(&wb2) > w)
w = wb_wid(&wb2);
wb_hmov(&wb2, -wb_wid(&wb2));
- wb_vmov(&wb2, SC_HT);
+ wb_vmov(&wb2, SC_EM);
n++;
c = sstr_next();
}
sstr_pop();
- center = -(n * SC_HT + SC_EM) / 2;
- wb_vmov(wb, center + SC_HT);
+ center = -(n * SC_EM + SC_EM) / 2;
+ wb_vmov(wb, center + SC_EM);
wb_cat(wb, &wb2);
wb_done(&wb2);
wb_vmov(wb, center);
--- a/roff.h
+++ b/roff.h
@@ -52,7 +52,6 @@
#define SC_PT (SC_IN / 72) /* point in units */
#define SC_EM (n_s * SC_IN / 72)
#define SC_DW (SC_EM / 3) /* default width */
-#define SC_HT (n_s * SC_PT) /* character height */
/* escape sequences */
#define ESC_Q "bCDhHlLNoSvwxX" /* \X'ccc' quoted escape sequences */
--- a/wb.c
+++ b/wb.c
@@ -29,7 +29,7 @@
/* update wb->st and wb->sb */
static void wb_stsb(struct wb *wb)
{
- wb->st = MIN(wb->st, wb->v - SC_HT);
+ wb->st = MIN(wb->st, wb->v - SC_EM);
wb->sb = MAX(wb->sb, wb->v);
}