miniproc home page

The current version of miniproc is 3.05, from March 15,2000.

Miniproc is a small general purpose text
preprocessor.   Miniproc is intended to be a portable, and
much simpler, alternative to perl and M4. Miniproc is
written in ANSI C. Some possible applications are:

  1. Preprocessor for languages which do not have their own
     standard preprocessor (ie, Fortran.)  For use in preparing a
     single standard presource which is processed through
     miniproc to result in platform specific final source
     file(s).

  2. Make-like utility for batches of HTML files. Example,
     you have many documents which all include a standard
     disclaimer on the bottom.  Change the disclaimer, and run a
     miniproc script to update the final HTML files. Or it could
     be run periodically in a batch queue to update dates within
     documents.

  3. Mailing lists.  That is, whenever you need to generate
     many similar files which are all variants on a single
     template.

For instance, the page you are reading is encoded by the
file miniproc.mpc and processed by miniproc to its
final form.

The miniproc source distribution: miniproc_3_05_source.zip
The miniproc documentation:       miniproc_3_05_doc.html
Download site for binaries:       http://saf.bio.caltech.edu/pub/software/miniproc/

As of version 2.0 the f$evaluate and f$<- functions
have been replaced by a built in reverse Polish notation
calculator, which incorporates all of the same functionality
(but is easier to use).  Scripts which use these two
functions must be rewritten to use the new [ ] notation, or
they will trigger an error message and then exit.

The miniproc source distribution contains:

  aaareadme.txt      this file
  miniproc.c         source code for miniproc
  miniproc.doc       documentation for miniproc (text)
  miniproc_doc.html  documentation for miniproc (html)
  testfile.mpc       example input file
  makefile*          makefiles for various platforms

The program is Known to build without warning or error on:

  OpenVMS Alpha, DECC
  Irix, SGI C
  Digital Unix, DECC
  Digital Unix, gnu cc
  Solaris, gnu cc
  Windows32, inside Cygwin with gnu cc
  Mac OSX

To build miniproc:

 OpenVMS with DECC

   $ cc/standard=ansi89/prefix=all/warn=(enable=all,disable=TRUNCINTASN) miniproc.c
   $ link miniproc

 Digital Unix with DECC

   % cc -std1 -o miniproc miniproc.c -lm

 Irix

   % cc -ansi -o miniproc miniproc.c -lm

 GCC (any platform)

   % gcc -ansi -pedantic -o miniproc miniproc.c -lm

 Windows 32, Codewarrior Pro 2

   Build it as an ANSI C "windows console application"

   (However, stat() is broken on the Codewarrior release
   that I have, so stat() based functions don't work correctly.)

To test miniproc:

 From a command line run

 $ miniproc testfile.mpc failonly=1

 and examine the results file which will be called test.txt.
 For more information on tests omit the "failonly=1" part.

 (Some .mpc files will also be created along the way - they should
  only remain in the directory if the test crashes.)

This software may be used freely, but may not be
redistributed.  You may modify this sofware for your own
use, but you may not incorporate any part of the original
code into any other piece of software which will then be
distributed (whether free or commercial) unless prior
written consent is obtained.  For more information, or to
report bugs, contact:

David Mathog
mathog@caltech.edu
Manager, sequence analysis facility, biology division, Caltech
