diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-25 05:26:39 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-02-25 05:26:39 +0000 |
commit | 0889c64818975e24c7ccd212778597a8f1739d9f (patch) | |
tree | e3d46e3575dc8b2b6df88c4281d09614f9b8dc56 /Build/source/texk/web2c/luatexdir/pdf/pdfgen.w | |
parent | 0b300995c365534acebfbc6884a2255f4202e670 (diff) |
web2c/luatexdir: sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@39854 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/pdf/pdfgen.w')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfgen.w | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w index 7cd27fbc5ac..5882d0b6f72 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w @@ -577,7 +577,7 @@ void print_pdffloat(PDF pdf, pdffloat f) pdf_out(pdf, '1'); } else { char a[24]; - snprintf(a, 23, "%" LONGINTEGER_PRI "d", m); + snprintf(a, 23, "%" LONGINTEGER_PRI "i", m); pdf_puts(pdf, a); } } else { @@ -585,16 +585,16 @@ void print_pdffloat(PDF pdf, pdffloat f) if (t == m) { pdf_out(pdf, '1'); } else { - int i; + int i, l, w; char a[24]; - int l = m / t; - int w = snprintf(a, 23, "%i", l); - pdf_out_block(pdf, (const char *) a, (size_t) w); if (m < 0) { - l = - m % t; - } else { - l = m % t; + pdf_out(pdf, '-'); + m *= -1; } + l = m / t; + w = snprintf(a, 23, "%i", l); + pdf_out_block(pdf, (const char *) a, (size_t) w); + l = m % t; if (l != 0) { pdf_out(pdf, '.'); snprintf(a, 23, "%d", l + t); |