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
b1850beb
You need to sign in or sign up before continuing.
Commit
b1850beb
authored
Aug 01, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Sep 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent: avoid nested externs
parent
7d2a222f
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
43 additions
and
36 deletions
+43
-36
Init.c
nx-X11/programs/Xserver/hw/nxagent/Init.c
+2
-2
NXdispatch.c
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+2
-1
NXevents.c
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+10
-6
NXpicture.c
nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
+2
-2
NXproperty.c
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+8
-5
NXrender.c
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
+2
-1
NXshm.c
nx-X11/programs/Xserver/hw/nxagent/NXshm.c
+2
-1
NXwindow.c
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+1
-3
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+6
-12
utils.c
nx-X11/programs/Xserver/os/utils.c
+8
-3
No files found.
nx-X11/programs/Xserver/hw/nxagent/Init.c
View file @
b1850beb
...
...
@@ -148,6 +148,8 @@ extern void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
void
*
args
);
#endif
extern
const
char
*
nxagentProgName
;
void
ddxInitGlobals
(
void
)
{
/*
...
...
@@ -199,8 +201,6 @@ Bool nxagentX2go;
void
checkX2goAgent
(
void
)
{
extern
const
char
*
nxagentProgName
;
#ifdef TEST
fprintf
(
stderr
,
"%s: nxagentProgName [%s]
\n
"
,
__func__
,
nxagentProgName
);
#endif
...
...
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
View file @
b1850beb
...
...
@@ -200,6 +200,8 @@ extern int nxagentClipboardSelection;
extern
int
nxagentMaxSelections
;
#endif
extern
int
nxOpenFont
(
ClientPtr
,
XID
,
Mask
,
unsigned
,
char
*
);
void
InitSelections
()
{
...
...
@@ -774,7 +776,6 @@ ProcOpenFont(register ClientPtr client)
fontReq
[
stuff
->
nbytes
]
=
0
;
if
(
strchr
(
fontReq
,
'*'
)
||
strchr
(
fontReq
,
'?'
))
{
extern
int
nxOpenFont
(
ClientPtr
,
XID
,
Mask
,
unsigned
,
char
*
);
#ifdef NXAGENT_FONTMATCH_DEBUG
fprintf
(
stderr
,
"Dispatch: ProcOpenFont try to find a common font with font pattern=%s
\n
"
,
fontReq
);
#endif
...
...
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
View file @
b1850beb
...
...
@@ -147,6 +147,16 @@ extern Display *nxagentDisplay;
extern
WindowPtr
nxagentLastEnteredWindow
;
#ifdef VIEWPORT_FRAME
extern
void
nxagentInitViewportFrame
(
ScreenPtr
,
WindowPtr
);
#endif
extern
int
nxagentShadowInit
(
ScreenPtr
,
WindowPtr
);
#ifdef NXAGENT_CLIPBOARD
extern
int
nxagentSendNotify
(
xEvent
*
);
#endif
void
ActivatePointerGrab
(
register
DeviceIntPtr
mouse
,
register
GrabPtr
grab
,
TimeStamp
time
,
Bool
autoGrab
)
...
...
@@ -466,11 +476,6 @@ void
DefineInitialRootWindow
(
register
WindowPtr
win
)
{
register
ScreenPtr
pScreen
=
win
->
drawable
.
pScreen
;
#ifdef VIEWPORT_FRAME
extern
void
nxagentInitViewportFrame
(
ScreenPtr
,
WindowPtr
);
#endif
extern
int
nxagentShadowInit
(
ScreenPtr
,
WindowPtr
);
sprite
.
hotPhys
.
pScreen
=
pScreen
;
sprite
.
hotPhys
.
x
=
pScreen
->
width
/
2
;
sprite
.
hotPhys
.
y
=
pScreen
->
height
/
2
;
...
...
@@ -537,7 +542,6 @@ ProcSendEvent(ClientPtr client)
if
(
stuff
->
event
.
u
.
u
.
type
==
SelectionNotify
)
{
extern
int
nxagentSendNotify
(
xEvent
*
);
if
(
nxagentSendNotify
(
&
stuff
->
event
)
==
1
)
return
Success
;
}
...
...
nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
View file @
b1850beb
...
...
@@ -81,6 +81,8 @@ void *nxagentMatchingFormats(PictFormatPtr pForm);
void
nxagentPictureCreateDefaultFormats
(
ScreenPtr
pScreen
,
FormatInitRec
*
formats
,
int
*
nformats
);
extern
int
nxagentPicturePrivateIndex
;
PictFormatPtr
PictureCreateDefaultFormats
(
ScreenPtr
pScreen
,
int
*
nformatp
)
{
...
...
@@ -303,8 +305,6 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error)
static
PicturePtr
createSourcePicture
(
void
)
{
extern
int
nxagentPicturePrivateIndex
;
/*
* Compute size of entire PictureRect, plus privates.
*/
...
...
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
View file @
b1850beb
...
...
@@ -93,6 +93,14 @@ nxagentWMStateRec;
#undef TEST
#undef DEBUG
#ifdef NXAGENT_CLIPBOARD
extern
WindowPtr
nxagentGetClipboardWindow
(
Atom
,
WindowPtr
);
#endif
#ifdef NXAGENT_ARTSD
extern
Atom
mcop_local_atom
;
#endif
int
ProcChangeProperty
(
ClientPtr
client
)
{
...
...
@@ -127,11 +135,7 @@ ProcChangeProperty(ClientPtr client)
REQUEST_FIXED_SIZE
(
xChangePropertyReq
,
totalSize
);
#ifdef NXAGENT_CLIPBOARD
{
extern
WindowPtr
nxagentGetClipboardWindow
(
Atom
,
WindowPtr
);
pWin
=
nxagentGetClipboardWindow
(
stuff
->
property
,
NULL
);
}
if
(
pWin
==
NULL
)
#endif
...
...
@@ -168,7 +172,6 @@ ProcChangeProperty(ClientPtr client)
they are already set reflecting the server side settings.
Just return success.
*/
extern
Atom
mcop_local_atom
;
if
(
stuff
->
property
==
mcop_local_atom
)
return
client
->
noClientException
;
}
...
...
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
View file @
b1850beb
...
...
@@ -124,6 +124,8 @@ extern void nxagentRenderCreateConicalGradient(PicturePtr pPicture,
xFixed
*
stops
,
xRenderColor
*
colors
);
extern
int
nxagentAlphaEnabled
;
/*
* The void pointer is actually a XGlyphElt8.
*/
...
...
@@ -184,7 +186,6 @@ ProcRenderQueryPictFormats (ClientPtr client)
int
numScreens
;
int
numSubpixel
;
extern
int
nxagentAlphaEnabled
;
/* REQUEST(xRenderQueryPictFormatsReq); */
REQUEST_SIZE_MATCH
(
xRenderQueryPictFormatsReq
);
...
...
nx-X11/programs/Xserver/hw/nxagent/NXshm.c
View file @
b1850beb
...
...
@@ -81,6 +81,8 @@ extern void fbPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
int
x
,
int
y
,
int
w
,
int
h
,
int
leftPad
,
int
format
,
char
*
pImage
);
extern
int
nxagentImageLength
(
int
,
int
,
int
,
int
,
int
);
void
ShmExtensionInit
(
void
)
{
...
...
@@ -228,7 +230,6 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
#ifdef NXAGENT_SERVER
int
length
;
char
*
newdata
;
extern
int
nxagentImageLength
(
int
,
int
,
int
,
int
,
int
);
#ifdef TEST
fprintf
(
stderr
,
"fbShmPutImage: Called with drawable at [%p] GC at [%p] data at [%p].
\n
"
,
...
...
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
View file @
b1850beb
...
...
@@ -215,9 +215,7 @@ InitRootWindow(WindowPtr pWin)
#ifdef NXAGENT_ARTSD
{
char
artsd_port
[
10
];
short
int
nPort
;
extern
void
nxagentPropagateArtsdProperties
(
ScreenPtr
pScreen
,
char
*
port
);
nPort
=
atoi
(
display
)
+
7000
;
short
int
nPort
=
atoi
(
display
)
+
7000
;
sprintf
(
artsd_port
,
"%d"
,
nPort
);
nxagentPropagateArtsdProperties
(
pScreen
,
artsd_port
);
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
b1850beb
...
...
@@ -141,6 +141,10 @@ extern Bool useXpmIcon;
extern
Bool
nxagentReportWindowIds
;
#ifdef NXAGENT_TIMESTAMP
extern
unsigned
long
startTime
;
#endif
Window
nxagentDefaultWindows
[
MAXSCREENS
];
Window
nxagentInputWindows
[
MAXSCREENS
];
Window
nxagentScreenSaverWindows
[
MAXSCREENS
];
...
...
@@ -216,6 +220,8 @@ RegionRec nxagentShadowUpdateRegion;
extern
Bool
nxagentAutoDPI
;
extern
char
*
nxagentKeyboard
;
/*
* From randr/randr.c. This was originally static
* but we need it here.
...
...
@@ -1197,14 +1203,8 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
}
#ifdef NXAGENT_TIMESTAMP
{
extern
unsigned
long
startTime
;
fprintf
(
stderr
,
"Screen: going to open screen, time is [%d] milliseconds.
\n
"
,
GetTimeInMillis
()
-
startTime
);
}
#endif
/*
...
...
@@ -2131,13 +2131,8 @@ N/A
XSelectInput
(
nxagentDisplay
,
DefaultRootWindow
(
nxagentDisplay
),
StructureNotifyMask
);
#ifdef NXAGENT_TIMESTAMP
{
extern
unsigned
long
startTime
;
fprintf
(
stderr
,
"Screen: open screen finished, time is [%d] milliseconds.
\n
"
,
GetTimeInMillis
()
-
startTime
);
}
#endif
...
...
@@ -2585,7 +2580,6 @@ void nxagentShadowSetWindowOptions(void)
int
nxagentShadowInit
(
ScreenPtr
pScreen
,
WindowPtr
pWin
)
{
char
*
layout
=
NULL
;
extern
char
*
nxagentKeyboard
;
XlibGC
gc
;
XGCValues
value
;
...
...
nx-X11/programs/Xserver/os/utils.c
View file @
b1850beb
...
...
@@ -271,6 +271,14 @@ long Memory_fail = 0;
char
*
dev_tty_from_init
=
NULL
;
/* since we need to parse it anyway */
#endif
#ifdef NXAGENT_SERVER
extern
const
char
*
nxagentProgName
;
#endif
#ifdef NX_TRANS_SOCKET
extern
char
**
environ
;
#endif
extern
char
dispatchExceptionAtReset
;
/* Extension enable/disable in miinitext.c */
...
...
@@ -554,7 +562,6 @@ AdjustWaitForDelay (void * waitTime, unsigned long newdelay)
void
UseMsg
(
void
)
{
#ifdef NXAGENT_SERVER
extern
const
char
*
nxagentProgName
;
ErrorF
(
"Usage: %s [<options>] [:<display>]
\n\n
"
,
nxagentProgName
);
#else
ErrorF
(
"use: X [:<display>] [option]
\n
"
);
...
...
@@ -1731,8 +1738,6 @@ Popen(char *command, char *type)
#else
extern
char
**
environ
;
char
**
ep
=
environ
;
ep
=
environ
;
...
...
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