diff options
author | wl <wl> | 2006-11-19 09:41:45 +0000 |
---|---|---|
committer | wl <wl> | 2006-11-19 09:41:45 +0000 |
commit | e6841d8379d5576dc99e12f4601b7942a906653c (patch) | |
tree | 63fde41a432e4cc12f66f8b55af74e383311edaf /contrib | |
parent | ff42470647c2587ae8e0aecf31240b84a28cd165 (diff) | |
download | groff-e6841d8379d5576dc99e12f4601b7942a906653c.tar.gz |
* hdmisc.tmac: Avoid loading itself more than once.
Load hdtbl.tmac unconditionally.
(\n[?], *miscs): Remove.
(random-s1): Use only 9 digits.
* hdtbl.tmac: Avoid loading itself more than once.
Load hdmisc.tmac unconditionally.
Load 62bit.tmac
(\n[*hdtbl]): Removed.
(t*cl): Prevent scaling overflow by using routines from 62bit.tmac.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/hdtbl/ChangeLog | 13 | ||||
-rw-r--r-- | contrib/hdtbl/hdmisc.tmac | 12 | ||||
-rw-r--r-- | contrib/hdtbl/hdtbl.tmac | 73 |
3 files changed, 55 insertions, 43 deletions
diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog index c8b5668a..61401617 100644 --- a/contrib/hdtbl/ChangeLog +++ b/contrib/hdtbl/ChangeLog @@ -1,3 +1,16 @@ +2006-11-17 Werner LEMBERG <wl@gnu.org> + + * hdmisc.tmac: Avoid loading itself more than once. + Load hdtbl.tmac unconditionally. + (\n[?], *miscs): Remove. + (random-s1): Use only 9 digits. + + * hdtbl.tmac: Avoid loading itself more than once. + Load hdmisc.tmac unconditionally. + Load 62bit.tmac + (\n[*hdtbl]): Removed. + (t*cl): Prevent scaling overflow by using routines from 62bit.tmac. + 2006-11-15 Werner LEMBERG <wl@gnu.org> * hdmisc.tmac (d2x): Use string array instead of `dzx' macro. diff --git a/contrib/hdtbl/hdmisc.tmac b/contrib/hdtbl/hdmisc.tmac index 513ab250..2e90a625 100644 --- a/contrib/hdtbl/hdmisc.tmac +++ b/contrib/hdtbl/hdmisc.tmac @@ -28,10 +28,8 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA . .\" %beginstrip% . -.if r ? \ -. tm HDroff: loading misc. macros file \n[.F]. -. -.nr *miscs 1 +.if d getarg \ +. nx . . .\" ****************************************************************** @@ -512,7 +510,7 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA . .ds random-s1 \n[minutes]\n[seconds]\n[$$]\n[hours]\" .\" prevent overflow -.substring random-s1 0 9 +.substring random-s1 0 8 . .nr random-s1 (\*[random-s1] % 2147483562) .nr random-s2 \n[dy]\n[year]\n[mo] @@ -616,7 +614,7 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA . gcolor black .if "\n[.M]"" \ . fcolor white -.if !\n[*hdtbl] \ -. mso hdtbl.tmac\" load table macros +. +.mso hdtbl.tmac\" load table macros . .\" EOF diff --git a/contrib/hdtbl/hdtbl.tmac b/contrib/hdtbl/hdtbl.tmac index 3c946543..b59a5d00 100644 --- a/contrib/hdtbl/hdtbl.tmac +++ b/contrib/hdtbl/hdtbl.tmac @@ -31,13 +31,11 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA .\" * Vers. 0.91 December 2005 * .\" ***************************************************************** . -.if r ? \ -. tm HDroff: Loading table macros file \n[.F]. +.if d TBL \ +. nx . -.nr *hdtbl 1 -. -.if !r *miscs \ -. mso hdmisc.tmac +.mso hdmisc.tmac +.mso 62bit.tmac . .wh 0 HM \" comment this out if a page header macro exists .wh -1i BM \" comment this out if a bottom margin macro exists @@ -85,9 +83,9 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA .\" %beginstrip% . .\" for better error messages -.ds nth-1 st -.ds nth-2 nd -.ds nth-3 rd +.ds nth-1 st\" +.ds nth-2 nd\" +.ds nth-3 rd\" . .\" initialization of various registers .nr t*# 0 \" table nesting level @@ -250,7 +248,7 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA . . index "\\*[args]" .TR . ie \\n[index] \{\ -. ds *a\\n[t*#] "\\*[args] +. ds *a\\n[t*#] "\\*[args]\" . substring args\\n[t*#] 0 \\n[index] . substring *a\\n[t*#] \\n[index]-2 -1 . \} @@ -404,17 +402,17 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA . \} . . if (\\n[c#\\n[t*#]*\\n[t*r#\\n[t*#]]] > \\n[t*cols\\n[t*#]]) \{\ -. ds * are -. ds ** columns +. ds * are\" +. ds ** columns\" . if (\\n[c#\\*[#t#r]] == 1) \{\ -. ds * is -. ds ** column +. ds * is\" +. ds ** column\" . \} . tmc \\n[.F]:\\n[.c]: There \\*[*] \\n[c#\\*[#t#r]] table \\*[**] (.TD) . -. ds * are +. ds * are\" . if (\\n[t*cols\\n[t*#]] == 1) \ -. ds * is +. ds * is\" . tm1 " but only \\n[t*cols\\n[t*#]] \\*[*] expected. . . ds * @@ -783,9 +781,12 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA . \" Remove border width, if any. . if \\n[t*b\\n[t*#]] \{\ . \" cell_width := cell_width * (length - 1.5*border) / length +. nr #* (\\n[ll\\n[t*#]] - (3 * \\n[t*b\\n[t*#]] / 2)) +. nr *** (\\n[ll\\n[t*#]] / 2) . \" avoid multiplication overflow -. nr #* (1000 * \\n[ll\\n[t*#]] / \\n[t*b\\n[t*#]]) -. nr $\\n[*] (\\n[$\\n[*]] - (1500 * \\n[$\\n[*]] / \\n[#*])) +. mult31by31 $\\n[*] #* **** +. add31to62 *** **** **** +. div62by31 **** ll\\n[t*#] $\\n[*] . \} . . \" Get cell widths without padding, spacing, and separator line. @@ -795,16 +796,16 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA . . \" Check whether value is non-positive. . if !\\n[cll\\n[t*#]*\\n[*]] \{\ -. nr *h ((1000 \ - * \\n[ll\\n[t*#]] \ - / (\\n[ll\\n[t*#]] - (3 * \\n[t*b\\n[t*#]] / 2)) \ - * (2 * \\n[cscp\\n[t*#]] + \\n[b/2\\n[t*#]]) \ - / 1000 \ - + 50) / 10 * 10) -. ds * \\n[*]th +. nr #* (\\n[ll\\n[t*#]] - (3 * \\n[t*b\\n[t*#]] / 2)) +. nr *** (\\n[#*] / 2) +. nr *h (2 * \\n[cscp\\n[t*#]] + \\n[b/2\\n[t*#]]) +. mult31by31 *h ll\\n[t*#] **** +. add31to62 *** **** **** +. div62by31 **** #* *h +. ds * \\n[*]th\" . nr *** (\\n[*] % 10) . if d nth-\\n[***] \ -. ds * \\n[*]\\*[nth-\\n[***]] +. ds * \\n[*]\\*[nth-\\n[***]]\" . tmc \\n[.F]:\\n[.c]: The \\*[*] width value (\\$\\n[*]) is too small. . tm1 " It should be greater than \\n[*h]. . \} @@ -856,24 +857,24 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA . . \" only check for cell underflow if called by .TR or .ETB . if (\\$1 & (\\n[c#\\*[#t#r]] <= \\n[t*cols\\n[t*#]])) \{\ -. ds * are -. ds ** columns +. ds * are\" +. ds ** columns\" . if (\\n-[c#\\*[#t#r]] == 1) \{\ -. ds * is -. ds ** column +. ds * is\" +. ds ** column\" . \} . tmc \\n[.F]:\\n[.c]: There \\*[*] only \\n[c#\\*[#t#r]] \\*[**] . . nr * \\n[t*r#\\n[t*#]] -. ds * \\n[*]th +. ds * \\n[*]th\" . nr *** (\\n[*] % 10) . if d nth-\\n[***] \ -. ds * \\n[*]\\*[nth-\\n[***]] +. ds * \\n[*]\\*[nth-\\n[***]]\" . tmc " in the \\*[*] row . -. ds * are +. ds * are\" . if (\\n[t*cols\\n[t*#]] == 1) \ -. ds * is +. ds * is\" . tm1 " but \\n[t*cols\\n[t*#]] \\*[*] expected. . \} .. @@ -992,8 +993,8 @@ Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA . \} . . if (\\n[*] - \\n[.t]) \{\ -. ds t*kept \\n[*] \\*[t*kept] -. ds t*kept \\*[*] \\*[t*kept] +. ds t*kept \\n[*] \\*[t*kept]\" +. ds t*kept \\*[*] \\*[t*kept]\" . tmc \\n[.F]:\\n[.c]: Remaining table(s), . tm1 " because not all fit onto this page. . break |