diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2012-06-12 20:21:04 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2012-06-12 20:21:04 +0000 |
commit | 998c9d785cfa1c8ef5531ee3fdfdf08d5b048264 (patch) | |
tree | 4c4a73bfd8209c2ac1c13746a548c2ce4e274b94 /mandoc.c | |
parent | 9dc9bb2f44e3a94b8adc881ca071f6b8aaeae019 (diff) | |
download | mandoc-998c9d785cfa1c8ef5531ee3fdfdf08d5b048264.tar.gz |
Add `cc' support.
This was reported by espie@ and in the TODO.
Caveat: `cc' has buggy behaviour when invoked in groff(1) and followed
by a line-breaking control character macro, e.g., in a -man doc,
.cc |
.B foo
'B foo
|cc
'B foo
will cause groff(1) to behave properly for `.B' but inline the macro
definition for `B' when invoked with the line-breaking macro.
Diffstat (limited to 'mandoc.c')
-rw-r--r-- | mandoc.c | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -604,32 +604,6 @@ mandoc_eos(const char *p, size_t sz, int enclosed) } /* - * Find out whether a line is a macro line or not. If it is, adjust the - * current position and return one; if it isn't, return zero and don't - * change the current position. - */ -int -mandoc_getcontrol(const char *cp, int *ppos) -{ - int pos; - - pos = *ppos; - - if ('\\' == cp[pos] && '.' == cp[pos + 1]) - pos += 2; - else if ('.' == cp[pos] || '\'' == cp[pos]) - pos++; - else - return(0); - - while (' ' == cp[pos] || '\t' == cp[pos]) - pos++; - - *ppos = pos; - return(1); -} - -/* * Convert a string to a long that may not be <0. * If the string is invalid, or is less than 0, return -1. */ |