mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
*** empty log message ***
This commit is contained in:
parent
33c1ae4afc
commit
fa8f38d8d6
@ -28,11 +28,11 @@
|
|||||||
Warning: Lib(s) $[nonexisting], referenced in $[DIRNAME]/$[TARGET], not found.
|
Warning: Lib(s) $[nonexisting], referenced in $[DIRNAME]/$[TARGET], not found.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#set DEPENDABLE_HEADERS $[DEPENDABLE_HEADERS] $[filter %.h %.I,$[SOURCES]]
|
#set DEPENDABLE_HEADERS $[DEPENDABLE_HEADERS] $[filter %.h %.I,$[all_sources]]
|
||||||
#end metalib_target static_lib_target ss_lib_target lib_target noinst_lib_target bin_target noinst_bin_target
|
#end metalib_target static_lib_target ss_lib_target lib_target noinst_lib_target bin_target noinst_bin_target
|
||||||
|
|
||||||
#forscopes test_bin_target
|
#forscopes test_bin_target
|
||||||
#set DEPENDABLE_HEADERS $[DEPENDABLE_HEADERS] $[filter %.h %.I,$[SOURCES]]
|
#set DEPENDABLE_HEADERS $[DEPENDABLE_HEADERS] $[filter %.h %.I,$[all_sources]]
|
||||||
#end test_bin_target
|
#end test_bin_target
|
||||||
|
|
||||||
// Allow the user to define additional EXTRA_DEPENDS targets in each
|
// Allow the user to define additional EXTRA_DEPENDS targets in each
|
||||||
|
@ -251,6 +251,14 @@
|
|||||||
$[if $[HAVE_NET],$[IF_NET_SOURCES]] \
|
$[if $[HAVE_NET],$[IF_NET_SOURCES]] \
|
||||||
$[if $[HAVE_PYTHON],$[IF_PYTHON_SOURCES]]
|
$[if $[HAVE_PYTHON],$[IF_PYTHON_SOURCES]]
|
||||||
|
|
||||||
|
#defer all_sources \
|
||||||
|
$[SOURCES] \
|
||||||
|
$[IF_CRYPTO_SOURCES] \
|
||||||
|
$[IF_ZLIB_SOURCES] \
|
||||||
|
$[IF_IPC_SOURCES] \
|
||||||
|
$[IF_NET_SOURCES] \
|
||||||
|
$[IF_PYTHON_SOURCES]
|
||||||
|
|
||||||
// This variable returns the set of sources that are to be
|
// This variable returns the set of sources that are to be
|
||||||
// interrogated for the current target.
|
// interrogated for the current target.
|
||||||
#defer get_igatescan \
|
#defer get_igatescan \
|
||||||
|
@ -21,14 +21,14 @@
|
|||||||
zcompressor.h download_utils.cxx download_utils.h
|
zcompressor.h download_utils.cxx download_utils.h
|
||||||
|
|
||||||
#define IF_CRYPTO_SOURCES \
|
#define IF_CRYPTO_SOURCES \
|
||||||
crypto_utils.cxx crypto_utils.h
|
crypto_utils.cxx crypto_utils.h hashVal.cxx hashVal.I hashVal.h
|
||||||
|
|
||||||
#define INSTALL_HEADERS \
|
#define INSTALL_HEADERS \
|
||||||
downloader.h downloader.I \
|
downloader.h downloader.I \
|
||||||
config_downloader.h zcompressor.I zcompressor.h \
|
config_downloader.h zcompressor.I zcompressor.h \
|
||||||
asyncUtility.h asyncUtility.I decompressor.h \
|
asyncUtility.h asyncUtility.I decompressor.h \
|
||||||
extractor.h download_utils.h downloadDb.h downloadDb.I \
|
extractor.h download_utils.h downloadDb.h downloadDb.I \
|
||||||
patcher.h
|
hashVal.I hashVal.h patcher.h
|
||||||
|
|
||||||
#define IGATESCAN all
|
#define IGATESCAN all
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
// This file is compiled only if we have crypto++ installed.
|
// This file is compiled only if we have crypto++ installed.
|
||||||
|
|
||||||
#include "crypto_utils.h"
|
#include "crypto_utils.h"
|
||||||
|
#include "hashVal.h"
|
||||||
|
|
||||||
#include <md5.h>
|
#include <md5.h>
|
||||||
#include <files.h>
|
#include <files.h>
|
||||||
|
@ -10,23 +10,7 @@
|
|||||||
#include <filename.h>
|
#include <filename.h>
|
||||||
#include <typedef.h>
|
#include <typedef.h>
|
||||||
|
|
||||||
class EXPCL_PANDAEXPRESS HashVal {
|
class HashVal;
|
||||||
public:
|
|
||||||
INLINE HashVal(void) {
|
|
||||||
hv[0] = hv[1] = hv[2] = hv[3] = 0;
|
|
||||||
}
|
|
||||||
INLINE bool operator == (const HashVal &other) const {
|
|
||||||
return (hv[0] == other.hv[0] &&
|
|
||||||
hv[1] == other.hv[1] &&
|
|
||||||
hv[2] == other.hv[2] &&
|
|
||||||
hv[3] == other.hv[3]);
|
|
||||||
}
|
|
||||||
INLINE uint get_value(int val) const {
|
|
||||||
if (val < 4 && val >= 0)
|
|
||||||
return hv[val];
|
|
||||||
}
|
|
||||||
uint hv[4];
|
|
||||||
};
|
|
||||||
|
|
||||||
EXPCL_PANDAEXPRESS void md5_a_file(const Filename &fname, HashVal &ret);
|
EXPCL_PANDAEXPRESS void md5_a_file(const Filename &fname, HashVal &ret);
|
||||||
EXPCL_PANDAEXPRESS void md5_a_buffer(uchar *buf, ulong len, HashVal &ret);
|
EXPCL_PANDAEXPRESS void md5_a_buffer(uchar *buf, ulong len, HashVal &ret);
|
||||||
|
49
panda/src/downloader/hashVal.I
Normal file
49
panda/src/downloader/hashVal.I
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
// Filename: hashVal.I
|
||||||
|
// Created by: drose (14Nov00)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: HashVal::Constructor
|
||||||
|
// Access: Public
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE HashVal::
|
||||||
|
HashVal(void) {
|
||||||
|
hv[0] = hv[1] = hv[2] = hv[3] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: HashVal::operator ==
|
||||||
|
// Access: Public
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE bool HashVal::
|
||||||
|
operator == (const HashVal &other) const {
|
||||||
|
return (hv[0] == other.hv[0] &&
|
||||||
|
hv[1] == other.hv[1] &&
|
||||||
|
hv[2] == other.hv[2] &&
|
||||||
|
hv[3] == other.hv[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: HashVal::operator ==
|
||||||
|
// Access: Public
|
||||||
|
// Description: Returns the integer value of the indicated component.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE uint HashVal::
|
||||||
|
get_value(int val) const {
|
||||||
|
nassertr(val >= 0 && val < 4, 0);
|
||||||
|
return hv[val];
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: HashVal::output
|
||||||
|
// Access: Public
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE void HashVal::
|
||||||
|
output(ostream &out) const {
|
||||||
|
out << "[" << hv[0] << " " << hv[1] << " " << hv[2] << " " << hv[3] << "]";
|
||||||
|
}
|
7
panda/src/downloader/hashVal.cxx
Normal file
7
panda/src/downloader/hashVal.cxx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// Filename: hashVal.cxx
|
||||||
|
// Created by: drose (14Nov00)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "hashVal.h"
|
||||||
|
|
35
panda/src/downloader/hashVal.h
Normal file
35
panda/src/downloader/hashVal.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// Filename: hashVal.h
|
||||||
|
// Created by: drose (14Nov00)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef HASHVAL_H
|
||||||
|
#define HASHVAL_H
|
||||||
|
|
||||||
|
#include <pandabase.h>
|
||||||
|
#include <typedef.h>
|
||||||
|
#include <notify.h>
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Class : HashVal
|
||||||
|
// Description : A sixteen-byte hash value sent to the crypt library.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
class EXPCL_PANDAEXPRESS HashVal {
|
||||||
|
public:
|
||||||
|
INLINE HashVal();
|
||||||
|
INLINE bool operator == (const HashVal &other) const;
|
||||||
|
INLINE uint get_value(int val) const;
|
||||||
|
|
||||||
|
INLINE void output(ostream &out) const;
|
||||||
|
|
||||||
|
uint hv[4];
|
||||||
|
};
|
||||||
|
|
||||||
|
INLINE ostream &operator << (ostream &out, const HashVal &hv) {
|
||||||
|
hv.output(out);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "hashVal.I"
|
||||||
|
|
||||||
|
#endif
|
@ -1,4 +1,5 @@
|
|||||||
#include <crypto_utils.h>
|
#include <crypto_utils.h>
|
||||||
|
#include <hashVal.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[]) {
|
main(int argc, char *argv[]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user