fix
authorNishi <nishi@nishi.boats>
Fri, 6 Sep 2024 22:31:24 +0000 (22:31 +0000)
committerNishi <nishi@nishi.boats>
Fri, 6 Sep 2024 22:31:24 +0000 (22:31 +0000)
git-svn-id: file:///raid/svn-main/nishi-clover/trunk@12 cc13bd98-b292-b64a-ad22-c0789b689ca7

clover.c

index 3171fbb92edb35f8b82246ebfe2429ba63508aa2..a822f2ad356653b7f1f2d58bb0fe7086ff7269e2 100644 (file)
--- a/clover.c
+++ b/clover.c
@@ -39,7 +39,7 @@
 
 #include <expat.h>
 
-#define CLOVER_VERSION "1.0C"
+#define CLOVER_VERSION "1.0D"
 
 char* concat_str(const char* str1, const char* str2) {
        char* r = malloc(strlen(str1) + strlen(str2) + 1);
@@ -321,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, "<dt><a href=\"%s/%s\">", http_path, http);
-                                               if(page_icon2 != NULL) fprintf(f, "<img src=\"%s/static/%s\">", http_path, page_icon2);
+                                               if(page_icon2 != NULL) fprintf(f, "<img src=\"%s/static/%s\" alt=\"%s\">", http_path, page_icon2, page_title2);
                                                if(page_icon2 != NULL) fprintf(f, "</a> ");
                                                if(page_title2 != NULL) fprintf(f, "<b>%s </b>", page_title2);
                                                if(page_icon2 == NULL) fprintf(f, "</a>");
@@ -390,7 +390,7 @@ int parse_xml(const char* xml, const char* outdir) {
                fprintf(f, "            <link rel=\"icon\" href=\"%s/static/%s\">\n", http_path, icon);
                fprintf(f, "    </head>\n");
                fprintf(f, "    <body>\n");
-               fprintf(f, "            <a href=\"%s\"><img src=\"%s/static/%s\"></a>\n", http_path, http_path, icon);
+               fprintf(f, "            <a href=\"%s\"><img src=\"%s/static/%s\" alt=\"website icon\"></a>\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);
@@ -410,7 +410,7 @@ int parse_xml(const char* xml, const char* outdir) {
                        fclose(to);
                        free(from_path);
                        free(to_path);
-                       fprintf(f, "            <img src=\"%s/static/%s\">\n", http_path, page_icon);
+                       fprintf(f, "            <img src=\"%s/static/%s\" alt=\"page icon\">\n", http_path, page_icon);
                }
                if(page_title != NULL) {
                        fprintf(f, "            <h1>%s - %s</h1>\n", title, page_title);