INDEX now separate
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
nasuh-server
|
nasuh-server
|
||||||
.idea/
|
.idea/
|
||||||
|
*.0
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ enum MHD_Result
|
|||||||
size_t * upload_data_size,
|
size_t * upload_data_size,
|
||||||
void ** ptr) {
|
void ** ptr) {
|
||||||
static int dummy;
|
static int dummy;
|
||||||
const char * page = cls;
|
const char * page = INDEX;
|
||||||
struct MHD_Response * response;
|
struct MHD_Response * response;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
#ifndef NASUH_HANDLERS_H
|
#ifndef NASUH_HANDLERS_H
|
||||||
#define NASUH_HANDLERS_H
|
#define NASUH_HANDLERS_H
|
||||||
|
|
||||||
#define PAGE "<html><head><title>nasuh search engine</title>"\
|
|
||||||
"</head><body>all your programming needs</body></html>"
|
|
||||||
|
|
||||||
enum MHD_Result
|
enum MHD_Result
|
||||||
handle_all(void * cls,
|
handle_all(void * cls,
|
||||||
@@ -22,4 +20,8 @@ enum MHD_Result
|
|||||||
void ** ptr);
|
void ** ptr);
|
||||||
|
|
||||||
|
|
||||||
|
#define INDEX "<html><head><title>nasuh search engine</title>"\
|
||||||
|
"</head><body>all your programming needs</body></html>"
|
||||||
|
|
||||||
|
|
||||||
#endif //NASUH_HANDLERS_H
|
#endif //NASUH_HANDLERS_H
|
||||||
|
|||||||
BIN
handlers.o
BIN
handlers.o
Binary file not shown.
2
main.c
2
main.c
@@ -17,7 +17,7 @@ int main(int argc,
|
|||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
&handle_all,
|
&handle_all,
|
||||||
PAGE,
|
NULL,
|
||||||
MHD_OPTION_END);
|
MHD_OPTION_END);
|
||||||
if (d == NULL)
|
if (d == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user