aboutsummaryrefslogtreecommitdiffstats
path: root/calmwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'calmwm.c')
-rw-r--r--calmwm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/calmwm.c b/calmwm.c
index 73526ba..a9a7cd2 100644
--- a/calmwm.c
+++ b/calmwm.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: calmwm.c,v 1.64 2012/07/18 21:53:22 okan Exp $
+ * $OpenBSD: calmwm.c,v 1.65 2012/08/07 14:05:49 okan Exp $
*/
#include <sys/param.h>
@@ -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':