* marked env and environ procedures busted.

This commit is contained in:
Abdulaziz Ghuloum 2007-05-18 22:26:22 -04:00
parent e499eb0f5a
commit 027d50e84a
4 changed files with 11 additions and 2 deletions

Binary file not shown.

View File

@ -965,6 +965,8 @@ ikrt_waitpid(ikp pid){
ikp
ikrt_getenv(ikp str, ikpcb* pcb){
fprintf(stderr, "getenv busted!\n");
exit(-1);
char* v = getenv(string_data(str));
if(v){
int n = strlen(v);
@ -983,6 +985,8 @@ ikrt_getenv(ikp str, ikpcb* pcb){
ikp
ikrt_setenv(ikp key, ikp val, ikp overwrite){
fprintf(stderr, "setenv busted!\n");
exit(-1);
int err = setenv(string_data(key), string_data(val),
overwrite!=false_object);
if(err){
@ -995,6 +999,8 @@ ikrt_setenv(ikp key, ikp val, ikp overwrite){
ikp
ikrt_environ(ikpcb* pcb){
fprintf(stderr, "environ busted!\n");
exit(-1);
char** es = environ;
int i; char* e;
ikp ac = null_object;

Binary file not shown.

View File

@ -96,9 +96,12 @@
(error 'env "failed to set ~s to ~s" key val))
(error 'env "the value: ~s is not a string" val))
(error 'env "the key: ~s is not a string" key))]))
env))
(define busted (lambda args (error 'env "busted!")))
busted))
(define environ
(define environ (lambda args (error 'environ "busted!")))
(define environ^
(lambda ()
(map
(lambda (s)