Lines Matching refs:fileInfo

28 	struct FileStackNode *fileInfo;  member
82 fstk_Dump(contextStack->fileInfo, lexer_GetLineNo()); in fstk_DumpCurrent()
90 struct FileStackNode *node = contextStack->fileInfo; in fstk_GetFileStack()
98 return contextStack->fileInfo; in fstk_GetFileStack()
104 struct FileStackNode const *node = contextStack->fileInfo; in fstk_GetFileName()
216 if (contextStack->fileInfo->type == NODE_REPT) { /* The context is a REPT block, which may loop */ in yywrap()
217 struct FileStackReptNode *fileInfo = (struct FileStackReptNode *)contextStack->fileInfo; in yywrap() local
220 if (contextStack->fileInfo->referenced) { in yywrap()
221 size_t size = sizeof(*fileInfo) + sizeof(fileInfo->iters[0]) * fileInfo->reptDepth; in yywrap()
227 memcpy(copy, fileInfo, size); in yywrap()
231 fileInfo = copy; in yywrap()
232 contextStack->fileInfo = (struct FileStackNode *)fileInfo; in yywrap()
236 if (contextStack->forName && fileInfo->iters[0] <= contextStack->nbReptIters) { in yywrap()
246 fileInfo->iters[0]++; in yywrap()
248 if (fileInfo->iters[0] <= contextStack->nbReptIters) { in yywrap()
249 lexer_RestartRept(contextStack->fileInfo->lineNo); in yywrap()
265 if (context->fileInfo->type == NODE_MACRO) in yywrap()
268 if (!context->fileInfo->referenced) in yywrap()
269 free(context->fileInfo); in yywrap()
285 static void newContext(struct FileStackNode *fileInfo) in newContext() argument
293 fileInfo->parent = contextStack->fileInfo; in newContext()
294 fileInfo->lineNo = 0; /* Init to a default value, see struct definition for info */ in newContext()
295 fileInfo->referenced = false; in newContext()
296 fileInfo->lineNo = lexer_GetLineNo(); in newContext()
297 context->fileInfo = fileInfo; in newContext()
325 struct FileStackNamedNode *fileInfo = malloc(sizeof(*fileInfo) + size); in fstk_RunInclude() local
327 if (!fileInfo) { in fstk_RunInclude()
331 fileInfo->node.type = NODE_FILE; in fstk_RunInclude()
332 strcpy(fileInfo->name, fullPath); in fstk_RunInclude()
335 newContext((struct FileStackNode *)fileInfo); in fstk_RunInclude()
336 contextStack->lexerState = lexer_OpenFile(fileInfo->name); in fstk_RunInclude()
376 struct FileStackNamedNode *fileInfo = malloc(sizeof(*fileInfo) + baseLen in fstk_RunMacro() local
379 if (!fileInfo) { in fstk_RunMacro()
383 fileInfo->node.type = NODE_MACRO; in fstk_RunMacro()
385 char *dest = fileInfo->name; in fstk_RunMacro()
405 newContext((struct FileStackNode *)fileInfo); in fstk_RunMacro()
417 uint32_t reptDepth = contextStack->fileInfo->type == NODE_REPT in newReptContext()
418 ? ((struct FileStackReptNode *)contextStack->fileInfo)->reptDepth in newReptContext()
420 struct FileStackReptNode *fileInfo = malloc(sizeof(*fileInfo) in newReptContext() local
421 + (reptDepth + 1) * sizeof(fileInfo->iters[0])); in newReptContext()
423 if (!fileInfo) { in newReptContext()
427 fileInfo->node.type = NODE_REPT; in newReptContext()
428 fileInfo->reptDepth = reptDepth + 1; in newReptContext()
429 fileInfo->iters[0] = 1; in newReptContext()
432 memcpy(&fileInfo->iters[1], in newReptContext()
433 ((struct FileStackReptNode *)contextStack->fileInfo)->iters, in newReptContext()
434 reptDepth * sizeof(fileInfo->iters[0])); in newReptContext()
436 newContext((struct FileStackNode *)fileInfo); in newReptContext()
438 contextStack->fileInfo->lineNo = reptLineNo; in newReptContext()
501 if (contextStack->fileInfo->type != NODE_REPT) { in fstk_Break()
520 struct FileStackNamedNode *fileInfo = malloc(sizeof(*fileInfo) + len + 1); in fstk_Init() local
524 if (!fileInfo) in fstk_Init()
527 context->fileInfo = (struct FileStackNode *)fileInfo; in fstk_Init()
529 context->fileInfo->parent = NULL; in fstk_Init()
530 context->fileInfo->lineNo = 0; // This still gets written to the object file, so init it in fstk_Init()
531 context->fileInfo->referenced = false; in fstk_Init()
532 context->fileInfo->type = NODE_FILE; in fstk_Init()
533 memcpy(fileInfo->name, fileName, len + 1); in fstk_Init()