}
strcpy(argv0, className);
- if (isupper(argv0[0]))
+ if (isupper((int)(argv0[0])))
argv0[0] = tolower(argv0[0]);
Tcl_SetVar(v->interp, "argv0", argv0, TCL_GLOBAL_ONLY);
ckfree(argv0);
{
PyObject *list, *item;
DBT krec, drec;
- char *data,buf[4096];
+ char *data=NULL,buf[4096];
int status;
int err;
{
int status;
DBT krec, drec;
- char *kdata,kbuf[4096];
- char *ddata,dbuf[4096];
+ char *kdata=NULL,kbuf[4096];
+ char *ddata=NULL,dbuf[4096];
PyObject *result;
if (!PyArg_NoArgs(args))
res = (validate_numnodes(tree, 6, "try/finally")
&& validate_colon(CHILD(tree, 4))
&& validate_suite(CHILD(tree, 5)));
- else if (res)
+ else if (res) {
if (nch == (pos + 3)) {
res = ((strcmp(STR(CHILD(tree, pos)), "except") == 0)
|| (strcmp(STR(CHILD(tree, pos)), "else") == 0));
if (!res)
err_string("Illegal trailing triple in try statement.");
}
- else if (nch == (pos + 6))
+ else if (nch == (pos + 6)) {
res = (validate_name(CHILD(tree, pos), "except")
&& validate_colon(CHILD(tree, pos + 1))
&& validate_suite(CHILD(tree, pos + 2))
&& validate_name(CHILD(tree, pos + 3), "else"));
+ }
else
res = validate_numnodes(tree, pos + 3, "try/except");
+ }
}
return (res);
/* GNU readline definitions */
#include <readline/readline.h> /* You may need to add an -I option to Setup */
+extern int rl_parse_and_bind();
+extern int rl_read_init_file();
+extern int rl_insert_text();
+extern int rl_bind_key();
+extern int rl_bind_key_in_map();
+extern int rl_initialize();
+extern int add_history();
+
/* Pointers needed from outside (but not declared in a header file). */
extern int (*PyOS_InputHook)();
extern char *(*PyOS_ReadlineFunctionPointer) Py_PROTO((char *));
}
case Rbol:
{
- if (!beginning_context)
+ if (!beginning_context) {
if (regexp_context_indep_ops)
goto op_error;
else
goto normal_char;
+ }
opcode = Cbol;
goto store_opcode;
}
((regexp_syntax & RE_NO_BK_PARENS)?
(regex[pos] == ')'):
(pos+1 < size && regex[pos] == '\134' &&
- regex[pos+1] == ')'))))
+ regex[pos+1] == ')')))) {
if (regexp_context_indep_ops)
goto op_error;
else
goto normal_char;
+ }
opcode = Ceol;
goto store_opcode;
/* NOTREACHED */
}
case Roptional:
{
- if (beginning_context)
+ if (beginning_context) {
if (regexp_context_indep_ops)
goto op_error;
else
goto normal_char;
+ }
if (CURRENT_LEVEL_START == pattern_offset)
break; /* ignore empty patterns for ? */
ALLOC(3);
case Rstar:
case Rplus:
{
- if (beginning_context)
+ if (beginning_context) {
if (regexp_context_indep_ops)
goto op_error;
else
goto normal_char;
+ }
if (CURRENT_LEVEL_START == pattern_offset)
break; /* ignore empty patterns for + and * */
ALLOC(9);
else
dir = 1;
- if (anchor == 2)
+ if (anchor == 2) {
if (pos != 0)
return -1;
else
range = 0;
+ }
for (; range >= 0; range--, pos += dir)
{
s = fmt;
size = 0;
while ((c = *s++) != '\0') {
- if (isspace(c))
+ if (isspace((int)c))
continue;
if ('0' <= c && c <= '9') {
num = c - '0';
res = restart = PyString_AsString(result);
while ((c = *s++) != '\0') {
- if (isspace(c))
+ if (isspace((int)c))
continue;
if ('0' <= c && c <= '9') {
num = c - '0';
str = start;
s = fmt;
while ((c = *s++) != '\0') {
- if (isspace(c))
+ if (isspace((int)c))
continue;
if ('0' <= c && c <= '9') {
num = c - '0';
}
if (PyComplex_Check(r)) {
cr = ((PyComplexObject*)r)->cval;
- if (own_r)
+ if (own_r) {
Py_DECREF(r);
+ }
}
else {
tmp = (*nbr->nb_float)(r);
- if (own_r)
+ if (own_r) {
Py_DECREF(r);
+ }
if (tmp == NULL)
return NULL;
cr.real = PyFloat_AsDouble(tmp);
callable, args);
Py_DECREF(args);
}
- if (callable != basetype)
+ if (callable != basetype) {
Py_DECREF(callable);
+ }
return newclass;
}
PyErr_SetString(PyExc_TypeError,
}
}
- if (*format != '\0' && !isalpha(*format) &&
+ if (*format != '\0' && !isalpha((int)(*format)) &&
*format != '(' &&
*format != '|' && *format != ':' && *format != ';') {
PyErr_Format(PyExc_SystemError,
{
int i, n;
- if (v == NULL)
+ if (v == NULL) {
w_byte(TYPE_NULL, p);
- else if (v == Py_None)
+ }
+ else if (v == Py_None) {
w_byte(TYPE_NONE, p);
- else if (v == Py_Ellipsis)
- w_byte(TYPE_ELLIPSIS, p);
+ }
+ else if (v == Py_Ellipsis) {
+ w_byte(TYPE_ELLIPSIS, p);
+ }
else if (PyInt_Check(v)) {
long x = PyInt_AS_LONG((PyIntObject *)v);
#if SIZEOF_LONG > 4
static void do_exit_thread _P1(no_cleanup, int no_cleanup)
{
dprintf(("exit_thread called\n"));
- if (!initialized)
+ if (!initialized) {
if (no_cleanup)
_exit(0);
else
exit(0);
+ }
}
void exit_thread _P0()