sway/main: move constants off the stack

This makes stack traces from gdb slightly easier to read.
master
Manuel Stoeckl 3 years ago committed by Simon Ser
parent fb3330c1fb
commit 8f036b6f78

@ -240,10 +240,7 @@ static void handle_wlr_log(enum wlr_log_importance importance,
_sway_vlog(convert_wlr_log_importance(importance), sway_fmt, args);
}
int main(int argc, char **argv) {
static bool verbose = false, debug = false, validate = false, allow_unsupported_gpu = false;
static const struct option long_options[] = {
static const struct option long_options[] = {
{"help", no_argument, NULL, 'h'},
{"config", required_argument, NULL, 'c'},
{"validate", no_argument, NULL, 'C'},
@ -253,11 +250,9 @@ int main(int argc, char **argv) {
{"get-socketpath", no_argument, NULL, 'p'},
{"unsupported-gpu", no_argument, NULL, 'u'},
{0, 0, 0, 0}
};
char *config_path = NULL;
};
const char* usage =
static const char usage[] =
"Usage: sway [options] [command]\n"
"\n"
" -h, --help Show help message and quit.\n"
@ -269,6 +264,11 @@ int main(int argc, char **argv) {
" --get-socketpath Gets the IPC socket path and prints it, then exits.\n"
"\n";
int main(int argc, char **argv) {
static bool verbose = false, debug = false, validate = false, allow_unsupported_gpu = false;
char *config_path = NULL;
int c;
while (1) {
int option_index = 0;

Loading…
Cancel
Save