sway/main: move constants off the stack

This makes stack traces from gdb slightly easier to read.
This commit is contained in:
Manuel Stoeckl 2022-03-27 12:23:37 -04:00 committed by Simon Ser
parent fb3330c1fb
commit 8f036b6f78

View file

@ -240,9 +240,6 @@ 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[] = {
{"help", no_argument, NULL, 'h'},
{"config", required_argument, NULL, 'c'},
@ -255,9 +252,7 @@ int main(int argc, char **argv) {
{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;