Some more refactores, added articles functionality to web server
This commit is contained in:
@@ -26,4 +26,7 @@ typedef struct
|
||||
|
||||
#endif
|
||||
|
||||
int list_articles(article_info **articles);
|
||||
long get_article_contents(article_info *article);
|
||||
|
||||
#endif
|
23
include/articles_op/html.h
Normal file
23
include/articles_op/html.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _HTML_H
|
||||
#define _HTML_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef _ARTICLE_INFO
|
||||
#define _ARTICLE_INFO
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *title;
|
||||
long time;
|
||||
char *content;
|
||||
unsigned long length;
|
||||
} article_info;
|
||||
#endif
|
||||
|
||||
int gen_html_article(article_info article, char **out);
|
||||
int gen_html_article_list(article_info *articles, int n, char **out);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user