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
1621 for (i = -2; i < n; ++i) {1621 for (i = -2; i < n; ++i) {
1622 char buf1[sizeof file->filename];1622 char buf1[sizeof file->filename];
1623 CachedInclude *e;1623 CachedInclude *e;
1624 BufferedFile **f;
1625 const char *path;1624 const char *path;
1626 1625
1627 if (i == -2) {1626 if (i == -2) {
@@ -1651,8 +1650,7 @@ ST_FUNC void preprocess(int is_bof) · 23 unmodified lines
1651 pstrcat(buf1, sizeof(buf1), buf);1650 pstrcat(buf1, sizeof(buf1), buf);
1652 1651
1653 if (tok == TOK_INCLUDE_NEXT)1652 if (tok == TOK_INCLUDE_NEXT)
1654 for (f = s1->include_stack_ptr; f >= s1->include_stack; --f)1653 if (0 == PATHCMP(file->filename, buf1)) {
1655 if (0 == PATHCMP((*f)->filename, buf1)) {
1656#ifdef INC_DEBUG1654#ifdef INC_DEBUG
1657 printf("%s: #include_next skipping %s\n", file->filename, buf1);1655 printf("%s: #include_next skipping %s\n", file->filename, buf1);
1658#endif1656#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