Skip to content

Commit

Permalink
Renamed par2cmdline.h to libpar2internal.h.
Browse files Browse the repository at this point in the history
In the process, removed the reference to par2cmline.h from
commandline.cpp, and fixed up the resulting breakage.
  • Loading branch information
rwtodd committed May 31, 2019
1 parent 79cb819 commit 19429f8
Show file tree
Hide file tree
Showing 39 changed files with 71 additions and 50 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Expand Up @@ -46,13 +46,13 @@ libpar2_a_SOURCES = src/crc.cpp src/crc.h \
src/reedsolomon.cpp src/reedsolomon.h \
src/verificationhashtable.cpp src/verificationhashtable.h \
src/verificationpacket.cpp src/verificationpacket.h \
src/libpar2.cpp src/libpar2.h
src/libpar2.cpp src/libpar2.h src/libpar2internal.h


bin_PROGRAMS = par2
man_MANS = man/par2.1

par2_SOURCES = src/par2cmdline.cpp src/par2cmdline.h \
par2_SOURCES = src/par2cmdline.cpp \
src/commandline.cpp src/commandline.h
par2_LDADD = libpar2.a

Expand Down
10 changes: 5 additions & 5 deletions par2cmdline.vcxproj
Expand Up @@ -93,7 +93,7 @@
<OpenMPSupport>true</OpenMPSupport>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>src/par2cmdline.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile>src\libpar2internal.h</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
Expand All @@ -114,7 +114,7 @@
<OpenMPSupport>true</OpenMPSupport>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>src/par2cmdline.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile>src\libpar2internal.h</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
Expand All @@ -137,7 +137,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>par2cmdline.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile>src\libpar2internal.h</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OpenMPSupport>true</OpenMPSupport>
Expand All @@ -163,7 +163,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeaderFile>par2cmdline.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile>src\libpar2internal.h</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OpenMPSupport>true</OpenMPSupport>
Expand Down Expand Up @@ -215,12 +215,12 @@
<ClInclude Include="src\galois.h" />
<ClInclude Include="src\letype.h" />
<ClInclude Include="src\libpar2.h" />
<ClInclude Include="src\libpar2internal.h" />
<ClInclude Include="src\mainpacket.h" />
<ClInclude Include="src\md5.h" />
<ClInclude Include="src\par1fileformat.h" />
<ClInclude Include="src\par1repairer.h" />
<ClInclude Include="src\par1repairersourcefile.h" />
<ClInclude Include="src\par2cmdline.h" />
<ClInclude Include="src\par2creator.h" />
<ClInclude Include="src\par2creatorsourcefile.h" />
<ClInclude Include="src\par2fileformat.h" />
Expand Down
12 changes: 9 additions & 3 deletions par2cmdline.vcxproj.filters
Expand Up @@ -87,6 +87,9 @@
<ClCompile Include="src\verificationpacket.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\libpar2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\commandline.h">
Expand Down Expand Up @@ -134,9 +137,6 @@
<ClInclude Include="src\par1repairersourcefile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\par2cmdline.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\par2creator.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -164,6 +164,12 @@
<ClInclude Include="src\verificationpacket.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\libpar2.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\libpar2internal.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="AUTHORS" />
Expand Down
12 changes: 6 additions & 6 deletions src/commandline.cpp
Expand Up @@ -18,15 +18,11 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"

// This is included here, so that cout and cerr are not used elsewhere.
#include<iostream>

#include<algorithm>
#include "commandline.h"



using namespace std;

#ifdef _MSC_VER
#ifdef _DEBUG
Expand All @@ -36,6 +32,10 @@ static char THIS_FILE[]=__FILE__;
#endif
#endif

// OpenMP
#ifdef _OPENMP
# include <omp.h>
#endif

CommandLine::CommandLine(void)
: filesize_cache()
Expand Down
17 changes: 17 additions & 0 deletions src/commandline.h
Expand Up @@ -27,8 +27,25 @@ using std::string;
// This is needed by diskfile.h
#ifdef _WIN32
#include <windows.h>

// Heap checking
#ifdef _MSC_VER
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#define DEBUG_NEW new(_NORMAL_BLOCK, THIS_FILE, __LINE__)
#endif

#define stricmp _stricmp

#else

#include <string.h>
#define stricmp strcasecmp

