code cleanup: remove unused member of direntry struct, also add include for building on osx.

This commit is contained in:
Campbell Barton 2013-03-05 06:38:43 +00:00
parent 384948908a
commit fcc807f294
3 changed files with 1 additions and 6 deletions

@ -42,7 +42,6 @@ typedef unsigned int mode_t;
struct ImBuf;
struct direntry {
char *string;
mode_t type;
char *relname;
char *path;

@ -434,9 +434,6 @@ static void bli_adddirstrings(struct BuildDirCtx *dir_ctx)
BLI_snprintf(buf, sizeof(buf), "%s %s %s %7s %s %s %10s %s",
file->mode1, file->mode2, file->mode3, file->owner,
file->date, file->time, size, file->relname);
file->string = BLI_strdup(buf);
/* FIXME: not actually used anywhere, why bother to set it up? */
}
}
@ -480,8 +477,6 @@ void BLI_free_filelist(struct direntry *filelist, unsigned int nrentries)
MEM_freeN(entry->relname);
if (entry->path)
MEM_freeN(entry->path);
if (entry->string)
MEM_freeN(entry->string);
/* entry->poin assumed not to point to anything needing freeing here */
}

@ -32,6 +32,7 @@
#include "BLO_sys_types.h"
#include "BKE_global.h"
#include "BLI_utildefines.h"
#include "BLI_dynstr.h"
#include "BLI_path_util.h"