[Bf-blender-cvs] [38bea4e] master: Cleanup: use BLO_memfile prefix

Campbell Barton noreply at git.blender.org
Sat Apr 18 18:07:00 CEST 2015


Commit: 38bea4e86c90c514d345f34f865da831e6d2f83f
Author: Campbell Barton
Date:   Sat Apr 18 17:33:04 2015 +0200
Branches: master
https://developer.blender.org/rB38bea4e86c90c514d345f34f865da831e6d2f83f

Cleanup: use BLO_memfile prefix

===================================================================

M	source/blender/blenkernel/intern/blender.c
M	source/blender/blenloader/BLO_undofile.h
M	source/blender/blenloader/intern/undofile.c
M	source/blender/blenloader/intern/writefile.c

===================================================================

diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 4b2c6ef..791fa3d 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -705,7 +705,7 @@ void BKE_write_undo(bContext *C, const char *name)
 	while (undobase.last != curundo) {
 		uel = undobase.last;
 		BLI_remlink(&undobase, uel);
-		BLO_free_memfile(&uel->memfile);
+		BLO_memfile_free(&uel->memfile);
 		MEM_freeN(uel);
 	}
 	
@@ -727,7 +727,7 @@ void BKE_write_undo(bContext *C, const char *name)
 			UndoElem *first = undobase.first;
 			BLI_remlink(&undobase, first);
 			/* the merge is because of compression */
-			BLO_merge_memfile(&first->memfile, &first->next->memfile);
+			BLO_memfile_merge(&first->memfile, &first->next->memfile);
 			MEM_freeN(first);
 		}
 	}
@@ -782,7 +782,7 @@ void BKE_write_undo(bContext *C, const char *name)
 				UndoElem *first = undobase.first;
 				BLI_remlink(&undobase, first);
 				/* the merge is because of compression */
-				BLO_merge_memfile(&first->memfile, &first->next->memfile);
+				BLO_memfile_merge(&first->memfile, &first->next->memfile);
 				MEM_freeN(first);
 			}
 		}
@@ -827,7 +827,7 @@ void BKE_reset_undo(void)
 	
 	uel = undobase.first;
 	while (uel) {
-		BLO_free_memfile(&uel->memfile);
+		BLO_memfile_free(&uel->memfile);
 		uel = uel->next;
 	}
 	
diff --git a/source/blender/blenloader/BLO_undofile.h b/source/blender/blenloader/BLO_undofile.h
index f716b47..fb96ec7 100644
--- a/source/blender/blenloader/BLO_undofile.h
+++ b/source/blender/blenloader/BLO_undofile.h
@@ -47,11 +47,11 @@ typedef struct MemFile {
 } MemFile;
 
 /* actually only used writefile.c */
-extern void add_memfilechunk(MemFile *compare, MemFile *current, const char *buf, unsigned int size);
+extern void memfile_chunk_add(MemFile *compare, MemFile *current, const char *buf, unsigned int size);
 
 /* exports */
-extern void BLO_free_memfile(MemFile *memfile);
-extern void BLO_merge_memfile(MemFile *first, MemFile *second);
+extern void BLO_memfile_free(MemFile *memfile);
+extern void BLO_memfile_merge(MemFile *first, MemFile *second);
 
 #endif
 
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index f70d889..d0dc9a8 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -46,7 +46,7 @@
 /* **************** support for memory-write, for undo buffers *************** */
 
 /* not memfile itself */
-void BLO_free_memfile(MemFile *memfile)
+void BLO_memfile_free(MemFile *memfile)
 {
 	MemFileChunk *chunk;
 	
@@ -60,7 +60,7 @@ void BLO_free_memfile(MemFile *memfile)
 
 /* to keep list of memfiles consistent, 'first' is always first in list */
 /* result is that 'first' is being freed */
-void BLO_merge_memfile(MemFile *first, MemFile *second)
+void BLO_memfile_merge(MemFile *first, MemFile *second)
 {
 	MemFileChunk *fc, *sc;
 	
@@ -77,7 +77,7 @@ void BLO_merge_memfile(MemFile *first, MemFile *second)
 		if (sc) sc = sc->next;
 	}
 	
-	BLO_free_memfile(first);
+	BLO_memfile_free(first);
 }
 
 static int my_memcmp(const int *mem1, const int *mem2, const int len)
@@ -94,7 +94,7 @@ static int my_memcmp(const int *mem1, const int *mem2, const int len)
 	return 0;
 }
 
-void add_memfilechunk(MemFile *compare, MemFile *current, const char *buf, unsigned int size)
+void memfile_chunk_add(MemFile *compare, MemFile *current, const char *buf, unsigned int size)
 {
 	static MemFileChunk *compchunk = NULL;
 	MemFileChunk *curchunk;
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 2580ba6..12c4f49 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -333,7 +333,7 @@ static void writedata_do_write(WriteData *wd, const void *mem, int memlen)
 
 	/* memory based save */
 	if (wd->current) {
-		add_memfilechunk(NULL, wd->current, mem, memlen);
+		memfile_chunk_add(NULL, wd->current, mem, memlen);
 	}
 	else {
 		if (wd->ww->write(wd->ww, mem, memlen) != memlen) {
@@ -421,7 +421,7 @@ static WriteData *bgnwrite(WriteWrap *ww, MemFile *compare, MemFile *current)
 	wd->compare= compare;
 	wd->current= current;
 	/* this inits comparing */
-	add_memfilechunk(compare, NULL, NULL, 0);
+	memfile_chunk_add(compare, NULL, NULL, 0);
 	
 	return wd;
 }




More information about the Bf-blender-cvs mailing list