Commit 2799d7fc authored by Per Cederqvist's avatar Per Cederqvist
Browse files

POSIXized include files. (Still very ugly, though. More work is needed).

Replaced u_ with unsigned.
parent 772af3b5
/*
* $Id: s-string.c,v 1.10 1993/10/08 09:59:26 ceder Exp $
* $Id: s-string.c,v 1.11 1993/10/10 17:14:48 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -46,30 +46,32 @@
* even if so stated.
*/
static char *rcsid = "$Id: s-string.c,v 1.10 1993/10/08 09:59:26 ceder Exp $";
static char *rcsid = "$Id: s-string.c,v 1.11 1993/10/10 17:14:48 ceder Exp $";
/*not needed!#include <sys/types.h>*/
#include <sys/types.h>
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
#if STDC_HEADERS || HAVE_STRING_H
#include <string.h>
#if !STDC_HEADERS && HAVE_MEMORY_H
#include <memory.h>
#endif
#define index strchr
#define rindex strrchr
#define bcopy(s, d, n) memcpy ((d), (s), (n))
#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
#define bzero(s, n) memset ((s), 0, (n))
# include <string.h>
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
/*unused!# define index strchr*/
/*unused!# define rindex strrchr*/
/*wrong direction!# define bcopy(s, d, n) memcpy ((d), (s), (n))*/
/*unused!# define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))*/
/*unused!# define bzero(s, n) memset ((s), 0, (n))*/
#else /* not STDC_HEADERS and not HAVE_STRING_H */
#include <strings.h>
/* memory.h and strings.h conflict on some systems. */
# include <strings.h>
/* memory.h and strings.h conflict on some systems. */
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
#include <ctype.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <assert.h>
/*not needed!#ifdef HAVE_STDLIB_H*/
/*not needed!# include <stdlib.h>*/
/*not needed!#endif*/
#include "misc-types.h"
#include "s-collat-tabs.h"
......@@ -473,7 +475,7 @@ s_strcmp (String str1,
String str2)
{
u_int index;
unsigned int index;
String_size shortest; /* Length of the shortest string */
int retval_based_on_lengths;
......@@ -516,7 +518,7 @@ s_strcmp (String str1,
*
* NOTE: This code might need to be modified for some architectures.
*/
#define POS_INDEX(index) ((u_char)(index))
#define POS_INDEX(index) ((unsigned char)(index))
/*
* Compares two strings with user specified collation order.
......@@ -529,7 +531,7 @@ s_usr_strcmp (String str1,
char * collat_tab)
{
u_int index;
unsigned int index;
String_size shortest; /* Length of the shortest string */
int retval_based_on_lengths;
......
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