diff options
-rw-r--r-- | src/textadept.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/textadept.c b/src/textadept.c index 39ebc344..7ac19517 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -11,9 +11,9 @@ #elif _WIN32 #include <windows.h> #define main main_ -#elif __APPLE__ && !NCURSES +#elif (__APPLE__ && !NCURSES) #include <gtkmacintegration/gtkosxapplication.h> -#elif __APPLE__ && NCURSES +#elif (__APPLE__ && NCURSES) #include <mach-o/dyld.h> #elif (__FreeBSD__ || __NetBSD__ || __OpenBSD__) #define u_int unsigned int // 'u_int' undefined when _POSIX_SOURCE is defined @@ -70,7 +70,7 @@ static Scintilla *focused_view; #if GTK static GtkWidget *window, *menubar, *statusbar[2]; static GtkAccelGroup *accel; -#if __APPLE__ && !NCURSES +#if (__APPLE__ && !NCURSES) static GtkOSXApplication *osxapp; #endif #endif @@ -200,7 +200,7 @@ static int lL_event(lua_State *L, const char *name, ...) { } #if GTK -#if GLIB_CHECK_VERSION(2,28,0) && SINGLE_INSTANCE +#if (GLIB_CHECK_VERSION(2,28,0) && SINGLE_INSTANCE) /** * Processes a remote Textadept's command line arguments. */ @@ -971,7 +971,7 @@ static int lgui__newindex(lua_State *L) { gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(vbox), menubar, 0); gtk_widget_show_all(menubar); -#if __APPLE__ && !NCURSES +#if (__APPLE__ && !NCURSES) gtk_osxapplication_set_menu_bar(osxapp, GTK_MENU_SHELL(menubar)); gtk_widget_hide(menubar); #endif @@ -1527,7 +1527,7 @@ static int lL_init(lua_State *L, int argc, char **argv, int reinit) { lua_pushstring(L, textadept_home), lua_setglobal(L, "_HOME"); #if _WIN32 lua_pushboolean(L, 1), lua_setglobal(L, "WIN32"); -#elif __APPLE__ && !NCURSES +#elif (__APPLE__ && !NCURSES) lua_pushboolean(L, 1), lua_setglobal(L, "OSX"); #elif NCURSES lua_pushboolean(L, 1), lua_setglobal(L, "NCURSES"); @@ -1703,7 +1703,7 @@ static int w_exit(GtkWidget*_, GdkEventAny*__, void*___) { return FALSE; } -#if __APPLE__ && !NCURSES +#if (__APPLE__ && !NCURSES) /** * Signal for opening files from OSX. * Generates an 'appleevent_odoc' event for each document sent. @@ -2151,7 +2151,7 @@ static void new_window() { signal(window, "key-press-event", w_keypress); accel = gtk_accel_group_new(); -#if __APPLE__ && !NCURSES +#if (__APPLE__ && !NCURSES) gtk_osxapplication_set_use_quartz_accelerators(osxapp, FALSE); osx_signal(osxapp, "NSApplicationOpenFile", w_open_osx); osx_signal(osxapp, "NSApplicationBlockTermination", w_exit_osx); @@ -2255,13 +2255,13 @@ int main(int argc, char **argv) { textadept_home = malloc(FILENAME_MAX); GetModuleFileName(0, textadept_home, FILENAME_MAX); if ((last_slash = strrchr(textadept_home, '\\'))) *last_slash = '\0'; -#elif __APPLE__ && !NCURSES +#elif (__APPLE__ && !NCURSES) osxapp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL); char *path = quartz_application_get_resource_path(); textadept_home = g_filename_from_utf8((const char *)path, -1, NULL, NULL, NULL); g_free(path); -#elif __APPLE__ && NCURSES +#elif (__APPLE__ && NCURSES) char *path = malloc(FILENAME_MAX), *p = NULL; uint32_t size = FILENAME_MAX; _NSGetExecutablePath(path, &size); @@ -2277,7 +2277,7 @@ int main(int argc, char **argv) { #endif #if GTK -#if GLIB_CHECK_VERSION(2,28,0) && SINGLE_INSTANCE +#if (GLIB_CHECK_VERSION(2,28,0) && SINGLE_INSTANCE) int force = FALSE; for (int i = 0; i < argc; i++) if (strcmp("-f", argv[i]) == 0 || strcmp("--force", argv[i]) == 0) { @@ -2296,12 +2296,12 @@ int main(int argc, char **argv) { if (lua = luaL_newstate(), !lL_init(lua, argc, argv, FALSE)) return 1; new_window(); lL_dofile(lua, "init.lua"); -#if __APPLE__ && !NCURSES +#if (__APPLE__ && !NCURSES) gtk_osxapplication_ready(osxapp); #endif #if GTK -#if GLIB_CHECK_VERSION(2,28,0) && SINGLE_INSTANCE +#if (GLIB_CHECK_VERSION(2,28,0) && SINGLE_INSTANCE) gtk_main(); } else g_application_run(app, argc, argv); g_object_unref(app); |