Commit 66c2b920 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Lint from gcc 2.0 removed.

parent 15b7e07b
#
# $Id: sun4os4-defs.make,v 1.12 1992/02/10 02:44:23 linus Exp $
# $Id: sun4os4-defs.make,v 1.13 1992/02/26 18:47:01 ceder Exp $
# Copyright (C) 1991 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
......@@ -22,7 +22,7 @@
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
# $Id: sun4os4-defs.make,v 1.12 1992/02/10 02:44:23 linus Exp $
# $Id: sun4os4-defs.make,v 1.13 1992/02/26 18:47:01 ceder Exp $
# This file is included by all Makefiles in the LysKOM hierarchy.
# It gives default values for all variables that is normally used.
# TOPDIR and SCRIPTDIR must be set before this file is included.
......@@ -33,7 +33,8 @@
SHELL=/bin/sh
AWK = gawk
SED = /usr/bin/sed
CC = gcc -ansi
#CC = gcc -ansi
CC = gcc2 -ansi
RM = /usr/gnu/bin/rm -vf
RANLIB = ranlib
TOUCHLIB = ranlib -t
......@@ -44,11 +45,14 @@ MKDIR=/bin/mkdir
INCLUDEDIR = /usr/local/include/lyskom
LIBDIR = /usr/local/lib/lyskom
ANSIDIR = $(INCLUDEDIR)/ansi
INCLUDES = -I$(ANSIDIR) -I$(INCLUDEDIR)
OPTIMIZE-FLAGS = -O
MISC-CFLAGS = -g -Wall
#ANSIDIR = $(INCLUDEDIR)/ansi
ANSIDIR=
#INCLUDES = -I$(ANSIDIR) -I$(INCLUDEDIR)
INCLUDES = -I$(INCLUDEDIR) -I/usr/gnu/lib/gcc/sun4-sunos4.1.1/2.0/proto-include
OPTIMIZE-FLAGS = -O3
#MISC-CFLAGS = -g -Wall
MISC-CFLAGS = -g -Wall -Wstrict-prototypes -Wmissing-prototypes
PIPE = -pipe
# -h flag makes NULL pointer references generate runtime errors
......
/*
* $Id: smalloc.h,v 0.2 1991/09/15 10:17:50 linus Exp $
* $Id: smalloc.h,v 0.3 1992/02/26 18:45:38 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -57,7 +57,7 @@ srealloc(void * ptr, size_t size); /* Never fails. It is legal to
* atomic call.
*/
void *
tmp_alloc(u_long size);
tmp_alloc(unsigned long size);
/*
* Free all core which is allocated with tmp_alloc(). This is called from
......
/*
* $Id: strerror.c,v 0.5 1991/09/15 10:19:51 linus Exp $
* $Id: strerror.c,v 0.6 1992/02/26 18:46:01 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -26,8 +26,9 @@
** strerror.c
*/
static char *rcsid = "$Id: strerror.c,v 0.5 1991/09/15 10:19:51 linus Exp $";
static char *rcsid = "$Id: strerror.c,v 0.6 1992/02/26 18:46:01 ceder Exp $";
#include <string.h>
#include <m-config.h>
#ifndef HAVE_STRERROR
......
/*
* $Id: kom-errno.c,v 0.3 1991/09/15 10:22:58 linus Exp $
* $Id: kom-errno.c,v 0.4 1992/02/26 18:46:19 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -30,7 +30,7 @@
*/
static char *rcsid = "$Id: kom-errno.c,v 0.3 1991/09/15 10:22:58 linus Exp $";
static char *rcsid = "$Id: kom-errno.c,v 0.4 1992/02/26 18:46:19 ceder Exp $";
#include <stdio.h>
......@@ -39,10 +39,10 @@ static char *rcsid = "$Id: kom-errno.c,v 0.3 1991/09/15 10:22:58 linus Exp $";
#include <kom-errno.h>
Kom_err kom_errno;
Kom_err kom_errno = 0;
/* Additional information about the error */
u_long err_stat;
u_long err_stat = 0;
/* Note that kom_errout is defined in config.h */
......
/*
* $Id: s-string.c,v 1.6 1991/09/15 10:25:27 linus Exp $
* $Id: s-string.c,v 1.7 1992/02/26 18:46:41 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -46,11 +46,12 @@
* even if so stated.
*/
static char *rcsid = "$Id: s-string.c,v 1.6 1991/09/15 10:25:27 linus Exp $";
static char *rcsid = "$Id: s-string.c,v 1.7 1992/02/26 18:46:41 ceder Exp $";
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <ctype.h>
#include <stdlib.h>
#include <assert.h>
......@@ -649,7 +650,7 @@ s_strip_trailing (String str,
*/
EXPORT String_size
s_strchr (const String str,
char ch,
unsigned char ch,
String_size start_pos)
{
......@@ -673,7 +674,7 @@ s_strchr (const String str,
*/
EXPORT String_size
s_strrchr (const String str,
char ch,
unsigned char ch,
String_size start_pos)
{
......
/*
* $Id: s-string.h,v 1.4 1991/09/15 10:25:23 linus Exp $
* $Id: s-string.h,v 1.5 1992/02/26 18:46:39 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: s-string.h,v 1.4 1991/09/15 10:25:23 linus Exp $
* $Id: s-string.h,v 1.5 1992/02/26 18:46:39 ceder Exp $
*
* s-string.h
* Our own string type. Definition of string type,
......@@ -354,7 +354,7 @@ s_strip_trailing (String str,
*/
extern String_size
s_strchr (const String str,
char ch,
unsigned char ch,
String_size start_pos);
......@@ -365,7 +365,7 @@ s_strchr (const String str,
*/
extern String_size
s_strrchr (const String str,
char ch,
unsigned char ch,
String_size start_pos);
......
/*
* $Id: zmalloc.c,v 1.2 1991/09/15 10:25:16 linus Exp $
* $Id: zmalloc.c,v 1.3 1992/02/26 18:46:38 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -48,11 +48,12 @@
*/
static char *rcsid = "$Id: zmalloc.c,v 1.2 1991/09/15 10:25:16 linus Exp $";
static char *rcsid = "$Id: zmalloc.c,v 1.3 1992/02/26 18:46:38 ceder Exp $";
#include <stddef.h>
#include <malloc.h>
#include <string.h>
#include <memory.h>
#include <compiler.h>
......
#
# $Id: Makefile,v 0.20 1992/01/05 18:21:54 ceder Exp $
# $Id: Makefile,v 0.21 1992/02/26 18:45:23 ceder Exp $
# Copyright (C) 1991 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
......@@ -22,7 +22,7 @@
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
# $Id: Makefile,v 0.20 1992/01/05 18:21:54 ceder Exp $
# $Id: Makefile,v 0.21 1992/02/26 18:45:23 ceder Exp $
include Topdir.make
SCRIPTDIR = $(TOPDIR)/scripts
......@@ -39,7 +39,7 @@ HDRS = admin.h isc-parse.h prot-a-output.h async.h isc-interface.h \
# See config/sun4os4-defs.make about LIBRESOLV if you are running SunOS 4.1.1.
LIBS = -lisc -lmisc -llyskom-server -lansi -lresolv
LIBS = -lold-isc -lmisc -llyskom-server -lansi -lresolv
TARGET = -DSERVER
......
/*
* $Id: conference.c,v 0.15 1991/12/16 23:56:38 ceder Exp $
* $Id: conference.c,v 0.16 1992/02/26 18:45:21 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.15 1991/12/16 23:56:38 ceder Exp $";
static char *rcsid = "$Id: conference.c,v 0.16 1992/02/26 18:45:21 ceder Exp $";
#include <time.h>
......@@ -49,6 +49,7 @@ static char *rcsid = "$Id: conference.c,v 0.15 1991/12/16 23:56:38 ceder Exp $";
#include <debug.h>
#include <parser.h>
#include "internal-connections.h"
#include "internal-services.h"
/* From ram-cache.h. This will go away when we use regexp-matching. This is
* only temporary. +++***
......
/*
* $Id: connections.c,v 0.11 1991/09/21 13:07:03 ceder Exp $
* $Id: connections.c,v 0.12 1992/02/26 18:45:19 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.11 1991/09/21 13:07:03 ceder Exp $";
static char *rcsid = "$Id: connections.c,v 0.12 1992/02/26 18:45:19 ceder Exp $";
#include <errno.h>
......@@ -40,6 +40,7 @@ static char *rcsid = "$Id: connections.c,v 0.11 1991/09/21 13:07:03 ceder Exp $"
#include <sys/stat.h>
#include <time.h>
#include <sys/time.h>
#include <string.h>
#include "s-string.h"
#include <kom-types.h>
......@@ -397,7 +398,7 @@ mux_handle_packet(Mux *mux)
BUG(("\n[Client %d from %.*s via MUX %s",
cp->session_no,
cp->hostname.len,
(int)cp->hostname.len,
cp->hostname.string,
mux->scb->info.tcp.hostname));
BUG((" is connecting]\n"));
......@@ -440,7 +441,7 @@ mux_handle_packet(Mux *mux)
cp = mcp->conn;
VBUG(("\n[Message client %d via MUX #%d]\n",
cp->session_no, mux->scb));
cp->session_no, (int)mux->scb));
parse_message(cp, mux->parse.string);
break;
......@@ -448,7 +449,7 @@ mux_handle_packet(Mux *mux)
default:
VBUG(("\nMUX Protocol error from MUX #%d]\n",
mux->scb));
(int)mux->scb));
isc_printf(mux->scb, "5\n");
isc_flush(mux->scb);
......@@ -457,7 +458,7 @@ mux_handle_packet(Mux *mux)
}
}
void
static void
mux_logout(Mux *mp)
{
int i;
......@@ -536,7 +537,7 @@ mux_parse_message(Mux *mp, String tmp_str)
BUG(("mux_parse_message(): mp->parse.unparsed = { len = %d, "
"string = %p }\n", mp->parse.unparsed.len,
mp->parse.unparsed.string));
(void *)mp->parse.unparsed.string));
if ( s_strcat(&mp->parse.unparsed, tmp_str) != OK )
restart_kom("mux_parse_message(): s_strcat\n");
......@@ -555,8 +556,8 @@ mux_parse_message(Mux *mp, String tmp_str)
* is data that has not yet been taken care of. Return TRUE
* if there was no data to take care of.
*/
Bool
parse_forgotten()
static Bool
parse_forgotten(void)
{
Bool flg = FALSE; /* Was there anything? */
Connection *ci;
......@@ -582,9 +583,8 @@ parse_forgotten()
/* Return 1 if the named file exists, 0 otherwise */
static int
fexists(char *filename)
fexists(const char *filename)
{
extern int stat(char *filename, struct stat *bufp);
struct stat buf;
int code;
......@@ -697,7 +697,7 @@ login_request(ISCECB *event)
event->session->udg = mux_create(MUX_TYPE_MUX, event->session);
BUG(("MUX #%d at %s connecting.\n",
event->session, event->session->info.tcp.hostname));
(int)event->session, event->session->info.tcp.hostname));
}
else
{
......@@ -728,7 +728,7 @@ logout_request(ISCECB *event)
if (event->session->udg->type == MUX_TYPE_MUX)
{
BUG(("\n[MUX #%d at %s", event->session,
BUG(("\n[MUX #%d at %s", (int)event->session,
event->session->info.tcp.hostname));
BUG((" is logging out]\n"));
......
/*
* $Id: connections.h,v 0.6 1991/11/10 19:02:39 linus Exp $
* $Id: connections.h,v 0.7 1992/02/26 18:45:18 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: connections.h,v 0.6 1991/11/10 19:02:39 linus Exp $
* $Id: connections.h,v 0.7 1992/02/26 18:45:18 ceder Exp $
*
* connections.h -- The top level of the communication packet.
*
......@@ -193,7 +193,7 @@ extern const Fnc_descriptor fnc_defs[];
extern u_long service_statistics[];
#ifdef _SETJMP_
#ifdef _JBLEN
extern jmp_buf parse_env;
#endif
......
/*
* $Id: dbck-cache.c,v 0.8 1991/09/23 18:15:15 ceder Exp $
* $Id: dbck-cache.c,v 0.9 1992/02/26 18:45:15 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.8 1991/09/23 18:15:15 ceder Exp $";
static char *rcsid = "$Id: dbck-cache.c,v 0.9 1992/02/26 18:45:15 ceder Exp $";
/*
......@@ -44,6 +44,8 @@ static char *rcsid = "$Id: dbck-cache.c,v 0.8 1991/09/23 18:15:15 ceder Exp $";
#include <string.h>
#include <stdlib.h>
#include <sys/file.h>
#include <unistd.h>
#include <errno.h>
#include <kom-errno.h>
#include <kom-types.h>
......@@ -60,6 +62,7 @@ static char *rcsid = "$Id: dbck-cache.c,v 0.8 1991/09/23 18:15:15 ceder Exp $";
#include "connections.h"
#include "send-async.h"
#include "memory.h"
#include "dbck-cache.h"
#ifdef TIME_SYNC
# include <sys/resource.h>
......@@ -376,7 +379,7 @@ cached_create_text( String message)
}
#endif
extern void
void
cached_flush_text(Text_no text_no,
String message)
{
......@@ -400,7 +403,6 @@ cached_flush_text(Text_no text_no,
fflush(new_text_file);
}
Text_no
traverse_text(Text_no seed)
{
......@@ -626,7 +628,7 @@ cache_sync(void)
#endif
}
extern void
void
cache_open_new_text_file(void)
{
if ( ( new_text_file = fopen(textfilename, "w")) == NULL )
......
/*
* $Id: dbck.c,v 0.8 1992/02/21 00:51:37 ceder Exp $
* $Id: dbck.c,v 0.9 1992/02/26 18:45:13 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,12 +28,13 @@
* Author: Per Cederqvist.
*/
static char *rcsid = "$Id: dbck.c,v 0.8 1992/02/21 00:51:37 ceder Exp $";
static char *rcsid = "$Id: dbck.c,v 0.9 1992/02/26 18:45:13 ceder Exp $";
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <kom-types.h>
#include <config.h>
......@@ -199,7 +200,7 @@ is_footnoted_in(Text_no parent,
return FALSE;
}
Member *
static Member *
locate_member(Pers_no pers_no,
Conference * conf_c)
{
......@@ -950,7 +951,7 @@ check_texts_in_conf(Conf_no cc,
return error;
}
Membership *
static Membership *
locate_membership(Conf_no conf_no,
Person * pers_p)
{
......@@ -1128,7 +1129,7 @@ init_data_base(void)
restart_kom("Can't find database.\n");
}
void
static void
garb_text_file(void)
{
Text_no tno = 0;
......@@ -1156,7 +1157,7 @@ garb_text_file(void)
void
static void
print_statistics(void)
{
Text_stat *ts;
......@@ -1166,6 +1167,12 @@ print_statistics(void)
hist = calloc(TEXT_LEN, sizeof(int));
if (hist == NULL)
{
perror("dbck: print_statistics(): can't calloc()");
return;
}
for (t=0; (t=traverse_text(t)) != 0;)
{
ts = cached_get_text_stat(t);
......@@ -1184,6 +1191,8 @@ print_statistics(void)
log("%8d %d\n", i, hist[i]);
}
/* Stop "no previous prototype" warning from gcc 2.0 */
int main(int, char**);
int
main (int argc,
......
/*
* $Id: disk-end-of-atomic.c,v 0.5 1991/09/15 10:32:22 linus Exp $
* $Id: disk-end-of-atomic.c,v 0.6 1992/02/26 18:45:11 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -36,7 +36,7 @@
* to forget old texts.
*/
static char *rcsid = "$Id: disk-end-of-atomic.c,v 0.5 1991/09/15 10:32:22 linus Exp $";
static char *rcsid = "$Id: disk-end-of-atomic.c,v 0.6 1992/02/26 18:45:11 ceder Exp $";
#include <kom-types.h>
......@@ -45,6 +45,7 @@ static char *rcsid = "$Id: disk-end-of-atomic.c,v 0.5 1991/09/15 10:32:22 linus
#include "config.h"
#include "disk-cache.h"
#include "cache.h"
#include "end-of-atomic.h"
long
end_of_atomic( Bool idle )
......
/*
* $Id: internal-services.h,v 0.3 1991/09/15 10:31:55 linus Exp $
* $Id: internal-services.h,v 0.4 1992/02/26 18:45:10 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: internal-services.h,v 0.3 1991/09/15 10:31:55 linus Exp $
* $Id: internal-services.h,v 0.4 1992/02/26 18:45:10 ceder Exp $
*
* server/services.h
*
......@@ -34,7 +34,7 @@
* en av{ndare kom p} att han inte ville ha texten kvar)
*
* Funktionerna i denna fil har kontrollerar inte att ACTPERS har r{tt att
* g|ra det som g|rs.
* g|ra det som g|rs. +++FIXME--translate to english
*/
......
/*
* $Id: manipulate.h,v 0.5 1991/12/16 23:56:36 ceder Exp $
* $Id: manipulate.h,v 0.6 1992/02/26 18:45:08 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: manipulate.h,v 0.5 1991/12/16 23:56:36 ceder Exp $
* $Id: manipulate.h,v 0.6 1992/02/26 18:45:08 ceder Exp $
*
* manipulate.h
*
......@@ -188,14 +188,6 @@ typedef enum {
* Functions which manipulate the CONFERENCE struct.
*/
extern Bool
legal_passwd(const String pwd);
extern Success
do_set_passwd( Password pwd,
const String new_pwd);
extern Success
chk_passwd( Password pwd,
const String s );
......@@ -222,30 +214,6 @@ is_supervisor(Conf_no conf,
/*
* Add text_no to the list of texts in a conference. Return the local number
* the text gets in this conference.
*/
extern Local_text_no
add_text_in_conf(Conference * conf_c,
Text_no text_no);
/*
* Set the global text_no of a certain local text_no if that local text_no
* exists in the conf. No action is taken if the local text_no doesn't exist.
* This function is probably only used to set the number to zero when a text
* is deleted.
*/
extern void
set_loc_no (Conference * conf_c,
Local_text_no loc_no,
Text_no text_no);
/*
* This function is called whenever a person leaves a conf,
* i e when he pepsi():s or logout():s.
......@@ -278,14 +246,6 @@ do_set_etc_motd(Conf_no conf_no,
/*
* Delete a conference. Delete all references to this conf.
*/
extern void
do_delete_conf (Conf_no conf_no,
Conference * conf_c); /* Not NULL */
/*
* Functions that manupulate the PERSON struct
......@@ -302,37 +262,6 @@ locate_membership(Conf_no conf_no,
/*
* Change user_area of a person. If text_no is 0, there will be
* no user_area.
*/
extern Success
do_set_user_area(Pers_no pers_no,
Person * pers_p,
Text_no text_no);
/*