summaryrefslogtreecommitdiffstats
path: root/libexec/talkd/table.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-12-02 12:33:42 +0000
committercharnier <charnier@FreeBSD.org>1997-12-02 12:33:42 +0000
commitfa82bf4e17d3b6422eb922374e04631e08af93ef (patch)
treed8fbf4e76f4e5702304fae984a216af199dbb0db /libexec/talkd/table.c
parenta3ea3db57512d9269c135a0609481f2ac6cae39d (diff)
downloadFreeBSD-src-fa82bf4e17d3b6422eb922374e04631e08af93ef.zip
FreeBSD-src-fa82bf4e17d3b6422eb922374e04631e08af93ef.tar.gz
Use err(3). Add protos for -Wall.
Diffstat (limited to 'libexec/talkd/table.c')
-rw-r--r--libexec/talkd/table.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c
index a31c611..f1bcc22 100644
--- a/libexec/talkd/table.c
+++ b/libexec/talkd/table.c
@@ -29,12 +29,14 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $Id$
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/4/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
/*
@@ -49,11 +51,11 @@ static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/4/93";
#include <sys/time.h>
#include <sys/socket.h>
#include <protocols/talkd.h>
-#include <syslog.h>
-#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <syslog.h>
+#include <unistd.h>
#define MAX_ID 16000 /* << 2^15 so I don't have sign troubles */
@@ -73,8 +75,12 @@ struct table_entry {
};
TABLE_ENTRY *table = NIL;
+
+void delete __P((TABLE_ENTRY *));
CTL_MSG *find_request();
CTL_MSG *find_match();
+int new_id __P((void));
+void print_request __P((char *, CTL_MSG *));
/*
* Look in the table for an invitation that matches the current
@@ -152,6 +158,7 @@ find_request(request)
return ((CTL_MSG *)0);
}
+void
insert_table(request, response)
CTL_MSG *request;
CTL_RESPONSE *response;
@@ -181,6 +188,7 @@ insert_table(request, response)
/*
* Generate a unique non-zero sequence number
*/
+int
new_id()
{
static int current_id = 0;
@@ -195,6 +203,7 @@ new_id()
/*
* Delete the invitation with id 'id_num'
*/
+int
delete_invite(id_num)
int id_num;
{
@@ -219,6 +228,7 @@ delete_invite(id_num)
/*
* Classic delete from a double-linked list
*/
+void
delete(ptr)
register TABLE_ENTRY *ptr;
{
OpenPOWER on IntegriCloud