-/* $Id: mandoc.c,v 1.46 2011/04/09 15:35:30 kristaps Exp $ */
+/* $Id: mandoc.c,v 1.48 2011/04/19 16:38:48 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
return(++i);
}
-/*
- * Handle an escaped sequeence. This should be called with any
- * string subsequent a `\'. Pass a pointer to this substring as "end";
- * it will be set to the supremum of the parsed escape sequence. If
- * this returns ESCAPE_ERROR, the string is bogus and should be thrown
- * away. If not ESCAPE_ERROR or ESCAPE_IGNORE, "start" is set to the
- * first relevant character of the substring (font, glyph, whatever) of
- * length sz. Both "start" and "sz" may be NULL.
- */
enum mandoc_esc
mandoc_escape(const char **end, const char **start, int *sz)
{
/* Quoting can only start with a new word. */
start = *cpp;
+ quoted = 0;
if ('"' == *start) {
quoted = 1;
start++;
- } else
- quoted = 0;
+ }
pairs = 0;
white = 0;