xref: /csrg-svn/usr.bin/f77/libF77/Usef.c (revision 47940)
1*47940Sbostic /*-
2*47940Sbostic  * Copyright (c) 1980 The Regents of the University of California.
3*47940Sbostic  * All rights reserved.
424102Sjerry  *
5*47940Sbostic  * %sccs.include.proprietary.c%
624102Sjerry  */
724102Sjerry 
8*47940Sbostic #ifndef lint
9*47940Sbostic char copyright[] =
10*47940Sbostic "@(#) Copyright (c) 1980 The Regents of the University of California.\n\
11*47940Sbostic  All rights reserved.\n";
12*47940Sbostic #endif /* not lint */
13*47940Sbostic 
14*47940Sbostic #ifndef lint
15*47940Sbostic static char sccsid[] = "@(#)Usef.c	1.5 (Berkeley) 04/12/91";
16*47940Sbostic #endif /* not lint */
17*47940Sbostic 
1824102Sjerry /*		returns '-f' if need to use -f to bypass C bug		*/
1924102Sjerry 
2024102Sjerry static char *needs_f[] = {
2124102Sjerry 	"besj0_", "besj1_", "besjn_", "besy0_", "besy1_", "besyn_",
2224102Sjerry 	"c_abs", "erf_", "erfc_", "r_abs", "r_acos", "r_asin",
2324102Sjerry 	"r_atan", "r_atn2", "r_cos", "r_cosh", "r_exp", "r_imag",
2424102Sjerry 	"r_int", "r_lg10", "r_log", "r_sign", "r_sin",
2524102Sjerry 	"r_sinh", "r_sqrt", "r_tan", "r_tanh", "rand_", "random_",
2624102Sjerry 	0,
2724102Sjerry 	};
2824102Sjerry 
main(argc,argv)2924102Sjerry main(argc, argv)
3024102Sjerry int argc;
3124102Sjerry char **argv;
3224102Sjerry {
3324102Sjerry 	char **ptr;
3440227Sdonn 	float f;
3524102Sjerry 
3640227Sdonn 	if (sizeof (f + f) != sizeof f)
3740227Sdonn 	{
3840227Sdonn 		argv++;
3940227Sdonn 		ptr = needs_f;
4040227Sdonn 		while( *ptr != 0 ) {
4140227Sdonn 			if( strcmp( *ptr++, *argv ) == 0 )
4240227Sdonn 			{
4340227Sdonn 				printf("-f");
4440227Sdonn 				exit(0);
4540227Sdonn 			}
4624102Sjerry 		}
4724102Sjerry 	}
4824102Sjerry 	printf(" ");
4924102Sjerry 	exit(0);
5024102Sjerry }
51