Added support for empty or null typemaps.

This commit is contained in:
the_fiddler 2009-08-11 15:33:17 +00:00
parent a08edd47fc
commit be52c2776b
3 changed files with 7 additions and 1 deletions

View file

@ -15,7 +15,7 @@ namespace Bind.CL
if (String.IsNullOrEmpty(name)) if (String.IsNullOrEmpty(name))
throw new ArgumentNullException("name"); throw new ArgumentNullException("name");
glTypemap = "GL2/gl.tm"; glTypemap = null;
csTypemap = "csharp.tm"; csTypemap = "csharp.tm";
enumSpec = name + "/signatures.xml"; enumSpec = name + "/signatures.xml";

View file

@ -314,6 +314,9 @@ namespace Bind.GL2
Console.WriteLine("Reading opengl types."); Console.WriteLine("Reading opengl types.");
Dictionary<string, string> GLTypes = new Dictionary<string, string>(); Dictionary<string, string> GLTypes = new Dictionary<string, string>();
if (specFile == null)
return GLTypes;
do do
{ {
string line = specFile.ReadLine(); string line = specFile.ReadLine();

View file

@ -76,6 +76,9 @@ namespace Bind
internal static StreamReader OpenSpecFile(string folder, string file) internal static StreamReader OpenSpecFile(string folder, string file)
{ {
if (String.IsNullOrEmpty(folder) || String.IsNullOrEmpty(file))
return null;
Console.WriteLine(folder); Console.WriteLine(folder);
Console.WriteLine(file); Console.WriteLine(file);
string path = Path.Combine(folder, file); string path = Path.Combine(folder, file);