Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-05 15:04:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-05 15:04:28 +0400
commit33accdb725bb7e5bb133b17faa2cc6191eca73ef (patch)
treed7691f0ba464750a641ec2f3a8d5875a00f95151 /source
parent45b8a61bf39dade4efcad16c26324d1cb2e95d48 (diff)
use (const char*) rather than (char*) where possible.
also removed some unused function definitons.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_animsys.h4
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/BKE_customdata_file.h10
-rw-r--r--source/blender/blenkernel/BKE_lattice.h20
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h2
-rw-r--r--source/blender/blenkernel/BKE_property.h7
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h2
-rw-r--r--source/blender/blenkernel/BKE_text.h2
-rw-r--r--source/blender/blenkernel/BKE_unit.h4
-rw-r--r--source/blender/blenkernel/BKE_writeffmpeg.h2
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c10
-rw-r--r--source/blender/blenkernel/intern/blender.c2
-rw-r--r--source/blender/blenkernel/intern/customdata_file.c10
-rw-r--r--source/blender/blenkernel/intern/fcurve.c4
-rw-r--r--source/blender/blenkernel/intern/lattice.c6
-rw-r--r--source/blender/blenkernel/intern/pointcache.c6
-rw-r--r--source/blender/blenkernel/intern/property.c6
-rw-r--r--source/blender/blenkernel/intern/sequencer.c6
-rw-r--r--source/blender/blenkernel/intern/text.c2
-rw-r--r--source/blender/blenkernel/intern/unit.c16
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c2
-rw-r--r--source/blender/editors/armature/armature_intern.h6
-rw-r--r--source/blender/editors/armature/editarmature.c6
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c2
-rw-r--r--source/blender/editors/armature/poseUtils.c2
-rw-r--r--source/blender/editors/include/ED_armature.h4
-rw-r--r--source/blender/editors/include/ED_fluidsim.h5
-rw-r--r--source/blender/editors/include/ED_logic.h3
-rw-r--r--source/blender/editors/include/ED_particle.h2
-rw-r--r--source/blender/editors/include/ED_transform.h4
-rw-r--r--source/blender/editors/include/UI_interface.h2
-rw-r--r--source/blender/editors/physics/particle_edit.c2
-rw-r--r--source/blender/editors/space_file/filelist.c4
-rw-r--r--source/blender/editors/space_file/filelist.h2
-rw-r--r--source/blender/editors/space_image/image_draw.c2
-rw-r--r--source/blender/editors/space_image/image_intern.h2
-rw-r--r--source/blender/editors/space_node/drawnode.c2
-rw-r--r--source/blender/editors/space_node/node_intern.h2
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c7
-rw-r--r--source/blender/editors/transform/transform.c2
-rw-r--r--source/blender/editors/util/editmode_undo.c2
-rw-r--r--source/blender/editors/util/undo.c2
-rw-r--r--source/blender/editors/util/util_intern.h2
43 files changed, 90 insertions, 102 deletions
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index cba6b0ef257..8e5b313b919 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -105,10 +105,10 @@ void BKE_keyingsets_free(struct ListBase *list);
/* Path Fixing API */
/* Fix all the paths for the given ID+AnimData */
-void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, const char *prefix, char *oldName, char *newName, int oldSubscript, int newSubscript, int verify_paths);
+void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, int verify_paths);
/* Fix all the paths for the entire database... */
-void BKE_all_animdata_fix_paths_rename(char *prefix, char *oldName, char *newName);
+void BKE_all_animdata_fix_paths_rename(const char *prefix, const char *oldName, const char *newName);
/* -------------------------------------- */
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 9b28f083a24..7033a2e0cce 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -87,7 +87,7 @@ extern int BKE_undo_valid(const char *name);
extern void BKE_reset_undo(void);
extern char *BKE_undo_menu_string(void);
extern void BKE_undo_number(struct bContext *C, int nr);
-extern char *BKE_undo_get_name(int nr, int *active);
+extern const char *BKE_undo_get_name(int nr, int *active);
extern void BKE_undo_save_quit(void);
extern struct Main *BKE_undo_get_main(struct Scene **scene);
diff --git a/source/blender/blenkernel/BKE_customdata_file.h b/source/blender/blenkernel/BKE_customdata_file.h
index f32a4b1e6a8..be7aaa70188 100644
--- a/source/blender/blenkernel/BKE_customdata_file.h
+++ b/source/blender/blenkernel/BKE_customdata_file.h
@@ -40,22 +40,22 @@ void cdf_free(CDataFile *cdf);
/* File read/write/remove */
-int cdf_read_open(CDataFile *cdf, char *filename);
+int cdf_read_open(CDataFile *cdf, const char *filename);
int cdf_read_layer(CDataFile *cdf, CDataFileLayer *blay);
int cdf_read_data(CDataFile *cdf, unsigned int size, void *data);
void cdf_read_close(CDataFile *cdf);
-int cdf_write_open(CDataFile *cdf, char *filename);
+int cdf_write_open(CDataFile *cdf, const char *filename);
int cdf_write_layer(CDataFile *cdf, CDataFileLayer *blay);
int cdf_write_data(CDataFile *cdf, unsigned int size, void *data);
void cdf_write_close(CDataFile *cdf);
-void cdf_remove(char *filename);
+void cdf_remove(const char *filename);
/* Layers */
-CDataFileLayer *cdf_layer_find(CDataFile *cdf, int type, char *name);
-CDataFileLayer *cdf_layer_add(CDataFile *cdf, int type, char *name, size_t datasize);
+CDataFileLayer *cdf_layer_find(CDataFile *cdf, int type, const char *name);
+CDataFileLayer *cdf_layer_add(CDataFile *cdf, int type, const char *name, size_t datasize);
#endif /* BKE_CUSTOMDATA_FILE_H */
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h
index 57c05637d50..dcca857179c 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -55,19 +55,19 @@ void end_latt_deform(struct Object *);
int object_deform_mball(struct Object *ob, struct ListBase *dispbase);
void outside_lattice(struct Lattice *lt);
-void curve_deform_verts(struct Scene *scene, struct Object *cuOb, struct Object *target,
- struct DerivedMesh *dm, float (*vertexCos)[3],
- int numVerts, char *vgroup, short defaxis);
-void curve_deform_vector(struct Scene *scene, struct Object *cuOb, struct Object *target,
- float *orco, float *vec, float mat[][3], int no_rot_axis);
+void curve_deform_verts(struct Scene *scene, struct Object *cuOb, struct Object *target,
+ struct DerivedMesh *dm, float (*vertexCos)[3],
+ int numVerts, const char *vgroup, short defaxis);
+void curve_deform_vector(struct Scene *scene, struct Object *cuOb, struct Object *target,
+ float *orco, float *vec, float mat[][3], int no_rot_axis);
void lattice_deform_verts(struct Object *laOb, struct Object *target,
- struct DerivedMesh *dm, float (*vertexCos)[3],
- int numVerts, char *vgroup);
+ struct DerivedMesh *dm, float (*vertexCos)[3],
+ int numVerts, const char *vgroup);
void armature_deform_verts(struct Object *armOb, struct Object *target,
- struct DerivedMesh *dm, float (*vertexCos)[3],
- float (*defMats)[3][3], int numVerts, int deformflag,
- float (*prevCos)[3], const char *defgrp_name);
+ struct DerivedMesh *dm, float (*vertexCos)[3],
+ float (*defMats)[3][3], int numVerts, int deformflag,
+ float (*prevCos)[3], const char *defgrp_name);
float (*lattice_getVertexCos(struct Object *ob, int *numVerts_r))[3];
void lattice_applyVertexCos(struct Object *ob, float (*vertexCos)[3]);
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 110e6e851c8..28ca1006a03 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -323,7 +323,7 @@ void BKE_ptcache_mem_to_disk(struct PTCacheID *pid);
void BKE_ptcache_toggle_disk_cache(struct PTCacheID *pid);
/* Rename all disk cache files with a new name. Doesn't touch the actual content of the files. */
-void BKE_ptcache_disk_cache_rename(struct PTCacheID *pid, char *from, char *to);
+void BKE_ptcache_disk_cache_rename(struct PTCacheID *pid, const char *name_src, const char *name_dst);
/* Loads simulation from external (disk) cache files. */
void BKE_ptcache_load_external(struct PTCacheID *pid);
diff --git a/source/blender/blenkernel/BKE_property.h b/source/blender/blenkernel/BKE_property.h
index ce0ea3dcc9a..779c83acf21 100644
--- a/source/blender/blenkernel/BKE_property.h
+++ b/source/blender/blenkernel/BKE_property.h
@@ -44,11 +44,10 @@ struct bProperty *new_property(int type);
void unique_property(struct bProperty *first, struct bProperty *prop, int force);
struct bProperty *get_ob_property(struct Object *ob, const char *name);
void set_ob_property(struct Object *ob, struct bProperty *propc);
-int compare_property(struct bProperty *prop, char *str);
-void set_property(struct bProperty *prop, char *str);
-void add_property(struct bProperty *prop, char *str);
+int compare_property(struct bProperty *prop, const char *str);
+void set_property(struct bProperty *prop, const char *str);
+void add_property(struct bProperty *prop, const char *str);
void set_property_valstr(struct bProperty *prop, char *str);
void cp_property(struct bProperty *prop1, struct bProperty *prop2);
#endif
-
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index 917b62c27cf..a16e55ce8ff 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -274,7 +274,7 @@ struct Sequence *seq_metastrip(
struct Sequence * meta /* = NULL */, struct Sequence *seq);
void seq_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs);
-void seq_dupe_animdata(struct Scene *scene, char *name_from, char *name_to);
+void seq_dupe_animdata(struct Scene *scene, const char *name_src, const char *name_dst);
int shuffle_seq(struct ListBase * seqbasep, struct Sequence *test, struct Scene *evil_scene);
int shuffle_seq_time(ListBase * seqbasep, struct Scene *evil_scene);
int seqbase_isolated_sel_check(struct ListBase *seqbase);
diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h
index 2a613522686..a951347d946 100644
--- a/source/blender/blenkernel/BKE_text.h
+++ b/source/blender/blenkernel/BKE_text.h
@@ -56,7 +56,7 @@ void write_text(struct Text *text, const char *str);
char* txt_to_buf (struct Text *text);
void txt_clean_text (struct Text *text);
void txt_order_cursors (struct Text *text);
-int txt_find_string (struct Text *text, char *findstr, int wrap, int match_case);
+int txt_find_string (struct Text *text, const char *findstr, int wrap, int match_case);
int txt_has_sel (struct Text *text);
int txt_get_span (struct TextLine *from, struct TextLine *to);
void txt_move_up (struct Text *text, short sel);
diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h
index 1f54e4eeef0..db586f6d262 100644
--- a/source/blender/blenkernel/BKE_unit.h
+++ b/source/blender/blenkernel/BKE_unit.h
@@ -37,10 +37,10 @@ extern "C" {
void bUnit_AsString(char *str, int len_max, double value, int prec, int system, int type, int split, int pad);
/* replace units with values, used before python button evaluation */
-int bUnit_ReplaceString(char *str, int len_max, char *str_prev, double scale_pref, int system, int type);
+int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double scale_pref, int system, int type);
/* make string keyboard-friendly: 10µm --> 10um */
-void bUnit_ToUnitAltName(char *str, int len_max, char *orig_str, int system, int type);
+void bUnit_ToUnitAltName(char *str, int len_max, const char *orig_str, int system, int type);
/* the size of the unit used for this value (used for calculating the ckickstep) */
double bUnit_ClosestScalar(double value, int system, int type);
diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h
index 2b10f1b246c..3263a1659f3 100644
--- a/source/blender/blenkernel/BKE_writeffmpeg.h
+++ b/source/blender/blenkernel/BKE_writeffmpeg.h
@@ -74,7 +74,7 @@ void filepath_ffmpeg(char* string, struct RenderData* rd);
extern void ffmpeg_set_preset(struct RenderData *rd, int preset);
extern void ffmpeg_verify_image_type(struct RenderData *rd);
-extern struct IDProperty *ffmpeg_property_add(struct RenderData *Rd, char *type, int opt_index, int parent_index);
+extern struct IDProperty *ffmpeg_property_add(struct RenderData *Rd, const char *type, int opt_index, int parent_index);
extern int ffmpeg_property_add_string(struct RenderData *rd, const char *type, const char *str);
extern void ffmpeg_property_del(struct RenderData *rd, void *type, void *prop_);
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 6d94b42a7ac..63ab74fc105 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -545,7 +545,7 @@ void BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepath
/* Path Validation -------------------------------------------- */
/* Check if a given RNA Path is valid, by tracing it from the given ID, and seeing if we can resolve it */
-static short check_rna_path_is_valid (ID *owner_id, char *path)
+static short check_rna_path_is_valid (ID *owner_id, const char *path)
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop=NULL;
@@ -560,7 +560,7 @@ static short check_rna_path_is_valid (ID *owner_id, char *path)
/* Check if some given RNA Path needs fixing - free the given path and set a new one as appropriate
* NOTE: we assume that oldName and newName have [" "] padding around them
*/
-static char *rna_path_rename_fix (ID *owner_id, const char *prefix, char *oldName, char *newName, char *oldpath, int verify_paths)
+static char *rna_path_rename_fix (ID *owner_id, const char *prefix, const char *oldName, const char *newName, char *oldpath, int verify_paths)
{
char *prefixPtr= strstr(oldpath, prefix);
char *oldNamePtr= strstr(oldpath, oldName);
@@ -631,7 +631,7 @@ static void fcurves_path_rename_fix (ID *owner_id, const char *prefix, char *old
}
/* Check RNA-Paths for a list of Drivers */
-static void drivers_path_rename_fix (ID *owner_id, const char *prefix, char *oldName, char *newName, char *oldKey, char *newKey, ListBase *curves, int verify_paths)
+static void drivers_path_rename_fix (ID *owner_id, const char *prefix, const char *oldName, const char *newName, const char *oldKey, const char *newKey, ListBase *curves, int verify_paths)
{
FCurve *fcu;
@@ -691,7 +691,7 @@ static void nlastrips_path_rename_fix (ID *owner_id, const char *prefix, char *o
* NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]>
* i.e. pose.bones["Bone"]
*/
-void BKE_animdata_fix_paths_rename (ID *owner_id, AnimData *adt, const char *prefix, char *oldName, char *newName, int oldSubscript, int newSubscript, int verify_paths)
+void BKE_animdata_fix_paths_rename (ID *owner_id, AnimData *adt, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, int verify_paths)
{
NlaTrack *nlt;
char *oldN, *newN;
@@ -808,7 +808,7 @@ void BKE_animdata_main_cb (Main *mainptr, ID_AnimData_Edit_Callback func, void *
* i.e. pose.bones["Bone"]
*/
/* TODO: use BKE_animdata_main_cb for looping over all data */
-void BKE_all_animdata_fix_paths_rename (char *prefix, char *oldName, char *newName)
+void BKE_all_animdata_fix_paths_rename (const char *prefix, const char *oldName, const char *newName)
{
Main *mainptr= G.main;
ID *id;
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index d68b0b361d1..0e8d598da3d 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -663,7 +663,7 @@ int BKE_undo_valid(const char *name)
/* get name of undo item, return null if no item with this index */
/* if active pointer, set it to 1 if true */
-char *BKE_undo_get_name(int nr, int *active)
+const char *BKE_undo_get_name(int nr, int *active)
{
UndoElem *uel= BLI_findlink(&undobase, nr);
diff --git a/source/blender/blenkernel/intern/customdata_file.c b/source/blender/blenkernel/intern/customdata_file.c
index d65f08ed7a3..75898018a2b 100644
--- a/source/blender/blenkernel/intern/customdata_file.c
+++ b/source/blender/blenkernel/intern/customdata_file.c
@@ -273,7 +273,7 @@ static int cdf_write_header(CDataFile *cdf)
return 1;
}
-int cdf_read_open(CDataFile *cdf, char *filename)
+int cdf_read_open(CDataFile *cdf, const char *filename)
{
FILE *f;
@@ -341,7 +341,7 @@ void cdf_read_close(CDataFile *cdf)
}
}
-int cdf_write_open(CDataFile *cdf, char *filename)
+int cdf_write_open(CDataFile *cdf, const char *filename)
{
CDataFileHeader *header;
CDataFileImageHeader *image;
@@ -405,14 +405,14 @@ void cdf_write_close(CDataFile *cdf)
}
}
-void cdf_remove(char *filename)
+void cdf_remove(const char *filename)
{
BLI_delete(filename, 0, 0);
}
/********************************** Layers ***********************************/
-CDataFileLayer *cdf_layer_find(CDataFile *cdf, int type, char *name)
+CDataFileLayer *cdf_layer_find(CDataFile *cdf, int type, const char *name)
{
CDataFileLayer *layer;
int a;
@@ -427,7 +427,7 @@ CDataFileLayer *cdf_layer_find(CDataFile *cdf, int type, char *name)
return NULL;
}
-CDataFileLayer *cdf_layer_add(CDataFile *cdf, int type, char *name, size_t datasize)
+CDataFileLayer *cdf_layer_add(CDataFile *cdf, int type, const char *name, size_t datasize)
{
CDataFileLayer *newlayer, *layer;
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 474b3a5ce63..5ab997d2c54 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -184,7 +184,7 @@ FCurve *id_data_find_fcurve(ID *id, void *data, StructRNA *type, const char *pro
char *path;
if(driven)
- *driven = 0;
+ *driven = FALSE;
/* only use the current action ??? */
if (ELEM(NULL, adt, adt->action))
@@ -205,7 +205,7 @@ FCurve *id_data_find_fcurve(ID *id, void *data, StructRNA *type, const char *pro
if ((fcu == NULL) && (adt->drivers.first)) {
fcu= list_find_fcurve(&adt->drivers, path, index);
if(fcu && driven)
- *driven = 1;
+ *driven = TRUE;
fcu = NULL;
}
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 47878242604..cef23ac3824 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -658,7 +658,9 @@ static int calc_curve_deform(Scene *scene, Object *par, float *co, short axis, C
return 0;
}
-void curve_deform_verts(Scene *scene, Object *cuOb, Object *target, DerivedMesh *dm, float (*vertexCos)[3], int numVerts, char *vgroup, short defaxis)
+void curve_deform_verts(Scene *scene, Object *cuOb, Object *target,
+ DerivedMesh *dm, float (*vertexCos)[3],
+ int numVerts, const char *vgroup, short defaxis)
{
Curve *cu;
int a, flag;
@@ -817,7 +819,7 @@ void curve_deform_vector(Scene *scene, Object *cuOb, Object *target, float *orco
}
void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts, char *vgroup)
+ float (*vertexCos)[3], int numVerts, const char *vgroup)
{
int a;
int use_vgroups;
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index fa9d94eb24d..ae12ad8e66f 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -2875,7 +2875,7 @@ void BKE_ptcache_toggle_disk_cache(PTCacheID *pid)
BKE_ptcache_update_info(pid);
}
-void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
+void BKE_ptcache_disk_cache_rename(PTCacheID *pid, const char *name_src, const char *name_dst)
{
char old_name[80];
int len; /* store the length of the string */
@@ -2892,7 +2892,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
BLI_strncpy(old_name, pid->cache->name, sizeof(old_name));
/* get "from" filename */
- BLI_strncpy(pid->cache->name, from, sizeof(pid->cache->name));
+ BLI_strncpy(pid->cache->name, name_src, sizeof(pid->cache->name));
len = ptcache_filename(pid, old_filename, 0, 0, 0); /* no path */
@@ -2906,7 +2906,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
BLI_snprintf(ext, sizeof(ext), "_%02u"PTCACHE_EXT, pid->stack_index);
/* put new name into cache */
- BLI_strncpy(pid->cache->name, to, sizeof(pid->cache->name));
+ BLI_strncpy(pid->cache->name, name_dst, sizeof(pid->cache->name));
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* do we have the right extension?*/
diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c
index f9d470e48d8..d6c4b5f3a2e 100644
--- a/source/blender/blenkernel/intern/property.c
+++ b/source/blender/blenkernel/intern/property.c
@@ -200,7 +200,7 @@ void set_ob_property(Object *ob, bProperty *propc)
/* negative: prop is smaller
* positive: prop is larger
*/
-int compare_property(bProperty *prop, char *str)
+int compare_property(bProperty *prop, const char *str)
{
// extern int Gdfra; /* sector.c */
float fvalue, ftest;
@@ -237,7 +237,7 @@ int compare_property(bProperty *prop, char *str)
return 0;
}
-void set_property(bProperty *prop, char *str)
+void set_property(bProperty *prop, const char *str)
{
// extern int Gdfra; /* sector.c */
@@ -261,7 +261,7 @@ void set_property(bProperty *prop, char *str)
}
-void add_property(bProperty *prop, char *str)
+void add_property(bProperty *prop, const char *str)
{
// extern int Gdfra; /* sector.c */
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 6b319e6b5e1..9bde9374ab7 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -3404,7 +3404,7 @@ void seq_offset_animdata(Scene *scene, Sequence *seq, int ofs)
}
}
-void seq_dupe_animdata(Scene *scene, char *name_from, char *name_to)
+void seq_dupe_animdata(Scene *scene, const char *name_src, const char *name_dst)
{
char str_from[32];
FCurve *fcu;
@@ -3415,7 +3415,7 @@ void seq_dupe_animdata(Scene *scene, char *name_from, char *name_to)
if(scene->adt==NULL || scene->adt->action==NULL)
return;
- sprintf(str_from, "[\"%s\"]", name_from);
+ sprintf(str_from, "[\"%s\"]", name_src);
fcu_last= scene->adt->action->curves.last;
@@ -3427,7 +3427,7 @@ void seq_dupe_animdata(Scene *scene, char *name_from, char *name_to)
}
/* notice validate is 0, keep this because the seq may not be added to the scene yet */
- BKE_animdata_fix_paths_rename(&scene->id, scene->adt, "sequence_editor.sequences_all", name_from, name_to, 0, 0, 0);
+ BKE_animdata_fix_paths_rename(&scene->id, scene->adt, "sequence_editor.sequences_all", name_src, name_dst, 0, 0, 0);
/* add the original fcurves back */
BLI_movelisttolist(&scene->adt->action->curves, &lb);
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 69af2570d0c..955127a8000 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -1234,7 +1234,7 @@ char *txt_to_buf (Text *text)
return buf;
}
-int txt_find_string(Text *text, char *findstr, int wrap, int match_case)
+int txt_find_string(Text *text, const char *findstr, int wrap, int match_case)
{
TextLine *tl, *startl;
char *s= NULL;
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index 01b090f2967..616c27f6b0b 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -426,9 +426,9 @@ void bUnit_AsString(char *str, int len_max, double value, int prec, int system,
}
-static char *unit_find_str(char *str, const char *substr)
+static const char *unit_find_str(const char *str, const char *substr)
{
- char *str_found;
+ const char *str_found;
if(substr && substr[0] != '\0') {
str_found= strstr(str, substr);
@@ -485,7 +485,7 @@ static int unit_scale_str(char *str, int len_max, char *str_tmp, double scale_pr
{
char *str_found;
- if((len_max>0) && (str_found= unit_find_str(str, replace_str))) { /* XXX - investigate, does not respect len_max properly */
+ if((len_max>0) && (str_found= (char *)unit_find_str(str, replace_str))) { /* XXX - investigate, does not respect len_max properly */
int len, len_num, len_name, len_move, found_ofs;
found_ofs = (int)(str_found-str);
@@ -537,7 +537,7 @@ static int unit_replace(char *str, int len_max, char *str_tmp, double scale_pref
return ofs;
}
-static int unit_find(char *str, bUnitDef *unit)
+static int unit_find(const char *str, bUnitDef *unit)
{
if (unit_find_str(str, unit->name_short)) return 1;
if (unit_find_str(str, unit->name_plural)) return 1;
@@ -562,7 +562,7 @@ static int unit_find(char *str, bUnitDef *unit)
*
* return true of a change was made.
*/
-int bUnit_ReplaceString(char *str, int len_max, char *str_prev, double scale_pref, int system, int type)
+int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double scale_pref, int system, int type)
{
bUnitCollection *usys = unit_get_system(system, type);
@@ -676,7 +676,7 @@ int bUnit_ReplaceString(char *str, int len_max, char *str_prev, double scale_pre
}
/* 45µm --> 45um */
-void bUnit_ToUnitAltName(char *str, int len_max, char *orig_str, int system, int type)
+void bUnit_ToUnitAltName(char *str, int len_max, const char *orig_str, int system, int type)
{
bUnitCollection *usys = unit_get_system(system, type);
@@ -687,9 +687,7 @@ void bUnit_ToUnitAltName(char *str, int len_max, char *orig_str, int system, int
for(unit= usys->units; unit->name; unit++) {
if(len_max > 0 && (unit->name_alt || unit == unit_def))
{
- char *found= NULL;
-
- found= unit_find_str(orig_str, unit->name_short);
+ const char *found= unit_find_str(orig_str, unit->name_short);
if(found) {
int offset= (int)(found - orig_str);
int len_name= 0;
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index da1412dac0d..2646f5164b2 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -1046,7 +1046,7 @@ void ffmpeg_property_del(RenderData *rd, void *type, void *prop_)
}
}
-IDProperty *ffmpeg_property_add(RenderData *rd, char * type, int opt_index, int parent_index)
+IDProperty *ffmpeg_property_add(RenderData *rd, const char *type, int opt_index, int parent_index)
{
AVCodecContext c;
const AVOption * o;
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h
index 47123b7fb4d..87254c20c0f 100644
--- a/source/blender/editors/armature/armature_intern.h
+++ b/source/blender/editors/armature/armature_intern.h
@@ -173,7 +173,7 @@ void poseAnim_mapping_refresh(struct bContext *C, struct Scene *scene, struct Ob
void poseAnim_mapping_reset(ListBase *pfLinks);
void poseAnim_mapping_autoKeyframe(struct bContext *C, struct Scene *scene, struct Object *ob, ListBase *pfLinks, float cframe);
-LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, char *path);
+LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path);
/* ******************************************************* */
/* PoseLib */
@@ -209,13 +209,13 @@ void BIF_sk_selectStroke(struct bContext *C, const int mval[2], short extend);
/* duplicate method */
void preEditBoneDuplicate(struct ListBase *editbones);
-struct EditBone *duplicateEditBone(struct EditBone *curBone, char *name, struct ListBase *editbones, struct Object *ob);
+struct EditBone *duplicateEditBone(struct EditBone *curBone, const char *name, struct ListBase *editbones, struct Object *ob);
void updateDuplicateSubtarget(struct EditBone *dupBone, struct ListBase *editbones, struct Object *ob);
/* duplicate method (cross objects */
/* editbones is the target list */
-struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone, char *name, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
+struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone, const char *name, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
/* editbones is the source list */
void updateDuplicateSubtargetObjects(struct EditBone *dupBone, struct ListBase *editbones, struct Object *src_ob, struct Object *dst_ob);
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 15c8868f9b9..7376b2e804c 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -2523,7 +2523,7 @@ void updateDuplicateSubtarget(EditBone *dupBone, ListBase *editbones, Object *ob
}
-EditBone *duplicateEditBoneObjects(EditBone *curBone, char *name, ListBase *editbones, Object *src_ob, Object *dst_ob)
+EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase *editbones, Object *src_ob, Object *dst_ob)
{
EditBone *eBone = MEM_mallocN(sizeof(EditBone), "addup_editbone");
@@ -2567,7 +2567,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, char *name, ListBase *edit
return eBone;
}
-EditBone *duplicateEditBone(EditBone *curBone, char *name, ListBase *editbones, Object *ob)
+EditBone *duplicateEditBone(EditBone *curBone, const char *name, ListBase *editbones, Object *ob)
{
return duplicateEditBoneObjects(curBone, name, editbones, ob, ob);
}
@@ -5319,7 +5319,7 @@ static void constraint_bone_name_fix(Object *ob, ListBase *conlist, char *oldnam
/* called by UI for renaming a bone */
/* warning: make sure the original bone was not renamed yet! */
/* seems messy, but thats what you get with not using pointers but channel names :) */
-void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
+void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *newnamep)
{
Object *ob;
char newname[MAXBONENAME];
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 31be1efdc1f..d228d4d3772 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -187,7 +187,7 @@ void BIF_makeListTemplates(const bContext *C)
}
}
-char *BIF_listTemplates(const bContext *UNUSED(C))
+const char *BIF_listTemplates(const bContext *UNUSED(C))
{
GHashIterator ghi;
char menu_header[] = "Template%t|None%x0|";
diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c
index 71cdda7fe15..1a9ff73e5dc 100644
--- a/source/blender/editors/armature/poseUtils.c
+++ b/source/blender/editors/armature/poseUtils.c
@@ -262,7 +262,7 @@ void poseAnim_mapping_autoKeyframe (bContext *C, Scene *scene, Object *ob, ListB
/* find the next F-Curve for a PoseChannel with matching path...
* - path is not just the pfl rna_path, since that path doesn't have property info yet
*/
-LinkData *poseAnim_mapping_getNextFCurve (ListBase *fcuLinks, LinkData *prev, char *path)
+LinkData *poseAnim_mapping_getNextFCurve (ListBase *fcuLinks, LinkData *prev, const char *path)
{
LinkData *first= (prev)? prev->next : (fcuLinks)? fcuLinks->first : NULL;
LinkData *ld;
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 121c53f7c65..2e9186b6c2f 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -141,7 +141,7 @@ void create_vgroups_from_armature(struct ReportList *reports, struct Scene *scen
void auto_align_armature(struct Scene *scene, struct View3D *v3d, short mode);
void unique_editbone_name(struct ListBase *ebones, char *name, EditBone *bone); /* if bone is already in list, pass it as param to ignore it */
-void ED_armature_bone_rename(struct bArmature *arm, char *oldnamep, char *newnamep);
+void ED_armature_bone_rename(struct bArmature *arm, const char *oldnamep, const char *newnamep);
void undo_push_armature(struct bContext *C, const char *name);
@@ -163,7 +163,7 @@ void BIF_deleteSketch(struct bContext *C);
void BIF_selectAllSketch(struct bContext *C, int mode); /* -1: deselect, 0: select, 1: toggle */
void BIF_makeListTemplates(const struct bContext *C);
-char *BIF_listTemplates(const struct bContext *C);
+const char *BIF_listTemplates(const struct bContext *C);
int BIF_currentTemplate(const struct bContext *C);
void BIF_freeTemplates(struct bContext *C);
void BIF_setTemplate(struct bContext *C, int index);
diff --git a/source/blender/editors/include/ED_fluidsim.h b/source/blender/editors/include/ED_fluidsim.h
index f48b5df56c0..d47ba2bfba9 100644
--- a/source/blender/editors/include/ED_fluidsim.h
+++ b/source/blender/editors/include/ED_fluidsim.h
@@ -48,9 +48,4 @@ void fluidsimSettingsFree(struct FluidsimSettings* sb);
/* duplicate internal data */
struct FluidsimSettings* fluidsimSettingsCopy(struct FluidsimSettings* sb);
-/* memory estimate */
-void fluidsimEstimateMemory(struct Object *ob, struct FluidsimSettings *fs, char *value);
-
#endif /* ED_FLUIDSIM_H */
-
-
diff --git a/source/blender/editors/include/ED_logic.h b/source/blender/editors/include/ED_logic.h
index e6026eb5fee..ce1f2b8faac 100644
--- a/source/blender/editors/include/ED_logic.h
+++ b/source/blender/editors/include/ED_logic.h
@@ -34,6 +34,3 @@
void ED_operatortypes_logic(void);
#endif /* ED_LOGIC_H */
-
-
-
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index 48232acf562..d1da9f308fb 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -72,7 +72,7 @@ void PE_undo(struct Scene *scene);
void PE_redo(struct Scene *scene);
int PE_undo_valid(struct Scene *scene);
void PE_undo_number(struct Scene *scene, int nr);
-char *PE_undo_get_name(struct Scene *scene, int nr, int *active);
+const char *PE_undo_get_name(struct Scene *scene, int nr, int *active);
#endif /* ED_PARTICLE_H */
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index c644b1d27b4..3a6cbc556d1 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -107,10 +107,12 @@ struct Base;
struct Scene;
struct Object;
+#if 0 /* UNUSED, deprecate? */
void BIF_setSingleAxisConstraint(float vec[3], char *text);
void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text);
void BIF_setLocalAxisConstraint(char axis, char *text);
void BIF_setLocalLockConstraint(char axis, char *text);
+#endif
int BIF_snappingSupported(struct Object *obedit);
@@ -132,7 +134,7 @@ struct EnumPropertyItem *BIF_enumTransformOrientation(struct bContext *C);
const char * BIF_menustringTransformOrientation(const struct bContext *C, const char *title); /* the returned value was allocated and needs to be freed after use */
int BIF_countTransformOrientation(const struct bContext *C);
-void BIF_TransformSetUndo(char *str);
+void BIF_TransformSetUndo(const char *str);
void BIF_selectOrientation(void);
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index cb18ea37ffc..7a556eddd2b 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -506,8 +506,6 @@ uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x1, i
uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, int x1, int y1, short x2, short y2, float a1, float a2, const char *tip);
-void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval);
-
uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, const char *name, int icon, int x1, int y1, int x2, int y2);
int uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int (*check_prop)(struct PropertyRNA *), const char label_align);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 3694102fa5b..b0a17c6f9a9 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -4023,7 +4023,7 @@ void PE_undo_number(Scene *scene, int nr)
/* get name of undo item, return null if no item with this index */
/* if active pointer, set it to 1 if true */
-char *PE_undo_get_name(Scene *scene, int nr, int *active)
+const char *PE_undo_get_name(Scene *scene, int nr, int *active)
{
PTCacheEdit *edit= PE_get_current(scene, OBACT);
PTCacheUndo *undo;
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index e739c5fe22e..deed7ad2a3a 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -666,7 +666,7 @@ struct direntry * filelist_file(struct FileList* filelist, int index)
return &filelist->filelist[fidx];
}
-int filelist_find(struct FileList* filelist, char *file)
+int filelist_find(struct FileList* filelist, const char *filename)
{
int index = -1;
int i;
@@ -677,7 +677,7 @@ int filelist_find(struct FileList* filelist, char *file)
for (i = 0; i < filelist->numfiles; ++i) {
- if ( strcmp(filelist->filelist[i].relname, file) == 0) { /* not dealing with user input so dont need BLI_path_cmp */
+ if ( strcmp(filelist->filelist[i].relname, filename) == 0) { /* not dealing with user input so dont need BLI_path_cmp */
index = i;
break;
}
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index a7f2a0d1af9..cd4c22df418 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -66,7 +66,7 @@ typedef enum FileCheckType
struct FileList * filelist_new(short type);
void filelist_init_icons(void);
void filelist_free_icons(void);
-int filelist_find(struct FileList* filelist, char *file);
+int filelist_find(struct FileList* filelist, const char *file);
void filelist_free(struct FileList* filelist);
void filelist_sort(struct FileList* filelist, short sort);
int filelist_numfiles(struct FileList* filelist);
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 505452f504c..77ac577792c 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -127,7 +127,7 @@ static void draw_render_info(Scene *scene, Image *ima, ARegion *ar)
BKE_image_release_renderresult(scene, ima);
}
-void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, char *cp, float *fp, int *zp, float *zpf)
+void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf)
{
char str[256];
float dx= 6;
diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h
index 4310b5dbae8..04156c80c0e 100644
--- a/source/blender/editors/space_image/image_intern.h
+++ b/source/blender/editors/space_image/image_intern.h
@@ -55,7 +55,7 @@ void IMAGE_OT_toolbox(struct wmOperatorType *ot);
/* image_draw.c */
void draw_image_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene);
-void draw_image_info(struct ARegion *ar, int color_manage, int channels, int x, int y, char *cp, float *fp, int *zp, float *zpf);
+void draw_image_info(struct ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf);
void draw_image_grease_pencil(struct bContext *C, short onlyv2d);
/* image_ops.c */
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index db8d9b1ddf1..24ea51567ad 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -2124,7 +2124,7 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
}
}
-void draw_nodespace_color_info(ARegion *ar, int color_manage, int channels, int x, int y, char *cp, float *fp)
+void draw_nodespace_color_info(ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4])
{
char str[256];
float dx= 6;
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 655d54ac8a7..88b81d0855c 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -99,7 +99,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int t
int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, float coord_array[][2], int resol);
void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 );
void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage);
-void draw_nodespace_color_info(struct ARegion *ar, int color_manage, int channels, int x, int y, char *cp, float *fp);
+void draw_nodespace_color_info(struct ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4]);
/* node_edit.c */
void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *treetype);
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 73174dcace8..6eafb10d74c 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -551,12 +551,9 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
if(obedit==NULL && v3d->localvd==NULL) {
unsigned int ob_lay = ob ? ob->lay : 0;
-
+
/* Layers */
- if (v3d->scenelock)
- uiTemplateLayers(layout, &sceneptr, "layers", &v3dptr, "layers_used", ob_lay);
- else
- uiTemplateLayers(layout, &v3dptr, "layers", &v3dptr, "layers_used", ob_lay);
+ uiTemplateLayers(layout, v3d->scenelock ? &sceneptr : &v3dptr, "layers", &v3dptr, "layers_used", ob_lay);
/* Scene lock */
uiItemR(layout, &v3dptr, "lock_camera_and_layers", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 759fefba438..c3a77dc67a5 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -5861,7 +5861,7 @@ int TimeScale(TransInfo *t, const int UNUSED(mval[2]))
/* ************************************ */
-void BIF_TransformSetUndo(char *UNUSED(str))
+void BIF_TransformSetUndo(const char *UNUSED(str))
{
// TRANSFORM_FIX_ME
//Trans.undostr= str;
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index a312b0abbb4..34dffc11d94 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -338,7 +338,7 @@ int undo_editmode_valid(const char *undoname)
/* get name of undo item, return null if no item with this index */
/* if active pointer, set it to 1 if true */
-char *undo_editmode_get_name(bContext *C, int nr, int *active)
+const char *undo_editmode_get_name(bContext *C, int nr, int *active)
{
UndoElem *uel;
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 6a1819736a2..527537b5efb 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -426,7 +426,7 @@ static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem)
int active, i= 0;
while(TRUE) {
- char *name= NULL;
+ const char *name= NULL;
if(undosys==UNDOSYSTEM_PARTICLE) {
name= PE_undo_get_name(CTX_data_scene(C), i, &active);
diff --git a/source/blender/editors/util/util_intern.h b/source/blender/editors/util/util_intern.h
index 3e2833ec89a..c6e2d079c28 100644
--- a/source/blender/editors/util/util_intern.h
+++ b/source/blender/editors/util/util_intern.h
@@ -37,7 +37,7 @@
/* editmode_undo.c */
void undo_editmode_name (struct bContext *C, const char *undoname);
int undo_editmode_valid (const char *undoname);
-char *undo_editmode_get_name (struct bContext *C, int nr, int *active);
+const char *undo_editmode_get_name (struct bContext *C, int nr, int *active);
void *undo_editmode_get_prev (struct Object *ob);
void undo_editmode_step (struct bContext *C, int step);
void undo_editmode_number (struct bContext *C, int nr);