Skip to content

Commit

Permalink
trim excess whitespace from source files
Browse files Browse the repository at this point in the history
  • Loading branch information
a1346054 committed Sep 13, 2021
1 parent 3ae25d5 commit e04bcbf
Show file tree
Hide file tree
Showing 60 changed files with 393 additions and 422 deletions.
1 change: 0 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -456,4 +456,3 @@
7 May 2003 Peter B Clements

* Version 0.1: Initial release.

1 change: 0 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,3 @@ operates.

`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

7 changes: 3 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ EXTRA_DIST = PORTING ROADMAP \


# Programs that need to be compiled for the test suite.
# These are the unit tests.
check_PROGRAMS = tests/letype_test tests/crc_test tests/md5_test tests/diskfile_test tests/libpar2_test tests/commandline_test tests/descriptionpacket_test tests/criticalpacket_test tests/reedsolomon_test tests/galois_test
# These are the unit tests.
check_PROGRAMS = tests/letype_test tests/crc_test tests/md5_test tests/diskfile_test tests/libpar2_test tests/commandline_test tests/descriptionpacket_test tests/criticalpacket_test tests/reedsolomon_test tests/galois_test

tests_letype_test_SOURCES = src/letype_test.cpp src/letype.h

Expand All @@ -121,7 +121,7 @@ tests_diskfile_test_SOURCES = src/diskfile_test.cpp src/diskfile.cpp src/diskfil
tests_libpar2_test_SOURCES = src/libpar2_test.cpp src/libpar2.h
tests_libpar2_test_LDADD = libpar2.a

tests_commandline_test_SOURCES = src/commandline_test.cpp src/commandline.cpp src/commandline.h
tests_commandline_test_SOURCES = src/commandline_test.cpp src/commandline.cpp src/commandline.h
tests_commandline_test_LDADD = libpar2.a

tests_descriptionpacket_test_SOURCES = src/descriptionpacket_test.cpp src/descriptionpacket.cpp src/descriptionpacket.h
Expand Down Expand Up @@ -179,4 +179,3 @@ uninstall-hook :
rm -f $(DESTDIR)$(bindir)/par2create$(EXEEXT)
rm -f $(DESTDIR)$(bindir)/par2verify$(EXEEXT)
rm -f $(DESTDIR)$(bindir)/par2repair$(EXEEXT)

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The command line parameters for par2cmdline are as follow:
-l : Limit size of recovery files (don't use both -u and -l)
-n<n> : Number of recovery files (don't use both -n and -l)
-m<n> : Memory (in MB) to use
-t<n> : Number of threads to use (Auto-detected)
-t<n> : Number of threads to use (Auto-detected)
-v [-v] : Be more verbose
-q [-q] : Be more quiet (-qq gives silence)
-p : Purge backup files and par files on successful recovery or
Expand Down
4 changes: 2 additions & 2 deletions ROADMAP
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ MinGW/WINE
If you are on a UNIX box and want to check the Windows code,
you can compile using MinGW and run using WINE. MinGW is a
package for compiling with GCC against Windows libraries.
WINE is a Windows simulator.
WINE is a Windows simulator.

To compile with MinGW, I use the commands:
make clean
make clean
./configure --host=x86_64-w64-mingw32
make

Expand Down
1 change: 0 additions & 1 deletion build/build-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ export CXXFLAGS="-g -O0"
./configure
# make
make

1 change: 0 additions & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ export CXXFLAGS="-O3 -pipe -fstack-protector-strong"
./configure
# make
make

1 change: 0 additions & 1 deletion build/sign-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
gpg --detach-sign $file
done
)

1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,3 @@ AC_CHECK_FUNCS([getopt] [getopt_long])
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

1 change: 0 additions & 1 deletion man/par2.1
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,3 @@ Ike Devolder <[email protected]>
.br
Jussi Kansanen <[email protected]>
.br

26 changes: 13 additions & 13 deletions src/commandline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ CommandLine::CommandLine(void)
, parfilename()
, rawfilenames()
, extrafiles()
, operation(opNone)
, operation(opNone)
, purgefiles(false)
, skipdata(false)
, skipleaway(0)
Expand Down Expand Up @@ -183,7 +183,7 @@ bool CommandLine::Parse(int argc, const char * const *argv)
return false;
}
}

return true;
}

Expand Down Expand Up @@ -809,7 +809,7 @@ bool CommandLine::ReadArgs(int argc, const char * const *argv)
cerr << " (Run \"" << path << name << " --help\" for supported options.)" << endl;
return false;
}

argc--;
argv++;
options = false;
Expand Down Expand Up @@ -871,12 +871,12 @@ bool CommandLine::ReadArgs(int argc, const char * const *argv)
u64 CommandLine::GetTotalPhysicalMemory()
{
u64 TotalPhysicalMemory = 0;

HMODULE hLib = ::LoadLibraryA("kernel32.dll");
if (NULL != hLib)
{
BOOL (WINAPI *pfn)(LPMEMORYSTATUSEX) = (BOOL (WINAPI*)(LPMEMORYSTATUSEX))::GetProcAddress(hLib, "GlobalMemoryStatusEx");

if (NULL != pfn)
{
MEMORYSTATUSEX mse;
Expand All @@ -886,16 +886,16 @@ u64 CommandLine::GetTotalPhysicalMemory()
TotalPhysicalMemory = mse.ullTotalPhys;
}
}

::FreeLibrary(hLib);
}

if (TotalPhysicalMemory == 0)
{
MEMORYSTATUS ms;
::ZeroMemory(&ms, sizeof(ms));
::GlobalMemoryStatus(&ms);

TotalPhysicalMemory = ms.dwTotalPhys;
}

Expand All @@ -906,7 +906,7 @@ u64 CommandLine::GetTotalPhysicalMemory()
u64 CommandLine::GetTotalPhysicalMemory()
{
long pages = sysconf(_SC_PHYS_PAGES);
long page_size = sysconf(_SC_PAGESIZE);
long page_size = sysconf(_SC_PAGESIZE);
return pages*page_size;
}
#else
Expand All @@ -925,7 +925,7 @@ bool CommandLine::CheckValuesAndSetDefaults() {
return false;
}


// Default noise level
if (noiselevel == nlUnknown)
{
Expand Down Expand Up @@ -1034,13 +1034,13 @@ bool CommandLine::CheckValuesAndSetDefaults() {
} //end file exists
}


// operation should always be set, but let's be thorough.
if (operation == opNone) {
cerr << "ERROR: No operation was specified (create, repair, or verify)" << endl;
return false;
}


if (operation != opCreate) {
// skipdata is bool and either value is valid.
Expand Down Expand Up @@ -1217,7 +1217,7 @@ bool CommandLine::ComputeBlockSize() {
}
}
}

return true;
}

Expand Down
8 changes: 4 additions & 4 deletions src/commandline.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ class CommandLine

// Use values like % recovery data to compute the number of recover blocks
bool ComputeRecoveryBlockCount();

bool SetParFilename(string filename);

FileSizeCache filesize_cache;// Caches the size of each file,
// to prevent multiple calls to OS.

// options for all operations
Version version; // What version files will be processed.
NoiseLevel noiselevel; // How much display output should there be.
Expand Down Expand Up @@ -184,8 +184,8 @@ class CommandLine
u64 skipleaway; // The maximum leaway +/- that we will
// allow when searching for blocks.

// options for creating par files

// options for creating par files
u32 blockcount; // How many blocks the source files should
// be virtually split into.
u64 blocksize; // What virtual block size to use.
Expand Down
Loading

0 comments on commit e04bcbf

Please sign in to comment.