summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2007-08-20 16:32:26 -0700
committerMark Spruiell <mes@zeroc.com>2007-08-20 16:32:26 -0700
commit8b85a8591b905af4d64665f0c0e7b658539ab11c (patch)
treea2dfb185138a6b50fb47ec1990406a6f3230b112
parentFixed comments and also ignore socket exception with thread per connection (diff)
downloadice-8b85a8591b905af4d64665f0c0e7b658539ab11c.tar.bz2
ice-8b85a8591b905af4d64665f0c0e7b658539ab11c.tar.xz
ice-8b85a8591b905af4d64665f0c0e7b658539ab11c.zip
bug 1597: minor cleanup in makeprops
-rw-r--r--cpp/config/makeprops.py41
-rw-r--r--cpp/src/Ice/PropertyNames.cpp2
-rw-r--r--cpp/src/Ice/PropertyNames.h2
-rw-r--r--cs/src/Ice/PropertyNames.cs4
-rw-r--r--java/src/IceInternal/PropertyNames.java11
5 files changed, 24 insertions, 36 deletions
diff --git a/cpp/config/makeprops.py b/cpp/config/makeprops.py
index c66ead4588a..5933fd2cb37 100644
--- a/cpp/config/makeprops.py
+++ b/cpp/config/makeprops.py
@@ -391,23 +391,21 @@ class JavaPropertyHandler(PropertyHandler):
self.srcFile.write(javaPreamble % {'inputfile' : self.inputfile, 'classname' : self.className})
def closeFiles(self):
- self.srcFile.write("\n public static final Property[] validProps[] = \n" % \
- {'classname' : self.className})
+ self.srcFile.write("\n public static final Property[] validProps[] =\n")
self.srcFile.write(" {\n")
for s in self.sections:
self.srcFile.write(" %sProps,\n" % s)
self.srcFile.write(" null\n")
- self.srcFile.write(" };\n\n")
+ self.srcFile.write(" };\n")
- self.srcFile.write("\n public static final String clPropNames[] =\n" % \
- {'classname' : self.className})
+ self.srcFile.write("\n public static final String clPropNames[] =\n")
self.srcFile.write(" {\n")
for s in self.cmdLineOptions:
self.srcFile.write(" \"%s\",\n" % s)
self.srcFile.write(" null\n")
- self.srcFile.write(" };\n\n")
- self.srcFile.write("};\n\n")
+ self.srcFile.write(" };\n")
+ self.srcFile.write("}\n")
self.srcFile.close()
def fix(self, propertyName):
@@ -460,8 +458,7 @@ class CSPropertyHandler(PropertyHandler):
self.srcFile.write(csPreamble % {'inputfile' : self.inputfile, 'classname' : self.className})
def closeFiles(self):
- self.srcFile.write(" public static Property[][] validProps = \n" % \
- {'classname' : self.className})
+ self.srcFile.write(" public static Property[][] validProps =\n")
self.srcFile.write(" {\n")
for s in self.sections:
@@ -469,8 +466,7 @@ class CSPropertyHandler(PropertyHandler):
self.srcFile.write(" null\n")
self.srcFile.write(" };\n\n")
- self.srcFile.write(" public static string[] clPropNames =\n" % \
- {'classname' : self.className})
+ self.srcFile.write(" public static string[] clPropNames =\n")
self.srcFile.write(" {\n")
for s in self.cmdLineOptions:
self.srcFile.write(" \"%s\",\n" % s)
@@ -567,24 +563,19 @@ def main():
infile = None
lang = None
- toplevel = '..'
#
- # TODO: Why does determining the top level directory depend on which
- # arguments are used?
+ # Find the root of the tree.
#
- if len(sys.argv) == 1:
- #
- # Find where the root of the tree is.
- #
- for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
- toplevel = os.path.normpath(toplevel)
- if os.path.exists(os.path.join(toplevel, "config", "makeprops.py")):
- break
- else:
- progError("cannot find top-level directory")
- sys.exit(1)
+ for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
+ toplevel = os.path.normpath(toplevel)
+ if os.path.exists(os.path.join(toplevel, "config", "makeprops.py")):
+ break
+ else:
+ progError("cannot find top-level directory")
+ sys.exit(1)
+ if len(sys.argv) == 1:
infile = os.path.join(toplevel, "config", "PropertyNames.xml")
else:
option = sys.argv[1]
diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp
index 221ce52fc09..ab98aceb620 100644
--- a/cpp/src/Ice/PropertyNames.cpp
+++ b/cpp/src/Ice/PropertyNames.cpp
@@ -7,7 +7,7 @@
//
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Jul 9 14:48:13 2007
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Aug 20 15:53:16 2007
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h
index 916310fa30e..a6c99f032d2 100644
--- a/cpp/src/Ice/PropertyNames.h
+++ b/cpp/src/Ice/PropertyNames.h
@@ -7,7 +7,7 @@
//
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Jul 9 14:48:13 2007
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Aug 20 15:53:16 2007
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
diff --git a/cs/src/Ice/PropertyNames.cs b/cs/src/Ice/PropertyNames.cs
index 9bb36915e12..5ef988cc85e 100644
--- a/cs/src/Ice/PropertyNames.cs
+++ b/cs/src/Ice/PropertyNames.cs
@@ -7,7 +7,7 @@
//
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Jul 9 14:48:13 2007
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Aug 20 15:53:16 2007
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -538,7 +538,7 @@ namespace IceInternal
null
};
- public static Property[][] validProps =
+ public static Property[][] validProps =
{
IceProps,
IceBoxProps,
diff --git a/java/src/IceInternal/PropertyNames.java b/java/src/IceInternal/PropertyNames.java
index 2a05c10d03e..5bfed278b61 100644
--- a/java/src/IceInternal/PropertyNames.java
+++ b/java/src/IceInternal/PropertyNames.java
@@ -7,7 +7,7 @@
//
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Jul 9 14:48:13 2007
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Aug 20 15:53:16 2007
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -539,7 +539,7 @@ public final class PropertyNames
};
- public static final Property[] validProps[] =
+ public static final Property[] validProps[] =
{
IceProps,
IceBoxProps,
@@ -554,8 +554,7 @@ public final class PropertyNames
null
};
-
- public static final String clPropNames[] =
+ public static final String clPropNames[] =
{
"Ice",
"IceBox",
@@ -569,6 +568,4 @@ public final class PropertyNames
"Freeze",
null
};
-
-};
-
+}