** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ezpol.cpp,v 1.2 2000/06/19 19:04:05 kevin Exp $
+** $Id: ezpol.cpp,v 1.3 2000/07/13 07:03:21 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
#define NUMCMD (sizeof(cmdlist) / sizeof (struct key))
-static int ignorecase = TRUE;
-
static int skiptok(char term[]);
static int pol_tok(struct token_st *token);
static void dumptok(struct token_st *token);
void pol_init (void)
{
- int i;
-
meta.eoc = SEMICOL;
meta.str = DQUOTE;
meta.com = SHARP;
inittable (usertable);
inittable (skiptable);
- for (i = 0; i < NUMCMD; i++)
+ for (unsigned int i = 0; i < NUMCMD; i++)
install (cmdtable, cmdlist[i].keyword, cmdlist[i].code);
token.ready = FALSE; /* no token read yet */
int pol_inchar(void)
{
- int c;
+ int c = 0;
- if (currentf < 0)
- return (EOF);
+ if (currentf < 0)
+ return (EOF);
- while (currentf >= 0 && (c = pol_getch(filep[currentf])) == EOF && filep[currentf] != NULL) {
- pol_closefile ();
- }
+ while (currentf >= 0 && (c = pol_getch(filep[currentf])) == EOF && filep[currentf] != NULL) {
+ pol_closefile ();
+ }
- return (c);
+ return (c);
}
/*--------------------------------------------------------------*/