[chocolate-doom] 23/31: Ignore comments in dehacked files.

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:07:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.1.1
in repository chocolate-doom.

commit 7e57759e2e8626538c7712ae59339db03e174539
Author: Simon Howard <fraggle at gmail.com>
Date:   Mon Oct 17 21:14:31 2005 +0000

    Ignore comments in dehacked files.
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 210
---
 src/deh_main.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/deh_main.c b/src/deh_main.c
index 0f252b7..0782d9f 100644
--- a/src/deh_main.c
+++ b/src/deh_main.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: deh_main.c 182 2005-10-09 20:06:50Z fraggle $
+// $Id: deh_main.c 210 2005-10-17 21:14:31Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -21,6 +21,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.7  2005/10/17 21:14:31  fraggle
+// Ignore comments in dehacked files.
+//
 // Revision 1.6  2005/10/09 20:06:50  fraggle
 // Check the header of dehacked files and make sure we only load valid
 // dehacked files.
@@ -246,6 +249,16 @@ static void DEH_ParseContext(deh_context_t *context)
         if (line == NULL)
             return;
 
+        while (line[0] != '\0' && isspace(line[0]))
+            ++line;
+
+        if (line[0] == '#')
+        {
+            // comment
+
+            continue;
+        }
+
         if (IsWhitespace(line))
         {
             if (current_section != NULL)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list