Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / workbench / prefs / wanderer / main.c
blob37dc58c03c583e9177f932704064bc37fe6af66e
1 /*
2 Copyright © 2004-2008, The AROS Development Team. All rights reserved.
3 This file is part of the Wanderer Preferences program, which is distributed
4 under the terms of version 2 of the GNU General Public License.
6 $Id$
7 */
8 #define DEBUG 0
9 #include <aros/debug.h>
11 #define MUIMASTER_YES_INLINE_STDARG
13 #include <proto/dos.h>
14 #include <proto/intuition.h>
15 #include <proto/muimaster.h>
16 #include <libraries/mui.h>
17 #include <dos/dos.h>
19 #include <zune/systemprefswindow.h>
20 #include "locale.h"
21 #include "wpeditor.h"
23 #define VERSIONSTR "$VER: Wanderer Prefs 1.1 (18.02.2006) ©1995-2007 The AROS Development Team"
25 int main(void)
27 Object *application, *window;
28 BPTR OldDir, NewDir;
29 int rc = RETURN_OK;
30 D(bug("[WPEditor.exe] Starting...\n"));
31 Locale_Initialize();
32 NewDir = Lock("RAM:", SHARED_LOCK);
33 if (NewDir)
34 OldDir = CurrentDir(NewDir);
35 application = ApplicationObject,
36 MUIA_Application_Title, (IPTR) "Wanderer Prefs",
37 MUIA_Application_Version, (IPTR) VERSIONSTR,
38 MUIA_Application_Description, __(MSG_DESCRIPTION),
39 MUIA_Application_Copyright, (IPTR)"Copyright © 1995-2006, The AROS Development Team",
40 MUIA_Application_Author, (IPTR)"The AROS Development Team",
41 MUIA_Application_Base, (IPTR)"WANDERERPREFS",
42 MUIA_Application_SingleTask, TRUE,
43 SubWindow, (IPTR)(
44 window = (Object *)SystemPrefsWindowObject,
45 MUIA_Window_ID, MAKE_ID('W','W','I','N'),
46 MUIA_Window_Title, __(MSG_NAME),
47 WindowContents, (IPTR)WPEditorObject,
48 End,
49 End),
50 End;
52 if (application)
54 SET(window, MUIA_Window_Open, TRUE);
55 DoMethod(application, MUIM_Application_Execute);
56 SET(window, MUIA_Window_Open, FALSE);
57 MUI_DisposeObject(application);
58 } else {
59 rc = RETURN_FAIL;
60 D(bug("[WPEditor.exe] Can't create application!\n"));
62 if (NewDir) {
63 CurrentDir(OldDir);
64 UnLock(NewDir);
66 Locale_Deinitialize();
67 D(bug("[WPEditor.exe] Quitting...\n"));
68 return rc;