Allow comment lines in input files.
authorSimon Schubert <corecode@dragonflybsd.org>
Sat, 8 Sep 2007 01:29:14 +0000 (01:29 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Sat, 8 Sep 2007 01:29:14 +0000 (01:29 +0000)
games/quiz/quiz.c

index 50117f3..3b52b87 100644 (file)
@@ -37,7 +37,7 @@
  * @(#) Copyright (c) 1991, 1993 The Regents of the University of California.  All rights reserved.
  * @(#)quiz.c  8.3 (Berkeley) 5/4/95
  * $FreeBSD: src/games/quiz/quiz.c,v 1.12 1999/12/12 02:29:54 billf Exp $
- * $DragonFly: src/games/quiz/quiz.c,v 1.5 2005/04/25 16:10:24 liamfoy Exp $
+ * $DragonFly: src/games/quiz/quiz.c,v 1.6 2007/09/08 01:29:14 corecode Exp $
  */
 
 #include <sys/types.h>
@@ -128,6 +128,8 @@ get_file(const char *file)
        qp = &qlist;
        qsize = 0;
        while ((lp = fgetln(fp, &len)) != NULL) {
+               if (lp[0] == '#')
+                       continue;
                if (qp->q_text && qp->q_text[strlen(qp->q_text) - 1] == '\\')
                        qp->q_text = appdstr(qp->q_text, lp, len);
                else {