blob: 1951ad8bc98508f759504ab3db6dbd9ab157fb6c [file] [log] [blame]
Guido van Rossum86d25681992-05-15 11:05:54 +00001/***********************************************************
2Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The
3Netherlands.
4
5 All Rights Reserved
6
7Permission to use, copy, modify, and distribute this software and its
8documentation for any purpose and without fee is hereby granted,
9provided that the above copyright notice appear in all copies and that
10both that copyright notice and this permission notice appear in
11supporting documentation, and that the names of Stichting Mathematisch
12Centrum or CWI not be used in advertising or publicity pertaining to
13distribution of the software without specific, written prior permission.
14
15STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
16THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
18FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
20ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
21OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22
23******************************************************************/
24
25/* SGI module -- random SGI-specific things */
26
27#include "allobjects.h"
28#include "modsupport.h"
Jack Jansen743db361992-08-13 14:13:11 +000029#include "ceval.h"
Guido van Rossum86d25681992-05-15 11:05:54 +000030
31extern int sginap(long);
32
33static object *
34sgi_nap(self, args)
35 object *self;
36 object *args;
37{
38 long ticks;
39 if (!getargs(args, "l", &ticks))
40 return NULL;
Jack Jansen743db361992-08-13 14:13:11 +000041 BGN_SAVE
Guido van Rossum86d25681992-05-15 11:05:54 +000042 sginap(ticks);
Jack Jansen743db361992-08-13 14:13:11 +000043 END_SAVE
Guido van Rossum86d25681992-05-15 11:05:54 +000044 INCREF(None);
45 return None;
46}
47
48static struct methodlist sgi_methods[] = {
49 {"nap", sgi_nap},
50 {NULL, NULL} /* sentinel */
51};
52
53
54void
55initsgi()
56{
57 initmodule("sgi", sgi_methods);
58}
59
60int dummy; /* $%#@!& dl wants at least a byte of bss */