Go to the documentation of this file.
14 static pointer FSTRING2DV(ctx,
n,argv)
21 register int i,len=-1;
25 src = (
float *)(
intval(f));
29 src = (
float *)
f->c.str.chars;
38 if (len < 0) len = vecsize(d);
44 for (i=0; i<len; i++) {
45 *fp++ = (double)src[i];
47 if(
n != 1)
return (d);
56 static pointer DV2FSTRING(ctx,
n,argv)
65 struct {
char a,b,c,
d;} cval;
93 for (i=0; i<len/4; i++) {
94 f2d.fval = (float)*fp++;
100 if(
n != 1)
return(f);
109 static pointer ISTRING2LV(ctx,
n,argv)
116 register int i,len=-1;
123 len = strlength(f)/4;
124 src = (
int *)
f->c.str.chars;
133 if (len < 0) len = vecsize(d);
139 for (i=0; i<len; i++) {
140 *fp++ = (long)src[i];
151 static pointer LV2ISTRING(ctx,
n,argv)
160 struct {
char a,b,c,
d;} cval;
187 for (i=0; i<len/4; i++) {
188 i2l.ival = (int)*fp++;
206 static pointer DSTRING2FV(ctx,
n,argv)
213 register int i, len=-1;
217 src = (
double *)(
intval(f));
220 len = strlength(f)/8;
221 src = (
double *)
f->c.str.chars;
230 if (len < 0) len = vecsize(d);
236 for (i = 0; i < len; i++) {
237 *fp++ = (float)src[i];
239 if(
n != 1)
return (d);
248 static pointer FV2DSTRING(ctx,
n,argv)
257 struct {
char a,b,c,
d,e,
f,
g,h;} cval;
263 len = vecsize(d) * 8;
284 for (i=0; i < len/8; i++) {
285 f2d.fval = (double)*fp++;
295 if(
n != 1)
return(f);
304 static pointer LSTRING2IV(ctx,
n,argv)
311 register int i, len=-1;
315 src = (
long long *)(
intval(f));
318 len = strlength(f) / 8;
319 src = (
long long *)
f->c.str.chars;
328 if (len < 0) len = vecsize(d);
333 for (i = 0; i < len; i++) {
345 static pointer IV2LSTRING(ctx,
n,argv)
354 struct {
char a,b,c,
d,e,
f,
g,h;} cval;
360 len = vecsize(d) * 8;
381 for (i=0; i<len/4; i++) {
382 i2l.ival = (int)*fp++;
401 #if (WORD_SIZE == 64)
402 defun(ctx,
"FLOAT-BYTESTRING2DVECTOR",mod,FSTRING2DV,
NULL);
403 defun(ctx,
"DVECTOR2FLOAT-BYTESTRING",mod,DV2FSTRING,
NULL);
404 defun(ctx,
"INTEGER-BYTESTRING2LVECTOR",mod,ISTRING2LV,
NULL);
405 defun(ctx,
"LVECTOR2INTEGER-BYTESTRING",mod,LV2ISTRING,
NULL);
408 defun(ctx,
"DOUBLE-BYTESTRING2FVECTOR",mod,DSTRING2FV,
NULL);
409 defun(ctx,
"FVECTOR2DOUBLE-BYTESTRING",mod,FV2DSTRING,
NULL);
410 defun(ctx,
"LONG-LONG-BYTESTRING2IVECTOR",mod,LSTRING2IV,
NULL);
411 defun(ctx,
"IVECTOR2LONG-LONG-BYTESTRING",mod,IV2LSTRING,
NULL);
pointer alloc(int, int, int, int)
static char buf[CHAR_SIZE]
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
pointer makevector(pointer, int)
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
int fstringdouble(context *ctx, int n, argv)
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43