1/* BEGIN LICENSE BLOCK 2 * Version: CMPL 1.1 3 * 4 * The contents of this file are subject to the Cisco-style Mozilla Public 5 * License Version 1.1 (the "License"); you may not use this file except 6 * in compliance with the License. You may obtain a copy of the License 7 * at www.eclipse-clp.org/license. 8 * 9 * Software distributed under the License is distributed on an "AS IS" 10 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 11 * the License for the specific language governing rights and limitations 12 * under the License. 13 * 14 * The Original Code is The ECLiPSe Constraint Logic Programming System. 15 * The Initial Developer of the Original Code is Cisco Systems, Inc. 16 * Portions created by the Initial Developer are 17 * Copyright (C) 1997-2006 Cisco Systems, Inc. All Rights Reserved. 18 * 19 * Contributor(s): 20 * 21 * END LICENSE BLOCK */ 22 23/* 24 * ECLiPSe LIBRARY MODULE 25 * 26 * $Id: dummy_bigrat.c,v 1.2 2009/07/16 09:11:24 jschimpf Exp $ 27 * 28 * 29 * IDENTIFICATION: dummy_bigrat.c 30 * 31 * AUTHOR: Joachim Schimpf 32 * AUTHOR: Stefano Novello 33 * 34 * CONTENTS: name/arity 35 * 36 * DESCRIPTION: 37 * dummy to make it work without GNU gmp library 38 */ 39 40#include "config.h" 41#include "sepia.h" 42#include "types.h" 43#include "error.h" 44 45void 46bigrat_init(void) 47{ 48} 49 50extern int 51ec_double_to_int_or_bignum(double f, pword *pres) 52{ 53 if (MIN_S_WORD_DBL <= (f) && (f) < MAX_S_WORD_1_DBL) 54 { 55 pres->val.nint = (long) (f); 56 pres->tag.kernel = TINT; 57 } 58 else 59 { 60 Bip_Error(ARITH_EXCEPTION); 61 } 62 63 Succeed_; 64} 65 66extern int 67ec_array_to_big(const void *p, int count, int order, int size, int endian, unsigned nails, pword *result) 68{ 69 Bip_Error(ARITH_EXCEPTION); 70} 71 72extern int 73ec_big_to_chunks(pword *pw1, uword chunksize, pword *result) 74{ 75 Bip_Error(ARITH_EXCEPTION); 76} 77