git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed annoying bfchar warnings
[swftools.git]
/
lib
/
rfxswf.c
diff --git
a/lib/rfxswf.c
b/lib/rfxswf.c
index
025bcaf
..
d9444d6
100644
(file)
--- a/
lib/rfxswf.c
+++ b/
lib/rfxswf.c
@@
-474,6
+474,28
@@
void swf_SetF16(TAG * t, float f)
swf_SetU16(t, result);
}
swf_SetU16(t, result);
}
+float F16toFloat(U16 x)
+{
+ TAG t;
+ t.data = (void*)&x;
+ t.readBit = 0;
+ t.pos = 0;
+ t.len = 2;
+ return swf_GetF16(&t);
+}
+
+float floatToF16(float f)
+{
+ U16 u = 0;
+ TAG t;
+ t.data = (void*)&u;
+ t.len = 0;
+ t.memsize = 2;
+ t.writeBit = 0;
+ swf_SetF16(&t, f);
+ return u;
+}
+
double swf_GetD64(TAG*tag)
{
/* FIXME: this is not big-endian compatible */
double swf_GetD64(TAG*tag)
{
/* FIXME: this is not big-endian compatible */
@@
-1859,7
+1881,7
@@
int swf_WriteCGI(SWF * swf)
sprintf(s,"Content-type: application/x-shockwave-flash\n"
"Accept-Ranges: bytes\n"
sprintf(s,"Content-type: application/x-shockwave-flash\n"
"Accept-Ranges: bytes\n"
- "Content-Length: %lu\n"
+ "Content-Length: %d\n"
"Expires: Thu, 13 Apr 2000 23:59:59 GMT\n"
"\n",len);
"Expires: Thu, 13 Apr 2000 23:59:59 GMT\n"
"\n",len);