delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/03/16:03:33

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3989CA47.A437A99F@phekda.freeserve.co.uk>
Date: Thu, 03 Aug 2000 20:38:47 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.14 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Bug in scanf() info page
Reply-To: djgpp-workers AT delorie DOT com

Hello.

There seems to be a small typo in the second example of the %[] format in
the info page for scanf(). A correcting diff is below.

Bye, Rich

*** src/libc/ansi/stdio/scanf.txh       Tue Jan 25 19:36:52 2000
--- /home/rich/src/djgpp/src/libc/ansi/stdio/scanf.txh  Thu Aug  3
20:35:42 2000
***************
*** 267,272 ****
  /* read to end-of-line */
  scanf("%d %[^\n]\n", &x, buf);
  /* read letters only */
! scanf("[a-zA-Z]", buf);
  @end example
  
--- 267,272 ----
  /* read to end-of-line */
  scanf("%d %[^\n]\n", &x, buf);
  /* read letters only */
! scanf("%[a-zA-Z]", buf);
  @end example

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019