source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Use mandoc_getarg() for the regular case of processing unquoted
@ 2011-04-17  9:13 kristaps
  0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-04-17  9:13 UTC (permalink / raw)
  To: source

Log Message:
-----------
Use mandoc_getarg() for the regular case of processing unquoted
arguments in -mdoc documents.

Modified Files:
--------------
    mdocml:
        mdoc_argv.c

Revision Data
-------------
Index: mdoc_argv.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_argv.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -Lmdoc_argv.c -Lmdoc_argv.c -u -p -r1.74 -r1.75
--- mdoc_argv.c
+++ mdoc_argv.c
@@ -568,25 +568,9 @@ args(struct mdoc *m, int line, int *pos,
 		return(ARGS_QWORD);
 	}
 
-	/* 
-	 * A non-quoted term progresses until either the end of line or
-	 * a non-escaped whitespace.
-	 */
-
-	for ( ; buf[*pos]; (*pos)++)
-		if (*pos && ' ' == buf[*pos] && '\\' != buf[*pos - 1])
-			break;
-
-	if ('\0' == buf[*pos])
-		return(ARGS_WORD);
-
-	buf[(*pos)++] = '\0';
-
-	while (' ' == buf[*pos])
-		(*pos)++;
-
-	if ('\0' == buf[*pos] && ! (ARGS_NOWARN & fl))
-		mdoc_pmsg(m, line, *pos, MANDOCERR_EOLNSPACE);
+	p = &buf[*pos];
+	*v = mandoc_getarg(m->parse, &p, line, 
+			! (ARGS_NOWARN & fl), pos);
 
 	return(ARGS_WORD);
 }
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-17  9:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-17  9:13 mdocml: Use mandoc_getarg() for the regular case of processing unquoted kristaps

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).