/[zanavi_public1]/navit/navit/debug.c
ZANavi

Diff of /navit/navit/debug.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 50 Revision 51
63static GHashTable *debug_hash; 63static GHashTable *debug_hash;
64static gchar *gdb_program; 64static gchar *gdb_program;
65 65
66static FILE *debug_fp; 66static FILE *debug_fp;
67 67
68// func def ------ this is bad!!
69void android_send_generic_text(int id, char *text);
70// func def ------ this is bad!!
71
68#if defined(_WIN32) || defined(__CEGCC__) 72#if defined(_WIN32) || defined(__CEGCC__)
69 73
70static void sigsegv(int sig) 74static void sigsegv(int sig)
71{ 75{
72} 76}
363#endif 367#endif
364 } 368 }
365} 369}
366 370
367 371
372void debug_for_tests_vprintf(int level, const char *fmt, va_list ap)
373{
374#ifdef _CIDEBUG_BUILD_
375#ifdef HAVE_API_ANDROID
376 char *xbuffer = g_malloc(40960);
377 xbuffer[0] = '\0';
378 vsprintf(xbuffer, fmt, ap);
379 android_send_generic_text(32, xbuffer);
380 g_free(xbuffer);
381#endif
382#endif
383}
384
385
386void debug_for_tests_printf(int level, const char *fmt, ...)
387{
388#ifdef _CIDEBUG_BUILD_
389#ifdef HAVE_API_ANDROID
390 va_list ap;
391 va_start(ap, fmt);
392 debug_for_tests_vprintf(level, fmt, ap);
393 va_end(ap);
394#endif
395#endif
396}
368 397
369void debug_printf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, ...) 398void debug_printf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, ...)
370{ 399{
371#ifdef _DEBUG_BUILD_ 400#ifdef _DEBUG_BUILD_
372 va_list ap; 401 va_list ap;
603 g_free(gdb_program); 632 g_free(gdb_program);
604 g_hash_table_destroy(debug_hash); 633 g_hash_table_destroy(debug_hash);
605 debug_destroy(); 634 debug_destroy();
606} 635}
607 636
637

Legend:
Removed from v.50  
changed lines
  Added in v.51

   
Visit the ZANavi Wiki