Cleanup: use BLO_memfile prefix

This commit is contained in:
Campbell Barton 2015-04-18 17:33:04 +02:00
parent 230712e6cb
commit 38bea4e86c
4 changed files with 13 additions and 13 deletions

View File

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

View File

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

View File

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

View File

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