| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW |
| X-Spam-Check-By: | sourceware.org |
| MIME-Version: | 1.0 |
| In-Reply-To: | <2BF01EB27B56CC478AD6E5A0A28931F203DD40F5@A1DAL1SWPES19MB.ams.acs-inc.net> |
| References: | <2BF01EB27B56CC478AD6E5A0A28931F203DD40F5 AT A1DAL1SWPES19MB DOT ams DOT acs-inc DOT net> |
| Date: | Mon, 23 Jan 2012 15:24:54 -0500 |
| Message-ID: | <CAG_2cTnyM1MfB8b7oonwymZy2GchuAOmLfusd35gH7sT+bLHRQ@mail.gmail.com> |
| Subject: | Re: isprint core dump |
| From: | Jon Clugston <jon DOT clugston AT gmail DOT com> |
| To: | cygwin AT cygwin DOT com |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id q0NKPOqr019016 |
On Mon, Jan 23, 2012 at 3:16 PM, Nellis, Kenneth
<Kenneth DOT Nellis AT acs-inc DOT 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |