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
b95693c6
Commit
b95693c6
authored
Nov 11, 2003
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Constify strings.
parent
4e947d2f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
66 deletions
+66
-66
ppd.c
dlls/wineps/ppd.c
+2
-2
ps.c
dlls/wineps/ps.c
+57
-57
psdrv.h
dlls/wineps/psdrv.h
+1
-1
type42.c
dlls/wineps/type42.c
+6
-6
No files found.
dlls/wineps/ppd.c
View file @
b95693c6
...
...
@@ -42,8 +42,8 @@ char *valtrans;
/* map of page names in ppd file to Windows paper constants */
static
struct
{
char
*
PSName
;
static
const
struct
{
c
onst
c
har
*
PSName
;
WORD
WinPage
;
}
PageTrans
[]
=
{
{
"10x11"
,
DMPAPER_10X11
},
...
...
dlls/wineps/ps.c
View file @
b95693c6
...
...
@@ -31,7 +31,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
psdrv
);
static
char
psheader
[]
=
/* title llx lly urx ury */
static
c
onst
c
har
psheader
[]
=
/* title llx lly urx ury */
"%%!PS-Adobe-3.0
\n
"
"%%%%Creator: Wine PostScript Driver
\n
"
"%%%%Title: %s
\n
"
...
...
@@ -39,13 +39,13 @@ static char psheader[] = /* title llx lly urx ury */
"%%%%Pages: (atend)
\n
"
"%%%%EndComments
\n
"
;
static
char
psbeginprolog
[]
=
static
c
onst
c
har
psbeginprolog
[]
=
"%%BeginProlog
\n
"
;
static
char
psendprolog
[]
=
static
c
onst
c
har
psendprolog
[]
=
"%%EndProlog
\n
"
;
static
char
psprolog
[]
=
static
c
onst
c
har
psprolog
[]
=
"/tmpmtrx matrix def
\n
"
"/hatch {
\n
"
" pathbbox
\n
"
...
...
@@ -59,21 +59,21 @@ static char psprolog[] =
"/B {pop pop pop pop} def
\n
"
"/havetype42gdir {version cvi 2015 ge} bind def
\n
"
;
static
char
psbeginsetup
[]
=
static
c
onst
c
har
psbeginsetup
[]
=
"%%BeginSetup
\n
"
;
static
char
psendsetup
[]
=
static
c
onst
c
har
psendsetup
[]
=
"%%EndSetup
\n
"
;
static
char
psbeginfeature
[]
=
/* feature, value */
static
c
onst
c
har
psbeginfeature
[]
=
/* feature, value */
"mark {
\n
"
"%%%%BeginFeature: %s %s
\n
"
;
static
char
psendfeature
[]
=
static
c
onst
c
har
psendfeature
[]
=
"
\n
%%EndFeature
\n
"
"} stopped cleartomark
\n
"
;
static
char
psnewpage
[]
=
/* name, number, xres, yres, xtrans, ytrans, rot */
static
c
onst
c
har
psnewpage
[]
=
/* name, number, xres, yres, xtrans, ytrans, rot */
"%%%%Page: %s %d
\n
"
"%%%%BeginPageSetup
\n
"
"/pgsave save def
\n
"
...
...
@@ -83,32 +83,32 @@ static char psnewpage[] = /* name, number, xres, yres, xtrans, ytrans, rot */
"%d rotate
\n
"
"%%%%EndPageSetup
\n
"
;
static
char
psendpage
[]
=
static
c
onst
c
har
psendpage
[]
=
"pgsave restore
\n
"
"showpage
\n
"
;
static
char
psfooter
[]
=
/* pages */
static
c
onst
c
har
psfooter
[]
=
/* pages */
"%%%%Trailer
\n
"
"%%%%Pages: %d
\n
"
"%%%%EOF
\n
"
;
static
char
psmoveto
[]
=
/* x, y */
static
c
onst
c
har
psmoveto
[]
=
/* x, y */
"%d %d moveto
\n
"
;
static
char
pslineto
[]
=
/* x, y */
static
c
onst
c
har
pslineto
[]
=
/* x, y */
"%d %d lineto
\n
"
;
static
char
psstroke
[]
=
static
c
onst
c
har
psstroke
[]
=
"stroke
\n
"
;
static
char
psrectangle
[]
=
/* x, y, width, height, -width */
static
c
onst
c
har
psrectangle
[]
=
/* x, y, width, height, -width */
"%d %d moveto
\n
"
"%d 0 rlineto
\n
"
"0 %d rlineto
\n
"
"%d 0 rlineto
\n
"
"closepath
\n
"
;
static
char
psrrectangle
[]
=
/* x, y, width, height, -width */
static
c
onst
c
har
psrrectangle
[]
=
/* x, y, width, height, -width */
"%d %d rmoveto
\n
"
"%d 0 rlineto
\n
"
"0 %d rlineto
\n
"
...
...
@@ -118,82 +118,82 @@ static char psrrectangle[] = /* x, y, width, height, -width */
static
const
char
psglyphshow
[]
=
/* glyph name */
"/%s glyphshow
\n
"
;
static
char
pssetfont
[]
=
/* fontname, xscale, yscale, ascent, escapement */
static
c
onst
c
har
pssetfont
[]
=
/* fontname, xscale, yscale, ascent, escapement */
"/%s findfont
\n
"
"[%d 0 0 %d 0 0]
\n
"
"%d 10 div matrix rotate
\n
"
"matrix concatmatrix
\n
"
"makefont setfont
\n
"
;
static
char
pssetlinewidth
[]
=
/* width */
static
c
onst
c
har
pssetlinewidth
[]
=
/* width */
"%d setlinewidth
\n
"
;
static
char
pssetdash
[]
=
/* dash, offset */
static
c
onst
c
har
pssetdash
[]
=
/* dash, offset */
"[%s] %d setdash
\n
"
;
static
char
pssetgray
[]
=
/* gray */
static
c
onst
c
har
pssetgray
[]
=
/* gray */
"%.2f setgray
\n
"
;
static
char
pssetrgbcolor
[]
=
/* r, g, b */
static
c
onst
c
har
pssetrgbcolor
[]
=
/* r, g, b */
"%.2f %.2f %.2f setrgbcolor
\n
"
;
static
char
psarc
[]
=
/* x, y, w, h, ang1, ang2 */
static
c
onst
c
har
psarc
[]
=
/* x, y, w, h, ang1, ang2 */
"tmpmtrx currentmatrix pop
\n
"
"%d %d translate
\n
"
"%d %d scale
\n
"
"0 0 0.5 %.1f %.1f arc
\n
"
"tmpmtrx setmatrix
\n
"
;
static
char
psgsave
[]
=
static
c
onst
c
har
psgsave
[]
=
"gsave
\n
"
;
static
char
psgrestore
[]
=
static
c
onst
c
har
psgrestore
[]
=
"grestore
\n
"
;
static
char
psfill
[]
=
static
c
onst
c
har
psfill
[]
=
"fill
\n
"
;
static
char
pseofill
[]
=
static
c
onst
c
har
pseofill
[]
=
"eofill
\n
"
;
static
char
psnewpath
[]
=
static
c
onst
c
har
psnewpath
[]
=
"newpath
\n
"
;
static
char
psclosepath
[]
=
static
c
onst
c
har
psclosepath
[]
=
"closepath
\n
"
;
static
char
psclip
[]
=
static
c
onst
c
har
psclip
[]
=
"clip
\n
"
;
static
char
psinitclip
[]
=
static
c
onst
c
har
psinitclip
[]
=
"initclip
\n
"
;
static
char
pseoclip
[]
=
static
c
onst
c
har
pseoclip
[]
=
"eoclip
\n
"
;
static
char
psrectclip
[]
=
static
c
onst
c
har
psrectclip
[]
=
"%d %d %d %d rectclip
\n
"
;
static
char
psrectclip2
[]
=
static
c
onst
c
har
psrectclip2
[]
=
"%s rectclip
\n
"
;
static
char
pshatch
[]
=
static
c
onst
c
har
pshatch
[]
=
"hatch
\n
"
;
static
char
psrotate
[]
=
/* ang */
static
c
onst
c
har
psrotate
[]
=
/* ang */
"%.1f rotate
\n
"
;
static
char
psarrayget
[]
=
static
c
onst
c
har
psarrayget
[]
=
"%s %d get
\n
"
;
static
char
psarrayput
[]
=
static
c
onst
c
har
psarrayput
[]
=
"%s %d %ld put
\n
"
;
static
char
psarraydef
[]
=
static
c
onst
c
har
psarraydef
[]
=
"/%s %d array def
\n
"
;
int
PSDRV_WriteSpool
(
PSDRV_PDEVICE
*
physDev
,
LPSTR
lpData
,
WORD
cch
)
int
PSDRV_WriteSpool
(
PSDRV_PDEVICE
*
physDev
,
LP
C
STR
lpData
,
WORD
cch
)
{
if
(
physDev
->
job
.
quiet
)
{
TRACE
(
"ignoring output
\n
"
);
...
...
@@ -204,7 +204,7 @@ int PSDRV_WriteSpool(PSDRV_PDEVICE *physDev, LPSTR lpData, WORD cch)
if
(
!
PSDRV_StartPage
(
physDev
)
)
return
0
;
}
return
WriteSpool16
(
physDev
->
job
.
hJob
,
lpData
,
cch
);
return
WriteSpool16
(
physDev
->
job
.
hJob
,
(
LPSTR
)
lpData
,
cch
);
}
...
...
@@ -221,7 +221,7 @@ INT PSDRV_WriteFeature(HANDLE16 hJob, char *feature, char *value,
WriteSpool16
(
hJob
,
invocation
,
strlen
(
invocation
)
);
WriteSpool16
(
hJob
,
psendfeature
,
strlen
(
psendfeature
)
);
WriteSpool16
(
hJob
,
(
LPSTR
)
psendfeature
,
strlen
(
psendfeature
)
);
HeapFree
(
PSDRV_Heap
,
0
,
buf
);
return
1
;
...
...
@@ -265,11 +265,11 @@ INT PSDRV_WriteHeader( PSDRV_PDEVICE *physDev, LPCSTR title )
}
HeapFree
(
PSDRV_Heap
,
0
,
buf
);
WriteSpool16
(
physDev
->
job
.
hJob
,
psbeginprolog
,
strlen
(
psbeginprolog
)
);
WriteSpool16
(
physDev
->
job
.
hJob
,
psprolog
,
strlen
(
psprolog
)
);
WriteSpool16
(
physDev
->
job
.
hJob
,
psendprolog
,
strlen
(
psendprolog
)
);
WriteSpool16
(
physDev
->
job
.
hJob
,
(
LPSTR
)
psbeginprolog
,
strlen
(
psbeginprolog
)
);
WriteSpool16
(
physDev
->
job
.
hJob
,
(
LPSTR
)
psprolog
,
strlen
(
psprolog
)
);
WriteSpool16
(
physDev
->
job
.
hJob
,
(
LPSTR
)
psendprolog
,
strlen
(
psendprolog
)
);
WriteSpool16
(
physDev
->
job
.
hJob
,
psbeginsetup
,
strlen
(
psbeginsetup
)
);
WriteSpool16
(
physDev
->
job
.
hJob
,
(
LPSTR
)
psbeginsetup
,
strlen
(
psbeginsetup
)
);
for
(
slot
=
physDev
->
pi
->
ppd
->
InputSlots
;
slot
;
slot
=
slot
->
next
)
{
if
(
slot
->
WinBin
==
physDev
->
Devmode
->
dmPublic
.
dmDefaultSource
)
{
...
...
@@ -303,7 +303,7 @@ INT PSDRV_WriteHeader( PSDRV_PDEVICE *physDev, LPCSTR title )
}
}
WriteSpool16
(
physDev
->
job
.
hJob
,
psendsetup
,
strlen
(
psendsetup
)
);
WriteSpool16
(
physDev
->
job
.
hJob
,
(
LPSTR
)
psendsetup
,
strlen
(
psendsetup
)
);
return
1
;
...
...
@@ -336,7 +336,7 @@ INT PSDRV_WriteFooter( PSDRV_PDEVICE *physDev )
INT
PSDRV_WriteEndPage
(
PSDRV_PDEVICE
*
physDev
)
{
if
(
WriteSpool16
(
physDev
->
job
.
hJob
,
psendpage
,
sizeof
(
psendpage
)
-
1
)
!=
if
(
WriteSpool16
(
physDev
->
job
.
hJob
,
(
LPSTR
)
psendpage
,
sizeof
(
psendpage
)
-
1
)
!=
sizeof
(
psendpage
)
-
1
)
{
WARN
(
"WriteSpool error
\n
"
);
return
0
;
...
...
@@ -612,17 +612,17 @@ BOOL PSDRV_WriteImageDict(PSDRV_PDEVICE *physDev, WORD depth, INT xDst, INT yDst
INT
widthDst
,
INT
heightDst
,
INT
widthSrc
,
INT
heightSrc
,
char
*
bits
,
BOOL
mask
)
{
char
start
[]
=
"%d %d translate
\n
%d %d scale
\n
<<
\n
"
c
onst
c
har
start
[]
=
"%d %d translate
\n
%d %d scale
\n
<<
\n
"
" /ImageType 1
\n
/Width %d
\n
/Height %d
\n
/BitsPerComponent %d
\n
"
" /ImageMatrix [%d 0 0 %d 0 %d]
\n
"
;
char
decode1
[]
=
" /Decode [0 %d]
\n
"
;
char
decode3
[]
=
" /Decode [0 1 0 1 0 1]
\n
"
;
c
onst
c
har
decode1
[]
=
" /Decode [0 %d]
\n
"
;
c
onst
c
har
decode3
[]
=
" /Decode [0 1 0 1 0 1]
\n
"
;
char
end
[]
=
" /DataSource currentfile /ASCIIHexDecode filter
\n
>> image
\n
"
;
char
endmask
[]
=
" /DataSource currentfile /ASCIIHexDecode filter
\n
>> imagemask
\n
"
;
c
onst
c
har
end
[]
=
" /DataSource currentfile /ASCIIHexDecode filter
\n
>> image
\n
"
;
c
onst
c
har
endmask
[]
=
" /DataSource currentfile /ASCIIHexDecode filter
\n
>> imagemask
\n
"
;
char
endbits
[]
=
" /DataSource <%s>
\n
>> image
\n
"
;
c
onst
c
har
endbits
[]
=
" /DataSource <%s>
\n
>> image
\n
"
;
char
*
buf
=
HeapAlloc
(
PSDRV_Heap
,
0
,
1000
);
...
...
@@ -807,10 +807,10 @@ BOOL PSDRV_WriteRectClip2(PSDRV_PDEVICE *physDev, CHAR *pszArrayName)
BOOL
PSDRV_WritePatternDict
(
PSDRV_PDEVICE
*
physDev
,
BITMAP
*
bm
,
BYTE
*
bits
)
{
char
start
[]
=
"<<
\n
/PaintType 1
\n
/PatternType 1
\n
/TilingType 1
\n
"
c
onst
c
har
start
[]
=
"<<
\n
/PaintType 1
\n
/PatternType 1
\n
/TilingType 1
\n
"
"/BBox [0 0 %d %d]
\n
/XStep %d
\n
/YStep %d
\n
/PaintProc {
\n
begin
\n
"
;
char
end
[]
=
" end
\n
}
\n
>>
\n
matrix makepattern setpattern
\n
"
;
c
onst
c
har
end
[]
=
" end
\n
}
\n
>>
\n
matrix makepattern setpattern
\n
"
;
char
*
buf
,
*
ptr
;
INT
w
,
h
,
x
,
y
;
COLORREF
map
[
2
];
...
...
@@ -841,10 +841,10 @@ BOOL PSDRV_WritePatternDict(PSDRV_PDEVICE *physDev, BITMAP *bm, BYTE *bits)
BOOL
PSDRV_WriteDIBPatternDict
(
PSDRV_PDEVICE
*
physDev
,
BITMAPINFO
*
bmi
,
UINT
usage
)
{
char
start
[]
=
"<<
\n
/PaintType 1
\n
/PatternType 1
\n
/TilingType 1
\n
"
c
onst
c
har
start
[]
=
"<<
\n
/PaintType 1
\n
/PatternType 1
\n
/TilingType 1
\n
"
"/BBox [0 0 %d %d]
\n
/XStep %d
\n
/YStep %d
\n
/PaintProc {
\n
begin
\n
"
;
char
end
[]
=
" end
\n
}
\n
>>
\n
matrix makepattern setpattern
\n
"
;
c
onst
c
har
end
[]
=
" end
\n
}
\n
>>
\n
matrix makepattern setpattern
\n
"
;
char
*
buf
,
*
ptr
;
BYTE
*
bits
;
INT
w
,
h
,
x
,
y
,
colours
;
...
...
dlls/wineps/psdrv.h
View file @
b95693c6
...
...
@@ -449,7 +449,7 @@ extern BOOL PSDRV_WriteBytes(PSDRV_PDEVICE *physDev, const BYTE *bytes, int numb
extern
BOOL
PSDRV_WriteDIBits16
(
PSDRV_PDEVICE
*
physDev
,
const
WORD
*
words
,
int
number
);
extern
BOOL
PSDRV_WriteDIBits24
(
PSDRV_PDEVICE
*
physDev
,
const
BYTE
*
bits
,
int
number
);
extern
BOOL
PSDRV_WriteDIBits32
(
PSDRV_PDEVICE
*
physDev
,
const
BYTE
*
bits
,
int
number
);
extern
int
PSDRV_WriteSpool
(
PSDRV_PDEVICE
*
physDev
,
LPSTR
lpData
,
WORD
cch
);
extern
int
PSDRV_WriteSpool
(
PSDRV_PDEVICE
*
physDev
,
LP
C
STR
lpData
,
WORD
cch
);
extern
BOOL
PSDRV_WritePatternDict
(
PSDRV_PDEVICE
*
physDev
,
BITMAP
*
bm
,
BYTE
*
bits
);
extern
BOOL
PSDRV_WriteDIBPatternDict
(
PSDRV_PDEVICE
*
physDev
,
BITMAPINFO
*
bmi
,
UINT
usage
);
extern
BOOL
PSDRV_WriteArrayPut
(
PSDRV_PDEVICE
*
physDev
,
CHAR
*
pszArrayName
,
INT
nIndex
,
LONG
lCoord
);
...
...
dlls/wineps/type42.c
View file @
b95693c6
...
...
@@ -140,7 +140,7 @@ TYPE42 *T42_download_header(PSDRV_PDEVICE *physDev, LPOUTLINETEXTMETRICA potm,
WORD
num_of_tables
=
sizeof
(
tables_templ
)
/
sizeof
(
tables_templ
[
0
])
-
1
;
char
*
buf
;
TYPE42
*
t42
;
char
start
[]
=
/* name, fontbbox */
c
onst
c
har
start
[]
=
/* name, fontbbox */
"25 dict begin
\n
"
" /FontName /%s def
\n
"
" /Encoding 256 array 0 1 255{1 index exch /.notdef put} for
\n
"
...
...
@@ -153,10 +153,10 @@ TYPE42 *T42_download_header(PSDRV_PDEVICE *physDev, LPOUTLINETEXTMETRICA potm,
" /.notdef 0 def
\n
"
" currentdict end def
\n
"
" /sfnts [
\n
"
;
char
TT_offset_table
[]
=
"<00010000%04x%04x%04x%04x
\n
"
;
char
TT_table_dir_entry
[]
=
"%08lx%08lx%08lx%08lx
\n
"
;
char
storage
[]
=
"]
\n
havetype42gdir{pop}{{string} forall}ifelse
\n
"
;
char
end
[]
=
"] def
\n
"
c
onst
c
har
TT_offset_table
[]
=
"<00010000%04x%04x%04x%04x
\n
"
;
c
onst
c
har
TT_table_dir_entry
[]
=
"%08lx%08lx%08lx%08lx
\n
"
;
c
onst
c
har
storage
[]
=
"]
\n
havetype42gdir{pop}{{string} forall}ifelse
\n
"
;
c
onst
c
har
end
[]
=
"] def
\n
"
"havetype42gdir{/GlyphDirectory 256 dict def
\n
"
" sfnts 0 get dup %d (x) putinterval %d (x) putinterval}if
\n
"
"currentdict end dup /FontName get exch definefont pop
\n
"
;
...
...
@@ -284,7 +284,7 @@ BOOL T42_download_glyph(PSDRV_PDEVICE *physDev, DOWNLOAD *pdl, DWORD index,
WORD
awidth
;
short
lsb
;
char
glyph_def
[]
=
c
onst
c
har
glyph_def
[]
=
"/%s findfont exch 1 index
\n
"
"havetype42gdir
\n
"
"{/GlyphDirectory get begin %d exch def end}
\n
"
...
...
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