debug
This commit is contained in:
parent
13c99740ef
commit
40ccecb12c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
11
src/posix.c
11
src/posix.c
|
@ -170,10 +170,15 @@ write_byte (struct scm* x) /*:((arity . n)) */
|
|||
struct scm*
|
||||
getenv_ (struct scm* s) /*:((name . "getenv")) */
|
||||
{
|
||||
char *p;
|
||||
p = getenv (cell_bytes (s->string));
|
||||
char *p = cell_bytes (s->string);
|
||||
eputs ("getenv p="); eputs (p); eputs ("\n");
|
||||
p = getenv (p);
|
||||
if (p != 0)
|
||||
return make_string0 (p);
|
||||
{
|
||||
eputs (" => p="); eputs (p); eputs ("\n");
|
||||
return make_string0 (p);
|
||||
}
|
||||
eputs (" p == 0\n");
|
||||
return cell_f;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue