summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Preprocessor.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-09-08 00:23:12 +0000
committerMichi Henning <michi@zeroc.com>2004-09-08 00:23:12 +0000
commit7d0bfe3515b63029635d7f5f9a769d8cb46da98a (patch)
tree4da16b0e4c0ffc9014a4805b749f63cae69b0fdb /cpp/src/Slice/Preprocessor.cpp
parentminor fixes (diff)
downloadice-7d0bfe3515b63029635d7f5f9a769d8cb46da98a.tar.bz2
ice-7d0bfe3515b63029635d7f5f9a769d8cb46da98a.tar.xz
ice-7d0bfe3515b63029635d7f5f9a769d8cb46da98a.zip
Added slice2vb and fixed a bunch of bugs in slice2cs.
Diffstat (limited to 'cpp/src/Slice/Preprocessor.cpp')
-rw-r--r--cpp/src/Slice/Preprocessor.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp
index 1a6b716fe55..01b8fb19aa4 100644
--- a/cpp/src/Slice/Preprocessor.cpp
+++ b/cpp/src/Slice/Preprocessor.cpp
@@ -230,6 +230,37 @@ Slice::Preprocessor::printMakefileDependencies(Language lang)
}
break;
}
+ case VisualBasic:
+ {
+ //
+ // Change .cpp suffix to .vb suffix.
+ //
+ char buf[1024];
+ while(fgets(buf, sizeof(buf), cppHandle) != NULL)
+ {
+ char* dot;
+ char* colon = strchr(buf, ':');
+ if(colon != NULL)
+ {
+ *colon = '\0';
+ dot = strrchr(buf, '.');
+ *colon = ':';
+ if(dot != NULL)
+ {
+ if(strncmp(dot, ".cpp:", 5) == 0)
+ {
+ *dot = '\0';
+ fputs(buf, stdout);
+ fputs(".vb", stdout);
+ fputs(colon, stdout);
+ continue;
+ }
+ }
+ }
+ fputs(buf, stdout);
+ }
+ break;
+ }
default:
{
abort();