use (const char*) rather than (char*) where possible.

also removed some unused function definitons.
This commit is contained in:
Campbell Barton
2011-11-05 11:04:28 +00:00
parent 45b8a61bf3
commit 33accdb725
44 changed files with 91 additions and 103 deletions

View File

@@ -44,7 +44,7 @@ PROJECT_BRIEF =
# exceed 55 pixels and the maximum width should not exceed 200 pixels.
# Doxygen will copy the logo to the output directory.
PROJECT_LOGO = ../../release/freedesktop/icons/48x48/blender.png
PROJECT_LOGO = ../../release/freedesktop/icons/48x48/apps/blender.png
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

View File

@@ -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);
/* -------------------------------------- */

View File

@@ -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);

View File

@@ -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 */

View File

@@ -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]);

View File

@@ -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);

View File

@@ -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

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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_);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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?*/

View File

@@ -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 */

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);

View File

@@ -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];

View File

@@ -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|";

View File

@@ -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;

View File

@@ -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);

View File

@@ -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 */

View File

@@ -34,6 +34,3 @@
void ED_operatortypes_logic(void);
#endif /* ED_LOGIC_H */

View File

@@ -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 */

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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;

View File

@@ -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 */

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);