Commit 88867200 authored by Per Cederqvist's avatar Per Cederqvist

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