Commit e8649d82 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(find_recipient): Fix usage of the COMPILE_CHECKS macro.

(is_member_in_recpt): Likewise.
(do_delete_misc): Likewise.
(do_sub_recpt): Likewise.
(sender): Likewise.
(is_sender): Likewise.
(is_comm_sender): Likewise.
(skip_recp): Likewise.
(recp_sent_by): Likewise.
(filter_secret_info): Likewise.
(do_delete_text): Likewise.
(check_double_subm): Likewise.
(check_double_comm): Likewise.
(create_text_add_miscs): Likewise.
parent 8c39ed29
/* /*
* $Id: text.c,v 0.65 1999/05/18 13:07:02 byers Exp $ * $Id: text.c,v 0.66 1999/05/20 06:56:33 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#endif #endif
static const char * static const char *
rcsid = "$Id: text.c,v 0.65 1999/05/18 13:07:02 byers Exp $"; rcsid = "$Id: text.c,v 0.66 1999/05/20 06:56:33 ceder Exp $";
#include "rcs.h" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -233,10 +233,10 @@ find_recipient(Conf_no conf_no, ...@@ -233,10 +233,10 @@ find_recipient(Conf_no conf_no,
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
restart_kom("find_recipient(): illegal misc_item\n");
#endif #endif
case unknown_info:
restart_kom("find_recipient(): illegal misc_item\n");
} }
} }
...@@ -516,11 +516,11 @@ is_member_in_recpt(Person *person, ...@@ -516,11 +516,11 @@ is_member_in_recpt(Person *person,
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
#endif
case unknown_info:
kom_log("%s: is_member_in_recpt(): bad misc_item.\n", __FILE__); kom_log("%s: is_member_in_recpt(): bad misc_item.\n", __FILE__);
break; break;
#endif
} }
} }
...@@ -595,10 +595,10 @@ do_delete_misc (u_short * no_of_misc, ...@@ -595,10 +595,10 @@ do_delete_misc (u_short * no_of_misc,
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
restart_kom("do_delete_misc() - illegal misc");
#endif #endif
case unknown_info:
restart_kom("do_delete_misc() - illegal misc");
} }
} }
...@@ -733,11 +733,11 @@ do_sub_recpt (Text_no text_no, ...@@ -733,11 +733,11 @@ do_sub_recpt (Text_no text_no,
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
#endif
case unknown_info:
kom_log("%s: do_sub_recpt(): bad misc_item.\n", __FILE__); kom_log("%s: do_sub_recpt(): bad misc_item.\n", __FILE__);
break; break;
#endif
} }
} }
...@@ -907,11 +907,10 @@ sender(Text_stat * t_stat, ...@@ -907,11 +907,10 @@ sender(Text_stat * t_stat,
break; /* These may come before a sent_by. */ break; /* These may come before a sent_by. */
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
restart_kom("ERROR: sender(): Illegal misc_item found.\n");
#endif #endif
case unknown_info:
restart_kom("ERROR: sender(): Illegal misc_item found.\n");
} }
} }
return 0; /* No sender. */ return 0; /* No sender. */
...@@ -971,10 +970,10 @@ is_sender(Text_stat * text_s, ...@@ -971,10 +970,10 @@ is_sender(Text_stat * text_s,
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
restart_kom("is_sender(): Illegal misc_item found.\n");
#endif #endif
case unknown_info:
restart_kom("is_sender(): Illegal misc_item found.\n");
} }
} }
...@@ -1022,10 +1021,10 @@ is_comm_sender(Text_stat * text_s, ...@@ -1022,10 +1021,10 @@ is_comm_sender(Text_stat * text_s,
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
restart_kom("is_comm_sender(): Illegal misc_item found.\n");
#endif #endif
case unknown_info:
restart_kom("is_comm_sender(): Illegal misc_item found.\n");
} }
} }
...@@ -1141,10 +1140,10 @@ skip_recp (Misc_info ** misc, ...@@ -1141,10 +1140,10 @@ skip_recp (Misc_info ** misc,
ready = TRUE; ready = TRUE;
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
restart_kom("skip_recp() - illegal misc\n");
#endif #endif
case unknown_info:
restart_kom("skip_recp() - illegal misc\n");
} }
} }
} }
...@@ -1186,10 +1185,10 @@ recp_sent_by(Misc_info *misc, Misc_info *end, ...@@ -1186,10 +1185,10 @@ recp_sent_by(Misc_info *misc, Misc_info *end,
return FALSE; return FALSE;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
restart_kom("recp_sent_by() - illegal misc\n");
#endif #endif
case unknown_info:
restart_kom("recp_sent_by() - illegal misc\n");
} }
misc += 1; misc += 1;
} }
...@@ -1323,10 +1322,10 @@ filter_secret_info(Text_stat *result, ...@@ -1323,10 +1322,10 @@ filter_secret_info(Text_stat *result,
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
restart_kom("filter_secret_info() - illegal misc_item!\n");
#endif #endif
case unknown_info:
restart_kom("filter_secret_info() - illegal misc_item!\n");
} }
} }
} }
...@@ -1667,10 +1666,10 @@ do_delete_text(Text_no text_no, ...@@ -1667,10 +1666,10 @@ do_delete_text(Text_no text_no,
case sent_at: case sent_at:
restart_kom("do_delete_text(): Illegal misc-item syntax.\n"); restart_kom("do_delete_text(): Illegal misc-item syntax.\n");
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
restart_kom("do_delete_text(): Illegal misc-item.\n");
#endif #endif
case unknown_info:
restart_kom("do_delete_text(): Illegal misc-item.\n");
} }
} }
...@@ -1861,11 +1860,11 @@ check_double_subm (Misc_info * misc, ...@@ -1861,11 +1860,11 @@ check_double_subm (Misc_info * misc,
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
#endif
case unknown_info:
kom_log("%s: check_double_subm(): bad misc_item.\n", __FILE__); kom_log("%s: check_double_subm(): bad misc_item.\n", __FILE__);
break; break;
#endif
} }
} }
return OK; return OK;
...@@ -1906,11 +1905,11 @@ check_double_comm (Misc_info *misc, ...@@ -1906,11 +1905,11 @@ check_double_comm (Misc_info *misc,
break; break;
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
#endif
case unknown_info:
kom_log("%s: check_double_subm(): bad misc_item.\n", __FILE__); kom_log("%s: check_double_subm(): bad misc_item.\n", __FILE__);
break; break;
#endif
} }
} }
...@@ -2255,9 +2254,9 @@ create_text_add_miscs(Text_no new_text, ...@@ -2255,9 +2254,9 @@ create_text_add_miscs(Text_no new_text,
case sent_at: case sent_at:
/* Fall through */ /* Fall through */
#ifndef COMPILE_CHECKS #ifndef COMPILE_CHECKS
case unknown_info:
default: default:
#endif #endif
case unknown_info:
restart_kom("create_text_add_misc() - illegal Info_type"); restart_kom("create_text_add_misc() - illegal Info_type");
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment