aboutsummaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-07 22:19:59 (GMT)
committerfluxgen <fluxgen>2003-05-07 22:19:59 (GMT)
commitb04a5bb1c8e7520eea0208a360b220831cf5cdef (patch)
treee36e7a9215a7d01ccd3ce6576e3f51298a6a8bf1 /src/main.cc
parentb15bda00be1812ce3c8b911c6275ffdf3ec5c688 (diff)
downloadfluxbox-b04a5bb1c8e7520eea0208a360b220831cf5cdef.zip
fluxbox-b04a5bb1c8e7520eea0208a360b220831cf5cdef.tar.bz2
fixed options
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc115
1 files changed, 43 insertions, 72 deletions
diff --git a/src/main.cc b/src/main.cc
index 2eb0ff0..183983f 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -22,7 +22,7 @@
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.14 2003/04/27 01:51:04 fluxgen Exp $ 25// $Id: main.cc,v 1.15 2003/05/07 22:19:59 fluxgen Exp $
26 26
27 27
28 28
@@ -58,35 +58,10 @@
58 58
59using namespace std; 59using namespace std;
60 60
61#ifdef DEBUG_UDS
62
63#include <uds/init.hh>
64#include <uds/uds.hh>
65
66// configure UDS
67uds::uds_flags_t uds::flags = uds::leak_check | uds::std_backtraces | uds::log_allocs | uds::leak_check;
68
69#endif //!DEBUG_UDS
70
71const char *getNLSYesNoMsg(bool val) {
72 if (val) {
73 return I18n::instance()->getMessage(
74 FBNLS::CommonSet, FBNLS::CommonYes,
75 "yes");
76 }
77
78 return I18n::instance()->getMessage(
79 FBNLS::CommonSet, FBNLS::CommonNo,
80 "no");
81}
82
83int main(int argc, char **argv) { 61int main(int argc, char **argv) {
84#ifdef DEBUG_UDS
85 uds::Init uds_init;
86#endif //!DEBUG_UDS
87 62
88 char *session_display = (char *) 0; 63 char *session_display = 0;
89 char *rc_file = (char *) 0; 64 char *rc_file = 0;
90 65
91 NLSInit("fluxbox.cat"); 66 NLSInit("fluxbox.cat");
92 I18n *i18n = I18n::instance(); 67 I18n *i18n = I18n::instance();
@@ -129,70 +104,66 @@ int main(int argc, char **argv) {
129 "warning: couldn't set environment variable 'DISPLAY'\n")); 104 "warning: couldn't set environment variable 'DISPLAY'\n"));
130 perror("putenv()"); 105 perror("putenv()");
131 } 106 }
132 } else if (strcmp(argv[i], "-version") == 0) { 107 } else if (strcmp(argv[i], "-version") == 0 || strcmp(argv[i], "-v") == 0) {
133 // print current version string 108 // print current version string
134 printf("Fluxbox %s : (c) 2001-2002 Henrik Kinnunen \n\n", 109 printf("Fluxbox %s : (c) 2001-2003 Henrik Kinnunen \n\n",
135 __fluxbox_version); 110 __fluxbox_version);
136 exit(0); 111 exit(0);
137 } else if (strcmp(argv[i], "-help") == 0) { 112 } else if (strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "-h") == 0) {
138 // print program usage and command line options 113 // print program usage and command line options
139 printf(i18n-> 114 printf(i18n->
140 getMessage( 115 getMessage(
141 FBNLS::mainSet, FBNLS::mainUsage, 116 FBNLS::mainSet, FBNLS::mainUsage,
142 "Fluxbox %s : (c) 2001-2002 Henrik Kinnunen\n\n" 117 "Fluxbox %s : (c) 2001-2003 Henrik Kinnunen\n\n"
143 " -display <string>\t\tuse display connection.\n" 118 " -display <string>\t\tuse display connection.\n"
144 " -rc <string>\t\t\tuse alternate resource file.\n" 119 " -rc <string>\t\t\tuse alternate resource file.\n"
145 " -version\t\t\tdisplay version and exit.\n" 120 " -version\t\t\tdisplay version and exit.\n"
146 " -help\t\t\t\tdisplay this help text and exit.\n\n"), 121 " -help\t\t\t\tdisplay this help text and exit.\n\n"),
147 __fluxbox_version); 122 __fluxbox_version);
148 123
149 124 cout<<"Compiled with: "<<endl<<
150 printf(i18n->
151 getMessage(
152 FBNLS::mainSet, FBNLS::mainCompileOptions,
153 "Compile time options:\n"
154 " Debugging:\t\t\t%s\n"
155 " Interlacing:\t\t\t%s\n"
156 " Shape:\t\t\t%s\n"
157 " Slit:\t\t\t\t%s\n"
158 " 8bpp Ordered Dithering:\t%s\n\n"),
159#ifdef DEBUG 125#ifdef DEBUG
160 getNLSYesNoMsg(true), 126 "DEBUG"<<endl<<
161#else // !DEBUG 127#endif // DEBUG
162 getNLSYesNoMsg(false),
163#endif // DEBUG
164
165#ifdef INTERLACE
166 getNLSYesNoMsg(true),
167#else // !INTERLACE
168 getNLSYesNoMsg(false),
169#endif // INTERLACE
170
171#ifdef SHAPE
172 getNLSYesNoMsg(true),
173#else // !SHAPE
174 getNLSYesNoMsg(false),
175#endif // SHAPE
176
177#ifdef SLIT 128#ifdef SLIT
178 getNLSYesNoMsg(true), 129 "SLIT"<<endl<<
179#else // !SLIT
180 getNLSYesNoMsg(false),
181#endif // SLIT 130#endif // SLIT
182 131#ifdef HAVE_XPM
183#ifdef ORDEREDPSEUDO 132 "XPM"<<endl<<
184 getNLSYesNoMsg(true) 133#endif // HAVE_XPM
185#else // !ORDEREDPSEUDO 134#ifdef USE_GNOME
186 getNLSYesNoMsg(false) 135 "GNOME"<<endl<<
187#endif // ORDEREDPSEUDO 136#endif // USE_GNOME
188 137#ifdef KDE
189 ); 138 "KDE"<<endl<<
190 139#endif // KDE
140#ifdef USE_NEWWMSPEC
141 "EWMH"<<endl<<
142#endif // USE_NEWWMSPEC
143#ifdef REMEMBER
144 "REMEMBER"<<endl<<
145#endif // REMEMBER
146#ifdef SHAPE
147 "SHAPE"<<endl<<
148#endif // SHAPE
149#ifdef USE_XFT
150 "XFT"<<endl<<
151#endif // USE_XFT
152#ifdef USE_XMB
153 "XMB"<<endl<<
154#endif // USE_XMB
155#ifdef XINERAMA
156 "XINERAMA"<<endl<<
157#endif // XINERAMA
158#ifdef HAVE_XRENDER
159 "RENDER"<<endl<<
160#endif // HAVE_XRENDER
161 endl;
191 ::exit(0); 162 ::exit(0);
192 } 163 }
193 } 164 }
194 165
195#ifdef __EMX__ 166#ifdef __EMX__
196 _chdir2(getenv("X11ROOT")); 167 _chdir2(getenv("X11ROOT"));
197#endif // __EMX__ 168#endif // __EMX__
198 Fluxbox *fluxbox=0; 169 Fluxbox *fluxbox=0;