Allow `%' to be written out with an octal escape (\45 or \045).

PR:		39116
Submitted by:	Egil Brendsdal <egilb@ife.no>
MFC after:	1 week
This commit is contained in:
Tim J. Robbins 2002-06-19 08:16:14 +00:00
parent 7e949b63e4
commit 37fd459046
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98419

View File

@ -376,7 +376,11 @@ escape(fmt)
value += *fmt - '0';
}
--fmt;
*store = value;
if (value == '%') {
*store++ = '%';
*store = '%';
} else
*store = value;
break;
default:
*store = *fmt;