finalyze moving

This commit is contained in:
2025-03-12 14:28:04 +03:00
parent f840006398
commit 033bbce220
774 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
#include "../Utils/leak_detector.h"
#include <cstdio>
#include <cstdlib>
#include <string>
#include <vector>
#include "../Utils/errors.h"
#include "../Utils/SgUtils.h"
#include "StdCapture.h"
using namespace std;
extern int pppa_analyzer(int argv, char** argc);
int pppaAnalyzer(const char* options)
{
string optionsS(options);
vector<string> splited = splitAndArgvCreate(optionsS);
char** argv = new char* [splited.size()];
for (int z = 0; z < splited.size(); ++z)
argv[z] = (char*)splited[z].c_str();
StdCapture::Init();
string errorMessage = "";
int retCode = pppa_analyzer(splited.size(), argv);
StdCapture::EndCapture();
errorMessage = StdCapture::GetCapture();
delete []argv;
return retCode;
}
void pppaAnalyzer(int argc, char** argv)
{
int code = pppa_analyzer(argc, argv);
if (code == 0)
printf("PPPA was completed successfully\n");
else
printf("PPPA was completed with error code %d\n", code);
exit(0);
}