Skip to content

Commit 4a57b15

Browse files
committed
Renamed the common options variable to uiprivOptions.
1 parent e0f800d commit 4a57b15

File tree

5 files changed

+11
-32
lines changed

5 files changed

+11
-32
lines changed

common/OLD_uipriv.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
// 6 april 2015
2-
3-
// this must go outside other extern "C" blocks, otherwise we'll get double-declaration errors
4-
#include "utf.h"
5-
6-
#ifdef __cplusplus
7-
extern "C" {
8-
#endif
9-
10-
#include <stdarg.h>
11-
#include <string.h>
12-
#include "controlsigs.h"
13-
14-
extern uiInitOptions options;
151

162
extern void *uiAlloc(size_t, const char *);
173
#define uiNew(T) ((T *) uiAlloc(sizeof (T), #T))
@@ -60,7 +46,3 @@ extern void fallbackTransformSize(uiDrawMatrix *, double *, double *);
6046

6147
// OS-specific text.* files
6248
extern int uiprivStricmp(const char *a, const char *b);
63-
64-
#ifdef __cplusplus
65-
}
66-
#endif

common/uipriv.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
// 6 april 2015
2-
3-
// this must go outside other extern "C" blocks, otherwise we'll get double-declaration errors
2+
#include <stdarg.h>
3+
#include <string.h>
4+
#include "controlsigs.h"
45
#include "utf.h"
56

67
#ifdef __cplusplus
78
extern "C" {
89
#endif
910

10-
#include <stdarg.h>
11-
#include <string.h>
12-
#include "controlsigs.h"
13-
14-
extern uiInitOptions options;
11+
extern uiInitOptions uiprivOptions;
1512

1613
extern void *uiAlloc(size_t, const char *);
1714
#define uiNew(T) ((T *) uiAlloc(sizeof (T), #T))

darwin/main.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)app
106106

107107
@end
108108

109-
uiInitOptions options;
109+
uiInitOptions uiprivOptions;
110110

111111
const char *uiInit(uiInitOptions *o)
112112
{
113113
@autoreleasepool {
114-
options = *o;
114+
uiprivOptions = *o;
115115
app = [[applicationClass sharedApplication] retain];
116116
// 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!
117117
// see https://github.com/andlabs/ui/issues/6

unix/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// 6 april 2015
22
#include "uipriv_unix.h"
33

4-
uiInitOptions options;
4+
uiInitOptions uiprivOptions;
55

66
const char *uiInit(uiInitOptions *o)
77
{
88
GError *err = NULL;
99
const char *msg;
1010

11-
options = *o;
11+
uiprivOptions = *o;
1212
if (gtk_init_with_args(NULL, NULL, NULL, NULL, NULL, &err) == FALSE) {
1313
msg = g_strdup(err->message);
1414
g_error_free(err);

windows/init.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ static const char *initerr(const char *message, const WCHAR *label, DWORD value)
3939
#define ieLastErr(msg) initerr("=" msg, L"GetLastError() ==", GetLastError())
4040
#define ieHRESULT(msg, hr) initerr("=" msg, L"HRESULT", (DWORD) hr)
4141

42-
// LONGTERM make common
43-
uiInitOptions options;
42+
// LONGTERM put this declaration in a common file
43+
uiInitOptions uiprivOptions;
4444

4545
#define wantedICCClasses ( \
4646
ICC_STANDARD_CLASSES | /* user32.dll controls */ \
@@ -62,7 +62,7 @@ const char *uiInit(uiInitOptions *o)
6262
INITCOMMONCONTROLSEX icc;
6363
HRESULT hr;
6464

65-
options = *o;
65+
uiprivOptions = *o;
6666

6767
initAlloc();
6868

0 commit comments

Comments
 (0)