www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/10/12/05:57:04

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: DJGPP AT SUN DOT SOE DOT CLARKSON DOT EDU
Date: Thu, 12 Oct 1995 10:22:48 BST
Subject: Re: Many small files versus big clusters

A.Appleyard <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk> wrote:
> The great size of the full DJGPP puts a big strain on people's hard disk
> stores. This is NOT helped by the current practice in many parts of it of
> having stuff on a mass of little files.
>  If (say) all the files LIBSRC\C\IO\*.C are chained into one big file
> LIBSRC\C\IO.C, and after each function (plus its associated outermost-level
> declarations) you insert a new preprocessor command `#libunit', ...

  "Stephen J. Turnbull" <turnbull AT gol DOT com> wrote:-
> New preprocessor command? At least do it quasi-portably with a #pragma. ...
> [it would involve alterations right through the chain of compilation stages
> that djgpp calls] ...

  Hereinafter a `lib-unit' is one separate library file unit that can be
linked in separately, or its source or partly-compiled form.
  Before each lib-unit, put the line `#libunit "string"' (or as suggested
above, `#pragma libunit "string"'). Then e.g. the 40 small files
DJGPP\LIBSRC\C\IO\*.C could be replaced by one file DJGPP\LIBSRC\C\IO.C which
would contain:-
  .................................
<< initial comments and licences etc >>
#libunitdir "djgpp/libsrc/c/io"
#libunit "clrerr.c"
<< text of file DJGPP\LIBSRC\C\IO\CLRERR.C >>
#libunit "doprnt.c"
<< text of file DJGPP\LIBSRC\C\IO\DOPRNT.C >>
#libunit "doscan.c"
<< text of file DJGPP\LIBSRC\C\IO\DOSCAN.C >>
<< etc etc for the remaining DJGPP\LIBSRC\C\IO\*.C files >>
  .................................
  (1) As the preprocessor preprocesses, it splits the file DJGPP\LIBSRC\C\IO.C
into temporary files (in temporary new directories if necessary) as named in
the strings in the #libunit lines, and compilation then proceeds as now.
  (2) For portability to other C/C++ compilers, djgpp could contain a small
program that can split files such as DJGPP\LIBSRC\C\IO.C into component small
source files as marked and named by the #libunit lines.

> ... if this breaks, the rest of your disk will be safe, while DoubleSpace
[or Stacker and the rest of that gang] would destroy it.

  Indeed so.

- Raw text -


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