Gentoo Archives: gentoo-user

From: Kevin O'Gorman <kogorman@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] C programming use of isascii(), ispunct() and isblank() fails
Date: Fri, 06 Oct 2006 02:37:23
Message-Id: 9acccfe50610051932q7dac09e3tc4287759cc33ae7c@mail.gmail.com
In Reply to: Re: [gentoo-user] C programming use of isascii(), ispunct() and isblank() fails by "Boyd Stephen Smith Jr."
1 On 10/5/06, Boyd Stephen Smith Jr. <bss03@××××××××××.net> wrote:
2 > On Thursday 05 October 2006 16:10, "Kevin O'Gorman" <kogorman@×××××.com>
3 > wrote about '[gentoo-user] C programming use of isascii(), ispunct() and
4 > isblank() fails':
5 > > Why is it that using some of the macros from ctype.h fails to compile?
6 >
7 > You code compiles fine for me. I'm using... hrm, an invalid profile...
8 > well, gcc --version reports 'gcc (GCC) 4.1.1 (Gentoo 4.1.1-r1)'
9 >
10 > > if (ispunct(i)) punctf(" punct");
11 >
12 > I did get a link error, because you haven't defined "punctf"; I'll bet you
13 > meant "printf".
14 >
15
16 --
17 Kevin O'Gorman, PhD
18
19 Hmmm. I did indeed mean printf -- a goof in s/// stuff. Anyway, even after
20 that,when I
21 gcc -Wall ctype.c -o ctype
22 I get
23 ctype.c:21: warning: implicit declaration of function 'isblank'
24
25 and I get more of these if I use -ansi. I can get rid of it by removing -Wall,
26 but my normal practice is the opposite: I add -Werror. I'd just like to know
27 how to make it clean.
28
29 ++ kevin
30 --
31 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] C programming use of isascii(), ispunct() and isblank() fails Mark Kirkwood <markir@××××××××××××.nz>
Re: [gentoo-user] C programming use of isascii(), ispunct() and isblank() fails "Bo Ørsted Andresen" <bo.andresen@××××.dk>
Re: [gentoo-user] C programming use of isascii(), ispunct() and isblank() fails Arturo 'Buanzo' Busleiman <buanzo@××××××××××.ar>