From 9a974263e4331c125e101c5c2b8ef7ab0c2c8722 Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: Wed, 9 Mar 2016 19:56:49 +0100
Subject: [PATCH] LwipMibCompiler: preserve upper case in comments

---
 src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs              | 4 ++--
 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs       | 4 ++--
 .../LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs     | 2 +-
 .../snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs     | 2 +-
 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs  | 4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs
index ebc07b6..8ba0173 100644
--- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs
+++ b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs
@@ -215,7 +215,7 @@ namespace LwipMibCompiler
 		private static SnmpTreeNode GenerateSnmpTreeNode(MibTreeNode mibTreeNode, SnmpTreeNode parentNode)
 		{
 			SnmpTreeNode result = new SnmpTreeNode(parentNode);
-			result.Name    = _alphaNumericRegex.Replace(mibTreeNode.Entity.Name, "").ToLowerInvariant();
+			result.Name    = _alphaNumericRegex.Replace (mibTreeNode.Entity.Name, "");
 			result.Oid     = mibTreeNode.Entity.Value;
 			result.FullOid = MibTypesResolver.ResolveOid(mibTreeNode.Entity).GetOidString();
 
@@ -337,7 +337,7 @@ namespace LwipMibCompiler
 				}
 			}
 
-			result.Name = _alphaNumericRegex.Replace(ote.Name, "").ToLowerInvariant();
+			result.Name = _alphaNumericRegex.Replace(ote.Name, "");
 			result.Oid  = ote.Value;
 
 			if (ote.Access == MaxAccess.readWrite)
diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs
index e54aa34..f113b24 100644
--- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs
+++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs
@@ -53,7 +53,7 @@ namespace LwipSnmpCodeGeneration
 
 		public override string FullNodeName
 		{
-			get { return this.Name + "_root"; }
+			get { return this.Name.ToLowerInvariant() + "_root"; }
 		}
 
 		public override void GenerateCode(MibCFile mibFile)
@@ -73,7 +73,7 @@ namespace LwipSnmpCodeGeneration
 			boidInitialization.Append("}");
 
 			VariableDeclaration boidDecl = new VariableDeclaration(
-				new VariableType(this.Name + "_base_oid", LwipDefs.Vt_U32, null, ConstType.Value, String.Empty),
+				new VariableType(this.Name.ToLowerInvariant() + "_base_oid", LwipDefs.Vt_U32, null, ConstType.Value, String.Empty),
 				boidInitialization.ToString(), true);
 
 			mibFile.Declarations.Add(boidDecl);
diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs
index 3d66492..086fbb9 100644
--- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs
+++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs
@@ -49,7 +49,7 @@ namespace LwipSnmpCodeGeneration
 
 		public override string FullNodeName
 		{
-			get { return this.Name + "_scalars"; }
+			get { return this.Name.ToLowerInvariant() + "_scalars"; }
 		}
 
 		protected override IEnumerable<SnmpScalarNode> AggregatedScalarNodes
diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs
index c37af46..3298ae9 100644
--- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs
+++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs
@@ -57,7 +57,7 @@ namespace LwipSnmpCodeGeneration
 
 		public override string FullNodeName
 		{
-			get { return this.Name + "_scalar"; }
+			get { return this.Name.ToLowerInvariant() + "_scalar"; }
 		}
 
 		public SnmpDataType DataType
diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs
index 52046b6..b7dbbc7 100644
--- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs
+++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs
@@ -50,7 +50,7 @@ namespace LwipSnmpCodeGeneration
 
 		public override string FullNodeName
 		{
-			get { return this.Name + "_treenode"; }
+			get { return this.Name.ToLowerInvariant() + "_treenode"; }
 		}
 
 		public string FullOid
@@ -119,7 +119,7 @@ namespace LwipSnmpCodeGeneration
 				}
 
 				VariableDeclaration subnodeArray = new VariableDeclaration(
-					new VariableType(this.Name + "_subnodes", LwipDefs.Vt_StNode, "*", ConstType.Both, String.Empty),
+					new VariableType(this.Name.ToLowerInvariant() + "_subnodes", LwipDefs.Vt_StNode, "*", ConstType.Both, String.Empty),
 					"{\n" + subnodeArrayInitialization + "\n}",
 					isStatic: true);
 
-- 
2.4.10

