pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:1:
/* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: operators.c,v 1.
241
2008/08/26
18
:
34
:
44
srb
Exp $
+
|| $Id: operators.c,v 1.
242
2008/08/26
20
:
33
:
14
nilsson
Exp $
*/ #include "global.h" #include <math.h> #include "interpret.h" #include "svalue.h" #include "multiset.h" #include "mapping.h" #include "array.h" #include "stralloc.h"
pike.git/src/operators.c:51:
/* These calculations should always give some margin based on the size. */ /* One extra char for the sign. */ #define MAX_INT_SPRINTF_LEN (1 + (SIZEOF_INT_TYPE * 5 + 1) / 2) #define MAX_FLOAT_PREC_LEN ((SIZEOF_FLOAT_TYPE * 5 + 1) / 2) /* Six extra chars: Mantissa sign, decimal point, zero before the * decimal point, the 'e', exponent sign, and an extra digit due * to the mantissa/exponent split. */ #define MAX_FLOAT_SPRINTF_LEN (6 + MAX_FLOAT_PREC_LEN)
-
#define MAX(a,b) ((a)>(b)?(a):(b))
-
+
/* Enough to hold a Pike float or int in textform including a trailing \0 */
-
#define MAX_NUM_BUF (
MAX
(MAX_INT_SPRINTF_LEN,MAX_FLOAT_SPRINTF_LEN)+1)
+
#define MAX_NUM_BUF (
MAXIMUM
(MAX_INT_SPRINTF_LEN,MAX_FLOAT_SPRINTF_LEN)+1)
void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) { #ifdef PIKE_SECURITY if(what->type <= MAX_COMPLEX) if(!CHECK_DATA_SECURITY(what->u.array, SECURITY_BIT_INDEX)) Pike_error("Index permission denied.\n"); #endif switch(what->type)