[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22643] branches/blender2.5/blender/extern /lzma: LZMA: Deleting unused bad files (bad for gcc)

Daniel Genrich daniel.genrich at gmx.net
Thu Aug 20 03:02:35 CEST 2009


Revision: 22643
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22643
Author:   genscher
Date:     2009-08-20 03:02:34 +0200 (Thu, 20 Aug 2009)

Log Message:
-----------
LZMA: Deleting unused bad files (bad for gcc)

Removed Paths:
-------------
    branches/blender2.5/blender/extern/lzma/7zBuf.c
    branches/blender2.5/blender/extern/lzma/7zBuf.h
    branches/blender2.5/blender/extern/lzma/7zBuf2.c
    branches/blender2.5/blender/extern/lzma/7zCrc.c
    branches/blender2.5/blender/extern/lzma/7zCrc.h
    branches/blender2.5/blender/extern/lzma/7zFile.c
    branches/blender2.5/blender/extern/lzma/7zFile.h
    branches/blender2.5/blender/extern/lzma/7zStream.c
    branches/blender2.5/blender/extern/lzma/7zVersion.h
    branches/blender2.5/blender/extern/lzma/Bcj2.c
    branches/blender2.5/blender/extern/lzma/Bcj2.h
    branches/blender2.5/blender/extern/lzma/Bra.c
    branches/blender2.5/blender/extern/lzma/Bra.h
    branches/blender2.5/blender/extern/lzma/Bra86.c
    branches/blender2.5/blender/extern/lzma/BraIA64.c
    branches/blender2.5/blender/extern/lzma/CpuArch.h
    branches/blender2.5/blender/extern/lzma/LzFindMt.c
    branches/blender2.5/blender/extern/lzma/LzFindMt.h
    branches/blender2.5/blender/extern/lzma/Threads.c
    branches/blender2.5/blender/extern/lzma/Threads.h

Deleted: branches/blender2.5/blender/extern/lzma/7zBuf.c
===================================================================
--- branches/blender2.5/blender/extern/lzma/7zBuf.c	2009-08-20 00:54:40 UTC (rev 22642)
+++ branches/blender2.5/blender/extern/lzma/7zBuf.c	2009-08-20 01:02:34 UTC (rev 22643)
@@ -1,36 +0,0 @@
-/* 7zBuf.c -- Byte Buffer
-2008-03-28
-Igor Pavlov
-Public domain */
-
-#include "7zBuf.h"
-
-void Buf_Init(CBuf *p)
-{
-  p->data = 0;
-  p->size = 0;
-}
-
-int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc)
-{
-  p->size = 0;
-  if (size == 0)
-  {
-    p->data = 0;
-    return 1;
-  }
-  p->data = (Byte *)alloc->Alloc(alloc, size);
-  if (p->data != 0)
-  {
-    p->size = size;
-    return 1;
-  }
-  return 0;
-}
-
-void Buf_Free(CBuf *p, ISzAlloc *alloc)
-{
-  alloc->Free(alloc, p->data);
-  p->data = 0;
-  p->size = 0;
-}

Deleted: branches/blender2.5/blender/extern/lzma/7zBuf.h
===================================================================
--- branches/blender2.5/blender/extern/lzma/7zBuf.h	2009-08-20 00:54:40 UTC (rev 22642)
+++ branches/blender2.5/blender/extern/lzma/7zBuf.h	2009-08-20 01:02:34 UTC (rev 22643)
@@ -1,31 +0,0 @@
-/* 7zBuf.h -- Byte Buffer
-2008-10-04 : Igor Pavlov : Public domain */
-
-#ifndef __7Z_BUF_H
-#define __7Z_BUF_H
-
-#include "Types.h"
-
-typedef struct
-{
-  Byte *data;
-  size_t size;
-} CBuf;
-
-void Buf_Init(CBuf *p);
-int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc);
-void Buf_Free(CBuf *p, ISzAlloc *alloc);
-
-typedef struct
-{
-  Byte *data;
-  size_t size;
-  size_t pos;
-} CDynBuf;
-
-void DynBuf_Construct(CDynBuf *p);
-void DynBuf_SeekToBeg(CDynBuf *p);
-int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc);
-void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc);
-
-#endif

Deleted: branches/blender2.5/blender/extern/lzma/7zBuf2.c
===================================================================
--- branches/blender2.5/blender/extern/lzma/7zBuf2.c	2009-08-20 00:54:40 UTC (rev 22642)
+++ branches/blender2.5/blender/extern/lzma/7zBuf2.c	2009-08-20 01:02:34 UTC (rev 22643)
@@ -1,45 +0,0 @@
-/* 7zBuf2.c -- Byte Buffer
-2008-10-04 : Igor Pavlov : Public domain */
-
-#include <string.h>
-#include "7zBuf.h"
-
-void DynBuf_Construct(CDynBuf *p)
-{
-  p->data = 0;
-  p->size = 0;
-  p->pos = 0;
-}
-
-void DynBuf_SeekToBeg(CDynBuf *p)
-{
-  p->pos = 0;
-}
-
-int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc)
-{
-  if (size > p->size - p->pos)
-  {
-    size_t newSize = p->pos + size;
-    Byte *data;
-    newSize += newSize / 4;
-    data = (Byte *)alloc->Alloc(alloc, newSize);
-    if (data == 0)
-      return 0;
-    p->size = newSize;
-    memcpy(data, p->data, p->pos);
-    alloc->Free(alloc, p->data);
-    p->data = data;
-  }
-  memcpy(p->data + p->pos, buf, size);
-  p->pos += size;
-  return 1;
-}
-
-void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc)
-{
-  alloc->Free(alloc, p->data);
-  p->data = 0;
-  p->size = 0;
-  p->pos = 0;
-}

Deleted: branches/blender2.5/blender/extern/lzma/7zCrc.c
===================================================================
--- branches/blender2.5/blender/extern/lzma/7zCrc.c	2009-08-20 00:54:40 UTC (rev 22642)
+++ branches/blender2.5/blender/extern/lzma/7zCrc.c	2009-08-20 01:02:34 UTC (rev 22643)
@@ -1,35 +0,0 @@
-/* 7zCrc.c -- CRC32 calculation
-2008-08-05
-Igor Pavlov
-Public domain */
-
-#include "7zCrc.h"
-
-#define kCrcPoly 0xEDB88320
-UInt32 g_CrcTable[256];
-
-void MY_FAST_CALL CrcGenerateTable(void)
-{
-  UInt32 i;
-  for (i = 0; i < 256; i++)
-  {
-    UInt32 r = i;
-    int j;
-    for (j = 0; j < 8; j++)
-      r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1));
-    g_CrcTable[i] = r;
-  }
-}
-
-UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size)
-{
-  const Byte *p = (const Byte *)data;
-  for (; size > 0 ; size--, p++)
-    v = CRC_UPDATE_BYTE(v, *p);
-  return v;
-}
-
-UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size)
-{
-  return CrcUpdate(CRC_INIT_VAL, data, size) ^ 0xFFFFFFFF;
-}

Deleted: branches/blender2.5/blender/extern/lzma/7zCrc.h
===================================================================
--- branches/blender2.5/blender/extern/lzma/7zCrc.h	2009-08-20 00:54:40 UTC (rev 22642)
+++ branches/blender2.5/blender/extern/lzma/7zCrc.h	2009-08-20 01:02:34 UTC (rev 22643)
@@ -1,24 +0,0 @@
-/* 7zCrc.h -- CRC32 calculation
-2008-03-13
-Igor Pavlov
-Public domain */
-
-#ifndef __7Z_CRC_H
-#define __7Z_CRC_H
-
-#include <stddef.h>
-
-#include "Types.h"
-
-extern UInt32 g_CrcTable[];
-
-void MY_FAST_CALL CrcGenerateTable(void);
-
-#define CRC_INIT_VAL 0xFFFFFFFF
-#define CRC_GET_DIGEST(crc) ((crc) ^ 0xFFFFFFFF)
-#define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8))
-
-UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size);
-UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size);
-
-#endif

Deleted: branches/blender2.5/blender/extern/lzma/7zFile.c
===================================================================
--- branches/blender2.5/blender/extern/lzma/7zFile.c	2009-08-20 00:54:40 UTC (rev 22642)
+++ branches/blender2.5/blender/extern/lzma/7zFile.c	2009-08-20 01:02:34 UTC (rev 22643)
@@ -1,263 +0,0 @@
-/* 7zFile.c -- File IO
-2008-11-22 : Igor Pavlov : Public domain */
-
-#include "7zFile.h"
-
-#ifndef USE_WINDOWS_FILE
-
-#include <errno.h>
-
-#endif
-
-#ifdef USE_WINDOWS_FILE
-
-/*
-   ReadFile and WriteFile functions in Windows have BUG:
-   If you Read or Write 64MB or more (probably min_failure_size = 64MB - 32KB + 1)
-   from/to Network file, it returns ERROR_NO_SYSTEM_RESOURCES
-   (Insufficient system resources exist to complete the requested service).
-   Probably in some version of Windows there are problems with other sizes:
-   for 32 MB (maybe also for 16 MB).
-   And message can be "Network connection was lost"
-*/
-
-#define kChunkSizeMax (1 << 22)
-
-#endif
-
-void File_Construct(CSzFile *p)
-{
-  #ifdef USE_WINDOWS_FILE
-  p->handle = INVALID_HANDLE_VALUE;
-  #else
-  p->file = NULL;
-  #endif
-}
-
-static WRes File_Open(CSzFile *p, const char *name, int writeMode)
-{
-  #ifdef USE_WINDOWS_FILE
-  p->handle = CreateFileA(name,
-      writeMode ? GENERIC_WRITE : GENERIC_READ,
-      FILE_SHARE_READ, NULL,
-      writeMode ? CREATE_ALWAYS : OPEN_EXISTING,
-      FILE_ATTRIBUTE_NORMAL, NULL);
-  return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError();
-  #else
-  p->file = fopen(name, writeMode ? "wb+" : "rb");
-  return (p->file != 0) ? 0 : errno;
-  #endif
-}
-
-WRes InFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 0); }
-WRes OutFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 1); }
-
-WRes File_Close(CSzFile *p)
-{
-  #ifdef USE_WINDOWS_FILE
-  if (p->handle != INVALID_HANDLE_VALUE)
-  {
-    if (!CloseHandle(p->handle))
-      return GetLastError();
-    p->handle = INVALID_HANDLE_VALUE;
-  }
-  #else
-  if (p->file != NULL)
-  {
-    int res = fclose(p->file);
-    if (res != 0)
-      return res;
-    p->file = NULL;
-  }
-  #endif
-  return 0;
-}
-
-WRes File_Read(CSzFile *p, void *data, size_t *size)
-{
-  size_t originalSize = *size;
-  if (originalSize == 0)
-    return 0;
-
-  #ifdef USE_WINDOWS_FILE
-
-  *size = 0;
-  do
-  {
-    DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize;
-    DWORD processed = 0;
-    BOOL res = ReadFile(p->handle, data, curSize, &processed, NULL);
-    data = (void *)((Byte *)data + processed);
-    originalSize -= processed;
-    *size += processed;
-    if (!res)
-      return GetLastError();
-    if (processed == 0)
-      break;
-  }
-  while (originalSize > 0);
-  return 0;
-
-  #else
-  
-  *size = fread(data, 1, originalSize, p->file);
-  if (*size == originalSize)
-    return 0;
-  return ferror(p->file);
-  
-  #endif
-}
-
-WRes File_Write(CSzFile *p, const void *data, size_t *size)
-{
-  size_t originalSize = *size;
-  if (originalSize == 0)
-    return 0;
-  
-  #ifdef USE_WINDOWS_FILE
-
-  *size = 0;
-  do
-  {
-    DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize;
-    DWORD processed = 0;
-    BOOL res = WriteFile(p->handle, data, curSize, &processed, NULL);
-    data = (void *)((Byte *)data + processed);
-    originalSize -= processed;
-    *size += processed;
-    if (!res)
-      return GetLastError();
-    if (processed == 0)
-      break;
-  }
-  while (originalSize > 0);
-  return 0;
-
-  #else
-
-  *size = fwrite(data, 1, originalSize, p->file);
-  if (*size == originalSize)
-    return 0;
-  return ferror(p->file);
-  
-  #endif
-}
-
-WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin)
-{
-  #ifdef USE_WINDOWS_FILE
-
-  LARGE_INTEGER value;
-  DWORD moveMethod;
-  value.LowPart = (DWORD)*pos;
-  value.HighPart = (LONG)((UInt64)*pos >> 16 >> 16); /* for case when UInt64 is 32-bit only */
-  switch (origin)
-  {
-    case SZ_SEEK_SET: moveMethod = FILE_BEGIN; break;
-    case SZ_SEEK_CUR: moveMethod = FILE_CURRENT; break;
-    case SZ_SEEK_END: moveMethod = FILE_END; break;
-    default: return ERROR_INVALID_PARAMETER;
-  }
-  value.LowPart = SetFilePointer(p->handle, value.LowPart, &value.HighPart, moveMethod);
-  if (value.LowPart == 0xFFFFFFFF)
-  {
-    WRes res = GetLastError();
-    if (res != NO_ERROR)
-      return res;
-  }
-  *pos = ((Int64)value.HighPart << 32) | value.LowPart;
-  return 0;
-
-  #else
-  
-  int moveMethod;
-  int res;
-  switch (origin)
-  {
-    case SZ_SEEK_SET: moveMethod = SEEK_SET; break;
-    case SZ_SEEK_CUR: moveMethod = SEEK_CUR; break;
-    case SZ_SEEK_END: moveMethod = SEEK_END; break;
-    default: return 1;
-  }
-  res = fseek(p->file, (long)*pos, moveMethod);
-  *pos = ftell(p->file);
-  return res;
-  
-  #endif
-}
-
-WRes File_GetLength(CSzFile *p, UInt64 *length)
-{
-  #ifdef USE_WINDOWS_FILE
-  
-  DWORD sizeHigh;
-  DWORD sizeLow = GetFileSize(p->handle, &sizeHigh);
-  if (sizeLow == 0xFFFFFFFF)
-  {
-    DWORD res = GetLastError();
-    if (res != NO_ERROR)
-      return res;
-  }
-  *length = (((UInt64)sizeHigh) << 32) + sizeLow;
-  return 0;
-  
-  #else
-  
-  long pos = ftell(p->file);
-  int res = fseek(p->file, 0, SEEK_END);
-  *length = ftell(p->file);
-  fseek(p->file, pos, SEEK_SET);
-  return res;
-  
-  #endif
-}
-
-
-/* ---------- FileSeqInStream ---------- */
-
-static SRes FileSeqInStream_Read(void *pp, void *buf, size_t *size)
-{
-  CFileSeqInStream *p = (CFileSeqInStream *)pp;
-  return File_Read(&p->file, buf, size) == 0 ? SZ_OK : SZ_ERROR_READ;
-}
-
-void FileSeqInStream_CreateVTable(CFileSeqInStream *p)
-{
-  p->s.Read = FileSeqInStream_Read;
-}
-
-

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list