×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
documentation for V4R5 says, certain ctype.h functions such as isblank are available in C++ only.
I dimly remember having read that I can set a #define to enable the availability of isblank() for plain C. I was too dumb to immediately apply this or write down a note. Now I wonder what this #define might be.
ChatGPT was suggesting to define _ISOC99_SOURCE in the first try, and _ANSI_C_SOURCE in the second. I have found references to __cplusplus by "plain Google". Each must be set before including ctype.h. The compiler still complains about a missing prototype.
Looking at QCLE/H.CTYPE, islblank is surrounded by the need to define __EXTENDED__ and __cplusplus. Defining both makes the compiler choke:
CZM0280 The predefined macro __EXTENDED__ cannot be redefined.
CZM0441 #pragma info is unrecognized and is ignored.
In addition, the header states
#pragma map (isblank, "__isblank")
Not sure what this is about.
Manually setting a prototype also doesn't work. There is no more error from the compiler, but the output states Program x in library y was not created. I assume a linkage error.
How can I enable the use of isblank() from the system libraries in plain C? Thanks!
Currently, I'm "manually" testing the character for being a blank, a tab, or a 0x0. Plan B would be to extract the actual code from the GNU Libc and use that one.
:wq! PoC
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.