From: albrecht.gbehardt@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>-klu.ac.at
Full_Name: Albrecht Gebhardt
Version: 0.99.0
OS: alpha, osf4.0
Submission from: (NULL) (143.205.180.40)
DEC cc doesn't like c++ style comments // like this one
Please use standard cc comments or #if 0 ... #endif
A quite large patch follows
(I hope it will pass mailing with not too much wrapped lines):
--- ./src/main/g_her_glyph.c.dec-cc.patch Mon Feb 7 14:48:10 2000
+++ ./src/main/g_her_glyph.c Mon Feb 7 14:49:40 2000
@@ -118,7 +118,7 @@
/ PAUL MURRELL
sys-defines.h not used
/
-// #include "sys-defines.h"
+/ #include "sys-defines.h" /
/ PAUL MURRELL
extern.h renamed g_extern.h
--- ./src/main/g_fontdb.c.dec-cc.patch Mon Feb 7 14:48:10 2000
+++ ./src/main/g_fontdb.c Mon Feb 7 14:49:40 2000
@@ -20,7 +20,7 @@
/ PAUL MURRELL
sys-defines.h not used
/
-// #include "sys-defines.h"
+/ #include "sys-defines.h" */
/ PAUL MURRELL
extern.h renamed g_extern.h
--- ./src/main/g_cntrlify.c.dec-cc.patch Mon Feb 7 14:48:11 2000
+++ ./src/main/g_cntrlify.c Mon Feb 7 14:49:40 2000
@@ -59,7 +59,7 @@
/ PAUL MURRELL
sys-defines.h not used
/
-// #include "sys-defines.h"
+/ #include "sys-defines.h" */
/* PAUL MURRELL
extern.h renamed g_extern.h
@@ -209,7 +209,7 @@
/* if current font is Hershey, first try to match each ligature
pattern (no ligatures supported in non-Hershey fonts) */
if (1) // _plotter->drawstate->font_type == F_HERSHEY)
+ if (1) / _plotter->drawstate->font_type == F_HERSHEY) /
{
int i;
bool matched = false;
@@ -235,7 +235,7 @@
if (c != (unsigned char)'\') / ordinary char, may pass through /
{
/ if current font is an ISO-Latin-1 Hershey font ... /
if (1 // _plotter->drawstate->font_type == F_HERSHEY
+ if (1 / _plotter->drawstate->font_type == F_HERSHEY /
&& _hershey_font_info[raw_fontnum].iso8859_1)
{
int i;
@@ -334,7 +334,7 @@
esc[2] = (unsigned char)'\0'; / have an escape sequence /
/ is this an escape seq. (e.g. #H0001) for a raw Hershey glyph? /
/ is this an escape seq. (e.g. #J0001) for a raw Japanese
Hershey glyph (JIS numbering, in hex)? /
if (1 // _plotter->drawstate->font_type == F_HERSHEY
+ if (1 / _plotter->drawstate->font_type == F_HERSHEY /
&& esc[0] == '#' && esc[1] == 'J'
&& ((src[0] >= '0' && src[0] <= '9')
|| (src[0] >= 'a' && src[0] <= 'f')
@@ -506,7 +506,7 @@
/ if current font is an ISO-Latin-1 Hershey font, is this an
escape sequence for an 8-bit (non-ASCII) char, which due to
nonexistence should be deligatured? /
if (1 // _plotter->drawstate->font_type == F_HERSHEY
+ if (1 / _plotter->drawstate->font_type == F_HERSHEY /
&& _hershey_font_info[raw_fontnum].iso8859_1)
{
int i;
@@ -553,7 +553,7 @@
&& _plotter->drawstate->font_is_iso8859_1
&& raw_fontnum == 1))
*/
if (1 // _plotter->drawstate->font_type == F_HERSHEY
+ if (1 / _plotter->drawstate->font_type == F_HERSHEY /
&& _hershey_font_info[raw_fontnum].iso8859_1)
{
bool matched = false;
@@ -568,7 +568,7 @@
{
/ certain such characters are drawn in the Hershey fonts
as superscripts /
if (1) // _plotter->drawstate->font_type == F_HERSHEY)
+ if (1) / _plotter->drawstate->font_type == F_HERSHEY) /
{
int k;
bool matched2 = false;
@@ -622,7 +622,7 @@
/ is this an escape seq. for a special' (non-ISO, non-Symbol) Hershey glyph? Such glyphs include astronomical signs, and final s'. /
if (1) // _plotter->drawstate->font_type == F_HERSHEY)
+ if (1) / _plotter->drawstate->font_type == F_HERSHEY) /
{
bool matched = false;
@@ -684,22 +684,24 @@
/ PAUL MURRELL
Only concerned with Hershey fonts
/
// if (strcmp ((char *)esc, "rn") == 0)
// {
// if (_plotter->drawstate->font_type == F_POSTSCRIPT
// || _plotter->drawstate->font_type == F_PCL)
// {
// dest[j++]
// = (unsigned short)(CONTROL_CODE | C_LEFT_RADICAL_SHIFT);
+#if 0
+ if (strcmp ((char )esc, "rn") == 0)
+ {
+ if (_plotter->drawstate->font_type == F_POSTSCRIPT
+ || _plotter->drawstate->font_type == F_PCL)
+ {
+ dest[j++]
+ = (unsigned short)(CONTROL_CODE | C_LEFT_RADICAL_SHIFT);
/ take `radicalex' glyph from PS symbol font */
// }
+ dest[j++]
+ = symbol_fontword | (unsigned short)RADICALEX;
+ dest[j++]
+ = (unsigned short)(CONTROL_CODE | C_RIGHT_RADICAL_SHIFT);
+
+ continue; / back to top of while loop /
+ }
+ }
+#endif
/ Attempt to parse as a font-change command, i.e. as one of the
macros \f0, \f1, \f2, etc., or \fP. \fR, \fI, \fB are the
@@ -708,77 +710,78 @@
/ PAUL MURRELL
won't handle font commands
*/
// {
+#if 0
+ if (esc[0] == 'f' && ((esc[1] >= '0' && esc[1] <= '9')
+ || esc[1] == 'P' || esc[1] == 'R'
+ || esc[1] == 'I' || esc[1] == 'B'))
+ {
/ If a user-specified, device-specific font [e.g. an X font,
for which we have no internal table listing the other
fonts in its family] is being used, we can't really do
font switching, except via \f0, \f1. These switch to the
X symbol font and the current user-specified font,
respectively. (\fP is also supported.) /
// if (esc[1] == 'P') / \fP seen, so go back to previous font /
// raw_fontnum = previous_raw_fontnum;
// else / font specified as index into typeface /
// {
// int new_font_index = esc[1] - '0';
+ if (esc[1] == 'R')
+ esc[1] = '1';
+ else if (esc[1] == 'I')
+ esc[1] = '2';
+ else if (esc[1] == 'B')
+ esc[1] = '3';
+
+ if (esc[1] == 'P') / \fP seen, so go back to previous font /
+ raw_fontnum = previous_raw_fontnum;
+ else / font specified as index into typeface /
+ {
+ int new_font_index = esc[1] - '0';
/* switch to specified font (OOB tests here now obsolete?) */
// previous_raw_fontnum = raw_fontnum;
// switch (_plotter->drawstate->font_type)
// {
// case F_HERSHEY:
// if ((new_font_index >=
_hershey_typeface_info[_plotter->drawstate->typeface_index].numfonts)
// || new_font_index < 0)
// new_font_index = 1; / OOB -> use default font /
// dd->gp.lwd set in _draw_hershey_string
+ / dd->gp.lwd set in _draw_hershey_string /
lwdsave = dd->gp.lwd;
// When drawing vector font, always use "solid" lines
+ / When drawing vector font, always use "solid" lines /
ltysave = dd->gp.lty;
dd->gp.lty = LTY_SOLID;
@@ -330,7 +330,7 @@
GConvertYUnits(y_offset label_height, g_unit, INCHES, dd));
/ call stroker on the sequence of strokes obtained from each char (the
stroker may manipulate the line width) /
-//_draw_hershey_stroke (dd, true, 0, HERSHEY_EM);
+ /_draw_hershey_stroke (dd, true, 0, HERSHEY_EM); */
_draw_hershey_string (dd, codestring);
/* Restore original values of relevant drawing attributes, free
@@ -348,7 +348,7 @@
free (old_join_mode);
/
/ return to original position /
-// _plotter->fmove (R___(_plotter) oldposx, oldposy);
+/ _plotter->fmove (R___(_plotter) oldposx, oldposy); */
}
dd->gp.srt = srtsave;
@@ -368,12 +368,12 @@
*/
vmaxset(vmax);
// free (codestring);
+ / free (codestring); /
/ PAUL MURRELL
No return value
/
// return label_width; / user units /
+ / return label_width; / / user units /
}
/* In addition to scaling the character sizes and the `width', we perform
@@ -708,15 +708,15 @@
break;
Audit (from Jitterbug):
Fri Feb 11 13:51:06 2000 leisch moved from incoming to Installation
Wed Feb 16 19:30:26 2000 ripley moved from Installation to Installation-fixed
From: albrecht.gbehardt@<::CENSORED -- SEE ORIGINAL ON BUGZILLA::>-klu.ac.at Full_Name: Albrecht Gebhardt Version: 0.99.0 OS: alpha, osf4.0 Submission from: (NULL) (143.205.180.40)
DEC cc doesn't like c++ style comments // like this one Please use standard cc comments or #if 0 ... #endif
A quite large patch follows (I hope it will pass mailing with not too much wrapped lines): --- ./src/main/g_her_glyph.c.dec-cc.patch Mon Feb 7 14:48:10 2000 +++ ./src/main/g_her_glyph.c Mon Feb 7 14:49:40 2000 @@ -118,7 +118,7 @@ / PAUL MURRELL sys-defines.h not used / -// #include "sys-defines.h" +/ #include "sys-defines.h" /
/ PAUL MURRELL extern.h renamed g_extern.h --- ./src/main/g_fontdb.c.dec-cc.patch Mon Feb 7 14:48:10 2000 +++ ./src/main/g_fontdb.c Mon Feb 7 14:49:40 2000 @@ -20,7 +20,7 @@ / PAUL MURRELL sys-defines.h not used / -// #include "sys-defines.h" +/ #include "sys-defines.h" */
/ PAUL MURRELL extern.h renamed g_extern.h --- ./src/main/g_cntrlify.c.dec-cc.patch Mon Feb 7 14:48:11 2000 +++ ./src/main/g_cntrlify.c Mon Feb 7 14:49:40 2000 @@ -59,7 +59,7 @@ / PAUL MURRELL sys-defines.h not used / -// #include "sys-defines.h" +/ #include "sys-defines.h" */
/* PAUL MURRELL extern.h renamed g_extern.h @@ -209,7 +209,7 @@
if (1 // _plotter->drawstate->font_type == F_HERSHEY + if (1 / _plotter->drawstate->font_type == F_HERSHEY / && _hershey_font_info[raw_fontnum].iso8859_1) { int i; @@ -334,7 +334,7 @@ esc[2] = (unsigned char)'\0'; / have an escape sequence /
/ is this an escape seq. (e.g. #H0001) for a raw Hershey glyph? /
ifndef NO_KANJI
/ is this an escape seq. (e.g. #N0001) for a raw Japanese Hershey glyph (Kanji), as numbered in Nelson's dictionary? /
if (1 // _plotter->drawstate->font_type == F_HERSHEY + if (1 / _plotter->drawstate->font_type == F_HERSHEY / && esc[0] == '#' && esc[1] == 'N' && src[0] >= '0' && src[0] <= '9' && src[1] >= '0' && src[1] <= '9' @@ -378,7 +378,7 @@
/ is this an escape seq. (e.g. #J0001) for a raw Japanese Hershey glyph (JIS numbering, in hex)? /
special' (non-ISO, non-Symbol) Hershey glyph? Such glyphs include astronomical signs, and
final s'. /@@ -684,22 +684,24 @@ / PAUL MURRELL Only concerned with Hershey fonts /
// if (strcmp ((char *)esc, "rn") == 0)
// {
// if (_plotter->drawstate->font_type == F_POSTSCRIPT
// || _plotter->drawstate->font_type == F_PCL)
// {
// dest[j++]
// = (unsigned short)(CONTROL_CODE | C_LEFT_RADICAL_SHIFT); +#if 0 + if (strcmp ((char )esc, "rn") == 0) + { + if (_plotter->drawstate->font_type == F_POSTSCRIPT + || _plotter->drawstate->font_type == F_PCL) + { + dest[j++] + = (unsigned short)(CONTROL_CODE | C_LEFT_RADICAL_SHIFT); / take `radicalex' glyph from PS symbol font */
// dest[j++]
// = symbol_fontword | (unsigned short)RADICALEX;
// dest[j++]
// = (unsigned short)(CONTROL_CODE | C_RIGHT_RADICAL_SHIFT); -
// continue; / back to top of while loop /
// }
// } + dest[j++] + = symbol_fontword | (unsigned short)RADICALEX; + dest[j++] + = (unsigned short)(CONTROL_CODE | C_RIGHT_RADICAL_SHIFT); + + continue; / back to top of while loop / + } + } +#endif
/ Attempt to parse as a font-change command, i.e. as one of the macros \f0, \f1, \f2, etc., or \fP. \fR, \fI, \fB are the @@ -708,77 +710,78 @@ / PAUL MURRELL won't handle font commands */
// if (esc[0] == 'f' && ((esc[1] >= '0' && esc[1] <= '9')
// || esc[1] == 'P' || esc[1] == 'R'
// || esc[1] == 'I' || esc[1] == 'B'))
// { +#if 0 + if (esc[0] == 'f' && ((esc[1] >= '0' && esc[1] <= '9') + || esc[1] == 'P' || esc[1] == 'R' + || esc[1] == 'I' || esc[1] == 'B')) + { / If a user-specified, device-specific font [e.g. an X font, for which we have no internal table listing the other fonts in its family] is being used, we can't really do font switching, except via \f0, \f1. These switch to the X symbol font and the current user-specified font, respectively. (\fP is also supported.) /
// if (_plotter->drawstate->font_type == F_OTHER
// && ((esc[1] >= '2' && esc[1] <= '9')
// || esc[1] == 'I' || esc[1] == 'B'))
// esc[1] = '1'; / treat as \f1 / + if (_plotter->drawstate->font_type == F_OTHER + && ((esc[1] >= '2' && esc[1] <= '9') + || esc[1] == 'I' || esc[1] == 'B')) + esc[1] = '1'; / treat as \f1 /
// if (esc[1] == 'R')
// esc[1] = '1';
// else if (esc[1] == 'I')
// esc[1] = '2';
// else if (esc[1] == 'B')
// esc[1] = '3'; -
// if (esc[1] == 'P') / \fP seen, so go back to previous font /
// raw_fontnum = previous_raw_fontnum;
// else / font specified as index into typeface /
// {
// int new_font_index = esc[1] - '0'; + if (esc[1] == 'R') + esc[1] = '1'; + else if (esc[1] == 'I') + esc[1] = '2'; + else if (esc[1] == 'B') + esc[1] = '3'; + + if (esc[1] == 'P') / \fP seen, so go back to previous font / + raw_fontnum = previous_raw_fontnum; + else / font specified as index into typeface / + { + int new_font_index = esc[1] - '0';
// previous_raw_fontnum = raw_fontnum;
// switch (_plotter->drawstate->font_type)
// {
// case F_HERSHEY:
// if ((new_font_index >= _hershey_typeface_info[_plotter->drawstate->typeface_index].numfonts)
// || new_font_index < 0)
// new_font_index = 1; / OOB -> use default font /
// raw_fontnum = _hershey_typeface_info[_plotter->drawstate->typeface_index].fonts[new_font_index];
// break;
// case F_PCL:
// if ((new_font_index >= _pcl_typeface_info[_plotter->drawstate->typeface_index].numfonts)
// || new_font_index < 0)
// new_font_index = 1; / OOB -> use default font /
// raw_fontnum = _pcl_typeface_info[_plotter->drawstate->typeface_index].fonts[new_font_index];
// break;
// case F_STICK:
// if ((new_font_index >= _stick_typeface_info[_plotter->drawstate->typeface_index].numfonts)
// || new_font_index < 0)
// new_font_index = 1; / OOB -> use default font /
// raw_fontnum = _stick_typeface_info[_plotter->drawstate->typeface_index].fonts[new_font_index];
// break;
// case F_POSTSCRIPT:
// default:
// if ((new_font_index >= _ps_typeface_info[_plotter->drawstate->typeface_index].numfonts)
// || new_font_index < 0)
// new_font_index = 1; / OOB -> use default font /
// raw_fontnum = _ps_typeface_info[_plotter->drawstate->typeface_index].fonts[new_font_index];
// break;
// case F_OTHER:
// if (new_font_index != 0 && new_font_index != 1)
// new_font_index = 1; / OOB -> use default font /
// raw_fontnum = new_font_index;
// break;
// }
// } + previous_raw_fontnum = raw_fontnum; + switch (_plotter->drawstate->font_type) + { + case F_HERSHEY: + if ((new_font_index >= _hershey_typeface_info[_plotter->drawstate->typeface_index].numfonts) + || new_font_index < 0) + new_font_index = 1; / OOB -> use default font / + raw_fontnum = _hershey_typeface_info[_plotter->drawstate->typeface_index].fonts[new_font_index]; + break; + case F_PCL: + if ((new_font_index >= _pcl_typeface_info[_plotter->drawstate->typeface_index].numfonts) + || new_font_index < 0) + new_font_index = 1; / OOB -> use default font / + raw_fontnum = _pcl_typeface_info[_plotter->drawstate->typeface_index].fonts[new_font_index]; + break; + case F_STICK: + if ((new_font_index >= _stick_typeface_info[_plotter->drawstate->typeface_index].numfonts) + || new_font_index < 0) + new_font_index = 1; / OOB -> use default font / + raw_fontnum = _stick_typeface_info[_plotter->drawstate->typeface_index].fonts[new_font_index]; + break; + case F_POSTSCRIPT: + default: + if ((new_font_index >= _ps_typeface_info[_plotter->drawstate->typeface_index].numfonts) + || new_font_index < 0) + new_font_index = 1; / OOB -> use default font / + raw_fontnum = _ps_typeface_info[_plotter->drawstate->typeface_index].fonts[new_font_index]; + break; + case F_OTHER: + if (new_font_index != 0 && new_font_index != 1) + new_font_index = 1; / OOB -> use default font / + raw_fontnum = new_font_index; + break; + } + }
// fontword = ((unsigned short)raw_fontnum) << FONT_SHIFT; + fontword = ((unsigned short)raw_fontnum) << FONT_SHIFT;
// continue; / back to top of while loop /
// }
+ continue; / back to top of while loop / + } +#endif
/ couldn't match; unknown escape seq., so pass through unchanged / dest[j++] = fontword | (unsigned short)'\'; dest[j++] = fontword | (unsigned short)c; --- ./src/main/g_alab_her.c.dec-cc.patch Mon Feb 7 14:53:49 2000 +++ ./src/main/g_alab_her.c Mon Feb 7 14:56:07 2000 @@ -18,12 +18,12 @@ / PAUL MURRELL sys-defines.h not used / -// #include "sys-defines.h" +/ #include "sys-defines.h" /
/ PAUL MURRELL Added this to replace definition in sys-defines.h with R one / -//#include "Mathlib.h" +/ #include "Mathlib.h" /
/* PAUL MURRELL extern.h renamed g_extern.h @@ -166,7 +166,7 @@ label_width = _label_width_hershey (dd, codestring);
vmaxset(vmax);
// free (codestring); + / free (codestring); /
return label_width; } @@ -281,9 +281,9 @@
srtsave = dd->gp.srt; dd->gp.srt = rotation;
// dd->gp.lwd set in _draw_hershey_string + / dd->gp.lwd set in _draw_hershey_string / lwdsave = dd->gp.lwd;
// When drawing vector font, always use "solid" lines + / When drawing vector font, always use "solid" lines / ltysave = dd->gp.lty; dd->gp.lty = LTY_SOLID;
@@ -330,7 +330,7 @@ GConvertYUnits(y_offset label_height, g_unit, INCHES, dd)); / call stroker on the sequence of strokes obtained from each char (the stroker may manipulate the line width) / -//_draw_hershey_stroke (dd, true, 0, HERSHEY_EM);
+ /_draw_hershey_stroke (dd, true, 0, HERSHEY_EM); */ _draw_hershey_string (dd, codestring);
@@ -348,7 +348,7 @@ free (old_join_mode); / / return to original position / -// _plotter->fmove (R___(_plotter) oldposx, oldposy); +/ _plotter->fmove (R___(_plotter) oldposx, oldposy); */ }
dd->gp.srt = srtsave; @@ -368,12 +368,12 @@ */
vmaxset(vmax);
// free (codestring); + / free (codestring); /
/ PAUL MURRELL No return value /
// return label_width; / user units / + / return label_width; / / user units / }
/* In addition to scaling the character sizes and the `width', we perform @@ -708,15 +708,15 @@ break;
case C_PUSH_LOCATION:
// saved_position_y = _plotter->drawstate->pos.y; + / saved_charsize = charsize; + saved_position_x = _plotter->drawstate->pos.x; + saved_position_y = _plotter->drawstate->pos.y; / break;
case C_POP_LOCATION:
// saved_position_x, saved_position_y); + / charsize = saved_charsize; + _plotter->fmove (R___(_plotter) + saved_position_x, saved_position_y); / break;
case C_RIGHT_ONE_EM: --- ./src/main/plot3d.c.dec-cc.patch Mon Feb 7 14:57:15 2000 +++ ./src/main/plot3d.c Mon Feb 7 14:58:58 2000 @@ -243,8 +243,8 @@ x = REAL(label)[i]; y = REAL(label)[i+4]; GConvert(&x, &y, USER, NDC, dd);
// y = GConvertYUnits(REAL(label)[i+4], USER, NDC, dd); + / x = GConvertXUnits(REAL(label)[i], USER, NDC, dd); + y = GConvertYUnits(REAL(label)[i+4], USER, NDC, dd); /
if ((x < 0) || (x > 1) || (y < 0) || (y > 1)) @@ -718,7 +718,7 @@ sprintf(buffer, " %.00f ", zc);
} // switch (method) + } / switch (method) /
@@ -871,7 +871,7 @@
METADATA