[BACK]Return to test-strsep.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

File: [cvsweb.bsd.lv] / mandoc / test-strsep.c (download)

Revision 1.1, Tue Dec 31 23:03:47 2013 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3, VERSION_1_13_2, VERSION_1_13_1, VERSION_1_12_4, VERSION_1_12

Provide strcasestr(3) and strsep(3) for Solaris 10 compat;
reported missing by Matthias Scheler <tron at NetBSD> via wiz@.

#include <string.h>

int
main(void)
{
	char buf[6] = "aybxc";
	char *workp = buf;
	char *retp = strsep(&workp, "xy");
	return( ! (retp == buf && '\0' == buf[1] && buf + 2 == workp));
}