diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1998-10-26 07:46:54 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1998-10-26 07:46:54 +0000 |
commit | 3ffc7a360f053673fb5dc578c1a2334d0a07c653 (patch) | |
tree | d063169d3d6b3f5d8bb63c80debea17c255560b5 /libguile/gh.h | |
parent | fe1a46f0e20464bcb48efa2d3f421f5471e36ac3 (diff) | |
download | guile-3ffc7a360f053673fb5dc578c1a2334d0a07c653.tar.gz |
* numbers.c (num2long): As a software archeologist, I'm proud of
this finding! :) Preliminary dating suggests an almost 4 year old
remnant from the SCM ancestor. The sample has been removed from
the finding site and is now safely stored in the repository.
* numbers.h: Removed prototype for num2long.
* unif.c (scm_array_set_x): Use scm_num2long instead of num2long.
* gh_data.c (gh_scm2doubles): Make it possible to pass result
array as second arg.
(gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
gh_scm2shorts, gh_scm2longs, gh_scm2floats): New functions.
* gh.h: Updated and added prototypes.
* gh_data.c (gh_ints2scm): Handle integers outside INUM limits.
Diffstat (limited to 'libguile/gh.h')
-rw-r--r-- | libguile/gh.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libguile/gh.h b/libguile/gh.h index 592a36868..8a4e1caae 100644 --- a/libguile/gh.h +++ b/libguile/gh.h @@ -108,10 +108,15 @@ SCM gh_str02scm(char *s); void gh_set_substr(char *src, SCM dst, int start, int len); SCM gh_symbol2scm(char *symbol_str); SCM gh_ints2scm(int *d, int n); +SCM gh_chars2byvect(char *d, int n); +SCM gh_shorts2svect(short *d, int n); SCM gh_longs2ivect(long *d, int n); SCM gh_ulongs2uvect(unsigned long *d, int n); SCM gh_doubles2scm(double *d, int n); #ifdef SCM_FLOATS +#ifdef SCM_SINGLES +SCM gh_floats2fvect(float *d, int n); +#endif SCM gh_doubles2dvect(double *d, int n); #endif @@ -126,7 +131,11 @@ double gh_scm2double(SCM obj); char *gh_scm2newstr(SCM str, int *lenp); void gh_get_substr(SCM src, char *dst, int start, int len); char *gh_symbol2newstr(SCM sym, int *lenp); -double *gh_scm2doubles(SCM vector); +char *gh_scm2chars(SCM vector, char *result); +short *gh_scm2shorts(SCM vector, short *result); +long *gh_scm2longs(SCM vector, long *result); +float *gh_scm2floats(SCM vector, float *result); +double *gh_scm2doubles(SCM vector, double *result); /* type predicates: tell you if an SCM object has a given type */ int gh_boolean_p(SCM val); |