This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Spelling - megapatch
[metaconfig.git] / U / compline / sunscanf.U
1 ?RCS: $Id: sunscanf.U,v 3.0 1993/08/18 12:09:54 ram Exp $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
4 ?RCS:
5 ?RCS: You may redistribute only under the terms of the Artistic License,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
10 ?RCS:
11 ?RCS: $Log: sunscanf.U,v $
12 ?RCS: Revision 3.0  1993/08/18  12:09:54  ram
13 ?RCS: Baseline for dist 3.0 netwide release.
14 ?RCS:
15 ?MAKE:sunscanf: cat rm Compile Myread test Setvar
16 ?MAKE:  -pick add $@ %<
17 ?S:sunscanf:
18 ?S:     This variable is set if this system runs with the Sun version
19 ?S:     of scanf.
20 ?S:.
21 ?C:SUNSCANF:
22 ?C:     This variable is set if this system runs with the Sun version
23 ?C:     of scanf.
24 ?C:.
25 ?H:#$sunscanf   SUNSCANF  /**/
26 ?H:.
27 ?LINT:set sunscanf
28 ?F:!scanf
29 : check to see what kinda scanf your using.
30 echo " "
31 echo "Checking to see what flavor of scanf you have..." >&4
32 $cat >scanf.c <<'EOCP'
33 int main()
34 {
35         float value;
36
37         sscanf("4.5","%g",&value);
38         printf("%d\n", value == 4.5);
39 }
40 EOCP
41 set scanf
42 if eval $compile_ok; then
43         if $test `./scanf` = 0; then
44                 echo "Hmm.. seems you are not running the USG flavor.."
45                 val="$undef"
46         else
47                 echo "Uh... you are running the USG flavor of scanf."
48                 val="$define"
49         fi
50 else
51         echo "(I can't seem to compile the test program... Guessing)"
52         val="$undef"
53 fi
54 set sunscanf
55 eval $setvar
56 $rm -f scanf*
57