summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cc43
1 files changed, 20 insertions, 23 deletions
diff --git a/src/main.cc b/src/main.cc
index 0ab2b24..9317792 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -22,37 +22,34 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: main.cc,v 1.6 2002/04/04 11:28:19 fluxgen Exp $ 25// $Id: main.cc,v 1.7 2002/08/13 23:56:02 fluxgen Exp $
26 26
27//use GNU extensions
28#ifndef _GNU_SOURCE
29#define _GNU_SOURCE
30#endif // _GNU_SOURCE
31 27
32#include "../version.h"
33
34#ifdef HAVE_CONFIG_H
35# include "../config.h"
36#endif // HAVE_CONFIG_H
37 28
38#include "i18n.hh" 29#include "i18n.hh"
39#include "fluxbox.hh" 30#include "fluxbox.hh"
40 31
41#ifdef HAVE_STDIO_H 32#include "../version.h"
42# include <stdio.h>
43#endif // HAVE_STDIO_H
44 33
45#ifdef STDC_HEADERS 34#ifdef HAVE_CONFIG_H
46# include <stdlib.h> 35#include "../config.h"
47# include <string.h> 36#endif // HAVE_CONFIG_H
48#endif // STDC_HEADERS
49 37
50#ifdef HAVE_UNISTD_H 38//use GNU extensions
39#ifndef _GNU_SOURCE
40#define _GNU_SOURCE
41#endif // _GNU_SOURCE
42
43#include <cstdio>
44#include <cstdlib>
45#include <cstring>
46
47#ifdef HAVE_UNISTD_H
51#include <sys/types.h> 48#include <sys/types.h>
52#endif // HAVE_UNISTD_H 49#endif // HAVE_UNISTD_H
53 50
54#ifdef HAVE_SYS_PARAM_H 51#ifdef HAVE_SYS_PARAM_H
55# include <sys/param.h> 52#include <sys/param.h>
56#endif // HAVE_SYS_PARAM_H 53#endif // HAVE_SYS_PARAM_H
57 54
58#ifndef MAXPATHLEN 55#ifndef MAXPATHLEN
@@ -71,6 +68,7 @@ using namespace std;
71uds::uds_flags_t uds::flags = uds::leak_check; 68uds::uds_flags_t uds::flags = uds::leak_check;
72 69
73#endif //!DEBUG_UDS 70#endif //!DEBUG_UDS
71
74const char *getNLSYesNoMsg(bool val) { 72const char *getNLSYesNoMsg(bool val) {
75 if (val) { 73 if (val) {
76 return I18n::instance()->getMessage( 74 return I18n::instance()->getMessage(
@@ -132,13 +130,12 @@ int main(int argc, char **argv) {
132 "warning: couldn't set environment variable 'DISPLAY'\n")); 130 "warning: couldn't set environment variable 'DISPLAY'\n"));
133 perror("putenv()"); 131 perror("putenv()");
134 } 132 }
135 } else if (! strcmp(argv[i], "-version")) { 133 } else if (strcmp(argv[i], "-version") == 0) {
136 // print current version string 134 // print current version string
137 printf("Fluxbox %s : (c) 2001-2002 Henrik Kinnunen \n\n", 135 printf("Fluxbox %s : (c) 2001-2002 Henrik Kinnunen \n\n",
138 __fluxbox_version); 136 __fluxbox_version);
139
140 exit(0); 137 exit(0);
141 } else if (! strcmp(argv[i], "-help")) { 138 } else if (strcmp(argv[i], "-help") == 0) {
142 // print program usage and command line options 139 // print program usage and command line options
143 printf(i18n-> 140 printf(i18n->
144 getMessage( 141 getMessage(