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 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 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 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696
|
Description: Avoid conflicting with C23 bool
Author: Stephen Kitt <skitt@debian.org>
Forwarded: not-needed
This replaces bool with int since the former is defined as the latter
in Frotz, to avoid conflicting with C23 bool. Since this results in a
lot of lost type information, it’s not suitable for upstream
contribution.
--- a/src/common/frotz.h
+++ b/src/common/frotz.h
@@ -47,7 +47,6 @@
#ifndef __UNIX_PORT_FILE
#include <signal.h>
-typedef int bool;
#endif /* __UNIX_PORT_FILE */
@@ -623,12 +622,12 @@
extern zword zargs[8];
extern int zargc;
-extern bool ostream_screen;
-extern bool ostream_script;
-extern bool ostream_memory;
-extern bool ostream_record;
-extern bool istream_replay;
-extern bool message;
+extern int ostream_screen;
+extern int ostream_script;
+extern int ostream_memory;
+extern int ostream_record;
+extern int istream_replay;
+extern int message;
extern int cwin;
extern int mwin;
@@ -638,12 +637,12 @@
extern int menu_selected;
extern int mouse_button;
-extern bool enable_wrapping;
-extern bool enable_scripting;
-extern bool enable_scrolling;
-extern bool enable_buffering;
+extern int enable_wrapping;
+extern int enable_scripting;
+extern int enable_scrolling;
+extern int enable_buffering;
-extern bool need_newline_at_exit;
+extern int need_newline_at_exit;
extern char *option_zcode_path; /* dg */
@@ -655,7 +654,7 @@
#ifdef TOPS20
/* A weird little TOPS-20 accomodation */
-extern bool spurious_getchar;
+extern int spurious_getchar;
#endif
/*** Z-machine opcodes ***/
@@ -774,7 +773,7 @@
/* Definitions and macros for error handling functions and error codes. */
void init_err(void);
-void _runtime_error(int, bool);
+void _runtime_error(int, int);
#define runtime_error_repeat(errnum) _runtime_error(errnum, TRUE)
#define runtime_error(errnum) _runtime_error(errnum, FALSE)
@@ -861,7 +860,7 @@
void ret(zword);
void store(zword);
-void branch(bool);
+void branch(int);
void storeb(zword, zbyte);
void storew(zword, zword);
@@ -870,9 +869,9 @@
int completion(const zchar *buffer, zchar *result);
-bool is_terminator(zchar);
+int is_terminator(zchar);
void read_string(int max, zchar *buffer);
-bool read_yes_or_no(const char *);
+int read_yes_or_no(const char *);
int colour_in_use(zword);
@@ -941,7 +940,7 @@
void resize_screen(void);
/* This is callable only from resize_screen. */
-bool os_repaint_window(int win, int ypos_old, int ypos_new, int xpos,
+int os_repaint_window(int win, int ypos_old, int ypos_new, int xpos,
int ysize, int xsize);
#endif
--- a/src/common/buffer.c
+++ b/src/common/buffer.c
@@ -54,7 +54,7 @@
*/
void flush_buffer(void)
{
- static bool locked = FALSE;
+ static int locked = FALSE;
/* Make sure we stop when flush_buffer is called from flush_buffer.
* Note that this is difficult to avoid as we might print a newline
@@ -85,7 +85,7 @@
*/
void print_char(zchar c)
{
- static bool flag = FALSE;
+ static int flag = FALSE;
need_newline_at_exit = TRUE;
if (message || ostream_memory || enable_buffering) {
--- a/src/common/err.c
+++ b/src/common/err.c
@@ -99,7 +99,7 @@
* errnum : Numeric code for error (1 to ERR_NUM_ERRORS)
*
*/
-void _runtime_error(int errnum, bool repeat)
+void _runtime_error(int errnum, int repeat)
{
int wasfirst;
--- a/src/common/fastmem.c
+++ b/src/common/fastmem.c
@@ -753,7 +753,7 @@
*/
void z_restart(void)
{
- static bool first_restart = TRUE;
+ static int first_restart = TRUE;
flush_buffer();
--- a/src/common/files.c
+++ b/src/common/files.c
@@ -29,11 +29,11 @@
#define SEEK_END 2
#endif
-extern void set_more_prompts (bool);
+extern void set_more_prompts (int);
-extern bool is_terminator (zchar);
+extern int is_terminator (zchar);
-extern bool read_yes_or_no (const char *);
+extern int read_yes_or_no (const char *);
/* char script_name[MAX_FILE_NAME + 1] = DEFAULT_SCRIPT_NAME; */
/* char command_name[MAX_FILE_NAME + 1] = DEFAULT_COMMAND_NAME; */
@@ -63,7 +63,7 @@
*/
void script_open(void)
{
- static bool script_valid = FALSE;
+ static int script_valid = FALSE;
char *new_name;
@@ -332,7 +332,7 @@
* Helper function for record_char.
*
*/
-static void record_code(int c, bool force_encoding)
+static void record_code(int c, int force_encoding)
{
if (force_encoding || c == '[' || c < 0x20 || c > 0x7e) {
int i;
--- a/src/common/hotkey.c
+++ b/src/common/hotkey.c
@@ -24,7 +24,7 @@
extern int read_number (void);
-extern bool read_yes_or_no (const char *);
+extern int read_yes_or_no (const char *);
extern void replay_open (void);
extern void replay_close (void);
@@ -39,7 +39,7 @@
* ...allows user to toggle cheating options on/off.
*
*/
-static bool hot_key_debugging(void)
+static int hot_key_debugging(void)
{
print_string ("Debugging options\n");
f_setup.attribute_assignment = read_yes_or_no("Watch attribute assignment");
@@ -56,7 +56,7 @@
* ...displays a list of all hot keys.
*
*/
-static bool hot_key_help(void)
+static int hot_key_help(void)
{
print_string ("Help\n");
print_string (
@@ -79,7 +79,7 @@
* ...allows user to turn playback on.
*
*/
-static bool hot_key_playback(void)
+static int hot_key_playback(void)
{
print_string ("Playback on\n");
if (!istream_replay)
@@ -94,7 +94,7 @@
* ...allows user to turn recording on/off.
*
*/
-static bool hot_key_recording(void)
+static int hot_key_recording(void)
{
if (istream_replay) {
print_string("Playback off\n");
@@ -116,7 +116,7 @@
* ...allows user to seed the random number seed.
*
*/
-static bool hot_key_seed(void)
+static int hot_key_seed(void)
{
print_string("Seed random numbers\n");
print_string("Enter seed value (or return to randomize): ");
@@ -131,7 +131,7 @@
* ...allows user to undo the previous turn.
*
*/
-static bool hot_key_undo(void)
+static int hot_key_undo(void)
{
print_string("Undo one turn\n");
if (restore_undo()) {
@@ -157,7 +157,7 @@
* ...allows user to start a new game.
*
*/
-static bool hot_key_restart(void)
+static int hot_key_restart(void)
{
print_string("New game\n");
if (read_yes_or_no("Do you wish to restart")) {
@@ -174,7 +174,7 @@
* ...allows user to exit the game.
*
*/
-static bool hot_key_quit(void)
+static int hot_key_quit(void)
{
print_string("Exit game\n");
if (read_yes_or_no("Do you wish to quit")) {
@@ -192,10 +192,10 @@
* true to abort the current input action.
*
*/
-bool handle_hot_key(zchar key)
+int handle_hot_key(zchar key)
{
if (cwin == 0) {
- bool aborting;
+ int aborting;
aborting = FALSE;
print_string ("\nHot key -- ");
--- a/src/common/input.c
+++ b/src/common/input.c
@@ -22,12 +22,12 @@
extern int save_undo(void);
-extern zchar stream_read_key(zword, zword, bool);
-extern zchar stream_read_input(int, zchar *, zword, zword, bool, bool);
+extern zchar stream_read_key(zword, zword, int);
+extern zchar stream_read_input(int, zchar *, zword, zword, int, int);
-extern void tokenise_line(zword, zword, zword, bool);
+extern void tokenise_line(zword, zword, zword, int);
zword unicode_tolower(zword);
-static bool truncate_question_mark(void);
+static int truncate_question_mark(void);
/*
@@ -36,7 +36,7 @@
* Check if the given key is an input terminator.
*
*/
-bool is_terminator(zchar key)
+int is_terminator(zchar key)
{
if (key == ZC_TIME_OUT)
return TRUE;
@@ -84,7 +84,7 @@
* Ask the user a question; return true if the answer is yes.
*
*/
-bool read_yes_or_no(const char *s)
+int read_yes_or_no(const char *s)
{
zchar key;
@@ -330,7 +330,7 @@
* the trailing question mark to be truncated.
*
*/
-static bool truncate_question_mark(void)
+static int truncate_question_mark(void)
{
if (story_id == ZORK1) return TRUE;
if (story_id == ZORK2) return TRUE;
--- a/src/common/main.c
+++ b/src/common/main.c
@@ -37,7 +37,7 @@
extern void reset_screen (void);
extern void reset_memory (void);
-bool need_newline_at_exit = FALSE;
+int need_newline_at_exit = FALSE;
/* Story file name, id number and size */
char *story_name = 0;
@@ -57,12 +57,12 @@
zword frame_count = 0;
/* IO streams */
-bool ostream_screen = TRUE;
-bool ostream_script = FALSE;
-bool ostream_memory = FALSE;
-bool ostream_record = FALSE;
-bool istream_replay = FALSE;
-bool message = FALSE;
+int ostream_screen = TRUE;
+int ostream_script = FALSE;
+int ostream_memory = FALSE;
+int ostream_record = FALSE;
+int istream_replay = FALSE;
+int message = FALSE;
/* Current window and mouse data */
int cwin = 0;
@@ -71,10 +71,10 @@
int mouse_x = 0;
/* Window attributes */
-bool enable_wrapping = FALSE;
-bool enable_scripting = FALSE;
-bool enable_scrolling = FALSE;
-bool enable_buffering = FALSE;
+int enable_wrapping = FALSE;
+int enable_scripting = FALSE;
+int enable_scrolling = FALSE;
+int enable_buffering = FALSE;
int option_sound = 1;
char *option_zcode_path;
@@ -84,7 +84,7 @@
#ifdef TOPS20
/* Strange little TOPS-20 accomodation */
-bool spurious_getchar = FALSE;
+int spurious_getchar = FALSE;
#endif
/*
--- a/src/common/object.c
+++ b/src/common/object.c
@@ -60,7 +60,7 @@
{
zlong obj_addr;
zword obj_size;
- bool fatal_error_given = FALSE;
+ int fatal_error_given = FALSE;
/* Calculate object address */
if (z_header.version <= V3) {
--- a/src/common/process.c
+++ b/src/common/process.c
@@ -415,7 +415,7 @@
* return true.
*
*/
-void branch(bool flag)
+void branch(int flag)
{
long pc;
zword offset;
--- a/src/common/quetzal.c
+++ b/src/common/quetzal.c
@@ -83,7 +83,7 @@
/* Read one word from file; return TRUE if OK. */
-static bool read_word(FILE * f, zword * result)
+static int read_word(FILE * f, zword * result)
{
int a, b;
@@ -98,7 +98,7 @@
/* Read one long from file; return TRUE if OK. */
-static bool read_long(FILE * f, zlong * result)
+static int read_long(FILE * f, zlong * result)
{
int a, b, c, d;
--- a/src/common/redirect.c
+++ b/src/common/redirect.c
@@ -40,7 +40,7 @@
* Begin output redirection to the memory of the Z-machine.
*
*/
-void memory_open(zword table, zword xsize, bool buffering)
+void memory_open(zword table, zword xsize, int buffering)
{
#ifdef TOPS20
short sxs;
--- a/src/common/screen.c
+++ b/src/common/screen.c
@@ -43,10 +43,10 @@
static int font_height = 1;
static int font_width = 1;
-static bool input_redraw = FALSE;
-static bool more_prompts = TRUE;
-static bool discarding = FALSE;
-static bool cursor = TRUE;
+static int input_redraw = FALSE;
+static int more_prompts = TRUE;
+static int discarding = FALSE;
+static int cursor = TRUE;
static int input_window = 0;
@@ -162,7 +162,7 @@
* some Infocom games.
*
*/
-static bool amiga_screen_model (void)
+static int amiga_screen_model (void)
{
if (z_header.interpreter_number == INTERP_AMIGA) {
switch (story_id) {
@@ -199,7 +199,7 @@
* Turn more prompts on/off.
*
*/
-void set_more_prompts(bool flag)
+void set_more_prompts(int flag)
{
if (flag && !more_prompts)
cwp->line_count = 0;
@@ -375,7 +375,7 @@
{
int width;
- bool last_char_space = FALSE;
+ int last_char_space = FALSE;
if (discarding)
return;
@@ -471,7 +471,7 @@
* Read an input line from the keyboard and return the terminating key.
*
*/
-zchar console_read_input(int max, zchar * buf, zword timeout, bool continued)
+zchar console_read_input(int max, zchar * buf, zword timeout, int continued)
{
zchar key;
int i, min_prompt_space;
@@ -860,7 +860,7 @@
* memory of the header extension table and return true.
*
*/
-bool validate_click(void)
+int validate_click(void)
{
if (mwin >= 0) {
if (mouse_y < wp[mwin].y_pos
@@ -1217,7 +1217,7 @@
{
zword pic = zargs[0];
zword table = zargs[1];
- bool avail;
+ int avail;
int height, width;
int i;
@@ -1731,7 +1731,7 @@
zword global2;
zword addr;
- bool brief = FALSE;
+ int brief = FALSE;
/* One V5 game (Wishbringer Solid Gold) contains this opcode by
accident, so just return if the version number does not fit */
--- a/src/common/setup.h
+++ b/src/common/setup.h
@@ -52,9 +52,9 @@
char *restricted_path;
format_t format; /* type of format codes for dumb interface */
- bool restore_mode; /* for a save file passed from command line */
- bool use_blorb;
- bool exec_in_blorb;
+ int restore_mode; /* for a save file passed from command line */
+ int use_blorb;
+ int exec_in_blorb;
} f_setup_t;
extern f_setup_t f_setup;
--- a/src/common/sound.c
+++ b/src/common/sound.c
@@ -38,8 +38,8 @@
static int next_sample = 0;
static int next_volume = 0;
-static bool locked = FALSE;
-static bool playing = FALSE;
+static int locked = FALSE;
+static int playing = FALSE;
/*
--- a/src/common/stream.c
+++ b/src/common/stream.c
@@ -20,13 +20,13 @@
#include "frotz.h"
-extern bool handle_hot_key(zchar);
+extern int handle_hot_key(zchar);
-extern bool validate_click(void);
+extern int validate_click(void);
extern void replay_open(void);
extern void replay_close(void);
-extern void memory_open(zword, zword, bool);
+extern void memory_open(zword, zword, int);
extern void memory_close(void);
extern void record_open(void);
extern void record_close(void);
@@ -55,7 +55,7 @@
extern zchar replay_read_key(void);
extern zchar replay_read_input(zchar *);
extern zchar console_read_key(zword);
-extern zchar console_read_input(int, zchar *, zword, bool);
+extern zchar console_read_input(int, zchar *, zword, int);
extern int direct_call(zword);
@@ -223,7 +223,7 @@
* Read a single keystroke from the current input stream.
*
*/
-zchar stream_read_key(zword timeout, zword routine, bool hot_keys)
+zchar stream_read_key(zword timeout, zword routine, int hot_keys)
{
zchar key = ZC_BAD;
flush_buffer();
@@ -275,7 +275,7 @@
*/
zchar stream_read_input(int max, zchar * buf,
zword timeout, zword routine,
- bool hot_keys, bool no_scripting)
+ int hot_keys, int no_scripting)
{
zchar key = ZC_BAD;
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -578,7 +578,7 @@
zword count;
zword addr = zargs[0];
- bool first = TRUE;
+ int first = TRUE;
for (;;) {
@@ -786,7 +786,7 @@
int entry_number;
int lower, upper;
int i;
- bool sorted;
+ int sorted;
#ifdef TOPS20
short sec;
#endif
@@ -867,7 +867,7 @@
*
*/
static void tokenise_text(zword text, zword length, zword from, zword parse,
- zword dct, bool flag)
+ zword dct, int flag)
{
zword addr;
zbyte token_max, token_count;
@@ -895,7 +895,7 @@
* Split an input line into words and translate the words to tokens.
*
*/
-void tokenise_line(zword text, zword token, zword dct, bool flag)
+void tokenise_line(zword text, zword token, zword dct, int flag)
{
zword addr1;
zword addr2;
--- a/src/curses/ux_audio.c
+++ b/src/curses/ux_audio.c
@@ -79,7 +79,7 @@
typedef struct {
- bool active; /* If a voice is actively outputting sound*/
+ int active; /* If a voice is actively outputting sound*/
int src; /* The source sound ID*/
int type; /* The voice type 0, 1, 2..N*/
int pos; /* The current position*/
--- a/src/curses/ux_frotz.h
+++ b/src/curses/ux_frotz.h
@@ -85,7 +85,7 @@
#define getmaxyx(w, y, x) (y) = getmaxy(w), (x) = getmaxx(w)
#endif
-extern bool color_enabled; /* ux_text */
+extern int color_enabled; /* ux_text */
extern char stripped_story_name[FILENAME_MAX+1];
extern char semi_stripped_story_name[FILENAME_MAX+1];
@@ -98,7 +98,7 @@
extern volatile sig_atomic_t terminal_resized;
/*** Functions specific to the Unix port of Frotz ***/
-bool unix_init_pictures(void); /* ux_pic.c */
+int unix_init_pictures(void); /* ux_pic.c */
/* void unix_init_scrollback(void); */ /* ux_screen.c */
/* void unix_save_screen(int); */ /* ux_screen.c */
/* void unix_do_scrollback(void); */ /* ux_screen.c */
--- a/src/curses/ux_input.c
+++ b/src/curses/ux_input.c
@@ -73,7 +73,7 @@
static zchar **history_view = history_buffer; /* What the user is looking at. */
#define history_end (history_buffer + MAX_HISTORY - 1)
-extern bool is_terminator (zchar);
+extern int is_terminator (zchar);
extern void read_string (int, zchar *);
extern int completion (const zchar *, zchar *);
@@ -109,7 +109,7 @@
* timeout elapses or zero if it has already elapsed. If false is returned,
* diff is not modified, otherwise it is set to a non-negative value.
*/
-static bool timeout_left(struct timeval *diff)
+static int timeout_left(struct timeval *diff)
{
struct timeval now;
--- a/src/curses/ux_pic.c
+++ b/src/curses/ux_pic.c
@@ -78,12 +78,12 @@
#endif
-bool unix_init_pictures (void)
+int unix_init_pictures (void)
{
#ifndef NO_BLORB
int maxlegalpic = 0;
int i, x_scale, y_scale;
- bool success = FALSE;
+ int success = FALSE;
unsigned char png_magic[8] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A};
unsigned char ihdr_name[] = "IHDR";
@@ -277,7 +277,7 @@
int saved_x, saved_y;
static int plus, ltee, rtee, ttee, btee, hline, vline, ckboard;
static int urcorner, ulcorner, llcorner, lrcorner;
- static bool acs_initialized = FALSE;
+ static int acs_initialized = FALSE;
if (!acs_initialized) {
plus = u_setup.plain_ascii ? '+' : ACS_PLUS;
--- a/src/curses/ux_screen.c
+++ b/src/curses/ux_screen.c
@@ -208,7 +208,7 @@
* The copied rectangle is clipped to the saved window size. Returns true
* on success, false if anything went wrong.
*/
-bool os_repaint_window(int win, int ypos_old, int ypos_new, int xpos,
+int os_repaint_window(int win, int ypos_old, int ypos_new, int xpos,
int ysize, int xsize)
{
int lines, cols;
--- a/src/curses/ux_setup.h
+++ b/src/curses/ux_setup.h
@@ -16,8 +16,8 @@
int curses_active;
int plain_ascii;
int current_color; /* ux_text.c ux_screen.c */
- bool color_enabled; /* ux_init.c ux_pic.c ux_text.c */
- bool mouse_enabled;
+ int color_enabled; /* ux_init.c ux_pic.c ux_text.c */
+ int mouse_enabled;
int interpreter; /* see frotz.h */
zlong colours[11];
zlong nonstdcolours[NON_STD_COLS];
--- a/src/curses/ux_text.c
+++ b/src/curses/ux_text.c
@@ -41,7 +41,7 @@
* Strange Results can happen when playing certain V6 games when
* color_enabled is FALSE.
*/
-bool color_enabled = FALSE;
+int color_enabled = FALSE;
/* int current_color = 0; */
--- a/src/dos/dosfrotz.h
+++ b/src/dos/dosfrotz.h
@@ -121,17 +121,17 @@
/* owinit */ int dectoi (const char *);
/* owinit */ int hextoi (const char *);
-/* owmouse */ bool detect_mouse (void);
+/* owmouse */ int detect_mouse (void);
/* owmouse */ int read_mouse (void);
-/* owpic */ bool init_pictures (void);
+/* owpic */ int init_pictures (void);
/* owpic */ void reset_pictures (void);
#ifndef NO_SOUND
-/* owsmpl */ bool dos_init_sound (void);
+/* owsmpl */ int dos_init_sound (void);
/* owsmpl */ void dos_reset_sound (void);
/* owinput */ void end_of_sound(void);
#endif
-/* owtext */ void switch_scrn_attr (bool);
+/* owtext */ void switch_scrn_attr (int);
/* owtext */ void load_fonts (void);
#ifdef __WATCOMC__
--- a/src/dos/dosinit.c
+++ b/src/dos/dosinit.c
@@ -91,10 +91,10 @@
static void interrupt(*oldvect) () = NULL;
-bool at_keybrd;
+int at_keybrd;
/* Test for the existance of Enhanced AT keyboard support in BIOS */
-static bool test_enhanced_keyboard(unsigned char b)
+static int test_enhanced_keyboard(unsigned char b)
{
union REGS regs;
unsigned char far *shift_status;
--- a/src/dos/dosinput.c
+++ b/src/dos/dosinput.c
@@ -34,14 +34,14 @@
#define HISTORY_BUFSIZE 500
#endif
-extern bool is_terminator (zchar);
+extern int is_terminator (zchar);
-extern bool read_yes_or_no (const char *);
+extern int read_yes_or_no (const char *);
extern void read_string (int, zchar *);
extern int completion (const zchar *, zchar *);
-extern bool at_keybrd;
+extern int at_keybrd;
static long limit = 0;
@@ -61,7 +61,7 @@
int max_width;
} input;
-static bool overwrite = FALSE;
+static int overwrite = FALSE;
volatile int end_of_sound_flag;
@@ -92,7 +92,7 @@
* visible (because of the primitive cursor emulation we use here).
*
*/
-static void switch_cursor(bool cursor)
+static void switch_cursor(int cursor)
{
if (display <= _TEXT_) {
/* Use hardware cursor in text mode */
@@ -191,7 +191,7 @@
* Return true if a previously set time limit has been exceeded.
*
*/
-static bool out_of_time(void)
+static int out_of_time(void)
{
if (limit != 0) {
long now = get_current_time ();
@@ -225,7 +225,7 @@
* SPECIAL_KEY_MIN...SPECIAL_KEY_MAX = a special editing key.
*
*/
-static int get_key(bool cursor)
+static int get_key(int cursor)
{
static byte arrow_key_map[] = {0x48, 0x50, 0x4b, 0x4d};
static byte special_key_map[] = {0x47, 0x4f, 0x73, 0x74, 0x53,
@@ -613,7 +613,7 @@
* matches the prefix in the input buffer.
*
*/
-static bool fetch_entry(zchar *buf, int entry)
+static int fetch_entry(zchar *buf, int entry)
{
int i = 0;
zchar c;
@@ -838,7 +838,7 @@
* return it. Input aborts after timeout/10 seconds.
*
*/
-zchar os_read_key(int timeout, bool cursor)
+zchar os_read_key(int timeout, int cursor)
{
int key;
@@ -876,11 +876,11 @@
{
char *extension;
FILE *fp;
- bool terminal;
- bool result;
+ int terminal;
+ int result;
- bool saved_replay = istream_replay;
- bool saved_record = ostream_record;
+ int saved_replay = istream_replay;
+ int saved_record = ostream_record;
int i;
char *tempname;
--- a/src/dos/dosmouse.c
+++ b/src/dos/dosmouse.c
@@ -30,7 +30,7 @@
* Return true if a mouse driver is present.
*
*/
-bool detect_mouse(void)
+int detect_mouse(void)
{
#ifdef __WATCOMC__
return dos_mouse_ax(0);
--- a/src/dos/dospic.c
+++ b/src/dos/dospic.c
@@ -93,7 +93,7 @@
* graphics files.
*
*/
-static bool open_graphics_file(int number)
+static int open_graphics_file(int number)
{
char fname[MAX_FILE_NAME + 1];
char extension[4 + 1];
@@ -187,7 +187,7 @@
* Prepare to draw pictures. Return true if pictures are available.
*
*/
-bool init_pictures(void)
+int init_pictures(void)
{
/* Allocate memory for decompression */
@@ -241,7 +241,7 @@
* variables.
*
*/
-static bool load_picture_info(int picture)
+static int load_picture_info(int picture)
{
#ifdef __WATCOMC__
byte _huge *ptr;
@@ -769,9 +769,9 @@
* pictures and the release number instead.
*
*/
-bool os_picture_data(int picture, int *height, int *width)
+int os_picture_data(int picture, int *height, int *width)
{
- bool avail;
+ int avail;
if (picture == 0) {
avail = FALSE;
@@ -796,10 +796,10 @@
#else /* NO_GRAPHICS */
-bool init_pictures(void) { return FALSE; }
+int init_pictures(void) { return FALSE; }
void reset_pictures(void) {}
int os_peek_colour(void) { return current_bg; }
void os_draw_picture(int picture, int y, int x) {}
-bool os_picture_data(int picture, int *height, int *width) { return FALSE; }
+int os_picture_data(int picture, int *height, int *width) { return FALSE; }
#endif
--- a/src/dos/dossampl.c
+++ b/src/dos/dossampl.c
@@ -134,7 +134,7 @@
* Initialise the sound board and various sound related variables.
*
*/
-bool dos_init_sound(void)
+int dos_init_sound(void)
{
const char *settings;
word irc_mask_port;
@@ -399,7 +399,7 @@
void os_prepare_sample(int number) {}
void os_init_sound(void) {}
void dos_reset_sound(void) {}
-bool dos_init_sound(void) { return TRUE; }
+int dos_init_sound(void) { return TRUE; }
#endif /* NO_SOUND */
--- a/src/dos/dosscrn.c
+++ b/src/dos/dosscrn.c
@@ -313,7 +313,7 @@
} /* os_scroll_area */
-bool os_repaint_window(int win, int ypos_old, int ypos_new, int xpos,
+int os_repaint_window(int win, int ypos_old, int ypos_new, int xpos,
int ysize, int xsize)
{
return FALSE;
--- a/src/dos/dostext.c
+++ b/src/dos/dostext.c
@@ -298,7 +298,7 @@
* toggles between the two possible behaviours.
*
*/
-void switch_scrn_attr(bool flag)
+void switch_scrn_attr(int flag)
{
byte scrn_bg;
byte scrn_fg;
--- a/src/dumb/dblorb.c
+++ b/src/dumb/dblorb.c
@@ -38,7 +38,7 @@
bb_result_t blorb_res;
bb_map_t *blorb_map;
-extern bool quiet_mode;
+extern int quiet_mode;
static int isblorb(FILE *);
--- a/src/dumb/dfrotz.h
+++ b/src/dumb/dfrotz.h
@@ -36,22 +36,22 @@
/* from ../common/setup.h */
extern f_setup_t f_setup;
-extern bool do_more_prompts;
-extern bool quiet_mode;
+extern int do_more_prompts;
+extern int quiet_mode;
/* From input.c. */
-bool is_terminator (zchar);
+int is_terminator (zchar);
/* dumb-input.c */
-bool dumb_handle_setting(const char *setting, bool show_cursor, bool startup);
+int dumb_handle_setting(const char *setting, int show_cursor, int startup);
void dumb_init_input(void);
/* dumb-output.c */
void dumb_init_output(void);
-bool dumb_output_handle_setting(const char *setting, bool show_cursor,
- bool startup);
-void dumb_show_screen(bool show_cursor);
-void dumb_show_prompt(bool show_cursor, char line_type);
+int dumb_output_handle_setting(const char *setting, int show_cursor,
+ int startup);
+void dumb_show_screen(int show_cursor);
+void dumb_show_prompt(int show_cursor, char line_type);
void dumb_dump_screen(void);
void dumb_display_user_input(char *);
void dumb_discard_old_input(int num_chars);
@@ -59,6 +59,6 @@
void dumb_set_picture_cell(int row, int col, zchar c);
/* dumb-pic.c */
-bool dumb_init_pictures(void);
+int dumb_init_pictures(void);
#endif
--- a/src/dumb/dinit.c
+++ b/src/dumb/dinit.c
@@ -57,10 +57,10 @@
static int user_text_width = 80;
static int user_text_height = 24;
static int user_random_seed = -1;
-static bool plain_ascii = FALSE;
+static int plain_ascii = FALSE;
-bool quiet_mode;
-bool do_more_prompts;
+int quiet_mode;
+int do_more_prompts;
/*
* os_process_arguments
--- a/src/dumb/dinput.c
+++ b/src/dumb/dinput.c
@@ -185,7 +185,7 @@
* a previous call to dumb_read_line.
* Returns TRUE if we should timeout rather than use the read-ahead.
* (because the user is further ahead than the timeout). */
-static bool check_timeout(int timeout)
+static int check_timeout(int timeout)
{
if ((timeout == 0) || (timeout > time_ahead))
time_ahead = 0;
@@ -196,14 +196,14 @@
/* If val is '0' or '1', set *var accordingly, otherwise toggle it. */
-static void toggle(bool *var, char val)
+static void toggle(int *var, char val)
{
*var = val == '1' || (val != '0' && !*var);
} /* toggle */
/* Handle input-related user settings and call dumb_output_handle_setting. */
-bool dumb_handle_setting(const char *setting, bool show_cursor, bool startup)
+int dumb_handle_setting(const char *setting, int show_cursor, int startup)
{
if (!strncmp(setting, "sf", 2)) {
speed = atof(&setting[2]);
@@ -227,7 +227,7 @@
* (that isn't the start of a special character)), and write the
* first non-command to s.
* Return true if timed-out. */
-static bool dumb_read_line(char *s, char *prompt, bool show_cursor,
+static int dumb_read_line(char *s, char *prompt, int show_cursor,
int timeout, enum input_type type,
zchar *continued_line_chars)
{
@@ -386,7 +386,7 @@
#endif
-zchar os_read_key (int timeout, bool show_cursor)
+zchar os_read_key (int timeout, int show_cursor)
{
zchar c;
int timed_out;
@@ -427,7 +427,7 @@
{
char *p;
int terminator;
- static bool timed_out_last_time;
+ static int timed_out_last_time;
int timed_out;
#ifdef USE_UTF8
int i, j, len;
--- a/src/dumb/doutput.c
+++ b/src/dumb/doutput.c
@@ -25,11 +25,11 @@
extern f_setup_t f_setup;
-static bool show_line_numbers = FALSE;
-static bool show_line_types = FALSE;
-static bool show_pictures = TRUE;
-static bool visual_bell = TRUE;
-static bool plain_ascii = FALSE;
+static int show_line_numbers = FALSE;
+static int show_line_types = FALSE;
+static int show_pictures = TRUE;
+static int visual_bell = TRUE;
+static int plain_ascii = FALSE;
static char latin1_to_ascii[] =
" ! c L >o< Y | S '' C a << not - R _ "
@@ -121,7 +121,7 @@
/* if val is '0' or '1', set *var accordingly, else toggle it. */
-static void toggle(bool *var, char val)
+static void toggle(int *var, char val)
{
*var = val == '1' || (val != '0' && !*var);
} /* toggle */
@@ -410,7 +410,7 @@
} /* show_cell */
-static bool will_print_blank(cell_t c)
+static int will_print_blank(cell_t c)
{
#ifndef DISABLE_FORMATS
if (f_setup.format != FORMAT_NORMAL)
@@ -500,7 +500,7 @@
static void dumb_set_cell(int row, int col, cell_t c)
{
cell_t test;
- bool result = FALSE;
+ int result = FALSE;
test = dumb_row(row)[col];
@@ -539,7 +539,7 @@
/* Check if a cell is a blank or will display as one.
* (Used to help decide if contents are worth printing.) */
-static bool is_blank(cell_t c)
+static int is_blank(cell_t c)
{
return ((c.c == ' ')
|| ((c.style == PICTURE_STYLE) && !show_pictures));
@@ -714,7 +714,7 @@
} /* os_set_cursor */
-bool os_repaint_window(int UNUSED(win), int UNUSED(ypos_old),
+int os_repaint_window(int UNUSED(win), int UNUSED(ypos_old),
int UNUSED(ypos_new), int UNUSED(xpos),
int UNUSED(ysize), int UNUSED(xsize))
{
@@ -902,7 +902,7 @@
/* Print the part of the cursor row before the cursor. */
-void dumb_show_prompt(bool show_cursor, char line_type)
+void dumb_show_prompt(int show_cursor, char line_type)
{
int i;
show_line_prefix(show_cursor ? cursor_row : -1, line_type);
@@ -921,7 +921,7 @@
* don't show that line (because it will be redundant with the prompt
* line just below it).
*/
-void dumb_show_screen(bool show_cursor)
+void dumb_show_screen(int show_cursor)
{
int r, c, first, last;
char changed_rows[0x100];
@@ -1006,8 +1006,8 @@
} /* dumb_elide_more_prompt */
-bool dumb_output_handle_setting(const char *setting, bool show_cursor,
- bool startup)
+int dumb_output_handle_setting(const char *setting, int show_cursor,
+ int startup)
{
char *p;
int i;
--- a/src/dumb/dpic.c
+++ b/src/dumb/dpic.c
@@ -51,12 +51,12 @@
#endif /* NO_BLORB */
-bool dumb_init_pictures (void)
+int dumb_init_pictures (void)
{
#ifndef NO_BLORB
int maxlegalpic = 0;
int i, x_scale, y_scale;
- bool success = FALSE;
+ int success = FALSE;
unsigned char png_magic[8] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A};
unsigned char ihdr_name[] = "IHDR";
@@ -176,7 +176,7 @@
#endif
-bool os_picture_data(int num, int *height, int *width)
+int os_picture_data(int num, int *height, int *width)
{
#ifndef NO_BLORB
int index;
--- a/src/sdl/sf_frotz.h
+++ b/src/sdl/sf_frotz.h
@@ -22,7 +22,7 @@
int sf_getresource(int num, int ispic, int method, myresource * res);
void sf_freeresource(myresource * res);
-bool sf_IsAdaptive(int picture);
+int sf_IsAdaptive(int picture);
#ifndef true
#define true 1
@@ -75,7 +75,7 @@
int colour_in_use(zword colour);
/* various data */
-extern bool m_tandy;
+extern int m_tandy;
extern int m_v6scale;
extern double m_gfxScale_w;
extern double m_gfxScale_h;
@@ -84,19 +84,19 @@
extern zlong m_colours[11];
extern zlong m_nonStdColours[NON_STD_COLS];
extern int m_nonStdIndex;
-extern bool m_lineInput;
-extern bool m_morePrompts;
+extern int m_lineInput;
+extern int m_morePrompts;
extern int AcWidth;
extern int AcHeight;
extern int m_random_seed;
extern int m_fullscreen;
extern char *m_fontfiles[9];
-extern bool m_localfiles;
+extern int m_localfiles;
extern int m_no_sound;
extern int m_vga_fonts;
extern int SFdticks;
extern char *m_fontdir;
-extern bool m_aafonts;
+extern int m_aafonts;
extern char *m_setupfile;
extern int m_frequency;
@@ -104,7 +104,7 @@
extern double m_xscale;
extern double m_yscale;
-extern bool sdl_active;
+extern int sdl_active;
/* sf_resource.c */
@@ -118,8 +118,8 @@
zlong palette[16];
int palette_entries;
int transparentcolor;
- bool adaptive;
- bool usespalette;
+ int adaptive;
+ int usespalette;
} sf_picture;
#define DEFAULT_GAMMA 2.2
@@ -166,7 +166,7 @@
int cx, cy; /* cursor position - 0 based */
int oh; /* overhang */
zlong fore, back;
- bool foreDefault, backDefault, backTransparent;
+ int foreDefault, backDefault, backTransparent;
} SF_textsetting;
SF_textsetting *sf_curtextsetting(void);
@@ -188,7 +188,7 @@
void sf_readsettings(void);
zlong sf_GetColour(int colour);
-zlong sf_GetDefaultColour(bool fore);
+zlong sf_GetDefaultColour(int fore);
int sf_GetColourIndex(zlong colour);
void sf_initvideo(int w, int h, int full);
@@ -216,7 +216,7 @@
IDS_AUX_FILTER, IDS_SAVE_AUX_TITLE, IDS_LOAD_AUX_TITLE
};
-bool sf_IsInfocomV6(void);
+int sf_IsInfocomV6(void);
zlong sf_blend(int a, zlong s, zlong d);
@@ -225,7 +225,7 @@
zlong sf_ticks(void);
void sf_DrawInput(zchar * buffer, int pos, int ptx, int pty, int width,
- bool cursor);
+ int cursor);
int sf_aiffwav(FILE * f, int foffs, void **wav, int *size);
@@ -235,11 +235,11 @@
void sf_restoreareaandfree(zlong * s);
#define SF_NOTIMP (-9999)
-zword sf_read_key(int timeout, bool cursor, bool allowed, bool text);
+zword sf_read_key(int timeout, int cursor, int allowed, int text);
-int sf_user_fdialog(bool exist, const char *def, const char *filt,
+int sf_user_fdialog(int exist, const char *def, const char *filt,
const char *title, char **res);
-extern int (*sf_osdialog)(bool ex, const char *def, const char *filt,
+extern int (*sf_osdialog)(int ex, const char *def, const char *filt,
const char *tit, char **res, zlong * sbuf, int sbp,
int ew, int eh, int isfull);
@@ -254,7 +254,7 @@
void sf_chline(int x, int y, zlong c, int n);
void sf_cvline(int x, int y, zlong c, int n);
-bool sf_flushdisplay(void);
+int sf_flushdisplay(void);
void sf_getclip(int *x, int *y, int *w, int *h);
void sf_rect(zlong color, int x, int y, int w, int h);
void sf_setclip(int x, int y, int w, int h);
--- a/src/sdl/sf_images.c
+++ b/src/sdl/sf_images.c
@@ -36,7 +36,7 @@
static zbyte toLinear[256];
static zbyte fromLinear[256];
-extern bool m_adaptiveMode;
+extern int m_adaptiveMode;
zlong sf_blend(int a, zlong s, zlong d)
{
--- a/src/sdl/sf_osfdlg.c
+++ b/src/sdl/sf_osfdlg.c
@@ -339,7 +339,7 @@
STATIC zword yesnoover(int xc, int yc);
STATIC zword Zentry(int x, int y);
-STATIC zword inputkey(bool text)
+STATIC zword inputkey(int text)
{
zword c = sf_read_key(0, false, true, text);
if (c == ZC_SINGLE_CLICK) {
@@ -360,11 +360,11 @@
return c;
} /* inputkey */
-int (*sf_sysdialog)(bool existing, const char *def, const char *filt,
+int (*sf_sysdialog)(int existing, const char *def, const char *filt,
const char *tit, char **res) = NULL;
-STATIC int myosdialog(bool existing, const char *def, const char *filt,
+STATIC int myosdialog(int existing, const char *def, const char *filt,
const char *tit, char **res, zlong * sbuf, int sbp,
int ew, int eh, int isfull)
{
--- a/src/sdl/sf_resource.c
+++ b/src/sdl/sf_resource.c
@@ -55,17 +55,17 @@
zlong m_colours[11];
zlong m_nonStdColours[NON_STD_COLS];
int m_nonStdIndex;
-bool m_lineInput = 0;
-bool m_IsInfocomV6 = false;
-bool m_morePrompts = 1;
-bool m_localfiles = false;
+int m_lineInput = 0;
+int m_IsInfocomV6 = false;
+int m_morePrompts = 1;
+int m_localfiles = false;
char *m_fontdir = NULL;
-bool m_aafonts = 0;
+int m_aafonts = 0;
char m_names_format = 0;
char *m_reslist_file = NULL;
extern int m_frequency;
-bool sdl_active;
+int sdl_active;
static int countedpics = 0;
static int maxlegalpic = 0;
@@ -79,8 +79,8 @@
int AcHeight = DEFAULT_HEIGHT;
int option_scrollback_buffer = 0;
-bool option_disable_color = 0;
-bool m_adaptiveMode = FALSE;
+int option_disable_color = 0;
+int m_adaptiveMode = FALSE;
bb_resolution_t *reso;
@@ -498,7 +498,7 @@
/* Get a default colour */
-zlong sf_GetDefaultColour(bool fore)
+zlong sf_GetDefaultColour(int fore)
{
if (m_IsInfocomV6)
return sf_GetColour(fore ? WHITE_COLOUR : BLACK_COLOUR);
@@ -801,7 +801,7 @@
/* If true, running one of Infocom's V6 games */
-bool sf_IsInfocomV6(void)
+int sf_IsInfocomV6(void)
{
switch (story_id) {
case ARTHUR:
@@ -817,10 +817,10 @@
/* If true, this picture has an adaptive palette */
-bool sf_IsAdaptive(int picture)
+int sf_IsAdaptive(int picture)
{
bb_result_t result;
- bool adaptive = FALSE;
+ int adaptive = FALSE;
if (blorb_map == NULL) return FALSE;
--- a/src/sdl/sf_util.c
+++ b/src/sdl/sf_util.c
@@ -140,7 +140,7 @@
static char user_names_format = 0;
extern char *m_reslist_file;
extern int option_scrollback_buffer;
-extern bool option_disable_color;
+extern int option_disable_color;
static char *info_header =
"FROTZ V%s - SDL graphics and audio interface.\n"
@@ -580,7 +580,7 @@
} /* getextension */
-static bool newfile(int flag)
+static int newfile(int flag)
{
if (flag == FILE_SAVE || flag == FILE_SAVE_AUX || flag == FILE_RECORD)
return true;
@@ -713,11 +713,11 @@
{
char *extension;
FILE *fp;
- bool terminal;
- bool result;
+ int terminal;
+ int result;
- bool saved_replay = istream_replay;
- bool saved_record = ostream_record;
+ int saved_replay = istream_replay;
+ int saved_record = ostream_record;
/* Turn off playback and recording temporarily */
istream_replay = FALSE;
--- a/src/sdl/sf_video.c
+++ b/src/sdl/sf_video.c
@@ -41,11 +41,11 @@
static SDL_Texture *texture = NULL;
int m_timerinterval = 100;
-extern bool sdl_active;
+extern int sdl_active;
static void sf_quitconf(void);
-static bool ApplyPalette(sf_picture *);
+static int ApplyPalette(sf_picture *);
static zlong screen_palette[16];
extern z_header_t z_header;
@@ -138,7 +138,7 @@
} /* drawthecursor */
-bool sf_IsValidChar(zword c)
+int sf_IsValidChar(zword c)
{
if (c >= ZC_ASCII_MIN && c <= ZC_ASCII_MAX)
return true;
@@ -150,7 +150,7 @@
} /* sf_IsValidChar */
-void sf_drawcursor(bool c)
+void sf_drawcursor(int c)
{
SF_textsetting *ts = sf_curtextsetting();
drawthecursor(ts->cx, ts->cy, c);
@@ -411,7 +411,7 @@
* Update the display if contents have changed.
* Return whether contents had changed, i.e., display was updated.
*/
-bool sf_flushdisplay(void)
+int sf_flushdisplay(void)
{
if (dirty) {
SDL_UpdateTexture(texture, NULL, sbuffer,
@@ -446,7 +446,7 @@
} /* os_scroll_area */
-bool os_repaint_window(int UNUSED (win), int UNUSED (ypos_old),
+int os_repaint_window(int UNUSED (win), int UNUSED (ypos_old),
int UNUSED (ypos_new), int UNUSED (xpos),
int UNUSED (ysize), int UNUSED (xsize))
{
@@ -877,7 +877,7 @@
} /* goodzkey */
-zword sf_read_key(int timeout, bool cursor, bool allowed, bool text)
+zword sf_read_key(int timeout, int cursor, int allowed, int text)
{
SDL_Event event;
zword inch = 0;
@@ -1143,7 +1143,7 @@
/* Draw the current input line */
void sf_DrawInput(zchar * buffer, int pos, int ptx, int pty, int width,
- bool cursor)
+ int cursor)
{
int height;
SF_textsetting *ts = sf_curtextsetting();
@@ -1307,12 +1307,12 @@
} /* sf_restoreareaandfree */
-int (*sf_osdialog)(bool ex, const char *def, const char *filt, const char *tit,
+int (*sf_osdialog)(int ex, const char *def, const char *filt, const char *tit,
char **res, zlong * sbuf, int sbp, int ew, int eh,
int isfull) = NULL;
-int sf_user_fdialog(bool existing, const char *defaultname, const char *filter,
+int sf_user_fdialog(int existing, const char *defaultname, const char *filter,
const char *title, char **result)
{
if (sf_osdialog)
@@ -1363,9 +1363,9 @@
/* Apply the picture's palette to the screen palette. */
/* Adapted from FrotzGfx::ApplyPalette() in Windows Frotz. */
-static bool ApplyPalette(sf_picture * graphic)
+static int ApplyPalette(sf_picture * graphic)
{
- bool changed = FALSE;
+ int changed = FALSE;
int i, colors;
memset(&screen_palette, 0, sizeof(zlong));
--- a/src/x11/x_frotz.h
+++ b/src/x11/x_frotz.h
@@ -50,5 +50,5 @@
void x_init_colour(char *bg_name, char *fg_name);
-bool x_init_pictures(void);
+int x_init_pictures(void);
#endif
--- a/src/x11/x_init.c
+++ b/src/x11/x_init.c
@@ -209,7 +209,7 @@
void os_process_arguments(int argc, char *argv[])
{
- static bool show_version;
+ static int show_version;
static XrmOptionDescRec options[] = {
{"-aa", ".watchAttrAssign", XrmoptionNoArg, (void *)"true"},
{"+aa", ".watchAttrAssign", XrmoptionNoArg, (void *)"false"},
--- a/src/x11/x_input.c
+++ b/src/x11/x_input.c
@@ -34,7 +34,7 @@
#include <string.h>
#include <ctype.h>
-extern bool is_terminator(zchar key);
+extern int is_terminator(zchar key);
extern void x_del_char(zchar c);
extern Pixmap bgpm;
--- a/src/x11/x_oldpic.c
+++ b/src/x11/x_oldpic.c
@@ -400,7 +400,7 @@
} /* os_picture_data */
-bool x_init_pictures(void)
+int x_init_pictures(void)
{
return TRUE;
}
--- a/src/x11/x_pic.c
+++ b/src/x11/x_pic.c
@@ -51,7 +51,7 @@
#define PIC_HEADER_HEIGHT 4
extern bb_map_t *blorb_map;
-static bool m_adaptiveMode = FALSE;
+static int m_adaptiveMode = FALSE;
typedef struct
{
@@ -65,8 +65,8 @@
uint32_t palette[16];
int palette_entries;
int transparentcolor;
- bool adaptive;
- bool usespalette;
+ int adaptive;
+ int usespalette;
} pict_info_t;
static pict_info_t *pict_info;
static int num_pictures = 0;
@@ -191,11 +191,11 @@
}
}
-bool x_init_pictures (void)
+int x_init_pictures (void)
{
int maxlegalpic = 0;
int i,j;
- bool success = FALSE;
+ int success = FALSE;
bb_result_t res;
bb_resolution_t *reso;
@@ -263,7 +263,7 @@
static uint8_t toLinear[256];
static uint8_t fromLinear[256];
-extern bool m_adaptiveMode;
+extern int m_adaptiveMode;
uint32_t x_blend(int a, uint32_t s, uint32_t d)
{
@@ -605,10 +605,10 @@
/*****************************/
/* If true, this picture has an adaptive palette */
-bool x_IsAdaptive(int picture)
+int x_IsAdaptive(int picture)
{
bb_result_t result;
- bool adaptive = FALSE;
+ int adaptive = FALSE;
if (blorb_map == NULL) return FALSE;
@@ -746,9 +746,9 @@
/* Apply the picture's palette to the screen palette. */
/* Adapted from FrotzGfx::ApplyPalette() in Windows Frotz. */
-static bool ApplyPalette(pict_info_t * graphic)
+static int ApplyPalette(pict_info_t * graphic)
{
- bool changed = FALSE;
+ int changed = FALSE;
int i, colors;
memset(&screen_palette, 0, sizeof(unsigned long));
--- a/src/x11/x_screen.c
+++ b/src/x11/x_screen.c
@@ -76,7 +76,7 @@
} /* os_scroll_area */
-bool os_repaint_window(int UNUSED (win), int UNUSED (ypos_old),
+int os_repaint_window(int UNUSED (win), int UNUSED (ypos_old),
int UNUSED (ypos_new), int UNUSED (xpos), int UNUSED (ysize),
int UNUSED (xsize))
{
|