From 9dd3748b033383e79dcc4c9fd66bf5947e0c11c9 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 15 Nov 2012 14:27:57 +0000 Subject: [PATCH] Split r3159..r3161, part 3: MSVC, nedmalloc, *layer, startup windows. git-svn-id: https://svn.eduke32.com/eduke32@3168 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/include/compat.h | 7 +++ polymer/eduke32/build/include/msvc/stdint.h | 4 +- polymer/eduke32/build/include/nedmalloc.h | 2 +- polymer/eduke32/build/src/cache1d.c | 2 +- polymer/eduke32/build/src/compat.c | 8 +-- polymer/eduke32/build/src/glbuild.c | 2 +- polymer/eduke32/build/src/sdlayer.c | 2 +- polymer/eduke32/build/src/startgtk.editor.c | 29 ++++++----- polymer/eduke32/build/src/winlayer.c | 56 +++++++++++++++------ polymer/eduke32/source/config.c | 4 +- polymer/eduke32/source/gamedef.c | 2 +- polymer/eduke32/source/startgtk.game.c | 38 +++++++------- 12 files changed, 98 insertions(+), 58 deletions(-) diff --git a/polymer/eduke32/build/include/compat.h b/polymer/eduke32/build/include/compat.h index e70362eae..76c31ce05 100644 --- a/polymer/eduke32/build/include/compat.h +++ b/polymer/eduke32/build/include/compat.h @@ -100,6 +100,7 @@ #endif #if defined(_MSC_VER) +#include # define inline __inline # define longlong(x) x##i64 static inline float nearbyintf(float x) @@ -500,7 +501,13 @@ static inline uint16_t system_15bit_rand(void) { return ((uint16_t)rand())&0x7ff # else # define Btell tell # endif +# ifdef _MSC_VER # define Bstat stat +# define Bfstat fstat +# else +# define Bstat stat +# define Bfstat fstat +# endif # define Bfileno fileno # define Bferror ferror # define Bfopen fopen diff --git a/polymer/eduke32/build/include/msvc/stdint.h b/polymer/eduke32/build/include/msvc/stdint.h index d02608a59..fd1c11196 100644 --- a/polymer/eduke32/build/include/msvc/stdint.h +++ b/polymer/eduke32/build/include/msvc/stdint.h @@ -32,7 +32,8 @@ #ifndef _MSC_VER // [ #error "Use this header only with Microsoft Visual C++ compilers!" #endif // _MSC_VER ] - +#ifndef _STDINT +#define _STDINT #ifndef _MSC_STDINT_H_ // [ #define _MSC_STDINT_H_ @@ -245,3 +246,4 @@ typedef uint64_t uintmax_t; #endif // _MSC_STDINT_H_ ] +#endif \ No newline at end of file diff --git a/polymer/eduke32/build/include/nedmalloc.h b/polymer/eduke32/build/include/nedmalloc.h index e525fd7d8..f90f9f078 100644 --- a/polymer/eduke32/build/include/nedmalloc.h +++ b/polymer/eduke32/build/include/nedmalloc.h @@ -595,7 +595,7 @@ NEDMALLOCEXTSPEC NEDMALLOCNOALIASATTR NEDMALLOCPTRATTR void * nedpmemalign(nedpo /*! \ingroup v2malloc \brief Allocates a block of memory sized \em size from pool \em p, aligned to \em alignment and according to the flags \em flags. */ -NEDMALLOCDEPRECATED NEDMALLOCEXTSPEC NEDMALLOCNOALIASATTR NEDMALLOCPTRATTR void * nedpmalloc2(nedpool *p, size_t size, size_t alignment=0, unsigned flags=0) THROWSPEC; +NEDMALLOCEXTSPEC NEDMALLOCNOALIASATTR NEDMALLOCPTRATTR void * nedpmalloc2(nedpool *p, size_t size, size_t alignment=0, unsigned flags=0) THROWSPEC; /*! \ingroup v2malloc \brief Resizes the block of memory at \em mem in pool \em p to size \em size, aligned to \em alignment and according to the flags \em flags. */ diff --git a/polymer/eduke32/build/src/cache1d.c b/polymer/eduke32/build/src/cache1d.c index ebf659a69..f4f961357 100644 --- a/polymer/eduke32/build/src/cache1d.c +++ b/polymer/eduke32/build/src/cache1d.c @@ -315,7 +315,7 @@ char *listsearchpath(int32_t initp) int32_t addsearchpath(const char *p) { - struct stat st; + struct Bstat st; char *s; searchpath_t *srch; diff --git a/polymer/eduke32/build/src/compat.c b/polymer/eduke32/build/src/compat.c index 1dcabe005..2b9575f41 100644 --- a/polymer/eduke32/build/src/compat.c +++ b/polymer/eduke32/build/src/compat.c @@ -14,7 +14,7 @@ #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN -#define _WIN32_IE 0x0400 +//#define _WIN32_IE 0x0400 #define _WIN32_WINNT 0x0501 #include #include @@ -570,8 +570,8 @@ char *Bgetsystemdrives(void) int32_t Bfilelength(int32_t fd) { - struct stat st; - if (fstat(fd, &st) < 0) return -1; + struct Bstat st; + if (Bfstat(fd, &st) < 0) return -1; return(int32_t)(st.st_size); } @@ -643,7 +643,7 @@ struct Bdirent *Breaddir(BDIR *dir) { BDIR_real *dirr = (BDIR_real *)dir; struct dirent *de; - struct stat st; + struct Bstat st; char *fn; #ifdef _MSC_VER diff --git a/polymer/eduke32/build/src/glbuild.c b/polymer/eduke32/build/src/glbuild.c index e9e775b66..e13a963fd 100644 --- a/polymer/eduke32/build/src/glbuild.c +++ b/polymer/eduke32/build/src/glbuild.c @@ -294,7 +294,7 @@ bwglSetPixelFormatProcPtr bwglSetPixelFormat; bwglSwapIntervalEXTProcPtr bwglSwapIntervalEXT; bwglCreateContextAttribsARBProcPtr bwglCreateContextAttribsARB; -static HANDLE hGLDLL, hGLUDLL; +static HMODULE hGLDLL, hGLUDLL; #else #include diff --git a/polymer/eduke32/build/src/sdlayer.c b/polymer/eduke32/build/src/sdlayer.c index 69f50f8cc..4302b73c3 100644 --- a/polymer/eduke32/build/src/sdlayer.c +++ b/polymer/eduke32/build/src/sdlayer.c @@ -527,7 +527,7 @@ int32_t initinput(void) for (i=0; i #include @@ -22,6 +37,10 @@ #include // pow +#ifdef __cplusplus +#include +#endif + #ifdef _MSC_VER #include #endif @@ -59,7 +78,7 @@ static int32_t winlayer_have_ATI = 0; int32_t _buildargc = 0; const char **_buildargv = NULL; static char *argvbuf = NULL; -extern int32_t app_main(int32_t argc, const char *argv[]); +extern int32_t app_main(int32_t argc, const char **argv); extern void app_crashhandler(void); // Windows crud @@ -362,9 +381,13 @@ int32_t WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, in #ifndef DEBUGGINGAIDS if ((nedhandle = LoadLibrary("nedmalloc.dll"))) { +#ifdef __cplusplus + nedalloc::nedpool_t *(WINAPI *nedcreatepool)(size_t, int); + if ((nedcreatepool = (nedalloc::nedpool_t *(WINAPI *)(size_t, int))GetProcAddress(nedhandle, "nedcreatepool"))) +#else nedpool *(WINAPI *nedcreatepool)(size_t, int); - if ((nedcreatepool = (void *)GetProcAddress(nedhandle, "nedcreatepool"))) +#endif nedcreatepool(SYSTEM_POOL_SIZE, -1); } #else @@ -964,7 +987,7 @@ void getjoydeadzone(int32_t axis, uint16_t *dead, uint16_t *satur) dipdw.diph.dwHow = DIPH_BYOFFSET; } - result = IDirectInputDevice7_GetProperty(lpDID, bDIPROP_DEADZONE, &dipdw.diph); + result = IDirectInputDevice7_GetProperty(lpDID, bDIPROP_DEADZONE, (LPDIPROPHEADER)&dipdw.diph); if (FAILED(result)) { //ShowDInputErrorBox("Failed getting joystick dead zone", result); @@ -1110,7 +1133,7 @@ static BOOL InitDirectInput(void) } } - aDirectInputCreateA = (void *)GetProcAddress(hDInputDLL, "DirectInputCreateA"); + aDirectInputCreateA = (HRESULT(WINAPI *)(HINSTANCE, DWORD, LPDIRECTINPUT7A *, LPUNKNOWN))GetProcAddress(hDInputDLL, "DirectInputCreateA"); if (!aDirectInputCreateA) ShowErrorBox("Error fetching DirectInputCreateA()"); result = aDirectInputCreateA(hInstance, DIRECTINPUT_VERSION, &lpDI, NULL); @@ -1133,11 +1156,12 @@ static BOOL InitDirectInput(void) *devicedef.did = NULL; // initprintf(" - Creating %s device\n", devicedef.name); - result = IDirectInput7_CreateDeviceEx(lpDI, &guidDevs, &IID_IDirectInputDevice7, (void *)&dev, NULL); + result = IDirectInput7_CreateDeviceEx(lpDI, bREFGUID guidDevs, bREFIID IID_IDirectInputDevice7, (LPVOID *)&dev, NULL); + if (FAILED(result)) { HorribleDInputDeath("Failed creating device", result); } else if (result != DI_OK) initprintf(" Created device with warning: %s\n",GetDInputError(result)); - result = IDirectInputDevice7_QueryInterface(dev, &IID_IDirectInputDevice7, (LPVOID *)&dev2); + result = IDirectInputDevice7_QueryInterface(dev, bREFIID IID_IDirectInputDevice7, (LPVOID *)&dev2); IDirectInputDevice7_Release(dev); if (FAILED(result)) { HorribleDInputDeath("Failed querying DirectInput7 interface for device", result); } else if (result != DI_OK) initprintf(" Queried IDirectInputDevice7 interface with warning: %s\n",GetDInputError(result)); @@ -1683,7 +1707,7 @@ static void ToggleDesktopComposition(BOOL compEnable) static HRESULT(WINAPI *aDwmEnableComposition)(UINT); if (!hDWMApiDLL && (hDWMApiDLL = LoadLibrary("DWMAPI.DLL"))) - aDwmEnableComposition = (void *)GetProcAddress(hDWMApiDLL, "DwmEnableComposition"); + aDwmEnableComposition = (HRESULT(WINAPI *)(UINT))GetProcAddress(hDWMApiDLL, "DwmEnableComposition"); if (aDwmEnableComposition) { @@ -2271,7 +2295,7 @@ static int32_t setgammaramp(WORD gt[3][256]) if (!(DDdwCaps2 & DDCAPS2_PRIMARYGAMMA)) return -1; - hr = IDirectDrawSurface_QueryInterface(lpDDSPrimary, &IID_IDirectDrawGammaControl, (LPVOID)&gam); + hr = IDirectDrawSurface_QueryInterface(lpDDSPrimary, bREFIID IID_IDirectDrawGammaControl, (LPVOID *)&gam); if (hr != DD_OK) { // ShowDDrawErrorBox("Error querying gamma control", hr); @@ -2343,7 +2367,7 @@ static int32_t getgammaramp(WORD gt[3][256]) if (!(DDdwCaps2 & DDCAPS2_PRIMARYGAMMA)) return -1; - hr = IDirectDrawSurface_QueryInterface(lpDDSPrimary, &IID_IDirectDrawGammaControl, (LPVOID)&gam); + hr = IDirectDrawSurface_QueryInterface(lpDDSPrimary, bREFIID IID_IDirectDrawGammaControl, (LPVOID *)&gam); if (hr != DD_OK) { ShowDDrawErrorBox("Error querying gamma control", hr); @@ -2403,7 +2427,7 @@ static BOOL InitDirectDraw(void) } // get the pointer to DirectDrawEnumerate - aDirectDrawEnumerate = (void *)GetProcAddress(hDDrawDLL, "DirectDrawEnumerateA"); + aDirectDrawEnumerate = (HRESULT(WINAPI *)(LPDDENUMCALLBACK, LPVOID))GetProcAddress(hDDrawDLL, "DirectDrawEnumerateA"); if (!aDirectDrawEnumerate) { ShowErrorBox("Error fetching DirectDrawEnumerate()"); @@ -2416,7 +2440,7 @@ static BOOL InitDirectDraw(void) aDirectDrawEnumerate(InitDirectDraw_enum, NULL); // get the pointer to DirectDrawCreate - aDirectDrawCreate = (void *)GetProcAddress(hDDrawDLL, "DirectDrawCreate"); + aDirectDrawCreate = (HRESULT(WINAPI *)(GUID *, LPDIRECTDRAW *, IUnknown *))GetProcAddress(hDDrawDLL, "DirectDrawCreate"); if (!aDirectDrawCreate) { ShowErrorBox("Error fetching DirectDrawCreate()"); @@ -3812,13 +3836,13 @@ static BOOL RegisterWindowClass(void) wcx.cbClsExtra = 0; wcx.cbWndExtra = 0; wcx.hInstance = hInstance; - wcx.hIcon = LoadImage(hInstance, MAKEINTRESOURCE(100), IMAGE_ICON, + wcx.hIcon = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(100), IMAGE_ICON, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), LR_DEFAULTCOLOR); wcx.hCursor = LoadCursor(NULL, IDC_ARROW); wcx.hbrBackground = (HBRUSH)COLOR_GRAYTEXT; wcx.lpszMenuName = NULL; wcx.lpszClassName = WindowClass; - wcx.hIconSm = LoadImage(hInstance, MAKEINTRESOURCE(100), IMAGE_ICON, + wcx.hIconSm = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(100), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR); if (!RegisterClassEx(&wcx)) { diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index e662492ea..210b8a66b 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -603,7 +603,7 @@ int32_t CONFIG_ReadSetup(void) // #ifdef _WIN32 if (g_noSetup == 0 && g_modDir[0] == '/') { - struct stat st; + struct Bstat st; SCRIPT_GetString(ud.config.scripthandle, "Setup","ModDir",&g_modDir[0]); if (Bstat(g_modDir, &st)) @@ -792,7 +792,7 @@ void CONFIG_WriteSetup(uint32_t flags) SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "ScreenWidth",ud.config.ScreenWidth,FALSE,FALSE); // JBF 20031206 - SCRIPT_PutString(ud.config.scripthandle, "Setup","SelectedGRP",&g_grpNamePtr[0]); + SCRIPT_PutString(ud.config.scripthandle, "Setup","SelectedGRP",g_grpNamePtr); // XXX: should be "if compiled without startup GUI" #if !defined __linux || defined HAVE_GTK2 diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 529165bbf..4ef29b2f5 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -5101,7 +5101,7 @@ repeatcase: if (Bstrcmp(setupfilename,SETUPFILENAME) == 0) // not set to something else via -cfg { char temp[BMAX_PATH]; - struct stat st; + struct Bstat st; int32_t fullscreen = ud.config.ScreenMode; int32_t xdim = ud.config.ScreenWidth, ydim = ud.config.ScreenHeight, bpp = ud.config.ScreenBPP; int32_t usemouse = ud.config.UseMouse, usejoy = ud.config.UseJoystick; diff --git a/polymer/eduke32/source/startgtk.game.c b/polymer/eduke32/source/startgtk.game.c index daa760ca0..633d7325c 100644 --- a/polymer/eduke32/source/startgtk.game.c +++ b/polymer/eduke32/source/startgtk.game.c @@ -354,9 +354,9 @@ static void PopulateForm(unsigned char pgs) gtk_list_store_set(modes3d, &iter, 0,buf, 1,i, -1); if (i == mode3d) { - g_signal_handlers_block_by_func(stwidgets.vmode3dcombo, on_vmode3dcombo_changed, NULL); + g_signal_handlers_block_by_func(stwidgets.vmode3dcombo, (gpointer)on_vmode3dcombo_changed, NULL); gtk_combo_box_set_active_iter(GTK_COMBO_BOX(stwidgets.vmode3dcombo), &iter); - g_signal_handlers_unblock_by_func(stwidgets.vmode3dcombo, on_vmode3dcombo_changed, NULL); + g_signal_handlers_unblock_by_func(stwidgets.vmode3dcombo, (gpointer)on_vmode3dcombo_changed, NULL); } } } @@ -461,9 +461,9 @@ static void PopulateForm(unsigned char pgs) if (!Bstrcasecmp(fg->name, settings.selectedgrp)) { GtkTreeSelection *sel = gtk_tree_view_get_selection(gamelist); - g_signal_handlers_block_by_func(sel, on_gamelist_selection_changed, NULL); + g_signal_handlers_block_by_func(sel, (gpointer)on_gamelist_selection_changed, NULL); gtk_tree_selection_select_iter(sel, &iter); - g_signal_handlers_unblock_by_func(sel, on_gamelist_selection_changed, NULL); + g_signal_handlers_unblock_by_func(sel, (gpointer)on_gamelist_selection_changed, NULL); } } } @@ -524,9 +524,9 @@ static GtkWidget *create_window(void) stwidgets.vmode3dlabel = gtk_label_new_with_mnemonic("_Video mode:"); gtk_misc_set_alignment(GTK_MISC(stwidgets.vmode3dlabel), 0.3, 0); #ifdef POLYMER - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.vmode3dlabel, 0,1, 0,1, GTK_FILL, 0, 4, 0); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.vmode3dlabel, 0,1, 0,1, GTK_FILL, (GtkAttachOptions)0, 4, 0); #else - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.vmode3dlabel, 0,1, 0,1, GTK_FILL, 0, 4, 7); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.vmode3dlabel, 0,1, 0,1, GTK_FILL, (GtkAttachOptions)0, 4, 7); #endif // 3D video mode combo @@ -543,17 +543,18 @@ static GtkWidget *create_window(void) } #ifdef POLYMER - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.vmode3dcombo, 1,2, 0,1, GTK_EXPAND | GTK_FILL, 0, 4, 0); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.vmode3dcombo, 1,2, 0,1, + (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 4, 0); #else - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.vmode3dcombo, 1,2, 0,1, GTK_EXPAND | GTK_FILL, 0, 4, 7); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.vmode3dcombo, 1,2, 0,1, GTK_EXPAND | GTK_FILL, (GtkAttachOptions)0, 4, 7); #endif // Fullscreen checkbox stwidgets.displayvlayout = gtk_vbox_new(TRUE, 0); #ifdef POLYMER - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.displayvlayout, 2,3, 0,1, GTK_FILL, 0, 4, 0); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.displayvlayout, 2,3, 0,1, GTK_FILL, (GtkAttachOptions)0, 4, 0); #else - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.displayvlayout, 2,3, 0,1, GTK_FILL, 0, 4, 7); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.displayvlayout, 2,3, 0,1, GTK_FILL, (GtkAttachOptions)0, 4, 7); #endif stwidgets.fullscreencheck = gtk_check_button_new_with_mnemonic("_Fullscreen"); @@ -568,7 +569,7 @@ static GtkWidget *create_window(void) // Input devices LabelText stwidgets.inputdevlabel = gtk_label_new_with_mnemonic("_Input devices:"); gtk_misc_set_alignment(GTK_MISC(stwidgets.inputdevlabel), 0.3, 0); - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.inputdevlabel, 0,1, 1,2, GTK_FILL, 0, 4, 0); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.inputdevlabel, 0,1, 1,2, GTK_FILL, (GtkAttachOptions)0, 4, 0); // Input devices combo { @@ -582,12 +583,13 @@ static GtkWidget *create_window(void) gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(stwidgets.inputdevcombo), cell, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(stwidgets.inputdevcombo), cell, "text", 0, NULL); } - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.inputdevcombo, 1,2, 1,2, GTK_EXPAND | GTK_FILL, 0, 4, 0); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.inputdevcombo, 1,2, 1,2, + (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 4, 0); // Custom mod LabelText stwidgets.custommodlabel = gtk_label_new_with_mnemonic("Custom _game:"); gtk_misc_set_alignment(GTK_MISC(stwidgets.custommodlabel), 0.3, 0); - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.custommodlabel, 0,1, 2,3, GTK_FILL, 0, 4, 7); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.custommodlabel, 0,1, 2,3, GTK_FILL, (GtkAttachOptions)0, 4, 7); // Custom mod combo { @@ -601,19 +603,21 @@ static GtkWidget *create_window(void) gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(stwidgets.custommodcombo), cell, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(stwidgets.custommodcombo), cell, "text", 0, NULL); } - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.custommodcombo, 1,2, 2,3, GTK_EXPAND | GTK_FILL, 0, 4, 7); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.custommodcombo, 1,2, 2,3, + (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 4, 7); // Empty horizontal layout stwidgets.emptyhlayout = gtk_hbox_new(TRUE, 0); - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.emptyhlayout, 0,3, 3,4, 0, GTK_EXPAND | GTK_FILL, 4, 0); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.emptyhlayout, 0,3, 3,4, (GtkAttachOptions)0, + (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 4, 0); // Autoload checkbox stwidgets.autoloadcheck = gtk_check_button_new_with_mnemonic("_Enable \"autoload\" folder"); - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.autoloadcheck, 0,3, 4,5, GTK_FILL, 0, 2, 2); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.autoloadcheck, 0,3, 4,5, GTK_FILL, (GtkAttachOptions)0, 2, 2); // Always show config checkbox stwidgets.alwaysshowcheck = gtk_check_button_new_with_mnemonic("_Always show this window at startup"); - gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.alwaysshowcheck, 0,3, 5,6, GTK_FILL, 0, 2, 2); + gtk_table_attach(GTK_TABLE(stwidgets.configtlayout), stwidgets.alwaysshowcheck, 0,3, 5,6, GTK_FILL, (GtkAttachOptions)0, 2, 2); // Configuration tab stwidgets.configtab = gtk_label_new("Configuration");