Commit 2d3aa63f authored by Per Cederqvist's avatar Per Cederqvist
Browse files

vcc blues.

parent 209775b6
/*
* $Id: s-string.c,v 1.13 1993/10/12 23:57:21 ceder Exp $
* $Id: s-string.c,v 1.14 1993/10/16 17:25:48 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -46,15 +46,16 @@
* even if so stated.
*/
static char *rcsid = "$Id: s-string.c,v 1.13 1993/10/12 23:57:21 ceder Exp $";
/*not needed!#include <sys/types.h>*/
static char *rcsid = "$Id: s-string.c,v 1.14 1993/10/16 17:25:48 ceder Exp $";
#include <sys/types.h>
#include <stdio.h>
#include <ctype.h>
#include <assert.h>
#include <limits.h>
#include <stddef.h>
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif
#if STDC_HEADERS || HAVE_STRING_H
# include <string.h>
# if !STDC_HEADERS && HAVE_MEMORY_H
......@@ -103,9 +104,9 @@ static realloc_function x_realloc = NULL;
: (*x_realloc) ((ptr), size))
/* Free storage. Works even if PTR is a nil pointer. */
#define FREE_0(ptr) (((ptr) == NULL) \
? ((void) 0) \
: (*x_free) (ptr))
#define FREE_0(ptr) (((ptr) == NULL) \
? 0 \
: ((*x_free) (ptr), ptr))
#define MALLOC_0(size) ((*x_malloc) (size))
......@@ -452,7 +453,7 @@ sign (int arg)
else if (arg == 0)
return 0;
else
return +1;
return 1;
}
......@@ -798,7 +799,8 @@ s_strtok (const String source,
/* Check of parameters - we might save some time on this */
if ( (*start_pos >= s_strlen(source))
|| s_empty(separators) || s_empty(source) )
|| ((s_empty(separators) == TRUE)
|| (s_empty(source) == TRUE)) )
{
return EMPTY_STRING;
}
......@@ -898,7 +900,7 @@ s_strtol (const String str,
/* Find any sign character (+ or -) */
if (str.string[char_no] == '+')
{
sign = +1;
sign = 1;
char_no++;
}
else if (str.string[char_no] == '-')
......
/*
* $Id: s-string.h,v 1.7 1993/10/12 16:22:41 ceder Exp $
* $Id: s-string.h,v 1.8 1993/10/16 17:24:00 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: s-string.h,v 1.7 1993/10/12 16:22:41 ceder Exp $
* $Id: s-string.h,v 1.8 1993/10/16 17:24:00 ceder Exp $
*
* s-string.h
* Our own string type. Definition of string type,
......@@ -102,7 +102,7 @@ typedef struct {
/* This is the representation of the empty String */
#define EMPTY_STRING_i ((String) { 0, NULL })
#define EMPTY_STRING_i { 0, NULL }
extern const String EMPTY_STRING;
......
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