source: git/MP/MP/MP_BigNum.c @ 1d0eb7

fieker-DuValspielwiese
Last change on this file since 1d0eb7 was 678cfd, checked in by Olaf Bachmann <obachman@…>, 27 years ago
This commit was generated by cvs2svn to compensate for changes in r337, which included commits to RCS files with non-trunk default branches. git-svn-id: file:///usr/local/Singular/svn/trunk@338 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.1 KB
Line 
1/****************************************************************
2 *                                                                 
3 * FILE:     MP_BigNum.c
4 * Purpose:  Dummy definition of the default BigNum routines
5 *
6 *  Change Log:
7 *      2/97 obachman Life begins for this file.
8 *
9 ***************************************************************/
10
11#include "MP.h"
12
13MP_BigIntOps_t imp_dummy_bigint_ops =
14{
15  IMP_PutDummyBigInt,
16  IMP_GetDummyBigInt,
17  IMP_DummyBigIntToStr,
18  IMP_DummyBigIntAsciiSize
19};
20
21#if MP_DEFAULT_APINT_FORMAT == MP_DUMMY
22MP_BigIntOps_t imp_default_bigint_ops =
23{
24  IMP_PutDummyBigInt,
25  IMP_GetDummyBigInt,
26  IMP_DummyBigIntToStr,
27  IMP_DummyBigIntAsciiSize
28};
29
30MP_BigNumFormat_t imp_default_bigint_format = MP_DUMMY;
31#endif
32
33MP_BigRealOps_t imp_dummy_bigreal_ops =
34{
35  IMP_PutDummyBigReal,
36  IMP_GetDummyBigReal,
37  IMP_DummyBigRealToStr,
38  IMP_DummyBigRealAsciiSize
39};
40
41#if MP_DEFAULT_APREAL_FORMAT == MP_DUMMY
42MP_BigRealOps_t imp_default_bigreal_ops =
43{
44  IMP_PutDummyBigReal,
45  IMP_GetDummyBigReal,
46  IMP_DummyBigRealToStr,
47  IMP_DummyBigRealAsciiSize
48};
49MP_BigNumFormat_t imp_default_bigreal_format = MP_DUMMY;
50#endif
51
52MP_Status_t IMP_PutDummyBigInt(MP_Link_pt link, MP_ApInt_t dummy)
53{
54  return MP_SetError(link, MP_DummyBigNum);
55}
56
57MP_Status_t IMP_GetDummyBigInt(MP_Link_pt link, MP_ApInt_t *dummy)
58{
59  return MP_SetError(link, MP_DummyBigNum);
60}
61
62#define DUMMY_BIGNUM_STR "MP_DummyBigNum"
63char* IMP_DummyBigIntToStr(MP_ApInt_t dummy, char *buf)
64{
65  strcpy(buf, DUMMY_BIGNUM_STR);
66  return buf;
67}
68
69long IMP_DummyBigIntAsciiSize(MP_ApInt_t dummy)
70{
71  return strlen(DUMMY_BIGNUM_STR) + 1;
72}
73
74MP_Status_t IMP_PutDummyBigReal(MP_Link_pt link, MP_ApReal_t dummy)
75{
76  return MP_SetError(link, MP_DummyBigNum);
77}
78
79MP_Status_t IMP_GetDummyBigReal(MP_Link_pt link, MP_ApReal_t *dummy)
80{
81  return MP_SetError(link, MP_DummyBigNum);
82}
83
84#define DUMMY_BIGNUM_STR "MP_DummyBigNum"
85char* IMP_DummyBigRealToStr(MP_ApReal_t dummy, char *buf)
86{
87  strcpy(buf, "MP_DummyBigNum");
88  return buf;
89}
90
91long IMP_DummyBigRealAsciiSize(MP_ApReal_t dummy)
92{
93  return strlen(DUMMY_BIGNUM_STR) + 1;
94}
95
Note: See TracBrowser for help on using the repository browser.