polylib
5.22.8
errormsg.c
Go to the documentation of this file.
1
/* errormsg.c
2
COPYRIGHT
3
Both this software and its documentation are
4
5
Copyright 1993 by IRISA /Universite de Rennes I - France,
6
Copyright 1995,1996 by BYU, Provo, Utah
7
all rights reserved.
8
9
*/
10
11
#include <
polylib/polylib.h
>
12
#include <stdio.h>
13
14
extern
int
Pol_status
;
15
16
/* This function allows either error messages to be sent to Mathematica,
17
or messages to be printed to stderr.
18
19
If MATHLINK is defined, then a command Message[f::msgname] is sent to
20
Mathematica. If not, one prints on stderr. The difference with errormsg
21
is that the control should be returned immediately to Mathematica after
22
the call to errormsg1. Therefore, no Compound statement is sent to
23
Mathematica.
24
*/
25
void
errormsg1
(
const
char
*f,
const
char
*msgname,
const
char
*msg) {
26
Pol_status
= 1;
27
28
#ifdef MATHLINK
29
MLPutFunction(stdlink,
"Message"
, 1);
30
MLPutFunction(stdlink,
"MessageName"
, 2);
31
MLPutSymbol(stdlink, f);
32
MLPutString(stdlink, msgname);
33
#else
34
#ifndef NO_MESSAGES
35
fprintf(stderr,
"?%s: %s\n"
, f, msg);
36
#endif
37
#endif
38
}
errormsg1
void errormsg1(const char *f, const char *msgname, const char *msg)
Definition:
errormsg.c:25
Pol_status
int Pol_status
Definition:
polyhedron.c:72
polylib.h
source
kernel
errormsg.c
Generated by
1.9.4