ret = fscanf(fp, "%s %ld %ld %ld ",
type, &map->width, &map->height, &map->maxcolor);
if (ret < 4) {
- fprintf(stderr, "fscanf: %s\n", strerror(errno));
+ fprintf(stderr, "Invalid PPM file");
retval = FALSE;
goto out;
}
map->bitmap = silc_malloc(map->bitsilc_map_size);
ret = fread(map->bitmap, map->bitsilc_map_size, 1, fp);
if (ret < 0) {
- fprintf(stderr, "fscanf: %s\n", strerror(errno));
+ fprintf(stderr, "fread: %s\n", strerror(errno));
retval = FALSE;
goto out;
}
fprintf(fp, "<!-- Automatically generated by silcmap --!>\n");
fprintf(fp, "<br />\n");
- fprintf(fp, "<img src=\"%s\" usemap=\"#map\" border=\"0\">\n",
+ fprintf(fp, "<img src=\"%s\" usemap=\"#map\" class=\"silcmap\">\n",
map->writemaphtml.text);
fprintf(fp, "<map name=\"map\">\n");
- memset(url, 0, sizeof(url));
-
silc_dlist_start(map->conns);
while ((mapconn = silc_dlist_get(map->conns)) != SILC_LIST_END) {
+ memset(url, 0, sizeof(url));
if (mapconn->html_url && mapconn->html_url[0]) {
silc_strncat(url, sizeof(url), mapconn->html_url,
strlen(mapconn->html_url));
}
}
- fprintf(fp, "</map><br />\n");
+ fprintf(fp, "</map>\n");
fclose(fp);
return TRUE;