* lib/kwset.h: Make header idempotent and C++ safe. Check that config.h
was already included.
2025-06-25 Bruno Haible <bruno@clisp.org>
+ kwset: Usability tweaks.
+ * lib/kwset.h: Make header idempotent and C++ safe. Check that config.h
+ was already included.
+
kwset: New module.
* lib/kwset.h: New file, from GNU grep.
* lib/kwset.c: New file, from GNU grep.
/* Written August 1989 by Mike Haertel. */
+#ifndef _KWSET_H
+#define _KWSET_H
+
+/* This file uses _GL_ATTRIBUTE_PURE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
-#include <idx.h>
+#include "arg-nonnull.h"
+#include "idx.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
struct kwsmatch
{
idx_t size; /* Length of match. */
};
-#include <arg-nonnull.h>
-#include <idx.h>
-
struct kwset;
typedef struct kwset *kwset_t;
struct kwsmatch *, bool)
_GL_ARG_NONNULL ((4));
extern void kwsfree (kwset_t);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _KWSET_H */