diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2000-10-30 11:42:26 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2000-10-30 11:42:26 +0000 |
commit | a6d9e5abe5b110dc30e8cf914bcb4de4d28baf43 (patch) | |
tree | d5a3679c885a17f8469801bc97897a80ae48f1d6 /libguile/simpos.c | |
parent | e9bfab50e4ec7787db05605727a06f98fe30f5b6 (diff) | |
download | guile-a6d9e5abe5b110dc30e8cf914bcb4de4d28baf43.tar.gz |
* Change a couple of functions to accept either symbols or strings only.
* Get rid of remainig uses of SCM_LENGTH etc.
Diffstat (limited to 'libguile/simpos.c')
-rw-r--r-- | libguile/simpos.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libguile/simpos.c b/libguile/simpos.c index f8f1ab940..d21c81d7e 100644 --- a/libguile/simpos.c +++ b/libguile/simpos.c @@ -82,12 +82,11 @@ SCM_DEFINE (scm_system, "system", 0, 1, 0, rv = system (NULL); return SCM_BOOL(rv); } - SCM_VALIDATE_ROSTRING (1,cmd); + SCM_VALIDATE_STRING (1, cmd); SCM_DEFER_INTS; errno = 0; - if (SCM_SUBSTRP (cmd)) - cmd = scm_makfromstr (SCM_ROCHARS (cmd), SCM_STRING_LENGTH (cmd), 0); - rv = system(SCM_ROCHARS(cmd)); + SCM_STRING_COERCE_0TERMINATION_X (cmd); + rv = system (SCM_STRING_CHARS (cmd)); if (rv == -1 || (rv == 127 && errno != 0)) SCM_SYSERROR; SCM_ALLOW_INTS; @@ -105,8 +104,8 @@ SCM_DEFINE (scm_getenv, "getenv", 1, 0, 0, #define FUNC_NAME s_scm_getenv { char *val; - SCM_VALIDATE_ROSTRING (1,nam); - nam = scm_makfromstr (SCM_ROCHARS (nam), SCM_ROLENGTH (nam), 0); + SCM_VALIDATE_STRING (1, nam); + SCM_STRING_COERCE_0TERMINATION_X (nam); val = getenv (SCM_STRING_CHARS (nam)); return (val) ? scm_makfromstr(val, (scm_sizet)strlen(val), 0) : SCM_BOOL_F; } |