Short:    SAS/C++ Proto to FD converter v37.1 
Uploader: schneidr@igt.baum.ethz.ch
Type:     dev/c

************************************************************************

                      Proto2FD v37.1 (30.10.1995)

               c1994-95 Quarz Development / A.H.Schneider

                             - Freeware -

************************************************************************


This  is  a  little tool I wrote when creating a shared library with C++
code  using  SAS/C++.  It  simly  does  what  its  name  tells:  convert
prototypes to function description entries (.FD) (used to create pragmas
for library calls).

Creating C code shared libraries with SAS/C++  6.56  is  a  pretty  easy
task.  This  is  not  the case for C++! Not only you have to provide all
your  class  declarations  AND  definitions  with  '__asm'  and   '__asm
__saveds'  keywords. This you could bear. But you also have to create an
entry in the function description file (.FD) for EACH of the  translated
and *name-mangled* C-function of your C++ classes!!!

That's  where  this  tiny tool helps out. It just takes a prototype file
generated with the SAS/C *GenProto* option as input an creates fast  and
easy  for  every  function  with  the  keywords '__asm' and '__saveds' a
function description entry into the output file.

The command syntax is:

        proto2fd <infile> [outfile]

        infile:  filename of the file  containing the prototypes created
                 by SAS/C and the GenProto option.

        outfile: filename of the output file (optional). If left out, an
                 appropriate filename with .fd extension will be created
                 from the infile name.


For example to create the FD file  from  'foo.cpp',  say  'foo.fd',  the
following  steps  are  necessary  (assuming  the  class  declaration and
definitions contain the '__asm' and '__saveds' keywords as described  in
the 'SAS/C Library Reference'):

        1. First create C translation of 'foo.cpp',
           > sc CxxOnly foo.cpp         ; this will create foo..c

        2. then create the prototypes file
           > sc GenProto foo..c GenProtoParm GenProtoFile=foo.protos 

        3. and finally create 'foo.fd'
           > proto2fd foo.protos foo.fd

Using smake you can easily automate the 3 steps by adding the  following
rules and depencies to your makefile:

foo.fd:         foo.cpp

.cpp.fd:
        sc cxxonly $?
        sc genproto $*..c genprotoparm genprotofile=$*.protos
        proto2fd $*.protos $@



If you have any problems using this tools or suggestions, please let me
know.

Alex H. Schneider

schneidr@igt.baum.ethz.ch

************************************************************************
  If you know a faster way to do the above things, PLEASE let me know.
************************************************************************

Program History:
        v37.1 (30.10.1995):      First public release

************************************************************************


============================= Archive contents =============================

Original  Packed Ratio    Date     Time    Name
-------- ------- ----- --------- --------  -------------
   16484    9957 39.5% 31-Oct-95 00:10:52  proto2fd
    3011    1236 58.9% 31-Oct-95 00:00:00  proto2fd.doc
    1432     542 62.1% 31-Oct-95 00:15:24  proto2fd.doc.info
-------- ------- ----- --------- --------
   20927   11735 43.9% 31-Oct-95 12:41:08   3 files
