changeset 33:7b6dc86c266d noffle

[svn] Added Db_from, Db_date
author enz
date Mon, 01 May 2000 10:22:42 +0100
parents 45ddd5e72164
children 9426f9eaf3d7
files database.c database.h
diffstat 2 files changed, 27 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/database.c	Sun Apr 30 20:07:54 2000 +0100
+++ b/database.c	Mon May 01 10:22:42 2000 +0100
@@ -1,7 +1,7 @@
 /*
   database.c
 
-  $Id: database.c 32 2000-04-29 14:45:56Z enz $
+  $Id: database.c 39 2000-05-01 09:22:42Z enz $
 
   Uses GNU gdbm library. Using Berkeley db (included in libc6) was
   cumbersome. It is based on Berkeley db 1.85, which has severe bugs
@@ -489,6 +489,22 @@
     return db.xref;
 }
 
+const char *
+Db_from( const char *msgId )
+{
+    if ( ! loadArt( msgId ) )
+        return "";
+    return db.from;
+}
+
+const char *
+Db_date( const char *msgId )
+{
+    if ( ! loadArt( msgId ) )
+        return "";
+    return db.date;
+}
+
 Bool
 Db_contains( const char *msgId )
 {
--- a/database.h	Sun Apr 30 20:07:54 2000 +0100
+++ b/database.h	Mon May 01 10:22:42 2000 +0100
@@ -3,7 +3,7 @@
 
   Article database.
 
-  $Id: database.h 36 2000-04-30 14:21:34Z enz $
+  $Id: database.h 39 2000-05-01 09:22:42Z enz $
 */
 
 #ifndef DB_H
@@ -60,10 +60,18 @@
 time_t
 Db_lastAccess( const char *msgId );
 
-/* Value of references header line */
+/* Value of the References header line */
 const char *
 Db_ref( const char *msgId );
 
+/* Value of the From header line */
+const char *
+Db_from( const char *msgId );
+
+/* Value of the Date header line */
+const char *
+Db_date( const char *msgId );
+
 /* Xref header line without hostname */
 const char *
 Db_xref( const char *msgId );