diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /dviware/beebe/src/movedown.h |
Initial commit
Diffstat (limited to 'dviware/beebe/src/movedown.h')
-rw-r--r-- | dviware/beebe/src/movedown.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/dviware/beebe/src/movedown.h b/dviware/beebe/src/movedown.h new file mode 100644 index 0000000000..fbf290ed12 --- /dev/null +++ b/dviware/beebe/src/movedown.h @@ -0,0 +1,35 @@ +/* -*-C-*- movedown.h */ +/*-->movedown*/ +/**********************************************************************/ +/****************************** movedown ******************************/ +/**********************************************************************/ + +void +movedown(a) +register INT32 a; + +{ + /* From DVITYPE Version 2.6: + "Vertical motion is done similarly [to horizontal motion handled + in moveover()], but with the threshold between ``small'' and + ``large'' increased by a factor of five. The idea is to make + fractions like ``1/2'' round consistently, but to absorb + accumulated rounding errors in the baseline-skip moves." + + The one precaution we need to take here is that fontptr can be + NULL, which we treat like a large movement. This NULL pointer + was used without error on many different machines for 2 years + before it was caught on the VAX VMS implementation, which makes + memory page 0 inaccessible. + */ + v += a; + if ((fontptr == (struct font_entry *)NULL) || + (ABS(a) >= 5*fontptr->font_space)) + vv = PIXROUND(v, conv) + tmargin; + else + { + vv += PIXROUND(a, conv); + vv = fixpos(vv-tmargin,v,conv) + tmargin; + } +} + |