#endif

#define _FILE_THREADS 2

#include "libpar2.h"
#include "diskfile.h"

Expand Down
3 changes: 1 addition & 2 deletions src/commandline_test.cpp
Expand Up @@ -22,9 +22,8 @@
#include <fstream>
#include <stdlib.h>

#include "par2cmdline.h"
#include "commandline.h"

using namespace std;

// ComputeRecoveryBlockCount
// recoveryblockset = true
Expand Down
2 changes: 1 addition & 1 deletion src/crc.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/crc_test.cpp
Expand Up @@ -25,7 +25,7 @@
// g++ -DHAVE_CONFIG_H -I.. crc_test.cpp crc.cpp


#include "par2cmdline.h"
#include "libpar2internal.h"

#include <iostream>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion src/creatorpacket.cpp
Expand Up @@ -17,7 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/criticalpacket.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/criticalpacket_test.cpp
Expand Up @@ -20,7 +20,7 @@
#include <iostream>
#include <fstream>

#include "par2cmdline.h"
#include "libpar2internal.h"

// CriticalPacket::CompareLess
int test1() {
Expand Down
2 changes: 1 addition & 1 deletion src/datablock.cpp
Expand Up @@ -17,7 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/descriptionpacket.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/descriptionpacket_test.cpp
Expand Up @@ -20,7 +20,7 @@
#include <iostream>
#include <fstream>

#include "par2cmdline.h"
#include "libpar2internal.h"

// The file separator
#ifdef _WIN32
Expand Down
2 changes: 1 addition & 1 deletion src/diskfile.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/diskfile_test.cpp
Expand Up @@ -20,7 +20,7 @@
#include <iostream>
#include <fstream>

#include "par2cmdline.h"
#include "libpar2internal.h"


// The file separator
Expand Down
2 changes: 1 addition & 1 deletion src/filechecksummer.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/galois.cpp
Expand Up @@ -17,7 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/galois_test.cpp
Expand Up @@ -21,7 +21,7 @@
#include <iostream>
#include <stdlib.h>

#include "par2cmdline.h"
#include "libpar2internal.h"
#include "galois.h"


Expand Down
2 changes: 1 addition & 1 deletion src/letype_test.cpp
Expand Up @@ -21,7 +21,7 @@
#include <iostream>
#include <stdlib.h>

#include "par2cmdline.h"
#include "libpar2internal.h"
#include "letype.h"


Expand Down
2 changes: 1 addition & 1 deletion src/libpar2.cpp
Expand Up @@ -17,7 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

Result par2create(std::ostream &sout,
std::ostream &serr,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/mainpacket.cpp
Expand Up @@ -17,7 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/md5.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/md5_test.cpp
Expand Up @@ -21,7 +21,7 @@
// This is just a simple set of tests on md5 hash.
// The initial version just showed it was self-consistent, not accurate.

#include "par2cmdline.h"
#include "libpar2internal.h"

#include <iostream>
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion src/par1fileformat.cpp
Expand Up @@ -17,6 +17,6 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

PAR1MAGIC par1_magic = {{'P', 'A', 'R', '\0', '\0', '\0', '\0', '\0'}};
2 changes: 1 addition & 1 deletion src/par1repairer.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/par1repairersourcefile.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
1 change: 0 additions & 1 deletion src/par2cmdline.cpp
Expand Up @@ -20,7 +20,6 @@

#include "libpar2.h"
#include "commandline.h"
#include "par2cmdline.h"

// This is included here, so that cout and cerr are not used elsewhere.
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion src/par2creator.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/par2creatorsourcefile.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/par2fileformat.cpp
Expand Up @@ -17,7 +17,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

MAGIC packet_magic = {{'P', 'A', 'R', '2', '\0','P', 'K', 'T'}};
PACKETTYPE fileverificationpacket_type = {{'P', 'A', 'R', ' ', '2', '.', '0', '\0', 'I', 'F', 'S', 'C', '\0','\0','\0','\0'}};
Expand Down
2 changes: 1 addition & 1 deletion src/par2repairer.cpp
Expand Up @@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

#include "par2cmdline.h"
#include "libpar2internal.h"

#ifdef _MSC_VER
#ifdef _DEBUG
Expand Down

0 comments on commit 19429f8

Please sign in to comment.