From 7804adef09be50df671ceed8d6580ded54d140ce Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Mon, 23 Sep 1991 18:15:45 +0000
Subject: [PATCH] Fix in misc_info handling.

---
 src/server/ChangeLog |  4 +++
 src/server/text.c    | 59 +++-----------------------------------------
 2 files changed, 7 insertions(+), 56 deletions(-)

diff --git a/src/server/ChangeLog b/src/server/ChangeLog
index 2517619bd..be8f6976e 100644
--- a/src/server/ChangeLog
+++ b/src/server/ChangeLog
@@ -1,3 +1,7 @@
+Mon Sep 23 19:39:55 1991  Per Cederqvist  (ceder at lysator)
+
+	* text.c (sender): handle a sent_at correctly.
+
 Sat Sep 21 02:12:24 1991  Per Cederqvist  (ceder at lysator)
 
 	* "isc.h" is now known as "isc-interface.h" to avoid confusion
diff --git a/src/server/text.c b/src/server/text.c
index 7516b8320..7bdacb7de 100644
--- a/src/server/text.c
+++ b/src/server/text.c
@@ -1,5 +1,5 @@
 /*
- * $Id: text.c,v 0.6 1991/09/21 13:06:43 ceder Exp $
+ * $Id: text.c,v 0.7 1991/09/23 18:15:43 ceder Exp $
  * Copyright (C) 1991  Lysator Academic Computer Association.
  *
  * This file is part of the LysKOM server.
@@ -28,7 +28,7 @@
  * All atomic calls that deals with texts.
  */
 
-static char *rcsid = "$Id: text.c,v 0.6 1991/09/21 13:06:43 ceder Exp $";
+static char *rcsid = "$Id: text.c,v 0.7 1991/09/23 18:15:43 ceder Exp $";
 
 #include <time.h>
 #include <stdlib.h>
@@ -756,16 +756,13 @@ sender(Text_stat * t_stat,
 	case comm_in:
 	case footn_to:
 	case footn_in:
+	case sent_at:
 	    return 0;		/* No sender. */
 
 	case loc_no:
 	case rec_time:
 	    break;		/* These may come before a sent_by. */
 
-	case sent_at:
-	    log("ERROR: sender(): Misc_item out of order.\n");
-	    return 0;
-
 #ifndef COMPILE_CHECKS
 	default:
 	    log("ERROR: sender(): Illegal misc_item found.\n");
@@ -880,56 +877,6 @@ is_comm_sender(Text_stat * text_s,
     return FALSE;
 }
 
-#if 0
-/*
- * Check if ACTPERS has sent this text as a footnote to parent.
- */
-static Bool
-is_footn_sender(Text_stat * text_s,
-		Text_no     parent)
-{
-    int i;
-
-    if ( !ACTPERS )
-    {
-	return FALSE;
-    }
-    
-    for ( i = 0; i < text_s->no_of_misc; i++ )
-    {
-	switch( text_s->misc_items[ i ].type )
-	{
-	case footn_to:
-	    if ( text_s->misc_items[ i ].datum.footnote_to == parent
-		&& sender ( text_s, i ) == ACTPERS )
-	    {
-		return TRUE;
-	    }
-	    break;
-
-
-	case recpt:
-	case cc_recpt:
-	case loc_no:
-	case rec_time:
-	case comm_in:
-	case comm_to:
-	case footn_in:
-	case sent_by:
-	case sent_at:
-	    break;
-
-#ifndef COMPILE_CHECKS
-	default:
-	    restart_kom("is_footn_sender(): Illegal misc_item found.\n");
-#endif
-	}
-    }
-
-    return FALSE;
-}
-#endif
-
     
 /*
  * Check if ACTPERS is allowed to add a footnote to a text. Sets errno if
-- 
GitLab