X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=src%2Fswfc.c;fp=src%2Fswfc.c;h=0a1bf112089b3d4cb307d31d2a7511dde1d97a31;hp=c548b5cb715ae0f059b8e5cad5625c10a039c8d2;hb=bd936b85021d03bc16b12e54414f68e79593a59b;hpb=b494b3ba21177c20855b6c86d8aa1f1feb557483 diff --git a/src/swfc.c b/src/swfc.c index c548b5c..0a1bf11 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -360,10 +360,11 @@ static void freeFontDictionary() static void incrementid() { - while(idmap[++id]) { - if(id==65535) - syntaxerror("Out of character ids."); + while(id<65536 && idmap[id]) { + id++; } + if(id>=65536) + syntaxerror("Out of character ids."); idmap[id] = 1; } @@ -4330,34 +4331,30 @@ static void parseArgumentsForCommand(char*command) if(nr<0) syntaxerror("command %s not known", command); +#ifndef EMPTY // catch missing .flash directives at the beginning of a file if(strcmp(command, "flash") && !stackpos) { - syntaxerror("No movie defined- use .flash first"); + syntaxerror("No movie defined- use .flash first"); } +#endif #ifdef DEBUG printf(".%s\n", command);fflush(stdout); map_dump(&args, stdout, "\t");fflush(stdout); #endif +#ifndef EMPTY (*arguments[nr].func)(&args); - - /*if(!strcmp(command, "button") || - !strcmp(command, "action")) { - while(1) { - readToken(); - if(type == COMMAND) { - if(!strcmp(text, "end")) - break; - else { - pushBack(); - break; - } - } +#else + if(!strcmp(command, "action") || !strcmp(command, "initaction") || + !strcmp(command, "outline") || !strcmp(command, "gradient")) { + readToken(); + if(type != RAWDATA) { + syntaxerror("colon (:) expected"); } - }*/ - + } +#endif map_clear(&args); return; }