12345678910111213141516171819202122232425262728293031 |
- /*****************************************************************************
- * Project: dcc
- * File: bundle.h
- * Purpose: Module to handle the bundle type (array of pointers to strings).
- * (C) Cristina Cifuentes
- ****************************************************************************/
- #pragma once
- #include <stdio.h>
- #include <vector>
- #include <string>
- typedef std::vector<std::string> strTable;
- struct bundle
- {
- public:
- void appendCode(const char *format, ...);
- void appendDecl(const char *format, ...);
- void appendDecl(const std::string &);
- strTable decl; /* Declarations */
- strTable code; /* C code */
- };
- #define lineSize 360 /* 3 lines in the mean time */
- void newBundle (bundle *procCode);
- int nextBundleIdx (strTable *strTab);
- void addLabelBundle (strTable &strTab, int idx, int label);
- void writeBundle (std::ostream &ios, bundle procCode);
- void freeBundle (bundle *procCode);
|