From 3ad09b41a46c45fc28623608e8ece7673b8ca49f Mon Sep 17 00:00:00 2001 From: nishi Date: Sun, 5 May 2024 07:44:27 +0000 Subject: [PATCH] fix liinks git-svn-id: file:///raid/svn-main/nishi-clover/trunk@8 cc13bd98-b292-b64a-ad22-c0789b689ca7 --- clover.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clover.c b/clover.c index d323e8e..9130933 100644 --- a/clover.c +++ b/clover.c @@ -153,6 +153,7 @@ char* page_data; char* page_icon; char* page_shortdesc; bool page_index; +bool page_do_not_index; char* page_title2; char* page_data2; @@ -169,6 +170,7 @@ static void XMLCALL xml_startelem(void* user_data, const XML_Char* el, const XML if(strcmp(el, "icon") == 0) typearr[depth] = ELEM_ICON; if(strcmp(el, "short-description") == 0) typearr[depth] = ELEM_SHORTDESC; if(strcmp(el, "index") == 0) page_index = true; + if(strcmp(el, "do-not-index") == 0) page_do_not_index = true; if(depth == 0 && typearr[depth] != ELEM_METADATA) { fprintf(stderr, "toplevel must be metadata\n"); exit(1); @@ -319,7 +321,7 @@ void scan_and_print(FILE* f, const char* path, const char* http){ XML_ParserFree(sparser); if(!page_do_not_index2){ fprintf(f, "
", http_path, http); - if(page_icon2 != NULL) fprintf(f, "", page_icon2); + if(page_icon2 != NULL) fprintf(f, "", http_path, page_icon2); if(page_icon2 != NULL) fprintf(f, " "); if(page_title2 != NULL) fprintf(f, "%s ", page_title2); if(page_icon2 == NULL) fprintf(f, ""); @@ -385,10 +387,10 @@ int parse_xml(const char* xml, const char* outdir) { } else { fprintf(f, " %s\n", title); } - fprintf(f, " \n", icon); + fprintf(f, " \n", http_path, icon); fprintf(f, " \n"); fprintf(f, " \n"); - fprintf(f, " \n", http_path, icon); + fprintf(f, " \n", http_path, http_path, icon); if(page_icon != NULL){ char* from_path = concat3_str(static_dir, "/", page_icon); char* to_path = concat3_str(output_dir, "/static/", page_icon); -- 2.43.0