diff options
author | wlemb <wlemb> | 2002-04-04 14:04:45 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2002-04-04 14:04:45 +0000 |
commit | f477df3261e427216c4ee34d40ca1ab44c324357 (patch) | |
tree | ccdd7c08ae5c1f47bc9f3ed9578986624c0b2a3a | |
parent | 4a91e45e652932d73a3559be9d0899f6e459273e (diff) | |
download | groff-f477df3261e427216c4ee34d40ca1ab44c324357.tar.gz |
* src/preproc/eqn/box.cc (set_script_size, box::top_level): Use
`.ps' register instead of `.s' to handle fractional point sizes.
* src/preproc/eqn/limit.cc (limit_box::compute_metrics,
limit_box::output): Ditto.
* src/preproc/eqn/other.cc (size_box::compute_metrics,
size_box::output): Ditto.
* src/preproc/eqn/over.cc (over_box::compute_metrics,
over_box::output): Ditto.
* src/preproc/eqn/script.cc (script_box::compute_metrics,
script_box::output): Ditto.
* src/preproc/eqn/sqrt.cc (sqrt_box::compute_metrics,
sqrt_box::output): Ditto.
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | src/preproc/eqn/box.cc | 8 | ||||
-rw-r--r-- | src/preproc/eqn/limit.cc | 12 | ||||
-rw-r--r-- | src/preproc/eqn/other.cc | 12 | ||||
-rw-r--r-- | src/preproc/eqn/over.cc | 13 | ||||
-rw-r--r-- | src/preproc/eqn/script.cc | 16 | ||||
-rw-r--r-- | src/preproc/eqn/sqrt.cc | 18 |
7 files changed, 55 insertions, 39 deletions
@@ -1,3 +1,18 @@ +2002-04-04 Tadziu Hoffmann <hoffmann@usm.uni-muenchen.de> + + * src/preproc/eqn/box.cc (set_script_size, box::top_level): Use + `.ps' register instead of `.s' to handle fractional point sizes. + * src/preproc/eqn/limit.cc (limit_box::compute_metrics, + limit_box::output): Ditto. + * src/preproc/eqn/other.cc (size_box::compute_metrics, + size_box::output): Ditto. + * src/preproc/eqn/over.cc (over_box::compute_metrics, + over_box::output): Ditto. + * src/preproc/eqn/script.cc (script_box::compute_metrics, + script_box::output): Ditto. + * src/preproc/eqn/sqrt.cc (sqrt_box::compute_metrics, + sqrt_box::output): Ditto. + 2002-04-03 Michael Selway <mas@ssl.co.uk> * src/drivers/grops/psrm.cc (resource_manager::do_begin_binary): diff --git a/src/preproc/eqn/box.cc b/src/preproc/eqn/box.cc index 9369aa04..41d8dff4 100644 --- a/src/preproc/eqn/box.cc +++ b/src/preproc/eqn/box.cc @@ -259,7 +259,7 @@ void set_script_size() if (script_size_reduction >= 0) printf(".ps \\n[.s]-%d>?%d\n", script_size_reduction, minimum_size); else - printf(".ps (u;\\n[.s]*7+5/10>?%d)*1z\n", minimum_size); + printf(".ps (u;\\n[.ps]*7+5/10>?%d)\n", minimum_size); } int box::next_uid = 0; @@ -281,7 +281,7 @@ void box::top_level() printf(".ft\n"); printf(".nr " SAVED_PREV_FONT_REG " \\n[.f]\n"); printf(".ft %s\n", get_gfont()); - printf(".nr " SAVED_SIZE_REG " \\n[.s]z\n"); + printf(".nr " SAVED_SIZE_REG " \\n[.ps]\n"); if (gsize > 0) { char buf[INT_DIGITS + 1]; sprintf(buf, "%d", gsize); @@ -311,9 +311,9 @@ void box::top_level() "\\R'" SAVED_INLINE_FONT_REG " \\\\n[.f]'" "\\fP" "\\R'" SAVED_INLINE_PREV_FONT_REG " \\\\n[.f]'" - "\\R'" SAVED_INLINE_SIZE_REG " \\\\n[.s]z'" + "\\R'" SAVED_INLINE_SIZE_REG " \\\\n[.ps]'" "\\s0" - "\\R'" SAVED_INLINE_PREV_SIZE_REG " \\\\n[.s]z'" + "\\R'" SAVED_INLINE_PREV_SIZE_REG " \\\\n[.ps]'" "\n" ".ds " RESTORE_FONT_STRING " " "\\f[\\\\n[" SAVED_INLINE_PREV_FONT_REG "]]" diff --git a/src/preproc/eqn/limit.cc b/src/preproc/eqn/limit.cc index 046885d2..c8b55877 100644 --- a/src/preproc/eqn/limit.cc +++ b/src/preproc/eqn/limit.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -55,10 +55,10 @@ limit_box::~limit_box() int limit_box::compute_metrics(int style) { - printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SIZE_FORMAT " \\n[.ps]\n", uid); if (!(style <= SCRIPT_STYLE && one_size_reduction_flag)) set_script_size(); - printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SMALL_SIZE_FORMAT " \\n[.ps]\n", uid); int res = 0; int mark_uid = -1; if (from != 0) { @@ -75,7 +75,7 @@ int limit_box::compute_metrics(int style) res = r; } } - printf(".ps \\n[" SIZE_FORMAT "]\n", uid); + printf(".ps \\n[" SIZE_FORMAT "]u\n", uid); int r = p->compute_metrics(style); p->compute_subscript_kern(); if (res && r) @@ -139,7 +139,7 @@ int limit_box::compute_metrics(int style) void limit_box::output() { - printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SMALL_SIZE_FORMAT "]u]", uid); if (to != 0) { printf("\\Z" DELIMITER_CHAR); printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid); @@ -158,7 +158,7 @@ void limit_box::output() from->output(); printf(DELIMITER_CHAR); } - printf("\\s[\\n[" SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SIZE_FORMAT "]u]", uid); printf("\\Z" DELIMITER_CHAR); printf("\\h'\\n[" LEFT_WIDTH_FORMAT "]u" "-(\\n[" WIDTH_FORMAT "]u/2u)'", diff --git a/src/preproc/eqn/other.cc b/src/preproc/eqn/other.cc index eb9e50a2..c052f523 100644 --- a/src/preproc/eqn/other.cc +++ b/src/preproc/eqn/other.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -392,11 +392,11 @@ size_box::size_box(char *s, box *pp) : pointer_box(pp), size(s) int size_box::compute_metrics(int style) { - printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SIZE_FORMAT " \\n[.ps]\n", uid); printf(".ps %s\n", size); - printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SMALL_SIZE_FORMAT " \\n[.ps]\n", uid); int r = p->compute_metrics(style); - printf(".ps \\n[" SIZE_FORMAT "]\n", uid); + printf(".ps \\n[" SIZE_FORMAT "]u\n", uid); printf(".nr " WIDTH_FORMAT " 0\\n[" WIDTH_FORMAT "]\n", uid, p->uid); printf(".nr " HEIGHT_FORMAT " \\n[" HEIGHT_FORMAT "]\n", uid, p->uid); printf(".nr " DEPTH_FORMAT " \\n[" DEPTH_FORMAT "]\n", uid, p->uid); @@ -405,9 +405,9 @@ int size_box::compute_metrics(int style) void size_box::output() { - printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SMALL_SIZE_FORMAT "]u]", uid); p->output(); - printf("\\s[\\n[" SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SIZE_FORMAT "]u]", uid); } size_box::~size_box() diff --git a/src/preproc/eqn/over.cc b/src/preproc/eqn/over.cc index 4c544d1b..6734155a 100644 --- a/src/preproc/eqn/over.cc +++ b/src/preproc/eqn/over.cc @@ -1,5 +1,6 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002 + Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -61,9 +62,9 @@ int over_box::compute_metrics(int style) { if (reduce_size) { style = script_style(style); - printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SIZE_FORMAT " \\n[.ps]\n", uid); set_script_size(); - printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SMALL_SIZE_FORMAT " \\n[.ps]\n", uid); } int mark_uid = 0; int res = num->compute_metrics(style); @@ -77,7 +78,7 @@ int over_box::compute_metrics(int style) res = r; } if (reduce_size) - printf(".ps \\n[" SIZE_FORMAT "]\n", uid); + printf(".ps \\n[" SIZE_FORMAT "]u\n", uid); printf(".nr " WIDTH_FORMAT " (\\n[" WIDTH_FORMAT "]>?\\n[" WIDTH_FORMAT "]", uid, num->uid, den->uid); // allow for \(ru being wider than both the numerator and denominator @@ -118,7 +119,7 @@ int over_box::compute_metrics(int style) void over_box::output() { if (reduce_size) - printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SMALL_SIZE_FORMAT "]s]", uid); #ifdef USE_Z printf("\\Z" DELIMITER_CHAR); #endif @@ -165,7 +166,7 @@ void over_box::output() printf("\\v'-\\n[" SUB_LOWER_FORMAT "]u'", uid); #endif if (reduce_size) - printf("\\s[\\n[" SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SIZE_FORMAT "]u]", uid); // draw the line printf("\\h'%dM'", null_delimiter_space); printf("\\v'-%dM'", axis_height); diff --git a/src/preproc/eqn/script.cc b/src/preproc/eqn/script.cc index 7c2e6c25..62a05b4f 100644 --- a/src/preproc/eqn/script.cc +++ b/src/preproc/eqn/script.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -73,10 +73,10 @@ int script_box::compute_metrics(int style) { int res = p->compute_metrics(style); p->compute_subscript_kern(); - printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SIZE_FORMAT " \\n[.ps]\n", uid); if (!(style <= SCRIPT_STYLE && one_size_reduction_flag)) set_script_size(); - printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SMALL_SIZE_FORMAT " \\n[.ps]\n", uid); if (sub != 0) sub->compute_metrics(cramped_style(script_style(style))); if (sup != 0) @@ -92,7 +92,7 @@ int script_box::compute_metrics(int style) printf(".nr " SUB_LOWER_FORMAT " \\n[" DEPTH_FORMAT "]+%dM\n", uid, p->uid, sub_drop); } - printf(".ps \\n[" SIZE_FORMAT "]\n", uid); + printf(".ps \\n[" SIZE_FORMAT "]u\n", uid); if (sup == 0) { assert(sub != 0); // 18b @@ -171,18 +171,18 @@ void script_box::output() if (sup != 0) { printf("\\Z" DELIMITER_CHAR); printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid); - printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SMALL_SIZE_FORMAT "]u]", uid); sup->output(); - printf("\\s[\\n[" SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SIZE_FORMAT "]u]", uid); printf(DELIMITER_CHAR); } if (sub != 0) { printf("\\Z" DELIMITER_CHAR); printf("\\v'\\n[" SUB_LOWER_FORMAT "]u'", uid); - printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SMALL_SIZE_FORMAT "]u]", uid); printf("\\h'-\\n[" SUB_KERN_FORMAT "]u'", p->uid); sub->output(); - printf("\\s[\\n[" SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SIZE_FORMAT "]u]", uid); printf(DELIMITER_CHAR); } printf("\\h'\\n[" WIDTH_FORMAT "]u-\\n[" WIDTH_FORMAT "]u'", diff --git a/src/preproc/eqn/sqrt.cc b/src/preproc/eqn/sqrt.cc index 6109ffea..bffa4f25 100644 --- a/src/preproc/eqn/sqrt.cc +++ b/src/preproc/eqn/sqrt.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1989, 1990, 1991, 1992, 2002 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -54,7 +54,7 @@ int sqrt_box::compute_metrics(int style) "]+%dM+(%dM/4)\n", p->uid, p->uid, default_rule_thickness, (style > SCRIPT_STYLE ? x_height : default_rule_thickness)); - printf(".nr " SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SIZE_FORMAT " \\n[.ps]\n", uid); printf(".ds " SQRT_STRING_FORMAT " " SQRT_CHAR "\n", uid); printf(".ds " BAR_STRING " " RADICAL_EXTENSION_CHAR "\n"); printf(".nr " SQRT_WIDTH_FORMAT @@ -84,8 +84,8 @@ int sqrt_box::compute_metrics(int style) // Determine the maximum point size printf(".ps 1000\n"); - printf(".nr " MAX_SIZE_REG " \\n[.s]\n"); - printf(".ps \\n[" SIZE_FORMAT "]\n", uid); + printf(".nr " MAX_SIZE_REG " \\n[.ps]\n"); + printf(".ps \\n[" SIZE_FORMAT "]u\n", uid); // We define a macro that will increase the current point size // until we get a radical sign that's tall enough or we reach // the maximum point size. @@ -93,7 +93,7 @@ int sqrt_box::compute_metrics(int style) ".nr " SQRT_WIDTH_FORMAT " 0\\w" DELIMITER_CHAR "\\*[" SQRT_STRING_FORMAT "]" DELIMITER_CHAR "\n" ".if \\\\n[rst]-\\\\n[rsb]-%dM<\\n[" TEMP_REG "]" - "&(\\\\n[.s]<\\n[" MAX_SIZE_REG "]) \\{" + "&(\\\\n[.ps]<\\n[" MAX_SIZE_REG "]) \\{" ".ps +1\n" "." TEMP_MACRO "\n" ".\\}\n" @@ -103,7 +103,7 @@ int sqrt_box::compute_metrics(int style) printf(".\\}\\}\n"); - printf(".nr " SMALL_SIZE_FORMAT " \\n[.s]\n", uid); + printf(".nr " SMALL_SIZE_FORMAT " \\n[.ps]\n", uid); // set TEMP_REG to the amount by which the radical sign is too big printf(".nr " TEMP_REG " \\n[rst]-\\n[rsb]-%dM-\\n[" TEMP_REG "]\n", default_rule_thickness); @@ -143,17 +143,17 @@ int sqrt_box::compute_metrics(int style) uid, p->uid, uid); // put a bit of extra space above the bar printf(".nr " HEIGHT_FORMAT " +%dM\n", uid, default_rule_thickness); - printf(".ps \\n[" SIZE_FORMAT "]\n", uid); + printf(".ps \\n[" SIZE_FORMAT "]u\n", uid); return r; } void sqrt_box::output() { printf("\\Z" DELIMITER_CHAR); - printf("\\s[\\n[" SMALL_SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SMALL_SIZE_FORMAT "]u]", uid); printf("\\v'-\\n[" SUP_RAISE_FORMAT "]u'", uid); printf("\\*[" SQRT_STRING_FORMAT "]", uid); - printf("\\s[\\n[" SIZE_FORMAT "]]", uid); + printf("\\s[\\n[" SIZE_FORMAT "]u]", uid); printf(DELIMITER_CHAR); printf("\\Z" DELIMITER_CHAR); |