summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2018-02-01 23:08:21 +0100
committerpgen <p.gen.progs@gmail.com>2018-02-01 23:23:56 +0100
commitc6904afd89aa0660c3cba7373f848dfa1fc101d9 (patch)
tree85bd9ffa0da0ed3c707865aac3f6fbe0cfb67e22
parente6b8b4ba8881dbb985f22bd349577c5658ff9936 (diff)
Partially revert the previous commit (e6b8) as it breaks UTF-8
-rw-r--r--Makefile.in6
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure11
-rw-r--r--configure.ac1
-rw-r--r--smenu.c12
5 files changed, 7 insertions, 26 deletions
diff --git a/Makefile.in b/Makefile.in
index f315ef5..aab3b5a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -84,9 +84,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.h.in $(srcdir)/smenu.spec.in \
$(top_srcdir)/build-aux/depcomp $(dist_man_MANS) ChangeLog \
- TODO build-aux/compile build-aux/config.guess \
- build-aux/config.sub build-aux/depcomp build-aux/install-sh \
- build-aux/missing $(top_srcdir)/build-aux/config.guess \
+ TODO build-aux/config.guess build-aux/config.sub \
+ build-aux/depcomp build-aux/install-sh build-aux/missing \
+ $(top_srcdir)/build-aux/config.guess \
$(top_srcdir)/build-aux/config.sub \
$(top_srcdir)/build-aux/install-sh \
$(top_srcdir)/build-aux/missing
diff --git a/config.h.in b/config.h.in
index e25e9e0..a9956b5 100644
--- a/config.h.in
+++ b/config.h.in
@@ -6,9 +6,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define to 1 if you have the `isgraph' function. */
-#undef HAVE_ISGRAPH
-
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
diff --git a/configure b/configure
index 3499174..ccf2715 100755
--- a/configure
+++ b/configure
@@ -4993,17 +4993,6 @@ _ACEOF
fi
done
-for ac_func in isgraph
-do :
- ac_fn_c_check_func "$LINENO" "isgraph" "ac_cv_func_isgraph"
-if test "x$ac_cv_func_isgraph" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ISGRAPH 1
-_ACEOF
-
-fi
-done
-
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
diff --git a/configure.ac b/configure.ac
index 7ead12d..9bb3e30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,6 @@ AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([mblen memset nl_langinfo pathconf regcomp setlocale])
AC_CHECK_FUNCS([strchr strrchr strspn])
-AC_CHECK_FUNCS([isgraph])
AC_CANONICAL_HOST
# OS-specific tests
diff --git a/smenu.c b/smenu.c
index 8d91660..8855615 100644
--- a/smenu.c
+++ b/smenu.c
@@ -2001,7 +2001,7 @@ isempty(const char * s)
{
while (*s != '\0')
{
- if (my_isprint(*s) && !isblank(*s))
+ if (my_isprint(*s) && *s != ' ' && *s != '\t')
return 0;
s++;
}
@@ -2158,7 +2158,7 @@ parse_selectors(char * str, int * filter, char * unparsed,
break;
default:
- if (!my_isprint(c))
+ if (!isgraph(c))
return;
*filter = INCLUDE_FILTER;
@@ -2226,8 +2226,8 @@ parse_selectors(char * str, int * filter, char * unparsed,
/* Check is we have found a well describes regular expression */
/* """""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
- if (ptr - str > start + 2 && delim1 == delim2 && my_isprint(delim1)
- && my_isprint(delim2) && !isdigit(delim1) && !isdigit(delim2))
+ if (ptr - str > start + 2 && delim1 == delim2 && isgraph(delim1)
+ && isgraph(delim2) && !isdigit(delim1) && !isdigit(delim2))
{
/* Process the regex */
/* """"""""""""""""" */
@@ -5435,9 +5435,6 @@ main(int argc, char * argv[])
else
langinfo.utf8 = 0;
-#if HAVE_ISGRAPH
- my_isprint = isgraph;
-#else
/* my_isprint is a function pointer that points to the 7 or 8-bit */
/* version of isprint according to the content of UTF-8 */
/* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
@@ -5445,7 +5442,6 @@ main(int argc, char * argv[])
my_isprint = isprint8;
else
my_isprint = isprint7;
-#endif
/* Set terminal in noncanonical, noecho mode */
/* """"""""""""""""""""""""""""""""""""""""" */