2021-11-21 01:29:09 +00:00
|
|
|
#include "dwm.h"
|
|
|
|
|
2021-11-21 01:37:38 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
static void die(const char *fmt, ...);
|
|
|
|
|
2021-11-21 01:29:09 +00:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2021-11-21 01:37:38 +00:00
|
|
|
if (argc == 2 && strcmp(argv[1], "-v") == 0) {
|
|
|
|
die("polytreewm-"VERSION);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (argc != 1) {
|
|
|
|
die("usage: polytreewm [-v]");
|
|
|
|
}
|
|
|
|
|
2021-11-21 01:29:09 +00:00
|
|
|
return dwm_main(argc, argv);
|
|
|
|
}
|
2021-11-21 01:37:38 +00:00
|
|
|
|
|
|
|
void die(const char *const fmt, ...)
|
|
|
|
{
|
|
|
|
va_list ap;
|
|
|
|
va_start(ap, fmt);
|
|
|
|
vfprintf(stderr, fmt, ap);
|
|
|
|
va_end(ap);
|
|
|
|
fputc('\n', stderr);
|
|
|
|
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
}
|