]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - menu/m_item_new.c
ncurses 5.6 - patch 20080223
[ncurses.git] / menu / m_item_new.c
index 185e2dca6801ecc59583098bd5071878b05b0d3a..d7fe1f8542c2f12d33b5da1dff75d30b19cbce2c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
 #include "menu.priv.h"
 
 #if USE_WIDEC_SUPPORT
+#if HAVE_WCTYPE_H
 #include <wctype.h>
 #endif
+#endif
 
-MODULE_ID("$Id: m_item_new.c,v 1.25 2005/04/16 22:24:38 tom Exp $")
+MODULE_ID("$Id: m_item_new.c,v 1.27 2006/12/17 19:47:09 tom Exp $")
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnmenu  
@@ -66,13 +68,13 @@ Is_Printable_String(const char *s)
   assert(s);
 
   if (count > 0
-      && (temp = typeCalloc(wchar_t, (2 + count))) != 0)
+      && (temp = typeCalloc(wchar_t, (2 + (unsigned)count))) != 0)
     {
       int n;
 
       mbstowcs(temp, s, (unsigned)count);
       for (n = 0; n < count; ++n)
-       if (!iswprint(temp[n]))
+       if (!iswprint((wint_t) temp[n]))
          {
            result = FALSE;
            break;