Author: pschweitzer
Date: Thu Feb 16 17:21:10 2012
New Revision: 55642
URL:
http://svn.reactos.org/svn/reactos?rev=55642&view=rev
Log:
[CABMAN]
Get rid of MAX_PATH
Modified:
trunk/reactos/tools/cabman/cabinet.cxx
trunk/reactos/tools/cabman/cabinet.h
trunk/reactos/tools/cabman/cabman.h
trunk/reactos/tools/cabman/dfp.cxx
Modified: trunk/reactos/tools/cabman/cabinet.cxx
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cabman/cabinet.cxx?r…
==============================================================================
--- trunk/reactos/tools/cabman/cabinet.cxx [iso-8859-1] (original)
+++ trunk/reactos/tools/cabman/cabinet.cxx [iso-8859-1] Thu Feb 16 17:21:10 2012
@@ -512,7 +512,7 @@
strcpy(DestPath, DestinationPath);
ConvertPath(DestPath, false);
if (strlen(DestPath) > 0)
- NormalizePath(DestPath, MAX_PATH);
+ NormalizePath(DestPath, PATH_MAX);
}
ULONG CCabinet::AddSearchCriteria(char* SearchCriteria)
@@ -1030,8 +1030,8 @@
#if defined(_WIN32)
FILETIME FileTime;
#endif
- CHAR DestName[MAX_PATH];
- CHAR TempName[MAX_PATH];
+ CHAR DestName[PATH_MAX];
+ CHAR TempName[PATH_MAX];
Status = LocateFile(FileName, &File);
if (Status != CAB_STATUS_SUCCESS)
@@ -2086,8 +2086,8 @@
{
bool bRet = false;
char* pszFile;
- char szFilePath[MAX_PATH];
- char szFile[MAX_PATH];
+ char szFilePath[PATH_MAX];
+ char szFile[PATH_MAX];
PSEARCH_CRITERIA Criteria;
ULONG Status;
@@ -2554,7 +2554,7 @@
return CAB_STATUS_INVALID_CAB;
}
- File->FileName = (char*)AllocateMemory(MAX_PATH);
+ File->FileName = (char*)AllocateMemory(PATH_MAX);
if (!File->FileName)
{
DPRINT(MIN_TRACE, ("Insufficient memory.\n"));
@@ -2562,7 +2562,7 @@
}
/* Read file name */
- Status = ReadString(File->FileName, MAX_PATH);
+ Status = ReadString(File->FileName, PATH_MAX);
if (Status != CAB_STATUS_SUCCESS)
return Status;
@@ -3654,7 +3654,7 @@
&File->File.FileTime);
#else
struct stat stbuf;
- char buf[MAX_PATH];
+ char buf[PATH_MAX];
// Check for an absolute path
if (IsSeparator(File->FileName[0]))
@@ -3698,7 +3698,7 @@
File->File.Attributes = (USHORT)(Attributes & 0x37);
#else
struct stat stbuf;
- char buf[MAX_PATH];
+ char buf[PATH_MAX];
// Check for an absolute path
if (IsSeparator(File->FileName[0]))
Modified: trunk/reactos/tools/cabman/cabinet.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cabman/cabinet.h?rev…
==============================================================================
--- trunk/reactos/tools/cabman/cabinet.h [iso-8859-1] (original)
+++ trunk/reactos/tools/cabman/cabinet.h [iso-8859-1] Thu Feb 16 17:21:10 2012
@@ -16,9 +16,6 @@
#include <time.h>
#include <typedefs.h>
#include <unistd.h>
-#ifndef MAX_PATH
-#define MAX_PATH 260
-#endif
#endif
#include <stdlib.h>
@@ -303,7 +300,7 @@
ULONG ReadBlock(PCFDATA Data, void* Buffer, PULONG BytesRead);
ULONG WriteBlock(PCFDATA Data, void* Buffer, PULONG BytesWritten);
private:
- char FullName[MAX_PATH];
+ char FullName[PATH_MAX];
bool FileCreated;
FILEHANDLE FileHandle;
};
@@ -449,8 +446,8 @@
ULONG FolderUncompSize; // Uncompressed size of folder
ULONG BytesLeftInBlock; // Number of bytes left in current block
bool ReuseBlock;
- char DestPath[MAX_PATH];
- char CabinetReservedFile[MAX_PATH];
+ char DestPath[PATH_MAX];
+ char CabinetReservedFile[PATH_MAX];
void* CabinetReservedFileBuffer;
ULONG CabinetReservedFileSize;
FILEHANDLE FileHandle;
Modified: trunk/reactos/tools/cabman/cabman.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cabman/cabman.h?rev=…
==============================================================================
--- trunk/reactos/tools/cabman/cabman.h [iso-8859-1] (original)
+++ trunk/reactos/tools/cabman/cabman.h [iso-8859-1] Thu Feb 16 17:21:10 2012
@@ -38,7 +38,7 @@
bool ProcessAll;
ULONG Mode;
bool PromptOnOverwrite;
- char FileName[MAX_PATH];
+ char FileName[PATH_MAX];
};
/* EOF */
Modified: trunk/reactos/tools/cabman/dfp.cxx
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cabman/dfp.cxx?rev=5…
==============================================================================
--- trunk/reactos/tools/cabman/dfp.cxx [iso-8859-1] (original)
+++ trunk/reactos/tools/cabman/dfp.cxx [iso-8859-1] Thu Feb 16 17:21:10 2012
@@ -123,7 +123,7 @@
void CDFParser::WriteInfLine(char* InfLine)
{
- char buf[MAX_PATH];
+ char buf[PATH_MAX];
char eolbuf[2];
char* destpath;
#if defined(_WIN32)
@@ -432,7 +432,7 @@
strcpy(FileRelativePath, Path);
ConvertPath(FileRelativePath, false);
if (strlen(FileRelativePath) > 0)
- NormalizePath(FileRelativePath, MAX_PATH);
+ NormalizePath(FileRelativePath, PATH_MAX);
}
@@ -498,7 +498,7 @@
* true if a cabinet name was returned, false if not
*/
{
- char Buffer[MAX_PATH];
+ char Buffer[PATH_MAX];
ULONG i;
int j;
char ch;
@@ -1107,11 +1107,11 @@
ULONG Status;
ULONG i, j;
char ch;
- char SrcName[MAX_PATH];
- char DstName[MAX_PATH];
- char InfLine[MAX_PATH];
+ char SrcName[PATH_MAX];
+ char DstName[PATH_MAX];
+ char InfLine[PATH_MAX];
char Options[128];
- char BaseFilename[MAX_PATH];
+ char BaseFilename[PATH_MAX];
*SrcName = '\0';
*DstName = '\0';