File: dimath.c

package info (click to toggle)
di 6.2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 896 kB
  • sloc: ansic: 9,364; sh: 5,211; perl: 1,749; awk: 463; makefile: 398
file content (38 lines) | stat: -rw-r--r-- 586 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Copyright 2025-2026 Brad Lanam Pleasant Hill CA */

/* This file exists to hold any extra variables that the MP */
/* routines may need */

#include "config.h"

#if _hdr_stdio
# include <stdio.h>
#endif
#if _use_math == DI_MPDECIMAL
# include <mpdecimal.h>
#endif

#include "dimath.h"

#if _use_math == DI_MPDECIMAL
mpd_context_t  mpdctx;
#endif

int   dimathinitialized = 0;

void
dimath_initialize (void)
{
  if (dimathinitialized == 0) {
#if _use_math == DI_MPDECIMAL
    mpd_maxcontext (&mpdctx);
#endif
    dimathinitialized = 1;
  }
}

void
dimath_cleanup (void)
{
  return;
}