summaryrefslogtreecommitdiffstats
path: root/ldapaddressbook/abookfind.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldapaddressbook/abookfind.c')
-rw-r--r--ldapaddressbook/abookfind.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/ldapaddressbook/abookfind.c b/ldapaddressbook/abookfind.c
new file mode 100644
index 0000000..48c1007
--- /dev/null
+++ b/ldapaddressbook/abookfind.c
@@ -0,0 +1,24 @@
+/*
+** Copyright 2006, Double Precision Inc.
+**
+** See COPYING for distribution information.
+*/
+
+#include "config.h"
+#include "ldapaddressbook.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+const struct ldapabook *ldapabook_find(const struct ldapabook *l,
+ const char *n)
+{
+ while (l)
+ {
+ if (strcmp(l->name, n) == 0) return (l);
+
+ l=l->next;
+ }
+ return (0);
+}