delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2013/06/25/12:00:16

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Received: by 10.224.205.138 with SMTP id fq10mr361828qab.1.1372175136496;
Tue, 25 Jun 2013 08:45:36 -0700 (PDT)
X-Received: by 10.182.65.202 with SMTP id z10mr55421obs.36.1372175136467; Tue,
25 Jun 2013 08:45:36 -0700 (PDT)
Newsgroups: comp.os.msdos.djgpp
Date: Tue, 25 Jun 2013 08:45:35 -0700 (PDT)
In-Reply-To: <020e0244-406c-4c1f-9dbc-d82a0fae976f@googlegroups.com>
Complaints-To: groups-abuse AT google DOT com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=65.13.115.246;
posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
NNTP-Posting-Host: 65.13.115.246
References: <36e857f0-9899-496b-9fc6-32251e109888 AT googlegroups DOT com>
<kpo3gh$4qo$1 AT speranza DOT aioe DOT org> <858cbded-7989-46e6-a997-93f842cdb3b0 AT googlegroups DOT com>
<kq75ni$qvf$1 AT speranza DOT aioe DOT org> <020e0244-406c-4c1f-9dbc-d82a0fae976f AT googlegroups DOT com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fa6e9d1a-62f9-42c9-a020-5c317d7c33da@googlegroups.com>
Subject: Re: General Protection Fault error is intermittent
From: rugxulo AT gmail DOT com
Injection-Date: Tue, 25 Jun 2013 15:45:36 +0000
Bytes: 2827
Lines: 35
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Hi,

On Tuesday, June 25, 2013 3:24:59 AM UTC-5, K.J.Williams wrote:
> 
> BTW, I found another bug with DJGPP 
>
> if you have program that just uses :
> 
> #include<stdio.h>
> #include<string.h> 
> 
> ...and you use a function from ctype.h - as I did with isspace(),
> without including ctype.h in your includes ... DJGPP/GCC will NOT
> complain about it and will still compile it.

Originally, way way back, C didn't have a preprocessor at all. I
think, without explicit prototypes, C assumes every function returns
an int. C nowadays only has simple file inclusion, thus it's not true
modules, hence instead of the compiler checking for consistency, it's
left to the linker to resolve. But for varargs functions (e.g. printf)
you always have to include the header for prototype as it's allowed
to change the ABI.

> ...Secondly, I found this strange, but some how the ANSI C or C++
> standard doesn't consider the escape sequence '\b' (for backspace)
> as a white-space character when I use isspace() to check individual
> characters in a c-string. 

I've seen various tools (e.g. wc clones) that differ in what they
consider whitespace. Normally, they only consider obvious things
like blanks (0x20) and tabs (0x9), maybe form feed (0x12?). But
sometimes somebody will treat everything below blank (and above
tilde) as whitespace (or at least change it to a blank upon input
for easier handling).

http://en.wikipedia.org/wiki/Whitespace_character

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019