vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / translators / stxt / STXTMain.cpp
blobbd0b150a44f1798539e663a2f4d1850356920715
1 /*****************************************************************************/
2 // STXTTranslator
3 // Written by Michael Wilber, OBOS Translation Kit Team
4 //
5 // Version: 1.0.0 Beta
6 //
7 // This translator opens and writes StyledEdit (STXT) files.
8 //
9 //
10 // This application and all source files used in its construction, except
11 // where noted, are licensed under the MIT License, and have been written
12 // and are:
14 // Copyright (c) 2002 OpenBeOS Project
16 // Permission is hereby granted, free of charge, to any person obtaining a
17 // copy of this software and associated documentation files (the "Software"),
18 // to deal in the Software without restriction, including without limitation
19 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
20 // and/or sell copies of the Software, and to permit persons to whom the
21 // Software is furnished to do so, subject to the following conditions:
23 // The above copyright notice and this permission notice shall be included
24 // in all copies or substantial portions of the Software.
26 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
27 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
29 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
31 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
32 // DEALINGS IN THE SOFTWARE.
33 /*****************************************************************************/
35 #include <Application.h>
36 #include <Catalog.h>
37 #include "STXTTranslator.h"
38 #include "TranslatorWindow.h"
40 #undef B_TRANSLATION_CONTEXT
41 #define B_TRANSLATION_CONTEXT "STXTMain"
43 // ---------------------------------------------------------------
44 // main
46 // Creates a BWindow for displaying info about the STXTTranslator
48 // Preconditions:
50 // Parameters:
52 // Postconditions:
54 // Returns:
55 // ---------------------------------------------------------------
56 int
57 main()
59 BApplication app("application/x-vnd.Haiku-STXTTranslator");
60 status_t result;
61 result = LaunchTranslatorWindow(new STXTTranslator,
62 B_TRANSLATE("STXT Settings"), BRect(0, 0, 225, 175));
63 if (result == B_OK) {
64 app.Run();
65 return 0;
66 } else
67 return 1;