home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d598 / ansi.lha / ANSI / ANSI.doc < prev    next >
Text File  |  1992-02-01  |  2KB  |  49 lines

  1.    ANSI
  2.    ====
  3.    
  4.    Dr. Andrew C. R. Martin
  5.    SciTech Software
  6.    
  7.    This program is not in the public domain, but it may be freely copied
  8.    and distributed for no charge providing this header is included.
  9.    The code may be modified as required, but any modifications must be
  10.    documented so that the person responsible can be identified. If someone
  11.    else breaks this code, I don't want to be blamed for code that does not
  12.    work! The code may not be sold commercially without prior permission from
  13.    the author, although it may be given away free with commercial products,
  14.    providing it is made clear that this program is free and that the source
  15.    code is provided with the program.
  16.  
  17. ****************************************************************************
  18.  
  19.    Description
  20.    ===========
  21.  
  22.    This program alters function definitions to convert non-ANSI C code to 
  23.    ANSI form. The -k and -p flags allow conversion from ANSI to K&R and
  24.    generation of prototypes respectively.
  25.    
  26.    There are two *minor* problems:
  27.    1. In generation of prototypes. If a function has been defined with no 
  28.    explicit type it defaults to being int. Strictly the prototype should 
  29.    explicitly state this is int, but doesn't.
  30.    2. If a conversion actually occurs (either to or from ANSI) any comments
  31.    which were in the definition will be lost.
  32.    
  33.    The only restriction (that I can think of!) on the code being processed
  34.    is that a function definition must be the first thing on a line.
  35.    i.e. if a comment is placed on the same line as the definition but before
  36.    it, the program will think the whole line is a comment.
  37.    
  38. ****************************************************************************
  39.  
  40.    Usage:
  41.    ======
  42.    
  43.    The program may only be used from the CLI:
  44.  
  45.    ansi [-k -p] <in.c> <out.c>
  46.          -k generates K&R form code from ANSI
  47.          -p generates a set of prototypes
  48.  
  49.