Overview
| Comment: | Fill in the VARIABLES table |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
fd3a87fc5024a76533f0c788a0c8c513 |
| User & Date: | user on 2018-06-10 21:26:18.787 |
| Other Links: | manifest | tags |
Context
|
2018-06-15
| ||
| 21:06 | Add the MESSAGES virtual table check-in: ee25076d50 user: user tags: trunk | |
|
2018-06-10
| ||
| 21:26 | Fill in the VARIABLES table check-in: fd3a87fc50 user: user tags: trunk | |
| 16:34 | Add some SQL functions check-in: 81f52e6f42 user: user tags: trunk | |
Changes
Modified class.c
from [2ba6e49ee7]
to [59aa7eb0cd].
| ︙ | |||
1324 1325 1326 1327 1328 1329 1330 | 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 | - + |
cl->images[tokenv]|=0x8000;
} else {
ParseError("Expected ( or ) or number\n");
}
}
}
|
| ︙ | |||
1459 1460 1461 1462 1463 1464 1465 | 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 | - + + + + + + + + + + |
}
end_label_stack(cl->codes,hash);
if(!cl->nimages) cl->oflags|=OF_INVISIBLE;
if(main_options['C']) dump_class(cla,ptr,hash);
if(main_options['H']) {
for(i=0;i<LOCAL_HASH_SIZE;i++) if(hash[i].id) printf(" \"%s\": %04X\n",hash[i].txt,hash[i].id);
}
|
| ︙ | |||
1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 | 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 | + |
}
void load_classes(void) {
int i;
int gloptr=0;
Hash*glolocalhash;
char*nam=sqlite3_mprintf("%s.class",basefilename);
sqlite3_stmt*vst=0;
fprintf(stderr,"Loading class definitions...\n");
if(!nam) fatal("Allocation failed\n");
classfp=fopen(nam,"r");
sqlite3_free(nam);
if(!classfp) fatal("Cannot open class file '%s': %m\n",nam);
glohash=calloc(HASH_SIZE,sizeof(Hash));
if(!glohash) fatal("Allocation failed\n");
|
| ︙ | |||
1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 | 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 | + - + |
*classes=malloc(sizeof(Class));
if(!*classes) fatal("Allocation failed\n");
classes[0]->name=classes[0]->edithelp=classes[0]->gamehelp=0;
classes[0]->codes=classes[0]->messages=classes[0]->images=0;
classes[0]->nmsg=0;
memset(functions,-1,sizeof(functions));
load_class_numbers();
if(userdb && (i=sqlite3_prepare_v2(userdb,"INSERT INTO `VARIABLES`(`ID`,`NAME`) VALUES(?1,?2);",-1,&vst,0))) fatal("SQL error (%d): %s\n",i,sqlite3_errmsg(userdb));
for(;;) {
nxttok();
if(tokent==TF_EOF) goto done;
if(tokent!=TF_OPEN) ParseError("Expected open parenthesis\n");
nxttok();
if(Tokenf(TF_FUNCTION)) {
functions[tokenv&0x3FFF]=gloptr;
begin_label_stack();
gloptr=parse_instructions(0,gloptr,glolocalhash,0);
end_label_stack(classes[0]->codes,glolocalhash);
} else if(Tokenf(TF_NAME)) {
switch(tokenv) {
case 0x4000 ... 0x7FFF: // Class definition
|
| ︙ | |||
1616 1617 1618 1619 1620 1621 1622 | 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 | - + + + + + + + + + + + |
for(i=0;i<LOCAL_HASH_SIZE;i++) free(glolocalhash[i].txt);
free(glolocalhash);
for(i=0;i<num_functions;i++) if(functions[i]==0xFFFF) {
int j;
for(j=0;j<HASH_SIZE;j++) if(glohash[j].id==i+0x8000) fatal("Function &%s mentioned but not defined\n",glohash[j].txt);
fatal("Function mentioned but not defined\n");
}
|
Modified picture.c
from [6b3d3ff78d]
to [b641536c5e].
| ︙ | |||
262 263 264 265 266 267 268 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | - + |
i|=fgetc(fp)<<0;
i|=fgetc(fp)<<8;
if(j) {
memset(havesize1,0,256);
i-=j=fgetc(fp)&15;
while(j--) havesize1[fgetc(fp)&255]=1;
fseek(fp,i-1,SEEK_CUR);
|
| ︙ |