159290Sjlemon/*
272969Sjlemon * CDDL HEADER START
359290Sjlemon *
459290Sjlemon * The contents of this file are subject to the terms of the
559290Sjlemon * Common Development and Distribution License (the "License").
659290Sjlemon * You may not use this file except in compliance with the License.
759290Sjlemon *
859290Sjlemon * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
959290Sjlemon * or http://www.opensolaris.org/os/licensing.
1059290Sjlemon * See the License for the specific language governing permissions
1159290Sjlemon * and limitations under the License.
1259290Sjlemon *
1359290Sjlemon * When distributing Covered Code, include this CDDL HEADER in each
1459290Sjlemon * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1559290Sjlemon * If applicable, add the following below this CDDL HEADER, with the
1659290Sjlemon * fields enclosed by brackets "[]" replaced with your own identifying
1759290Sjlemon * information: Portions Copyright [yyyy] [name of copyright owner]
1859290Sjlemon *
1959290Sjlemon * CDDL HEADER END
2059290Sjlemon */
2159290Sjlemon
2259290Sjlemon/*
2359290Sjlemon * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2459290Sjlemon * Use is subject to license terms.
2559290Sjlemon */
2699090Sbde
2759290Sjlemon#pragma ident	"%Z%%M%	%I%	%E% SMI"
2859290Sjlemon
2959290Sjlemon#pragma D option quiet
3059290Sjlemon
3159290SjlemonBEGIN
3259290Sjlemon{
3359290Sjlemon	str = "fooeyfooeyfoo";
3459290Sjlemon	this->success = 0;
3559290Sjlemon
3659290Sjlemon	c = 'f';
3759290Sjlemon	printf("strchr(\"%s\", '%c') = \"%s\"\n", str, c, strchr(str, c));
3879989Sjlemon	printf("strrchr(\"%s\", '%c') = \"%s\"\n", str, c, strrchr(str, c));
3984139Sjlemon
4059290Sjlemon	c = 'y';
4184139Sjlemon	printf("strchr(\"%s\", '%c') = \"%s\"\n", str, c, strchr(str, c));
4259290Sjlemon	printf("strrchr(\"%s\", '%c') = \"%s\"\n", str, c, strrchr(str, c));
43110241Snectar
44110241Snectar	printf("strrchr(\"%s\", '%c') = \"%s\"\n", strchr(str, c), c,
4572969Sjlemon	    strrchr(strchr(str, c), c));
4672969Sjlemon
4772969Sjlemon	this->success = 1;
4872969Sjlemon}
4972969Sjlemon
5072969SjlemonBEGIN
5172969Sjlemon/!this->success/
5272969Sjlemon{
5359290Sjlemon	exit(1);
5459309Sjlemon}
5559290Sjlemon
5659290SjlemonBEGIN
5759290Sjlemon/strchr(str, 'a') != NULL/
5859309Sjlemon{
5959290Sjlemon	exit(2);
6059290Sjlemon}
6159290Sjlemon
6259290SjlemonBEGIN
6359290Sjlemon/strrchr(str, 'a') != NULL/
6459290Sjlemon{
6559290Sjlemon	exit(3);
6659290Sjlemon}
6759290Sjlemon
6859290SjlemonBEGIN
6959290Sjlemon{
7059290Sjlemon	exit(0);
7159290Sjlemon}
7259290Sjlemon