1 ?RCS: $Id: d_scannl.U,v 3.0.1.2 1997/02/28 15:41:27 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
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 Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: $Log: d_scannl.U,v $
12 ?RCS: Revision 3.0.1.2 1997/02/28 15:41:27 ram
13 ?RCS: patch61: added ?F: metalint hint
15 ?RCS: Revision 3.0.1.1 1995/07/25 13:59:12 ram
16 ?RCS: patch56: made cc and ccflags optional dependencies
18 ?RCS: Revision 3.0 1993/08/18 12:07:00 ram
19 ?RCS: Baseline for dist 3.0 netwide release.
22 ?X: Does the scanf routine read "\n" corretly ? This is was not
23 ?X: the case on AIX...
25 ?MAKE:d_scannl: cat rm Setvar Compile run
26 ?MAKE: -pick add $@ %<
28 ?S: This variable conditionally defines SCAN_NL, which indicates
29 ?S: whether the C library routines scanf() and friends can deal with
30 ?S: a '\n' in the input correctly. They do most of the time.
33 ?C: This symbol is defined if the C library routines scanf() and friends
34 ?C: can deal with a '\n' in the input correctly, so that you can say
35 ?C: scanf("%d\n"); instead of scanf("%d"); getc(c); to handle the '\n'.
37 ?H:#$d_scannl SCAN_NL /* scanf("%d\n") works */
41 : does scanf handle "\n" correctly ?
44 ?X: I really want to say "\n" instead of '\n', becasue I am referring
45 ?X: to the string given as argument to scanf().
46 echo 'Let'"'"'s see if scanf() handles "\\n" correctly...' >&4
51 scanf("%d\n%d", &i, &j);
58 if eval $compile_ok; then
66 echo "No, it doesn't."
70 echo "(I can't seem to compile the test program. Assuming it does.)"