summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics.c1
-rw-r--r--graphics.h2
-rw-r--r--gui/gtk/gui_gtk_menu.c2
-rw-r--r--navigation.c38
-rw-r--r--navigation.h1
-rw-r--r--profile.c2
-rw-r--r--profile.h1
7 files changed, 31 insertions, 16 deletions
diff --git a/graphics.c b/graphics.c
index 8787e05e..bae4ce23 100644
--- a/graphics.c
+++ b/graphics.c
@@ -11,6 +11,7 @@
#include "street.h"
#include "transform.h"
#include "container.h"
+#include "profile.h"
#define GC_BACKGROUND 0
diff --git a/graphics.h b/graphics.h
index d7298749..a73f1e1e 100644
--- a/graphics.h
+++ b/graphics.h
@@ -14,6 +14,8 @@ struct graphics_image {
struct graphics_image_gra *gra;
};
+void container_init_gra(struct container *co);
+
void graphics_get_view(struct container *co, long *x, long *y, unsigned long *scale);
void graphics_set_view(struct container *co, long *x, long *y, unsigned long *scale);
void graphics_resize(struct container *co, int w, int h);
diff --git a/gui/gtk/gui_gtk_menu.c b/gui/gtk/gui_gtk_menu.c
index cba1babb..088fe9d0 100644
--- a/gui/gtk/gui_gtk_menu.c
+++ b/gui/gtk/gui_gtk_menu.c
@@ -49,7 +49,7 @@ menu_window_command_key_press(GtkWidget *widget, GdkEventKey *event,
GtkWidget *win)
{
GtkWidget *text;
- unsigned const char *t;
+ const char *t;
struct container *co;
if (! strcmp(event->string,"\r")) {
diff --git a/navigation.c b/navigation.c
index feb9e385..b56e7f5b 100644
--- a/navigation.c
+++ b/navigation.c
@@ -1,6 +1,9 @@
#include <math.h>
+#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
#include "coord.h"
+#include "graphics.h"
#include "param.h"
#include "block.h"
#include "route.h"
@@ -12,6 +15,26 @@
struct data_window *navigation_window;
+
+struct navigation_item {
+ char name1[128];
+ char name2[128];
+ int length;
+ int time;
+ int crossings_start;
+ int crossings_end;
+ int angle_start;
+ int angle_end;
+ int points;
+ struct coord start;
+ struct coord end;
+};
+
+void navigation_goto(struct data_window *navigation_window, char **cols);
+int is_same_street(struct navigation_item *old, struct navigation_item *new);
+int maneuver_required(struct navigation_item *old, struct navigation_item *new, int *delta);
+void make_maneuver(struct navigation_item *old, struct navigation_item *new);
+
static int
road_angle(struct coord *c, int dir)
{
@@ -37,25 +60,10 @@ expand_str(char *str)
strcpy(str+len-4,"Strasse");
}
-struct navigation_item {
- char name1[128];
- char name2[128];
- int length;
- int time;
- int crossings_start;
- int crossings_end;
- int angle_start;
- int angle_end;
- int points;
- struct coord start;
- struct coord end;
-};
-
void
navigation_goto(struct data_window *navigation_window, char **cols)
{
extern struct container *co;
- unsigned long scale;
long x,y;
printf("goto %s\n",cols[8]);
diff --git a/navigation.h b/navigation.h
index ae39528f..c8c1c399 100644
--- a/navigation.h
+++ b/navigation.h
@@ -1 +1,2 @@
void navigation_path_description(void *route);
+
diff --git a/profile.c b/profile.c
index 35a41447..149c4ba5 100644
--- a/profile.c
+++ b/profile.c
@@ -1,5 +1,7 @@
+#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
+#include "profile.h"
void
profile_timer(char *where)
diff --git a/profile.h b/profile.h
new file mode 100644
index 00000000..50280354
--- /dev/null
+++ b/profile.h
@@ -0,0 +1 @@
+void profile_timer(char *where);