Author: Bleep <tomh@inxpress.net>
[ircu2.10.12-pk.git] / include / match.h
index 7a328a74d1af1fc89dc17725a4603871e30d7c7d..22a95b50b4269720d4f209d62ae324f4634c6bff 100644 (file)
@@ -1,27 +1,36 @@
-#ifndef MATCH_H
-#define MATCH_H
-
-/*=============================================================================
- * System headers used by this header file
+/*
+ * match.h
+ *
+ * $Id$
  */
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+#ifndef INCLUDED_match_h
+#define INCLUDED_match_h
+#ifndef INCLUDED_sys_types_h
+#include <sys/types.h>         /* XXX - broken BSD system headers */
+#define INCLUDED_sys_types_h
+#endif
+#ifndef INCLUDED_netinet_in_h
+#include <netinet/in.h>        /* struct in_addr */
+#define INCLUDED_netinet_in_h
+#endif
 
-/*=============================================================================
+/*
  * Structures
  */
-
 struct in_mask {
   struct in_addr bits;
   struct in_addr mask;
   int fall;
 };
 
-/*=============================================================================
- * Proto types
+/*
+ * Prototypes
  */
 
+/*
+ * XXX - match returns 0 if a match is found. Smelly interface
+ * needs to be fixed. --Bleep
+ */
 extern int mmatch(const char *old_mask, const char *new_mask);
 extern int match(const char *ma, const char *na);
 extern char *collapse(char *pattern);
@@ -32,4 +41,4 @@ extern int matchdecomp(char *mask, const char *cmask);
 extern int mmexec(const char *wcm, int wminlen, const char *rcm, int rminlen);
 extern int matchcompIP(struct in_mask *imask, const char *mask);
 
-#endif /* MATCH_H */
+#endif /* INCLUDED_match_h */