WINDOW *pad;
} PyCursesPadObject;
+#if 0
staticforward PyTypeObject PyCursesScreen_Type;
+#endif
staticforward PyTypeObject PyCursesWindow_Type;
+#if 0
staticforward PyTypeObject PyCursesPad_Type;
+#endif
#define PyCursesScreen_Check(v) ((v)->ob_type == &PyCursesScreen_Type)
#define PyCursesWindow_Check(v) ((v)->ob_type == &PyCursesWindow_Type)
int rtn;
int x, y;
int ch;
- int attr, attr_old;
+ int attr, attr_old = 0;
int use_xy = FALSE, use_attr = FALSE;
switch (ARG_COUNT(arg)) {
int rtn;
int x, y;
int ch;
- int attr, attr_old;
+ int attr, attr_old = 0;
int use_xy = TRUE, use_attr = FALSE;
switch (ARG_COUNT(arg)) {
int rtn;
int x, y;
char *str;
- int attr, attr_old;
+ int attr, attr_old = 0;
int use_xy = FALSE, use_attr = FALSE;
switch (ARG_COUNT(arg)) {
/* -------------------------------------------------------*/
+#if 0
static PyTypeObject PyCursesScreen_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
};
+#endif
static PyTypeObject PyCursesWindow_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*tp_hash*/
};
+#if 0
static PyTypeObject PyCursesPad_Type = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
};
+#endif
/* -------------------------------------------------------*/
{
TkttObject *v = (TkttObject *) self;
- fprintf(fp, "<tktimertoken at 0x%x%s>", v,
+ fprintf(fp, "<tktimertoken at 0x%lx%s>", (long)v,
v->func == NULL ? ", handler deleted" : "");
return 0;
}
quitMainLoop = 0;
while (Tk_GetNumMainWindows() > threshold && !quitMainLoop && !errorInCmd)
{
+ /* XXX Ought to check for other signals! */
if (PyOS_InterruptOccurred ())
{
PyErr_SetNone (PyExc_KeyboardInterrupt);
portobject *self;
object *args;
{
- long count;
char *buf;
int size, width;
ALconfig c;
long *PVbuffer;
long PVdummy[2];
object *v;
- object *w;
if (!getlongarg (args, &device))
return NULL;
/* Forward */
static object *newarrayobject PROTO((int, struct arraydescr *));
+#if 0
static int getarraysize PROTO((object *));
+#endif
static object *getarrayitem PROTO((object *, int));
static int setarrayitem PROTO((object *, int, object *));
+#if 0
static int insarrayitem PROTO((object *, int, object *));
static int addarrayitem PROTO((object *, object *));
+#endif
static object *
c_getitem(ap, i)
return (object *) op;
}
+#if 0
static int
getarraysize(op)
object *op;
}
return ((arrayobject *)op) -> ob_size;
}
+#endif
static object *
getarrayitem(op, i)
return (*self->ob_descr->setitem)(self, where, v);
}
+#if 0
static int
insarrayitem(op, where, newitem)
object *op;
return ins1((arrayobject *)op,
(int) ((arrayobject *)op)->ob_size, newitem);
}
+#endif
/* Methods */
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
if ( !getargs(args, "(s#ii)", &cp, &len, &size, &i) )
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
int max = 0;
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
int min = 0x7fffffff, max = -0x7fffffff;
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
float avg = 0.0;
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
float sum_squares = 0.0;
object *args;
{
signed char *cp;
- int len, size, val, prevval, prevextremevalid = 0, prevextreme;
+ int len, size, val = 0, prevval = 0, prevextremevalid = 0, prevextreme = 0;
int i;
float avg = 0.0;
int diff, prevdiff, extremediff, nextreme = 0;
object *args;
{
signed char *cp;
- int len, size, val, prevval, prevextremevalid = 0, prevextreme;
+ int len, size, val = 0, prevval = 0, prevextremevalid = 0, prevextreme = 0;
int i;
int max = 0;
int diff, prevdiff, extremediff;
object *args;
{
signed char *cp;
- int len, size, val;
+ int len, size, val = 0;
int i;
int prevval, ncross;
object *args;
{
signed char *cp, *ncp;
- int len, size, val;
+ int len, size, val = 0;
double factor, fval, maxval;
object *rv;
int i;
object *args;
{
signed char *cp, *ncp;
- int len, size, val1, val2;
+ int len, size, val1 = 0, val2 = 0;
double fac1, fac2, fval, maxval;
object *rv;
int i;
object *args;
{
signed char *cp, *ncp;
- int len, size, val1, val2, val;
+ int len, size, val1, val2, val = 0;
double fac1, fac2, fval, maxval;
object *rv;
int i;
object *args;
{
signed char *cp1, *cp2, *ncp;
- int len1, len2, size, val1, val2;
+ int len1, len2, size, val1 = 0, val2 = 0;
object *rv;
int i;
object *args;
{
signed char *cp, *ncp;
- int len, size, val;
+ int len, size, val = 0;
object *rv;
int i;
int bias;
{
signed char *cp;
unsigned char *ncp;
- int len, size, val;
+ int len, size, val = 0;
object *rv;
int i, j;
{
signed char *cp;
unsigned char *ncp;
- int len, size, size2, val;
+ int len, size, size2, val = 0;
object *rv;
int i, j;
{
signed char *cp;
unsigned char *ncp;
- int len, size, val;
+ int len, size, val = 0;
object *rv;
int i;
{
signed char *cp;
signed char *ncp;
- int len, size, val, step, valpred, delta, index, sign, vpdiff, diff;
+ int len, size, val = 0, step, valpred, delta, index, sign, vpdiff, diff;
object *rv, *state, *str;
- int i, outputbuffer, bufferstep;
+ int i, outputbuffer = 0, bufferstep;
if ( !getargs(args, "(s#iO)",
&cp, &len, &size, &state) )
signed char *ncp;
int len, size, valpred, step, delta, index, sign, vpdiff;
object *rv, *str, *state;
- int i, inputbuffer, bufferstep;
+ int i, inputbuffer = 0, bufferstep;
if ( !getargs(args, "(s#iO)",
&cp, &len, &size, &state) )
CDDATATYPES type;
void *data;
{
- object *result, *args, *v;
+ object *result, *args, *v = NULL;
char *p;
int i;
cdparserobject *self;
param_type_is_float(clobject *self, int param)
{
int bufferlength;
- int ret;
if (self->ob_paramtypes == NULL) {
error_handler_called = 0;
static Py_complex c_half = {0.5, 0.};
static Py_complex c_i = {0., 1.};
static Py_complex c_i2 = {0., 0.5};
+#if 0
static Py_complex c_mi = {0., -1.};
static Py_complex c_pi2 = {M_PI/2., 0.};
+#endif
/* forward declarations */
staticforward Py_complex c_log();
char *word, *salt;
extern char * crypt();
- struct passwd *p;
if (!getargs(args, "(ss)", &word, &salt)) {
return NULL;
}
dbmobject *dp;
register object *key;
{
- object *v;
datum drec, krec;
if (!getargs(key, "s#", &krec.dptr, &krec.dsize) )
#include "allobjects.h"
#include "modsupport.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
#include <fcntl.h>
int fd;
int code;
int ret;
- FILE *f;
if (!getargs(args, "(ii)", &fd, &code))
return NULL;
object *args;
{
int fd, code, len = 0, start = 0, whence = 0, ret;
- FILE *f;
if (!PyArg_ParseTuple(args, "ii|iii", &fd, &code, &len,
&start, &whence))
object *args;
{
fmfontinfo info;
- object *v;
if (!getnoarg(args))
return NULL;
if (fmgetfontinfo(self->fh_fh, &info) < 0) {
int x, y, len, nlen;
unsigned char *cp, *ncp;
object *rv;
- int i, pos, value, nvalue;
+ int i, pos, value = 0, nvalue;
if ( !getargs(args, "(s#ii)", &cp, &len, &x, &y) )
return 0;
int x, y, len, nlen;
unsigned char *cp, *ncp;
object *rv;
- int i, pos, value, nvalue;
+ int i, pos, value = 0, nvalue;
if ( !getargs(args, "(s#ii)", &cp, &len, &x, &y) )
return 0;
/* The error handler */
-static imgfile_error(str)
+static void
+imgfile_error(str)
char *str;
{
err_setstr(ImgfileError, str);
static long *glob_datap;
static int glob_width, glob_z, glob_ysize;
-static
+static void
xs_get(buf, y)
short *buf;
int y;
getrow(glob_image, buf, y, glob_z);
}
-static
+static void
xs_put_c(buf, y)
short *buf;
int y;
*datap++ = (*buf++) & 0xff;
}
-static
+static void
xs_put_0(buf, y)
short *buf;
int y;
while ( width-- )
*datap++ = (*buf++) & 0xff;
}
-static
+static void
xs_put_12(buf, y)
short *buf;
int y;
char *filter;
double blur;
int extended;
- int fmode;
+ int fmode = 0;
int yfirst, ylast, ystep;
/*
filename = argv[optind];
if (Py_VerboseFlag ||
- command == NULL && filename == NULL && isatty((int)fileno(fp)))
+ (command == NULL && filename == NULL && isatty((int)fileno(fp))))
fprintf(stderr, "Python %s\n%s\n",
Py_GetVersion(), Py_GetCopyright());
sts = PyRun_AnyFile(stdin, "<stdin>") != 0;
Py_Exit(sts);
- /*NOTREACHED*/
+ return 0; /* Make gcc -Wall happy */
}
PyObject *tuple = 0;
PyObject *temp = 0;
int ok;
- int start_sym;
+ int start_sym = 0;
if (!PyArg_ParseTuple(args, "O:tuple2ast", &tuple))
return (0);
break;
}
}
- else if (res = validate_numnodes(tree, 2, "comp_op")) {
+ else if ((res = validate_numnodes(tree, 2, "comp_op")) != 0) {
res = (validate_ntype(CHILD(tree, 0), NAME)
&& validate_ntype(CHILD(tree, 1), NAME)
&& (((strcmp(STR(CHILD(tree, 0)), "is") == 0)
#include <sys/wait.h> /* For WNOHANG */
#endif
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
#include "mytime.h" /* For clock_t on some systems */
#ifdef HAVE_FCNTL_H
while ((ep = readdir(dirp)) != NULL) {
if (ep->d_name[0] == '.' &&
(NAMLEN(ep) == 1 ||
- ep->d_name[1] == '.' && NAMLEN(ep) == 2))
+ (ep->d_name[1] == '.' && NAMLEN(ep) == 2)))
continue;
v = newsizedstringobject(ep->d_name, NAMLEN(ep));
if (v == NULL) {
object *args;
{
struct utsname u;
- object *v;
int res;
if (!getnoarg(args))
return NULL;
if (!getintarg(args, &sts))
return NULL;
_exit(sts);
- /* NOTREACHED */
+ return NULL; /* Make gcc -Wall happy */
}
#ifdef HAVE_EXECV
#include "Python.h"
+#include <ctype.h>
+
#include "regexpr.h"
static PyObject *RegexError; /* Exception */
regexp_t bufp;
{
int a, pos, op, current_level, level, opcode;
- int pattern_offset, alloc;
+ int pattern_offset = 0, alloc;
int starts[NUM_LEVELS * MAX_NESTING], starts_base;
int future_jumps[MAX_NESTING], num_jumps;
- unsigned char ch;
+ unsigned char ch = '\0';
char *pattern, *translate;
int next_register, paren_depth, num_open_registers, open_registers[RE_NREGS];
int beginning_context;
/*unsigned*/ long *tab;
int len;
{
- int r;
+ int r = 0;
while(len) {
r = putlong(outf,*tab++);
#include "modsupport.h"
#include "ceval.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <sys/types.h>
#ifdef MS_WINDOWS
#include "Python.h"
#include "intrcheck.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <signal.h>
#ifndef SIG_ERR
#include "Python.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <sys/types.h>
#include "mytime.h"
int errnop;
#endif /* HAVE_GETHOSTBYNAME_R */
+ memset((void *) addr_ret, '\0', sizeof(*addr_ret));
if (name[0] == '\0') {
addr_ret->sin_addr.s_addr = INADDR_ANY;
return 4;
if (args != NULL && is_tupleobject(args)) {
if (!getargs(args, "(si)", &s, &base))
return NULL;
- if (base != 0 && base < 2 || base > 36) {
+ if ((base != 0 && base < 2) || base > 36) {
err_setstr(ValueError, "invalid base for atoi()");
return NULL;
}
if (args != NULL && is_tupleobject(args)) {
if (!getargs(args, "(si)", &s, &base))
return NULL;
- if (base != 0 && base < 2 || base > 36) {
+ if ((base != 0 && base < 2) || base > 36) {
err_setstr(ValueError, "invalid base for atol()");
return NULL;
}
trans_table[i]=Py_CHARMASK(table[i]);
if (delete!=NULL) {
for(i=0; i<dellen; i++)
- trans_table[delete[i]]=-1;
+ trans_table[(int)delete[i]]=-1;
}
result = PyString_FromStringAndSize((char *)NULL, inlen);
PyObject * self;
PyObject * args;
{
- char *message, *s;
+ char *message;
int priority = LOG_INFO | LOG_USER;
if (!PyArg_ParseTuple(args, "is;[priority,] message string",
void
initthread()
{
- object *m, *d, *x;
+ object *m, *d;
/* Create the module and add the functions */
m = initmodule("thread", thread_methods);
PyObject *self; /* Not used */
PyObject *args;
{
- int i, j;
XxoObject *rv;
if (!PyArg_ParseTuple(args, ""))