diff --git a/common/OLD_uipriv.h b/common/OLD_uipriv.h index 02676a16..453871d7 100644 --- a/common/OLD_uipriv.h +++ b/common/OLD_uipriv.h @@ -1,17 +1,3 @@ -// 6 april 2015 - -// this must go outside other extern "C" blocks, otherwise we'll get double-declaration errors -#include "utf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include "controlsigs.h" - -extern uiInitOptions options; extern void *uiAlloc(size_t, const char *); #define uiNew(T) ((T *) uiAlloc(sizeof (T), #T)) @@ -60,7 +46,3 @@ extern void fallbackTransformSize(uiDrawMatrix *, double *, double *); // OS-specific text.* files extern int uiprivStricmp(const char *a, const char *b); - -#ifdef __cplusplus -} -#endif diff --git a/common/uipriv.h b/common/uipriv.h index 02676a16..5f0f287d 100644 --- a/common/uipriv.h +++ b/common/uipriv.h @@ -1,17 +1,14 @@ // 6 april 2015 - -// this must go outside other extern "C" blocks, otherwise we'll get double-declaration errors +#include +#include +#include "controlsigs.h" #include "utf.h" #ifdef __cplusplus extern "C" { #endif -#include -#include -#include "controlsigs.h" - -extern uiInitOptions options; +extern uiInitOptions uiprivOptions; extern void *uiAlloc(size_t, const char *); #define uiNew(T) ((T *) uiAlloc(sizeof (T), #T)) diff --git a/darwin/main.m b/darwin/main.m index 865fb942..1bc6bfc3 100644 --- a/darwin/main.m +++ b/darwin/main.m @@ -106,12 +106,12 @@ static BOOL stepsIsRunning; @end -uiInitOptions options; +uiInitOptions uiprivOptions; const char *uiInit(uiInitOptions *o) { @autoreleasepool { - options = *o; + uiprivOptions = *o; app = [[applicationClass sharedApplication] retain]; // don't check for a NO return; something (launch services?) causes running from application bundles to always return NO when asking to change activation policy, even if the change is to the same activation policy! // see https://github.com/andlabs/ui/issues/6 diff --git a/unix/main.c b/unix/main.c index 2998bf31..1d7e7a76 100644 --- a/unix/main.c +++ b/unix/main.c @@ -1,14 +1,14 @@ // 6 april 2015 #include "uipriv_unix.h" -uiInitOptions options; +uiInitOptions uiprivOptions; const char *uiInit(uiInitOptions *o) { GError *err = NULL; const char *msg; - options = *o; + uiprivOptions = *o; if (gtk_init_with_args(NULL, NULL, NULL, NULL, NULL, &err) == FALSE) { msg = g_strdup(err->message); g_error_free(err); diff --git a/windows/init.cpp b/windows/init.cpp index cfe63b9a..2c25d3d4 100644 --- a/windows/init.cpp +++ b/windows/init.cpp @@ -39,8 +39,8 @@ static const char *initerr(const char *message, const WCHAR *label, DWORD value) #define ieLastErr(msg) initerr("=" msg, L"GetLastError() ==", GetLastError()) #define ieHRESULT(msg, hr) initerr("=" msg, L"HRESULT", (DWORD) hr) -// LONGTERM make common -uiInitOptions options; +// LONGTERM put this declaration in a common file +uiInitOptions uiprivOptions; #define wantedICCClasses ( \ ICC_STANDARD_CLASSES | /* user32.dll controls */ \ @@ -62,7 +62,7 @@ const char *uiInit(uiInitOptions *o) INITCOMMONCONTROLSEX icc; HRESULT hr; - options = *o; + uiprivOptions = *o; initAlloc();