support multibyte input to menu code; from Alexander Polakov with a tiny tweak.
This commit is contained in:
5
calmwm.c
5
calmwm.c
@@ -25,6 +25,7 @@
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -62,6 +63,10 @@ main(int argc, char **argv)
|
||||
char *display_name = NULL;
|
||||
int ch;
|
||||
|
||||
if (!setlocale(LC_CTYPE, "") || !XSupportsLocale())
|
||||
warnx("no locale support");
|
||||
mbtowc(NULL, NULL, MB_CUR_MAX);
|
||||
|
||||
while ((ch = getopt(argc, argv, "c:d:")) != -1) {
|
||||
switch (ch) {
|
||||
case 'c':
|
||||
|
||||
Reference in New Issue
Block a user