Copying: 
The files in this distribution are copyright (c) 2010, J. D. Aplevich,
and are distributed under the licence at the end of this file, except for
the file dpicdoc.pdf, which is subject to the Creative Commons attribution
licence version 3.0 http://creativecommons.org/licenses/by/3.0/,
and the file gpic.pdf by Eric Raymond, which is subject to the GNU general
public license available at http://www.gnu.org/licenses/gpl.html.

Downloading:
   Download and unpack either dpic.tar.gz or dpic.zip.

Unix installation:
   Check the definitions in the Makefile, especially the following two items.
   Then type `make'.

   (1) If loading fails because snprintf() is not available, uncomment the line
   # DEFINEB=-DNO_SNPRINTF
   in the Makefile, type `make clean' then `make'.

   (2) If loading fails because random and srandom are not available, uncomment
   the line 
   # DEFINEA=-DRAND
   and again type `make clean' and then `make'.

   Install the executable file in the appropriate bin directory.
   The file dpic.1 in the doc directory is a Unix-compatible man file.

Web-server installation:
   You probably should disable the sh and copy commands.
   Uncomment the SAFEMODE definition in Makefile or add -DSAFE_MODE
   to your compiler command.  If you do not do this, the -z command-line
   option has the same effect (see below).

Installation on a non-unix PC:
   Compile as above using make and your favourite compiler.  A Cygwin
   installation should require no changes.  For MinGW, see the switch
   in the Makefile.

   Otherwise, commands equivalent to the following should do the trick,
   but see (1) and (2) above:
      gcc   -O  -c  dpic.c
      gcc   -O  -c  dpic2.c
      gcc   -O  -c  p2clib.c
      gcc -o dpic dpic.o dpic2.o p2clib.o -lm

   If you do not wish to compile the program, copy dpic.exe from the
   distribution Windows directory into your folder of executable files.

Dpic usage:

   dpic [option] infile > outfile
or 
   cat infile | dpic [option] > outfile 

Options:
   (none)    LaTeX output (limited font-based drawing capability)
   -e        pict2e output
   -f        Postscript output, strings in psfrag format 
   -g        TikZ-pgf output
   -h        write this message and quit
   -m        mfpic output (see mfpic documentation)
   -p        PSTricks output (see PSTricks documentation)
   -r        raw Postscript output, no automatic string formatting
   -s        MetaPost output (for compatibility)
   -t        eepicemu output (slightly less limited than LaTeX output)
   -v        svg output
   -x        xfig 3.2 output (for wysiwyg drawing)
   -z        safe mode (sh and copy disabled)

Testing:
   Test the installation by typing

     dpic -p quick.pic > quick.tex
     or
     dpic -g quick.pic > quick.tex
     (if you want to test the TikZ-pgf output)

   which produces the input for the following test LaTeX file:

      \documentclass{article}
      \usepackage{pstricks} % or \usepackage{tikz}
      \begin{document}

      \begin{figure}[hbt]
         \begin{center}
         \input quick
         \caption{Customized caption for the figure}
         \end{center}
         \label{Symbolic label}
      \end{figure}
      \end{document}

Bugs:
   If you discover a bug, please check that your version is the
   latest.  Feel free to send bug reports.

   Although the pic grammar and syntax are incompletely specified, when
   inconsistencies between dpic and gpic are found, I usually check to
   see whether dpic should be changed to conform.  Error and warning
   messages are not identical.  Other exceptions can be found in the
   file dpicdoc.pdf.

Version:
   The version of dpic is the date the source was created, printed as a
   comment in dpic output.  The source is maintained in Pascal, but has
   been translated to ANSI C by P2C, then changed to simplify reading
   and compilation and to run on a variety of platforms.

-------------------------------------------------------------------
BSD Licence:
 
    Copyright (c) 2010, J. D. Aplevich
    All rights reserved.
 
    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met: 
 
    * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
 
    * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
    LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-------------------------------------------------------------------
