Re: Quantized Indexing Source Code (update & alg. history)
- From: Dave Thompson <david.thompson1@xxxxxxxxxxxxxxxx>
- Date: Mon, 23 Jan 2006 06:07:53 GMT
On Tue, 17 Jan 2006 09:50:43 -0000, Jasen Betts <jasen@xxxxxxxxxxx>
wrote:
(about nightlight's C code)
> the ones I referred to above mentioned above were globals not specifically
> initialised, on linux they get zero (beacuse all user ram starts that way)
> and presumably on windows too (because the code works for you) but I'm not
> certain that they are zeroed all C enviroments.
>
As already said, yes this is required by standard C. Although you can
find some nonstandard (nonconforming) implementations of C for very
limited (embedded) systems which might not do this.
> Also variables declared in headers but not extern, this seems to be more of
> a style issue as i've always seen them declared extern, but declared normal
> seems to work fine.
>
This however is not (unless the header is used in only one place).
Some systems, probably most nowadays, use "common" linking (named
after the FORTRAN feature it supports), where if you define (allocate)
the same variable (the same way) in multiple translation units
(separately compiled files/modules) it "merges" them, but C also
permits other forms such as the "export/import" model where if you
have multiple definitions it won't link. There are also systems where
if you have conflicting definitions it just arbitrarily and without
warning picks one of them -- but you shouldn't have conflicting
definitions by #include'ing the same header unless the code
(declaration) in that header depends on macros or types that are
defined differently in the different #include'rs, which is really bad
programming style because it confuses hell out of human readers.
- David.Thompson1 at worldnet.att.net
.
- References:
- Re: Quantized Indexing Source Code (update & alg. history)
- From: nightlight
- Re: Quantized Indexing Source Code (update & alg. history)
- From: Jasen Betts
- Re: Quantized Indexing Source Code (update & alg. history)
- From: nightlight
- Re: Quantized Indexing Source Code (update & alg. history)
- From: Jasen Betts
- Re: Quantized Indexing Source Code (update & alg. history)
- Prev by Date: I'm find Function of JPEG algorithm not using floating point processing
- Next by Date: Re: Compression ratios of MJPEG, MPEG1, MPEG2, MPEG4, H.263, and H.264
- Previous by thread: Re: Quantized Indexing Source Code (update & alg. history)
- Next by thread: DCT and DWT common spectral features
- Index(es):
Relevant Pages
|
Loading