History

fix for the #include_next

skip include file only if include_file_name=current_file_name

seyko committed 11 years ago

Commit 28529291 parent c3975cf1 file · +1 −3Browse files

Unified · Split

tccpp.c+1−3
@@ -1621,7 +1621,6 @@ ST_FUNC void preprocess(int is_bof) · 1620 unmodified lines
16211621 for (i = -2; i < n; ++i) {
16221622 char buf1[sizeof file->filename];
16231623 CachedInclude *e;
1624− BufferedFile **f;
16251624 const char *path;
16261625
16271626 if (i == -2) {
@@ -1651,8 +1650,7 @@ ST_FUNC void preprocess(int is_bof) · 23 unmodified lines
16511650 pstrcat(buf1, sizeof(buf1), buf);
16521651
16531652 if (tok == TOK_INCLUDE_NEXT)
1654− for (f = s1->include_stack_ptr; f >= s1->include_stack; --f)
1655− if (0 == PATHCMP((*f)->filename, buf1)) {
1653+ if (0 == PATHCMP(file->filename, buf1)) {
16561654 #ifdef INC_DEBUG
16571655 printf("%s: #include_next skipping %s\n", file->filename, buf1);
16581656 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t