FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

a patch enabling the PostScript terminal to use ISO-8859-2 encoding · gnuplot/gnuplot-old@e0d1bba · GitHub

Repository navigation

Commit e0d1bba

Browse files
mikulik
committed
a patch enabling the PostScript terminal to use ISO-8859-2 encoding
1 parent 47427da commit e0d1bba

10 files changed

Lines changed: 81 additions & 16 deletions

File tree

‎ChangeLog‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2000-11-29 Levente Novak <novak@jaguar.dote.hu>
2+
3+
* docs/gnuplot.doc docs/gnuplot.texi docs/psdoc/README
4+
docs/psdoc/ps_guide.ps lisp/gnuplot-gui.el src/set.c src/term.c
5+
src/term_api.h term/post.trm: a patch enabling the PostScript
6+
terminal to use ISO-8859-2 encoding.
7+
18
2000-11-27 Alexander Mai <st002279@hrzpub.tu-darmstadt.de>
29

310
* src/readline.c: readline.c did not built with HAVE_LIBREADLINE.

‎docs/gnuplot.doc‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
C RCS $Id: gnuplot.doc,v 1.54 2000/11/24 17:08:15 amai Exp $
1+
C RCS $Id: gnuplot.doc,v 1.55 2000/11/29 10:20:28 mikulik Exp $
22
C 3 December 1998
33
C Copyright (C) 1986 - 1993, 1998 Thomas Williams, Colin Kelley
44
C
@@ -3941,7 +3941,8 @@ C ... and restart the table:
39413941
The `set encoding` command selects a character encoding. Valid values are
39423942
`default`, which tells a terminal to use its default; `iso_8859_1` (known in
39433943
the PostScript world as `ISO-Latin1`), which is used on many Unix workstations
3944-
and with MS-Windows; `cp850`, for OS/2; and `cp437`, for MS-DOS.
3944+
and with MS-Windows; `iso_8859_2`, used in Central and Eastern Europe; `cp850`,
3945+
for OS/2; and `cp437`, for MS-DOS.
39453946

39463947
Syntax:
39473948
set encoding {<value>}

‎docs/gnuplot.texi‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5307,7 +5307,8 @@ The second example sets the second variable to s.
53075307
The @ref{encoding} command selects a character encoding. Valid values are
53085308
`default`, which tells a terminal to use its default; `iso_8859_1` (known in
53095309
the PostScript world as `ISO-Latin1`), which is used on many Unix workstations
5310-
and with MS-Windows; `cp850`, for OS/2; and `cp437`, for MS-DOS.
5310+
and with MS-Windows; `iso_8859_2`, used in Central and Eastern Europe; `cp850`,
5311+
for OS/2; and `cp437`, for MS-DOS.
53115312

53125313
Syntax:
53135314
@example

‎docs/psdoc/README‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ ps_guide.ps
99
second is a table of the character codes. The table has the standard
1010
encoding (shown in Times-Roman), the Symbol and Zapf-Dingbats fonts, and
1111
the ISO-Latin1 (also known as ISO-8859-1) encoding. The last entry may
12-
be changed to CP850 (for OS/2) or CP437 (for MS-DOS) by editing line #14
13-
in the file. These non-standard encodings are selected via the "set
14-
encoding" command.
12+
be changed to ISO-Latin2 (also called as ISO-8859-2), CP850 (for OS/2) or
13+
CP437 (for MS-DOS) by editing line #14 in the file. These encodings are
14+
selected via the "set encoding" command.
1515

1616
ps_symbols.gpi
1717
is a gnuplot command file that generates ps_symbols. ps.ps_symbols.ps

‎docs/psdoc/ps_guide.ps‎

2.24 KB
Binary file not shown.

