diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-07-12 17:32:08 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-07-12 17:32:08 +0000 |
commit | ac192381111ab6faf357a598dca47598935c61d9 (patch) | |
tree | 874f550fe389570e098b2aa477e68cab3463d30d /cpp/src/Slice/Preprocessor.cpp | |
parent | adding C# support (kind="cs") (diff) | |
download | ice-ac192381111ab6faf357a598dca47598935c61d9.tar.bz2 ice-ac192381111ab6faf357a598dca47598935c61d9.tar.xz ice-ac192381111ab6faf357a598dca47598935c61d9.zip |
change extension of leading file from .cpp to .ice for Java
Diffstat (limited to 'cpp/src/Slice/Preprocessor.cpp')
-rw-r--r-- | cpp/src/Slice/Preprocessor.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 30f3bb8db4b..390e524f7e1 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -133,7 +133,6 @@ Slice::Preprocessor::printMakefileDependencies(Language lang) switch(lang) { case CPlusPlus: - case Java: // Java ignores the leading .cpp filename. { char buf[1024]; while(fgets(buf, sizeof(buf), cppHandle) != NULL) @@ -142,6 +141,24 @@ Slice::Preprocessor::printMakefileDependencies(Language lang) } break; } + case Java: + { + char buf[1024]; + while(fgets(buf, sizeof(buf), cppHandle) != NULL) + { + // + // Change the extension of the leading file from .cpp to .ice. + // This filename is ignored by Slice2JavaTask. + // + char* p = strstr(buf, ".cpp:"); + if(p != NULL) + { + strncpy(p + 1, "ice", 3); + } + fputs(buf, stdout); + } + break; + } case CSharp: { // |