diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-01-24 13:22:01 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-01-24 13:22:01 +0000 |
commit | c103b7963628e6ff10a1fc025aebd0bba5f72a55 (patch) | |
tree | 25e9438a01335ef3daf640e7abebc56a71b12327 /Build/source/texk/web2c/omegafonts | |
parent | a6e06905e901ade43945a363fc719e6ada2d3836 (diff) |
pltotf, vptovf, and Co: scanning real numbers
git-svn-id: svn://tug.org/texlive/trunk@25190 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/omegafonts')
-rw-r--r-- | Build/source/texk/web2c/omegafonts/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/omegafonts/Makefile.am | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/omegafonts/Makefile.in | 17 | ||||
-rw-r--r-- | Build/source/texk/web2c/omegafonts/pl-lexer.c | 34 | ||||
-rw-r--r-- | Build/source/texk/web2c/omegafonts/pl-lexer.l | 2 | ||||
-rwxr-xr-x | Build/source/texk/web2c/omegafonts/realnum.test | 17 | ||||
-rw-r--r-- | Build/source/texk/web2c/omegafonts/tests/realnum.opl | 14 | ||||
-rw-r--r-- | Build/source/texk/web2c/omegafonts/tests/realnum.out | 37 |
8 files changed, 111 insertions, 27 deletions
diff --git a/Build/source/texk/web2c/omegafonts/ChangeLog b/Build/source/texk/web2c/omegafonts/ChangeLog index 8099dcb1392..f6163e2c8eb 100644 --- a/Build/source/texk/web2c/omegafonts/ChangeLog +++ b/Build/source/texk/web2c/omegafonts/ChangeLog @@ -1,3 +1,12 @@ +2012-01-24 Peter Breitenlohner <peb@mppmu.mpg.de> + + * pl-lexer.l: 'Correctly' scan real numbers for scan_fix(). + Reported by Tanaka Takuji <KXD02663@nifty.ne.jp>. + + * realnum.test, tests/realnum.opl, tests/realnum.out (new): + Shell script and data for a new test. + * Makefile.am: Add the new test. + 2012-01-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * omfonts.c: fix a typo (omfomts ---> omfonts). diff --git a/Build/source/texk/web2c/omegafonts/Makefile.am b/Build/source/texk/web2c/omegafonts/Makefile.am index d770627dd89..e3666fcc816 100644 --- a/Build/source/texk/web2c/omegafonts/Makefile.am +++ b/Build/source/texk/web2c/omegafonts/Makefile.am @@ -1,6 +1,6 @@ ## Makefile.am for the TeX Live subdirectory texk/web2c/omegafonts/ ## -## Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org> +## Copyright (C) 2009-2012 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir) $(KPATHSEA_INCLUDES) -DNOT_WEB2C @@ -102,7 +102,8 @@ endif OTANGLE ## Tests ## -OMFONTS_tests = charwd.test level1.test omfonts.test repeat.test selectfont.test specialhex.test +OMFONTS_tests = charwd.test level1.test omfonts.test realnum.test \ + repeat.test selectfont.test specialhex.test if OTANGLE if OMFONTS TESTS = $(OMFONTS_tests) @@ -122,6 +123,9 @@ EXTRA_DIST += tests/Cherokee.pl tests/OCherokee.ovp DISTCLEANFILES += tests/Cherokee.tfm tests/OCherokee.ofm \ tests/OCherokee.opl tests/OCherokee.ovf \ tests/xCherokee.* tests/xOCherokee.* +## realnum.test +EXTRA_DIST += tests/realnum.opl tests/realnum.out +DISTCLEANFILES += tests/realnum.* ## repeat.test EXTRA_DIST += tests/repeat.opl tests/repeated.opl DISTCLEANFILES += tests/xrepeated.* diff --git a/Build/source/texk/web2c/omegafonts/Makefile.in b/Build/source/texk/web2c/omegafonts/Makefile.in index f8f62c70b33..85e52f65e6c 100644 --- a/Build/source/texk/web2c/omegafonts/Makefile.in +++ b/Build/source/texk/web2c/omegafonts/Makefile.in @@ -368,10 +368,10 @@ call_omfonts_LDADD = DISTCLEANFILES = pl-parser.output tests/charwdr.* tests/charwdv.* \ tests/xlevel1.ofm tests/xlevel1.opl tests/Cherokee.tfm \ tests/OCherokee.ofm tests/OCherokee.opl tests/OCherokee.ovf \ - tests/xCherokee.* tests/xOCherokee.* tests/xrepeated.* \ - tests/sample*.ofm tests/sample.ovf tests/sample1-h.opl \ - tests/xsample.out tests/specialhex.ofm tests/specialhex.opl \ - tests/specialhex.ovf tests/xspecialhex.* + tests/xCherokee.* tests/xOCherokee.* tests/realnum.* \ + tests/xrepeated.* tests/sample*.ofm tests/sample.ovf \ + tests/sample1-h.opl tests/xsample.out tests/specialhex.ofm \ + tests/specialhex.opl tests/specialhex.ovf tests/xspecialhex.* linked_programs = ofm2opl opl2ofm ovf2ovp ovp2ovf bin_links = \ omfonts$(EXEEXT):ofm2opl \ @@ -379,12 +379,15 @@ bin_links = \ omfonts$(EXEEXT):ovf2ovp \ omfonts$(EXEEXT):ovp2ovf -OMFONTS_tests = charwd.test level1.test omfonts.test repeat.test selectfont.test specialhex.test +OMFONTS_tests = charwd.test level1.test omfonts.test realnum.test \ + repeat.test selectfont.test specialhex.test + @OMFONTS_TRUE@@OTANGLE_TRUE@TESTS = $(OMFONTS_tests) EXTRA_DIST = $(OMFONTS_tests) tests/charwd-r.pl tests/charwd-v.vpl \ tests/level1.opl tests/Cherokee.pl tests/OCherokee.ovp \ - tests/repeat.opl tests/repeated.opl tests/sample.out \ - tests/sample.ovp tests/sample0-h.opl tests/specialhex.ovp + tests/realnum.opl tests/realnum.out tests/repeat.opl \ + tests/repeated.opl tests/sample.out tests/sample.ovp \ + tests/sample0-h.opl tests/specialhex.ovp all: all-am .SUFFIXES: diff --git a/Build/source/texk/web2c/omegafonts/pl-lexer.c b/Build/source/texk/web2c/omegafonts/pl-lexer.c index e75f0436d3f..f91560b9ea8 100644 --- a/Build/source/texk/web2c/omegafonts/pl-lexer.c +++ b/Build/source/texk/web2c/omegafonts/pl-lexer.c @@ -389,14 +389,14 @@ struct yy_trans_info }; static yyconst flex_int16_t yy_acclist[265] = { 0, - 9, 9, 206, 204, 205, 1, 204, 205, 2, 205, - 3, 204, 205, 4, 204, 205, 204, 205, 204, 205, + 206, 204, 205, 1, 204, 205, 2, 205, 3, 204, + 205, 4, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, 204, 205, - 204, 205, 1, 180, 42, 8, 8, 6, 179, 7, - 31, 44, 102, 41, 5, 107, 9, 43, 40, 46, + 1, 180, 9, 42, 8, 8, 6, 179, 7, 31, + 44, 102, 41, 5, 107, 9, 9, 43, 40, 46, 171, 23, 178, 151, 45, 77, 78, 79, 106, 75, 9, 150, 33, 32, 85, 86, 82, 83, 84, 181, @@ -422,22 +422,22 @@ static yyconst flex_int16_t yy_acclist[265] = static yyconst flex_int16_t yy_accept[801] = { 0, - 1, 2, 3, 4, 6, 9, 11, 14, 17, 19, - 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, - 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, - 61, 63, 64, 64, 64, 64, 64, 64, 64, 64, + 1, 1, 1, 2, 4, 7, 9, 12, 15, 17, + 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, + 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, + 59, 61, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 65, 65, 66, 66, 67, + 64, 64, 64, 64, 64, 64, 64, 65, 65, 66, + 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 70, 70, 70, 70, 71, 71, 71, 72, 72, - 73, 74, 75, 75, 75, 75, 75, 75, 75, 75, - 76, 76, 76, 76, 77, 77, 77, 77, 78, 78, + 68, 69, 69, 69, 69, 70, 70, 70, 71, 71, + 72, 73, 74, 74, 74, 74, 74, 74, 74, 74, + 75, 75, 75, 75, 76, 76, 76, 76, 77, 78, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, diff --git a/Build/source/texk/web2c/omegafonts/pl-lexer.l b/Build/source/texk/web2c/omegafonts/pl-lexer.l index 7f9c719eea2..35eb0bf791f 100644 --- a/Build/source/texk/web2c/omegafonts/pl-lexer.l +++ b/Build/source/texk/web2c/omegafonts/pl-lexer.l @@ -69,7 +69,7 @@ ws [ \t]+ hexnumber H{ws}[A-F0-9]+ octnumber O{ws}[0-7]+ decnumber D{ws}[0-9]+ -realnumber R[ \t+-]+[0-9]*("."[0-9]*){0,1} +realnumber R[ \t+-]+[0-9]*("."[0-9]*)? charnumber C{ws}. %% diff --git a/Build/source/texk/web2c/omegafonts/realnum.test b/Build/source/texk/web2c/omegafonts/realnum.test new file mode 100755 index 00000000000..705493de65f --- /dev/null +++ b/Build/source/texk/web2c/omegafonts/realnum.test @@ -0,0 +1,17 @@ +#! /bin/sh + +# Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org> +# You may freely use, modify and/or distribute this file. + +test -d tests || mkdir -p tests + +TEXMFCNF=$srcdir/../../kpathsea +OFMFONTS=tests +export TEXMFCNF OFMFONTS + +./omfonts -opl2ofm -verbose $srcdir/tests/realnum tests/xrealnum || exit 1 + +./omfonts -ofm2opl -verbose xrealnum tests/xrealnum || exit 1 + +diff $srcdir/tests/realnum.out tests/xrealnum.opl || exit 1 + diff --git a/Build/source/texk/web2c/omegafonts/tests/realnum.opl b/Build/source/texk/web2c/omegafonts/tests/realnum.opl new file mode 100644 index 00000000000..94a4ea43c69 --- /dev/null +++ b/Build/source/texk/web2c/omegafonts/tests/realnum.opl @@ -0,0 +1,14 @@ +(DESIGNSIZE R 10.0) +(CHARACTER C A + (COMMENT the R must be followed by a space, tab, or sign) + (CHARWD R ) + (CHARHT R 1.0) + (CHARDP R 0.1) + (CHARIC R+1) + ) +(CHARACTER C B + (CHARWD R .) + (CHARHT R 1.) + (CHARDP R .1) + (CHARIC R--1) + ) diff --git a/Build/source/texk/web2c/omegafonts/tests/realnum.out b/Build/source/texk/web2c/omegafonts/tests/realnum.out new file mode 100644 index 00000000000..c6b56b6a6bf --- /dev/null +++ b/Build/source/texk/web2c/omegafonts/tests/realnum.out @@ -0,0 +1,37 @@ +(FAMILY UNSPECIFIED) +(FACE F MRR) +(CODINGSCHEME UNSPECIFIED) +(DESIGNSIZE R 10.0) +(COMMENT DESIGNSIZE IS IN POINTS) +(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE) +(CHECKSUM H 0) +(FONTDIMEN + ) +(COMMENT + (CHARWD_ENTRY D 0 R 0.0) + (CHARWD_ENTRY D 1 R 0.0) + ) +(COMMENT + (CHARHT_ENTRY D 0 R 0.0) + (CHARHT_ENTRY D 1 R 1.0) + ) +(COMMENT + (CHARDP_ENTRY D 0 R 0.0) + (CHARDP_ENTRY D 1 R 0.1) + ) +(COMMENT + (CHARIC_ENTRY D 0 R 0.0) + (CHARIC_ENTRY D 1 R 1.0) + ) +(CHARACTER H 41 + (CHARWD R 0.0) + (CHARHT R 1.0) + (CHARDP R 0.1) + (CHARIC R 1.0) + ) +(CHARACTER H 42 + (CHARWD R 0.0) + (CHARHT R 1.0) + (CHARDP R 0.1) + (CHARIC R 1.0) + ) |