/[dtapublic]/projs/trunk/shared_source/c_tcl_base_7_5_w_mods/tclwinmtherr.c
ViewVC logotype

Contents of /projs/trunk/shared_source/c_tcl_base_7_5_w_mods/tclwinmtherr.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (show annotations) (download)
Mon Oct 31 00:57:34 2016 UTC (8 years, 1 month ago) by dashley
File MIME type: text/plain
File size: 1306 byte(s)
Header and footer cleanup.
1 /* $Header$ */
2 /*
3 * tclWinMtherr.c --
4 *
5 * This function provides a default implementation of the
6 * _matherr function for Borland C++.
7 *
8 * Copyright (c) 1995 Sun Microsystems, Inc.
9 *
10 * See the file "license.terms" for information on usage and redistribution
11 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 *
13 * RCS: @(#) $Id: tclwinmtherr.c,v 1.1.1.1 2001/06/13 04:49:20 dtashley Exp $
14 */
15
16 #include "tclWinInt.h"
17 #include <math.h>
18
19
20 /*
21 *----------------------------------------------------------------------
22 *
23 * _matherr --
24 *
25 * This procedure is invoked by Borland C++ when certain
26 * errors occur in mathematical functions. This procedure
27 * replaces the default implementation which generates pop-up
28 * warnings.
29 *
30 * Results:
31 * Returns 1 to indicate that we've handled the error
32 * locally.
33 *
34 * Side effects:
35 * Sets errno based on what's in xPtr.
36 *
37 *----------------------------------------------------------------------
38 */
39
40 int
41 _matherr(xPtr)
42 struct exception *xPtr; /* Describes error that occurred. */
43 {
44 if (!TclMathInProgress()) {
45 return 0;
46 }
47 if ((xPtr->type == DOMAIN) || (xPtr->type == SING)) {
48 errno = EDOM;
49 } else {
50 errno = ERANGE;
51 }
52 return 1;
53 }
54
55 /* End of tclwinmtherr.c */

Properties

Name Value
svn:keywords Header

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25