pike.git / src / post_modules / CritBit / floattree.cmod

version» Context lines:

pike.git/src/post_modules/CritBit/floattree.cmod:1: + /* -*- c -*- + || 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. + */ +    /* vim:syntax=c    */   #include "common.h"      #include "critbit/float2svalue.h"   #define CB_PRINT_KEY(buf, key) \    do { string_builder_sprintf((buf), "%f",\    cb_decode_float((key).str)); } while(0)   #include "tree_high.c"   
pike.git/src/post_modules/CritBit/floattree.cmod:27:   #cmod_define reverse_ordered_keys 99.9, 80.4 and 14.2   #cmod_define sample_value ({ 4, 5, 6 })   #cmod_define extra_doc      #define CB_LOW_ASSIGN_SVALUE_KEY(key, s) do { \    struct svalue * __ = (s); \    SET_SVAL(*__, PIKE_T_FLOAT, 0, float_number, cb_decode_float((key).str)); \   } while(0)   #define CB_PUSH_KEY(key) push_float(cb_decode_float((key).str));    - static INLINE cb_string CB_STRING_FROM_SVALUE(const struct svalue * v) { -  cb_float f; + static inline cb_string CB_STRING_FROM_SVALUE(const struct svalue * v) { +  FLOAT_TYPE f;       if (TYPEOF(*v) == PIKE_T_INT) { -  f.f = (FLOAT_TYPE)v->u.integer; +  f = (FLOAT_TYPE)v->u.integer;    } else { -  f.f = v->u.float_number; +  f = v->u.float_number;    }       return cb_encode_float(f);   }   #define CB_LOW_KEY_FROM_SVALUE(x) CB_KEY_FROM_STRING(CB_STRING_FROM_SVALUE(x))      #cmod_include "redefine.H"      #cmod_include "tree_header.H"   #cmod_include "iterator_source.H"