Skip to content
Extraits de code Groupes Projets
Valider 037e0665 rédigé par Etienne BRATEAU's avatar Etienne BRATEAU
Parcourir les fichiers

math: deprecate some functions in favor to c standard library

parent e497298c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
#ifndef MATH_H #ifndef MATH_H
#define MATH_H #define MATH_H
#include <p2c/p2c.h>
#include <p2c/newasm.h> #include <p2c/newasm.h>
#ifdef MATH_G #ifdef MATH_G
...@@ -43,7 +44,7 @@ vextern long ma_dummy; ...@@ -43,7 +44,7 @@ vextern long ma_dummy;
/* obsolete -- use initrandom/seedrandom */ /* obsolete -- use initrandom/seedrandom */
extern int ma_trapuf (int flag); extern int ma_trapuf (int flag) DEPRECATED;
extern double ma_rround (double r); extern double ma_rround (double r);
extern double ma_rrounde (double r); extern double ma_rrounde (double r);
extern double ma_rtrunc (double r); extern double ma_rtrunc (double r);
...@@ -97,10 +98,10 @@ extern double ma_hypot (double a, double b); ...@@ -97,10 +98,10 @@ extern double ma_hypot (double a, double b);
extern void ma_quadrsolve (double a, double b, double c, double *x1, extern void ma_quadrsolve (double a, double b, double c, double *x1,
double *x2); double *x2);
extern void ma_sincos (double r, double *s, double *c); extern void ma_sincos (double r, double *s, double *c);
extern double ma_tan (double r); extern double ma_tan (double r) DEPRECATED; /* Use tan */
extern double ma_arcsin (double r); extern double ma_arcsin (double r) DEPRECATED; /* use asin */
extern double ma_arccos (double r); extern double ma_arccos (double r) DEPRECATED; /* use acos */
extern double ma_arctan2 (double r1, double r2); extern double ma_arctan2 (double r1, double r2) DEPRECATED ; /* use atan2 */
/* = arctan(r1/r2) */ /* = arctan(r1/r2) */
extern void ma_sincosd (double r, double *s, double *c); extern void ma_sincosd (double r, double *s, double *c);
...@@ -111,12 +112,12 @@ extern double ma_arcsind (double r); ...@@ -111,12 +112,12 @@ extern double ma_arcsind (double r);
extern double ma_arccosd (double r); extern double ma_arccosd (double r);
extern double ma_arctand (double r); extern double ma_arctand (double r);
extern double ma_arctand2 (double r1, double r2); extern double ma_arctand2 (double r1, double r2);
extern double ma_sinh (double r); extern double ma_sinh (double r) DEPRECATED; /* use sinh */
extern double ma_cosh (double r); extern double ma_cosh (double r) DEPRECATED; /* use cosh */
extern double ma_tanh (double r); extern double ma_tanh (double r) DEPRECATED; /* use tanh */
extern double ma_arcsinh (double r); extern double ma_arcsinh (double r) DEPRECATED; /* use asinh */
extern double ma_arccosh (double r); extern double ma_arccosh (double r) DEPRECATED; /* use acosh */
extern double ma_arctanh (double r); extern double ma_arctanh (double r) DEPRECATED; /* use atanh */
extern double ma_lngamma (double x, int *minus); extern double ma_lngamma (double x, int *minus);
extern double ma_rgamma (double x); extern double ma_rgamma (double x);
extern long ma_ifactorial (long n); extern long ma_ifactorial (long n);
...@@ -167,17 +168,16 @@ extern char *ma_strfmtcomplex2 (char *ma_Result, ma_complex a, long wid, ...@@ -167,17 +168,16 @@ extern char *ma_strfmtcomplex2 (char *ma_Result, ma_complex a, long wid,
extern void ma_strsubreadcomplex (char *buf, long first, long *pos, extern void ma_strsubreadcomplex (char *buf, long first, long *pos,
ma_complex *a); ma_complex *a);
extern ma_complex ma_strreadcomplex (char *buf); extern ma_complex ma_strreadcomplex (char *buf);
extern double ma_rrand (); extern double ma_rrand () DEPRECATED;
extern long ma_rand2 (long min, long max); extern long ma_rand2 (long min, long max) DEPRECATED;
extern double ma_rrand2 (double min, double max); extern double ma_rrand2 (double min, double max) DEPRECATED;
extern double ma_nrand2 (double mean, double sdev); extern double ma_nrand2 (double mean, double sdev) DEPRECATED;
extern void ma_initrandom (void * *s); extern void ma_initrandom (void * *s) DEPRECATED;
extern void ma_seedrandom (void * *s, long seed); extern void ma_seedrandom (void * *s, long seed) DEPRECATED;
extern double ma_urandom (void * s); extern double ma_urandom (void * s) DEPRECATED;
extern long ma_irandom (void * s, long min, long max); extern long ma_irandom (void * s, long min, long max) DEPRECATED;
extern double ma_rrandom (void * s, double min, double max); extern double ma_rrandom (void * s, double min, double max) DEPRECATED;
extern double ma_nrandom (void * s, double mean, double sdev); extern double ma_nrandom (void * s, double mean, double sdev) DEPRECATED;
#undef vextern #undef vextern
......
...@@ -126,6 +126,7 @@ extern void nk_unmap (int numkeys, nk_remap_info *newdefs); ...@@ -126,6 +126,7 @@ extern void nk_unmap (int numkeys, nk_remap_info *newdefs);
extern void nk_newkbdinstall (); extern void nk_newkbdinstall ();
extern void nk_newkbdremove (); extern void nk_newkbdremove ();
#undef vextern
#endif /*NEWKBD_H*/ #endif /*NEWKBD_H*/
......
#ifndef RND_H #ifndef RND_H
#define RND_H #define RND_H
extern void P_random(); #include <p2c/p2c.h>
extern long P_rand();
/**
* Use the c library random methods
*/
extern void P_random() DEPRECATED;
extern long P_rand() DEPRECATED;
#endif /* RND_H */ #endif /* RND_H */
Ce diff est replié.
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter