- /* Print the positions of various items on the map into the map file */
- silc_dlist_start(mapconn->commands);
- while ((cmd = silc_dlist_get(mapconn->commands)) != SILC_LIST_END) {
- if (cmd->draw_text) {
- w = strlen(cmd->text) * 5;
- h = map->font.height - 2;
- fprintf(fp,
- "<area shape=\"rect\" coords=\"%d,%d,%d,%d\" href=\"%s\">\n",
- (int)(cmd->x - xx), (int)(cmd->y - yy), w, h, url);
+ fprintf(fp, "<!-- Automatically generated by silcmap --!>\n");
+ fprintf(fp, "<img src=\"%s\" usemap=\"#map\" class=\"silcmap\">\n",
+ c->text);
+ fprintf(fp, "<map name=\"map\">\n");
+
+ 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));
+ } else {
+ silc_dlist_start(mapconn->hostnames);
+ hostname = silc_dlist_get(mapconn->hostnames);
+ snprintf(url, sizeof(url) - 1, "%s_%d.html", hostname, mapconn->port);