initial import

This commit is contained in:
udo
2022-01-21 09:10:38 +00:00
parent ad3d65cdac
commit c047927b18
171 changed files with 16540 additions and 1 deletions
+63
View File
@@ -0,0 +1,63 @@
#include <stdlib.h>
#include <unistd.h>
#include <iostream>
#include <filesystem>
#include <ctype.h>
#include <fstream>
#include <sys/stat.h>
#include <ctime>
#include <dlfcn.h>
#include <limits.h>
#include <algorithm>
#include <sys/stat.h>
#include <iostream>
#include "types.h"
SharedUnit::~SharedUnit()
{
if(so_handle)
{
dlclose(so_handle);
}
}
String nibble(String div, String& haystack)
{
auto pos = haystack.find(div);
if(pos == String::npos)
{
auto result = haystack;
haystack.clear();
return(result);
}
else
{
auto result = haystack.substr(0, pos);
haystack.erase(0, pos+div.length());
return(result);
}
}
void Request::invoke(String file_name)
{
DTree call_param;
compiler_invoke(this, file_name, call_param);
}
void Request::invoke(String file_name, DTree& call_param)
{
compiler_invoke(this, file_name, call_param);
}
void Request::ob_start()
{
ob_stack.push_back(new std::ostringstream());
ob = ob_stack.back();
}
Request::~Request()
{
for(auto& sockfd : resources.sockets)
close(sockfd);
}