‎lisp/gnuplot-gui.el‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ See the doc-string for `gnuplot-gui-all-types'.")
395395
'(("ROW,COLUMN,NORM" 'position " " "" 3)))
396396
(cons "encoding"
397397
'(("ENCODING" 'list " " "default" "iso_8859_1"
398-
"cp850" "cp437")))
398+
"iso_8859_2" "cp850" "cp437")))
399399
(cons "format"
400400
'(("AXIS" 'list " " "x" "y" "z" "xy" "x2" "y2")
401401
("FORMAT" 'format " ")))

‎src/set.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef lint
2-
static char *RCSid() { return RCSid("$Id: set.c,v 1.45 2000/11/23 08:35:39 mikulik Exp $"); }
2+
static char *RCSid() { return RCSid("$Id: set.c,v 1.46 2000/11/29 10:20:31 mikulik Exp $"); }
33
#endif
44

55
/* GNUPLOT - set.c */
@@ -1095,7 +1095,7 @@ set_encoding()
10951095
temp = lookup_table(&set_encoding_tbl[0],c_token);
10961096

10971097
if (temp == S_ENC_INVALID)
1098-
int_error(c_token, "expecting one of 'default', 'iso_8859_1', 'cp437' or 'cp850'");
1098+
int_error(c_token, "expecting one of 'default', 'iso_8859_1', 'iso_8859_2', 'cp437' or 'cp850'");
10991099
c_token++;
11001100
}
11011101
encoding = temp;

‎src/term.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef lint
2-
static char *RCSid() { return RCSid("$Id: term.c,v 1.29 2000/11/20 09:47:07 mikulik Exp $"); }
2+
static char *RCSid() { return RCSid("$Id: term.c,v 1.30 2000/11/29 10:20:31 mikulik Exp $"); }
33
#endif
44

55
/* GNUPLOT - term.c */
@@ -140,12 +140,13 @@ TBOOLEAN ignore_enhanced_text = FALSE;
140140
enum set_encoding_id encoding;
141141
/* table of encoding names, for output of the setting */
142142
const char *encoding_names[] = {
143-
"default", "iso_8859_1", "cp437", "cp850", NULL };
143+
"default", "iso_8859_1", "iso_8859_2", "cp437", "cp850", NULL };
144144
/* 'set encoding' options */
145145
struct gen_table set_encoding_tbl[] =
146146
{
147147
{ "def$ault", S_ENC_DEFAULT },
148148
{ "iso$_8859_1", S_ENC_ISO8859_1 },
149+
{ "iso_8859_2", S_ENC_ISO8859_2 },
149150
{ "cp4$37", S_ENC_CP437 },
150151
{ "cp8$50", S_ENC_CP850 },
151152
{ NULL, S_ENC_INVALID }

‎src/term_api.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $Id: term_api.h,v 1.9 2000/11/23 18:25:48 lhecking Exp $
2+
* $Id: term_api.h,v 1.10 2000/11/29 10:20:31 mikulik Exp $
33
*/
44

55
/* GNUPLOT - term_api.h */
@@ -169,7 +169,7 @@ typedef struct TERMENTRY {
169169
#endif
170170

171171
enum set_encoding_id {
172-
S_ENC_DEFAULT, S_ENC_ISO8859_1, S_ENC_CP437, S_ENC_CP850,
172+
S_ENC_DEFAULT, S_ENC_ISO8859_1, S_ENC_ISO8859_2, S_ENC_CP437, S_ENC_CP850,
173173
S_ENC_INVALID
174174
};
175175

‎term/post.trm‎

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $Id: post.trm,v 1.46 2000/11/20 09:47:08 mikulik Exp $
2+
* $Id: post.trm,v 1.47 2000/11/29 10:20:32 mikulik Exp $
33
*/
44

55
/* GNUPLOT - post.trm */
@@ -522,6 +522,9 @@ int can_reencode;
522522
case S_ENC_ISO8859_1:
523523
recode = "reencodeISO def\n";
524524
break;
525+
case S_ENC_ISO8859_2:
526+
recode = "reencodeISO2 def\n";
527+
break;
525528
case S_ENC_CP437:
526529
recode = "reencodeCP437 def\n";
527530
break;
@@ -796,6 +799,53 @@ const char **dict; /* extra entries for the dictionary */
796799
"] def\n",
797800
NULL };
798801

802+
/* Encoding for ISO-8859-2 (also called as Latin-2), with */
803+
/* minor differences to "true" ISO-8859-2 (*commaaccent */
804+
/* instead of *cedilla for sStT -> incorrect in ISO-8859-2, */
805+
/* the standard will probably be modified in this respect) */
806+
/* Levente NOV�K <novak@jaguar.dote.hu> */
807+
808+
static const char GPFAR * GPFAR PS_iso_8859_2_encoding[] = {
809+
"/reencodeISO2 {\n",
810+
"dup dup findfont dup length dict begin\n",
811+
"{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n",
812+
"currentdict /CharStrings known {\n",
813+
"\tCharStrings /Idieresis known {\n",
814+
"\t\t/Encoding ISOLatin2Encoding def } if\n} if\n",
815+
"currentdict end definefont\n",
816+
"} def\n",
817+
"/ISOLatin2Encoding [\n",
818+
"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n",
819+
"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n",
820+
"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n",
821+
"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n",
822+
"/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright\n",
823+
"/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash\n",
824+
"/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon\n",
825+
"/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M\n",
826+
"/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright\n",
827+
"/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m\n",
828+
"/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde\n",
829+
"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n",
830+
"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n",
831+
"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n",
832+
"/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef\n",
833+
"/nbspace/Aogonek/breve/Lslash/currency/Lcaron/Sacute/section\n",
834+
"/dieresis/Scaron/Scommaaccent/Tcaron/Zacute/hyphen/Zcaron/Zdotaccent\n",
835+
"/degree/aogonek/ogonek/lslash/acute/lcaron/sacute/caron/cedilla\n",
836+
"/scaron/scommaaccent/tcaron/zacute/hungarumlaut/zcaron/zdotaccent\n",
837+
"/Racute/Aacute/Acircumflex/Abreve/Adieresis/Lacute/Cacute/Ccedilla\n",
838+
"/Ccaron/Eacute/Eogonek/Edieresis/Ecaron/Iacute/Icircumflex/Dcaron\n",
839+
"/Dcroat/Nacute/Ncaron/Oacute/Ocircumflex/Ohungarumlaut/Odieresis\n",
840+
"/multiply/Rcaron/Uring/Uacute/Uhungarumlaut/Udieresis/Yacute\n",
841+
"/Tcommaaccent/germandbls/racute/aacute/acircumflex/abreve/adieresis\n",
842+
"/lacute/cacute/ccedilla/ccaron/eacute/eogonek/edieresis/ecaron\n",
843+
"/iacute/icircumflex/dcaron/dcroat/nacute/ncaron/oacute/ocircumflex\n",
844+
"/ohungarumlaut/odieresis/divide/rcaron/uring/uacute/uhungarumlaut\n",
845+
"/udieresis/yacute/tcommaaccent/dotaccent\n",
846+
"] def\n",
847+
NULL };
848+
799849
/* encoding for code page 437 */
800850
/* */
801851
/* version 1.0: - Mainly letters are mapped. The following positions */
@@ -843,7 +893,7 @@ NULL };
843893
"/.notdef/germandbls/.notdef/.notdef/.notdef/.notdef/mu/.notdef\n",
844894
"/.notdef/.notdef/.notdef/.notdef/infinity/.notdef/.notdef/.notdef\n",
845895
"/.notdef/plusminus/greaterequal/lessequal/.notdef/.notdef/divide/.notdef\n",
846-
"/degree/bullet/periodcentered/.notdef/nsuperior/twosuperior/.notdef\n",
896+
"/degree/bullet/periodcentered/.notdef/nsuperior/twosuperior/.notdef/.notdef\n",
847897
"] def\n",
848898
NULL };
849899

@@ -891,7 +941,7 @@ NULL };
891941
"/Oacute/germandbls/Ocircumflex/Ograve/otilde/Otilde/mu/thorn\n",
892942
"/Thorn/Uacute/Ucircumflex/Ugrave/yacute/Yacute/macron/acute\n",
893943
"/hyphen/plusminus/equal/threequarters/paragraph/section/divide/.notdef\n",
894-
"/degree/.notdef/periodcentered/onesuperior/threesuperior/twosuperior/.notdef\n",
944+
"/degree/.notdef/periodcentered/onesuperior/threesuperior/twosuperior/.notdef/.notdef\n",
895945
"] def\n",
896946
NULL };
897947

@@ -939,6 +989,11 @@ NULL };
939989
fprintf(gpoutfile,"%s",PS_iso_8859_1_encoding[i]);
940990
}
941991
}
992+
if (uses_fonts && (encoding == S_ENC_ISO8859_2)) {
993+
for (i = 0; PS_iso_8859_2_encoding[i] != NULL; i++) {
994+
fprintf(gpoutfile,"%s",PS_iso_8859_2_encoding[i]);
995+
}
996+
}
942997
if (uses_fonts && (encoding == S_ENC_CP437)) { /* JFi */
943998
for (i = 0; PS_cp_437_encoding[i] != NULL; i++) {
944999
fprintf(gpoutfile,"%s",PS_cp_437_encoding[i]);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL