Skip to content

Commit

Permalink
update idlpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Jordense committed Mar 5, 2019
1 parent d057c8b commit ee3ea69
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/cpp/code/include.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ static void read_include_file (char * name, int dohere, int sharp)
w = os_malloc(strlen(n) + +strlen(name) + 4);
sprintf(w, "%s\" \"%s", n, name);
out_at(!sharp, w);
os_free(w);
autodef_file(n);
autodef_line(1);
Push('\n');
Get();
push_new_file(n, f);
push_new_file(w, f);
os_free(w);
cp = strrchr(n, CPP_FILESEPCHAR_1);
if (!cp) {
cp = strrchr(n, CPP_FILESEPCHAR_2);
Expand Down
14 changes: 9 additions & 5 deletions src/tools/cppgen/code/idl.ll
Original file line number Diff line number Diff line change
Expand Up @@ -427,13 +427,17 @@ static void idl_parse_line_and_file (char *buf)
if (idl_global->maintain_include_namespace())
{
for (r++; *r != '\0' && (*r == ' ' || *r == '\t'); r++);
l = ++r;
for (; *r != '"'; r++);
*r = '\0';
if (*l != '\0') {
if (*r == '"') {
l = ++r;
for (; (*r != '\0') && (*r != '"'); r++);
*r = '\0';
if (*l != '\0') {
nm = new UTL_String (l);
} else {
} else {
nm = new UTL_String(stripped_name (idl_global->filename ()));
}
} else {
nm = new UTL_String(stripped_name (idl_global->filename ()));
}
}
else
Expand Down
14 changes: 9 additions & 5 deletions src/tools/cppgen/code/lex_yy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2808,13 +2808,17 @@ static void idl_parse_line_and_file (char *buf)
if (idl_global->maintain_include_namespace())
{
for (r++; *r != '\0' && (*r == ' ' || *r == '\t'); r++);
l = ++r;
for (; *r != '"'; r++);
*r = '\0';
if (*l != '\0') {
if (*r == '"') {
l = ++r;
for (; (*r != '\0') && (*r != '"'); r++);
*r = '\0';
if (*l != '\0') {
nm = new UTL_String (l);
} else {
} else {
nm = new UTL_String(stripped_name (idl_global->filename ()));
}
} else {
nm = new UTL_String(stripped_name (idl_global->filename ()));
}
}
else
Expand Down

0 comments on commit ee3ea69

Please sign in to comment.