Mercurial > noffle
view src/common.h @ 268:f049f8639dc0 noffle
[svn] * src/client.c: Fix old bug in readField() where the last field in a line
would not terminate the buffer properly if the line ended with \0. This
could in practice lead to rubbish in the Lines: field, with extra
numerals from the preceding Bytes: field being added.
author | bears |
---|---|
date | Tue, 08 Oct 2002 14:52:52 +0100 |
parents | 93d5d8b098da |
children | 21300895412f |
line wrap: on
line source
/* common.h Common declarations. $Id: common.h 382 2002-06-05 22:03:44Z mirkol $ */ #ifndef COMMON_H #define COMMON_H #if HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #define FALSE 0 #define TRUE !0 #define MAXCHAR 2048 /* limited sscanf() format string: */ #define MAXCHAR_FMT "%2048s" #ifdef DEBUG #include <assert.h> #define ASSERT( x ) \ if ( ! ( x ) ) \ Log_err( "ASSERTION FAILED: %s line %i", __FILE__, __LINE__ ); \ assert( x ) #else #define ASSERT( x ) #endif typedef int Bool; typedef char Str[ MAXCHAR ]; #endif