summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-07-15 07:05:49 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-07-15 07:05:49 +0000
commitc90a10c34412e02f5ff749ee243a61952f1b4053 (patch)
tree04624d0d6d5ad0b99ea49294429f041f6b17fa75
parent3ae76ea2a8eb881cec466d0672b9cc780abdeb46 (diff)
downloadnavit-c90a10c34412e02f5ff749ee243a61952f1b4053.tar.gz
Fix:Core:Some const problems
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3498 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit/debug.c2
-rw-r--r--navit/debug.h2
-rw-r--r--navit/graphics.c2
-rw-r--r--navit/graphics.h4
-rw-r--r--navit/main.c2
-rw-r--r--navit/main.h2
6 files changed, 7 insertions, 7 deletions
diff --git a/navit/debug.c b/navit/debug.c
index 158c4426d..59558b560 100644
--- a/navit/debug.c
+++ b/navit/debug.c
@@ -204,7 +204,7 @@ debug_printf(int level, const char *module, const int mlen,const char *function,
}
void
-debug_assert_fail(char *module, const int mlen,const char *function, const int flen, char *file, int line, char *expr)
+debug_assert_fail(const char *module, const int mlen,const char *function, const int flen, const char *file, int line, const char *expr)
{
debug_printf(0,module,mlen,function,flen,1,"%s:%d assertion failed:%s\n", file, line, expr);
abort();
diff --git a/navit/debug.h b/navit/debug.h
index 7a041c9f8..b452f1837 100644
--- a/navit/debug.h
+++ b/navit/debug.h
@@ -61,7 +61,7 @@ struct debug *debug_new(struct attr *parent, struct attr **attrs);
int debug_level_get(const char *name);
void debug_vprintf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, va_list ap);
void debug_printf(int level, const char *module, const int mlen, const char *function, const int flen, int prefix, const char *fmt, ...);
-void debug_assert_fail(char *module, const int mlen, const char *function, const int flen, char *file, int line, char *expr);
+void debug_assert_fail(const char *module, const int mlen, const char *function, const int flen, const char *file, int line, const char *expr);
void debug_destroy(void);
void debug_set_logfile(const char *path);
void debug_dump_mallocs(void);
diff --git a/navit/graphics.c b/navit/graphics.c
index 6103f7d57..89448f75c 100644
--- a/navit/graphics.c
+++ b/navit/graphics.c
@@ -339,7 +339,7 @@ void graphics_init(struct graphics *this_)
* @returns <>
* @author Martin Schaller (04/2008)
*/
-void * graphics_get_data(struct graphics *this_, char *type)
+void * graphics_get_data(struct graphics *this_, const char *type)
{
return (this_->meth.get_data(this_->priv, type));
}
diff --git a/navit/graphics.h b/navit/graphics.h
index 08eb38c01..f3581d692 100644
--- a/navit/graphics.h
+++ b/navit/graphics.h
@@ -64,7 +64,7 @@ struct graphics_methods {
void (*background_gc)(struct graphics_priv *gr, struct graphics_gc_priv *gc);
struct graphics_priv *(*overlay_new)(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int alpha, int wraparound);
struct graphics_image_priv *(*image_new)(struct graphics_priv *gr, struct graphics_image_methods *meth, char *path, int *w, int *h, struct point *hot, int rotation);
- void *(*get_data)(struct graphics_priv *gr, char *type);
+ void *(*get_data)(struct graphics_priv *gr, const char *type);
void (*image_free)(struct graphics_priv *gr, struct graphics_image_priv *priv);
void (*get_text_bbox)(struct graphics_priv *gr, struct graphics_font_priv *font, char *text, int dx, int dy, struct point *ret, int estimate);
void (*overlay_disable)(struct graphics_priv *gr, int disable);
@@ -143,7 +143,7 @@ int graphics_get_attr(struct graphics *this_, enum attr_type type, struct attr *
struct graphics *graphics_overlay_new(struct graphics *parent, struct point *p, int w, int h, int alpha, int wraparound);
void graphics_overlay_resize(struct graphics *this_, struct point *p, int w, int h, int alpha, int wraparound);
void graphics_init(struct graphics *this_);
-void *graphics_get_data(struct graphics *this_, char *type);
+void *graphics_get_data(struct graphics *this_, const char *type);
void graphics_add_callback(struct graphics *this_, struct callback *cb);
void graphics_remove_callback(struct graphics *this_, struct callback *cb);
struct graphics_font *graphics_font_new(struct graphics *gra, int size, int flags);
diff --git a/navit/main.c b/navit/main.c
index 0bc92a0ad..a85de8f7c 100644
--- a/navit/main.c
+++ b/navit/main.c
@@ -161,7 +161,7 @@ win_set_nls(void)
#endif
void
-main_init(char *program)
+main_init(const char *program)
{
char *s;
int l;
diff --git a/navit/main.h b/navit/main.h
index 3f4dc0981..47f275c09 100644
--- a/navit/main.h
+++ b/navit/main.h
@@ -35,7 +35,7 @@ void main_add_navit(struct navit *nav);
void main_remove_navit(struct navit *nav);
int main_add_attr(struct attr *attr);
int main_remove_attr(struct attr *attr);
-void main_init(char *program);
+void main_init(const char *program);
void main_init_nls(void);
int main(int argc, char **argv);
/* end of prototypes */