diff --git a/meson.build b/meson.build index 593b686..ae81e5e 100644 --- a/meson.build +++ b/meson.build @@ -2,6 +2,8 @@ project('rcms', 'c', version : '0.1', default_options : ['warning_level=3']) +add_project_arguments('-Wfatal-errors', language : 'c') + exe = executable('rcms', 'src/main.c', 'src/rcms.c', diff --git a/src/rcms.c b/src/rcms.c index b361052..0d81f6e 100644 --- a/src/rcms.c +++ b/src/rcms.c @@ -193,7 +193,7 @@ void output_blogfile_rss(Rss*rss,char*fn) } // Read blog file, store in Rss fields - for(int i=0;i<4;++i) + for(int i=0;i<3;++i) { uint32_t sl=0; @@ -203,6 +203,17 @@ void output_blogfile_rss(Rss*rss,char*fn) rss->strings[i][sl-1]=0; } + fgets(rss->strings[3],1024,f); + while(strlen(rss->strings[3])<1024) + { + char ch[8]={fgetc(f),0}; + + if(*ch=='\n') + strcat(rss->strings[3],""); + else + strcat(rss->strings[3],ch); + } + fclose(f); printf("