| 1115 | ********************************************************************************/ |
| 1116 | |
| 1117 | static bool check_section_header(const char *line, int lineno) |
| 1118 | { |
| 1119 | int i; |
| 1120 | |
| 1121 | /* Search g_section_info[] to find a matching section header line */ |
| 1122 | |
| 1123 | for (i = FIRST_SECTION; i <= LAST_SECTION; i++) |
| 1124 | { |
| 1125 | if (strcmp(line, g_section_info[i].name) == 0) |
| 1126 | { |
| 1127 | g_section = (enum section_s)i; |
| 1128 | |
| 1129 | /* Verify that this section is appropriate for this file type */ |
| 1130 | |
| 1131 | if ((g_file_type & g_section_info[i].ftype) == 0) |
| 1132 | { |
| 1133 | ERROR("Invalid section for this file type", lineno, 3); |
| 1134 | } |
| 1135 | |
| 1136 | return true; |
| 1137 | } |
| 1138 | } |
| 1139 | |
| 1140 | return false; |
| 1141 | } |
| 1142 | |
| 1143 | /******************************************************************************** |
| 1144 | * Name: white_file_list |