projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SILC Map distribution added.
[silc.git]
/
apps
/
silcmap
/
silcmap_html.c
diff --git
a/apps/silcmap/silcmap_html.c
b/apps/silcmap/silcmap_html.c
index f565fcaab9321cae0718a04e0eec59f410a98d12..cb3c475cbc875b38219d285202ba84f471212799 100644
(file)
--- 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, "<br /><tt><small>\n");
begin = 0;
fprintf(fp, "<br /><tt><small>\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<br />\n", line);
fprintf(fp, "</small></tt><br />\n");
fprintf(fp, "%s<br />\n", line);
fprintf(fp, "</small></tt><br />\n");
@@
-287,8
+288,8
@@
bool silc_map_writehtml(SilcMap map, SilcMapConnection mapconn)
fprintf(fp, "<br /><tt><small>\n");
begin = 0;
fprintf(fp, "<br /><tt><small>\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<br />\n", line);
fprintf(fp, "</small></tt>\n");
}
fprintf(fp, "%s<br />\n", line);
fprintf(fp, "</small></tt>\n");
}
@@
-373,6
+374,10
@@
bool silc_map_writemaphtml(SilcMap map)
for (i = 0; i < map->writemaphtml_count; i++) {
c = &map->writemaphtml[i];
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+");
/* 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) {
/* 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;
if (cmd->draw_text) {
w = strlen(cmd->text) * 5;
h = map->font.height - 2;