Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
12130a4d
Commit
12130a4d
authored
Apr 18, 2016
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hw/nxagent/NXglyphcurs.c: Shrink file, drop duplicate code that can identically…
hw/nxagent/NXglyphcurs.c: Shrink file, drop duplicate code that can identically be found in dix/glyphcurs.c.
parent
a6485587
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
71 deletions
+5
-71
Imakefile
nx-X11/programs/Xserver/dix/Imakefile
+2
-2
glyphcurs.c
nx-X11/programs/Xserver/dix/glyphcurs.c
+2
-1
NXglyphcurs.c
nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
+1
-68
No files found.
nx-X11/programs/Xserver/dix/Imakefile
View file @
12130a4d
...
@@ -16,11 +16,13 @@ FFS_OBJ = ffs.o
...
@@ -16,11 +16,13 @@ FFS_OBJ = ffs.o
#if (!(defined(NXAgentServer) && NXAgentServer))
#if (!(defined(NXAgentServer) && NXAgentServer))
NXAGENT_SKIP_SRCS = \
NXAGENT_SKIP_SRCS = \
extension.c \
extension.c \
glyphcurs.c \
resource.c \
resource.c \
window.c \
window.c \
$(NULL)
$(NULL)
NXAGENT_SKIP_OBJS = \
NXAGENT_SKIP_OBJS = \
extension.o \
extension.o \
glyphcurs.o \
resource.o \
resource.o \
window.o \
window.o \
$(NULL)
$(NULL)
...
@@ -37,7 +39,6 @@ SRCS = \
...
@@ -37,7 +39,6 @@ SRCS = \
events.c \
events.c \
gc.c \
gc.c \
globals.c \
globals.c \
glyphcurs.c \
grabs.c \
grabs.c \
main.c \
main.c \
property.c \
property.c \
...
@@ -63,7 +64,6 @@ OBJS = \
...
@@ -63,7 +64,6 @@ OBJS = \
events.o \
events.o \
gc.o \
gc.o \
globals.o \
globals.o \
glyphcurs.o \
grabs.o \
grabs.o \
main.o \
main.o \
property.o \
property.o \
...
...
nx-X11/programs/Xserver/dix/glyphcurs.c
View file @
12130a4d
...
@@ -74,6 +74,7 @@ the first one we find.
...
@@ -74,6 +74,7 @@ the first one we find.
cursor metrics.
cursor metrics.
*/
*/
#ifndef NXAGENT_SERVER
int
int
ServerBitsFromGlyph
(
FontPtr
pfont
,
unsigned
ch
,
register
CursorMetricPtr
cm
,
unsigned
char
**
ppbits
)
ServerBitsFromGlyph
(
FontPtr
pfont
,
unsigned
ch
,
register
CursorMetricPtr
cm
,
unsigned
char
**
ppbits
)
{
{
...
@@ -138,7 +139,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
...
@@ -138,7 +139,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
(
*
pScreen
->
DestroyPixmap
)(
ppix
);
(
*
pScreen
->
DestroyPixmap
)(
ppix
);
return
Success
;
return
Success
;
}
}
#endif
/* NXAGENT_SERVER */
Bool
Bool
CursorMetricsFromGlyph
(
register
FontPtr
pfont
,
unsigned
ch
,
register
CursorMetricPtr
cm
)
CursorMetricsFromGlyph
(
register
FontPtr
pfont
,
unsigned
ch
,
register
CursorMetricPtr
cm
)
...
...
nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c
View file @
12130a4d
...
@@ -64,20 +64,7 @@ SOFTWARE.
...
@@ -64,20 +64,7 @@ SOFTWARE.
/* $Xorg: glyphcurs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */
/* $Xorg: glyphcurs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include "../../dix/glyphcurs.c"
#include <dix-config.h>
#endif
#include "misc.h"
#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
#include "scrnintstr.h"
#include "gcstruct.h"
#include "resource.h"
#include "dix.h"
#include "cursorstr.h"
#include "opaque.h"
#include "servermd.h"
#include "../../fb/fb.h"
#include "../../fb/fb.h"
#include "Pixmaps.h"
#include "Pixmaps.h"
...
@@ -183,57 +170,3 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
...
@@ -183,57 +170,3 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
return
Success
;
return
Success
;
}
}
Bool
CursorMetricsFromGlyph
(
register
FontPtr
pfont
,
unsigned
ch
,
register
CursorMetricPtr
cm
)
{
CharInfoPtr
pci
;
unsigned
long
nglyphs
;
CARD8
chs
[
2
];
FontEncoding
encoding
;
chs
[
0
]
=
ch
>>
8
;
chs
[
1
]
=
ch
;
encoding
=
(
FONTLASTROW
(
pfont
)
==
0
)
?
Linear16Bit
:
TwoD16Bit
;
if
(
encoding
==
Linear16Bit
)
{
if
(
ch
<
pfont
->
info
.
firstCol
||
pfont
->
info
.
lastCol
<
ch
)
return
FALSE
;
}
else
{
if
(
chs
[
0
]
<
pfont
->
info
.
firstRow
||
pfont
->
info
.
lastRow
<
chs
[
0
])
return
FALSE
;
if
(
chs
[
1
]
<
pfont
->
info
.
firstCol
||
pfont
->
info
.
lastCol
<
chs
[
1
])
return
FALSE
;
}
(
*
pfont
->
get_glyphs
)
(
pfont
,
1
,
chs
,
encoding
,
&
nglyphs
,
&
pci
);
if
(
nglyphs
==
0
)
return
FALSE
;
cm
->
width
=
pci
->
metrics
.
rightSideBearing
-
pci
->
metrics
.
leftSideBearing
;
cm
->
height
=
pci
->
metrics
.
descent
+
pci
->
metrics
.
ascent
;
if
(
pci
->
metrics
.
leftSideBearing
>
0
)
{
cm
->
width
+=
pci
->
metrics
.
leftSideBearing
;
cm
->
xhot
=
0
;
}
else
{
cm
->
xhot
=
-
pci
->
metrics
.
leftSideBearing
;
if
(
pci
->
metrics
.
rightSideBearing
<
0
)
cm
->
width
-=
pci
->
metrics
.
rightSideBearing
;
}
if
(
pci
->
metrics
.
ascent
<
0
)
{
cm
->
height
-=
pci
->
metrics
.
ascent
;
cm
->
yhot
=
0
;
}
else
{
cm
->
yhot
=
pci
->
metrics
.
ascent
;
if
(
pci
->
metrics
.
descent
<
0
)
cm
->
height
-=
pci
->
metrics
.
descent
;
}
return
TRUE
;
}
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