123b5c241Stomee /* 223b5c241Stomee * CDDL HEADER START 323b5c241Stomee * 423b5c241Stomee * The contents of this file are subject to the terms of the 523b5c241Stomee * Common Development and Distribution License (the "License"). 623b5c241Stomee * You may not use this file except in compliance with the License. 723b5c241Stomee * 823b5c241Stomee * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 923b5c241Stomee * or http://www.opensolaris.org/os/licensing. 1023b5c241Stomee * See the License for the specific language governing permissions 1123b5c241Stomee * and limitations under the License. 1223b5c241Stomee * 1323b5c241Stomee * When distributing Covered Code, include this CDDL HEADER in each 1423b5c241Stomee * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1523b5c241Stomee * If applicable, add the following below this CDDL HEADER, with the 1623b5c241Stomee * fields enclosed by brackets "[]" replaced with your own identifying 1723b5c241Stomee * information: Portions Copyright [yyyy] [name of copyright owner] 1823b5c241Stomee * 1923b5c241Stomee * CDDL HEADER END 2023b5c241Stomee */ 2123b5c241Stomee 2223b5c241Stomee /* 23*73427c57Sahl * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 2423b5c241Stomee * Use is subject to license terms. 2523b5c241Stomee */ 2623b5c241Stomee 2723b5c241Stomee #include <stdio.h> 2823b5c241Stomee 2923b5c241Stomee typedef void f(int x); 3023b5c241Stomee 3123b5c241Stomee static void f1(int i)3223b5c241Stomeef1(int i) 3323b5c241Stomee { 3423b5c241Stomee printf("%d\n", i); 3523b5c241Stomee } 3623b5c241Stomee 3723b5c241Stomee static void f2(f func,int i)3823b5c241Stomeef2(f func, int i) 3923b5c241Stomee { 4023b5c241Stomee func(i); 4123b5c241Stomee } 4223b5c241Stomee 4323b5c241Stomee int main()4423b5c241Stomeemain() 4523b5c241Stomee { 4623b5c241Stomee f2(f1, 3); 47*73427c57Sahl 48*73427c57Sahl return (0); 4923b5c241Stomee } 50