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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-05 13:29:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-05 13:29:10 +0300
commitc7fccc84bf59bed95bdf13207c40f7a1d1711d24 (patch)
tree1be0895f8cab3c07e00c218b601952458c83d5d0 /source/blender/editors/space_file
parent10373238c104cc7a4c62d54c4fc39366ad11b1a2 (diff)
use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_file/filelist.c24
-rw-r--r--source/blender/editors/space_file/filesel.c4
3 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 7d9eec891b8..98bd6c0e70b 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -389,7 +389,7 @@ static void file_draw_preview(uiBlock *block, struct direntry *file, int sx, int
uiButSetDragImage(but, file->path, get_file_icon(file), imb, scale);
glDisable(GL_BLEND);
- imb = 0;
+ imb = NULL;
}
}
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 88287b6a7da..bd188d07a86 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -540,20 +540,20 @@ void filelist_free(struct FileList* filelist)
if (filelist->filelist[i].image) {
IMB_freeImBuf(filelist->filelist[i].image);
}
- filelist->filelist[i].image = 0;
+ filelist->filelist[i].image = NULL;
if (filelist->filelist[i].relname)
MEM_freeN(filelist->filelist[i].relname);
if (filelist->filelist[i].path)
MEM_freeN(filelist->filelist[i].path);
- filelist->filelist[i].relname = 0;
+ filelist->filelist[i].relname = NULL;
if (filelist->filelist[i].string)
MEM_freeN(filelist->filelist[i].string);
- filelist->filelist[i].string = 0;
+ filelist->filelist[i].string = NULL;
}
filelist->numfiles = 0;
free(filelist->filelist);
- filelist->filelist = 0;
+ filelist->filelist = NULL;
filelist->filter = 0;
filelist->filter_glob[0] = '\0';
filelist->numfiltered =0;
@@ -564,7 +564,7 @@ void filelist_freelib(struct FileList* filelist)
{
if(filelist->libfiledata)
BLO_blendhandle_close(filelist->libfiledata);
- filelist->libfiledata= 0;
+ filelist->libfiledata= NULL;
}
struct BlendHandle *filelist_lib(struct FileList* filelist)
@@ -841,8 +841,8 @@ static void filelist_read_dir(struct FileList* filelist)
char wdir[FILE_MAX]= "";
if (!filelist) return;
- filelist->fidx = 0;
- filelist->filelist = 0;
+ filelist->fidx = NULL;
+ filelist->filelist = NULL;
BLI_getwdN(wdir, sizeof(wdir)); /* backup cwd to restore after */
@@ -896,7 +896,7 @@ void filelist_readdir(struct FileList* filelist)
int filelist_empty(struct FileList* filelist)
{
- return filelist->filelist == 0;
+ return filelist->filelist == NULL;
}
void filelist_parent(struct FileList* filelist)
@@ -977,7 +977,7 @@ void filelist_from_library(struct FileList* filelist)
if (!ok) {
/* free */
if(filelist->libfiledata) BLO_blendhandle_close(filelist->libfiledata);
- filelist->libfiledata= 0;
+ filelist->libfiledata= NULL;
return;
}
@@ -985,9 +985,9 @@ void filelist_from_library(struct FileList* filelist)
/* there we go */
/* for the time being only read filedata when libfiledata==0 */
- if (filelist->libfiledata==0) {
+ if (filelist->libfiledata == NULL) {
filelist->libfiledata= BLO_blendhandle_from_file(dir);
- if(filelist->libfiledata==0) return;
+ if(filelist->libfiledata == NULL) return;
}
idcode= groupname_to_code(group);
@@ -1116,7 +1116,7 @@ void filelist_from_main(struct FileList *filelist)
idcode= groupname_to_code(filelist->dir);
lb= which_libbase(G.main, idcode );
- if(lb==0) return;
+ if(lb == NULL) return;
id= lb->first;
filelist->numfiles= 0;
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index cc741392de2..87ffc2075c9 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -405,12 +405,12 @@ static void column_widths(struct FileList* files, struct FileLayout* layout)
void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
{
FileSelectParams *params = ED_fileselect_get_params(sfile);
- FileLayout *layout=0;
+ FileLayout *layout= NULL;
View2D *v2d= &ar->v2d;
int maxlen = 0;
int numfiles;
int textheight;
- if (sfile->layout == 0) {
+ if (sfile->layout == NULL) {
sfile->layout = MEM_callocN(sizeof(struct FileLayout), "file_layout");
sfile->layout->dirty = 1;
}