Commit 88867200 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Changed u_ to unsigned.

Include <sys/types.h>.
parent 20bd48b9
/*
* $Id: ram-output.c,v 0.8 1993/10/14 09:11:22 ceder Exp $
* $Id: ram-output.c,v 0.9 1993/10/14 22:38:05 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -33,7 +33,7 @@
* (It worked - now saving is twice as fast.)
*/
static char *rcsid = "$Id: ram-output.c,v 0.8 1993/10/14 09:11:22 ceder Exp $";
static char *rcsid = "$Id: ram-output.c,v 0.9 1993/10/14 22:38:05 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -42,6 +42,7 @@ USE(rcsid);
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <sys/types.h>
#include "kom-types.h"
#include "ram-output.h"
......@@ -63,17 +64,17 @@ foutput_person (FILE *fp,
foutput_time(fp, person->last_login);
fprintf (fp, " %lu %lu %lu %lu %lu %lu %lu %lu %lu",
(u_long) person -> user_area,
(u_long) person -> total_time_present, /* This is not a time,
(unsigned long) person -> user_area,
(unsigned long) person -> total_time_present, /* This is not a time,
* but a number of seconds.
*/
(u_long) person -> sessions,
(u_long) person -> created_lines,
(u_long) person -> created_bytes,
(u_long) person -> read_texts,
(u_long) person -> no_of_text_fetches,
(u_long) person -> created_persons,
(u_long) person -> created_confs);
(unsigned long) person -> sessions,
(unsigned long) person -> created_lines,
(unsigned long) person -> created_bytes,
(unsigned long) person -> read_texts,
(unsigned long) person -> no_of_text_fetches,
(unsigned long) person -> created_persons,
(unsigned long) person -> created_confs);
}
......@@ -91,13 +92,13 @@ foutput_conference (FILE *fp,
foutput_time(fp, conf_c -> last_written );
fprintf (fp, " %lu %lu %lu %lu %lu %lu %lu",
(u_long) conf_c -> creator,
(u_long) conf_c -> presentation,
(u_long) conf_c -> supervisor,
(u_long) conf_c -> permitted_submitters,
(u_long) conf_c -> super_conf,
(u_long) conf_c -> msg_of_day,
(u_long) conf_c -> nice);
(unsigned long) conf_c -> creator,
(unsigned long) conf_c -> presentation,
(unsigned long) conf_c -> supervisor,
(unsigned long) conf_c -> permitted_submitters,
(unsigned long) conf_c -> super_conf,
(unsigned long) conf_c -> msg_of_day,
(unsigned long) conf_c -> nice);
}
......@@ -109,12 +110,12 @@ foutput_text_stat(FILE *fp,
foutput_time(fp, t_stat->creation_time);
foutput_ulong((u_long) t_stat->author, fp);
foutput_ulong((u_long) t_stat->file_pos, fp);
foutput_ulong((u_long) t_stat->no_of_lines, fp);
foutput_ulong((u_long) t_stat->no_of_chars, fp);
foutput_ulong((u_long) t_stat->no_of_marks, fp);
foutput_ulong((u_long) t_stat->no_of_misc, fp);
foutput_ulong((unsigned long) t_stat->author, fp);
foutput_ulong((unsigned long) t_stat->file_pos, fp);
foutput_ulong((unsigned long) t_stat->no_of_lines, fp);
foutput_ulong((unsigned long) t_stat->no_of_chars, fp);
foutput_ulong((unsigned long) t_stat->no_of_marks, fp);
foutput_ulong((unsigned long) t_stat->no_of_misc, fp);
if ( t_stat->misc_items != NULL && t_stat->no_of_misc > 0 )
{
......@@ -132,7 +133,7 @@ extern void
foutput_string(FILE *fp,
String str)
{
foutput_ulong((u_long)str.len, fp);
foutput_ulong((unsigned long)str.len, fp);
putc('H', fp);
if (str.len)
......@@ -184,14 +185,14 @@ foutput_text_list(FILE *fp,
{
int i;
foutput_ulong((u_long)text_list.first_local_no, fp);
foutput_ulong((u_long)text_list.no_of_texts, fp);
foutput_ulong((unsigned long)text_list.first_local_no, fp);
foutput_ulong((unsigned long)text_list.no_of_texts, fp);
if ( text_list.texts != NULL && text_list.no_of_texts > 0 )
{
fputs(" {", fp);
for ( i = 0; i < text_list.no_of_texts; i++ )
foutput_ulong((u_long)text_list.texts[ i ], fp);
foutput_ulong((unsigned long)text_list.texts[ i ], fp);
fputs(" }", fp);
}
else
......@@ -205,7 +206,7 @@ foutput_mark_list(FILE *fp,
{
int i;
fprintf(fp, " %lu", (u_long)mark_list.no_of_marks);
fprintf(fp, " %lu", (unsigned long)mark_list.no_of_marks);
if ( mark_list.marks != NULL && mark_list.no_of_marks > 0 )
{
......@@ -224,7 +225,7 @@ extern void
foutput_mark(FILE *fp,
Mark mark)
{
fprintf(fp, " %lu %lu", (u_long)mark.text_no, (u_long)mark.mark_type);
fprintf(fp, " %lu %lu", (unsigned long)mark.text_no, (unsigned long)mark.mark_type);
}
void
......@@ -233,7 +234,7 @@ foutput_membership_list (FILE * fp,
{
int i;
fprintf(fp, " %lu", (u_long)mlist.no_of_confs);
fprintf(fp, " %lu", (unsigned long)mlist.no_of_confs);
if ( mlist.confs != NULL && mlist.no_of_confs > 0 )
{
......@@ -265,16 +266,16 @@ foutput_membership(FILE *fp,
}
fprintf(fp, " %lu %lu %lu %lu",
(u_long)mship->conf_no,
(u_long)mship->priority,
(u_long)mship->last_text_read,
(u_long)mship->no_of_read);
(unsigned long)mship->conf_no,
(unsigned long)mship->priority,
(unsigned long)mship->last_text_read,
(unsigned long)mship->no_of_read);
if ( mship->read_texts != NULL && mship->no_of_read > 0)
{
fprintf(fp, " {");
for ( i = 0; i < mship->no_of_read; i++)
fprintf(fp, " %lu", (u_long)mship->read_texts[ i ]);
fprintf(fp, " %lu", (unsigned long)mship->read_texts[ i ]);
fprintf(fp, " }");
}
......@@ -286,7 +287,7 @@ void
foutput_time(FILE *fp,
time_t clock)
{
foutput_ulong((u_long) clock, fp);
foutput_ulong((unsigned long) clock, fp);
}
......@@ -296,7 +297,7 @@ foutput_member_list(FILE *fp,
{
int i;
fprintf(fp, " %lu", (u_long)m_list.no_of_members);
fprintf(fp, " %lu", (unsigned long)m_list.no_of_members);
if ( m_list.members != NULL && m_list.no_of_members > 0 )
{
fprintf(fp, " {");
......@@ -313,7 +314,7 @@ void
foutput_member(FILE *fp,
Member member)
{
fprintf(fp, " %lu", (u_long)member.member);
fprintf(fp, " %lu", (unsigned long)member.member);
}
extern void
......@@ -332,20 +333,20 @@ extern void
foutput_misc_info(FILE *fp,
Misc_info misc)
{
foutput_ulong((u_long)misc.type, fp);
foutput_ulong((unsigned long)misc.type, fp);
switch(misc.type)
{
case recpt:
foutput_ulong((u_long)misc.datum.recipient, fp);
foutput_ulong((unsigned long)misc.datum.recipient, fp);
break;
case cc_recpt:
foutput_ulong((u_long)misc.datum.cc_recipient, fp);
foutput_ulong((unsigned long)misc.datum.cc_recipient, fp);
break;
case loc_no:
foutput_ulong((u_long)misc.datum.local_no, fp);
foutput_ulong((unsigned long)misc.datum.local_no, fp);
break;
case rec_time:
......@@ -353,23 +354,23 @@ foutput_misc_info(FILE *fp,
break;
case comm_to:
foutput_ulong((u_long)misc.datum.comment_to, fp);
foutput_ulong((unsigned long)misc.datum.comment_to, fp);
break;
case comm_in:
foutput_ulong((u_long)misc.datum.commented_in, fp);
foutput_ulong((unsigned long)misc.datum.commented_in, fp);
break;
case footn_to:
foutput_ulong((u_long)misc.datum.footnote_to, fp);
foutput_ulong((unsigned long)misc.datum.footnote_to, fp);
break;
case footn_in:
foutput_ulong((u_long)misc.datum.footnoted_in, fp);
foutput_ulong((unsigned long)misc.datum.footnoted_in, fp);
break;
case sent_by:
foutput_ulong((u_long)misc.datum.sender, fp);
foutput_ulong((unsigned long)misc.datum.sender, fp);
break;
case sent_at:
......@@ -390,7 +391,7 @@ foutput_misc_info(FILE *fp,
*/
void
foutput_ulong (u_long l,
foutput_ulong (unsigned long l,
FILE *fp)
{
static char buf[20];
......
/*
* $Id: ram-parse.c,v 0.13 1993/10/14 09:11:27 ceder Exp $
* $Id: ram-parse.c,v 0.14 1993/10/14 22:39:15 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -29,7 +29,7 @@
* ram-parse.c -- parse objects from disk file.
*/
static char *rcsid = "$Id: ram-parse.c,v 0.13 1993/10/14 09:11:27 ceder Exp $";
static char *rcsid = "$Id: ram-parse.c,v 0.14 1993/10/14 22:39:15 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -42,6 +42,7 @@ USE(rcsid);
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#endif
#include <sys/types.h>
#include "kom-types.h"
#include "ram-parse.h"
......@@ -70,10 +71,10 @@ fskipwhite(FILE *fp)
ungetc(c, fp);
}
extern u_long
extern unsigned long
fparse_long(FILE *fp)
{
u_long res = 0;
unsigned long res = 0;
int foo = 0;
int c;
......@@ -395,7 +396,7 @@ fparse_membership_list(FILE *fp,
}
log("fparse_membership_list(): empty list with %lu "
"elements (corrected).\n",
(u_long)result->no_of_confs);
(unsigned long)result->no_of_confs);
result->no_of_confs = 0;
break;
......
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