summaryrefslogtreecommitdiff
path: root/navit
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-01-26 16:57:41 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-01-26 16:57:41 +0000
commitfeeec1c2ccb996871dc35ee8d5e319b634cb3dba (patch)
tree83ed1cae401ef77b0ed76335fdb1c8d33e7b95ba /navit
parentdd03d2d874f3002bd4e93c2e8aed56b5ac3b132c (diff)
downloadnavit-feeec1c2ccb996871dc35ee8d5e319b634cb3dba.tar.gz
Add:Core:Possibility to log at defined position
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4048 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r--navit/navit.c16
-rw-r--r--navit/navit.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/navit/navit.c b/navit/navit.c
index 180c3c4f7..e308c5071 100644
--- a/navit/navit.c
+++ b/navit/navit.c
@@ -1235,6 +1235,22 @@ navit_textfile_debug_log(struct navit *this_, const char *fmt, ...)
}
void
+navit_textfile_debug_log_at(struct navit *this_, struct pcoord *pc, const char *fmt, ...)
+{
+ va_list ap;
+ char *str1,*str2;
+ va_start(ap, fmt);
+ if (this_->textfile_debug_log && this_->vehicle) {
+ str1=g_strdup_vprintf(fmt, ap);
+ str2=g_strdup_printf("0x%x 0x%x%s%s\n", pc->x, pc->y, strlen(str1) ? " " : "", str1);
+ log_write(this_->textfile_debug_log, str2, strlen(str2), 0);
+ g_free(str2);
+ g_free(str1);
+ }
+ va_end(ap);
+}
+
+void
navit_say(struct navit *this_, char *text)
{
if(this_->speech) {
diff --git a/navit/navit.h b/navit/navit.h
index 5cd24b948..95ba1de8d 100644
--- a/navit/navit.h
+++ b/navit/navit.h
@@ -80,6 +80,7 @@ void navit_set_destination(struct navit *this_, struct pcoord *c, const char *de
void navit_set_destinations(struct navit *this_, struct pcoord *c, int count, const char *description, int async);
int navit_check_route(struct navit *this_);
void navit_textfile_debug_log(struct navit *this_, const char *fmt, ...);
+void navit_textfile_debug_log_at(struct navit *this_, struct pcoord *pc, const char *fmt, ...);
int navit_speech_estimate(struct navit *this_, char *str);
void navit_say(struct navit *this_, char *text);
void navit_speak(struct navit *this_);