Added projects tab and local projects list processing. Fxed some memory errors
This commit is contained in:
33
include/articles_p/article.h
Normal file
33
include/articles_p/article.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef _ARTICLE_H
|
||||
#define _ARTICLE_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "../../include/file_op/file.h"
|
||||
#include "../../include/utils_op/utils.h"
|
||||
#include "../../include/articles_p/process_md.h"
|
||||
|
||||
#define LINE_LENGTH 512
|
||||
|
||||
#ifndef _ARTICLE_INFO
|
||||
#define _ARTICLE_INFO
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *title;
|
||||
long time;
|
||||
char *content;
|
||||
unsigned long length;
|
||||
} article_info;
|
||||
|
||||
#endif
|
||||
|
||||
int list_articles(article_info **articles);
|
||||
long get_article_contents(article_info *article);
|
||||
void free_article_info_arr(article_info **articles, int length);
|
||||
|
||||
#endif
|
23
include/articles_p/html.h
Normal file
23
include/articles_p/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
|
23
include/articles_p/process_md.h
Normal file
23
include/articles_p/process_md.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef _PROCESS_MD_H
|
||||
#define _PROCESS_MD_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef _ARTICLE_INFO
|
||||
#define _ARTICLE_INFO
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *title;
|
||||
long time;
|
||||
char *content;
|
||||
unsigned long length;
|
||||
} article_info;
|
||||
|
||||
#endif
|
||||
|
||||
int process_md(article_info article, char **out);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user