Revert "debug"

This reverts commit d2ab35af5422ea11ca79466d4a340c8f0edd3221.
This commit is contained in:
Jan Nieuwenhuizen 2019-10-30 14:58:44 +01:00
parent 40ccecb12c
commit 4158f35df9
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
3 changed files with 9 additions and 14 deletions

View File

@ -28,22 +28,22 @@
char *
getenv (char const *s)
{
eputs ("\ngetenv s="); eputs (s); eputs ("\n");
/* eputs ("\ngetenv s="); eputs (s); eputs ("\n"); */
char **p = environ;
int length = strlen (s);
while (p[0] != 0)
{
eputs ("getenv p[0]="); eputs (p[0]); eputs ("\n");
/* eputs ("getenv p[0]="); eputs (p[0]); eputs ("\n"); */
if (strncmp (s, p[0], length) == 0)
{
eputs ("found!\n");
/* eputs ("found!\n"); */
char *q = p[0] + length;
if (q[0] == '=')
return q + 1;
}
else
eputs ("not found!\n");
/* else */
/* eputs ("not found!\n"); */
p = p + M2_PTR_SIZE;
}

View File

@ -170,15 +170,10 @@ write_byte (struct scm* x) /*:((arity . n)) */
struct scm*
getenv_ (struct scm* s) /*:((name . "getenv")) */
{
char *p = cell_bytes (s->string);
eputs ("getenv p="); eputs (p); eputs ("\n");
p = getenv (p);
char *p;
p = getenv (cell_bytes (s->string));
if (p != 0)
{
eputs (" => p="); eputs (p); eputs ("\n");
return make_string0 (p);
}
eputs (" p == 0\n");
return make_string0 (p);
return cell_f;
}

View File

@ -1,6 +1,6 @@
#! /bin/sh
# -*-scheme-*-
#MES_ARENA=10000
MES_ARENA=10000
MES_MAX_ARENA=$MES_ARENA
export MES_ARENA
export MES_MAX_ARENA