On 03 Nov 2003 02:46:34 GMT,
di********@aol.comnospam (Digitalcoup)
wrote in comp.lang.c:
I have been working on a small application out of boredum and have ran into a
slight problem. In one of the lines I used: if(isblank(u_name[count_element])
== 0) {
at compile time I get the error: warning: implicit declaration of function
`isblank'.
Simple workaround I just used isspace() instead, but I would still like to know
what the problem is. Doing my own investigation I found that
/usr/include/ctype.h does have isblank() is defined and of course the manpage
does show it as being under ctype.h. Now in /usr/include/linux/ctype.h
/usr/lib/bcc/include/ctype.h isspace is not defined at all. Is isblank() a
nonstandard function in ctype? I really don't mind having the easy work around
but I always want to know why something failed that I tried. Any help is
appreciated.
There is a standard C library function isspace() prototyped in
<ctype.h>, and there has been since the original 1989 ANSI C standard.
There is another function named isblank() that was added to <ctype.h>
by the 1999 major update to the C standard.
Your compiler might be operating in a C89 conforming mode where it
does not recognize newer C99 prototypes. You will need to ask in a
Linux programming group, such as news:comp.os.linux.development.apps,
as to how to get your compiler to recognize this. I would suggest you
specify your compiler's version Linux version when you ask there.
--
Jack Klein
Home:
http://JK-Technology.Com
FAQs for
comp.lang.c
http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++
http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
ftp://snurse-l.org/pub/acllc-c++/faq