testBatch.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2016 RWS Inc, All Rights Reserved
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of version 2 of the GNU General Public License as published by
  7. // the Free Software Foundation
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License along
  15. // with this program; if not, write to the Free Software Foundation, Inc.,
  16. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. //
  18. #include "simplebatch.h"
  19. main()
  20. {
  21. RBatch ftest("testBatch.in");
  22. ftest.configure(" \t,","~");
  23. while (ftest.GetLine() != EOF)
  24. {
  25. // Dump info:
  26. TRACE("Line %ld has %hd tokens:\n",ftest.m_lCurrentLine,ftest.m_sNumTokens);
  27. for (short i=0;i<ftest.m_sNumTokens;i++)
  28. {
  29. TRACE("\tToken #%hd at char %hd = {%s}\n",i,
  30. ftest.m_sLinePos[i],ftest.m_pszTokenList[i]);
  31. }
  32. }
  33. return 0;
  34. }