-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswf_parse.c
executable file
·943 lines (746 loc) · 22.2 KB
/
swf_parse.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
/*
* Copyright (C) 2001 Simon Wistow <[email protected]>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "swf_parse.h"
#include "swf_destroy.h"
#include "handy.h"
/*
* Create a new swf parser context
* Open the file given and initialise
* all buffers etc.
*/
swf_parser *
swf_parse_create (char * name, int * error)
{
swf_parser * context;
FILE * file;
/* Open the file for reading. */
file = fopen(name, "rb");
/* Did we open the file? */
if (file == NULL) {
*error = SWF_EFileOpenFailure;
return NULL;
}
if ((context = (swf_parser *) calloc (1, sizeof (swf_parser))) == NULL) {
*error = SWF_EMallocFailure;
return NULL;
}
if ((context->buffer = (swf_buffer *) calloc (1, sizeof (swf_buffer))) == NULL) {
*error = SWF_EMallocFailure;
return NULL;
}
context->file = file;
context->name = (char *) strdup (name);
context->buffer->bitpos = 0;
context->buffer->bitbuf = 0;
context->buffer->size = 0;
context->buffer->raw = NULL;
context->headers_parsed = 0;
context->frame = 0;
return context;
}
/*
* Parse the headers of the file and extract the version,
* file size, movie width and height, frame rate and count.
* Dump all this information in a swf_header structure
*/
swf_header *
swf_parse_header (swf_parser * context, int * error)
{
swf_header * header;
SWF_U8 file_hdr[8];
if ((header = (swf_header *) calloc (1, sizeof (swf_header))) == NULL) {
*error = SWF_EMallocFailure;
return NULL;
}
if (fread(file_hdr, 1, 8, context->file) != 8) {
*error = SWF_EFileReadError;
goto FAIL;
}
/* Verify the header and get the file size. */
if (file_hdr[0] != 'F' || file_hdr[1] != 'W' || file_hdr[2] != 'S' ) {
*error = SWF_ENotValidSWF;
goto FAIL;
}
/* Get the file version. */
header->version = (SWF_U16) file_hdr[3];
header->size = (SWF_U32) file_hdr[4] | ((SWF_U32) file_hdr[5] << 8) | ((SWF_U32) file_hdr[6] << 16) | ((SWF_U32) file_hdr[7] << 24);
if (header->size < 21) {
*error = SWF_EFileTooSmall;
goto FAIL;
}
/* Reposition to the 8th byte in the stream */
swf_parse_seek (context, 8);
/* get the frame information. */
header->bounds = swf_parse_get_rect(context, error);
header->rate = swf_parse_get_word(context) >> 8;
header->count = swf_parse_get_word(context);
context->headers_parsed++;
context->next_tag_pos = swf_parse_tell (context);
return header;
FAIL:
swf_destroy_header (header);
return NULL;
}
/*
* Reset the parse head to a byte boundary in the stream.
* Clear the buffer.
* (ie a zero offset in bits)
*/
void
swf_parse_initbits (swf_parser * context)
{
/* Reset the bit position and buffer. */
context->buffer->bitpos = 0;
context->buffer->bitbuf = 0;
}
/*
* Get an 8-bit byte from the stream, and move the
* parse head on by one.
*/
SWF_U8
swf_parse_get_byte(swf_parser * context)
{
SWF_U8 byte;
swf_parse_initbits(context);
fread (&byte, 1, 1, context->file);
context->filepos++;
return byte;
}
/*
* Ensure the parse head is byte-aligned and read the specified
* number of bytes from the stream.
* NOTE: we do calloc'ing here....
*/
SWF_U8 *
swf_parse_get_bytes (swf_parser * context, SWF_U32 nbytes)
{
SWF_U8 * bytes;
if ((bytes = (SWF_U8 *) calloc (nbytes, sizeof (SWF_U8))) == NULL) {
/* todo : pass back errors ?*/
return NULL;
}
swf_parse_initbits(context);
fread (bytes, 1, nbytes, context->file);
context->filepos += nbytes;
return bytes;
}
/*
* Get n bits from the stream.
*/
SWF_U32
swf_parse_get_bits (swf_parser * context, SWF_S32 n)
{
SWF_U32 v = 0;
while (1) {
SWF_S32 s = n - context->buffer->bitpos;
if (s > 0) {
/* Consume the entire buffer */
v |= context->buffer->bitbuf << s;
n -= context->buffer->bitpos;
/* Get the next buffer */
context->buffer->bitbuf = swf_parse_get_byte(context);
context->buffer->bitpos = 8;
} else {
/* Consume a portion of the buffer */
v |= context->buffer->bitbuf >> -s;
context->buffer->bitpos -= n;
context->buffer->bitbuf &= 0xff >> (8 - context->buffer->bitpos); /* mask off the consumed bits. */
return v;
}
}
}
/*
* Get n bits from the stream with sign extension.
*/
SWF_S32
swf_parse_get_sbits(swf_parser * context, SWF_S32 n)
{
/* Get the number as an unsigned value. */
SWF_S32 v = (SWF_S32) swf_parse_get_bits(context, n);
/* Is the number negative? */
if (v & (1L << (n - 1))) {
/* Yes. Extend the sign. */
v |= -1L << n;
}
return v;
}
/*
* Get a 16-bit word from the stream, and move the
* parse head on by two.
*/
SWF_U16
swf_parse_get_word(swf_parser * context)
{
swf_parse_initbits(context);
return (SWF_U16) swf_parse_get_byte(context) | ((SWF_U16) swf_parse_get_byte(context) << 8);
}
/*
* Get a 32-bit dword from the stream, and move the
* parse head on by four.
*/
SWF_U32
swf_parse_get_dword(swf_parser * context)
{
swf_parse_initbits(context);
return (SWF_U32) swf_parse_get_byte(context) | ((SWF_U32) swf_parse_get_byte(context) << 8) | ((SWF_U32) swf_parse_get_byte(context) << 16) | ((SWF_U32) swf_parse_get_byte(context) << 24);
}
/*
* Parse the ID code of the next tag from the stream.
* Extract the tag length and use it to tell our context what
* stream position the next tag starts at.
*
* Return the ID code of the tag.
*/
SWF_U32
swf_parse_nextid(swf_parser * context, int * error)
{
SWF_U16 raw_code, id;
if (context->headers_parsed == 0) {
fprintf (stderr, "Headers, not parsed yet\n");
return -1;
}
if (swf_parse_tell(context) != context->next_tag_pos) {
swf_parse_seek(context, context->next_tag_pos);
}
/* Get the combined code and length of the tag. */
raw_code = swf_parse_get_word(context);
id = raw_code;
/* The length is encoded in the tag. */
context->cur_tag_len = id & 0x3f;
/* Remove the length from the code. */
id = id >> 6;
/* Determine if another long word must be read to get the length. */
if (context->cur_tag_len == 0x3f) {
/* Long tag .. */
context->cur_tag_len = (SWF_U32) swf_parse_get_dword(context);
}
context->next_tag_pos = swf_parse_tell(context) + context->cur_tag_len;
return id;
}
/*
* Seek a defined position in the stream. Useful for,
* eg skipping over the header information to begin tag
* parsing. The argument must be an absolute value of 8-bit
* bytes in the stream.
*/
void
swf_parse_seek (swf_parser * context, int pos)
{
fseek(context->file, pos, SEEK_SET);
return;
}
/*
* Skips ahead by the specified number of 8-bit
* bytes. Presumably a negative offset skips back.
*/
void
swf_parse_skip (swf_parser * context, int bytes)
{
swf_parse_seek (context, swf_parse_tell(context) + bytes);
return;
}
/*
* Returns the current offset within the stream.
*/
int
swf_parse_tell (swf_parser * context)
{
return (int) ftell (context->file);
}
/* nsyms also flags creation */
swf_font_extra*
swf_fetch_font_extra(swf_parser* context, int fontid, int nsyms)
{
swf_font_extra *extra, *last;
last = NULL;
extra = context->font_extras;
while (extra) {
if (fontid == extra->fontid) return extra;
last = extra;
extra = extra->next;
}
if (!nsyms) return NULL;
if (!((extra = calloc(1, sizeof(swf_font_extra))) &&
(extra->glyphs = calloc(nsyms, sizeof(char))) &&
(extra->chars = calloc(nsyms, sizeof(char))) ))
{
return NULL;
}
extra->fontid = fontid;
extra->n = nsyms;
if (last) {
last->next = extra;
}
else {
context->font_extras = extra;
}
return extra;
}
/*
* Grabs a string of chars out of the stream.
* NOTE - uses a hard-coded value of 255 for the maximum
* length of a string buffer.
*/
char *
swf_parse_get_string (swf_parser * context, int * error)
{
//todo : h-h-h-hack?
char * string;
char byte = (char) NULL;
int sp = 0;
if ( (string = (char *) calloc( 255, sizeof(char) )) == NULL) {
*error = SWF_EMallocFailure;
return NULL;
}
while (sp < 255 ) {
/** string++ = byte; */
byte = (char) swf_parse_get_byte(context);
if (byte == (char) NULL) {
break;
}
string[sp++] = byte;
byte = (char) NULL;
}
string[sp] = '\0';
return string;
}
SWF_U32
swf_parse_get_colour (swf_parser * context, int * error, int with_alpha)
{
SWF_U32 r,g,b,a;
r = swf_parse_get_byte(context);
g = swf_parse_get_byte(context);
b = swf_parse_get_byte(context);
a = 0xff;
if (with_alpha) {
a = swf_parse_get_byte(context);
}
return (a << 24) | (r << 16) | (g << 8) | b;
}
/*
* ActionScript Condition handler
*/
swf_button2action_list *
swf_parse_get_button2actions (swf_parser * context, int * error)
{
swf_button2action_list * list;
swf_button2action * temp;
int test = 0;
if ((list = (swf_button2action_list *) calloc (1, sizeof(swf_button2action_list))) == NULL)
{
*error = SWF_EMallocFailure;
return NULL;
}
list->first = NULL;
list->lastp = &(list->first);
while (TRUE)
{
SWF_U32 action_offset = 0;
SWF_U32 next_action = 0;
action_offset = swf_parse_get_word (context);
next_action = swf_parse_tell (context) + action_offset - 2;
dprintf ("[get_button2action_list : action_offset = %"pSWF_U32"x %"pSWF_U32"x (%d)]\n", action_offset, next_action, test);
if ((temp = (swf_button2action *) calloc (1, sizeof(swf_button2action))) == NULL)
{
*error = SWF_EMallocFailure;
goto FAIL;
}
temp->condition = swf_parse_get_word (context);
if ((temp->doactions = (swf_doaction_list *) swf_parse_get_doactions (context, error)) == NULL)
{
swf_free (temp);
goto FAIL;
}
*(list->lastp) = temp;
list->lastp = &(temp->next);
if (action_offset == 0)
{
break;
}
swf_parse_seek (context, next_action);
test++;
}
return list;
FAIL:
swf_destroy_button2action_list (list);
return NULL;
}
/*
* ActionScript handler.
*/
swf_doaction_list *
swf_parse_get_doactions (swf_parser * context, int * error)
{
swf_doaction_list * list;
swf_doaction * temp;
if ((list = (swf_doaction_list *) calloc (1, sizeof (swf_doaction_list))) == NULL)
{
*error = SWF_EMallocFailure;
goto FAIL;
}
list->first = NULL;
list->lastp = &(list->first);
do
{
if ((temp = swf_parse_get_doaction(context, error)) == NULL)
{
goto FAIL;
}
*(list->lastp) = temp;
list->lastp = &(temp->next);
} while (temp->code != 0x00);
return list;
FAIL:
swf_destroy_doaction_list (list);
return NULL;
}
swf_textrecord_list *
swf_parse_get_textrecords (swf_parser * context, int * error, int has_alpha, int glyph_bits, int advance_bits)
{
swf_textrecord_list * list;
swf_textrecord * temp;
dprintf ("[get_textrecords : mallocing]\n");
if ((list = (swf_textrecord_list *) calloc (1, sizeof (swf_textrecord_list))) == NULL)
{
goto FAIL;
}
list->first = NULL;
list->lastp = &(list->first);
while (1)
{
dprintf ("[get_textrecords : attempting to get a record]\n");
if ((temp = swf_parse_get_textrecord(context, error, has_alpha, glyph_bits, advance_bits)) == NULL)
{
//if (error != SWF_ENoError)
//{
// goto FAIL;
//}
break;
}
dprintf ("[get_textrecords : got a record]\n");
*(list->lastp) = temp;
list->lastp = &(temp->next);
}
dprintf ("[get_textrecords : returning]\n");
return list;
FAIL:
dprintf ("[get_text_records : FAILED!]\n");
swf_destroy_textrecord_list (list);
return NULL;
}
swf_buttonrecord_list *
swf_parse_get_buttonrecords (swf_parser * context, int * error, int with_alpha)
{
SWF_U32 button_end;
swf_buttonrecord_list * list;
swf_buttonrecord * temp;
if ((list = (swf_buttonrecord_list *) calloc (1, sizeof (swf_buttonrecord_list))) == NULL)
{
goto FAIL;
}
list->first = NULL;
list->lastp = &(list->first);
button_end = swf_parse_get_byte (context);
do
{
if ((temp = swf_parse_get_buttonrecord(context, error, button_end, with_alpha)) == NULL)
{
goto FAIL;
}
*(list->lastp) = temp;
list->lastp = &(temp->next);
}
while ((button_end = (SWF_U32) swf_parse_get_byte(context)) != 0);
return list;
FAIL:
swf_destroy_buttonrecord_list (list);
return NULL;
}
swf_buttonrecord *
swf_parse_get_buttonrecord (swf_parser * context, int * error, int byte, int with_alpha)
{
swf_buttonrecord * button;
SWF_U32 pad;
int i;
if ((button = (swf_buttonrecord *) calloc (1, sizeof (swf_buttonrecord))) == NULL) {
*error = SWF_EMallocFailure;
return NULL;
}
pad = byte >> 4;
button->state_hit_test = (byte & 0x8);
button->state_down = (byte & 0x4);
button->state_over = (byte & 0x2);
button->state_up = (byte & 0x1);
button->character = swf_parse_get_word (context);
button->layer = swf_parse_get_word (context);
if ((button->matrix = swf_parse_get_matrix(context, error)) == NULL) {
goto FAIL;
}
button->ncharacters = 0;
button->characters = NULL;
if (with_alpha) {
/* charactersInButton always seems to be one */
button->ncharacters = 1;
if ((button->characters = (swf_cxform **) calloc (button->ncharacters, sizeof (swf_cxform *))) == NULL) {
*error = SWF_EMallocFailure;
goto FAIL;
}
for (i=0; i<button->ncharacters; i++)
{
button->characters[i] = NULL;
if ((button->characters[i] = swf_parse_get_cxform (context, error, TRUE)) == NULL) /* could be false here? */
{
goto FAIL;
}
}
}
return button;
FAIL:
swf_destroy_buttonrecord (button);
return NULL;
}
char *
swf_parse_textrecords_to_text (swf_parser * context, int * error, swf_textrecord_list * list)
{
int g;
int font_id = -1;
char * str = NULL;
swf_textrecord *node, *tmp;
swf_font_extra *font;
if (list==NULL)
{
/* todo simon : should eal with thsi more cleanly */
return NULL;
}
dprintf ("[textrecords_to_text : list is not null]\n");
node = list->first;
dprintf ("[textrecords_to_text : node is %s]\n", (node==NULL)?"NULL":"Ok");
/* todo simon : if node == NULL need to cope */
while (node != NULL)
{
dprintf ("[textrecords_to_text : node is not NULL]\n");
if (node->flags & isTextControl)
{
dprintf ("[textrecords_to_text : it's a text control]\n");
if ( node->flags & textHasFont)
{
font_id = node->font_id;
dprintf ("[textrecords_to_text : font_id is %d]\n", font_id);
}
}
else {
dprintf ("[textrecords_to_text : mallocing string %d : fontid now %d]\n", node->glyph_count, font_id);
/* malloc to the size of the string */
if ((str = (char *) calloc (node->glyph_count+1, sizeof (char))) == NULL)
{
*error = SWF_EMallocFailure;
return NULL;
}
dprintf ("[textrecords_to_text : malloced string]\n");
if (!(font = swf_fetch_font_extra(context, font_id, 0)))
{
*error = SWF_EFontNotSet;
return NULL;
}
dprintf ("[textrecords_to_text : number of glyphs is %d]\n", node->glyph_count);
/* ... and then set it */
for (g=0; g< node->glyph_count; g++)
{
str[g] = font->chars[node->glyphs[g][0]];
}
str[g]='\0';
dprintf ("[textrecords_to_text : string is '%s']\n", str);
/* todo :sometimes there's more than one peice of text ... we shoudl probably cope with that as well */
return str;
}
tmp = node;
node = node->next;
}
dprintf ("[textrecords_to_text : attempting to return]\n");
if (font_id == -1) {
/* somethings gone wrong */
dprintf ("[textrecords_to_text : EFontNotSet]\n");
//todo simon : why is this not working *error = SWF_EFontNotSet;
return NULL;
}
if (str == NULL) {
/* somethings gone wrong */
dprintf ("[textrecords_to_text : EStringNotSet]\n");
*error = SWF_EFontNotSet; /*todo : need to change error message */
return NULL;
}
/* et voila */
dprintf ("[textrecords_to_text : returning]\n");
return str;
}
/*
* $Log: swf_parse.c,v $
* Revision 1.56 2002/07/15 14:31:52 kitty_goth
* Gen Test 5 segfaults but does PNG bitmaps now, or at least starts to.
*
* Revision 1.55 2002/07/11 16:16:47 kitty_goth
* This is still borken. Checkin to carry on at home
*
* Revision 1.54 2002/06/28 17:52:42 muttley
* Trying to get write_through to work
*
* Revision 1.53 2002/06/26 21:36:45 kitty_goth
* More changes. Still some minor oddnesses with writethrough
*
* Revision 1.52 2002/06/20 17:02:16 kitty_goth
* Coloured fills work properly. Got rid of the SWF_U32 nasty representation
* of colours.
*
* Revision 1.51 2002/06/10 16:44:02 kitty_goth
* Refactor and a bit of a cleanup.
*
* Revision 1.50 2002/06/03 22:28:34 kitty_goth
* Fix memory leask and a couple of minor nits
*
* Revision 1.49 2002/05/20 17:05:26 kitty_goth
* Minor nits. sync to carry on at home.
*
* Revision 1.48 2002/05/10 17:07:51 kitty_goth
* Right, this leaks like a son of a bitch, and I've only tested it against
* gen_test1, but the buffer delta should work now.
*
* Please hack on it lots, it needs it.
*
* Revision 1.47 2002/05/09 15:26:55 clampr
* More stealing from perl, now we have pSWF_* macros which are the printf
* formats for out internal data types.
*
* Plus a few -Wall cleanups
*
* Revision 1.46 2002/05/09 01:33:33 clampr
*
* couple of dprintfs written as fprintfs, couple reversed, axed a few Log tags
*
* Revision 1.45 2001/07/23 22:34:45 muttley
* Fix warning about comment like text in the logs
*
* Revision 1.44 2001/07/20 01:59:18 clampr
* move cvs log to the end of the file
*
* switch to handy.h, dprintf tidy
*
* Revision 1.43 2001/07/16 15:05:15 clampr
* get rid of glib due to randomness (I suspect it may have been a dynamic linking issue)
*
* add in a homebrew linked list type for font_extras (ick)
*
* Revision 1.42 2001/07/16 01:41:25 clampr
* glib version of font management
*
* Revision 1.41 2001/07/15 15:12:53 clampr
* move the mp3 stuff to definesound
*
* Revision 1.40 2001/07/15 14:09:46 clampr
* slice swf_parse.c and swf_destroy.c into tag/.c files
*
* Revision 1.39 2001/07/14 23:45:48 clampr
* one bigass layout delta
*
* Revision 1.38 2001/07/14 23:28:01 clampr
* spurious line deltas 'o the day
*
* Revision 1.37 2001/07/14 23:17:11 clampr
* tweak up some layout
*
* Revision 1.36 2001/07/14 23:03:18 clampr
* avoid a calloc(0)
*
* Revision 1.35 2001/07/14 22:14:09 clampr
* avoid calloc(0)
*
* Revision 1.34 2001/07/14 21:35:02 clampr
* swf_parse_definebuttonsound don't free something being returned
*
* Revision 1.33 2001/07/14 00:17:55 clampr
* added emacs file variables to avoid clashing with existing style (now I know what it is)
*
* Revision 1.32 2001/07/13 15:58:08 muttley
* Bad Simon! Don't turn on DEBUG in a file, use make
*
* Revision 1.31 2001/07/13 15:22:07 clampr
* another realloc of NULL
*
* Revision 1.30 2001/07/13 14:58:44 clampr
* avoid a calloc(0)
*
* Revision 1.29 2001/07/13 14:51:41 clampr
* paper over some cracks fond in 3deng_01.swf
*
* Revision 1.28 2001/07/13 14:47:34 clampr
* malloc the right type
*
* Revision 1.27 2001/07/13 14:35:18 muttley
* Fix bug in parsing button2actions
*
* Revision 1.26 2001/07/13 14:02:51 clampr
* s/free/swf_free/
*
* Revision 1.25 2001/07/13 13:26:55 muttley
* Added handling for button2actions.
* We should be able to parse all URLs now
*
* Revision 1.23 2001/07/13 00:57:48 clampr
* fixed a memory leak in swf_parser->font_chars deallocation
* documented a magic number that needs slaying
*
* Revision 1.22 2001/07/13 00:32:31 clampr
* juggle to avoid calloc(0, sizeof(SWF_U8))
*
* Revision 1.21 2001/07/09 15:48:54 acme
* Renamed U32 to SWF_U32 and so on
*
* Revision 1.20 2001/07/09 12:38:57 muttley
* A few bug fixes
*
* Revision 1.15 2001/06/30 12:33:18 kitty_goth
* Move to a linked list representation of shaperecords - I was getting
* SEGFAULT due to not large enough free chunk's. Seems much faster now.
* --Kitty
*
* Revision 1.14 2001/06/30 09:55:35 kitty_goth
* Synch with Simons mods
*
* Revision 1.13 2001/06/29 15:10:11 muttley
* The printing of the actual text of a DefineText (and DefineText2 now)
* is no longer such a big hack. Font information is kept in the swf_parser
* context and the function that will take a text_record_list and print out
* the text (textrecord_list_to_text) has been moved to swf_parse.c ...
*
* A couple of potential bugs have also been fixed and some more 'todo's added
*
* Revision 1.12 2001/06/27 12:42:15 kitty_goth
* Debug shaperecord handling --Kitty
*
* Revision 1.11 2001/06/26 17:40:30 kitty_goth
* Bug fix for swf_parse_get_bytes to fix sound stream stuff. --Kitty
*
* Revision 1.10 2001/06/26 13:43:02 muttley
* Fix text_record and text_record_list parsing
*
*/
/*
Local Variables:
mode: C
c-basic-offset: 4
tab-width: 4
End:
*/