19512fe8ahl/*
29512fe8ahl * CDDL HEADER START
39512fe8ahl *
49512fe8ahl * The contents of this file are subject to the terms of the
59512fe8ahl * Common Development and Distribution License (the "License").
69512fe8ahl * You may not use this file except in compliance with the License.
79512fe8ahl *
89512fe8ahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99512fe8ahl * or http://www.opensolaris.org/os/licensing.
109512fe8ahl * See the License for the specific language governing permissions
119512fe8ahl * and limitations under the License.
129512fe8ahl *
139512fe8ahl * When distributing Covered Code, include this CDDL HEADER in each
149512fe8ahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
159512fe8ahl * If applicable, add the following below this CDDL HEADER, with the
169512fe8ahl * fields enclosed by brackets "[]" replaced with your own identifying
179512fe8ahl * information: Portions Copyright [yyyy] [name of copyright owner]
189512fe8ahl *
199512fe8ahl * CDDL HEADER END
209512fe8ahl */
219512fe8ahl
229512fe8ahl/*
239512fe8ahl * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
249512fe8ahl * Use is subject to license terms.
259512fe8ahl */
269512fe8ahl
279512fe8ahl#pragma ident	"%Z%%M%	%I%	%E% SMI"
289512fe8ahl
299512fe8ahl#pragma D option quiet
309512fe8ahl
319512fe8ahlBEGIN
329512fe8ahl{
339512fe8ahl	str = "fooeyfooeyfoo";
349512fe8ahl	this->success = 0;
359512fe8ahl
369512fe8ahl	c = 'f';
379512fe8ahl	printf("strchr(\"%s\", '%c') = \"%s\"\n", str, c, strchr(str, c));
389512fe8ahl	printf("strrchr(\"%s\", '%c') = \"%s\"\n", str, c, strrchr(str, c));
399512fe8ahl
409512fe8ahl	c = 'y';
419512fe8ahl	printf("strchr(\"%s\", '%c') = \"%s\"\n", str, c, strchr(str, c));
429512fe8ahl	printf("strrchr(\"%s\", '%c') = \"%s\"\n", str, c, strrchr(str, c));
439512fe8ahl
449512fe8ahl	printf("strrchr(\"%s\", '%c') = \"%s\"\n", strchr(str, c), c,
459512fe8ahl	    strrchr(strchr(str, c), c));
469512fe8ahl
479512fe8ahl	this->success = 1;
489512fe8ahl}
499512fe8ahl
509512fe8ahlBEGIN
519512fe8ahl/!this->success/
529512fe8ahl{
539512fe8ahl	exit(1);
549512fe8ahl}
559512fe8ahl
569512fe8ahlBEGIN
579512fe8ahl/strchr(str, 'a') != NULL/
589512fe8ahl{
599512fe8ahl	exit(2);
609512fe8ahl}
619512fe8ahl
629512fe8ahlBEGIN
639512fe8ahl/strrchr(str, 'a') != NULL/
649512fe8ahl{
659512fe8ahl	exit(3);
669512fe8ahl}
679512fe8ahl
689512fe8ahlBEGIN
699512fe8ahl{
709512fe8ahl	exit(0);
719512fe8ahl}
72