Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #66458

Re: C89 compatibility question

From "Bill Cunningham" <nospam@nspam.invalid>
Newsgroups comp.lang.c
Subject Re: C89 compatibility question
Date 2015-07-27 14:53 -0400
Organization A noiseless patient Spider
Message-ID <mp5uk8$prp$1@dont-email.me> (permalink)
References <mp5agt$sos$1@dont-email.me> <lnoaixo2mt.fsf@kst-u.example.com>

Show all headers | View raw


"Keith Thompson" <kst-u@mib.org> wrote in message 
news:lnoaixo2mt.fsf@kst-u.example.com...
> "Bill Cunningham" <nospam@nspam.invalid> writes:
>>     I have this code so far to read a JFIF file and prehaps put it in a
>> wrapper of sorts.
>>
>> Struct JFIF_HEAD {
>>     uint8_t SOI={0xff,0xd8};
>
> It's "struct", not "Struct".
>
>> Not much I know. But I am already going to have to use stdint.h which is
>> fine for me; but not C89. Is there an unsigned int that can be 8 bit in 
>> C89?
>> The only thing in C89 I know of that is 8 bit is a char. If I remember
>> correctly without going back and looking. I'm pretty confident I'm right.
>>
>>     Could anything C89 replace uint8_t?
>
> unsigned char is very likely to be the same as uint8_t.  It's not
> guaranteed (which is why uint8_t was added by C99), but it's easily
> checked by examining the value of UCHAR_MAX in <limits.h>.
>
> There are C89-compatible implementations of <stdint.h>.  One of them is
> here: http://www.lysator.liu.se/(nobg)/c/q8/index.html
>
> Why are you restricted to C89?

    I am not. If I wanted though to release the code, I don't know how many 
C99 compilers are out there. I definately know not many C11s.

Bill

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

C89 compatibility question "Bill Cunningham" <nospam@nspam.invalid> - 2015-07-27 09:10 -0400
  Re: C89 compatibility question Philipp Klaus Krause <pkk@spth.de> - 2015-07-27 17:50 +0200
    Re: C89 compatibility question "Bill Cunningham" <nospam@nspam.invalid> - 2015-07-27 12:25 -0400
    Re: C89 compatibility question "Bill Cunningham" <nospam@nspam.invalid> - 2015-07-27 14:36 -0400
  Re: C89 compatibility question Thomas Richter <thor@math.tu-berlin.de> - 2015-07-27 19:54 +0200
    Re: C89 compatibility question "Bill Cunningham" <nospam@nspam.invalid> - 2015-07-27 14:23 -0400
      Re: C89 compatibility question Barry Schwarz <schwarzb@dqel.com> - 2015-07-27 17:24 -0700
        Re: C89 compatibility question "Bill Cunningham" <nospam@nspam.invalid> - 2015-07-28 13:57 -0400
    Re: C89 compatibility question "Bill Cunningham" <nospam@nspam.invalid> - 2015-07-27 14:27 -0400
  Re: C89 compatibility question Keith Thompson <kst-u@mib.org> - 2015-07-27 11:51 -0700
    Re: C89 compatibility question "Bill Cunningham" <nospam@nspam.invalid> - 2015-07-27 14:53 -0400
    Re: C89 compatibility question "Bill Cunningham" <nospam@nspam.invalid> - 2015-07-27 18:10 -0400
      Re: C89 compatibility question Keith Thompson <kst-u@mib.org> - 2015-07-27 16:22 -0700
        Re: C89 compatibility question "Bill Cunningham" <nospam@nspam.invalid> - 2015-07-28 09:28 -0400
          Re: C89 compatibility question Keith Thompson <kst-u@mib.org> - 2015-07-28 10:36 -0700

csiph-web