Extract FAQ


[Home] [FAQ] [User Guide (PDF)] [User Guide (HTML)] [Examples] [History] [Download]

What is extract?

Extract is a software management tool which allows the user to store different versions of the same code or several related codes in one file. Interleaving of routines allows the user to have code such that when one version is updated, all versions are changed. Many capabilities of C's preprocessor are emulated, but the code produced by extract is much more readable. Extract also has some scripting abilities not present in cpp, such as looping, if structures, and integer arithmetic. The code developer keeps code in basefiles but gives the extracted files to users. A successful use of extract will result in files that no one can tell came from extract.

Who uses extract?

Well, as of right now, essentially the people who have worked with me on projects, since I've never publicly announced it or anything. It seems that it is decently handy, in that people who have learned it working with me seem to continue to use it after they no longer do so. Extract was/is used fairly extensively in the following projects:

How do I download and install extract?

In order to make the install as simple as possible, extract comes in one gigantic source file. So, installation consists of grabbing the source, for instance by right-clicking here, then compiling this using your system's C compiler, (eg, gcc -O3 -o extract extract.c), and moving the resulting executable somewhere in your bin path (eg., mv extract /usr/local/bin/.).

What software license does extract use (AKA: in what ways and for what purposes am I allowed to use Extract)?

Extract uses a relaxed GPL license. See the source code for details, but essentially you are free to use extract, and the GPL is explicitly relaxed so that extract's input (basefiles) and output (extracted files) are not affected by the GPL.

I've looked at the source. Are you, perhaps, mentally handicapped in some way?

Thanks for asking so nicely. Extract is one of those projects that kind of grew organically for roughly a decade; there have been several rewrites, but no redesign, and that shows. I started it as a undergraduate math student, with little exposure to C or Unix, and that heritage is still there to some extent. Extract has almost always been written on my free time, and under intense time pressures (most extract extensions were put in to facilitate my work on my projects, which had hard deadlines). It's not the way I'd write it today, but then again I don't plan on writing it today.

Now, of all the indefensable parts in the code, I will choose to explain one explicitly: why did I foolishly duplicate most of C standard string.h? The answer is that I started extract right after finishing up a project where I had used string.h (though it may have had a different name in those non-ANSI days), and it had taken me a week to find out that the machine I was on had an incorrect strcmp or strcpy, or something equally ubiquitous. For several years after that, I was intensely paranoid of the C standard libraries, and minimized their use as much as possible. With the greater maturity of both the ANSI C standard and my programming abilities, I stopped doing this, but the legacy of this one bad experience lives on in extract.

Where do I report errors, submit patches, ask questions, etc?

The answer to all of these is whaley at cs.utsa.edu. Please note that error reports need to be accompanied by inputs and arguments that demonstrate the error. Bug reports that do not have a method of confirming the bug will be ignored.

As to asking question, please remember I'm not payed for this, so make sure your question is not answered in the supplied documentation (this FAQ, the user's guide, example index, etc).

If you'd like to see a feature added to extract, explaining why you need it and how it would be useful is definitely recommended.