File: utils.h

package info (click to toggle)
mpsolve 3.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,100 kB
  • sloc: ansic: 25,748; sh: 4,925; cpp: 3,155; makefile: 914; python: 407; yacc: 158; lex: 85; xml: 41
file content (38 lines) | stat: -rw-r--r-- 1,009 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
/*
 * This file is part of MPSolve 3.2.2
 *
 * Copyright (C) 2001-2020, Dipartimento di Matematica "L. Tonelli", Pisa.
 * License: http://www.gnu.org/licenses/gpl.html GPL version 3 or higher
 *
 * Authors:
 *   Leonardo Robol <leonardo.robol@unipi.it>
 */

#ifndef _MPS_UTILS_H
#define _MPS_UTILS_H

MPS_BEGIN_DECLS

#include <mps/mps.h>

/* This function is currently implemented in parser.c for historical reasons. */
char * build_equivalent_rational_string (mps_context * ctx, const char * line,
                                         long int * exponent, int * sign);

char * mps_utils_strip_string (mps_context * ctx, const char * input);
char * mps_utils_build_equivalent_rational_string (mps_context * ctx,
                                                   const char * input);

/* functions in newton.c */
int mps_intlog2 (int n);

/* function in strndup.c */
#ifndef HAVE_STRNDUP
char * mps_strndup (const char * source, size_t n);
#else
#define mps_strndup strndup
#endif

MPS_END_DECLS

#endif