From bb6704d1c4fdc6358c9fb38b4b97a01baf64804e Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Sat, 8 Sep 2007 01:29:14 +0000 Subject: [PATCH] Allow comment lines in input files. --- games/quiz/quiz.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/games/quiz/quiz.c b/games/quiz/quiz.c index 50117f316f..3b52b874e2 100644 --- a/games/quiz/quiz.c +++ b/games/quiz/quiz.c @@ -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 @@ -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 { -- 2.41.0