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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25