home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dosdisas.zip / dccsrcoo.zip / bundle.h < prev    next >
C/C++ Source or Header  |  1997-04-09  |  963b  |  33 lines

  1. /*****************************************************************************
  2.  *
  3.  * Project: dcc 
  4.  * File:    bundle.h
  5.  * Purpose: Module to handle the bundle type (array of pointers to strings).
  6.  *
  7.  ****************************************************************************/
  8.  
  9. #include <stdio.h>
  10.  
  11. typedef struct {
  12.     Int     numLines;   /* Number of lines in the table   */
  13.     Int     allocLines; /* Number of lines allocated in the table */
  14.     char    **str;      /* Table of strings */
  15. } strTable;
  16.  
  17.  
  18. typedef struct {
  19.     strTable    decl;   /* Declarations */
  20.     strTable    code;   /* C code       */
  21. } bundle;
  22.  
  23.  
  24. #define lineSize    360        /* 3 lines in the mean time */
  25.  
  26. void    newBundle (bundle *procCode);
  27. void    appendStrTab (strTable *strTab, char *format, ...);
  28. Int        nextBundleIdx (strTable *strTab);
  29. void    addLabelBundle (strTable *strTab, Int idx, Int label);
  30. void    writeBundle (FILE *fp, bundle procCode);
  31. void    freeBundle (bundle *procCode);
  32.  
  33.