| 1 |
/* |
| 2 |
* This file is part of MPSolve 3.2.2 |
| 3 |
* |
| 4 |
* Copyright (C) 2001-2020, Dipartimento di Matematica "L. Tonelli", Pisa. |
| 5 |
* License: http://www.gnu.org/licenses/gpl.html GPL version 3 or higher |
| 6 |
* |
| 7 |
* Authors: |
| 8 |
* Leonardo Robol <[email protected]> |
| 9 |
*/ |
| 10 |
|
| 11 |
#ifndef _MPS_UTILS_H |
| 12 |
#define _MPS_UTILS_H |
| 13 |
|
| 14 |
MPS_BEGIN_DECLS |
| 15 |
|
| 16 |
#include <mps/mps.h> |
| 17 |
|
| 18 |
/* This function is currently implemented in parser.c for historical reasons. */ |
| 19 |
char * build_equivalent_rational_string (mps_context * ctx, const char * line, |
| 20 |
long int * exponent, int * sign); |
| 21 |
|
| 22 |
char * mps_utils_strip_string (mps_context * ctx, const char * input); |
| 23 |
char * mps_utils_build_equivalent_rational_string (mps_context * ctx, |
| 24 |
const char * input); |
| 25 |
|
| 26 |
/* functions in newton.c */ |
| 27 |
int mps_intlog2 (int n); |
| 28 |
|
| 29 |
/* function in strndup.c */ |
| 30 |
#ifndef HAVE_STRNDUP |
| 31 |
char * mps_strndup (const char * source, size_t n); |
| 32 |
#else |
| 33 |
#define mps_strndup strndup |
| 34 |
#endif |
| 35 |
|
| 36 |
MPS_END_DECLS |
| 37 |
|
| 38 |
#endif |