2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

To improve the conditional compilation:

	* src/MultiDiskWriter.h:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.	
	* src/MultiDiskWriter.cc:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	* src/Util.h:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	Added ENABLE_BITTORRENT around computeFastSet().
	* src/Util.cc:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	Added ENABLE_BITTORRENT around computeFastSet().	
	* src/messageDigest.h:
	Replaced ENABLE_BITTORRENT with ENABLE_SSL.
	* src/ShaVisitor.h:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	* src/ShaVisitor.cc:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	* src/main.cc:
	Added ENABLE_BITTORRENT around includes and blocks related to
	BitTorrent.
	* src/AbstractDiskWriter.h:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	* src/AbstractDiskWriter.cc:
	Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
	
	To add command-line options for Metalink:

	* src/main.cc:
	Added metalink-version, metalink-language, metalink-os,
	follow-metalink.

	To use EXIT_SUCCESS and EXIT_FAILURE with exit():

	* src/main.cc: Use these definition.
This commit is contained in:
Tatsuhiro Tsujikawa 2006-07-04 10:57:56 +00:00
parent 8d340992d6
commit 31cf446f6d
27 changed files with 1035 additions and 538 deletions

View file

@ -23,17 +23,17 @@
#define _D_ABSTRACT_DISK_WRITER_H_
#include "DiskWriter.h"
#ifdef ENABLE_SHA1DIGEST
#ifdef ENABLE_MESSAGE_DIGEST
#include "messageDigest.h"
#endif // ENABLE_SHA1DIGEST
#endif // ENABLE_MESSAGE_DIGEST
class AbstractDiskWriter:public DiskWriter {
protected:
string filename;
int fd;
#ifdef ENABLE_SHA1DIGEST
#ifdef ENABLE_MESSAGE_DIGEST
MessageDigestContext ctx;
#endif // ENABLE_SHA1DIGEST
#endif // ENABLE_MESSAGE_DIGEST
void createFile(const string& filename, int addFlags = 0);