X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcmap%2Fsilcmap_html.c;h=cb3c475cbc875b38219d285202ba84f471212799;hb=ed46e908363484cad4403d6828aec342b4b82c10;hp=f565fcaab9321cae0718a04e0eec59f410a98d12;hpb=7916abc933cf6441904ef66425dcc42bb791503f;p=silc.git diff --git a/apps/silcmap/silcmap_html.c b/apps/silcmap/silcmap_html.c index f565fcaa..cb3c475c 100644 --- a/apps/silcmap/silcmap_html.c +++ b/apps/silcmap/silcmap_html.c @@ -153,7 +153,8 @@ bool silc_map_writehtml(SilcMap map, SilcMapConnection mapconn) fprintf(fp, "
\n"); begin = 0; - while (silc_gets(line, sizeof(line) - 1, pdd, pk_len + 1, &begin) != EOF) + while ((begin = silc_gets(line, sizeof(line) - 1, pdd, pk_len + 1, + begin)) != EOF) fprintf(fp, "%s
\n", line); fprintf(fp, "

\n"); @@ -287,8 +288,8 @@ bool silc_map_writehtml(SilcMap map, SilcMapConnection mapconn) fprintf(fp, "
\n"); begin = 0; - while (silc_gets(line, sizeof(line) - 1, mapconn->data.motd, - strlen(mapconn->data.motd), &begin) != EOF) + while ((begin = silc_gets(line, sizeof(line) - 1, mapconn->data.motd, + strlen(mapconn->data.motd), begin)) != EOF) fprintf(fp, "%s
\n", line); fprintf(fp, "
\n"); } @@ -373,6 +374,10 @@ bool silc_map_writemaphtml(SilcMap map) for (i = 0; i < map->writemaphtml_count; i++) { c = &map->writemaphtml[i]; + if (c->alon && c->alat) { + c->x = silc_map_lon2x(map, c->alon); + c->y = silc_map_lat2y(map, c->alat); + } /* Open for writing */ fp = fopen(c->filename, "w+"); @@ -408,6 +413,11 @@ bool silc_map_writemaphtml(SilcMap map) /* 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->alon && cmd->alat) { + cmd->x = silc_map_lon2x(map, cmd->alon); + cmd->y = silc_map_lat2y(map, cmd->alat); + } + if (cmd->draw_text) { w = strlen(cmd->text) * 5; h = map->font.height - 2;