Commit 9a8953cb authored by Per Cederqvist's avatar Per Cederqvist
Browse files

POSIXized include files.

Replaced u_ with unsigned.
parent cc73812a
/*
* $Id: prot-a-send-async.c,v 0.6 1993/01/16 23:17:36 ceder Exp $
* $Id: prot-a-send-async.c,v 0.7 1993/10/10 16:51:54 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -26,31 +26,29 @@
* Asynchronous messages in protocol A.
*/
static char *rcsid = "$Id: prot-a-send-async.c,v 0.6 1993/01/16 23:17:36 ceder Exp $";
static char *rcsid = "$Id: prot-a-send-async.c,v 0.7 1993/10/10 16:51:54 ceder Exp $";
#include "rcs.h"
USE(rcsid);
#include <setjmp.h>
#include <stdio.h>
#include "lyskomd.h"
#include <kom-types.h>
#include <services.h>
#include "async.h"
#include "misc-types.h"
#include "kom-types.h"
#include "com.h"
#include "connections.h"
#include "prot-a-send-async.h"
#include "prot-a-output.h"
#include "manipulate.h"
#include "log.h"
#include "async.h"
#include "isc-interface.h"
#include "mux.h"
#include "prot-a-output.h"
static void
async_header(Connection *fp,
int no_of_tokens,
Async fnc)
{
mux_printf(fp, ":%lu %lu", (u_long)no_of_tokens, (u_long)fnc);
mux_printf(fp, ":%lu %lu", (unsigned long)no_of_tokens,
(unsigned long)fnc);
}
......@@ -101,7 +99,8 @@ prot_a_async_logout(Connection *cptr,
Session_no session_no)
{
async_header(cptr, 2, ay_logout);
mux_printf(cptr, " %lu %lu", (u_long)pers_no, (u_long)session_no);
mux_printf(cptr, " %lu %lu", (unsigned long)pers_no,
(unsigned long)session_no);
async_trailer(cptr);
}
......@@ -112,7 +111,7 @@ prot_a_async_new_name(Connection *cptr,
String new_name)
{
async_header(cptr, 3, ay_new_name);
mux_printf(cptr, " %lu", (u_long)conf_no);
mux_printf(cptr, " %lu", (unsigned long)conf_no);
prot_a_output_string(cptr, old_name);
prot_a_output_string(cptr, new_name);
async_trailer(cptr);
......@@ -130,7 +129,7 @@ prot_a_async_forced_leave_conf(Connection *cptr,
Conf_no conf_no)
{
async_header(cptr, 1, ay_leave_conf);
mux_printf(cptr, " %lu", (u_long)conf_no);
mux_printf(cptr, " %lu", (unsigned long)conf_no);
async_trailer(cptr);
}
......@@ -140,7 +139,8 @@ prot_a_async_login(Connection *cptr,
int session_no)
{
async_header(cptr, 2, ay_login);
mux_printf(cptr, " %lu %lu", (u_long)pers_no, (u_long)session_no);
mux_printf(cptr, " %lu %lu", (unsigned long)pers_no,
(unsigned long)session_no);
async_trailer(cptr);
}
......@@ -153,7 +153,7 @@ prot_a_async_broadcast(Connection *cptr,
prot_a_async_send_message(cptr, 0, pers_no, message);
#if 0
async_header(cptr, 2, ay_broadcast);
mux_printf(cptr, " %lu", (u_long)pers_no);
mux_printf(cptr, " %lu", (unsigned long)pers_no);
prot_a_output_string(cptr, message);
async_trailer(cptr);
#endif
......@@ -173,7 +173,8 @@ prot_a_async_send_message(Connection *cptr,
String message)
{
async_header(cptr, 3, ay_send_message);
mux_printf(cptr, " %lu %lu", (u_long)recipient, (u_long)sender);
mux_printf(cptr, " %lu %lu", (unsigned long)recipient,
(unsigned long)sender);
prot_a_output_string(cptr, message);
async_trailer(cptr);
}
/*
* $Id: ram-smalloc.c,v 0.11 1993/01/17 03:02:35 ceder Exp $
* $Id: ram-smalloc.c,v 0.12 1993/10/10 16:55:20 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -37,20 +37,17 @@
*/
/* #define DEBUG_MALLOC */
static char *rcsid = "$Id: ram-smalloc.c,v 0.11 1993/01/17 03:02:35 ceder Exp $";
static char *rcsid = "$Id: ram-smalloc.c,v 0.12 1993/10/10 16:55:20 ceder Exp $";
#include "rcs.h"
USE(rcsid);
#include <stdio.h>
#include <stdarg.h>
#include <sys/types.h>
#include <malloc.h>
#include <stdlib.h>
#include <server/smalloc.h>
#include "lyskomd.h"
#include "log.h"
#include <stdio.h>
#include "exp.h"
#include "kom-types.h"
#include "lyskomd.h"
#include "server/smalloc.h"
static int no_of_allocated_blocks = 0;
......@@ -75,7 +72,7 @@ smalloc(size_t size)
p = (unsigned int *) malloc(size + 2*sizeof(unsigned int) + 2);
if (p == NULL)
restart_kom("Can't allocate %lu bytes.\n", (u_long)size);
restart_kom("Can't allocate %lu bytes.\n", (unsigned long)size);
++no_of_allocated_blocks;
......@@ -208,7 +205,7 @@ static int tmp_alloc_table_size = 0; /* Size */
static int tmp_alloc_table_use = 0; /* Used size */
EXPORT void *
tmp_alloc(u_long size)
tmp_alloc(unsigned long size)
{
if ( tmp_alloc_table_size <= tmp_alloc_table_use )
{
......
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