pike.git/
src/
encode.c
Branch:
Tag:
Non-build tags
All tags
No tags
1999-12-11
1999-12-11 00:31:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>
69b77c00c74a5cee4d1972d8a7c0b9cd985f28d7 (
50
lines) (+
38
/-
12
)
[
Show
|
Annotate
]
Branch:
7.9
Improved backward compatibility.
Rev: src/encode.c:1.50
25:
#include "version.h" #include "bignum.h"
-
RCSID("$Id: encode.c,v 1.
49
1999/12/11 00:
02
:
14
grubba Exp $");
+
RCSID("$Id: encode.c,v 1.
50
1999/12/11 00:
31
:
47
grubba Exp $");
/* #define ENCODE_DEBUG */
332:
adddata(val->u.string); break;
+
case T_TYPE:
+
/* NOTE: Floats are encoded with the tag T_TYPE (7)
+
* for backward compatibility.
+
*/
+
error("Encoding of the type type not supported yet!");
+
break;
+
case T_FLOAT: { if(val->u.float_number==0.0) {
-
/*
Backward
compatibility
!
*/
+
/*
NOTE:
Floats are encoded with the tag T_TYPE (7)
+
* for backward
compatibility
.
+
*/
code_entry(T_TYPE,0,data); code_entry(T_TYPE,0,data); }else{
354:
Inside #if 0
y++; } #endif
-
/*
Backward
compatibility
!
*/
+
/*
NOTE:
Floats are encoded with the tag T_TYPE (7)
+
* for backward
compatibility
.
+
*/
code_entry(T_TYPE,x,data); code_entry(T_TYPE,y,data); }
580:
pop_stack(); break; }
-
case T_TYPE:
-
error("Encoding of the type type not supported yet!");
-
break;
+
} }
932:
} case T_TYPE:
-
/*
Used
to
be
T_FLOAT
at
this
code
(7)
. */
-
/
*
FALL_THROUGH
*/
-
case
T_FLOAT:
+
/*
NOTE:
Floats
are
encoded
with
the
tag
T_TYPE
(7)
+
*
for
backward compatibility.
+
*/
{ INT32 num2=num;
946:
break; }
+
case T_FLOAT:
+
/* NOTE: Floats are encoded with the tag T_TYPE (7)
+
* for backward compatibility.
+
*/
+
{
+
error("Failed to decode string. "
+
"(decode of the type type isn't supported yet).\n");
+
break;
+
}
+
case T_ARRAY: { struct array *a;
1487:
case T_INT: push_int(t); return; case T_TYPE:
-
/*
Backward
compatibility!
*/
-
/*
FALL
_
THROUGH
*
/
-
case
T_FLOAT:
+
/*
NOTE:
Floats
are encoded with the tag T_TYPE (7)
+
*
for
backward compatibility.
+
*/
if(sizeof(INT32) < sizeof(float)) /* FIXME FIXME FIXME FIXME */ error("Float architecture not supported.\n"); push_int(t); /* WARNING! */ sp[-1].type = T_FLOAT; return;
-
+
case T_FLOAT:
+
/* NOTE: Floats are encoded with the tag T_TYPE (7)
+
* for backward compatibility.
+
*/
+
error("Format error:decoding of the type type not supported yet.\n");
+
return;
+
case T_STRING: if(t<0) error("Format error, length of string is negative.\n"); if(*l < t) error("Format error, string to short\n");