home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / os2 / protoc / protoc.doc < prev    next >
Encoding:
Text File  |  1990-07-25  |  4.5 KB  |  106 lines

  1.  
  2. PROTOC - A prototype generator for C source code.
  3. Written by Mitchell Fisher - 2/12/90
  4.  
  5. Update: 07/25/90 - Corrected problems with comments on same line
  6.                    as functions as well as a few minor problems with
  7.                    parenthises within a comment.
  8.  
  9.                    BOUND PROTOC so that it will run under OS/2 as well as DOS
  10.  
  11.  
  12.  
  13. THIS VERSION OF PROTOC IS FREEWARE AND NO CHARGE SHOULD BE ACCEPTED FOR
  14. THIS PRODUCT!!  PLEASE FEEL FREE TO DISTRIBUTE THIS PRODUCT HOWEVER MAKE
  15. SURE THAT THE FOLLOWING FILES EXIST:
  16.  
  17.         PROTOC              - Makefile for Microsoft C
  18.         PROTOC.DOC          - This file
  19.         PROTOC.EXE          - The PROTOC executable for DOS
  20.         CHRFUNCS.OBJ        - Character functions for PROTOC
  21.         PROTOC.C            - C Source code for PROTOC
  22.         PROTOC.H            - Header file of function prototypes for PROTOC
  23.         PROTOC.DEF          - Definition file for Linker for OS/2 not
  24.                               needed for DOS.
  25.  
  26.  
  27.  
  28.  
  29.                                Description:
  30.  
  31. Have you ever been writing a C program and find out you really
  32. need function prototypes.  Well, most of us normally include several .H
  33. files for our code which is made up largely of function prototypes.  If a
  34. funcion is called with a forward reference, then most compilers will
  35. default those calls with an integer type meaning the routines will not
  36. return only integers.  Well, this can be a problem if you are working in a
  37. far or huge memory model and you want a far poitner returned from a
  38. function rather than an integer.  However, to take out the drudgery of
  39. going through your code and collecting all the functions and making
  40. prototypes out of them, I wrote this program to do it for you.  It is,
  41. however, based on the Turbo C project file but project files are very
  42. simple to create.  All a project file is is a file that contains a list of
  43. all source code that makes up the program.  If you have just one source
  44. module, sorry, protoc must use a project file so you must enter this one
  45. file into a project file...  For those Turbo C users that use project
  46. files and include .LIB and .OBJ lines in the project, don't wory, PROTOC
  47. will ignore these lines and only process files with the .C extension.
  48. However, there is one thing to watch out for, if PROTOC uses the
  49. project file HELP.PRJ, then the output file will become HELP.H so make
  50. sure there is no .H file that is the same as your project file name.  If
  51. this is the case, just rename the project file to something unique.
  52.  
  53. For a simple useage, enter PROTOC without any parameters.
  54.  
  55. You can redirect PROTOC's output from a file to the screen.  To do this
  56. preceed the project file with a -O.  Example:  PROTOC -O test.prj
  57.  
  58.  
  59.  
  60.                                Commentary:
  61.  
  62. This version, version 1.2, is bundled with the source code.  and is
  63. BOUND so that it will run under OS/2 and DOS.  (I have only tested the
  64. program under OS/2 1.2.)  This source code was originally compiled under
  65. Turbo C Version 2.0 but has been recently been compiler under Microsoft C
  66. Version 5.1 for use with OS/2.
  67.  
  68.   You will also notice a .OBJ file bundled with this package - this file
  69. contains the character functions that PROTOC uses.  The source code for
  70. these functions have not been included.
  71.  
  72. I am pleased to find that people have found this program to be of some
  73. use.  In view of this use, I shall continue to upgrade this program to
  74. work better and faster and provide new options.  Also, a Presentation
  75. Manager version is in the works which will work in OS/2.
  76. This version is free to all you 'C' programmers out there.  With the
  77. advent of ANSI C, this function may prove to be a necessity.
  78.  
  79.  
  80.                         Known limitations or BUGS!
  81.  
  82. This software has been tested rather thouroghly and no MAJOR BUGS have
  83. been found but there is always a possibility so please inform me either by
  84. letter or phone message of any problems and I will try to correct the
  85. problem.
  86.  
  87. One known limitation is that PROTOC will not process a function that has
  88. it's begin and end parenthises on different lines.  This rarely will
  89. happen except for those functions that accept a lot of parameters and the
  90. programmer divides up the function definition into two lines.  If a
  91. function has that many params anyway, the programmer should change it to
  92. use a structure or global variables or whatever.
  93.  
  94.  
  95.  
  96. I hope you find this program of some use.
  97.  
  98.         Mitchell Fisher
  99.         5914 W. Golden Lane
  100.         Glendale, AZ  85302
  101.  
  102.         (602) 435-8723
  103.  
  104.  
  105.  
  106.