This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: isprint core dump


On Mon, Jan 23, 2012 at 3:16 PM, Nellis, Kenneth
<Kenneth.Nellis@acs-inc.com> wrote:
> I haven't had the chance to try under Linux, but
> ?isprint(3055872)
> is core-dumping on me. Here's a STC:
>
> ======================================
> #include <stdio.h>
> #include <ctype.h>
>
> int main (void)
> {
> ? ?int a = 3055872;
> ? ?int b = isprint(a);
> ? ?printf ("%d %d\n", a, b);
> ? ?return 0;
> }
> ======================================
>

Whatever you are trying to do, you are using the wrong tool for the
job.  "isprint()" should be passed a "char", in fact it only works on
ASCII characters.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]