slackbuilds_ponce/system/ksh-openbsd/patches/linux/charclass_h.diff
Daniel LEVAI 7fc7de8808 system/ksh-openbsd: Renamed from "ksh" and updated to 20110909
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2011-10-08 20:29:28 -05:00

36 lines
912 B
Diff

--- ksh-openbsd_cvs/charclass.h 1970-01-01 01:00:00.000000000 +0100
+++ ksh-openbsd_cvs.new/charclass.h 2010-04-01 21:01:24.132137763 +0200
@@ -0,0 +1,33 @@
+/*
+ * Public domain, 2008, Todd C. Miller <Todd.Miller@courtesan.com>
+ *
+ * $OpenBSD: charclass.h,v 1.1 2008/10/01 23:04:13 millert Exp $
+ */
+
+#include <ctype.h>
+
+#define isblank(c) __isctype((c), _ISblank)
+
+/*
+ * POSIX character class support for fnmatch() and glob().
+ */
+static struct cclass {
+ const char *name;
+ int (*isctype)(int);
+} cclasses[] = {
+ { "alnum", isalnum },
+ { "alpha", isalpha },
+// { "blank", isblank },
+ { "cntrl", iscntrl },
+ { "digit", isdigit },
+ { "graph", isgraph },
+ { "lower", islower },
+ { "print", isprint },
+ { "punct", ispunct },
+ { "space", isspace },
+ { "upper", isupper },
+ { "xdigit", isxdigit },
+ { NULL, NULL }
+};
+
+#define NCCLASSES (sizeof(cclasses) / sizeof(cclasses[0]) - 1)