Re: C Question: TypeDefing a structure ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Doug Harrison [MVP]" <dsh@xxxxxxxx> wrote in message
news:t7f6b495v8v4aeej9fptgkjd76higof8mh@xxxxxxxxxx
On Tue, 26 Aug 2008 01:15:11 +0700, "Alan Carre" <alan@xxxxxxxxxxxxxxxxx>
wrote:

I used to do that when machines were slow and RAM limited. It cut full
build times tremendously, while not having much of an impact on partial
builds. It worked because the per-file overhead was huge, and combining
(say) 20 100-line files into one big file via #include took no longer to
compile than any one of those 20 files individually. The main problems
were
with source files that made their own private #defines, declared
functions/data static, and so forth, such that these things escaped their
usual scopes.

Yes of course. There are advantages and drawbacks as with anything.

The usual approach seems to be to namespace every module (or most of it) so
you get the benefits of statics even though the functions/objects are
actually global to every routine/object in the lib. You don't wind up with
variable/function-name conflicts and neither does the user of the lib.

Of course that option wasn't available in pure C, 10 years ago ;)
- Alan


.



Relevant Pages

  • Re: LD_LIBRARY_PATH in multi-home environment
    ... we have here in Brazil several machines with multi Oracle homes. ... The LD_LIBRARY_PATH normally have to point to the 64-bit lib path. ... In 8i and earlier the setlibpath.sh script is: ...
    (comp.databases.oracle.server)
  • Re: Help! problem running a script.
    ... This lib I wrote about 8 years ago and about 2 years ago I converted ... machine plus our servers are 64 bit machines too. ...     long j, k; ... reach of pure Tcl with a combination of [string map] and [string ...
    (comp.lang.tcl)
  • Re: Help! problem running a script.
    ... Had you written your C part in a separate process, ... This lib I wrote about 8 years ago and about 2 years ago I converted ... machine plus our servers are 64 bit machines too. ... because I have quite a lot of code depending on this lib. ...
    (comp.lang.tcl)
  • Re: how do I use a module without installing it?
    ... root on the machines it will be used on. ... without installing it? ... use the PREFIX and LIB options when generating Makefiles: ...
    (perl.beginners)