|
|
|
|
|
|
|
|
|
|
|
|
|
|
// See XMLReader.hpp for details |
|
|
// See XMLReader.hpp for details |
|
|
|
|
|
|
|
|
//debug |
|
|
|
|
|
#include <iostream> |
|
|
|
|
|
//end of debug |
|
|
|
|
|
|
|
|
#include <vector> |
|
|
|
|
|
|
|
|
#include "CodeDweller/XMLReader.hpp" |
|
|
#include "CodeDweller/XMLReader.hpp" |
|
|
|
|
|
|
|
|
using namespace std; |
|
|
using namespace std; |
|
|
|
|
|
|
|
|
) { // then translate the content! |
|
|
) { // then translate the content! |
|
|
// Create the Content buffer... |
|
|
// Create the Content buffer... |
|
|
|
|
|
|
|
|
int BfrSize = Stopdex - Startdex; // How big a buffer do we need? |
|
|
|
|
|
char Bfr[BfrSize]; // Make one that size. |
|
|
|
|
|
|
|
|
int BfrSize = Stopdex - Startdex + 1; // How big a buffer do we need? |
|
|
|
|
|
vector<char> heapBfr(BfrSize, 0); // Make one that size. |
|
|
|
|
|
char *Bfr = &(heapBfr[0]); |
|
|
|
|
|
|
|
|
copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and ignore our lines. |
|
|
copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and ignore our lines. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int BfrSize = Stopdex - Startdex + 1; // How big a buffer do we need? |
|
|
int BfrSize = Stopdex - Startdex + 1; // How big a buffer do we need? |
|
|
// Add byte for null terminator. |
|
|
// Add byte for null terminator. |
|
|
char Bfr[BfrSize]; // Make one that size. |
|
|
|
|
|
|
|
|
vector<char> heapBfr(BfrSize, 0); // Make one that size. |
|
|
|
|
|
char *Bfr = &(heapBfr[0]); |
|
|
|
|
|
|
|
|
NewLines += copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and count our lines. |
|
|
NewLines += copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and count our lines. |
|
|
|
|
|
|