Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2f4b33c9
Commit
2f4b33c9
authored
Oct 05, 2004
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 05, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure PostScript floats are printed with LC_NUMERIC="C".
parent
7a9e8005
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
ps.c
dlls/wineps/ps.c
+9
-0
psdrv.h
dlls/wineps/psdrv.h
+9
-0
type42.c
dlls/wineps/type42.c
+3
-0
No files found.
dlls/wineps/ps.c
View file @
2f4b33c9
...
...
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <locale.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
...
...
@@ -469,7 +470,9 @@ BOOL PSDRV_WriteArc(PSDRV_PDEVICE *physDev, INT x, INT y, INT w, INT h, double a
/* Make angles -ve and swap order because we're working with an upside
down y-axis */
push_lc_numeric
(
"C"
);
sprintf
(
buf
,
psarc
,
x
,
y
,
w
,
h
,
-
ang2
,
-
ang1
);
pop_lc_numeric
();
return
PSDRV_WriteSpool
(
physDev
,
buf
,
strlen
(
buf
));
}
...
...
@@ -500,12 +503,16 @@ BOOL PSDRV_WriteSetColor(PSDRV_PDEVICE *physDev, PSCOLOR *color)
PSDRV_CopyColor
(
&
physDev
->
inkColor
,
color
);
switch
(
color
->
type
)
{
case
PSCOLOR_RGB
:
push_lc_numeric
(
"C"
);
sprintf
(
buf
,
pssetrgbcolor
,
color
->
value
.
rgb
.
r
,
color
->
value
.
rgb
.
g
,
color
->
value
.
rgb
.
b
);
pop_lc_numeric
();
return
PSDRV_WriteSpool
(
physDev
,
buf
,
strlen
(
buf
));
case
PSCOLOR_GRAY
:
push_lc_numeric
(
"C"
);
sprintf
(
buf
,
pssetgray
,
color
->
value
.
gray
.
i
);
pop_lc_numeric
();
return
PSDRV_WriteSpool
(
physDev
,
buf
,
strlen
(
buf
));
default:
...
...
@@ -604,7 +611,9 @@ BOOL PSDRV_WriteRotate(PSDRV_PDEVICE *physDev, float ang)
{
char
buf
[
256
];
push_lc_numeric
(
"C"
);
sprintf
(
buf
,
psrotate
,
ang
);
pop_lc_numeric
();
return
PSDRV_WriteSpool
(
physDev
,
buf
,
strlen
(
buf
));
}
...
...
dlls/wineps/psdrv.h
View file @
2f4b33c9
...
...
@@ -549,4 +549,13 @@ extern void T42_free(TYPE42 *t42);
extern
DWORD
RLE_encode
(
BYTE
*
in_buf
,
DWORD
len
,
BYTE
*
out_buf
);
extern
DWORD
ASCII85_encode
(
BYTE
*
in_buf
,
DWORD
len
,
BYTE
*
out_buf
);
#define push_lc_numeric(x) do { \
const char *tmplocale = setlocale(LC_NUMERIC,NULL); \
setlocale(LC_NUMERIC,x);
#define pop_lc_numeric() \
setlocale(LC_NUMERIC,tmplocale); \
} while (0)
#endif
dlls/wineps/type42.c
View file @
2f4b33c9
...
...
@@ -26,6 +26,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
#include <locale.h>
#include "windef.h"
#include "winbase.h"
...
...
@@ -199,9 +200,11 @@ TYPE42 *T42_download_header(PSDRV_PDEVICE *physDev, char *ps_name,
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
start
)
+
strlen
(
ps_name
)
+
100
);
push_lc_numeric
(
"C"
);
sprintf
(
buf
,
start
,
ps_name
,
(
float
)
bbox
->
left
/
emsize
,
(
float
)
bbox
->
bottom
/
emsize
,
(
float
)
bbox
->
right
/
emsize
,
(
float
)
bbox
->
top
/
emsize
);
pop_lc_numeric
();
PSDRV_WriteSpool
(
physDev
,
buf
,
strlen
(
buf
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment