Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 2014 20:09:23 +0000 (UTC)
From:      "Simon J. Gerraty" <sjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262749 - head/usr.sbin/makefs
Message-ID:  <201403042009.s24K9NQO086852@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sjg
Date: Tue Mar  4 20:09:23 2014
New Revision: 262749
URL: http://svnweb.freebsd.org/changeset/base/262749

Log:
  Allow comments at end of line.
  
  Reviewed by: marcel

Modified:
  head/usr.sbin/makefs/mtree.c

Modified: head/usr.sbin/makefs/mtree.c
==============================================================================
--- head/usr.sbin/makefs/mtree.c	Tue Mar  4 20:07:36 2014	(r262748)
+++ head/usr.sbin/makefs/mtree.c	Tue Mar  4 20:09:23 2014	(r262749)
@@ -348,6 +348,13 @@ read_word(FILE *fp, char *buf, size_t bu
 			if (error == -1)
 				mtree_error("unexpected end of file");
 			return (error);
+		case '#':		/* comment -- skip to end of line. */
+			if (!esc) {
+				error = skip_to(fp, "\n");
+				if (!error)
+					continue;
+			}
+			break;
 		case '\\':
 			esc++;
 			if (esc == 1)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403042009.s24K9NQO086852>