Commit 5109e9ea authored by Per Cederqvist's avatar Per Cederqvist

Include more files, now that isc.h and kom-types.h no longer includes

any files.
parent 0d0a48e1
/*
* $Id: misc-parser.c,v 0.6 1993/10/14 22:35:31 ceder Exp $
* $Id: misc-parser.c,v 0.7 1993/10/18 12:26:51 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -47,14 +47,15 @@
* even if so stated.
*/
static char *rcsid = "$Id: misc-parser.c,v 0.6 1993/10/14 22:35:31 ceder Exp $";
static char *rcsid = "$Id: misc-parser.c,v 0.7 1993/10/18 12:26:51 ceder Exp $";
#include "rcs.h"
USE(rcsid);
#ifdef SERVER
# include <sys/types.h>
#endif
#include <sys/types.h>
#include <time.h>
#include "s-string.h"
#include "misc-types.h"
#include "misc-parser.h"
#define EXPORT
......
......@@ -15,6 +15,13 @@
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <time.h>
#include "isc.h"
#include "intern.h"
......
......@@ -9,12 +9,16 @@
*/
#include <sys/types.h>
#include <sys/socket.h>
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#else
......
......@@ -21,6 +21,7 @@
#include <time.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <errno.h>
#ifdef HAVE_STDDEF_H
# include <stddef.h>
......
......@@ -9,6 +9,12 @@
*/
#include <stdio.h>
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <time.h>
#include "isc.h"
#include "intern.h"
......
......@@ -15,7 +15,12 @@
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <sys/types.h>
#include <sys/file.h>
#include <sys/socket.h>
#ifndef NULL
# include <stdio.h>
#endif
......
......@@ -12,12 +12,18 @@
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifndef NULL
# include <stdio.h>
#endif
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "isc.h"
#include "intern.h"
......
......@@ -12,6 +12,9 @@
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <errno.h>
#ifdef HAVE_STRING_H
#include <string.h>
......@@ -21,6 +24,7 @@
#ifndef NULL
# include <stdio.h>
#endif
#include <sys/socket.h>
#include "isc.h"
#include "intern.h"
......
......@@ -11,9 +11,15 @@
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#ifndef NULL
# include <stdio.h>
#endif
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "isc.h"
#include "intern.h"
......
......@@ -13,10 +13,14 @@
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <fcntl.h>
#ifndef NULL
# include <stdio.h>
......
......@@ -16,6 +16,7 @@
#include <arpa/inet.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <errno.h>
#include <netdb.h>
#ifdef HAVE_STDDEF_H
......@@ -24,8 +25,11 @@
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <fcntl.h>
#include <sys/file.h>
#include "isc.h"
#include "intern.h"
......
......@@ -12,6 +12,13 @@
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "isc.h"
......
......@@ -15,12 +15,16 @@
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <ctype.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netdb.h>
#ifdef HAVE_STRING_H
# include <string.h>
......
......@@ -16,11 +16,15 @@
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <ctype.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netdb.h>
#ifdef HAVE_STRING_H
# include <string.h>
......
/*
* $Id: admin.c,v 0.10 1993/10/14 09:10:43 ceder Exp $
* $Id: admin.c,v 0.11 1993/10/18 12:28:50 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* Administrative calls.
*/
static char *rcsid = "$Id: admin.c,v 0.10 1993/10/14 09:10:43 ceder Exp $";
static char *rcsid = "$Id: admin.c,v 0.11 1993/10/18 12:28:50 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -37,8 +37,11 @@ USE(rcsid);
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <sys/types.h>
#include <time.h>
#include "misc-types.h"
#include "s-string.h"
#include "kom-types.h"
#include "manipulate.h"
#include "com.h"
......
/*
* $Id: conference.c,v 0.22 1993/10/16 17:44:44 ceder Exp $
* $Id: conference.c,v 0.23 1993/10/18 12:28:55 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 conferences.
*/
static char *rcsid = "$Id: conference.c,v 0.22 1993/10/16 17:44:44 ceder Exp $";
static char *rcsid = "$Id: conference.c,v 0.23 1993/10/18 12:28:55 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -39,7 +39,9 @@ USE(rcsid);
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <sys/types.h>
#include "s-string.h"
#include "kom-types.h"
#include "log.h"
#include "services.h"
......
/*
* $Id: connections.c,v 0.29 1993/10/16 17:45:02 ceder Exp $
* $Id: connections.c,v 0.30 1993/10/18 12:29:02 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -30,7 +30,7 @@
* Created by Willf|r 31/3-90. Mostly written by ceder.
*/
static char *rcsid = "$Id: connections.c,v 0.29 1993/10/16 17:45:02 ceder Exp $";
static char *rcsid = "$Id: connections.c,v 0.30 1993/10/18 12:29:02 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -55,8 +55,13 @@ USE(rcsid);
#ifndef HAVE_DIFFTIME
# include "tmp-difftime.h"
#endif
#include <sys/socket.h>
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include "misc-types.h"
#include "s-string.h"
#include "kom-types.h"
#include "debug.h"
#include "isc-interface.h"
......
/*
* $Id: dbck-cache.c,v 0.16 1993/10/16 17:45:27 ceder Exp $
* $Id: dbck-cache.c,v 0.17 1993/10/18 12:29:07 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -32,7 +32,7 @@
* Also save time as a time_t instead of a struct tm.
*/
static char *rcsid = "$Id: dbck-cache.c,v 0.16 1993/10/16 17:45:27 ceder Exp $";
static char *rcsid = "$Id: dbck-cache.c,v 0.17 1993/10/18 12:29:07 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -64,6 +64,7 @@ USE(rcsid);
#include "exp.h"
#include "misc-types.h"
#include "s-string.h"
#include "kom-types.h"
#include "kom-errno.h"
#include "cache.h"
......
/*
* $Id: dbck.c,v 0.18 1993/10/16 17:45:49 ceder Exp $
* $Id: dbck.c,v 0.19 1993/10/18 12:29:14 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* Author: Per Cederqvist.
*/
static char *rcsid = "$Id: dbck.c,v 0.18 1993/10/16 17:45:49 ceder Exp $";
static char *rcsid = "$Id: dbck.c,v 0.19 1993/10/18 12:29:14 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -39,8 +39,11 @@ USE(rcsid);
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <time.h>
#include <sys/types.h>
#include "misc-types.h"
#include "s-string.h"
#include "kom-types.h"
#include "tmp-limits.h"
#include "lyskomd.h"
......@@ -362,7 +365,7 @@ check_misc_infos(Text_no tno,
c = cached_get_conf_stat (group.recipient);
if ( c == NULL && group.recipient == 0 )
{
log ("Conference 0 is recipient to text %lu.\n", (u_long)tno);
log ("Conference 0 is recipient to text %lu.\n", (unsigned long)tno);
if (rflag || confirm("Repair by deleting misc_item? "))
{
delete_misc(tstat, previous);
......@@ -384,18 +387,18 @@ check_misc_infos(Text_no tno,
if ( group.local_no < c->texts.first_local_no )
{
log("Text %lu: Recipient %lu<%lu> loc_no is less than %lu\n",
(u_long)tno, (u_long)group.recipient,
(u_long)group.local_no,
(u_long)c->texts.first_local_no);
(unsigned long)tno, (unsigned long)group.recipient,
(unsigned long)group.local_no,
(unsigned long)c->texts.first_local_no);
error++;
}
else if ( c->texts.first_local_no + c->texts.no_of_texts - 1
< group.local_no )
{
log("Text %lu: Recipient %lu<%lu> loc_no > %lu\n",
(u_long)tno, (u_long)group.recipient,
(u_long)group.local_no,
(u_long)(c->texts.first_local_no
(unsigned long)tno, (unsigned long)group.recipient,
(unsigned long)group.local_no,
(unsigned long)(c->texts.first_local_no
+ c->texts.no_of_texts - 1));
error++;
}
......@@ -403,10 +406,10 @@ check_misc_infos(Text_no tno,
- c->texts.first_local_no] != tno )
{
log("Text %lu: Recipient %lu<%lu>: %s to %lu.\n",
(u_long)tno, (u_long)group.recipient,
(u_long)group.local_no,
(unsigned long)tno, (unsigned long)group.recipient,
(unsigned long)group.local_no,
"that local number is mapped",
(u_long)c->texts.texts[group.local_no
(unsigned long)c->texts.texts[group.local_no
- c->texts.first_local_no]);
error++;
}
......@@ -418,7 +421,7 @@ check_misc_infos(Text_no tno,
if ( c == NULL && group.cc_recipient == 0 )
{
log ("Conference 0 is cc_recipient to text %lu.\n",
(u_long)tno);
(unsigned long)tno);
if (rflag || confirm("Repair by deleting misc_item? "))
{
delete_misc(tstat, previous);
......@@ -440,18 +443,18 @@ check_misc_infos(Text_no tno,
if ( group.local_no < c->texts.first_local_no )
{
log("Text %lu: CC_Recipient %lu<%lu> is less than %lu\n",
(u_long)tno, (u_long)group.cc_recipient,
(u_long)group.local_no,
(u_long)c->texts.first_local_no);
(unsigned long)tno, (unsigned long)group.cc_recipient,
(unsigned long)group.local_no,
(unsigned long)c->texts.first_local_no);
error++;
}
else if ( c->texts.first_local_no + c->texts.no_of_texts - 1
< group.local_no )
{
log("Text %lu: CC_Recipient %lu<%lu> loc_no > %lu\n",
(u_long)tno, (u_long)group.cc_recipient,
(u_long)group.local_no,
(u_long)(c->texts.first_local_no
(unsigned long)tno, (unsigned long)group.cc_recipient,
(unsigned long)group.local_no,
(unsigned long)(c->texts.first_local_no
+ c->texts.no_of_texts - 1));
error++;
}
......@@ -459,10 +462,10 @@ check_misc_infos(Text_no tno,
- c->texts.first_local_no] != tno )
{
log("Text %lu: CC_Recipient %lu<%lu>: %s to %lu.\n",
(u_long)tno, (u_long)group.cc_recipient,
(u_long)group.local_no,
(unsigned long)tno, (unsigned long)group.cc_recipient,
(unsigned long)group.local_no,
"that local number is mapped",
(u_long)c->texts.texts[group.local_no
(unsigned long)c->texts.texts[group.local_no
- c->texts.first_local_no]);
error++;
}
......@@ -475,7 +478,7 @@ check_misc_infos(Text_no tno,
if ( t == NULL )
{
log("Text %lu is a comment to %lu, which doesn't exist.\n",
(u_long)tno, (u_long)group.comment_to);
(unsigned long)tno, (unsigned long)group.comment_to);
if (rflag || confirm("Repair by deleting misc_item? "))
{
......@@ -493,7 +496,7 @@ check_misc_infos(Text_no tno,
else if (!is_comment_to(tno, t))
{
log("Text %lu is a comment to %lu, but not the reverse.\n",
(u_long)tno, (u_long)group.comment_to);
(unsigned long)tno, (unsigned long)group.comment_to);
error++;
}
......@@ -505,7 +508,7 @@ check_misc_infos(Text_no tno,
if ( t == NULL )
{
log("Text %lu is commented in %lu, which doesn't exist.\n",
(u_long)tno, (u_long)group.commented_in);
(unsigned long)tno, (unsigned long)group.commented_in);
if (rflag || confirm("Repair by deleting misc_item? "))
{
......@@ -521,7 +524,7 @@ check_misc_infos(Text_no tno,
else if (!is_commented_in(tno, t))
{
log("Text %lu is a comment to %lu, but not the reverse.\n",
(u_long)tno, (u_long)group.commented_in);
(unsigned long)tno, (unsigned long)group.commented_in);
error++;
}
......@@ -533,7 +536,7 @@ check_misc_infos(Text_no tno,
if ( t == NULL )
{
log("Text %lu is a footnote to %lu, which doesn't exist.\n",
(u_long)tno, (u_long)group.footnote_to);
(unsigned long)tno, (unsigned long)group.footnote_to);
if (rflag || confirm("Repair by deleting misc_item? "))
{
......@@ -549,7 +552,7 @@ check_misc_infos(Text_no tno,
else if (!is_footnote_to(tno, t))
{
log("Text %lu is a footnote to %lu, but not the reverse.\n",
(u_long)tno, (u_long)group.footnote_to);
(unsigned long)tno, (unsigned long)group.footnote_to);
error++;
}
......@@ -561,7 +564,7 @@ check_misc_infos(Text_no tno,
if ( t == NULL )
{
log("Text %lu is footnoted in %lu, which doesn't exist.\n",
(u_long)tno, (u_long)group.footnoted_in);
(unsigned long)tno, (unsigned long)group.footnoted_in);
if (rflag || confirm("Repair by deleting misc_item? "))
{
......@@ -577,7 +580,7 @@ check_misc_infos(Text_no tno,
else if (!is_footnoted_in(tno, t))
{
log("Text %lu is a footnot to %lu, but not the reverse.\n",
(u_long)tno, (u_long)group.footnoted_in);
(unsigned long)tno, (unsigned long)group.footnoted_in);
error++;
}
......@@ -585,14 +588,14 @@ check_misc_infos(Text_no tno,
default:
log("check_misc_infos(): parse_next_misc returned type %lu\n",
(u_long)group.type);
(unsigned long)group.type);
break;
}
}
if ( group.type == m_error )
{
log("Text %lu has a bad misc_info_list.\n", (u_long)tno);
log("Text %lu has a bad misc_info_list.\n", (unsigned long)tno);
error++;
}
......@@ -609,8 +612,8 @@ check_texts(void)
Text_stat *ctp=NULL;
long errors = 0;
Text_no number_of_texts = 0;
u_long bytes=0;
u_long max_bytes=0;
unsigned long bytes=0;
unsigned long max_bytes=0;
Text_no max_text=0;
while ( (ct = traverse_text(ct)) != 0 )
......@@ -644,11 +647,11 @@ check_texts(void)
else
{
log("Total of %lu texts (total %lu bytes, avg. %lu bytes/text).\n",
(u_long)number_of_texts,
(u_long)bytes,
(u_long)(bytes/number_of_texts));
(unsigned long)number_of_texts,
(unsigned long)bytes,
(unsigned long)(bytes/number_of_texts));
log("Longest text is %lu (%lu bytes).\n",
(u_long)max_text, (u_long)max_bytes);
(unsigned long)max_text, (unsigned long)max_bytes);
}
}
......@@ -658,8 +661,8 @@ check_texts(void)
static Bool
adjust_text_list(Text_list *text_list)
{
u_long zeroes;
u_long i;
unsigned long zeroes;
unsigned long i;
for (zeroes = 0;
zeroes < text_list->no_of_texts && text_list->texts[ zeroes ] == 0;
......@@ -686,7 +689,7 @@ static int
check_created_texts(Pers_no pno,
Text_list *created)
{
u_long i;
unsigned long i;
Text_stat *t;
int error=0;
......@@ -698,15 +701,15 @@ check_created_texts(Pers_no pno,
if ( t != NULL && t->author != pno)
{
log("Person %lu is author of text %lu whose author is %lu.\n",
(u_long)pno, (u_long)created->texts[i],
(u_long)t->author);
(unsigned long)pno, (unsigned long)created->texts[i],
(unsigned long)t->author);
error++;
}
if ( t == NULL )
{
log("Person %lu is author of text %lu, which doesn't exist.\n",
(u_long)pno, (u_long)created->texts[i]);
(unsigned long)pno, (unsigned long)created->texts[i]);
if ( rflag ||
confirm("Repair by setting to text_no to 0 in local map"))
{
......@@ -724,7 +727,7 @@ check_created_texts(Pers_no pno,
if ( created->no_of_texts > 0 && created->texts[0] == 0 )
{
log("Person %lu has a bad created_texts array. Starts with a 0.\n",
(u_long)pno);
(unsigned long)pno);
if ( rflag || confirm ("Repair by adjusting created_texts"))
{
adjust_text_list(created);
......@@ -752,7 +755,7 @@ check_membership(Pers_no pno,
if ( conf == NULL )
{