makefile for cgi_scripts
This commit is contained in:
40
srcs/cgi-bin/cgi_utils.hpp
Normal file
40
srcs/cgi-bin/cgi_utils.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
#ifndef CGI_UTILS_HPP
|
||||
# define CGI_UTILS_HPP
|
||||
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
# include <sstream>
|
||||
# include <vector>
|
||||
# include <stdlib.h> // getenv
|
||||
|
||||
# define CR "\r"
|
||||
# define LF "\n"
|
||||
# define CRLF CR LF
|
||||
# define CRLF_SIZE 2
|
||||
# define NPOS std::string::npos
|
||||
|
||||
# define HTML_BODY_TOP "<!DOCTYPE html>"\
|
||||
"<html>"\
|
||||
" <head>"\
|
||||
" <title>CGI</title>"\
|
||||
" </head>"\
|
||||
" <body>"\
|
||||
" <h2>cgi</h2>"
|
||||
# define HTML_BODY_BOTTOM " </body>"\
|
||||
"</html>"
|
||||
|
||||
std::string
|
||||
trim(std::string str, char del);
|
||||
|
||||
std::vector<std::string>
|
||||
split(const std::string & input, std::string delim, char ctrim = '\0');
|
||||
|
||||
std::string
|
||||
itos(int n);
|
||||
|
||||
std::string
|
||||
fill_env(std::string env, std::string tag);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user