diff options
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 18 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 92 | ||||
| -rw-r--r-- | lib-src/etags.c | 574 | ||||
| -rw-r--r-- | lib-src/hexl.c | 18 | ||||
| -rw-r--r-- | lib-src/pop.c | 12 | ||||
| -rw-r--r-- | lib-src/pop.h | 7 |
6 files changed, 362 insertions, 359 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 2010444743a..d7442e51fdd 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2013-12-14 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Use bool for boolean, focusing on headers. | ||
| 4 | * emacsclient.c, etags.c, hexl.c (FALSE, TRUE): | ||
| 5 | Remove. All uses replaced with uncapitalized version. | ||
| 6 | * emacsclient.c (message): | ||
| 7 | * etags.c (make_tag, pfnote, consider_token, make_C_tag, lang_names): | ||
| 8 | * hexl.c (un_flag, iso_flag, endian): | ||
| 9 | * pop.c (pop_debug, pop_open, pop_multi_first, pop_multi_next) | ||
| 10 | (pop_trash): | ||
| 11 | Use bool for boolean. | ||
| 12 | * etags.c (bool): Remove. | ||
| 13 | * etags.c (globals, members, declarations, no_line_directive) | ||
| 14 | (no_duplicates): Use 'int' for boolean values that getopt requires | ||
| 15 | to be 'int'. Formerly, these were 'bool' and 'bool' was 'int', | ||
| 16 | but we can no longer rely on this implementation. | ||
| 17 | * pop.h (struct _popserver): Use bool_bf for boolean bit-fields. | ||
| 18 | |||
| 1 | 2013-11-14 Paul Eggert <eggert@cs.ucla.edu> | 19 | 2013-11-14 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 20 | ||
| 3 | * ebrowse.c (xstrdup): | 21 | * ebrowse.c (xstrdup): |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 74ccfa26259..42958fe6b56 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -103,14 +103,6 @@ char *getenv (const char *); | |||
| 103 | #define EXIT_FAILURE 1 | 103 | #define EXIT_FAILURE 1 |
| 104 | #endif | 104 | #endif |
| 105 | 105 | ||
| 106 | #ifndef FALSE | ||
| 107 | #define FALSE 0 | ||
| 108 | #endif | ||
| 109 | |||
| 110 | #ifndef TRUE | ||
| 111 | #define TRUE 1 | ||
| 112 | #endif | ||
| 113 | |||
| 114 | /* Additional space when allocating buffers for filenames, etc. */ | 106 | /* Additional space when allocating buffers for filenames, etc. */ |
| 115 | #define EXTRA_SPACE 100 | 107 | #define EXTRA_SPACE 100 |
| 116 | 108 | ||
| @@ -433,9 +425,9 @@ ttyname (int fd) | |||
| 433 | 425 | ||
| 434 | /* Display a normal or error message. | 426 | /* Display a normal or error message. |
| 435 | On Windows, use a message box if compiled as a Windows app. */ | 427 | On Windows, use a message box if compiled as a Windows app. */ |
| 436 | static void message (int, const char *, ...) ATTRIBUTE_FORMAT_PRINTF (2, 3); | 428 | static void message (bool, const char *, ...) ATTRIBUTE_FORMAT_PRINTF (2, 3); |
| 437 | static void | 429 | static void |
| 438 | message (int is_error, const char *format, ...) | 430 | message (bool is_error, const char *format, ...) |
| 439 | { | 431 | { |
| 440 | va_list args; | 432 | va_list args; |
| 441 | 433 | ||
| @@ -528,7 +520,7 @@ decode_options (int argc, char **argv) | |||
| 528 | break; | 520 | break; |
| 529 | 521 | ||
| 530 | case 'V': | 522 | case 'V': |
| 531 | message (FALSE, "emacsclient %s\n", VERSION); | 523 | message (false, "emacsclient %s\n", VERSION); |
| 532 | exit (EXIT_SUCCESS); | 524 | exit (EXIT_SUCCESS); |
| 533 | break; | 525 | break; |
| 534 | 526 | ||
| @@ -555,7 +547,7 @@ decode_options (int argc, char **argv) | |||
| 555 | break; | 547 | break; |
| 556 | 548 | ||
| 557 | default: | 549 | default: |
| 558 | message (TRUE, "Try `%s --help' for more information\n", progname); | 550 | message (true, "Try `%s --help' for more information\n", progname); |
| 559 | exit (EXIT_FAILURE); | 551 | exit (EXIT_FAILURE); |
| 560 | break; | 552 | break; |
| 561 | } | 553 | } |
| @@ -614,7 +606,7 @@ decode_options (int argc, char **argv) | |||
| 614 | 606 | ||
| 615 | if (alternate_editor && alternate_editor[0] == '\0') | 607 | if (alternate_editor && alternate_editor[0] == '\0') |
| 616 | { | 608 | { |
| 617 | message (TRUE, "--alternate-editor argument or ALTERNATE_EDITOR variable cannot be\n\ | 609 | message (true, "--alternate-editor argument or ALTERNATE_EDITOR variable cannot be\n\ |
| 618 | an empty string"); | 610 | an empty string"); |
| 619 | exit (EXIT_FAILURE); | 611 | exit (EXIT_FAILURE); |
| 620 | } | 612 | } |
| @@ -629,7 +621,7 @@ print_help_and_exit (void) | |||
| 629 | message aligns properly both in a tty and in a Windows message box. | 621 | message aligns properly both in a tty and in a Windows message box. |
| 630 | Please try to preserve them; otherwise the output is very hard to read | 622 | Please try to preserve them; otherwise the output is very hard to read |
| 631 | when using emacsclientw. */ | 623 | when using emacsclientw. */ |
| 632 | message (FALSE, | 624 | message (false, |
| 633 | "Usage: %s [OPTIONS] FILE...\n%s%s%s", progname, "\ | 625 | "Usage: %s [OPTIONS] FILE...\n%s%s%s", progname, "\ |
| 634 | Tell the Emacs server to visit the specified files.\n\ | 626 | Tell the Emacs server to visit the specified files.\n\ |
| 635 | Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\ | 627 | Every FILE can be either just a FILENAME or [+LINE[:COLUMN]] FILENAME.\n\ |
| @@ -679,7 +671,7 @@ fail (void) | |||
| 679 | int i = optind - 1; | 671 | int i = optind - 1; |
| 680 | 672 | ||
| 681 | execvp (alternate_editor, main_argv + i); | 673 | execvp (alternate_editor, main_argv + i); |
| 682 | message (TRUE, "%s: error executing alternate editor \"%s\"\n", | 674 | message (true, "%s: error executing alternate editor \"%s\"\n", |
| 683 | progname, alternate_editor); | 675 | progname, alternate_editor); |
| 684 | } | 676 | } |
| 685 | exit (EXIT_FAILURE); | 677 | exit (EXIT_FAILURE); |
| @@ -693,7 +685,7 @@ main (int argc, char **argv) | |||
| 693 | { | 685 | { |
| 694 | main_argv = argv; | 686 | main_argv = argv; |
| 695 | progname = argv[0]; | 687 | progname = argv[0]; |
| 696 | message (TRUE, "%s: Sorry, the Emacs server is supported only\n" | 688 | message (true, "%s: Sorry, the Emacs server is supported only\n" |
| 697 | "on systems with Berkeley sockets.\n", | 689 | "on systems with Berkeley sockets.\n", |
| 698 | argv[0]); | 690 | argv[0]); |
| 699 | fail (); | 691 | fail (); |
| @@ -724,11 +716,11 @@ sock_err_message (const char *function_name) | |||
| 724 | | FORMAT_MESSAGE_ARGUMENT_ARRAY, | 716 | | FORMAT_MESSAGE_ARGUMENT_ARRAY, |
| 725 | NULL, WSAGetLastError (), 0, (LPTSTR)&msg, 0, NULL); | 717 | NULL, WSAGetLastError (), 0, (LPTSTR)&msg, 0, NULL); |
| 726 | 718 | ||
| 727 | message (TRUE, "%s: %s: %s\n", progname, function_name, msg); | 719 | message (true, "%s: %s: %s\n", progname, function_name, msg); |
| 728 | 720 | ||
| 729 | LocalFree (msg); | 721 | LocalFree (msg); |
| 730 | #else | 722 | #else |
| 731 | message (TRUE, "%s: %s: %s\n", progname, function_name, strerror (errno)); | 723 | message (true, "%s: %s: %s\n", progname, function_name, strerror (errno)); |
| 732 | #endif | 724 | #endif |
| 733 | } | 725 | } |
| 734 | 726 | ||
| @@ -759,7 +751,7 @@ send_to_emacs (HSOCKET s, const char *data) | |||
| 759 | int sent = send (s, send_buffer, sblen, 0); | 751 | int sent = send (s, send_buffer, sblen, 0); |
| 760 | if (sent < 0) | 752 | if (sent < 0) |
| 761 | { | 753 | { |
| 762 | message (TRUE, "%s: failed to send %d bytes to socket: %s\n", | 754 | message (true, "%s: failed to send %d bytes to socket: %s\n", |
| 763 | progname, sblen, strerror (errno)); | 755 | progname, sblen, strerror (errno)); |
| 764 | fail (); | 756 | fail (); |
| 765 | } | 757 | } |
| @@ -854,25 +846,25 @@ static int | |||
| 854 | file_name_absolute_p (const char *filename) | 846 | file_name_absolute_p (const char *filename) |
| 855 | { | 847 | { |
| 856 | /* Sanity check, it shouldn't happen. */ | 848 | /* Sanity check, it shouldn't happen. */ |
| 857 | if (! filename) return FALSE; | 849 | if (! filename) return false; |
| 858 | 850 | ||
| 859 | /* /xxx is always an absolute path. */ | 851 | /* /xxx is always an absolute path. */ |
| 860 | if (filename[0] == '/') return TRUE; | 852 | if (filename[0] == '/') return true; |
| 861 | 853 | ||
| 862 | /* Empty filenames (which shouldn't happen) are relative. */ | 854 | /* Empty filenames (which shouldn't happen) are relative. */ |
| 863 | if (filename[0] == '\0') return FALSE; | 855 | if (filename[0] == '\0') return false; |
| 864 | 856 | ||
| 865 | #ifdef WINDOWSNT | 857 | #ifdef WINDOWSNT |
| 866 | /* X:\xxx is always absolute. */ | 858 | /* X:\xxx is always absolute. */ |
| 867 | if (isalpha ((unsigned char) filename[0]) | 859 | if (isalpha ((unsigned char) filename[0]) |
| 868 | && filename[1] == ':' && (filename[2] == '\\' || filename[2] == '/')) | 860 | && filename[1] == ':' && (filename[2] == '\\' || filename[2] == '/')) |
| 869 | return TRUE; | 861 | return true; |
| 870 | 862 | ||
| 871 | /* Both \xxx and \\xxx\yyy are absolute. */ | 863 | /* Both \xxx and \\xxx\yyy are absolute. */ |
| 872 | if (filename[0] == '\\') return TRUE; | 864 | if (filename[0] == '\\') return true; |
| 873 | #endif | 865 | #endif |
| 874 | 866 | ||
| 875 | return FALSE; | 867 | return false; |
| 876 | } | 868 | } |
| 877 | 869 | ||
| 878 | #ifdef WINDOWSNT | 870 | #ifdef WINDOWSNT |
| @@ -891,7 +883,7 @@ initialize_sockets (void) | |||
| 891 | 883 | ||
| 892 | if (WSAStartup (MAKEWORD (2, 0), &wsaData)) | 884 | if (WSAStartup (MAKEWORD (2, 0), &wsaData)) |
| 893 | { | 885 | { |
| 894 | message (TRUE, "%s: error initializing WinSock2\n", progname); | 886 | message (true, "%s: error initializing WinSock2\n", progname); |
| 895 | exit (EXIT_FAILURE); | 887 | exit (EXIT_FAILURE); |
| 896 | } | 888 | } |
| 897 | 889 | ||
| @@ -942,14 +934,14 @@ get_server_config (const char *config_file, struct sockaddr_in *server, | |||
| 942 | } | 934 | } |
| 943 | 935 | ||
| 944 | if (! config) | 936 | if (! config) |
| 945 | return FALSE; | 937 | return false; |
| 946 | 938 | ||
| 947 | if (fgets (dotted, sizeof dotted, config) | 939 | if (fgets (dotted, sizeof dotted, config) |
| 948 | && (port = strchr (dotted, ':'))) | 940 | && (port = strchr (dotted, ':'))) |
| 949 | *port++ = '\0'; | 941 | *port++ = '\0'; |
| 950 | else | 942 | else |
| 951 | { | 943 | { |
| 952 | message (TRUE, "%s: invalid configuration info\n", progname); | 944 | message (true, "%s: invalid configuration info\n", progname); |
| 953 | exit (EXIT_FAILURE); | 945 | exit (EXIT_FAILURE); |
| 954 | } | 946 | } |
| 955 | 947 | ||
| @@ -959,13 +951,13 @@ get_server_config (const char *config_file, struct sockaddr_in *server, | |||
| 959 | 951 | ||
| 960 | if (! fread (authentication, AUTH_KEY_LENGTH, 1, config)) | 952 | if (! fread (authentication, AUTH_KEY_LENGTH, 1, config)) |
| 961 | { | 953 | { |
| 962 | message (TRUE, "%s: cannot read authentication info\n", progname); | 954 | message (true, "%s: cannot read authentication info\n", progname); |
| 963 | exit (EXIT_FAILURE); | 955 | exit (EXIT_FAILURE); |
| 964 | } | 956 | } |
| 965 | 957 | ||
| 966 | fclose (config); | 958 | fclose (config); |
| 967 | 959 | ||
| 968 | return TRUE; | 960 | return true; |
| 969 | } | 961 | } |
| 970 | 962 | ||
| 971 | static HSOCKET | 963 | static HSOCKET |
| @@ -980,7 +972,7 @@ set_tcp_socket (const char *local_server_file) | |||
| 980 | return INVALID_SOCKET; | 972 | return INVALID_SOCKET; |
| 981 | 973 | ||
| 982 | if (server.sin_addr.s_addr != inet_addr ("127.0.0.1") && !quiet) | 974 | if (server.sin_addr.s_addr != inet_addr ("127.0.0.1") && !quiet) |
| 983 | message (FALSE, "%s: connected to remote socket at %s\n", | 975 | message (false, "%s: connected to remote socket at %s\n", |
| 984 | progname, inet_ntoa (server.sin_addr)); | 976 | progname, inet_ntoa (server.sin_addr)); |
| 985 | 977 | ||
| 986 | /* Open up an AF_INET socket. */ | 978 | /* Open up an AF_INET socket. */ |
| @@ -1033,7 +1025,7 @@ find_tty (const char **tty_type, const char **tty_name, int noabort) | |||
| 1033 | return 0; | 1025 | return 0; |
| 1034 | else | 1026 | else |
| 1035 | { | 1027 | { |
| 1036 | message (TRUE, "%s: could not get terminal name\n", progname); | 1028 | message (true, "%s: could not get terminal name\n", progname); |
| 1037 | fail (); | 1029 | fail (); |
| 1038 | } | 1030 | } |
| 1039 | } | 1031 | } |
| @@ -1044,7 +1036,7 @@ find_tty (const char **tty_type, const char **tty_name, int noabort) | |||
| 1044 | return 0; | 1036 | return 0; |
| 1045 | else | 1037 | else |
| 1046 | { | 1038 | { |
| 1047 | message (TRUE, "%s: please set the TERM variable to your terminal type\n", | 1039 | message (true, "%s: please set the TERM variable to your terminal type\n", |
| 1048 | progname); | 1040 | progname); |
| 1049 | fail (); | 1041 | fail (); |
| 1050 | } | 1042 | } |
| @@ -1057,7 +1049,7 @@ find_tty (const char **tty_type, const char **tty_name, int noabort) | |||
| 1057 | else | 1049 | else |
| 1058 | { | 1050 | { |
| 1059 | /* This causes nasty, MULTI_KBOARD-related input lockouts. */ | 1051 | /* This causes nasty, MULTI_KBOARD-related input lockouts. */ |
| 1060 | message (TRUE, "%s: opening a frame in an Emacs term buffer" | 1052 | message (true, "%s: opening a frame in an Emacs term buffer" |
| 1061 | " is not supported\n", progname); | 1053 | " is not supported\n", progname); |
| 1062 | fail (); | 1054 | fail (); |
| 1063 | } | 1055 | } |
| @@ -1188,7 +1180,7 @@ set_local_socket (const char *local_socket_name) | |||
| 1188 | /* Open up an AF_UNIX socket in this person's home directory. */ | 1180 | /* Open up an AF_UNIX socket in this person's home directory. */ |
| 1189 | if ((s = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) | 1181 | if ((s = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) |
| 1190 | { | 1182 | { |
| 1191 | message (TRUE, "%s: socket: %s\n", progname, strerror (errno)); | 1183 | message (true, "%s: socket: %s\n", progname, strerror (errno)); |
| 1192 | return INVALID_SOCKET; | 1184 | return INVALID_SOCKET; |
| 1193 | } | 1185 | } |
| 1194 | 1186 | ||
| @@ -1239,7 +1231,7 @@ set_local_socket (const char *local_socket_name) | |||
| 1239 | strcpy (server.sun_path, local_socket_name); | 1231 | strcpy (server.sun_path, local_socket_name); |
| 1240 | else | 1232 | else |
| 1241 | { | 1233 | { |
| 1242 | message (TRUE, "%s: socket-name %s too long\n", | 1234 | message (true, "%s: socket-name %s too long\n", |
| 1243 | progname, local_socket_name); | 1235 | progname, local_socket_name); |
| 1244 | fail (); | 1236 | fail (); |
| 1245 | } | 1237 | } |
| @@ -1278,7 +1270,7 @@ set_local_socket (const char *local_socket_name) | |||
| 1278 | strcpy (server.sun_path, user_socket_name); | 1270 | strcpy (server.sun_path, user_socket_name); |
| 1279 | else | 1271 | else |
| 1280 | { | 1272 | { |
| 1281 | message (TRUE, "%s: socket-name %s too long\n", | 1273 | message (true, "%s: socket-name %s too long\n", |
| 1282 | progname, user_socket_name); | 1274 | progname, user_socket_name); |
| 1283 | exit (EXIT_FAILURE); | 1275 | exit (EXIT_FAILURE); |
| 1284 | } | 1276 | } |
| @@ -1302,7 +1294,7 @@ set_local_socket (const char *local_socket_name) | |||
| 1302 | we are root. */ | 1294 | we are root. */ |
| 1303 | if (0 != geteuid ()) | 1295 | if (0 != geteuid ()) |
| 1304 | { | 1296 | { |
| 1305 | message (TRUE, "%s: Invalid socket owner\n", progname); | 1297 | message (true, "%s: Invalid socket owner\n", progname); |
| 1306 | return INVALID_SOCKET; | 1298 | return INVALID_SOCKET; |
| 1307 | } | 1299 | } |
| 1308 | break; | 1300 | break; |
| @@ -1310,12 +1302,12 @@ set_local_socket (const char *local_socket_name) | |||
| 1310 | case 2: | 1302 | case 2: |
| 1311 | /* `stat' failed */ | 1303 | /* `stat' failed */ |
| 1312 | if (saved_errno == ENOENT) | 1304 | if (saved_errno == ENOENT) |
| 1313 | message (TRUE, | 1305 | message (true, |
| 1314 | "%s: can't find socket; have you started the server?\n\ | 1306 | "%s: can't find socket; have you started the server?\n\ |
| 1315 | To start the server in Emacs, type \"M-x server-start\".\n", | 1307 | To start the server in Emacs, type \"M-x server-start\".\n", |
| 1316 | progname); | 1308 | progname); |
| 1317 | else | 1309 | else |
| 1318 | message (TRUE, "%s: can't stat %s: %s\n", | 1310 | message (true, "%s: can't stat %s: %s\n", |
| 1319 | progname, server.sun_path, strerror (saved_errno)); | 1311 | progname, server.sun_path, strerror (saved_errno)); |
| 1320 | return INVALID_SOCKET; | 1312 | return INVALID_SOCKET; |
| 1321 | } | 1313 | } |
| @@ -1324,7 +1316,7 @@ To start the server in Emacs, type \"M-x server-start\".\n", | |||
| 1324 | if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2) | 1316 | if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2) |
| 1325 | < 0) | 1317 | < 0) |
| 1326 | { | 1318 | { |
| 1327 | message (TRUE, "%s: connect: %s\n", progname, strerror (errno)); | 1319 | message (true, "%s: connect: %s\n", progname, strerror (errno)); |
| 1328 | return INVALID_SOCKET; | 1320 | return INVALID_SOCKET; |
| 1329 | } | 1321 | } |
| 1330 | 1322 | ||
| @@ -1347,7 +1339,7 @@ set_socket (int no_exit_if_error) | |||
| 1347 | s = set_local_socket (socket_name); | 1339 | s = set_local_socket (socket_name); |
| 1348 | if ((s != INVALID_SOCKET) || no_exit_if_error) | 1340 | if ((s != INVALID_SOCKET) || no_exit_if_error) |
| 1349 | return s; | 1341 | return s; |
| 1350 | message (TRUE, "%s: error accessing socket \"%s\"\n", | 1342 | message (true, "%s: error accessing socket \"%s\"\n", |
| 1351 | progname, socket_name); | 1343 | progname, socket_name); |
| 1352 | exit (EXIT_FAILURE); | 1344 | exit (EXIT_FAILURE); |
| 1353 | } | 1345 | } |
| @@ -1363,7 +1355,7 @@ set_socket (int no_exit_if_error) | |||
| 1363 | if ((s != INVALID_SOCKET) || no_exit_if_error) | 1355 | if ((s != INVALID_SOCKET) || no_exit_if_error) |
| 1364 | return s; | 1356 | return s; |
| 1365 | 1357 | ||
| 1366 | message (TRUE, "%s: error accessing server file \"%s\"\n", | 1358 | message (true, "%s: error accessing server file \"%s\"\n", |
| 1367 | progname, local_server_file); | 1359 | progname, local_server_file); |
| 1368 | exit (EXIT_FAILURE); | 1360 | exit (EXIT_FAILURE); |
| 1369 | } | 1361 | } |
| @@ -1381,7 +1373,7 @@ set_socket (int no_exit_if_error) | |||
| 1381 | return s; | 1373 | return s; |
| 1382 | 1374 | ||
| 1383 | /* No implicit or explicit socket, and no alternate editor. */ | 1375 | /* No implicit or explicit socket, and no alternate editor. */ |
| 1384 | message (TRUE, "%s: No socket or alternate editor. Please use:\n\n" | 1376 | message (true, "%s: No socket or alternate editor. Please use:\n\n" |
| 1385 | #ifndef NO_SOCKETS_IN_FILE_SYSTEM | 1377 | #ifndef NO_SOCKETS_IN_FILE_SYSTEM |
| 1386 | "\t--socket-name\n" | 1378 | "\t--socket-name\n" |
| 1387 | #endif | 1379 | #endif |
| @@ -1490,15 +1482,15 @@ start_daemon_and_retry_set_socket (void) | |||
| 1490 | 1482 | ||
| 1491 | if ((w == -1) || !WIFEXITED (status) || WEXITSTATUS (status)) | 1483 | if ((w == -1) || !WIFEXITED (status) || WEXITSTATUS (status)) |
| 1492 | { | 1484 | { |
| 1493 | message (TRUE, "Error: Could not start the Emacs daemon\n"); | 1485 | message (true, "Error: Could not start the Emacs daemon\n"); |
| 1494 | exit (EXIT_FAILURE); | 1486 | exit (EXIT_FAILURE); |
| 1495 | } | 1487 | } |
| 1496 | 1488 | ||
| 1497 | /* Try connecting, the daemon should have started by now. */ | 1489 | /* Try connecting, the daemon should have started by now. */ |
| 1498 | message (TRUE, "Emacs daemon should have started, trying to connect again\n"); | 1490 | message (true, "Emacs daemon should have started, trying to connect again\n"); |
| 1499 | if ((emacs_socket = set_socket (1)) == INVALID_SOCKET) | 1491 | if ((emacs_socket = set_socket (1)) == INVALID_SOCKET) |
| 1500 | { | 1492 | { |
| 1501 | message (TRUE, "Error: Cannot connect even after starting the Emacs daemon\n"); | 1493 | message (true, "Error: Cannot connect even after starting the Emacs daemon\n"); |
| 1502 | exit (EXIT_FAILURE); | 1494 | exit (EXIT_FAILURE); |
| 1503 | } | 1495 | } |
| 1504 | } | 1496 | } |
| @@ -1526,7 +1518,7 @@ start_daemon_and_retry_set_socket (void) | |||
| 1526 | d_argv[1] = daemon_arg; | 1518 | d_argv[1] = daemon_arg; |
| 1527 | } | 1519 | } |
| 1528 | execvp ("emacs", d_argv); | 1520 | execvp ("emacs", d_argv); |
| 1529 | message (TRUE, "%s: error starting emacs daemon\n", progname); | 1521 | message (true, "%s: error starting emacs daemon\n", progname); |
| 1530 | } | 1522 | } |
| 1531 | #endif /* WINDOWSNT */ | 1523 | #endif /* WINDOWSNT */ |
| 1532 | } | 1524 | } |
| @@ -1556,7 +1548,7 @@ main (int argc, char **argv) | |||
| 1556 | 1548 | ||
| 1557 | if ((argc - optind < 1) && !eval && current_frame) | 1549 | if ((argc - optind < 1) && !eval && current_frame) |
| 1558 | { | 1550 | { |
| 1559 | message (TRUE, "%s: file name or argument required\n" | 1551 | message (true, "%s: file name or argument required\n" |
| 1560 | "Try `%s --help' for more information\n", | 1552 | "Try `%s --help' for more information\n", |
| 1561 | progname, progname); | 1553 | progname, progname); |
| 1562 | exit (EXIT_FAILURE); | 1554 | exit (EXIT_FAILURE); |
| @@ -1579,7 +1571,7 @@ main (int argc, char **argv) | |||
| 1579 | cwd = get_current_dir_name (); | 1571 | cwd = get_current_dir_name (); |
| 1580 | if (cwd == 0) | 1572 | if (cwd == 0) |
| 1581 | { | 1573 | { |
| 1582 | message (TRUE, "%s: %s\n", progname, | 1574 | message (true, "%s: %s\n", progname, |
| 1583 | "Cannot get current working directory"); | 1575 | "Cannot get current working directory"); |
| 1584 | fail (); | 1576 | fail (); |
| 1585 | } | 1577 | } |
diff --git a/lib-src/etags.c b/lib-src/etags.c index 21cf3654b9e..c3ed5fa07b2 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -80,14 +80,11 @@ University of California, as described above. */ | |||
| 80 | 80 | ||
| 81 | char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; | 81 | char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; |
| 82 | 82 | ||
| 83 | #define TRUE 1 | ||
| 84 | #define FALSE 0 | ||
| 85 | |||
| 86 | #ifdef DEBUG | 83 | #ifdef DEBUG |
| 87 | # undef DEBUG | 84 | # undef DEBUG |
| 88 | # define DEBUG TRUE | 85 | # define DEBUG true |
| 89 | #else | 86 | #else |
| 90 | # define DEBUG FALSE | 87 | # define DEBUG false |
| 91 | # define NDEBUG /* disable assert */ | 88 | # define NDEBUG /* disable assert */ |
| 92 | #endif | 89 | #endif |
| 93 | 90 | ||
| @@ -107,12 +104,12 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; | |||
| 107 | 104 | ||
| 108 | #ifdef MSDOS | 105 | #ifdef MSDOS |
| 109 | # undef MSDOS | 106 | # undef MSDOS |
| 110 | # define MSDOS TRUE | 107 | # define MSDOS true |
| 111 | # include <fcntl.h> | 108 | # include <fcntl.h> |
| 112 | # include <sys/param.h> | 109 | # include <sys/param.h> |
| 113 | # include <io.h> | 110 | # include <io.h> |
| 114 | #else | 111 | #else |
| 115 | # define MSDOS FALSE | 112 | # define MSDOS false |
| 116 | #endif /* MSDOS */ | 113 | #endif /* MSDOS */ |
| 117 | 114 | ||
| 118 | #ifdef WINDOWSNT | 115 | #ifdef WINDOWSNT |
| @@ -150,9 +147,9 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; | |||
| 150 | tag tables and tags typedefs, #defines and struct/union/enum by default. */ | 147 | tag tables and tags typedefs, #defines and struct/union/enum by default. */ |
| 151 | #ifdef CTAGS | 148 | #ifdef CTAGS |
| 152 | # undef CTAGS | 149 | # undef CTAGS |
| 153 | # define CTAGS TRUE | 150 | # define CTAGS true |
| 154 | #else | 151 | #else |
| 155 | # define CTAGS FALSE | 152 | # define CTAGS false |
| 156 | #endif | 153 | #endif |
| 157 | 154 | ||
| 158 | #define streq(s,t) (assert ((s)!=NULL || (t)!=NULL), !strcmp (s, t)) | 155 | #define streq(s,t) (assert ((s)!=NULL || (t)!=NULL), !strcmp (s, t)) |
| @@ -194,8 +191,6 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; | |||
| 194 | (char *) (op), (n) * sizeof (Type))) | 191 | (char *) (op), (n) * sizeof (Type))) |
| 195 | #endif | 192 | #endif |
| 196 | 193 | ||
| 197 | #define bool int | ||
| 198 | |||
| 199 | typedef void Lang_function (FILE *); | 194 | typedef void Lang_function (FILE *); |
| 200 | 195 | ||
| 201 | typedef struct | 196 | typedef struct |
| @@ -401,7 +396,7 @@ static const char | |||
| 401 | *midtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789"; | 396 | *midtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789"; |
| 402 | 397 | ||
| 403 | static bool append_to_tagfile; /* -a: append to tags */ | 398 | static bool append_to_tagfile; /* -a: append to tags */ |
| 404 | /* The next five default to TRUE in C and derived languages. */ | 399 | /* The next five default to true in C and derived languages. */ |
| 405 | static bool typedefs; /* -t: create tags for C and Ada typedefs */ | 400 | static bool typedefs; /* -t: create tags for C and Ada typedefs */ |
| 406 | static bool typedefs_or_cplusplus; /* -T: create tags for C typedefs, level */ | 401 | static bool typedefs_or_cplusplus; /* -T: create tags for C typedefs, level */ |
| 407 | /* 0 struct/enum/union decls, and C++ */ | 402 | /* 0 struct/enum/union decls, and C++ */ |
| @@ -409,18 +404,18 @@ static bool typedefs_or_cplusplus; /* -T: create tags for C typedefs, level */ | |||
| 409 | static bool constantypedefs; /* -d: create tags for C #define, enum */ | 404 | static bool constantypedefs; /* -d: create tags for C #define, enum */ |
| 410 | /* constants and variables. */ | 405 | /* constants and variables. */ |
| 411 | /* -D: opposite of -d. Default under ctags. */ | 406 | /* -D: opposite of -d. Default under ctags. */ |
| 412 | static bool globals; /* create tags for global variables */ | 407 | static int globals; /* create tags for global variables */ |
| 413 | static bool members; /* create tags for C member variables */ | 408 | static int members; /* create tags for C member variables */ |
| 414 | static bool declarations; /* --declarations: tag them and extern in C&Co*/ | 409 | static int declarations; /* --declarations: tag them and extern in C&Co*/ |
| 415 | static bool no_line_directive; /* ignore #line directives (undocumented) */ | 410 | static int no_line_directive; /* ignore #line directives (undocumented) */ |
| 416 | static bool no_duplicates; /* no duplicate tags for ctags (undocumented) */ | 411 | static int no_duplicates; /* no duplicate tags for ctags (undocumented) */ |
| 417 | static bool update; /* -u: update tags */ | 412 | static bool update; /* -u: update tags */ |
| 418 | static bool vgrind_style; /* -v: create vgrind style index output */ | 413 | static bool vgrind_style; /* -v: create vgrind style index output */ |
| 419 | static bool no_warnings; /* -w: suppress warnings (undocumented) */ | 414 | static bool no_warnings; /* -w: suppress warnings (undocumented) */ |
| 420 | static bool cxref_style; /* -x: create cxref style output */ | 415 | static bool cxref_style; /* -x: create cxref style output */ |
| 421 | static bool cplusplus; /* .[hc] means C++, not C (undocumented) */ | 416 | static bool cplusplus; /* .[hc] means C++, not C (undocumented) */ |
| 422 | static bool ignoreindent; /* -I: ignore indentation in C */ | 417 | static bool ignoreindent; /* -I: ignore indentation in C */ |
| 423 | static bool packages_only; /* --packages-only: in Ada, only tag packages*/ | 418 | static int packages_only; /* --packages-only: in Ada, only tag packages*/ |
| 424 | 419 | ||
| 425 | /* STDIN is defined in LynxOS system headers */ | 420 | /* STDIN is defined in LynxOS system headers */ |
| 426 | #ifdef STDIN | 421 | #ifdef STDIN |
| @@ -436,17 +431,17 @@ static bool need_filebuf; /* some regexes are multi-line */ | |||
| 436 | static struct option longopts[] = | 431 | static struct option longopts[] = |
| 437 | { | 432 | { |
| 438 | { "append", no_argument, NULL, 'a' }, | 433 | { "append", no_argument, NULL, 'a' }, |
| 439 | { "packages-only", no_argument, &packages_only, TRUE }, | 434 | { "packages-only", no_argument, &packages_only, 1 }, |
| 440 | { "c++", no_argument, NULL, 'C' }, | 435 | { "c++", no_argument, NULL, 'C' }, |
| 441 | { "declarations", no_argument, &declarations, TRUE }, | 436 | { "declarations", no_argument, &declarations, 1 }, |
| 442 | { "no-line-directive", no_argument, &no_line_directive, TRUE }, | 437 | { "no-line-directive", no_argument, &no_line_directive, 1 }, |
| 443 | { "no-duplicates", no_argument, &no_duplicates, TRUE }, | 438 | { "no-duplicates", no_argument, &no_duplicates, 1 }, |
| 444 | { "help", no_argument, NULL, 'h' }, | 439 | { "help", no_argument, NULL, 'h' }, |
| 445 | { "help", no_argument, NULL, 'H' }, | 440 | { "help", no_argument, NULL, 'H' }, |
| 446 | { "ignore-indentation", no_argument, NULL, 'I' }, | 441 | { "ignore-indentation", no_argument, NULL, 'I' }, |
| 447 | { "language", required_argument, NULL, 'l' }, | 442 | { "language", required_argument, NULL, 'l' }, |
| 448 | { "members", no_argument, &members, TRUE }, | 443 | { "members", no_argument, &members, 1 }, |
| 449 | { "no-members", no_argument, &members, FALSE }, | 444 | { "no-members", no_argument, &members, 0 }, |
| 450 | { "output", required_argument, NULL, 'o' }, | 445 | { "output", required_argument, NULL, 'o' }, |
| 451 | { "regex", required_argument, NULL, 'r' }, | 446 | { "regex", required_argument, NULL, 'r' }, |
| 452 | { "no-regex", no_argument, NULL, 'R' }, | 447 | { "no-regex", no_argument, NULL, 'R' }, |
| @@ -458,7 +453,7 @@ static struct option longopts[] = | |||
| 458 | { "backward-search", no_argument, NULL, 'B' }, | 453 | { "backward-search", no_argument, NULL, 'B' }, |
| 459 | { "cxref", no_argument, NULL, 'x' }, | 454 | { "cxref", no_argument, NULL, 'x' }, |
| 460 | { "defines", no_argument, NULL, 'd' }, | 455 | { "defines", no_argument, NULL, 'd' }, |
| 461 | { "globals", no_argument, &globals, TRUE }, | 456 | { "globals", no_argument, &globals, 1 }, |
| 462 | { "typedefs", no_argument, NULL, 't' }, | 457 | { "typedefs", no_argument, NULL, 't' }, |
| 463 | { "typedefs-and-c++", no_argument, NULL, 'T' }, | 458 | { "typedefs-and-c++", no_argument, NULL, 'T' }, |
| 464 | { "update", no_argument, NULL, 'u' }, | 459 | { "update", no_argument, NULL, 'u' }, |
| @@ -467,7 +462,7 @@ static struct option longopts[] = | |||
| 467 | 462 | ||
| 468 | #else /* Etags options */ | 463 | #else /* Etags options */ |
| 469 | { "no-defines", no_argument, NULL, 'D' }, | 464 | { "no-defines", no_argument, NULL, 'D' }, |
| 470 | { "no-globals", no_argument, &globals, FALSE }, | 465 | { "no-globals", no_argument, &globals, 0 }, |
| 471 | { "include", required_argument, NULL, 'i' }, | 466 | { "include", required_argument, NULL, 'i' }, |
| 472 | #endif | 467 | #endif |
| 473 | { NULL } | 468 | { NULL } |
| @@ -761,7 +756,7 @@ static language lang_names [] = | |||
| 761 | { "scheme", Scheme_help, Scheme_functions, Scheme_suffixes }, | 756 | { "scheme", Scheme_help, Scheme_functions, Scheme_suffixes }, |
| 762 | { "tex", TeX_help, TeX_commands, TeX_suffixes }, | 757 | { "tex", TeX_help, TeX_commands, TeX_suffixes }, |
| 763 | { "texinfo", Texinfo_help, Texinfo_nodes, Texinfo_suffixes }, | 758 | { "texinfo", Texinfo_help, Texinfo_nodes, Texinfo_suffixes }, |
| 764 | { "yacc", Yacc_help,Yacc_entries,Yacc_suffixes,NULL,NULL,TRUE}, | 759 | { "yacc", Yacc_help,Yacc_entries,Yacc_suffixes,NULL,NULL,true}, |
| 765 | { "auto", auto_help }, /* default guessing scheme */ | 760 | { "auto", auto_help }, /* default guessing scheme */ |
| 766 | { "none", none_help, just_read_file }, /* regexp matching only */ | 761 | { "none", none_help, just_read_file }, /* regexp matching only */ |
| 767 | { NULL } /* end of list */ | 762 | { NULL } /* end of list */ |
| @@ -820,13 +815,13 @@ print_version (void) | |||
| 820 | } | 815 | } |
| 821 | 816 | ||
| 822 | #ifndef PRINT_UNDOCUMENTED_OPTIONS_HELP | 817 | #ifndef PRINT_UNDOCUMENTED_OPTIONS_HELP |
| 823 | # define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE | 818 | # define PRINT_UNDOCUMENTED_OPTIONS_HELP false |
| 824 | #endif | 819 | #endif |
| 825 | 820 | ||
| 826 | static _Noreturn void | 821 | static _Noreturn void |
| 827 | print_help (argument *argbuffer) | 822 | print_help (argument *argbuffer) |
| 828 | { | 823 | { |
| 829 | bool help_for_lang = FALSE; | 824 | bool help_for_lang = false; |
| 830 | 825 | ||
| 831 | for (; argbuffer->arg_type != at_end; argbuffer++) | 826 | for (; argbuffer->arg_type != at_end; argbuffer++) |
| 832 | if (argbuffer->arg_type == at_language) | 827 | if (argbuffer->arg_type == at_language) |
| @@ -834,7 +829,7 @@ print_help (argument *argbuffer) | |||
| 834 | if (help_for_lang) | 829 | if (help_for_lang) |
| 835 | puts (""); | 830 | puts (""); |
| 836 | puts (argbuffer->lang->help); | 831 | puts (argbuffer->lang->help); |
| 837 | help_for_lang = TRUE; | 832 | help_for_lang = true; |
| 838 | } | 833 | } |
| 839 | 834 | ||
| 840 | if (help_for_lang) | 835 | if (help_for_lang) |
| @@ -1005,7 +1000,7 @@ main (int argc, char **argv) | |||
| 1005 | argument *argbuffer; | 1000 | argument *argbuffer; |
| 1006 | int current_arg, file_count; | 1001 | int current_arg, file_count; |
| 1007 | linebuffer filename_lb; | 1002 | linebuffer filename_lb; |
| 1008 | bool help_asked = FALSE; | 1003 | bool help_asked = false; |
| 1009 | ptrdiff_t len; | 1004 | ptrdiff_t len; |
| 1010 | char *optstring; | 1005 | char *optstring; |
| 1011 | int opt; | 1006 | int opt; |
| @@ -1030,8 +1025,8 @@ main (int argc, char **argv) | |||
| 1030 | * Also default to find macro constants, enum constants, struct | 1025 | * Also default to find macro constants, enum constants, struct |
| 1031 | * members and global variables. Do it for both etags and ctags. | 1026 | * members and global variables. Do it for both etags and ctags. |
| 1032 | */ | 1027 | */ |
| 1033 | typedefs = typedefs_or_cplusplus = constantypedefs = TRUE; | 1028 | typedefs = typedefs_or_cplusplus = constantypedefs = true; |
| 1034 | globals = members = TRUE; | 1029 | globals = members = true; |
| 1035 | 1030 | ||
| 1036 | /* When the optstring begins with a '-' getopt_long does not rearrange the | 1031 | /* When the optstring begins with a '-' getopt_long does not rearrange the |
| 1037 | non-options arguments to be at the end, but leaves them alone. */ | 1032 | non-options arguments to be at the end, but leaves them alone. */ |
| @@ -1069,12 +1064,12 @@ main (int argc, char **argv) | |||
| 1069 | ++file_count; | 1064 | ++file_count; |
| 1070 | if (parsing_stdin) | 1065 | if (parsing_stdin) |
| 1071 | fatal ("cannot parse standard input more than once", (char *)NULL); | 1066 | fatal ("cannot parse standard input more than once", (char *)NULL); |
| 1072 | parsing_stdin = TRUE; | 1067 | parsing_stdin = true; |
| 1073 | break; | 1068 | break; |
| 1074 | 1069 | ||
| 1075 | /* Common options. */ | 1070 | /* Common options. */ |
| 1076 | case 'a': append_to_tagfile = TRUE; break; | 1071 | case 'a': append_to_tagfile = true; break; |
| 1077 | case 'C': cplusplus = TRUE; break; | 1072 | case 'C': cplusplus = true; break; |
| 1078 | case 'f': /* for compatibility with old makefiles */ | 1073 | case 'f': /* for compatibility with old makefiles */ |
| 1079 | case 'o': | 1074 | case 'o': |
| 1080 | if (tagfile) | 1075 | if (tagfile) |
| @@ -1087,7 +1082,7 @@ main (int argc, char **argv) | |||
| 1087 | break; | 1082 | break; |
| 1088 | case 'I': | 1083 | case 'I': |
| 1089 | case 'S': /* for backward compatibility */ | 1084 | case 'S': /* for backward compatibility */ |
| 1090 | ignoreindent = TRUE; | 1085 | ignoreindent = true; |
| 1091 | break; | 1086 | break; |
| 1092 | case 'l': | 1087 | case 'l': |
| 1093 | { | 1088 | { |
| @@ -1122,22 +1117,22 @@ main (int argc, char **argv) | |||
| 1122 | break; | 1117 | break; |
| 1123 | case 'h': | 1118 | case 'h': |
| 1124 | case 'H': | 1119 | case 'H': |
| 1125 | help_asked = TRUE; | 1120 | help_asked = true; |
| 1126 | break; | 1121 | break; |
| 1127 | 1122 | ||
| 1128 | /* Etags options */ | 1123 | /* Etags options */ |
| 1129 | case 'D': constantypedefs = FALSE; break; | 1124 | case 'D': constantypedefs = false; break; |
| 1130 | case 'i': included_files[nincluded_files++] = optarg; break; | 1125 | case 'i': included_files[nincluded_files++] = optarg; break; |
| 1131 | 1126 | ||
| 1132 | /* Ctags options. */ | 1127 | /* Ctags options. */ |
| 1133 | case 'B': searchar = '?'; break; | 1128 | case 'B': searchar = '?'; break; |
| 1134 | case 'd': constantypedefs = TRUE; break; | 1129 | case 'd': constantypedefs = true; break; |
| 1135 | case 't': typedefs = TRUE; break; | 1130 | case 't': typedefs = true; break; |
| 1136 | case 'T': typedefs = typedefs_or_cplusplus = TRUE; break; | 1131 | case 'T': typedefs = typedefs_or_cplusplus = true; break; |
| 1137 | case 'u': update = TRUE; break; | 1132 | case 'u': update = true; break; |
| 1138 | case 'v': vgrind_style = TRUE; /*FALLTHRU*/ | 1133 | case 'v': vgrind_style = true; /*FALLTHRU*/ |
| 1139 | case 'x': cxref_style = TRUE; break; | 1134 | case 'x': cxref_style = true; break; |
| 1140 | case 'w': no_warnings = TRUE; break; | 1135 | case 'w': no_warnings = true; break; |
| 1141 | default: | 1136 | default: |
| 1142 | suggest_asking_for_help (); | 1137 | suggest_asking_for_help (); |
| 1143 | /* NOTREACHED */ | 1138 | /* NOTREACHED */ |
| @@ -1308,7 +1303,7 @@ main (int argc, char **argv) | |||
| 1308 | fatal ("failed to execute shell command", (char *)NULL); | 1303 | fatal ("failed to execute shell command", (char *)NULL); |
| 1309 | } | 1304 | } |
| 1310 | free (cmd); | 1305 | free (cmd); |
| 1311 | append_to_tagfile = TRUE; | 1306 | append_to_tagfile = true; |
| 1312 | } | 1307 | } |
| 1313 | 1308 | ||
| 1314 | tagf = fopen (tagfile, append_to_tagfile ? "a" : "w"); | 1309 | tagf = fopen (tagfile, append_to_tagfile ? "a" : "w"); |
| @@ -1605,9 +1600,9 @@ process_file (FILE *fh, char *fn, language *lang) | |||
| 1605 | to the directory of the tags file. */ | 1600 | to the directory of the tags file. */ |
| 1606 | fdp->taggedfname = relative_filename (fn, tagfiledir); | 1601 | fdp->taggedfname = relative_filename (fn, tagfiledir); |
| 1607 | } | 1602 | } |
| 1608 | fdp->usecharno = TRUE; /* use char position when making tags */ | 1603 | fdp->usecharno = true; /* use char position when making tags */ |
| 1609 | fdp->prop = NULL; | 1604 | fdp->prop = NULL; |
| 1610 | fdp->written = FALSE; /* not written on tags file yet */ | 1605 | fdp->written = false; /* not written on tags file yet */ |
| 1611 | 1606 | ||
| 1612 | fdhead = fdp; | 1607 | fdhead = fdp; |
| 1613 | curfdp = fdhead; /* the current file description */ | 1608 | curfdp = fdhead; /* the current file description */ |
| @@ -1653,26 +1648,27 @@ process_file (FILE *fh, char *fn, language *lang) | |||
| 1653 | * This routine sets up the boolean pseudo-functions which work | 1648 | * This routine sets up the boolean pseudo-functions which work |
| 1654 | * by setting boolean flags dependent upon the corresponding character. | 1649 | * by setting boolean flags dependent upon the corresponding character. |
| 1655 | * Every char which is NOT in that string is not a white char. Therefore, | 1650 | * Every char which is NOT in that string is not a white char. Therefore, |
| 1656 | * all of the array "_wht" is set to FALSE, and then the elements | 1651 | * all of the array "_wht" is set to false, and then the elements |
| 1657 | * subscripted by the chars in "white" are set to TRUE. Thus "_wht" | 1652 | * subscripted by the chars in "white" are set to true. Thus "_wht" |
| 1658 | * of a char is TRUE if it is the string "white", else FALSE. | 1653 | * of a char is true if it is the string "white", else false. |
| 1659 | */ | 1654 | */ |
| 1660 | static void | 1655 | static void |
| 1661 | init (void) | 1656 | init (void) |
| 1662 | { | 1657 | { |
| 1663 | register const char *sp; | 1658 | const char *sp; |
| 1664 | register int i; | 1659 | int i; |
| 1665 | 1660 | ||
| 1666 | for (i = 0; i < CHARS; i++) | 1661 | for (i = 0; i < CHARS; i++) |
| 1667 | iswhite (i) = notinname (i) = begtoken (i) = intoken (i) = endtoken (i) = FALSE; | 1662 | iswhite (i) = notinname (i) = begtoken (i) = intoken (i) = endtoken (i) |
| 1668 | for (sp = white; *sp != '\0'; sp++) iswhite (*sp) = TRUE; | 1663 | = false; |
| 1669 | for (sp = nonam; *sp != '\0'; sp++) notinname (*sp) = TRUE; | 1664 | for (sp = white; *sp != '\0'; sp++) iswhite (*sp) = true; |
| 1665 | for (sp = nonam; *sp != '\0'; sp++) notinname (*sp) = true; | ||
| 1670 | notinname ('\0') = notinname ('\n'); | 1666 | notinname ('\0') = notinname ('\n'); |
| 1671 | for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = TRUE; | 1667 | for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = true; |
| 1672 | begtoken ('\0') = begtoken ('\n'); | 1668 | begtoken ('\0') = begtoken ('\n'); |
| 1673 | for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = TRUE; | 1669 | for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = true; |
| 1674 | intoken ('\0') = intoken ('\n'); | 1670 | intoken ('\0') = intoken ('\n'); |
| 1675 | for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = TRUE; | 1671 | for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = true; |
| 1676 | endtoken ('\0') = endtoken ('\n'); | 1672 | endtoken ('\0') = endtoken ('\n'); |
| 1677 | } | 1673 | } |
| 1678 | 1674 | ||
| @@ -1696,7 +1692,7 @@ find_entries (FILE *inf) | |||
| 1696 | /* Else try to guess the language given the file name. */ | 1692 | /* Else try to guess the language given the file name. */ |
| 1697 | if (parser == NULL) | 1693 | if (parser == NULL) |
| 1698 | { | 1694 | { |
| 1699 | lang = get_language_from_filename (curfdp->infname, TRUE); | 1695 | lang = get_language_from_filename (curfdp->infname, true); |
| 1700 | if (lang != NULL && lang->function != NULL) | 1696 | if (lang != NULL && lang->function != NULL) |
| 1701 | { | 1697 | { |
| 1702 | curfdp->lang = lang; | 1698 | curfdp->lang = lang; |
| @@ -1743,7 +1739,7 @@ find_entries (FILE *inf) | |||
| 1743 | /* Else try to guess the language given the case insensitive file name. */ | 1739 | /* Else try to guess the language given the case insensitive file name. */ |
| 1744 | if (parser == NULL) | 1740 | if (parser == NULL) |
| 1745 | { | 1741 | { |
| 1746 | lang = get_language_from_filename (curfdp->infname, FALSE); | 1742 | lang = get_language_from_filename (curfdp->infname, false); |
| 1747 | if (lang != NULL && lang->function != NULL) | 1743 | if (lang != NULL && lang->function != NULL) |
| 1748 | { | 1744 | { |
| 1749 | curfdp->lang = lang; | 1745 | curfdp->lang = lang; |
| @@ -1841,7 +1837,7 @@ find_entries (FILE *inf) | |||
| 1841 | static void | 1837 | static void |
| 1842 | make_tag (const char *name, /* tag name, or NULL if unnamed */ | 1838 | make_tag (const char *name, /* tag name, or NULL if unnamed */ |
| 1843 | int namelen, /* tag length */ | 1839 | int namelen, /* tag length */ |
| 1844 | int is_func, /* tag is a function */ | 1840 | bool is_func, /* tag is a function */ |
| 1845 | char *linestart, /* start of the line where tag is */ | 1841 | char *linestart, /* start of the line where tag is */ |
| 1846 | int linelen, /* length of the line where tag is */ | 1842 | int linelen, /* length of the line where tag is */ |
| 1847 | int lno, /* line number */ | 1843 | int lno, /* line number */ |
| @@ -1869,7 +1865,7 @@ make_tag (const char *name, /* tag name, or NULL if unnamed */ | |||
| 1869 | && (cp == linestart | 1865 | && (cp == linestart |
| 1870 | || notinname (cp[-1])) /* rule #3 */ | 1866 | || notinname (cp[-1])) /* rule #3 */ |
| 1871 | && strneq (name, cp, namelen)) /* rule #2 */ | 1867 | && strneq (name, cp, namelen)) /* rule #2 */ |
| 1872 | named = FALSE; /* use implicit tag name */ | 1868 | named = false; /* use implicit tag name */ |
| 1873 | } | 1869 | } |
| 1874 | } | 1870 | } |
| 1875 | 1871 | ||
| @@ -1881,7 +1877,8 @@ make_tag (const char *name, /* tag name, or NULL if unnamed */ | |||
| 1881 | 1877 | ||
| 1882 | /* Record a tag. */ | 1878 | /* Record a tag. */ |
| 1883 | static void | 1879 | static void |
| 1884 | pfnote (char *name, int is_func, char *linestart, int linelen, int lno, long int cno) | 1880 | pfnote (char *name, bool is_func, char *linestart, int linelen, int lno, |
| 1881 | long int cno) | ||
| 1885 | /* tag name, or NULL if unnamed */ | 1882 | /* tag name, or NULL if unnamed */ |
| 1886 | /* tag is a function */ | 1883 | /* tag is a function */ |
| 1887 | /* start of the line where tag is */ | 1884 | /* start of the line where tag is */ |
| @@ -1908,8 +1905,8 @@ pfnote (char *name, int is_func, char *linestart, int linelen, int lno, long int | |||
| 1908 | } | 1905 | } |
| 1909 | else | 1906 | else |
| 1910 | np->name = name; | 1907 | np->name = name; |
| 1911 | np->valid = TRUE; | 1908 | np->valid = true; |
| 1912 | np->been_warned = FALSE; | 1909 | np->been_warned = false; |
| 1913 | np->fdp = curfdp; | 1910 | np->fdp = curfdp; |
| 1914 | np->is_func = is_func; | 1911 | np->is_func = is_func; |
| 1915 | np->lno = lno; | 1912 | np->lno = lno; |
| @@ -2043,7 +2040,7 @@ add_node (node *np, node **cur_node_p) | |||
| 2043 | (stderr, | 2040 | (stderr, |
| 2044 | "Duplicate entry in files %s and %s: %s (Warning only)\n", | 2041 | "Duplicate entry in files %s and %s: %s (Warning only)\n", |
| 2045 | np->fdp->infname, cur_node->fdp->infname, np->name); | 2042 | np->fdp->infname, cur_node->fdp->infname, np->name); |
| 2046 | cur_node->been_warned = TRUE; | 2043 | cur_node->been_warned = true; |
| 2047 | } | 2044 | } |
| 2048 | return; | 2045 | return; |
| 2049 | } | 2046 | } |
| @@ -2071,7 +2068,7 @@ invalidate_nodes (fdesc *badfdp, node **npp) | |||
| 2071 | if (np->left != NULL) | 2068 | if (np->left != NULL) |
| 2072 | invalidate_nodes (badfdp, &np->left); | 2069 | invalidate_nodes (badfdp, &np->left); |
| 2073 | if (np->fdp == badfdp) | 2070 | if (np->fdp == badfdp) |
| 2074 | np->valid = FALSE; | 2071 | np->valid = false; |
| 2075 | if (np->right != NULL) | 2072 | if (np->right != NULL) |
| 2076 | invalidate_nodes (badfdp, &np->right); | 2073 | invalidate_nodes (badfdp, &np->right); |
| 2077 | } | 2074 | } |
| @@ -2154,7 +2151,7 @@ put_entries (register node *np) | |||
| 2154 | fdp = np->fdp; | 2151 | fdp = np->fdp; |
| 2155 | fprintf (tagf, "\f\n%s,%d\n", | 2152 | fprintf (tagf, "\f\n%s,%d\n", |
| 2156 | fdp->taggedfname, total_size_of_entries (np)); | 2153 | fdp->taggedfname, total_size_of_entries (np)); |
| 2157 | fdp->written = TRUE; | 2154 | fdp->written = true; |
| 2158 | } | 2155 | } |
| 2159 | fputs (np->regex, tagf); | 2156 | fputs (np->regex, tagf); |
| 2160 | fputc ('\177', tagf); | 2157 | fputc ('\177', tagf); |
| @@ -2625,7 +2622,7 @@ static void make_C_tag (bool); | |||
| 2625 | * function or variable, or corresponds to a typedef, or | 2622 | * function or variable, or corresponds to a typedef, or |
| 2626 | * is a struct/union/enum tag, or #define, or an enum constant. | 2623 | * is a struct/union/enum tag, or #define, or an enum constant. |
| 2627 | * | 2624 | * |
| 2628 | * *IS_FUNC gets TRUE if the token is a function or #define macro | 2625 | * *IS_FUNC_OR_VAR gets true if the token is a function or #define macro |
| 2629 | * with args. C_EXTP points to which language we are looking at. | 2626 | * with args. C_EXTP points to which language we are looking at. |
| 2630 | * | 2627 | * |
| 2631 | * Globals | 2628 | * Globals |
| @@ -2637,7 +2634,8 @@ static void make_C_tag (bool); | |||
| 2637 | */ | 2634 | */ |
| 2638 | 2635 | ||
| 2639 | static bool | 2636 | static bool |
| 2640 | consider_token (register char *str, register int len, register int c, int *c_extp, int bracelev, int parlev, int *is_func_or_var) | 2637 | consider_token (char *str, int len, int c, int *c_extp, |
| 2638 | int bracelev, int parlev, bool *is_func_or_var) | ||
| 2641 | /* IN: token pointer */ | 2639 | /* IN: token pointer */ |
| 2642 | /* IN: token length */ | 2640 | /* IN: token length */ |
| 2643 | /* IN: first char after the token */ | 2641 | /* IN: first char after the token */ |
| @@ -2661,8 +2659,8 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2661 | */ | 2659 | */ |
| 2662 | if (toktype == st_C_attribute) | 2660 | if (toktype == st_C_attribute) |
| 2663 | { | 2661 | { |
| 2664 | inattribute = TRUE; | 2662 | inattribute = true; |
| 2665 | return FALSE; | 2663 | return false; |
| 2666 | } | 2664 | } |
| 2667 | 2665 | ||
| 2668 | /* | 2666 | /* |
| @@ -2675,7 +2673,7 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2675 | if (toktype == st_C_gnumacro) | 2673 | if (toktype == st_C_gnumacro) |
| 2676 | { | 2674 | { |
| 2677 | fvdef = fdefunkey; | 2675 | fvdef = fdefunkey; |
| 2678 | return FALSE; | 2676 | return false; |
| 2679 | } | 2677 | } |
| 2680 | break; | 2678 | break; |
| 2681 | case dsharpseen: | 2679 | case dsharpseen: |
| @@ -2687,20 +2685,20 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2687 | { | 2685 | { |
| 2688 | definedef = dignorerest; | 2686 | definedef = dignorerest; |
| 2689 | } | 2687 | } |
| 2690 | return FALSE; | 2688 | return false; |
| 2691 | case ddefineseen: | 2689 | case ddefineseen: |
| 2692 | /* | 2690 | /* |
| 2693 | * Make a tag for any macro, unless it is a constant | 2691 | * Make a tag for any macro, unless it is a constant |
| 2694 | * and constantypedefs is FALSE. | 2692 | * and constantypedefs is false. |
| 2695 | */ | 2693 | */ |
| 2696 | definedef = dignorerest; | 2694 | definedef = dignorerest; |
| 2697 | *is_func_or_var = (c == '('); | 2695 | *is_func_or_var = (c == '('); |
| 2698 | if (!*is_func_or_var && !constantypedefs) | 2696 | if (!*is_func_or_var && !constantypedefs) |
| 2699 | return FALSE; | 2697 | return false; |
| 2700 | else | 2698 | else |
| 2701 | return TRUE; | 2699 | return true; |
| 2702 | case dignorerest: | 2700 | case dignorerest: |
| 2703 | return FALSE; | 2701 | return false; |
| 2704 | default: | 2702 | default: |
| 2705 | error ("internal error: definedef value."); | 2703 | error ("internal error: definedef value."); |
| 2706 | } | 2704 | } |
| @@ -2715,9 +2713,9 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2715 | { | 2713 | { |
| 2716 | if (typedefs) | 2714 | if (typedefs) |
| 2717 | typdef = tkeyseen; | 2715 | typdef = tkeyseen; |
| 2718 | fvextern = FALSE; | 2716 | fvextern = false; |
| 2719 | fvdef = fvnone; | 2717 | fvdef = fvnone; |
| 2720 | return FALSE; | 2718 | return false; |
| 2721 | } | 2719 | } |
| 2722 | break; | 2720 | break; |
| 2723 | case tkeyseen: | 2721 | case tkeyseen: |
| @@ -2734,7 +2732,7 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2734 | if (structdef == snone && fvdef == fvnone) | 2732 | if (structdef == snone && fvdef == fvnone) |
| 2735 | { | 2733 | { |
| 2736 | fvdef = fvnameseen; | 2734 | fvdef = fvnameseen; |
| 2737 | return TRUE; | 2735 | return true; |
| 2738 | } | 2736 | } |
| 2739 | break; | 2737 | break; |
| 2740 | case tend: | 2738 | case tend: |
| @@ -2743,9 +2741,9 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2743 | case st_C_class: | 2741 | case st_C_class: |
| 2744 | case st_C_struct: | 2742 | case st_C_struct: |
| 2745 | case st_C_enum: | 2743 | case st_C_enum: |
| 2746 | return FALSE; | 2744 | return false; |
| 2747 | } | 2745 | } |
| 2748 | return TRUE; | 2746 | return true; |
| 2749 | } | 2747 | } |
| 2750 | 2748 | ||
| 2751 | switch (toktype) | 2749 | switch (toktype) |
| @@ -2753,7 +2751,7 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2753 | case st_C_javastruct: | 2751 | case st_C_javastruct: |
| 2754 | if (structdef == stagseen) | 2752 | if (structdef == stagseen) |
| 2755 | structdef = scolonseen; | 2753 | structdef = scolonseen; |
| 2756 | return FALSE; | 2754 | return false; |
| 2757 | case st_C_template: | 2755 | case st_C_template: |
| 2758 | case st_C_class: | 2756 | case st_C_class: |
| 2759 | if ((*c_extp & C_AUTO) /* automatic detection of C++ language */ | 2757 | if ((*c_extp & C_AUTO) /* automatic detection of C++ language */ |
| @@ -2777,13 +2775,13 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2777 | if (fvdef == fvnameseen) | 2775 | if (fvdef == fvnameseen) |
| 2778 | fvdef = fvnone; | 2776 | fvdef = fvnone; |
| 2779 | } | 2777 | } |
| 2780 | return FALSE; | 2778 | return false; |
| 2781 | } | 2779 | } |
| 2782 | 2780 | ||
| 2783 | if (structdef == skeyseen) | 2781 | if (structdef == skeyseen) |
| 2784 | { | 2782 | { |
| 2785 | structdef = stagseen; | 2783 | structdef = stagseen; |
| 2786 | return TRUE; | 2784 | return true; |
| 2787 | } | 2785 | } |
| 2788 | 2786 | ||
| 2789 | if (typdef != tnone) | 2787 | if (typdef != tnone) |
| @@ -2797,27 +2795,27 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2797 | { | 2795 | { |
| 2798 | case st_C_objprot: | 2796 | case st_C_objprot: |
| 2799 | objdef = oprotocol; | 2797 | objdef = oprotocol; |
| 2800 | return FALSE; | 2798 | return false; |
| 2801 | case st_C_objimpl: | 2799 | case st_C_objimpl: |
| 2802 | objdef = oimplementation; | 2800 | objdef = oimplementation; |
| 2803 | return FALSE; | 2801 | return false; |
| 2804 | } | 2802 | } |
| 2805 | break; | 2803 | break; |
| 2806 | case oimplementation: | 2804 | case oimplementation: |
| 2807 | /* Save the class tag for functions or variables defined inside. */ | 2805 | /* Save the class tag for functions or variables defined inside. */ |
| 2808 | objtag = savenstr (str, len); | 2806 | objtag = savenstr (str, len); |
| 2809 | objdef = oinbody; | 2807 | objdef = oinbody; |
| 2810 | return FALSE; | 2808 | return false; |
| 2811 | case oprotocol: | 2809 | case oprotocol: |
| 2812 | /* Save the class tag for categories. */ | 2810 | /* Save the class tag for categories. */ |
| 2813 | objtag = savenstr (str, len); | 2811 | objtag = savenstr (str, len); |
| 2814 | objdef = otagseen; | 2812 | objdef = otagseen; |
| 2815 | *is_func_or_var = TRUE; | 2813 | *is_func_or_var = true; |
| 2816 | return TRUE; | 2814 | return true; |
| 2817 | case oparenseen: | 2815 | case oparenseen: |
| 2818 | objdef = ocatseen; | 2816 | objdef = ocatseen; |
| 2819 | *is_func_or_var = TRUE; | 2817 | *is_func_or_var = true; |
| 2820 | return TRUE; | 2818 | return true; |
| 2821 | case oinbody: | 2819 | case oinbody: |
| 2822 | break; | 2820 | break; |
| 2823 | case omethodsign: | 2821 | case omethodsign: |
| @@ -2828,13 +2826,13 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2828 | linebuffer_setlen (&token_name, len); | 2826 | linebuffer_setlen (&token_name, len); |
| 2829 | memcpy (token_name.buffer, str, len); | 2827 | memcpy (token_name.buffer, str, len); |
| 2830 | token_name.buffer[len] = '\0'; | 2828 | token_name.buffer[len] = '\0'; |
| 2831 | return TRUE; | 2829 | return true; |
| 2832 | } | 2830 | } |
| 2833 | return FALSE; | 2831 | return false; |
| 2834 | case omethodcolon: | 2832 | case omethodcolon: |
| 2835 | if (parlev == 0) | 2833 | if (parlev == 0) |
| 2836 | objdef = omethodparm; | 2834 | objdef = omethodparm; |
| 2837 | return FALSE; | 2835 | return false; |
| 2838 | case omethodparm: | 2836 | case omethodparm: |
| 2839 | if (parlev == 0) | 2837 | if (parlev == 0) |
| 2840 | { | 2838 | { |
| @@ -2844,9 +2842,9 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2844 | linebuffer_setlen (&token_name, oldlen + len); | 2842 | linebuffer_setlen (&token_name, oldlen + len); |
| 2845 | memcpy (token_name.buffer + oldlen, str, len); | 2843 | memcpy (token_name.buffer + oldlen, str, len); |
| 2846 | token_name.buffer[oldlen + len] = '\0'; | 2844 | token_name.buffer[oldlen + len] = '\0'; |
| 2847 | return TRUE; | 2845 | return true; |
| 2848 | } | 2846 | } |
| 2849 | return FALSE; | 2847 | return false; |
| 2850 | case oignore: | 2848 | case oignore: |
| 2851 | if (toktype == st_C_objend) | 2849 | if (toktype == st_C_objend) |
| 2852 | { | 2850 | { |
| @@ -2858,14 +2856,14 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2858 | free (objtag); */ | 2856 | free (objtag); */ |
| 2859 | objdef = onone; | 2857 | objdef = onone; |
| 2860 | } | 2858 | } |
| 2861 | return FALSE; | 2859 | return false; |
| 2862 | } | 2860 | } |
| 2863 | 2861 | ||
| 2864 | /* A function, variable or enum constant? */ | 2862 | /* A function, variable or enum constant? */ |
| 2865 | switch (toktype) | 2863 | switch (toktype) |
| 2866 | { | 2864 | { |
| 2867 | case st_C_extern: | 2865 | case st_C_extern: |
| 2868 | fvextern = TRUE; | 2866 | fvextern = true; |
| 2869 | switch (fvdef) | 2867 | switch (fvdef) |
| 2870 | { | 2868 | { |
| 2871 | case finlist: | 2869 | case finlist: |
| @@ -2876,39 +2874,39 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2876 | default: | 2874 | default: |
| 2877 | fvdef = fvnone; | 2875 | fvdef = fvnone; |
| 2878 | } | 2876 | } |
| 2879 | return FALSE; | 2877 | return false; |
| 2880 | case st_C_ignore: | 2878 | case st_C_ignore: |
| 2881 | fvextern = FALSE; | 2879 | fvextern = false; |
| 2882 | fvdef = vignore; | 2880 | fvdef = vignore; |
| 2883 | return FALSE; | 2881 | return false; |
| 2884 | case st_C_operator: | 2882 | case st_C_operator: |
| 2885 | fvdef = foperator; | 2883 | fvdef = foperator; |
| 2886 | *is_func_or_var = TRUE; | 2884 | *is_func_or_var = true; |
| 2887 | return TRUE; | 2885 | return true; |
| 2888 | case st_none: | 2886 | case st_none: |
| 2889 | if (constantypedefs | 2887 | if (constantypedefs |
| 2890 | && structdef == snone | 2888 | && structdef == snone |
| 2891 | && structtype == st_C_enum && bracelev > structbracelev) | 2889 | && structtype == st_C_enum && bracelev > structbracelev) |
| 2892 | return TRUE; /* enum constant */ | 2890 | return true; /* enum constant */ |
| 2893 | switch (fvdef) | 2891 | switch (fvdef) |
| 2894 | { | 2892 | { |
| 2895 | case fdefunkey: | 2893 | case fdefunkey: |
| 2896 | if (bracelev > 0) | 2894 | if (bracelev > 0) |
| 2897 | break; | 2895 | break; |
| 2898 | fvdef = fdefunname; /* GNU macro */ | 2896 | fvdef = fdefunname; /* GNU macro */ |
| 2899 | *is_func_or_var = TRUE; | 2897 | *is_func_or_var = true; |
| 2900 | return TRUE; | 2898 | return true; |
| 2901 | case fvnone: | 2899 | case fvnone: |
| 2902 | switch (typdef) | 2900 | switch (typdef) |
| 2903 | { | 2901 | { |
| 2904 | case ttypeseen: | 2902 | case ttypeseen: |
| 2905 | return FALSE; | 2903 | return false; |
| 2906 | case tnone: | 2904 | case tnone: |
| 2907 | if ((strneq (str, "asm", 3) && endtoken (str[3])) | 2905 | if ((strneq (str, "asm", 3) && endtoken (str[3])) |
| 2908 | || (strneq (str, "__asm__", 7) && endtoken (str[7]))) | 2906 | || (strneq (str, "__asm__", 7) && endtoken (str[7]))) |
| 2909 | { | 2907 | { |
| 2910 | fvdef = vignore; | 2908 | fvdef = vignore; |
| 2911 | return FALSE; | 2909 | return false; |
| 2912 | } | 2910 | } |
| 2913 | break; | 2911 | break; |
| 2914 | } | 2912 | } |
| @@ -2919,19 +2917,19 @@ consider_token (register char *str, register int len, register int c, int *c_ext | |||
| 2919 | if (*c_extp & C_AUTO) /* automatic detection of C++ */ | 2917 | if (*c_extp & C_AUTO) /* automatic detection of C++ */ |
| 2920 | *c_extp = (*c_extp | C_PLPL) & ~C_AUTO; | 2918 | *c_extp = (*c_extp | C_PLPL) & ~C_AUTO; |
| 2921 | fvdef = foperator; | 2919 | fvdef = foperator; |
| 2922 | *is_func_or_var = TRUE; | 2920 | *is_func_or_var = true; |
| 2923 | return TRUE; | 2921 | return true; |
| 2924 | } | 2922 | } |
| 2925 | if (bracelev > 0 && !instruct) | 2923 | if (bracelev > 0 && !instruct) |
| 2926 | break; | 2924 | break; |
| 2927 | fvdef = fvnameseen; /* function or variable */ | 2925 | fvdef = fvnameseen; /* function or variable */ |
| 2928 | *is_func_or_var = TRUE; | 2926 | *is_func_or_var = true; |
| 2929 | return TRUE; | 2927 | return true; |
| 2930 | } | 2928 | } |
| 2931 | break; | 2929 | break; |
| 2932 | } | 2930 | } |
| 2933 | 2931 | ||
| 2934 | return FALSE; | 2932 | return false; |
| 2935 | } | 2933 | } |
| 2936 | 2934 | ||
| 2937 | 2935 | ||
| @@ -2963,7 +2961,7 @@ do { \ | |||
| 2963 | curlinepos = charno; \ | 2961 | curlinepos = charno; \ |
| 2964 | readline (&curlb, inf); \ | 2962 | readline (&curlb, inf); \ |
| 2965 | lp = curlb.buffer; \ | 2963 | lp = curlb.buffer; \ |
| 2966 | quotednl = FALSE; \ | 2964 | quotednl = false; \ |
| 2967 | newndx = curndx; \ | 2965 | newndx = curndx; \ |
| 2968 | } while (0) | 2966 | } while (0) |
| 2969 | 2967 | ||
| @@ -2973,16 +2971,16 @@ do { \ | |||
| 2973 | if (savetoken.valid) \ | 2971 | if (savetoken.valid) \ |
| 2974 | { \ | 2972 | { \ |
| 2975 | token = savetoken; \ | 2973 | token = savetoken; \ |
| 2976 | savetoken.valid = FALSE; \ | 2974 | savetoken.valid = false; \ |
| 2977 | } \ | 2975 | } \ |
| 2978 | definedef = dnone; \ | 2976 | definedef = dnone; \ |
| 2979 | } while (0) | 2977 | } while (0) |
| 2980 | 2978 | ||
| 2981 | 2979 | ||
| 2982 | static void | 2980 | static void |
| 2983 | make_C_tag (int isfun) | 2981 | make_C_tag (bool isfun) |
| 2984 | { | 2982 | { |
| 2985 | /* This function is never called when token.valid is FALSE, but | 2983 | /* This function is never called when token.valid is false, but |
| 2986 | we must protect against invalid input or internal errors. */ | 2984 | we must protect against invalid input or internal errors. */ |
| 2987 | if (token.valid) | 2985 | if (token.valid) |
| 2988 | make_tag (token_name.buffer, token_name.len, isfun, token.line, | 2986 | make_tag (token_name.buffer, token_name.len, isfun, token.line, |
| @@ -2995,7 +2993,7 @@ make_C_tag (int isfun) | |||
| 2995 | error ("INVALID TOKEN"); | 2993 | error ("INVALID TOKEN"); |
| 2996 | } | 2994 | } |
| 2997 | 2995 | ||
| 2998 | token.valid = FALSE; | 2996 | token.valid = false; |
| 2999 | } | 2997 | } |
| 3000 | 2998 | ||
| 3001 | 2999 | ||
| @@ -3043,11 +3041,11 @@ C_entries (int c_ext, FILE *inf) | |||
| 3043 | lp = curlb.buffer; | 3041 | lp = curlb.buffer; |
| 3044 | *lp = 0; | 3042 | *lp = 0; |
| 3045 | 3043 | ||
| 3046 | fvdef = fvnone; fvextern = FALSE; typdef = tnone; | 3044 | fvdef = fvnone; fvextern = false; typdef = tnone; |
| 3047 | structdef = snone; definedef = dnone; objdef = onone; | 3045 | structdef = snone; definedef = dnone; objdef = onone; |
| 3048 | yacc_rules = FALSE; | 3046 | yacc_rules = false; |
| 3049 | midtoken = inquote = inchar = incomm = quotednl = FALSE; | 3047 | midtoken = inquote = inchar = incomm = quotednl = false; |
| 3050 | token.valid = savetoken.valid = FALSE; | 3048 | token.valid = savetoken.valid = false; |
| 3051 | bracelev = bracketlev = parlev = attrparlev = templatelev = 0; | 3049 | bracelev = bracketlev = parlev = attrparlev = templatelev = 0; |
| 3052 | if (cjava) | 3050 | if (cjava) |
| 3053 | { qualifier = "."; qlen = 1; } | 3051 | { qualifier = "."; qlen = 1; } |
| @@ -3065,7 +3063,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3065 | to read the next line. */ | 3063 | to read the next line. */ |
| 3066 | if (*lp == '\0') | 3064 | if (*lp == '\0') |
| 3067 | { | 3065 | { |
| 3068 | quotednl = TRUE; | 3066 | quotednl = true; |
| 3069 | continue; | 3067 | continue; |
| 3070 | } | 3068 | } |
| 3071 | lp++; | 3069 | lp++; |
| @@ -3079,7 +3077,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3079 | if (*lp == '/') | 3077 | if (*lp == '/') |
| 3080 | { | 3078 | { |
| 3081 | c = *lp++; | 3079 | c = *lp++; |
| 3082 | incomm = FALSE; | 3080 | incomm = false; |
| 3083 | } | 3081 | } |
| 3084 | break; | 3082 | break; |
| 3085 | case '\0': | 3083 | case '\0': |
| @@ -3095,7 +3093,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3095 | switch (c) | 3093 | switch (c) |
| 3096 | { | 3094 | { |
| 3097 | case '"': | 3095 | case '"': |
| 3098 | inquote = FALSE; | 3096 | inquote = false; |
| 3099 | break; | 3097 | break; |
| 3100 | case '\0': | 3098 | case '\0': |
| 3101 | /* Newlines inside strings do not end macro definitions | 3099 | /* Newlines inside strings do not end macro definitions |
| @@ -3115,7 +3113,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3115 | CNL (); | 3113 | CNL (); |
| 3116 | /* FALLTHRU */ | 3114 | /* FALLTHRU */ |
| 3117 | case '\'': | 3115 | case '\'': |
| 3118 | inchar = FALSE; | 3116 | inchar = false; |
| 3119 | break; | 3117 | break; |
| 3120 | } | 3118 | } |
| 3121 | continue; | 3119 | continue; |
| @@ -3123,7 +3121,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3123 | else switch (c) | 3121 | else switch (c) |
| 3124 | { | 3122 | { |
| 3125 | case '"': | 3123 | case '"': |
| 3126 | inquote = TRUE; | 3124 | inquote = true; |
| 3127 | if (bracketlev > 0) | 3125 | if (bracketlev > 0) |
| 3128 | continue; | 3126 | continue; |
| 3129 | if (inattribute) | 3127 | if (inattribute) |
| @@ -3137,26 +3135,26 @@ C_entries (int c_ext, FILE *inf) | |||
| 3137 | case vignore: | 3135 | case vignore: |
| 3138 | break; | 3136 | break; |
| 3139 | default: | 3137 | default: |
| 3140 | fvextern = FALSE; | 3138 | fvextern = false; |
| 3141 | fvdef = fvnone; | 3139 | fvdef = fvnone; |
| 3142 | } | 3140 | } |
| 3143 | continue; | 3141 | continue; |
| 3144 | case '\'': | 3142 | case '\'': |
| 3145 | inchar = TRUE; | 3143 | inchar = true; |
| 3146 | if (bracketlev > 0) | 3144 | if (bracketlev > 0) |
| 3147 | continue; | 3145 | continue; |
| 3148 | if (inattribute) | 3146 | if (inattribute) |
| 3149 | break; | 3147 | break; |
| 3150 | if (fvdef != finlist && fvdef != fignore && fvdef != vignore) | 3148 | if (fvdef != finlist && fvdef != fignore && fvdef != vignore) |
| 3151 | { | 3149 | { |
| 3152 | fvextern = FALSE; | 3150 | fvextern = false; |
| 3153 | fvdef = fvnone; | 3151 | fvdef = fvnone; |
| 3154 | } | 3152 | } |
| 3155 | continue; | 3153 | continue; |
| 3156 | case '/': | 3154 | case '/': |
| 3157 | if (*lp == '*') | 3155 | if (*lp == '*') |
| 3158 | { | 3156 | { |
| 3159 | incomm = TRUE; | 3157 | incomm = true; |
| 3160 | lp++; | 3158 | lp++; |
| 3161 | c = ' '; | 3159 | c = ' '; |
| 3162 | if (bracketlev > 0) | 3160 | if (bracketlev > 0) |
| @@ -3172,9 +3170,9 @@ C_entries (int c_ext, FILE *inf) | |||
| 3172 | { | 3170 | { |
| 3173 | /* Entering or exiting rules section in yacc file. */ | 3171 | /* Entering or exiting rules section in yacc file. */ |
| 3174 | lp++; | 3172 | lp++; |
| 3175 | definedef = dnone; fvdef = fvnone; fvextern = FALSE; | 3173 | definedef = dnone; fvdef = fvnone; fvextern = false; |
| 3176 | typdef = tnone; structdef = snone; | 3174 | typdef = tnone; structdef = snone; |
| 3177 | midtoken = inquote = inchar = incomm = quotednl = FALSE; | 3175 | midtoken = inquote = inchar = incomm = quotednl = false; |
| 3178 | bracelev = 0; | 3176 | bracelev = 0; |
| 3179 | yacc_rules = !yacc_rules; | 3177 | yacc_rules = !yacc_rules; |
| 3180 | continue; | 3178 | continue; |
| @@ -3185,7 +3183,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3185 | if (definedef == dnone) | 3183 | if (definedef == dnone) |
| 3186 | { | 3184 | { |
| 3187 | char *cp; | 3185 | char *cp; |
| 3188 | bool cpptoken = TRUE; | 3186 | bool cpptoken = true; |
| 3189 | 3187 | ||
| 3190 | /* Look back on this line. If all blanks, or nonblanks | 3188 | /* Look back on this line. If all blanks, or nonblanks |
| 3191 | followed by an end of comment, this is a preprocessor | 3189 | followed by an end of comment, this is a preprocessor |
| @@ -3196,10 +3194,10 @@ C_entries (int c_ext, FILE *inf) | |||
| 3196 | if (*cp == '*' && cp[1] == '/') | 3194 | if (*cp == '*' && cp[1] == '/') |
| 3197 | { | 3195 | { |
| 3198 | cp++; | 3196 | cp++; |
| 3199 | cpptoken = TRUE; | 3197 | cpptoken = true; |
| 3200 | } | 3198 | } |
| 3201 | else | 3199 | else |
| 3202 | cpptoken = FALSE; | 3200 | cpptoken = false; |
| 3203 | } | 3201 | } |
| 3204 | if (cpptoken) | 3202 | if (cpptoken) |
| 3205 | definedef = dsharpseen; | 3203 | definedef = dsharpseen; |
| @@ -3248,7 +3246,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3248 | } | 3246 | } |
| 3249 | else | 3247 | else |
| 3250 | { | 3248 | { |
| 3251 | bool funorvar = FALSE; | 3249 | bool funorvar = false; |
| 3252 | 3250 | ||
| 3253 | if (yacc_rules | 3251 | if (yacc_rules |
| 3254 | || consider_token (newlb.buffer + tokoff, toklen, c, | 3252 | || consider_token (newlb.buffer + tokoff, toklen, c, |
| @@ -3267,7 +3265,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3267 | c = *lp++; | 3265 | c = *lp++; |
| 3268 | toklen += lp - oldlp; | 3266 | toklen += lp - oldlp; |
| 3269 | } | 3267 | } |
| 3270 | token.named = FALSE; | 3268 | token.named = false; |
| 3271 | if (!plainc | 3269 | if (!plainc |
| 3272 | && nestlev > 0 && definedef == dnone) | 3270 | && nestlev > 0 && definedef == dnone) |
| 3273 | /* in struct body */ | 3271 | /* in struct body */ |
| @@ -3278,7 +3276,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3278 | linebuffer_setlen (&token_name, len+qlen+toklen); | 3276 | linebuffer_setlen (&token_name, len+qlen+toklen); |
| 3279 | sprintf (token_name.buffer + len, "%s%.*s", | 3277 | sprintf (token_name.buffer + len, "%s%.*s", |
| 3280 | qualifier, toklen, newlb.buffer + tokoff); | 3278 | qualifier, toklen, newlb.buffer + tokoff); |
| 3281 | token.named = TRUE; | 3279 | token.named = true; |
| 3282 | } | 3280 | } |
| 3283 | else if (objdef == ocatseen) | 3281 | else if (objdef == ocatseen) |
| 3284 | /* Objective C category */ | 3282 | /* Objective C category */ |
| @@ -3287,13 +3285,13 @@ C_entries (int c_ext, FILE *inf) | |||
| 3287 | linebuffer_setlen (&token_name, len); | 3285 | linebuffer_setlen (&token_name, len); |
| 3288 | sprintf (token_name.buffer, "%s(%.*s)", | 3286 | sprintf (token_name.buffer, "%s(%.*s)", |
| 3289 | objtag, toklen, newlb.buffer + tokoff); | 3287 | objtag, toklen, newlb.buffer + tokoff); |
| 3290 | token.named = TRUE; | 3288 | token.named = true; |
| 3291 | } | 3289 | } |
| 3292 | else if (objdef == omethodtag | 3290 | else if (objdef == omethodtag |
| 3293 | || objdef == omethodparm) | 3291 | || objdef == omethodparm) |
| 3294 | /* Objective C method */ | 3292 | /* Objective C method */ |
| 3295 | { | 3293 | { |
| 3296 | token.named = TRUE; | 3294 | token.named = true; |
| 3297 | } | 3295 | } |
| 3298 | else if (fvdef == fdefunname) | 3296 | else if (fvdef == fdefunname) |
| 3299 | /* GNU DEFUN and similar macros */ | 3297 | /* GNU DEFUN and similar macros */ |
| @@ -3341,7 +3339,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3341 | token.length = toklen; | 3339 | token.length = toklen; |
| 3342 | token.line = newlb.buffer; | 3340 | token.line = newlb.buffer; |
| 3343 | token.linepos = newlinepos; | 3341 | token.linepos = newlinepos; |
| 3344 | token.valid = TRUE; | 3342 | token.valid = true; |
| 3345 | 3343 | ||
| 3346 | if (definedef == dnone | 3344 | if (definedef == dnone |
| 3347 | && (fvdef == fvnameseen | 3345 | && (fvdef == fvnameseen |
| @@ -3369,7 +3367,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3369 | fvdef = fvnone; | 3367 | fvdef = fvnone; |
| 3370 | } | 3368 | } |
| 3371 | } | 3369 | } |
| 3372 | midtoken = FALSE; | 3370 | midtoken = false; |
| 3373 | } | 3371 | } |
| 3374 | } /* if (endtoken (c)) */ | 3372 | } /* if (endtoken (c)) */ |
| 3375 | else if (intoken (c)) | 3373 | else if (intoken (c)) |
| @@ -3395,7 +3393,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3395 | case flistseen: | 3393 | case flistseen: |
| 3396 | if (plainc || declarations) | 3394 | if (plainc || declarations) |
| 3397 | { | 3395 | { |
| 3398 | make_C_tag (TRUE); /* a function */ | 3396 | make_C_tag (true); /* a function */ |
| 3399 | fvdef = fignore; | 3397 | fvdef = fignore; |
| 3400 | } | 3398 | } |
| 3401 | break; | 3399 | break; |
| @@ -3414,7 +3412,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3414 | { | 3412 | { |
| 3415 | tokoff = lp - 1 - newlb.buffer; | 3413 | tokoff = lp - 1 - newlb.buffer; |
| 3416 | toklen = 1; | 3414 | toklen = 1; |
| 3417 | midtoken = TRUE; | 3415 | midtoken = true; |
| 3418 | } | 3416 | } |
| 3419 | continue; | 3417 | continue; |
| 3420 | } /* if (begtoken) */ | 3418 | } /* if (begtoken) */ |
| @@ -3430,7 +3428,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3430 | break; | 3428 | break; |
| 3431 | if (yacc_rules && token.offset == 0 && token.valid) | 3429 | if (yacc_rules && token.offset == 0 && token.valid) |
| 3432 | { | 3430 | { |
| 3433 | make_C_tag (FALSE); /* a yacc function */ | 3431 | make_C_tag (false); /* a yacc function */ |
| 3434 | break; | 3432 | break; |
| 3435 | } | 3433 | } |
| 3436 | if (definedef != dnone) | 3434 | if (definedef != dnone) |
| @@ -3439,7 +3437,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3439 | { | 3437 | { |
| 3440 | case otagseen: | 3438 | case otagseen: |
| 3441 | objdef = oignore; | 3439 | objdef = oignore; |
| 3442 | make_C_tag (TRUE); /* an Objective C class */ | 3440 | make_C_tag (true); /* an Objective C class */ |
| 3443 | break; | 3441 | break; |
| 3444 | case omethodtag: | 3442 | case omethodtag: |
| 3445 | case omethodparm: | 3443 | case omethodparm: |
| @@ -3456,7 +3454,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3456 | /* Should be useless, but may be work as a safety net. */ | 3454 | /* Should be useless, but may be work as a safety net. */ |
| 3457 | if (cplpl && fvdef == flistseen) | 3455 | if (cplpl && fvdef == flistseen) |
| 3458 | { | 3456 | { |
| 3459 | make_C_tag (TRUE); /* a function */ | 3457 | make_C_tag (true); /* a function */ |
| 3460 | fvdef = fignore; | 3458 | fvdef = fignore; |
| 3461 | break; | 3459 | break; |
| 3462 | } | 3460 | } |
| @@ -3468,7 +3466,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3468 | { | 3466 | { |
| 3469 | case tend: | 3467 | case tend: |
| 3470 | case ttypeseen: | 3468 | case ttypeseen: |
| 3471 | make_C_tag (FALSE); /* a typedef */ | 3469 | make_C_tag (false); /* a typedef */ |
| 3472 | typdef = tnone; | 3470 | typdef = tnone; |
| 3473 | fvdef = fvnone; | 3471 | fvdef = fvnone; |
| 3474 | break; | 3472 | break; |
| @@ -3484,10 +3482,10 @@ C_entries (int c_ext, FILE *inf) | |||
| 3484 | case fvnameseen: | 3482 | case fvnameseen: |
| 3485 | if ((globals && bracelev == 0 && (!fvextern || declarations)) | 3483 | if ((globals && bracelev == 0 && (!fvextern || declarations)) |
| 3486 | || (members && instruct)) | 3484 | || (members && instruct)) |
| 3487 | make_C_tag (FALSE); /* a variable */ | 3485 | make_C_tag (false); /* a variable */ |
| 3488 | fvextern = FALSE; | 3486 | fvextern = false; |
| 3489 | fvdef = fvnone; | 3487 | fvdef = fvnone; |
| 3490 | token.valid = FALSE; | 3488 | token.valid = false; |
| 3491 | break; | 3489 | break; |
| 3492 | case flistseen: | 3490 | case flistseen: |
| 3493 | if ((declarations | 3491 | if ((declarations |
| @@ -3495,16 +3493,16 @@ C_entries (int c_ext, FILE *inf) | |||
| 3495 | && (typdef == tnone || (typdef != tignore && instruct))) | 3493 | && (typdef == tnone || (typdef != tignore && instruct))) |
| 3496 | || (members | 3494 | || (members |
| 3497 | && plainc && instruct)) | 3495 | && plainc && instruct)) |
| 3498 | make_C_tag (TRUE); /* a function */ | 3496 | make_C_tag (true); /* a function */ |
| 3499 | /* FALLTHRU */ | 3497 | /* FALLTHRU */ |
| 3500 | default: | 3498 | default: |
| 3501 | fvextern = FALSE; | 3499 | fvextern = false; |
| 3502 | fvdef = fvnone; | 3500 | fvdef = fvnone; |
| 3503 | if (declarations | 3501 | if (declarations |
| 3504 | && cplpl && structdef == stagseen) | 3502 | && cplpl && structdef == stagseen) |
| 3505 | make_C_tag (FALSE); /* forward declaration */ | 3503 | make_C_tag (false); /* forward declaration */ |
| 3506 | else | 3504 | else |
| 3507 | token.valid = FALSE; | 3505 | token.valid = false; |
| 3508 | } /* switch (fvdef) */ | 3506 | } /* switch (fvdef) */ |
| 3509 | /* FALLTHRU */ | 3507 | /* FALLTHRU */ |
| 3510 | default: | 3508 | default: |
| @@ -3521,7 +3519,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3521 | { | 3519 | { |
| 3522 | case omethodtag: | 3520 | case omethodtag: |
| 3523 | case omethodparm: | 3521 | case omethodparm: |
| 3524 | make_C_tag (TRUE); /* an Objective C method */ | 3522 | make_C_tag (true); /* an Objective C method */ |
| 3525 | objdef = oinbody; | 3523 | objdef = oinbody; |
| 3526 | break; | 3524 | break; |
| 3527 | } | 3525 | } |
| @@ -3544,18 +3542,18 @@ C_entries (int c_ext, FILE *inf) | |||
| 3544 | && templatelev == 0 | 3542 | && templatelev == 0 |
| 3545 | && (!fvextern || declarations)) | 3543 | && (!fvextern || declarations)) |
| 3546 | || (members && instruct))) | 3544 | || (members && instruct))) |
| 3547 | make_C_tag (FALSE); /* a variable */ | 3545 | make_C_tag (false); /* a variable */ |
| 3548 | break; | 3546 | break; |
| 3549 | case flistseen: | 3547 | case flistseen: |
| 3550 | if ((declarations && typdef == tnone && !instruct) | 3548 | if ((declarations && typdef == tnone && !instruct) |
| 3551 | || (members && typdef != tignore && instruct)) | 3549 | || (members && typdef != tignore && instruct)) |
| 3552 | { | 3550 | { |
| 3553 | make_C_tag (TRUE); /* a function */ | 3551 | make_C_tag (true); /* a function */ |
| 3554 | fvdef = fvnameseen; | 3552 | fvdef = fvnameseen; |
| 3555 | } | 3553 | } |
| 3556 | else if (!declarations) | 3554 | else if (!declarations) |
| 3557 | fvdef = fvnone; | 3555 | fvdef = fvnone; |
| 3558 | token.valid = FALSE; | 3556 | token.valid = false; |
| 3559 | break; | 3557 | break; |
| 3560 | default: | 3558 | default: |
| 3561 | fvdef = fvnone; | 3559 | fvdef = fvnone; |
| @@ -3573,7 +3571,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3573 | case ttypeseen: | 3571 | case ttypeseen: |
| 3574 | case tend: | 3572 | case tend: |
| 3575 | typdef = tignore; | 3573 | typdef = tignore; |
| 3576 | make_C_tag (FALSE); /* a typedef */ | 3574 | make_C_tag (false); /* a typedef */ |
| 3577 | break; | 3575 | break; |
| 3578 | case tnone: | 3576 | case tnone: |
| 3579 | case tinbody: | 3577 | case tinbody: |
| @@ -3588,7 +3586,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3588 | if ((members && bracelev == 1) | 3586 | if ((members && bracelev == 1) |
| 3589 | || (globals && bracelev == 0 | 3587 | || (globals && bracelev == 0 |
| 3590 | && (!fvextern || declarations))) | 3588 | && (!fvextern || declarations))) |
| 3591 | make_C_tag (FALSE); /* a variable */ | 3589 | make_C_tag (false); /* a variable */ |
| 3592 | /* FALLTHRU */ | 3590 | /* FALLTHRU */ |
| 3593 | default: | 3591 | default: |
| 3594 | fvdef = fvnone; | 3592 | fvdef = fvnone; |
| @@ -3615,7 +3613,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3615 | { | 3613 | { |
| 3616 | /* This handles constructs like: | 3614 | /* This handles constructs like: |
| 3617 | typedef void OperatorFun (int fun); */ | 3615 | typedef void OperatorFun (int fun); */ |
| 3618 | make_C_tag (FALSE); | 3616 | make_C_tag (false); |
| 3619 | typdef = tignore; | 3617 | typdef = tignore; |
| 3620 | fvdef = fignore; | 3618 | fvdef = fignore; |
| 3621 | break; | 3619 | break; |
| @@ -3634,14 +3632,14 @@ C_entries (int c_ext, FILE *inf) | |||
| 3634 | if (inattribute) | 3632 | if (inattribute) |
| 3635 | { | 3633 | { |
| 3636 | if (--attrparlev == 0) | 3634 | if (--attrparlev == 0) |
| 3637 | inattribute = FALSE; | 3635 | inattribute = false; |
| 3638 | break; | 3636 | break; |
| 3639 | } | 3637 | } |
| 3640 | if (definedef != dnone) | 3638 | if (definedef != dnone) |
| 3641 | break; | 3639 | break; |
| 3642 | if (objdef == ocatseen && parlev == 1) | 3640 | if (objdef == ocatseen && parlev == 1) |
| 3643 | { | 3641 | { |
| 3644 | make_C_tag (TRUE); /* an Objective C category */ | 3642 | make_C_tag (true); /* an Objective C category */ |
| 3645 | objdef = oignore; | 3643 | objdef = oignore; |
| 3646 | } | 3644 | } |
| 3647 | if (--parlev == 0) | 3645 | if (--parlev == 0) |
| @@ -3658,7 +3656,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3658 | || typdef == ttypeseen)) | 3656 | || typdef == ttypeseen)) |
| 3659 | { | 3657 | { |
| 3660 | typdef = tignore; | 3658 | typdef = tignore; |
| 3661 | make_C_tag (FALSE); /* a typedef */ | 3659 | make_C_tag (false); /* a typedef */ |
| 3662 | } | 3660 | } |
| 3663 | } | 3661 | } |
| 3664 | else if (parlev < 0) /* can happen due to ill-conceived #if's. */ | 3662 | else if (parlev < 0) /* can happen due to ill-conceived #if's. */ |
| @@ -3677,7 +3675,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3677 | switch (fvdef) | 3675 | switch (fvdef) |
| 3678 | { | 3676 | { |
| 3679 | case flistseen: | 3677 | case flistseen: |
| 3680 | make_C_tag (TRUE); /* a function */ | 3678 | make_C_tag (true); /* a function */ |
| 3681 | /* FALLTHRU */ | 3679 | /* FALLTHRU */ |
| 3682 | case fignore: | 3680 | case fignore: |
| 3683 | fvdef = fvnone; | 3681 | fvdef = fvnone; |
| @@ -3686,12 +3684,12 @@ C_entries (int c_ext, FILE *inf) | |||
| 3686 | switch (objdef) | 3684 | switch (objdef) |
| 3687 | { | 3685 | { |
| 3688 | case otagseen: | 3686 | case otagseen: |
| 3689 | make_C_tag (TRUE); /* an Objective C class */ | 3687 | make_C_tag (true); /* an Objective C class */ |
| 3690 | objdef = oignore; | 3688 | objdef = oignore; |
| 3691 | break; | 3689 | break; |
| 3692 | case omethodtag: | 3690 | case omethodtag: |
| 3693 | case omethodparm: | 3691 | case omethodparm: |
| 3694 | make_C_tag (TRUE); /* an Objective C method */ | 3692 | make_C_tag (true); /* an Objective C method */ |
| 3695 | objdef = oinbody; | 3693 | objdef = oinbody; |
| 3696 | break; | 3694 | break; |
| 3697 | default: | 3695 | default: |
| @@ -3712,7 +3710,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3712 | case scolonseen: /* a class */ | 3710 | case scolonseen: /* a class */ |
| 3713 | pushclass_above (bracelev,token.line+token.offset, token.length); | 3711 | pushclass_above (bracelev,token.line+token.offset, token.length); |
| 3714 | structdef = snone; | 3712 | structdef = snone; |
| 3715 | make_C_tag (FALSE); /* a struct or enum */ | 3713 | make_C_tag (false); /* a struct or enum */ |
| 3716 | break; | 3714 | break; |
| 3717 | } | 3715 | } |
| 3718 | bracelev += 1; | 3716 | bracelev += 1; |
| @@ -3723,7 +3721,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3723 | if (fvdef == fstartlist) | 3721 | if (fvdef == fstartlist) |
| 3724 | { | 3722 | { |
| 3725 | fvdef = fvnone; /* avoid tagging `foo' in `foo (*bar()) ()' */ | 3723 | fvdef = fvnone; /* avoid tagging `foo' in `foo (*bar()) ()' */ |
| 3726 | token.valid = FALSE; | 3724 | token.valid = false; |
| 3727 | } | 3725 | } |
| 3728 | break; | 3726 | break; |
| 3729 | case '}': | 3727 | case '}': |
| @@ -3733,13 +3731,13 @@ C_entries (int c_ext, FILE *inf) | |||
| 3733 | if (!ignoreindent && lp == newlb.buffer + 1) | 3731 | if (!ignoreindent && lp == newlb.buffer + 1) |
| 3734 | { | 3732 | { |
| 3735 | if (bracelev != 0) | 3733 | if (bracelev != 0) |
| 3736 | token.valid = FALSE; /* unexpected value, token unreliable */ | 3734 | token.valid = false; /* unexpected value, token unreliable */ |
| 3737 | bracelev = 0; /* reset brace level if first column */ | 3735 | bracelev = 0; /* reset brace level if first column */ |
| 3738 | parlev = 0; /* also reset paren level, just in case... */ | 3736 | parlev = 0; /* also reset paren level, just in case... */ |
| 3739 | } | 3737 | } |
| 3740 | else if (bracelev < 0) | 3738 | else if (bracelev < 0) |
| 3741 | { | 3739 | { |
| 3742 | token.valid = FALSE; /* something gone amiss, token unreliable */ | 3740 | token.valid = false; /* something gone amiss, token unreliable */ |
| 3743 | bracelev = 0; | 3741 | bracelev = 0; |
| 3744 | } | 3742 | } |
| 3745 | if (bracelev == 0 && fvdef == vignore) | 3743 | if (bracelev == 0 && fvdef == vignore) |
| @@ -3766,7 +3764,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3766 | case fvnameseen: | 3764 | case fvnameseen: |
| 3767 | if ((members && bracelev == 1) | 3765 | if ((members && bracelev == 1) |
| 3768 | || (globals && bracelev == 0 && (!fvextern || declarations))) | 3766 | || (globals && bracelev == 0 && (!fvextern || declarations))) |
| 3769 | make_C_tag (FALSE); /* a variable */ | 3767 | make_C_tag (false); /* a variable */ |
| 3770 | /* FALLTHRU */ | 3768 | /* FALLTHRU */ |
| 3771 | default: | 3769 | default: |
| 3772 | fvdef = vignore; | 3770 | fvdef = vignore; |
| @@ -3815,7 +3813,7 @@ C_entries (int c_ext, FILE *inf) | |||
| 3815 | case '\0': | 3813 | case '\0': |
| 3816 | if (objdef == otagseen) | 3814 | if (objdef == otagseen) |
| 3817 | { | 3815 | { |
| 3818 | make_C_tag (TRUE); /* an Objective C class */ | 3816 | make_C_tag (true); /* an Objective C class */ |
| 3819 | objdef = oignore; | 3817 | objdef = oignore; |
| 3820 | } | 3818 | } |
| 3821 | /* If a macro spans multiple lines don't reset its state. */ | 3819 | /* If a macro spans multiple lines don't reset its state. */ |
| @@ -3885,18 +3883,18 @@ Yacc_entries (FILE *inf) | |||
| 3885 | && /* instructions at start of loop */ \ | 3883 | && /* instructions at start of loop */ \ |
| 3886 | (readline (&line_buffer, file_pointer), \ | 3884 | (readline (&line_buffer, file_pointer), \ |
| 3887 | char_pointer = line_buffer.buffer, \ | 3885 | char_pointer = line_buffer.buffer, \ |
| 3888 | TRUE); \ | 3886 | true); \ |
| 3889 | ) | 3887 | ) |
| 3890 | 3888 | ||
| 3891 | #define LOOKING_AT(cp, kw) /* kw is the keyword, a literal string */ \ | 3889 | #define LOOKING_AT(cp, kw) /* kw is the keyword, a literal string */ \ |
| 3892 | ((assert ("" kw), TRUE) /* syntax error if not a literal string */ \ | 3890 | ((assert ("" kw), true) /* syntax error if not a literal string */ \ |
| 3893 | && strneq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \ | 3891 | && strneq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \ |
| 3894 | && notinname ((cp)[sizeof (kw)-1]) /* end of kw */ \ | 3892 | && notinname ((cp)[sizeof (kw)-1]) /* end of kw */ \ |
| 3895 | && ((cp) = skip_spaces ((cp)+sizeof (kw)-1))) /* skip spaces */ | 3893 | && ((cp) = skip_spaces ((cp)+sizeof (kw)-1))) /* skip spaces */ |
| 3896 | 3894 | ||
| 3897 | /* Similar to LOOKING_AT but does not use notinname, does not skip */ | 3895 | /* Similar to LOOKING_AT but does not use notinname, does not skip */ |
| 3898 | #define LOOKING_AT_NOCASE(cp, kw) /* the keyword is a literal string */ \ | 3896 | #define LOOKING_AT_NOCASE(cp, kw) /* the keyword is a literal string */ \ |
| 3899 | ((assert ("" kw), TRUE) /* syntax error if not a literal string */ \ | 3897 | ((assert ("" kw), true) /* syntax error if not a literal string */ \ |
| 3900 | && strncaseeq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \ | 3898 | && strncaseeq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \ |
| 3901 | && ((cp) += sizeof (kw)-1)) /* skip spaces */ | 3899 | && ((cp) += sizeof (kw)-1)) /* skip spaces */ |
| 3902 | 3900 | ||
| @@ -3959,7 +3957,7 @@ F_getit (FILE *inf) | |||
| 3959 | return; | 3957 | return; |
| 3960 | for (cp = dbp + 1; *cp != '\0' && intoken (*cp); cp++) | 3958 | for (cp = dbp + 1; *cp != '\0' && intoken (*cp); cp++) |
| 3961 | continue; | 3959 | continue; |
| 3962 | make_tag (dbp, cp-dbp, TRUE, | 3960 | make_tag (dbp, cp-dbp, true, |
| 3963 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 3961 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 3964 | } | 3962 | } |
| 3965 | 3963 | ||
| @@ -4036,7 +4034,7 @@ Fortran_functions (FILE *inf) | |||
| 4036 | { | 4034 | { |
| 4037 | dbp = skip_spaces (dbp); | 4035 | dbp = skip_spaces (dbp); |
| 4038 | if (*dbp == '\0') /* assume un-named */ | 4036 | if (*dbp == '\0') /* assume un-named */ |
| 4039 | make_tag ("blockdata", 9, TRUE, | 4037 | make_tag ("blockdata", 9, true, |
| 4040 | lb.buffer, dbp - lb.buffer, lineno, linecharno); | 4038 | lb.buffer, dbp - lb.buffer, lineno, linecharno); |
| 4041 | else | 4039 | else |
| 4042 | F_getit (inf); /* look for name */ | 4040 | F_getit (inf); /* look for name */ |
| @@ -4109,7 +4107,7 @@ Ada_getit (FILE *inf, const char *name_qualifier) | |||
| 4109 | *cp = '\0'; | 4107 | *cp = '\0'; |
| 4110 | name = concat (dbp, name_qualifier, ""); | 4108 | name = concat (dbp, name_qualifier, ""); |
| 4111 | *cp = c; | 4109 | *cp = c; |
| 4112 | make_tag (name, strlen (name), TRUE, | 4110 | make_tag (name, strlen (name), true, |
| 4113 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4111 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4114 | free (name); | 4112 | free (name); |
| 4115 | if (c == '"') | 4113 | if (c == '"') |
| @@ -4121,8 +4119,8 @@ Ada_getit (FILE *inf, const char *name_qualifier) | |||
| 4121 | static void | 4119 | static void |
| 4122 | Ada_funcs (FILE *inf) | 4120 | Ada_funcs (FILE *inf) |
| 4123 | { | 4121 | { |
| 4124 | bool inquote = FALSE; | 4122 | bool inquote = false; |
| 4125 | bool skip_till_semicolumn = FALSE; | 4123 | bool skip_till_semicolumn = false; |
| 4126 | 4124 | ||
| 4127 | LOOP_ON_INPUT_LINES (inf, lb, dbp) | 4125 | LOOP_ON_INPUT_LINES (inf, lb, dbp) |
| 4128 | { | 4126 | { |
| @@ -4134,13 +4132,13 @@ Ada_funcs (FILE *inf) | |||
| 4134 | dbp = etags_strchr (dbp + !inquote, '"'); | 4132 | dbp = etags_strchr (dbp + !inquote, '"'); |
| 4135 | if (dbp != NULL) | 4133 | if (dbp != NULL) |
| 4136 | { | 4134 | { |
| 4137 | inquote = FALSE; | 4135 | inquote = false; |
| 4138 | dbp += 1; | 4136 | dbp += 1; |
| 4139 | continue; /* advance char */ | 4137 | continue; /* advance char */ |
| 4140 | } | 4138 | } |
| 4141 | else | 4139 | else |
| 4142 | { | 4140 | { |
| 4143 | inquote = TRUE; | 4141 | inquote = true; |
| 4144 | break; /* advance line */ | 4142 | break; /* advance line */ |
| 4145 | } | 4143 | } |
| 4146 | } | 4144 | } |
| @@ -4162,7 +4160,7 @@ Ada_funcs (FILE *inf) | |||
| 4162 | if (skip_till_semicolumn) | 4160 | if (skip_till_semicolumn) |
| 4163 | { | 4161 | { |
| 4164 | if (*dbp == ';') | 4162 | if (*dbp == ';') |
| 4165 | skip_till_semicolumn = FALSE; | 4163 | skip_till_semicolumn = false; |
| 4166 | dbp++; | 4164 | dbp++; |
| 4167 | continue; /* advance char */ | 4165 | continue; /* advance char */ |
| 4168 | } | 4166 | } |
| @@ -4199,7 +4197,7 @@ Ada_funcs (FILE *inf) | |||
| 4199 | { | 4197 | { |
| 4200 | /* when tagging types, avoid tagging use type Pack.Typename; | 4198 | /* when tagging types, avoid tagging use type Pack.Typename; |
| 4201 | for this, we will skip everything till a ; */ | 4199 | for this, we will skip everything till a ; */ |
| 4202 | skip_till_semicolumn = TRUE; | 4200 | skip_till_semicolumn = true; |
| 4203 | continue; /* advance char */ | 4201 | continue; /* advance char */ |
| 4204 | } | 4202 | } |
| 4205 | 4203 | ||
| @@ -4248,7 +4246,7 @@ Asm_labels (FILE *inf) | |||
| 4248 | cp++; | 4246 | cp++; |
| 4249 | if (*cp == ':' || iswhite (*cp)) | 4247 | if (*cp == ':' || iswhite (*cp)) |
| 4250 | /* Found end of label, so copy it and add it to the table. */ | 4248 | /* Found end of label, so copy it and add it to the table. */ |
| 4251 | make_tag (lb.buffer, cp - lb.buffer, TRUE, | 4249 | make_tag (lb.buffer, cp - lb.buffer, true, |
| 4252 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4250 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4253 | } | 4251 | } |
| 4254 | } | 4252 | } |
| @@ -4292,7 +4290,7 @@ Perl_functions (FILE *inf) | |||
| 4292 | if ((pos = etags_strchr (sp, ':')) != NULL | 4290 | if ((pos = etags_strchr (sp, ':')) != NULL |
| 4293 | && pos < cp && pos[1] == ':') | 4291 | && pos < cp && pos[1] == ':') |
| 4294 | /* The name is already qualified. */ | 4292 | /* The name is already qualified. */ |
| 4295 | make_tag (sp, cp - sp, TRUE, | 4293 | make_tag (sp, cp - sp, true, |
| 4296 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4294 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4297 | else | 4295 | else |
| 4298 | /* Qualify it. */ | 4296 | /* Qualify it. */ |
| @@ -4303,7 +4301,7 @@ Perl_functions (FILE *inf) | |||
| 4303 | *cp = '\0'; | 4301 | *cp = '\0'; |
| 4304 | name = concat (package, "::", sp); | 4302 | name = concat (package, "::", sp); |
| 4305 | *cp = savechar; | 4303 | *cp = savechar; |
| 4306 | make_tag (name, strlen (name), TRUE, | 4304 | make_tag (name, strlen (name), true, |
| 4307 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4305 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4308 | free (name); | 4306 | free (name); |
| 4309 | } | 4307 | } |
| @@ -4346,7 +4344,7 @@ Perl_functions (FILE *inf) | |||
| 4346 | else | 4344 | else |
| 4347 | continue; | 4345 | continue; |
| 4348 | 4346 | ||
| 4349 | make_tag (varstart, cp - varstart, FALSE, | 4347 | make_tag (varstart, cp - varstart, false, |
| 4350 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4348 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4351 | } | 4349 | } |
| 4352 | } | 4350 | } |
| @@ -4373,7 +4371,7 @@ Python_functions (FILE *inf) | |||
| 4373 | char *name = cp; | 4371 | char *name = cp; |
| 4374 | while (!notinname (*cp) && *cp != ':') | 4372 | while (!notinname (*cp) && *cp != ':') |
| 4375 | cp++; | 4373 | cp++; |
| 4376 | make_tag (name, cp - name, TRUE, | 4374 | make_tag (name, cp - name, true, |
| 4377 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4375 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4378 | } | 4376 | } |
| 4379 | } | 4377 | } |
| @@ -4393,8 +4391,8 @@ Python_functions (FILE *inf) | |||
| 4393 | static void | 4391 | static void |
| 4394 | PHP_functions (FILE *inf) | 4392 | PHP_functions (FILE *inf) |
| 4395 | { | 4393 | { |
| 4396 | register char *cp, *name; | 4394 | char *cp, *name; |
| 4397 | bool search_identifier = FALSE; | 4395 | bool search_identifier = false; |
| 4398 | 4396 | ||
| 4399 | LOOP_ON_INPUT_LINES (inf, lb, cp) | 4397 | LOOP_ON_INPUT_LINES (inf, lb, cp) |
| 4400 | { | 4398 | { |
| @@ -4405,9 +4403,9 @@ PHP_functions (FILE *inf) | |||
| 4405 | { | 4403 | { |
| 4406 | while (!notinname (*cp)) | 4404 | while (!notinname (*cp)) |
| 4407 | cp++; | 4405 | cp++; |
| 4408 | make_tag (name, cp - name, TRUE, | 4406 | make_tag (name, cp - name, true, |
| 4409 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4407 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4410 | search_identifier = FALSE; | 4408 | search_identifier = false; |
| 4411 | } | 4409 | } |
| 4412 | else if (LOOKING_AT (cp, "function")) | 4410 | else if (LOOKING_AT (cp, "function")) |
| 4413 | { | 4411 | { |
| @@ -4418,11 +4416,11 @@ PHP_functions (FILE *inf) | |||
| 4418 | name = cp; | 4416 | name = cp; |
| 4419 | while (!notinname (*cp)) | 4417 | while (!notinname (*cp)) |
| 4420 | cp++; | 4418 | cp++; |
| 4421 | make_tag (name, cp - name, TRUE, | 4419 | make_tag (name, cp - name, true, |
| 4422 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4420 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4423 | } | 4421 | } |
| 4424 | else | 4422 | else |
| 4425 | search_identifier = TRUE; | 4423 | search_identifier = true; |
| 4426 | } | 4424 | } |
| 4427 | else if (LOOKING_AT (cp, "class")) | 4425 | else if (LOOKING_AT (cp, "class")) |
| 4428 | { | 4426 | { |
| @@ -4431,11 +4429,11 @@ PHP_functions (FILE *inf) | |||
| 4431 | name = cp; | 4429 | name = cp; |
| 4432 | while (*cp != '\0' && !iswhite (*cp)) | 4430 | while (*cp != '\0' && !iswhite (*cp)) |
| 4433 | cp++; | 4431 | cp++; |
| 4434 | make_tag (name, cp - name, FALSE, | 4432 | make_tag (name, cp - name, false, |
| 4435 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4433 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4436 | } | 4434 | } |
| 4437 | else | 4435 | else |
| 4438 | search_identifier = TRUE; | 4436 | search_identifier = true; |
| 4439 | } | 4437 | } |
| 4440 | else if (strneq (cp, "define", 6) | 4438 | else if (strneq (cp, "define", 6) |
| 4441 | && (cp = skip_spaces (cp+6)) | 4439 | && (cp = skip_spaces (cp+6)) |
| @@ -4446,7 +4444,7 @@ PHP_functions (FILE *inf) | |||
| 4446 | name = cp; | 4444 | name = cp; |
| 4447 | while (*cp != quote && *cp != '\0') | 4445 | while (*cp != quote && *cp != '\0') |
| 4448 | cp++; | 4446 | cp++; |
| 4449 | make_tag (name, cp - name, FALSE, | 4447 | make_tag (name, cp - name, false, |
| 4450 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4448 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4451 | } | 4449 | } |
| 4452 | else if (members | 4450 | else if (members |
| @@ -4456,7 +4454,7 @@ PHP_functions (FILE *inf) | |||
| 4456 | name = cp; | 4454 | name = cp; |
| 4457 | while (!notinname (*cp)) | 4455 | while (!notinname (*cp)) |
| 4458 | cp++; | 4456 | cp++; |
| 4459 | make_tag (name, cp - name, FALSE, | 4457 | make_tag (name, cp - name, false, |
| 4460 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 4458 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 4461 | } | 4459 | } |
| 4462 | } | 4460 | } |
| @@ -4487,7 +4485,7 @@ Cobol_paragraphs (FILE *inf) | |||
| 4487 | for (ep = bp; ISALNUM (*ep) || *ep == '-'; ep++) | 4485 | for (ep = bp; ISALNUM (*ep) || *ep == '-'; ep++) |
| 4488 | continue; | 4486 | continue; |
| 4489 | if (*ep++ == '.') | 4487 | if (*ep++ == '.') |
| 4490 | make_tag (bp, ep - bp, TRUE, | 4488 | make_tag (bp, ep - bp, true, |
| 4491 | lb.buffer, ep - lb.buffer + 1, lineno, linecharno); | 4489 | lb.buffer, ep - lb.buffer + 1, lineno, linecharno); |
| 4492 | } | 4490 | } |
| 4493 | } | 4491 | } |
| @@ -4516,7 +4514,7 @@ Makefile_targets (FILE *inf) | |||
| 4516 | while (--bp > namestart) | 4514 | while (--bp > namestart) |
| 4517 | if (!notinname (*bp)) | 4515 | if (!notinname (*bp)) |
| 4518 | break; | 4516 | break; |
| 4519 | make_tag (namestart, bp - namestart + 1, TRUE, | 4517 | make_tag (namestart, bp - namestart + 1, true, |
| 4520 | lb.buffer, bp - lb.buffer + 2, lineno, linecharno); | 4518 | lb.buffer, bp - lb.buffer + 2, lineno, linecharno); |
| 4521 | } | 4519 | } |
| 4522 | } | 4520 | } |
| @@ -4540,7 +4538,7 @@ Pascal_functions (FILE *inf) | |||
| 4540 | int save_lineno, namelen, taglen; | 4538 | int save_lineno, namelen, taglen; |
| 4541 | char c, *name; | 4539 | char c, *name; |
| 4542 | 4540 | ||
| 4543 | bool /* each of these flags is TRUE if: */ | 4541 | bool /* each of these flags is true if: */ |
| 4544 | incomment, /* point is inside a comment */ | 4542 | incomment, /* point is inside a comment */ |
| 4545 | inquote, /* point is inside '..' string */ | 4543 | inquote, /* point is inside '..' string */ |
| 4546 | get_tagname, /* point is after PROCEDURE/FUNCTION | 4544 | get_tagname, /* point is after PROCEDURE/FUNCTION |
| @@ -4558,11 +4556,11 @@ Pascal_functions (FILE *inf) | |||
| 4558 | *dbp = '\0'; | 4556 | *dbp = '\0'; |
| 4559 | linebuffer_init (&tline); | 4557 | linebuffer_init (&tline); |
| 4560 | 4558 | ||
| 4561 | incomment = inquote = FALSE; | 4559 | incomment = inquote = false; |
| 4562 | found_tag = FALSE; /* have a proc name; check if extern */ | 4560 | found_tag = false; /* have a proc name; check if extern */ |
| 4563 | get_tagname = FALSE; /* found "procedure" keyword */ | 4561 | get_tagname = false; /* found "procedure" keyword */ |
| 4564 | inparms = FALSE; /* found '(' after "proc" */ | 4562 | inparms = false; /* found '(' after "proc" */ |
| 4565 | verify_tag = FALSE; /* check if "extern" is ahead */ | 4563 | verify_tag = false; /* check if "extern" is ahead */ |
| 4566 | 4564 | ||
| 4567 | 4565 | ||
| 4568 | while (!feof (inf)) /* long main loop to get next char */ | 4566 | while (!feof (inf)) /* long main loop to get next char */ |
| @@ -4583,46 +4581,46 @@ Pascal_functions (FILE *inf) | |||
| 4583 | if (incomment) | 4581 | if (incomment) |
| 4584 | { | 4582 | { |
| 4585 | if (c == '}') /* within { } comments */ | 4583 | if (c == '}') /* within { } comments */ |
| 4586 | incomment = FALSE; | 4584 | incomment = false; |
| 4587 | else if (c == '*' && *dbp == ')') /* within (* *) comments */ | 4585 | else if (c == '*' && *dbp == ')') /* within (* *) comments */ |
| 4588 | { | 4586 | { |
| 4589 | dbp++; | 4587 | dbp++; |
| 4590 | incomment = FALSE; | 4588 | incomment = false; |
| 4591 | } | 4589 | } |
| 4592 | continue; | 4590 | continue; |
| 4593 | } | 4591 | } |
| 4594 | else if (inquote) | 4592 | else if (inquote) |
| 4595 | { | 4593 | { |
| 4596 | if (c == '\'') | 4594 | if (c == '\'') |
| 4597 | inquote = FALSE; | 4595 | inquote = false; |
| 4598 | continue; | 4596 | continue; |
| 4599 | } | 4597 | } |
| 4600 | else | 4598 | else |
| 4601 | switch (c) | 4599 | switch (c) |
| 4602 | { | 4600 | { |
| 4603 | case '\'': | 4601 | case '\'': |
| 4604 | inquote = TRUE; /* found first quote */ | 4602 | inquote = true; /* found first quote */ |
| 4605 | continue; | 4603 | continue; |
| 4606 | case '{': /* found open { comment */ | 4604 | case '{': /* found open { comment */ |
| 4607 | incomment = TRUE; | 4605 | incomment = true; |
| 4608 | continue; | 4606 | continue; |
| 4609 | case '(': | 4607 | case '(': |
| 4610 | if (*dbp == '*') /* found open (* comment */ | 4608 | if (*dbp == '*') /* found open (* comment */ |
| 4611 | { | 4609 | { |
| 4612 | incomment = TRUE; | 4610 | incomment = true; |
| 4613 | dbp++; | 4611 | dbp++; |
| 4614 | } | 4612 | } |
| 4615 | else if (found_tag) /* found '(' after tag, i.e., parm-list */ | 4613 | else if (found_tag) /* found '(' after tag, i.e., parm-list */ |
| 4616 | inparms = TRUE; | 4614 | inparms = true; |
| 4617 | continue; | 4615 | continue; |
| 4618 | case ')': /* end of parms list */ | 4616 | case ')': /* end of parms list */ |
| 4619 | if (inparms) | 4617 | if (inparms) |
| 4620 | inparms = FALSE; | 4618 | inparms = false; |
| 4621 | continue; | 4619 | continue; |
| 4622 | case ';': | 4620 | case ';': |
| 4623 | if (found_tag && !inparms) /* end of proc or fn stmt */ | 4621 | if (found_tag && !inparms) /* end of proc or fn stmt */ |
| 4624 | { | 4622 | { |
| 4625 | verify_tag = TRUE; | 4623 | verify_tag = true; |
| 4626 | break; | 4624 | break; |
| 4627 | } | 4625 | } |
| 4628 | continue; | 4626 | continue; |
| @@ -4636,23 +4634,23 @@ Pascal_functions (FILE *inf) | |||
| 4636 | { | 4634 | { |
| 4637 | if (nocase_tail ("extern")) /* superfluous, really! */ | 4635 | if (nocase_tail ("extern")) /* superfluous, really! */ |
| 4638 | { | 4636 | { |
| 4639 | found_tag = FALSE; | 4637 | found_tag = false; |
| 4640 | verify_tag = FALSE; | 4638 | verify_tag = false; |
| 4641 | } | 4639 | } |
| 4642 | } | 4640 | } |
| 4643 | else if (lowcase (*dbp) == 'f') | 4641 | else if (lowcase (*dbp) == 'f') |
| 4644 | { | 4642 | { |
| 4645 | if (nocase_tail ("forward")) /* check for forward reference */ | 4643 | if (nocase_tail ("forward")) /* check for forward reference */ |
| 4646 | { | 4644 | { |
| 4647 | found_tag = FALSE; | 4645 | found_tag = false; |
| 4648 | verify_tag = FALSE; | 4646 | verify_tag = false; |
| 4649 | } | 4647 | } |
| 4650 | } | 4648 | } |
| 4651 | if (found_tag && verify_tag) /* not external proc, so make tag */ | 4649 | if (found_tag && verify_tag) /* not external proc, so make tag */ |
| 4652 | { | 4650 | { |
| 4653 | found_tag = FALSE; | 4651 | found_tag = false; |
| 4654 | verify_tag = FALSE; | 4652 | verify_tag = false; |
| 4655 | make_tag (name, namelen, TRUE, | 4653 | make_tag (name, namelen, true, |
| 4656 | tline.buffer, taglen, save_lineno, save_lcno); | 4654 | tline.buffer, taglen, save_lineno, save_lcno); |
| 4657 | continue; | 4655 | continue; |
| 4658 | } | 4656 | } |
| @@ -4678,8 +4676,8 @@ Pascal_functions (FILE *inf) | |||
| 4678 | taglen = cp - lb.buffer + 1; | 4676 | taglen = cp - lb.buffer + 1; |
| 4679 | 4677 | ||
| 4680 | dbp = cp; /* set dbp to e-o-token */ | 4678 | dbp = cp; /* set dbp to e-o-token */ |
| 4681 | get_tagname = FALSE; | 4679 | get_tagname = false; |
| 4682 | found_tag = TRUE; | 4680 | found_tag = true; |
| 4683 | continue; | 4681 | continue; |
| 4684 | 4682 | ||
| 4685 | /* And proceed to check for "extern". */ | 4683 | /* And proceed to check for "extern". */ |
| @@ -4691,11 +4689,11 @@ Pascal_functions (FILE *inf) | |||
| 4691 | { | 4689 | { |
| 4692 | case 'p': | 4690 | case 'p': |
| 4693 | if (nocase_tail ("rocedure")) /* c = 'p', dbp has advanced */ | 4691 | if (nocase_tail ("rocedure")) /* c = 'p', dbp has advanced */ |
| 4694 | get_tagname = TRUE; | 4692 | get_tagname = true; |
| 4695 | continue; | 4693 | continue; |
| 4696 | case 'f': | 4694 | case 'f': |
| 4697 | if (nocase_tail ("unction")) | 4695 | if (nocase_tail ("unction")) |
| 4698 | get_tagname = TRUE; | 4696 | get_tagname = true; |
| 4699 | continue; | 4697 | continue; |
| 4700 | } | 4698 | } |
| 4701 | } | 4699 | } |
| @@ -4824,7 +4822,7 @@ PS_functions (FILE *inf) | |||
| 4824 | *ep != '\0' && *ep != ' ' && *ep != '{'; | 4822 | *ep != '\0' && *ep != ' ' && *ep != '{'; |
| 4825 | ep++) | 4823 | ep++) |
| 4826 | continue; | 4824 | continue; |
| 4827 | make_tag (bp, ep - bp, TRUE, | 4825 | make_tag (bp, ep - bp, true, |
| 4828 | lb.buffer, ep - lb.buffer + 1, lineno, linecharno); | 4826 | lb.buffer, ep - lb.buffer + 1, lineno, linecharno); |
| 4829 | } | 4827 | } |
| 4830 | else if (LOOKING_AT (bp, "defineps")) | 4828 | else if (LOOKING_AT (bp, "defineps")) |
| @@ -4954,14 +4952,14 @@ TeX_commands (FILE *inf) | |||
| 4954 | for (key = TEX_toktab; key->buffer != NULL; key++) | 4952 | for (key = TEX_toktab; key->buffer != NULL; key++) |
| 4955 | if (strneq (cp, key->buffer, key->len)) | 4953 | if (strneq (cp, key->buffer, key->len)) |
| 4956 | { | 4954 | { |
| 4957 | register char *p; | 4955 | char *p; |
| 4958 | int namelen, linelen; | 4956 | int namelen, linelen; |
| 4959 | bool opgrp = FALSE; | 4957 | bool opgrp = false; |
| 4960 | 4958 | ||
| 4961 | cp = skip_spaces (cp + key->len); | 4959 | cp = skip_spaces (cp + key->len); |
| 4962 | if (*cp == TEX_opgrp) | 4960 | if (*cp == TEX_opgrp) |
| 4963 | { | 4961 | { |
| 4964 | opgrp = TRUE; | 4962 | opgrp = true; |
| 4965 | cp++; | 4963 | cp++; |
| 4966 | } | 4964 | } |
| 4967 | for (p = cp; | 4965 | for (p = cp; |
| @@ -4977,7 +4975,7 @@ TeX_commands (FILE *inf) | |||
| 4977 | p++; | 4975 | p++; |
| 4978 | linelen = p - lb.buffer + 1; | 4976 | linelen = p - lb.buffer + 1; |
| 4979 | } | 4977 | } |
| 4980 | make_tag (cp, namelen, TRUE, | 4978 | make_tag (cp, namelen, true, |
| 4981 | lb.buffer, linelen, lineno, linecharno); | 4979 | lb.buffer, linelen, lineno, linecharno); |
| 4982 | goto tex_next_line; /* We only tag a line once */ | 4980 | goto tex_next_line; /* We only tag a line once */ |
| 4983 | } | 4981 | } |
| @@ -5081,7 +5079,7 @@ Texinfo_nodes (FILE *inf) | |||
| 5081 | start = cp; | 5079 | start = cp; |
| 5082 | while (*cp != '\0' && *cp != ',') | 5080 | while (*cp != '\0' && *cp != ',') |
| 5083 | cp++; | 5081 | cp++; |
| 5084 | make_tag (start, cp - start, TRUE, | 5082 | make_tag (start, cp - start, true, |
| 5085 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 5083 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 5086 | } | 5084 | } |
| 5087 | } | 5085 | } |
| @@ -5097,10 +5095,10 @@ Texinfo_nodes (FILE *inf) | |||
| 5097 | static void | 5095 | static void |
| 5098 | HTML_labels (FILE *inf) | 5096 | HTML_labels (FILE *inf) |
| 5099 | { | 5097 | { |
| 5100 | bool getnext = FALSE; /* next text outside of HTML tags is a tag */ | 5098 | bool getnext = false; /* next text outside of HTML tags is a tag */ |
| 5101 | bool skiptag = FALSE; /* skip to the end of the current HTML tag */ | 5099 | bool skiptag = false; /* skip to the end of the current HTML tag */ |
| 5102 | bool intag = FALSE; /* inside an html tag, looking for ID= */ | 5100 | bool intag = false; /* inside an html tag, looking for ID= */ |
| 5103 | bool inanchor = FALSE; /* when INTAG, is an anchor, look for NAME= */ | 5101 | bool inanchor = false; /* when INTAG, is an anchor, look for NAME= */ |
| 5104 | char *end; | 5102 | char *end; |
| 5105 | 5103 | ||
| 5106 | 5104 | ||
| @@ -5116,7 +5114,7 @@ HTML_labels (FILE *inf) | |||
| 5116 | if (*dbp == '>') | 5114 | if (*dbp == '>') |
| 5117 | { | 5115 | { |
| 5118 | dbp += 1; | 5116 | dbp += 1; |
| 5119 | skiptag = FALSE; | 5117 | skiptag = false; |
| 5120 | continue; /* look on the same line */ | 5118 | continue; /* look on the same line */ |
| 5121 | } | 5119 | } |
| 5122 | break; /* go to next line */ | 5120 | break; /* go to next line */ |
| @@ -5132,7 +5130,7 @@ HTML_labels (FILE *inf) | |||
| 5132 | if (*dbp == '>') | 5130 | if (*dbp == '>') |
| 5133 | { | 5131 | { |
| 5134 | dbp += 1; | 5132 | dbp += 1; |
| 5135 | intag = FALSE; | 5133 | intag = false; |
| 5136 | continue; /* look on the same line */ | 5134 | continue; /* look on the same line */ |
| 5137 | } | 5135 | } |
| 5138 | if ((inanchor && LOOKING_AT_NOCASE (dbp, "name=")) | 5136 | if ((inanchor && LOOKING_AT_NOCASE (dbp, "name=")) |
| @@ -5151,9 +5149,9 @@ HTML_labels (FILE *inf) | |||
| 5151 | token_name.buffer[end - dbp] = '\0'; | 5149 | token_name.buffer[end - dbp] = '\0'; |
| 5152 | 5150 | ||
| 5153 | dbp = end; | 5151 | dbp = end; |
| 5154 | intag = FALSE; /* we found what we looked for */ | 5152 | intag = false; /* we found what we looked for */ |
| 5155 | skiptag = TRUE; /* skip to the end of the tag */ | 5153 | skiptag = true; /* skip to the end of the tag */ |
| 5156 | getnext = TRUE; /* then grab the text */ | 5154 | getnext = true; /* then grab the text */ |
| 5157 | continue; /* look on the same line */ | 5155 | continue; /* look on the same line */ |
| 5158 | } | 5156 | } |
| 5159 | dbp += 1; | 5157 | dbp += 1; |
| @@ -5166,17 +5164,17 @@ HTML_labels (FILE *inf) | |||
| 5166 | break; /* go to next line */ | 5164 | break; /* go to next line */ |
| 5167 | if (*dbp == '<') | 5165 | if (*dbp == '<') |
| 5168 | { | 5166 | { |
| 5169 | intag = TRUE; | 5167 | intag = true; |
| 5170 | inanchor = (lowcase (dbp[1]) == 'a' && !intoken (dbp[2])); | 5168 | inanchor = (lowcase (dbp[1]) == 'a' && !intoken (dbp[2])); |
| 5171 | continue; /* look on the same line */ | 5169 | continue; /* look on the same line */ |
| 5172 | } | 5170 | } |
| 5173 | 5171 | ||
| 5174 | for (end = dbp + 1; *end != '\0' && *end != '<'; end++) | 5172 | for (end = dbp + 1; *end != '\0' && *end != '<'; end++) |
| 5175 | continue; | 5173 | continue; |
| 5176 | make_tag (token_name.buffer, token_name.len, TRUE, | 5174 | make_tag (token_name.buffer, token_name.len, true, |
| 5177 | dbp, end - dbp, lineno, linecharno); | 5175 | dbp, end - dbp, lineno, linecharno); |
| 5178 | linebuffer_setlen (&token_name, 0); /* no name in buffer */ | 5176 | linebuffer_setlen (&token_name, 0); /* no name in buffer */ |
| 5179 | getnext = FALSE; | 5177 | getnext = false; |
| 5180 | break; /* go to next line */ | 5178 | break; /* go to next line */ |
| 5181 | } | 5179 | } |
| 5182 | 5180 | ||
| @@ -5186,10 +5184,10 @@ HTML_labels (FILE *inf) | |||
| 5186 | dbp++; | 5184 | dbp++; |
| 5187 | if (*dbp == '\0') | 5185 | if (*dbp == '\0') |
| 5188 | break; /* go to next line */ | 5186 | break; /* go to next line */ |
| 5189 | intag = TRUE; | 5187 | intag = true; |
| 5190 | if (lowcase (dbp[1]) == 'a' && !intoken (dbp[2])) | 5188 | if (lowcase (dbp[1]) == 'a' && !intoken (dbp[2])) |
| 5191 | { | 5189 | { |
| 5192 | inanchor = TRUE; | 5190 | inanchor = true; |
| 5193 | continue; /* look on the same line */ | 5191 | continue; /* look on the same line */ |
| 5194 | } | 5192 | } |
| 5195 | else if (LOOKING_AT_NOCASE (dbp, "<title>") | 5193 | else if (LOOKING_AT_NOCASE (dbp, "<title>") |
| @@ -5197,8 +5195,8 @@ HTML_labels (FILE *inf) | |||
| 5197 | || LOOKING_AT_NOCASE (dbp, "<h2>") | 5195 | || LOOKING_AT_NOCASE (dbp, "<h2>") |
| 5198 | || LOOKING_AT_NOCASE (dbp, "<h3>")) | 5196 | || LOOKING_AT_NOCASE (dbp, "<h3>")) |
| 5199 | { | 5197 | { |
| 5200 | intag = FALSE; | 5198 | intag = false; |
| 5201 | getnext = TRUE; | 5199 | getnext = true; |
| 5202 | continue; /* look on the same line */ | 5200 | continue; /* look on the same line */ |
| 5203 | } | 5201 | } |
| 5204 | dbp += 1; | 5202 | dbp += 1; |
| @@ -5303,7 +5301,7 @@ prolog_pr (char *s, char *last) | |||
| 5303 | || len != strlen (last) | 5301 | || len != strlen (last) |
| 5304 | || !strneq (s, last, len))) | 5302 | || !strneq (s, last, len))) |
| 5305 | { | 5303 | { |
| 5306 | make_tag (s, len, TRUE, s, pos, lineno, linecharno); | 5304 | make_tag (s, len, true, s, pos, lineno, linecharno); |
| 5307 | return len; | 5305 | return len; |
| 5308 | } | 5306 | } |
| 5309 | else | 5307 | else |
| @@ -5459,7 +5457,7 @@ erlang_func (char *s, char *last) | |||
| 5459 | || len != (int)strlen (last) | 5457 | || len != (int)strlen (last) |
| 5460 | || !strneq (s, last, len))) | 5458 | || !strneq (s, last, len))) |
| 5461 | { | 5459 | { |
| 5462 | make_tag (s, len, TRUE, s, pos, lineno, linecharno); | 5460 | make_tag (s, len, true, s, pos, lineno, linecharno); |
| 5463 | return len; | 5461 | return len; |
| 5464 | } | 5462 | } |
| 5465 | 5463 | ||
| @@ -5486,7 +5484,7 @@ erlang_attribute (char *s) | |||
| 5486 | { | 5484 | { |
| 5487 | int len = erlang_atom (skip_spaces (cp)); | 5485 | int len = erlang_atom (skip_spaces (cp)); |
| 5488 | if (len > 0) | 5486 | if (len > 0) |
| 5489 | make_tag (cp, len, TRUE, s, cp + len - s, lineno, linecharno); | 5487 | make_tag (cp, len, true, s, cp + len - s, lineno, linecharno); |
| 5490 | } | 5488 | } |
| 5491 | return; | 5489 | return; |
| 5492 | } | 5490 | } |
| @@ -5539,7 +5537,7 @@ scan_separators (char *name) | |||
| 5539 | { | 5537 | { |
| 5540 | char sep = name[0]; | 5538 | char sep = name[0]; |
| 5541 | char *copyto = name; | 5539 | char *copyto = name; |
| 5542 | bool quoted = FALSE; | 5540 | bool quoted = false; |
| 5543 | 5541 | ||
| 5544 | for (++name; *name != '\0'; ++name) | 5542 | for (++name; *name != '\0'; ++name) |
| 5545 | { | 5543 | { |
| @@ -5567,10 +5565,10 @@ scan_separators (char *name) | |||
| 5567 | } | 5565 | } |
| 5568 | break; | 5566 | break; |
| 5569 | } | 5567 | } |
| 5570 | quoted = FALSE; | 5568 | quoted = false; |
| 5571 | } | 5569 | } |
| 5572 | else if (*name == '\\') | 5570 | else if (*name == '\\') |
| 5573 | quoted = TRUE; | 5571 | quoted = true; |
| 5574 | else if (*name == sep) | 5572 | else if (*name == sep) |
| 5575 | break; | 5573 | break; |
| 5576 | else | 5574 | else |
| @@ -5664,10 +5662,10 @@ add_regex (char *regexp_pattern, language *lang) | |||
| 5664 | struct re_pattern_buffer *patbuf; | 5662 | struct re_pattern_buffer *patbuf; |
| 5665 | regexp *rp; | 5663 | regexp *rp; |
| 5666 | bool | 5664 | bool |
| 5667 | force_explicit_name = TRUE, /* do not use implicit tag names */ | 5665 | force_explicit_name = true, /* do not use implicit tag names */ |
| 5668 | ignore_case = FALSE, /* case is significant */ | 5666 | ignore_case = false, /* case is significant */ |
| 5669 | multi_line = FALSE, /* matches are done one line at a time */ | 5667 | multi_line = false, /* matches are done one line at a time */ |
| 5670 | single_line = FALSE; /* dot does not match newline */ | 5668 | single_line = false; /* dot does not match newline */ |
| 5671 | 5669 | ||
| 5672 | 5670 | ||
| 5673 | if (strlen (regexp_pattern) < 3) | 5671 | if (strlen (regexp_pattern) < 3) |
| @@ -5703,17 +5701,17 @@ add_regex (char *regexp_pattern, language *lang) | |||
| 5703 | case 'N': | 5701 | case 'N': |
| 5704 | if (modifiers == name) | 5702 | if (modifiers == name) |
| 5705 | error ("forcing explicit tag name but no name, ignoring"); | 5703 | error ("forcing explicit tag name but no name, ignoring"); |
| 5706 | force_explicit_name = TRUE; | 5704 | force_explicit_name = true; |
| 5707 | break; | 5705 | break; |
| 5708 | case 'i': | 5706 | case 'i': |
| 5709 | ignore_case = TRUE; | 5707 | ignore_case = true; |
| 5710 | break; | 5708 | break; |
| 5711 | case 's': | 5709 | case 's': |
| 5712 | single_line = TRUE; | 5710 | single_line = true; |
| 5713 | /* FALLTHRU */ | 5711 | /* FALLTHRU */ |
| 5714 | case 'm': | 5712 | case 'm': |
| 5715 | multi_line = TRUE; | 5713 | multi_line = true; |
| 5716 | need_filebuf = TRUE; | 5714 | need_filebuf = true; |
| 5717 | break; | 5715 | break; |
| 5718 | default: | 5716 | default: |
| 5719 | error ("invalid regexp modifier `%c', ignoring", modifiers[0]); | 5717 | error ("invalid regexp modifier `%c', ignoring", modifiers[0]); |
| @@ -5757,7 +5755,7 @@ add_regex (char *regexp_pattern, language *lang) | |||
| 5757 | p_head->lang = lang; | 5755 | p_head->lang = lang; |
| 5758 | p_head->pat = patbuf; | 5756 | p_head->pat = patbuf; |
| 5759 | p_head->name = savestr (name); | 5757 | p_head->name = savestr (name); |
| 5760 | p_head->error_signaled = FALSE; | 5758 | p_head->error_signaled = false; |
| 5761 | p_head->force_explicit_name = force_explicit_name; | 5759 | p_head->force_explicit_name = force_explicit_name; |
| 5762 | p_head->ignore_case = ignore_case; | 5760 | p_head->ignore_case = ignore_case; |
| 5763 | p_head->multi_line = multi_line; | 5761 | p_head->multi_line = multi_line; |
| @@ -5871,7 +5869,7 @@ regex_tag_multiline (void) | |||
| 5871 | { | 5869 | { |
| 5872 | error ("regexp stack overflow while matching \"%s\"", | 5870 | error ("regexp stack overflow while matching \"%s\"", |
| 5873 | rp->pattern); | 5871 | rp->pattern); |
| 5874 | rp->error_signaled = TRUE; | 5872 | rp->error_signaled = true; |
| 5875 | } | 5873 | } |
| 5876 | break; | 5874 | break; |
| 5877 | case -1: | 5875 | case -1: |
| @@ -5884,7 +5882,7 @@ regex_tag_multiline (void) | |||
| 5884 | { | 5882 | { |
| 5885 | error ("regexp matches the empty string: \"%s\"", | 5883 | error ("regexp matches the empty string: \"%s\"", |
| 5886 | rp->pattern); | 5884 | rp->pattern); |
| 5887 | rp->error_signaled = TRUE; | 5885 | rp->error_signaled = true; |
| 5888 | } | 5886 | } |
| 5889 | match = -3; /* exit from while loop */ | 5887 | match = -3; /* exit from while loop */ |
| 5890 | break; | 5888 | break; |
| @@ -5901,10 +5899,10 @@ regex_tag_multiline (void) | |||
| 5901 | name = substitute (buffer, rp->name, &rp->regs); | 5899 | name = substitute (buffer, rp->name, &rp->regs); |
| 5902 | if (rp->force_explicit_name) | 5900 | if (rp->force_explicit_name) |
| 5903 | /* Force explicit tag name, if a name is there. */ | 5901 | /* Force explicit tag name, if a name is there. */ |
| 5904 | pfnote (name, TRUE, buffer + linecharno, | 5902 | pfnote (name, true, buffer + linecharno, |
| 5905 | charno - linecharno + 1, lineno, linecharno); | 5903 | charno - linecharno + 1, lineno, linecharno); |
| 5906 | else | 5904 | else |
| 5907 | make_tag (name, strlen (name), TRUE, buffer + linecharno, | 5905 | make_tag (name, strlen (name), true, buffer + linecharno, |
| 5908 | charno - linecharno + 1, lineno, linecharno); | 5906 | charno - linecharno + 1, lineno, linecharno); |
| 5909 | break; | 5907 | break; |
| 5910 | } | 5908 | } |
| @@ -5923,9 +5921,9 @@ nocase_tail (const char *cp) | |||
| 5923 | if (*cp == '\0' && !intoken (dbp[len])) | 5921 | if (*cp == '\0' && !intoken (dbp[len])) |
| 5924 | { | 5922 | { |
| 5925 | dbp += len; | 5923 | dbp += len; |
| 5926 | return TRUE; | 5924 | return true; |
| 5927 | } | 5925 | } |
| 5928 | return FALSE; | 5926 | return false; |
| 5929 | } | 5927 | } |
| 5930 | 5928 | ||
| 5931 | static void | 5929 | static void |
| @@ -5938,7 +5936,7 @@ get_tag (register char *bp, char **namepp) | |||
| 5938 | /* Go till you get to white space or a syntactic break */ | 5936 | /* Go till you get to white space or a syntactic break */ |
| 5939 | for (cp = bp + 1; !notinname (*cp); cp++) | 5937 | for (cp = bp + 1; !notinname (*cp); cp++) |
| 5940 | continue; | 5938 | continue; |
| 5941 | make_tag (bp, cp - bp, TRUE, | 5939 | make_tag (bp, cp - bp, true, |
| 5942 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); | 5940 | lb.buffer, cp - lb.buffer + 1, lineno, linecharno); |
| 5943 | } | 5941 | } |
| 5944 | 5942 | ||
| @@ -6073,7 +6071,7 @@ readline (linebuffer *lbp, FILE *stream) | |||
| 6073 | char *taggedfname; /* name of original file as given */ | 6071 | char *taggedfname; /* name of original file as given */ |
| 6074 | char *name; /* temp var */ | 6072 | char *name; /* temp var */ |
| 6075 | 6073 | ||
| 6076 | discard_until_line_directive = FALSE; /* found it */ | 6074 | discard_until_line_directive = false; /* found it */ |
| 6077 | name = lbp->buffer + start; | 6075 | name = lbp->buffer + start; |
| 6078 | *endp = '\0'; | 6076 | *endp = '\0'; |
| 6079 | canonicalize_filename (name); | 6077 | canonicalize_filename (name); |
| @@ -6121,7 +6119,7 @@ readline (linebuffer *lbp, FILE *stream) | |||
| 6121 | for (fdp = fdhead; fdp != NULL; fdp = fdp->next) | 6119 | for (fdp = fdhead; fdp != NULL; fdp = fdp->next) |
| 6122 | if (streq (fdp->infabsname, taggedabsname)) | 6120 | if (streq (fdp->infabsname, taggedabsname)) |
| 6123 | { | 6121 | { |
| 6124 | discard_until_line_directive = TRUE; | 6122 | discard_until_line_directive = true; |
| 6125 | free (taggedfname); | 6123 | free (taggedfname); |
| 6126 | break; | 6124 | break; |
| 6127 | } | 6125 | } |
| @@ -6137,9 +6135,9 @@ readline (linebuffer *lbp, FILE *stream) | |||
| 6137 | fdhead->infabsname = savestr (curfdp->infabsname); | 6135 | fdhead->infabsname = savestr (curfdp->infabsname); |
| 6138 | fdhead->infabsdir = savestr (curfdp->infabsdir); | 6136 | fdhead->infabsdir = savestr (curfdp->infabsdir); |
| 6139 | fdhead->taggedfname = taggedfname; | 6137 | fdhead->taggedfname = taggedfname; |
| 6140 | fdhead->usecharno = FALSE; | 6138 | fdhead->usecharno = false; |
| 6141 | fdhead->prop = NULL; | 6139 | fdhead->prop = NULL; |
| 6142 | fdhead->written = FALSE; | 6140 | fdhead->written = false; |
| 6143 | curfdp = fdhead; | 6141 | curfdp = fdhead; |
| 6144 | } | 6142 | } |
| 6145 | } | 6143 | } |
| @@ -6162,7 +6160,7 @@ readline (linebuffer *lbp, FILE *stream) | |||
| 6162 | return; | 6160 | return; |
| 6163 | } | 6161 | } |
| 6164 | /* End of file. */ | 6162 | /* End of file. */ |
| 6165 | discard_until_line_directive = FALSE; | 6163 | discard_until_line_directive = false; |
| 6166 | return; | 6164 | return; |
| 6167 | } | 6165 | } |
| 6168 | } /* if #line directives should be considered */ | 6166 | } /* if #line directives should be considered */ |
| @@ -6192,7 +6190,7 @@ readline (linebuffer *lbp, FILE *stream) | |||
| 6192 | { | 6190 | { |
| 6193 | error ("regexp stack overflow while matching \"%s\"", | 6191 | error ("regexp stack overflow while matching \"%s\"", |
| 6194 | rp->pattern); | 6192 | rp->pattern); |
| 6195 | rp->error_signaled = TRUE; | 6193 | rp->error_signaled = true; |
| 6196 | } | 6194 | } |
| 6197 | break; | 6195 | break; |
| 6198 | case -1: | 6196 | case -1: |
| @@ -6203,7 +6201,7 @@ readline (linebuffer *lbp, FILE *stream) | |||
| 6203 | if (!rp->error_signaled) | 6201 | if (!rp->error_signaled) |
| 6204 | { | 6202 | { |
| 6205 | error ("regexp matches the empty string: \"%s\"", rp->pattern); | 6203 | error ("regexp matches the empty string: \"%s\"", rp->pattern); |
| 6206 | rp->error_signaled = TRUE; | 6204 | rp->error_signaled = true; |
| 6207 | } | 6205 | } |
| 6208 | break; | 6206 | break; |
| 6209 | default: | 6207 | default: |
| @@ -6215,9 +6213,9 @@ readline (linebuffer *lbp, FILE *stream) | |||
| 6215 | name = substitute (lbp->buffer, rp->name, &rp->regs); | 6213 | name = substitute (lbp->buffer, rp->name, &rp->regs); |
| 6216 | if (rp->force_explicit_name) | 6214 | if (rp->force_explicit_name) |
| 6217 | /* Force explicit tag name, if a name is there. */ | 6215 | /* Force explicit tag name, if a name is there. */ |
| 6218 | pfnote (name, TRUE, lbp->buffer, match, lineno, linecharno); | 6216 | pfnote (name, true, lbp->buffer, match, lineno, linecharno); |
| 6219 | else | 6217 | else |
| 6220 | make_tag (name, strlen (name), TRUE, | 6218 | make_tag (name, strlen (name), true, |
| 6221 | lbp->buffer, match, lineno, linecharno); | 6219 | lbp->buffer, match, lineno, linecharno); |
| 6222 | break; | 6220 | break; |
| 6223 | } | 6221 | } |
diff --git a/lib-src/hexl.c b/lib-src/hexl.c index 3208a895aa2..b308256a662 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c | |||
| @@ -37,12 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 37 | #define DEFAULT_GROUPING 0x01 | 37 | #define DEFAULT_GROUPING 0x01 |
| 38 | #define DEFAULT_BASE 16 | 38 | #define DEFAULT_BASE 16 |
| 39 | 39 | ||
| 40 | #undef TRUE | 40 | int base = DEFAULT_BASE; |
| 41 | #undef FALSE | 41 | bool un_flag = false, iso_flag = false, endian = true; |
| 42 | #define TRUE (1) | ||
| 43 | #define FALSE (0) | ||
| 44 | |||
| 45 | int base = DEFAULT_BASE, un_flag = FALSE, iso_flag = FALSE, endian = 1; | ||
| 46 | int group_by = DEFAULT_GROUPING; | 42 | int group_by = DEFAULT_GROUPING; |
| 47 | char *progname; | 43 | char *progname; |
| 48 | 44 | ||
| @@ -83,7 +79,7 @@ main (int argc, char **argv) | |||
| 83 | } | 79 | } |
| 84 | else if (!strcmp (*argv, "-un") || !strcmp (*argv, "-de")) | 80 | else if (!strcmp (*argv, "-un") || !strcmp (*argv, "-de")) |
| 85 | { | 81 | { |
| 86 | un_flag = TRUE; | 82 | un_flag = true; |
| 87 | --argc; argv++; | 83 | --argc; argv++; |
| 88 | } | 84 | } |
| 89 | else if (!strcmp (*argv, "-hex")) | 85 | else if (!strcmp (*argv, "-hex")) |
| @@ -93,7 +89,7 @@ main (int argc, char **argv) | |||
| 93 | } | 89 | } |
| 94 | else if (!strcmp (*argv, "-iso")) | 90 | else if (!strcmp (*argv, "-iso")) |
| 95 | { | 91 | { |
| 96 | iso_flag = TRUE; | 92 | iso_flag = true; |
| 97 | --argc; argv++; | 93 | --argc; argv++; |
| 98 | } | 94 | } |
| 99 | else if (!strcmp (*argv, "-oct")) | 95 | else if (!strcmp (*argv, "-oct")) |
| @@ -103,12 +99,12 @@ main (int argc, char **argv) | |||
| 103 | } | 99 | } |
| 104 | else if (!strcmp (*argv, "-big-endian")) | 100 | else if (!strcmp (*argv, "-big-endian")) |
| 105 | { | 101 | { |
| 106 | endian = 1; | 102 | endian = true; |
| 107 | --argc; argv++; | 103 | --argc; argv++; |
| 108 | } | 104 | } |
| 109 | else if (!strcmp (*argv, "-little-endian")) | 105 | else if (!strcmp (*argv, "-little-endian")) |
| 110 | { | 106 | { |
| 111 | endian = 0; | 107 | endian = false; |
| 112 | --argc; argv++; | 108 | --argc; argv++; |
| 113 | } | 109 | } |
| 114 | else if (!strcmp (*argv, "-group-by-8-bits")) | 110 | else if (!strcmp (*argv, "-group-by-8-bits")) |
| @@ -129,7 +125,7 @@ main (int argc, char **argv) | |||
| 129 | else if (!strcmp (*argv, "-group-by-64-bits")) | 125 | else if (!strcmp (*argv, "-group-by-64-bits")) |
| 130 | { | 126 | { |
| 131 | group_by = 0x07; | 127 | group_by = 0x07; |
| 132 | endian = 0; | 128 | endian = false; |
| 133 | --argc; argv++; | 129 | --argc; argv++; |
| 134 | } | 130 | } |
| 135 | else | 131 | else |
diff --git a/lib-src/pop.c b/lib-src/pop.c index a269144c915..ea89ad47ea0 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c | |||
| @@ -124,7 +124,7 @@ static char *find_crlf (char *, int); | |||
| 124 | #endif | 124 | #endif |
| 125 | 125 | ||
| 126 | char pop_error[ERROR_MAX]; | 126 | char pop_error[ERROR_MAX]; |
| 127 | int pop_debug = 0; | 127 | bool pop_debug = false; |
| 128 | 128 | ||
| 129 | /* | 129 | /* |
| 130 | * Function: pop_open (char *host, char *username, char *password, | 130 | * Function: pop_open (char *host, char *username, char *password, |
| @@ -269,8 +269,8 @@ pop_open (char *host, char *username, char *password, int flags) | |||
| 269 | server->data = 0; | 269 | server->data = 0; |
| 270 | server->buffer_index = 0; | 270 | server->buffer_index = 0; |
| 271 | server->buffer_size = GETLINE_MIN; | 271 | server->buffer_size = GETLINE_MIN; |
| 272 | server->in_multi = 0; | 272 | server->in_multi = false; |
| 273 | server->trash_started = 0; | 273 | server->trash_started = false; |
| 274 | 274 | ||
| 275 | if (getok (server)) | 275 | if (getok (server)) |
| 276 | return (0); | 276 | return (0); |
| @@ -686,7 +686,7 @@ pop_multi_first (popserver server, const char *command, char **response) | |||
| 686 | else if (0 == strncmp (*response, "+OK", 3)) | 686 | else if (0 == strncmp (*response, "+OK", 3)) |
| 687 | { | 687 | { |
| 688 | for (*response += 3; **response == ' '; (*response)++) /* empty */; | 688 | for (*response += 3; **response == ' '; (*response)++) /* empty */; |
| 689 | server->in_multi = 1; | 689 | server->in_multi = true; |
| 690 | return (0); | 690 | return (0); |
| 691 | } | 691 | } |
| 692 | else | 692 | else |
| @@ -728,7 +728,7 @@ pop_multi_next (popserver server, char **line) | |||
| 728 | if (! fromserver[1]) | 728 | if (! fromserver[1]) |
| 729 | { | 729 | { |
| 730 | *line = 0; | 730 | *line = 0; |
| 731 | server->in_multi = 0; | 731 | server->in_multi = false; |
| 732 | return (0); | 732 | return (0); |
| 733 | } | 733 | } |
| 734 | else | 734 | else |
| @@ -1546,7 +1546,7 @@ pop_trash (popserver server) | |||
| 1546 | /* avoid recursion; sendline can call pop_trash */ | 1546 | /* avoid recursion; sendline can call pop_trash */ |
| 1547 | if (server->trash_started) | 1547 | if (server->trash_started) |
| 1548 | return; | 1548 | return; |
| 1549 | server->trash_started = 1; | 1549 | server->trash_started = true; |
| 1550 | 1550 | ||
| 1551 | sendline (server, "RSET"); | 1551 | sendline (server, "RSET"); |
| 1552 | sendline (server, "QUIT"); | 1552 | sendline (server, "QUIT"); |
diff --git a/lib-src/pop.h b/lib-src/pop.h index dbc7c8dbe64..ac5f315bdeb 100644 --- a/lib-src/pop.h +++ b/lib-src/pop.h | |||
| @@ -27,15 +27,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 27 | /* size when it needs to grow */ | 27 | /* size when it needs to grow */ |
| 28 | 28 | ||
| 29 | extern char pop_error[]; | 29 | extern char pop_error[]; |
| 30 | extern int pop_debug; | 30 | extern bool pop_debug; |
| 31 | 31 | ||
| 32 | struct _popserver | 32 | struct _popserver |
| 33 | { | 33 | { |
| 34 | int file, data; | 34 | int file, data; |
| 35 | char *buffer; | 35 | char *buffer; |
| 36 | int buffer_size, buffer_index; | 36 | int buffer_size, buffer_index; |
| 37 | int in_multi; | 37 | bool_bf in_multi : 1; |
| 38 | int trash_started; | 38 | bool_bf trash_started : 1; |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | typedef struct _popserver *popserver; | 41 | typedef struct _popserver *popserver; |
| @@ -73,4 +73,3 @@ extern int pop_last (popserver server); | |||
| 73 | extern int pop_reset (popserver server); | 73 | extern int pop_reset (popserver server); |
| 74 | extern int pop_quit (popserver server); | 74 | extern int pop_quit (popserver server); |
| 75 | extern void pop_close (popserver); | 75 | extern void pop_close (popserver); |
| 76 | |||