use 'const char *' for imbuf and file ops.

This commit is contained in:
2010-11-19 02:14:18 +00:00
parent 0b74aab939
commit 5a09368957
36 changed files with 93 additions and 93 deletions

View File

@@ -232,7 +232,7 @@ typedef enum {
/**
* Test whether this is an avi-format.
*/
int AVI_is_avi (char *name);
int AVI_is_avi (const char *name);
/**
@@ -277,7 +277,7 @@ int AVI_get_stream (AviMovie *movie, int avist_type, int stream_num);
/**
* Open a movie stream from file.
*/
AviError AVI_open_movie (char *name, AviMovie *movie);
AviError AVI_open_movie (const char *name, AviMovie *movie);
/**
* Read a frame from a movie stream.

View File

@@ -211,7 +211,7 @@ int AVI_is_avi (char *name) {
}
*/
int AVI_is_avi (char *name) {
int AVI_is_avi (const char *name) {
int temp, fcca, j;
AviMovie movie;
AviMainHeader header;
@@ -404,7 +404,7 @@ int AVI_is_avi (char *name) {
}
AviError AVI_open_movie (char *name, AviMovie *movie) {
AviError AVI_open_movie (const char *name, AviMovie *movie) {
int temp, fcca, size, j;
DEBUG_PRINT("opening movie\n");

View File

@@ -72,8 +72,8 @@ void IDP_UnlinkArray(struct IDProperty *prop);
/* ---------- String Type ------------ */
IDProperty *IDP_NewString(const char *st, const char *name, int maxlen);/* maxlen excludes '\0' */
void IDP_AssignString(struct IDProperty *prop, char *st, int maxlen); /* maxlen excludes '\0' */
void IDP_ConcatStringC(struct IDProperty *prop, char *st);
void IDP_AssignString(struct IDProperty *prop, const char *st, int maxlen); /* maxlen excludes '\0' */
void IDP_ConcatStringC(struct IDProperty *prop, const char *st);
void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append);
void IDP_FreeString(struct IDProperty *prop);

View File

@@ -54,14 +54,14 @@ int unpackSound(struct Main *bmain, struct ReportList *reports, struct bSound *s
int unpackImage(struct ReportList *reports, struct Image *ima, int how);
void unpackAll(struct Main *bmain, struct ReportList *reports, int how);
int writePackedFile(struct ReportList *reports, char *filename, struct PackedFile *pf, int guimode);
int writePackedFile(struct ReportList *reports, const char *filename, struct PackedFile *pf, int guimode);
/* free */
void freePackedFile(struct PackedFile *pf);
/* info */
int countPackedFiles(struct Main *bmain);
int checkPackedFile(char *filename, struct PackedFile *pf);
int checkPackedFile(const char *filename, struct PackedFile *pf);
/* read */
int seekPackedFile(struct PackedFile *pf, int offset, int whence);

View File

@@ -47,7 +47,7 @@ void sound_exit();
void sound_force_device(int device);
int sound_define_from_str(char *str);
struct bSound* sound_new_file(struct Main *main, char* filename);
struct bSound* sound_new_file(struct Main *main, const char *filename);
// XXX unused currently
#if 0

View File

@@ -341,7 +341,7 @@ IDProperty *IDP_CopyString(IDProperty *prop)
}
void IDP_AssignString(IDProperty *prop, char *st, int maxlen)
void IDP_AssignString(IDProperty *prop, const char *st, int maxlen)
{
int stlen;
@@ -356,7 +356,7 @@ void IDP_AssignString(IDProperty *prop, char *st, int maxlen)
BLI_strncpy(prop->data.pointer, st, stlen);
}
void IDP_ConcatStringC(IDProperty *prop, char *st)
void IDP_ConcatStringC(IDProperty *prop, const char *st)
{
int newlen;

View File

@@ -263,7 +263,7 @@ static char *find_new_name(char *name)
*/
int writePackedFile(ReportList *reports, char *filename, PackedFile *pf, int guimode)
int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, int guimode)
{
int file, number, remove_tmp = FALSE;
int ret_value = RET_OK;
@@ -331,7 +331,7 @@ PF_NOFILE - the original file doens't exist
*/
int checkPackedFile(char *filename, PackedFile *pf)
int checkPackedFile(const char *filename, PackedFile *pf)
{
struct stat st;
int ret_val, i, len, file;

View File

@@ -120,7 +120,7 @@ void sound_exit()
AUD_exit();
}
struct bSound* sound_new_file(struct Main *bmain, char* filename)
struct bSound* sound_new_file(struct Main *bmain, const char *filename)
{
bSound* sound = NULL;

View File

@@ -40,19 +40,19 @@
extern "C" {
#endif
void BLI_recurdir_fileops(char *dirname);
int BLI_link(char *file, char *to);
int BLI_is_writable(char *filename);
void BLI_recurdir_fileops(const char *dirname);
int BLI_link(const char *file, const char *to);
int BLI_is_writable(const char *filename);
/**
* @attention Do not confuse with BLI_exist
*/
int BLI_exists(const char *file);
int BLI_copy_fileops(char *file, char *to);
int BLI_rename(char *from, char *to);
int BLI_gzip(char *from, char *to);
int BLI_delete(char *file, int dir, int recursive);
int BLI_move(char *file, char *to);
int BLI_copy_fileops(const char *file, const char *to);
int BLI_rename(const char *from, const char *to);
int BLI_gzip(const char *from, const char *to);
int BLI_delete(const char *file, int dir, int recursive);
int BLI_move(const char *file, const char *to);
int BLI_touch(const char *file);
/* only for the sane unix world: direct calls to system functions :( */

View File

@@ -58,7 +58,7 @@
return -1 if zlib fails, -2 if the originating file does not exist
note: will remove the "from" file
*/
int BLI_gzip(char *from, char *to) {
int BLI_gzip(const char *from, const char *to) {
char buffer[10240];
int file;
int readsize = 0;
@@ -98,7 +98,7 @@ int BLI_gzip(char *from, char *to) {
}
/* return 1 when file can be written */
int BLI_is_writable(char *filename)
int BLI_is_writable(const char *filename)
{
int file;
@@ -151,7 +151,7 @@ int BLI_exists(const char *file) {
static char str[MAXPATHLEN+12];
int BLI_delete(char *file, int dir, int recursive) {
int BLI_delete(const char *file, int dir, int recursive) {
int err;
if (recursive) {
@@ -168,7 +168,7 @@ int BLI_delete(char *file, int dir, int recursive) {
return err;
}
int BLI_move(char *file, char *to) {
int BLI_move(const char *file, const char *to) {
int err;
// windows doesn't support moveing to a directory
@@ -193,7 +193,7 @@ int BLI_move(char *file, char *to) {
}
int BLI_copy_fileops(char *file, char *to) {
int BLI_copy_fileops(const char *file, const char *to) {
int err;
// windows doesn't support copying to a directory
@@ -218,13 +218,13 @@ int BLI_copy_fileops(char *file, char *to) {
return err;
}
int BLI_link(char *file, char *to) {
int BLI_link(const char *file, const char *to) {
callLocalErrorCallBack("Linking files is unsupported on Windows");
return 1;
}
void BLI_recurdir_fileops(char *dirname) {
void BLI_recurdir_fileops(const char *dirname) {
char *lslash;
char tmp[MAXPATHLEN];
@@ -254,7 +254,7 @@ void BLI_recurdir_fileops(char *dirname) {
callLocalErrorCallBack("Unable to create directory\n");
}
int BLI_rename(char *from, char *to) {
int BLI_rename(const char *from, const char *to) {
if (!BLI_exists(from)) return 0;
/* make sure the filenames are different (case insensitive) before removing */
@@ -273,7 +273,7 @@ int BLI_rename(char *from, char *to) {
* */
static char str[MAXPATHLEN+12];
int BLI_delete(char *file, int dir, int recursive)
int BLI_delete(const char *file, int dir, int recursive)
{
if(strchr(file, '"')) {
printf("Error: not deleted file %s because of quote!\n", file);
@@ -294,25 +294,25 @@ int BLI_delete(char *file, int dir, int recursive)
return -1;
}
int BLI_move(char *file, char *to) {
int BLI_move(const char *file, const char *to) {
sprintf(str, "/bin/mv -f \"%s\" \"%s\"", file, to);
return system(str);
}
int BLI_copy_fileops(char *file, char *to) {
int BLI_copy_fileops(const char *file, const char *to) {
sprintf(str, "/bin/cp -rf \"%s\" \"%s\"", file, to);
return system(str);
}
int BLI_link(char *file, char *to) {
int BLI_link(const char *file, const char *to) {
sprintf(str, "/bin/ln -f \"%s\" \"%s\"", file, to);
return system(str);
}
void BLI_recurdir_fileops(char *dirname) {
void BLI_recurdir_fileops(const char *dirname) {
char *lslash;
char tmp[MAXPATHLEN];
@@ -330,7 +330,7 @@ void BLI_recurdir_fileops(char *dirname) {
mkdir(dirname, 0777);
}
int BLI_rename(char *from, char *to) {
int BLI_rename(const char *from, const char *to) {
if (!BLI_exists(from)) return 0;
if (BLI_exists(to)) if(BLI_delete(to, 0, 0)) return 1;

View File

@@ -325,7 +325,7 @@ void FONT_OT_insert_lorem(wmOperatorType *ot)
/* note this handles both ascii and utf8 unicode, previously
* there were 3 functions that did effectively the same thing. */
static int paste_file(bContext *C, ReportList *reports, char *filename)
static int paste_file(bContext *C, ReportList *reports, const char *filename)
{
Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);

View File

@@ -66,7 +66,7 @@ void UI_icons_free();
void UI_icons_free_drawinfo(void *drawinfo);
struct ListBase *UI_iconfile_list(void);
int UI_iconfile_get_index(char *filename);
int UI_iconfile_get_index(const char *filename);
#endif /* UI_INTERFACE_ICONS_H */

View File

@@ -682,7 +682,7 @@ static void free_iconfile_list(struct ListBase *list)
}
}
int UI_iconfile_get_index(char *filename)
int UI_iconfile_get_index(const char *filename)
{
IconFile *ifile;
ListBase *list=&(iconfilelist);

View File

@@ -206,7 +206,7 @@ void IMB_close_anim(struct anim *anim);
* @attention Defined in anim.c
*/
int ismovie(char *name);
int ismovie(const char *name);
void IMB_anim_set_preseek(struct anim *anim, int preseek);
int IMB_anim_get_preseek(struct anim *anim);
@@ -296,19 +296,19 @@ short IMB_png_encode(struct ImBuf *ibuf, int file, int flags);
*
* @attention Defined in util.c
*/
int IMB_ispic(char *name);
int IMB_ispic(const char *name);
/**
*
* @attention Defined in util.c
*/
int IMB_isanim(char *name);
int IMB_isanim(const char *name);
/**
*
* @attention Defined in util.c
*/
int imb_get_anim_type(char *name);
int imb_get_anim_type(const char *name);
/**
*

View File

@@ -38,7 +38,7 @@ typedef struct ImFileType {
int (*is_a)(unsigned char *buf);
int (*ftype)(struct ImFileType *type, struct ImBuf *ibuf);
struct ImBuf *(*load)(unsigned char *mem, size_t size, int flags);
int (*save)(struct ImBuf *ibuf, char *name, int flags);
int (*save)(struct ImBuf *ibuf, const char *name, int flags);
void (*load_tile)(struct ImBuf *ibuf, unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect);
int flag;
@@ -61,52 +61,52 @@ void imb_tile_cache_tile_free(struct ImBuf *ibuf, int tx, int ty);
/* png */
int imb_is_a_png(unsigned char *buf);
struct ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags);
int imb_savepng(struct ImBuf *ibuf, char *name, int flags);
int imb_savepng(struct ImBuf *ibuf, const char *name, int flags);
/* targa */
int imb_is_a_targa(unsigned char *buf);
struct ImBuf *imb_loadtarga(unsigned char *mem, size_t size, int flags);
int imb_savetarga(struct ImBuf * ibuf, char *name, int flags);
int imb_savetarga(struct ImBuf * ibuf, const char *name, int flags);
/* iris */
int imb_is_a_iris(unsigned char *mem);
struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags);
int imb_saveiris(struct ImBuf * ibuf, char *name, int flags);
int imb_saveiris(struct ImBuf * ibuf, const char *name, int flags);
/* jp2 */
int imb_is_a_jp2(unsigned char *buf);
struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags);
int imb_savejp2(struct ImBuf *ibuf, char *name, int flags);
int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags);
/* jpeg */
int imb_is_a_jpeg(unsigned char *mem);
int imb_savejpeg(struct ImBuf * ibuf, char * name, int flags);
int imb_savejpeg(struct ImBuf *ibuf, const char *name, int flags);
struct ImBuf * imb_ibJpegImageFromFilename (const char * filename, int flags);
struct ImBuf * imb_load_jpeg (unsigned char * buffer, size_t size, int flags);
/* bmp */
int imb_is_a_bmp(unsigned char *buf);
struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags);
int imb_savebmp(struct ImBuf *ibuf, char *name, int flags);
int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags);
/* cocoa */
struct ImBuf *imb_cocoaLoadImage(unsigned char *mem, size_t size, int flags);
short imb_cocoaSaveImage(struct ImBuf *ibuf, char *name, int flags);
short imb_cocoaSaveImage(struct ImBuf *ibuf, const char *name, int flags);
/* cineon */
int imb_savecineon(struct ImBuf *buf, char *myfil, int flags);
int imb_savecineon(struct ImBuf *buf, const char *name, int flags);
struct ImBuf *imb_loadcineon(unsigned char *mem, size_t size, int flags);
int imb_is_cineon(unsigned char *buf);
/* dpx */
int imb_save_dpx(struct ImBuf *buf, char *myfile, int flags);
int imb_save_dpx(struct ImBuf *buf, const char *name, int flags);
struct ImBuf *imb_loaddpx(unsigned char *mem, size_t size, int flags);
int imb_is_dpx(unsigned char *buf);
/* hdr */
int imb_is_a_hdr(unsigned char *buf);
struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags);
int imb_savehdr(struct ImBuf * ibuf, char *name, int flags);
int imb_savehdr(struct ImBuf * ibuf, const char *name, int flags);
/* tiff */
void imb_inittiff(void);
@@ -114,7 +114,7 @@ int imb_is_a_tiff(unsigned char *buf);
struct ImBuf *imb_loadtiff(unsigned char *mem, size_t size, int flags);
void imb_loadtiletiff(struct ImBuf *ibuf, unsigned char *mem, size_t size,
int tx, int ty, unsigned int *rect);
int imb_savetiff(struct ImBuf *ibuf, char *name, int flags);
int imb_savetiff(struct ImBuf *ibuf, const char *name, int flags);
void *libtiff_findsymbol(char *name);
#endif /* IMB_FILETYPE_H */

View File

@@ -215,7 +215,7 @@ int ismovie(char *name) {
#else
int ismovie(char *UNUSED(name)) {
int ismovie(const char *UNUSED(name)) {
return 0;
}

View File

@@ -195,7 +195,7 @@ static int putShortLSB(unsigned short us,FILE *ofile) {
}
/* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */
int imb_savebmp(struct ImBuf *ibuf, char *name, int flags) {
int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags) {
BMPINFOHEADER infoheader;
int bytesize, extrabytes, x, y, t, ptr;

View File

@@ -116,7 +116,7 @@ static struct ImBuf *imb_load_dpx_cineon(unsigned char *mem, int use_cineon, int
return ibuf;
}
static int imb_save_dpx_cineon(ImBuf *buf, char *filename, int use_cineon, int flags)
static int imb_save_dpx_cineon(ImBuf *buf, const char *filename, int use_cineon, int flags)
{
LogImageByteConversionParameters conversion;
int width, height, depth;
@@ -182,7 +182,7 @@ static int imb_save_dpx_cineon(ImBuf *buf, char *filename, int use_cineon, int f
return 1;
}
short imb_savecineon(struct ImBuf *buf, char *myfile, int flags)
short imb_savecineon(struct ImBuf *buf, const char *myfile, int flags)
{
return imb_save_dpx_cineon(buf, myfile, 1, flags);
}
@@ -200,7 +200,7 @@ ImBuf *imb_loadcineon(unsigned char *mem, int size, int flags)
return NULL;
}
short imb_save_dpx(struct ImBuf *buf, char *myfile, int flags)
short imb_save_dpx(struct ImBuf *buf, const char *myfile, int flags)
{
return imb_save_dpx_cineon(buf, myfile, 0, flags);
}

View File

@@ -37,7 +37,7 @@ extern "C" {
#include "IMB_allocimbuf.h"
int imb_save_dds(struct ImBuf * ibuf, char *name, int flags)
int imb_save_dds(struct ImBuf * ibuf, const char *name, int flags)
{
return(0); /* todo: finish this function */

View File

@@ -29,7 +29,7 @@
extern "C" {
#endif
int imb_save_dds(struct ImBuf *ibuf, char *name, int flags);
int imb_save_dds(struct ImBuf *ibuf, const char *name, int flags);
int imb_is_a_dds(unsigned char *mem); /* use only first 32 bytes of mem */
struct ImBuf *imb_load_dds(unsigned char *mem, size_t size, int flags);

View File

@@ -662,7 +662,7 @@ static void expandrow(unsigned char *optr, unsigned char *iptr, int z)
* Added: zbuf write
*/
static int output_iris(unsigned int *lptr, int xsize, int ysize, int zsize, char *name, int *zptr)
static int output_iris(unsigned int *lptr, int xsize, int ysize, int zsize, const char *name, int *zptr)
{
FILE *outf;
IMAGE *image;
@@ -816,7 +816,7 @@ static int compressrow(unsigned char *lbuf, unsigned char *rlebuf, int z, int cn
return optr - (unsigned char *)rlebuf;
}
int imb_saveiris(struct ImBuf * ibuf, char *name, int flags)
int imb_saveiris(struct ImBuf * ibuf, const char *name, int flags)
{
short zsize;
int ret;

View File

@@ -661,7 +661,7 @@ static opj_image_t* ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters) {
/* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */
int imb_savejp2(struct ImBuf *ibuf, char *name, int flags) {
int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags) {
int quality = ibuf->ftype & 0xff;

View File

@@ -622,7 +622,7 @@ static int init_jpeg(FILE * outfile, struct jpeg_compress_struct * cinfo, struct
}
static int save_stdjpeg(char * name, struct ImBuf * ibuf)
static int save_stdjpeg(const char *name, struct ImBuf *ibuf)
{
FILE * outfile;
struct jpeg_compress_struct _cinfo, *cinfo = &_cinfo;
@@ -656,7 +656,7 @@ static int save_stdjpeg(char * name, struct ImBuf * ibuf)
}
static int save_vidjpeg(char * name, struct ImBuf * ibuf)
static int save_vidjpeg(const char *name, struct ImBuf *ibuf)
{
FILE * outfile;
struct jpeg_compress_struct _cinfo, *cinfo = &_cinfo;
@@ -695,7 +695,7 @@ static int save_vidjpeg(char * name, struct ImBuf * ibuf)
return 1;
}
static int save_jstjpeg(char * name, struct ImBuf * ibuf)
static int save_jstjpeg(const char *name, struct ImBuf *ibuf)
{
char fieldname[1024];
struct ImBuf * tbuf;
@@ -726,7 +726,7 @@ static int save_jstjpeg(char * name, struct ImBuf * ibuf)
return returnval;
}
static int save_maxjpeg(char * name, struct ImBuf * ibuf)
static int save_maxjpeg(const char *name, struct ImBuf *ibuf)
{
FILE * outfile;
struct jpeg_compress_struct _cinfo, *cinfo = &_cinfo;
@@ -765,7 +765,7 @@ static int save_maxjpeg(char * name, struct ImBuf * ibuf)
return 1;
}
int imb_savejpeg(struct ImBuf * ibuf, char * name, int flags)
int imb_savejpeg(struct ImBuf *ibuf, const char *name, int flags)
{
ibuf->flags = flags;

View File

@@ -187,7 +187,7 @@ static void openexr_header_metadata(Header *header, struct ImBuf *ibuf)
header->insert(info->key, StringAttribute(info->value));
}
static int imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags)
static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags)
{
int channels = ibuf->channels;
int width = ibuf->x;
@@ -314,7 +314,7 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags)
return (1);
}
static int imb_save_openexr_float(struct ImBuf *ibuf, char *name, int flags)
static int imb_save_openexr_float(struct ImBuf *ibuf, const char *name, int flags)
{
int channels = ibuf->channels;
int width = ibuf->x;
@@ -372,7 +372,7 @@ static int imb_save_openexr_float(struct ImBuf *ibuf, char *name, int flags)
}
int imb_save_openexr(struct ImBuf *ibuf, char *name, int flags)
int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags)
{
if (flags & IB_mem)
{

View File

@@ -46,7 +46,7 @@ extern "C" {
int imb_is_a_openexr (unsigned char *mem);
int imb_save_openexr (struct ImBuf *ibuf, char *name, int flags);
int imb_save_openexr (struct ImBuf *ibuf, const char *name, int flags);
struct ImBuf *imb_load_openexr (unsigned char *mem, size_t size, int flags);

View File

@@ -94,7 +94,7 @@ static void ReadData( png_structp png_ptr, png_bytep data, png_size_t length)
longjmp(png_jmpbuf(png_ptr), 1);
}
int imb_savepng(struct ImBuf *ibuf, char *name, int flags)
int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
{
png_structp png_ptr;
png_infop info_ptr;

View File

@@ -333,7 +333,7 @@ static void writeHeader(FILE *file, int width, int height)
fputc(10, file);
}
int imb_savehdr(struct ImBuf *ibuf, char *name, int flags)
int imb_savehdr(struct ImBuf *ibuf, const char *name, int flags)
{
FILE* file = fopen(name, "wb");
float *fp= NULL;

View File

@@ -233,7 +233,7 @@ static int dumptarga(struct ImBuf * ibuf, FILE * file)
}
int imb_savetarga(struct ImBuf * ibuf, char *name, int flags)
int imb_savetarga(struct ImBuf * ibuf, const char *name, int flags)
{
char buf[20]= {0};
FILE *fildes;

View File

@@ -642,7 +642,7 @@ void imb_loadtiletiff(ImBuf *ibuf, unsigned char *mem, size_t size, int tx, int
* @return: 1 if the function is successful, 0 on failure.
*/
int imb_savetiff(ImBuf *ibuf, char *name, int flags)
int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
{
TIFF *image = NULL;
uint16 samplesperpixel, bitspersample;

View File

@@ -142,7 +142,7 @@ const char *imb_ext_audio[] = {
".eac3",
NULL};
static int IMB_ispic_name(char *name)
static int IMB_ispic_name(const char *name)
{
ImFileType *type;
struct stat st;
@@ -176,7 +176,7 @@ static int IMB_ispic_name(char *name)
return FALSE;
}
int IMB_ispic(char *filename)
int IMB_ispic(const char *filename)
{
if(U.uiflag & USER_FILTERFILEEXTS) {
if( (BLI_testextensie_array(filename, imb_ext_image)) ||
@@ -195,12 +195,12 @@ int IMB_ispic(char *filename)
static int isavi (char *name) {
static int isavi (const char *name) {
return AVI_is_avi (name);
}
#ifdef WITH_QUICKTIME
static int isqtime (char *name) {
static int isqtime (const char *name) {
return anim_is_quicktime (name);
}
#endif
@@ -248,7 +248,7 @@ static AVCodecContext* get_codec_from_stream(AVStream* stream)
#endif
static int isffmpeg (char *filename) {
static int isffmpeg (const char *filename) {
AVFormatContext *pFormatCtx;
unsigned int i;
int videoStream;
@@ -331,7 +331,7 @@ static int isredcode(char * filename)
#endif
int imb_get_anim_type(char * name) {
int imb_get_anim_type(const char * name) {
int type;
struct stat st;
@@ -372,7 +372,7 @@ int imb_get_anim_type(char * name) {
return(0);
}
int IMB_isanim(char *filename) {
int IMB_isanim(const char *filename) {
int type;
if(U.uiflag & USER_FILTERFILEEXTS) {

View File

@@ -51,7 +51,7 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags)
IMB_rect_from_float(ibuf);
}
/* TODO. have const char for image write funcs */
return type->save(ibuf, (char *)name, flags);
return type->save(ibuf, name, flags);
}
}

View File

@@ -295,7 +295,7 @@ static int idp_sequence_type(PyObject *seq)
}
/* note: group can be a pointer array or a group */
char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, PyObject *ob)
const char *BPy_IDProperty_Map_ValidateAndCreate(const char *name, IDProperty *group, PyObject *ob)
{
IDProperty *prop = NULL;
IDPropertyTemplate val = {0};
@@ -352,7 +352,7 @@ char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, PyObje
case IDP_IDPARRAY:
prop= IDP_NewIDPArray(name);
for (i=0; i<val.array.len; i++) {
char *error;
const char *error;
item = PySequence_GetItem(ob, i);
error= BPy_IDProperty_Map_ValidateAndCreate("", prop, item);
Py_DECREF(item);
@@ -432,7 +432,7 @@ int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val)
}
}
else {
char *err;
const char *err;
if (!PyUnicode_Check(key)) {
PyErr_SetString( PyExc_TypeError, "only strings are allowed as subgroup keys" );

View File

@@ -56,7 +56,7 @@ int BPy_Wrap_SetMapItem(struct IDProperty *prop, PyObject *key, PyObject *val);
PyObject *BPy_IDGroup_WrapData(struct ID *id, struct IDProperty *prop );
char *BPy_IDProperty_Map_ValidateAndCreate(char *name, struct IDProperty *group, PyObject *ob);
const char *BPy_IDProperty_Map_ValidateAndCreate(const char *name, struct IDProperty *group, PyObject *ob);
void IDProp_Init_Types(void);

View File

@@ -79,7 +79,7 @@ void quicktime_exit(void)
}
int anim_is_quicktime (char *name)
int anim_is_quicktime (const char *name)
{
NSAutoreleasePool *pool;

View File

@@ -170,7 +170,7 @@ char *get_valid_qtname(char *name)
#endif /* _WIN32 */
int anim_is_quicktime (char *name)
int anim_is_quicktime (const char *name)
{
FSSpec theFSSpec;
char theFullPath[255];

View File

@@ -62,7 +62,7 @@ char *get_valid_qtname(char *name);
// quicktime movie import functions
int anim_is_quicktime (char *name);
int anim_is_quicktime (const char *name);
int startquicktime (struct anim *anim);
void free_anim_quicktime (struct anim *anim);
ImBuf *qtime_fetchibuf (struct anim *anim, int position);