#define ISSPACE(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n')
#define ISDIGIT(x) ((x) >= '0' && (x) <= '9')
-short ospeed; /* output speed */
-char PC; /* padding character */
-char *BC; /* back cursor movement */
-char *UP; /* up cursor movement */
+short ospeed = 0; /* output speed */
+char PC = 0; /* padding character */
+char *BC = 0; /* back cursor movement */
+char *UP = 0; /* up cursor movement */
-static char *capab; /* the capability itself */
+static char *capab = 0; /* the capability itself */
static int check_for_tc();
static int match_name();
else file = "/etc/termcap";
} else
file = "/etc/termcap";
- if ((fp = open(file, 0)) < 0)
+ if ((fp = open(file, 0)) < 0) {
+ capab = 0;
return(-1);
+ }
while (fgets(buf, 1024, fp) != NULL) {
if (buf[0] == '#') continue;
while (*(cp = &buf[strlen(buf) - 2]) == '\\')
if (match_name(buf, name)) {
strcpy(bp, buf);
close(fp);
- return(check_for_tc());
+ if(check_for_tc() == 0) {
+ capab = 0;
+ return 0;
+ }
+ return 1;
}
}
+ capab = 0;
close(fp);
return(0);
}
return(0); /* no : in termcap entry */
if (p[1] != 't' || p[2] != 'c')
return(1);
- if (count > 16) return(0); /* recursion in tc= definitions */
+ if (count > 16) {
+ return(0); /* recursion in tc= definitions */
+ }
count++;
strcpy(terminalname, &p[4]);
q = terminalname;
char *cp;
int ret;
- if ((cp = capab) == NULL || id == NULL)
+ if ((cp = capab) == NULL || id == NULL || *cp == 0)
return(-1);
- while (*++cp != ':')
+ while (*++cp && *cp != ':')
;
while (*cp) {
cp++;
{
char *cp;
- if ((cp = capab) == NULL || id == NULL)
+ if ((cp = capab) == NULL || id == NULL || *cp == 0)
return(-1);
- while (*++cp != ':')
+ while (*++cp && *cp != ':')
;
while (*cp) {
cp++;
char *ret;
int i;
- if ((cp = capab) == NULL || id == NULL)
+ if ((cp = capab) == NULL || id == NULL || *cp == 0)
return(NULL);
while (*++cp != ':')
;
sigtrp(M2_UNIXSIG, SIGALRM);
sigtrp(M2_UNIXSIG, SIGTERM);
}
+#if em22 || em24 || em44
+killbss()
+{
+}
+#else
+
+static int blablabla; /* We cannot use end, because then also
+ bss allocated for the systemcall lib
+ would be overwritten. Lets hope that
+ this helps ...
+ */
+
+killbss()
+{
+ extern char *edata;
+ register char *p = (char *) &edata;
+
+ while (p < (char *) &blablabla) *p++ = 0x66;
+}
+#endif
extern int catch();
int (*handler)() = catch;
-char **argv, **environ;
-int argc, StackSize;
-char *CurrentProcess, MainProcess, StackBase, MainLB;
+char **argv = 0, **environ = 0;
+int argc = 0, StackSize = 0;
+char *CurrentProcess = 0, MainProcess = 0, StackBase = 0, MainLB = 0;