| 4245 | } |
| 4246 | extern long SYNTAXCHECKING; |
| 4247 | long LaunchScriptCheck(EERIE_SCRIPT * es, INTERACTIVE_OBJ * io) |
| 4248 | { |
| 4249 | return 1; |
| 4250 | |
| 4251 | if (SYNTAXCHECKING == 0) return 1; |
| 4252 | |
| 4253 | if (io->ioflags & IO_FREEZESCRIPT) return 1; |
| 4254 | |
| 4255 | long errors = 0; |
| 4256 | long warnings = 0; |
| 4257 | long stoppingdebug = 0; |
| 4258 | long brackets = 0; |
| 4259 | char errstring[65535]; |
| 4260 | char tem[256]; |
| 4261 | |
| 4262 | if (io == NULL) return 1; |
| 4263 | |
| 4264 | if (es == NULL) return 1; |
| 4265 | |
| 4266 | if (!es->data) return 1; |
| 4267 | |
| 4268 | if (es->data[0] == 0) return 1; |
| 4269 | |
| 4270 | long returnvalue = 1; |
| 4271 | errstring[0] = 0; |
| 4272 | long cb = CountBrackets(es); |
| 4273 | |
| 4274 | if (cb != 0) |
| 4275 | { |
| 4276 | if (cb > 0) sprintf(tem, "Global - Warning: Invalid Number of Closing Brackets. %d '}' missed\n", cb); |
| 4277 | else sprintf(tem, "Global - Warning: Invalid Number of Opening Brackets. %d '{' missed\n", -cb); |
| 4278 | |
| 4279 | if (strlen(tem) + strlen(errstring) < 65480) strcat(errstring, tem); |
| 4280 | else stoppingdebug = 1; |
| 4281 | |
| 4282 | warnings++; |
| 4283 | } |
| 4284 | |
| 4285 | char temp[256]; |
| 4286 | char temp1[64]; |
| 4287 | char temp2[64]; |
| 4288 | char temp3[64]; |
| 4289 | |
| 4290 | char curlinetext[512]; |
| 4291 | long pos = 0; |
| 4292 | _CURIO = io; |
| 4293 | |
| 4294 | while (((pos = GetNextWord(es, pos, temp)) >= 0) && (pos >= 0) && (pos < es->size - 1)) |
| 4295 | { |
| 4296 | MakeStandard(temp); |
| 4297 | long currentline = GetCurrentLine(es, pos); |
| 4298 | |
| 4299 | if (currentline == -1) |
| 4300 | { |
| 4301 | currentline = GetLastLineNum(es); |
| 4302 | } |
| 4303 | |
| 4304 | memset(curlinetext, 0, 512); |
no test coverage detected