/*====================================================================*
*
* void scanblock (SCAN * content, const char *literal);
*
* collect input characters until an inverted pair is detected; the
* pair is specified in reverse order;
*
* this method collects text between inverted delimiter pairs like:
*
* "{* ... *}" or "-- ... --"
*
*. Motley Tools by Charles Maier <cmaier@cmassoc.net>;
*: Published 2001-2006 by Charles Maier Associates Limited;
*; Released under the GNU General Public Licence v2 and later;
*
*--------------------------------------------------------------------*/
#ifndef SCANBLOCK_SOURCE
#define SCANBLOCK_SOURCE
#include "../scan/scan.h"
void scanblock (SCAN * content, const char *literal)
{
while ((content->final < content->limit) && (*content->final != *literal))
{
literal++;
scanuntil (content, literal);
scanbreak (content, literal);
literal--;
}
nextbreak (content);
return;
}
#endif