Commit b1850beb authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

nxagent: avoid nested externs

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