From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15661 invoked by alias); 28 Jan 2004 06:16:07 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 15626 invoked from network); 28 Jan 2004 06:16:06 -0000 Received: from unknown (HELO mail5.infineon.com) (203.126.245.197) by sources.redhat.com with SMTP; 28 Jan 2004 06:16:06 -0000 Received: from sinse004.ap.infineon.com (sinse004.ap.infineon.com [172.17.65.75]) by mail5.infineon.com (8.11.7p1+Sun/8.11.7) with ESMTP id i0S6GdX02017 for ; Wed, 28 Jan 2004 14:16:39 +0800 (SGT) Received: from blrw502w.blr.infineon.com ([172.29.142.21]) by sinse004.ap.infineon.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id DZ6Q1091; Wed, 28 Jan 2004 14:16:04 +0800 Received: by blrw502w.blr.infineon.com with Internet Mail Service (5.5.2653.19) id ; Wed, 28 Jan 2004 11:41:29 +0530 Message-ID: <0C674B14EAEBD61196D900B0D03DB49F01765446@blrw502w.blr.infineon.com> From: "Deshpande Bansidhar(IFIN DC AI)" To: "'gcc-help@gcc.gnu.org'" Subject: atoi() check Date: Wed, 28 Jan 2004 06:16:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2004-01/txt/msg00249.txt.bz2 Hi all I have following code. I want to add error handler for atoi() function. E.g. char *ch; int num; /*Read ch here*/ Num = atoi(ch); But before calling atoi I want to make sure that ch is pointing to numberic string. How should I do this. I can manually write some function to check this. But is there Any library function inbuilt to achieve the same ? Thanks & regards, Bansidhar A. Deshpande Software Engineer Infineon Technologies India Pvt. Ltd. Discoverer Building. I.T.P.L., White Field Road, Bangalore -560066 Phone: +91-80-51392011 Extn : 2066 Fax: +91-80-8410012 *Disclaimer* This e-mail and any attachments are confidential and may be subject to legal or some other professional privilege. They are intended solely for the attention and use of the named addressee(s). They must not be disclosed to any person without authorization. This e-mail and any attachments are also subject to copyright. They may only be copied or distributed with the consent of the copyright owner. If you are not a named addressee you must not use, disclose, retain or reproduce all or any part of the information contained in this e-mail or any attachments. If you have received this email by mistake please notify the sender immediately by return email and delete or destroy all copies of the email. Any confidentiality, privilege or copyright is not waived or lost because this email has been sent to you by mistake.