commit 5a405b382a263dda7adc435b76daf7ede879c04a
parent b4e2769abbf5282a8672c86ba10c5edd87a4b7ee
Author: Jaromil <jaromil@dyne.org>
Date: Mon, 14 May 2012 22:11:23 +0200
forgot lbdb headers
Diffstat:
4 files changed, 181 insertions(+), 0 deletions(-)
diff --git a/share/lbdb/dotlock.h b/share/lbdb/dotlock.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
+ * Copyright (C) 1998-2000 Thomas Roessler <roessler@does-not-exist.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA.
+ */
+
+#ifndef _DOTLOCK_H
+#define _DOTLOCK_H
+
+/* exit values */
+
+#define DL_EX_OK 0
+#define DL_EX_ERROR 1
+#define DL_EX_EXIST 3
+#define DL_EX_IMPOSSIBLE 5
+
+/* flags */
+
+#define DL_FL_TRY (1 << 0)
+#define DL_FL_UNLOCK (1 << 1)
+#define DL_FL_FORCE (1 << 3)
+#define DL_FL_RETRY (1 << 4)
+#define DL_FL_UNLINK (1 << 5)
+
+#define DL_FL_ACTIONS (DL_FL_TRY|DL_FL_UNLOCK|DL_FL_UNLINK)
+
+#endif
diff --git a/share/lbdb/helpers.h b/share/lbdb/helpers.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1998 Thomas Roessler <roessler@guug.de>
+ *
+ * This file contains the prototypes for several of the
+ * functions from helpers.c. It is part of the "little
+ * brother database" packet.
+ *
+ * These functions have been stolen from the mutt mail
+ * user agent. The copyright notice from there:
+ *
+ * Copyright (C) 1996-8 Michael R. Elkins <me@cs.hmc.edu>
+ *
+ * This program is free software; you can
+ * redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it
+ * will be useful, but WITHOUT ANY WARRANTY; without
+ * even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA.
+ */
+
+/* $Id: helpers.h,v 1.4 2005-10-29 14:48:08 roland Exp $ */
+
+#ifndef _HELPERS_H
+#define _HELPERS_H
+
+#include <ctype.h>
+
+char *safe_strdup (const char *);
+void *safe_calloc (size_t, size_t);
+void *safe_malloc (unsigned int);
+void safe_realloc (void **, size_t);
+void safe_free (void *);
+
+#define FREE(x) safe_free(x)
+#define SKIPWS(c) while (*(c) && isspace ((unsigned char) *(c))) c++;
+#define strfcpy(A,B,C) strncpy(A,B,C), *(A+(C)-1)=0
+
+#define STRING 256
+
+#endif
diff --git a/share/lbdb/rfc2047.h b/share/lbdb/rfc2047.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 1996-8 Michael R. Elkins <me@cs.hmc.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA.
+ */
+
+/* $Id: rfc2047.h,v 1.4 2007-10-28 16:33:36 roland Exp $ */
+
+extern const char *Charset;
+void rfc2047_encode_string (char *, size_t, const unsigned char *);
+void rfc2047_encode_adrlist (ADDRESS *);
+
+void rfc2047_decode (char *, const char *, size_t);
+void rfc2047_decode_adrlist (ADDRESS *);
+
diff --git a/share/lbdb/rfc822.h b/share/lbdb/rfc822.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 1996-8 Michael R. Elkins <me@cs.hmc.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,, USA.
+ */
+
+/* $Id: rfc822.h,v 1.3 2005-10-29 14:48:11 roland Exp $ */
+
+#ifndef rfc822_h
+#define rfc822_h
+
+/* possible values for RFC822Error */
+enum
+{
+ ERR_MEMORY = 1,
+ ERR_MISMATCH_PAREN,
+ ERR_MISMATCH_QUOTE,
+ ERR_BAD_ROUTE,
+ ERR_BAD_ROUTE_ADDR,
+ ERR_BAD_ADDR_SPEC
+};
+
+typedef struct address_t
+{
+#ifdef EXACT_ADDRESS
+ char *val; /* value of address as parsed */
+#endif
+ char *personal; /* real name of address */
+ char *mailbox; /* mailbox and host address */
+ int group; /* group mailbox? */
+ struct address_t *next;
+}
+ADDRESS;
+
+void rfc822_free_address (ADDRESS **);
+void rfc822_qualify (ADDRESS *, const char *);
+ADDRESS *rfc822_parse_adrlist (ADDRESS *, const char *s);
+ADDRESS *rfc822_cpy_adr (ADDRESS *addr);
+ADDRESS *rfc822_cpy_adr_real (ADDRESS *addr);
+ADDRESS *rfc822_append (ADDRESS **a, ADDRESS *b);
+void rfc822_write_address (char *, size_t, ADDRESS *);
+void rfc822_write_list (char *, size_t, ADDRESS *);
+void rfc822_free_address (ADDRESS **addr);
+void rfc822_cat (char *, size_t, const char *, const char *);
+
+extern int RFC822Error;
+extern const char *RFC822Errors[];
+
+#define rfc822_error(x) RFC822Errors[x]
+#define rfc822_new_address() calloc(1,sizeof(ADDRESS))
+
+#endif /* rfc822_h */