codetools.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Copyright (C) 2005-2010 Valeriy Argunov (nporep AT mail DOT ru) */
  2. /*
  3. * This library is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU Lesser General Public License as published by
  5. * the Free Software Foundation; either version 2.1 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This library is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Lesser General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Lesser General Public License
  14. * along with this library; if not, write to the Free Software
  15. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  16. */
  17. #include "declarations.h"
  18. #ifndef QSP_CODETOOLSDEFINES
  19. #define QSP_CODETOOLSDEFINES
  20. #define QSP_EOLEXT QSP_FMT("_")
  21. #define QSP_PREEOLEXT QSP_FMT(" ")
  22. typedef struct
  23. {
  24. int Stat;
  25. int EndPos;
  26. int ParamPos;
  27. } QSPCachedStat;
  28. typedef struct
  29. {
  30. QSP_CHAR *Str;
  31. int LineNum;
  32. QSP_BOOL IsMultiline;
  33. QSP_CHAR *Label;
  34. QSPCachedStat *Stats;
  35. int StatsCount;
  36. } QSPLineOfCode;
  37. /* External functions */
  38. void qspFreePrepLines(QSPLineOfCode *, int);
  39. void qspCopyPrepLines(QSPLineOfCode **, QSPLineOfCode *, int, int);
  40. QSP_CHAR *qspJoinPrepLines(QSPLineOfCode *, int, QSP_CHAR *);
  41. int qspPreprocessData(QSP_CHAR *, QSPLineOfCode **);
  42. #endif