compile fix: linux BLI_gzopen declare was conflicting.

This commit is contained in:
Campbell Barton 2012-03-20 03:48:32 +00:00
parent b163e19b8d
commit bfcd1afe9c
3 changed files with 18 additions and 15 deletions

@ -262,23 +262,24 @@ void defvert_flip(MDeformVert *dvert, const int *flip_map, const int flip_map_le
void defvert_flip_merged(MDeformVert *dvert, const int *flip_map, const int flip_map_len)
{
MDeformWeight *dw, *copydw;
MDeformWeight *dw, *dw_cpy;
float weight;
int i, totweight = dvert->totweight;
/* copy weights */
for (dw= dvert->dw, i=0; i<totweight; dw++, i++) {
for (dw = dvert->dw, i=0; i < totweight; dw++, i++) {
if (dw->def_nr < flip_map_len) {
if (flip_map[dw->def_nr] >= 0) {
copydw= defvert_verify_index(dvert, flip_map[dw->def_nr]);
dw= &dvert->dw[i]; /* in case array got realloced */
/* error checkers complain of this but we'll never get NULL return */
dw_cpy = defvert_verify_index(dvert, flip_map[dw->def_nr]);
dw = &dvert->dw[i]; /* in case array got realloced */
/* distribute weights: if only one of the vertex groups was
assigned this will halve the weights, otherwise it gets
evened out. this keeps it proportional to other groups */
weight = 0.5f*(copydw->weight + dw->weight);
copydw->weight= weight;
dw->weight= weight;
* assigned this will halve the weights, otherwise it gets
* evened out. this keeps it proportional to other groups */
weight = 0.5f * (dw_cpy->weight + dw->weight);
dw_cpy->weight = weight;
dw->weight = weight;
}
}
}

@ -45,6 +45,8 @@ extern "C" {
/* for size_t (needed on windows) */
#include <stddef.h>
struct gzFile;
/* Common */
int BLI_exists(const char *path);
@ -68,8 +70,8 @@ unsigned int BLI_dir_contents(const char *dir, struct direntry **filelist);
/* Files */
FILE * BLI_fopen(const char * filename, const char * mode);
void* BLI_gzopen(const char * filename, const char * mode);
FILE *BLI_fopen(const char *filename, const char *mode);
void *BLI_gzopen(const char *filename, const char *mode);
int BLI_open(const char *filename, int oflag, int pmode);
int BLI_file_is_writable(const char *file);

@ -202,12 +202,12 @@ int BLI_file_touch(const char *file)
static char str[MAXPATHLEN+12];
FILE * BLI_fopen(const char * filename, const char * mode)
FILE *BLI_fopen(const char *filename, const char *mode)
{
return ufopen(filename, mode);
}
gzFile BLI_gzopen(const char * filename, const char * mode)
gzFile BLI_gzopen(const char *filename, const char *mode)
{
gzFile gzfile;
int fi;
@ -550,12 +550,12 @@ static int delete_single_file(const char *from, const char *UNUSED(to))
return recursiveOp_Callback_OK;
}
FILE * BLI_fopen(const char * filename, const char * mode)
FILE *BLI_fopen(const char *filename, const char *mode)
{
return fopen(filename, mode);
}
gzFile BLI_gzopen(const char * filename, const char * mode)
void *BLI_gzopen(const char *filename, const char *mode)
{
return gzopen(filename, mode);
}