From c126eea11c4ee39cbe9c0c76f920626b618b6ee9 Mon Sep 17 00:00:00 2001 From: Ralph Little Date: Sun, 1 Sep 2019 17:03:44 -0700 Subject: [PATCH] Apply debian upstream patch 0135-fix_pdf_floats Original patch commentary: Description: Fix floats in PDF and PostScript Set LC_NUMERIC to POSIX before printing floats when building PostScript or PDF output. Author: Julien BLACHE Forwarded: yes ------------ Looks like float printing format is affected by the current locale. Ensures that we always get POSIX formatting of floats. --- src/xsane-save.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/xsane-save.c b/src/xsane-save.c index f14df05..63550cc 100644 --- a/src/xsane-save.c +++ b/src/xsane-save.c @@ -26,6 +26,8 @@ #include "xsane-back-gtk.h" #include "xsane-front-gtk.h" #include "xsane-save.h" +#include +#include #include #include @@ -2425,6 +2427,7 @@ static void xsane_save_ps_create_image_header(FILE *outfile, int flatedecode) { int depth; + char *save_locale; depth = image_info->depth; @@ -2442,8 +2445,15 @@ static void xsane_save_ps_create_image_header(FILE *outfile, fprintf(outfile, "%d rotate\n", degree); fprintf(outfile, "%d %d translate\n", position_left, position_bottom); + + save_locale = strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "POSIX"); + fprintf(outfile, "%f %f scale\n", width, height); + setlocale(LC_NUMERIC, save_locale); + free(save_locale); + fprintf(outfile, "<<\n"); fprintf(outfile, " /ImageType 1\n"); fprintf(outfile, " /Width %d\n", image_info->image_width); @@ -3921,6 +3931,7 @@ static void xsane_save_pdf_create_page_header(FILE *outfile, struct pdf_xref *xr int position_left, position_bottom, box_left, box_bottom, box_right, box_top, depth; int left, bottom; float rad; + char *save_locale; DBG(DBG_proc, "xsane_save_pdf_create_page_header\n"); @@ -4035,8 +4046,16 @@ static void xsane_save_pdf_create_page_header(FILE *outfile, struct pdf_xref *xr fprintf(outfile, "q\n"); fprintf(outfile, "1 0 0 1 %d %d cm\n", position_left, position_bottom); /* translate */ + + save_locale = strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "POSIX"); + fprintf(outfile, "%f %f -%f %f 0 0 cm\n", cos(rad), sin(rad), sin(rad), cos(rad)); /* rotate */ fprintf(outfile, "%f 0 0 %f 0 0 cm\n", width, height); /* scale */ + + setlocale(LC_NUMERIC, save_locale); + free(save_locale); + fprintf(outfile, "BI\n"); fprintf(outfile, " /W %d\n", image_info->image_width); fprintf(outfile, " /H %d\n", image_info->image_height); -- 2.22.0 8-31 10:45:43 +0200'>2024-08-31gnu: Boost: Fix a bug that breaks libetonyek....This fixes <https://issues.guix.gnu.org/72040>. * gnu/packages/patches/boost-fix-duplicate-definitions-bug.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/boost.scm (boost)[source]: Use it. (boost-for-source-highlight): New variable, not using the patch. * gnu/packages/pretty-print.scm (source-highlight)[inputs]: Replace BOOST with BOOST-FOR-SOURCE-HIGHLIGHT. Change-Id: I5fbc9eb5000aefd7d3a14cc7a0482741032b5400 Leo Famulari 2024-05-06gnu: highlight: Update to 4.11....* gnu/packages/pretty-print.scm (highlight): Update to 4.11. [source]: Switch to git-fetch. [home-page]: Switch to html page. [arguments]<#:make-flags>: Use #$output replace %output. <#:phases>: Use ‘this-package-input‘ to find lua and perl. Reviewed-by: Dale Mellor <guix-devel-0brg6a@rdmp.org> Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> Change-Id: I0c402fcea5708c4882b52309b3e072301f0a5614 chris 2024-04-05gnu: a2ps: Update to 4.15.6...* gnu/packages/pretty-print.scm (a2ps): Update to 4.15.6 Change-Id: I807970cf48ebb53df3f372a41d1379b85e3e9131 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Andy Tai 2024-02-05gnu: fmt-10: Update to 10.2.1....* gnu/packages/pretty-print.scm (fmt-10): Update to 10.2.1. Change-Id: I11e0828c120f1f14c8c9f1c080d0608f81354ae3 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Greg Hogan 2024-01-23Revert "gnu: source-highlight: Wrap scripts."...This package causes the rebuild of more than 9000 packages. This reverts commit 367bc2d198f57bc34522441820f761b61fed0ce0. Efraim Flashner 2024-01-23gnu: source-highlight: Wrap scripts....* gnu/packages/pretty-print.scm (source-highlight)[arguments]: Add a phase to wrap shell scripts so they can find the source-hightlight binary. [inputs]: Add guile-3.0. Change-Id: Ia8d006d969385210d5c82b4a0dd1f78178306ac2 Efraim Flashner