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,
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
......
......@@ -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
......
......@@ -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;
}
......
......@@ -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.
*/
......
......@@ -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);
}
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;
}
......
......@@ -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);
......
......@@ -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",
......
......@@ -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);
}
......
......@@ -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);
}
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);
}
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;
......
......@@ -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;
......
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