From eaa25c83e3b742b52c07a033bfbcbe97af7a7cf7 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Fri, 7 Mar 2003 18:28:28 +0000
Subject: [PATCH] Don't append the ".geo" extension anymore if the file name is
 not recognized.

---
 Parser/OpenFile.cpp    | 10 ++++++++--
 tutorial/README        |  4 +---
 tutorial/tutorial.html |  4 +---
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/Parser/OpenFile.cpp b/Parser/OpenFile.cpp
index 5f65317ec5..d311fa970a 100644
--- a/Parser/OpenFile.cpp
+++ b/Parser/OpenFile.cpp
@@ -1,4 +1,4 @@
-// $Id: OpenFile.cpp,v 1.42 2003-03-01 22:36:42 geuzaine Exp $
+// $Id: OpenFile.cpp,v 1.43 2003-03-07 18:28:28 geuzaine Exp $
 //
 // Copyright (C) 1997 - 2003 C. Geuzaine, J.-F. Remacle
 //
@@ -180,17 +180,23 @@ void OpenProblem(char *name)
   else {
     strcpy(ext, "");
   }
+
   if(!strcmp(ext, ".geo") || !strcmp(ext, ".GEO") ||
      !strcmp(ext, ".msh") || !strcmp(ext, ".MSH") ||
      !strcmp(ext, ".stl") || !strcmp(ext, ".STL") ||
      !strcmp(ext, ".sms") || !strcmp(ext, ".SMS") ||
-     !strcmp(ext, ".ppm") || !strcmp(ext, ".pnm") ||
+     !strcmp(ext, ".ppm") || !strcmp(ext, ".PPM") ||
+     !strcmp(ext, ".pnm") || !strcmp(ext, ".PNM") ||
      !strcmp(ext, ".pos") || !strcmp(ext, ".POS")) {
     CTX.base_filename[strlen(name) - 4] = '\0';
   }
+  /* Let's just remove this. It causes more confusion than anything
+     else, and entering the complete file name isn't such big a
+     deal.
   else {
     strcat(CTX.filename, ".geo");
   }
+  */
 
   strncpy(THEM->name, CTX.base_filename, 255);
 
diff --git a/tutorial/README b/tutorial/README
index 4f9140a78b..9203cf2caf 100644
--- a/tutorial/README
+++ b/tutorial/README
@@ -1,4 +1,4 @@
-$Id: README,v 1.19 2003-03-07 07:32:56 geuzaine Exp $
+$Id: README,v 1.20 2003-03-07 18:28:28 geuzaine Exp $
 
 Here are the examples in the Gmsh tutorial. These examples are
 commented (both C and C++-style comments can be used in Gmsh input
@@ -42,8 +42,6 @@ example with:
 
 > gmsh t1.geo
 
-[NOTE: The '.geo' extension can also be omitted.]
-
 [NOTE: Even if it is often handy to define the variables and the
 points directly in the input files (you may use any text editor for
 this purpose, e.g. Wordpad on Windows, or Emacs on Unix), it is almost
diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html
index 325e3b5f9a..d8a56561a5 100644
--- a/tutorial/tutorial.html
+++ b/tutorial/tutorial.html
@@ -23,7 +23,7 @@
 <H1>README 1/10</H1>
 [<A HREF="#top">top</A>][prev][<A HREF="#file2">next</A>]
 <PRE>
-$Id: tutorial.html,v 1.40 2003-03-07 07:33:18 geuzaine Exp $
+$Id: tutorial.html,v 1.41 2003-03-07 18:28:28 geuzaine Exp $
 
 Here are the examples in the Gmsh tutorial. These examples are
 commented (both C and C++-style comments can be used in Gmsh input
@@ -67,8 +67,6 @@ example with:
 
 &gt; gmsh t1.geo
 
-[NOTE: The '.geo' extension can also be omitted.]
-
 [NOTE: Even if it is often handy to define the variables and the
 points directly in the input files (you may use any text editor for
 this purpose, e.g. Wordpad on Windows, or Emacs on Unix), it is almost
-- 
GitLab