aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-01-03 00:34:13 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-01-03 00:34:13 +0100
commita44358a8d1fafce871ded8085a732e36720a181f (patch)
tree13fbfedda613cf54b86819c8e0978b7df84314a7
parent21aff5e1740a154e8f96e3031a69d61b120e6322 (diff)
Obsolete and not used
-rw-r--r--FICS/build.mk1
-rw-r--r--FICS/channel.c101
-rw-r--r--FICS/channel.h40
3 files changed, 0 insertions, 142 deletions
diff --git a/FICS/build.mk b/FICS/build.mk
index 891542d..b87d430 100644
--- a/FICS/build.mk
+++ b/FICS/build.mk
@@ -6,7 +6,6 @@ SRC_DIR := FICS/
OBJS = $(SRC_DIR)adminproc.o\
$(SRC_DIR)algcheck.o\
$(SRC_DIR)board.o\
- $(SRC_DIR)channel.o\
$(SRC_DIR)command.o\
$(SRC_DIR)comproc.o\
$(SRC_DIR)eco.o\
diff --git a/FICS/channel.c b/FICS/channel.c
deleted file mode 100644
index 8ada4b9..0000000
--- a/FICS/channel.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* channel.c
- *
- */
-
-/* THIS SOURCE FILE IS NOW OBSOLETE - DAV */
-
-/*
- fics - An internet chess server.
- Copyright (C) 1993 Richard V. Nash
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-*/
-
-/* Revision history:
- name email yy/mm/dd Change
- Richard Nash 93/10/22 Created
-*/
-
-#include "stdinclude.h"
-
-#include "common.h"
-#include "channel.h"
-#include "network.h"
-#include "rmalloc.h"
-#include "playerdb.h"
-
-#if 0 /* ARGH!!! 256 * 256 * 4 = 256K! */
-/* old cheesy (as loon would put it :) ) code removed */
-PUBLIC int *channels[MAX_CHANNELS];
-PUBLIC int numOn[MAX_CHANNELS];
-
-PUBLIC void channel_init()
-{
- int i;
- for (i = 0; i < MAX_CHANNELS; i++) {
- channels[i] = rmalloc(max_connections * sizeof(int));
- numOn[i] = 0;
- }
-}
-
-PUBLIC int on_channel(int ch, int p)
-{
- int i;
-
- for (i = 0; i < numOn[ch]; i++)
- if (p == channels[ch][i])
- return 1;
- return 0;
-}
-
-PUBLIC int channel_remove(int ch, int p)
-{
- int i, found;
-
- found = -1;
- for (i = 0; i < numOn[ch] && found < 0; i++)
- if (p == channels[ch][i])
- found = i;
- if (found < 0)
- return 1;
- for (i = found; i < numOn[ch] - 1; i++)
- channels[ch][i] = channels[ch][i + 1];
- numOn[ch] = numOn[ch] - 1;
- --parray[p].nochannels;
- return 0;
-}
-
-PUBLIC int channel_add(int ch, int p)
-{
- if (numOn[ch] >= MAX_CHANNELS)
- return 1;
- if (on_channel(ch, p))
- return 2;
- if ((parray[p].nochannels == MAX_INCHANNELS) && (parray[p].adminLevel == 0)) {
- return 3;
- }
- channels[ch][numOn[ch]] = p;
- numOn[ch]++;
- parray[p].nochannels++;
- return 0;
-}
-
-/* this piece of replacement code appears in talkproc.c */
-PUBLIC int on_channel(int ch, int p)
-{
- char tmp[10]; /* 9 digits ought to be enough :) */
-
- sprintf (tmp,"%d",ch);
- return in_list(p, L_CHANNEL,ch ) /* since needs ch converted to a string keep
- hidden from view */
-}
-
-#endif
diff --git a/FICS/channel.h b/FICS/channel.h
deleted file mode 100644
index 9de4808..0000000
--- a/FICS/channel.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* channel.h
- *
- */
-
-/* THIS SOURCE FILE IS NOW OBSOLETE - DAV */
-
-/*
- fics - An internet chess server.
- Copyright (C) 1993 Richard V. Nash
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-*/
-
-/* Revision history:
- name email yy/mm/dd Change
- Richard Nash 93/10/22 Created
-*/
-
-#ifndef _CHANNEL_H
-#define _CHANNEL_H
-
-#define MAX_CHANNELS 256
-
-extern int *channels[MAX_CHANNELS];
-extern int numOn[MAX_CHANNELS];
-
-extern void channel_init(void);
-extern int on_channel(int, int);
-extern int channel_remove(int, int);
-extern int channel_add(int, int);
-
-#endif /* _CHANNEL_H */