annotate Python/sigcheck.c @ 3930:52c19ee83a6b legacy-trunk

Guido's 1.4b2 fixes: Py_GetProgramName, Py_GetPrefix and Py_GetExecPrefix.
author Jack Jansen <jack.jansen@cwi.nl>
date Fri, 02 Aug 1996 15:16:16 +0000
parents d0d0a69b5ca3
children 65d2d8e67da3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1660
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
1 /***********************************************************
2062
d0d0a69b5ca3 Added 1995 to copyright message.
Guido van Rossum <guido@python.org>
parents: 1660
diff changeset
2 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
d0d0a69b5ca3 Added 1995 to copyright message.
Guido van Rossum <guido@python.org>
parents: 1660
diff changeset
3 The Netherlands.
1660
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
4
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
5 All Rights Reserved
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
6
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
7 Permission to use, copy, modify, and distribute this software and its
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
8 documentation for any purpose and without fee is hereby granted,
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
9 provided that the above copyright notice appear in all copies and that
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
10 both that copyright notice and this permission notice appear in
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
11 supporting documentation, and that the names of Stichting Mathematisch
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
12 Centrum or CWI not be used in advertising or publicity pertaining to
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
13 distribution of the software without specific, written prior permission.
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
14
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
15 STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
16 THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
17 FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
18 FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
19 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
20 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
21 OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
22
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
23 ******************************************************************/
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
24
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
25 /* Sigcheck is similar to intrcheck() but sets an exception when an
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
26 interrupt occurs. It can't be in the intrcheck.c file since that
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
27 file (and the whole directory it is in) doesn't know about objects
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
28 or exceptions. It can't be in errors.c because it can be
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
29 overridden (at link time) by a more powerful version implemented in
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
30 signalmodule.c. */
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
31
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
32 #include "allobjects.h"
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
33 #include "intrcheck.h"
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
34
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
35 /* ARGSUSED */
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
36 int
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
37 sigcheck()
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
38 {
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
39 if (!intrcheck())
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
40 return 0;
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
41 err_set(KeyboardInterrupt);
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
42 return -1;
ffd495bacbd4 Replace intrcheck() by sigcheck() in many places.
Guido van Rossum <guido@python.org>
parents:
diff changeset
43 }