From 2433fd2a1aefc38c72d83714029d6d3d62ee1b01 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 17 Nov 2000 04:07:24 +0000 Subject: [PATCH] *** empty log message *** --- panda/src/downloader/downloader.cxx | 2 +- panda/src/downloader/hashVal.I | 124 ++++++++++++++-------------- panda/src/downloader/hashVal.cxx | 14 ++-- panda/src/downloader/hashVal.h | 68 +++++++-------- 4 files changed, 104 insertions(+), 104 deletions(-) diff --git a/panda/src/downloader/downloader.cxx b/panda/src/downloader/downloader.cxx index c882e2a186..07f0edcd28 100644 --- a/panda/src/downloader/downloader.cxx +++ b/panda/src/downloader/downloader.cxx @@ -576,7 +576,7 @@ bool Downloader:: parse_http_response(const string &resp) { size_t ws = resp.find(" ", 0); string httpstr = resp.substr(0, ws); - if (httpstr != "HTTP/1.1") { + if (!(httpstr == "HTTP/1.1")) { downloader_cat.error() << "Downloader::parse_http_response() - not HTTP/1.1 - got: " << httpstr << endl; diff --git a/panda/src/downloader/hashVal.I b/panda/src/downloader/hashVal.I index 3ff87b7331..4a94143a92 100644 --- a/panda/src/downloader/hashVal.I +++ b/panda/src/downloader/hashVal.I @@ -1,62 +1,62 @@ -// 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::get_value -// 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::set_value -// Access: Public -// Description: Sets the hash value at index val -//////////////////////////////////////////////////////////////////// -INLINE void HashVal:: -set_value(int val, uint hash) { - nassertv(val >= 0 && val < 4); - hv[val] = hash; -} - - -//////////////////////////////////////////////////////////////////// -// Function: HashVal::output -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -INLINE void HashVal:: -output(ostream &out) const { - out << "[" << hv[0] << " " << hv[1] << " " << hv[2] << " " << hv[3] << "]"; -} +// 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::get_value +// 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::set_value +// Access: Public +// Description: Sets the hash value at index val +//////////////////////////////////////////////////////////////////// +INLINE void HashVal:: +set_value(int val, uint hash) { + nassertv(val >= 0 && val < 4); + hv[val] = hash; +} + + +//////////////////////////////////////////////////////////////////// +// Function: HashVal::output +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void HashVal:: +output(ostream &out) const { + out << "[" << hv[0] << " " << hv[1] << " " << hv[2] << " " << hv[3] << "]"; +} diff --git a/panda/src/downloader/hashVal.cxx b/panda/src/downloader/hashVal.cxx index b61c939ccb..f78cf3ac15 100644 --- a/panda/src/downloader/hashVal.cxx +++ b/panda/src/downloader/hashVal.cxx @@ -1,7 +1,7 @@ -// Filename: hashVal.cxx -// Created by: drose (14Nov00) -// -//////////////////////////////////////////////////////////////////// - -#include "hashVal.h" - +// Filename: hashVal.cxx +// Created by: drose (14Nov00) +// +//////////////////////////////////////////////////////////////////// + +#include "hashVal.h" + diff --git a/panda/src/downloader/hashVal.h b/panda/src/downloader/hashVal.h index 41e6aff8e0..3cde8a1d49 100644 --- a/panda/src/downloader/hashVal.h +++ b/panda/src/downloader/hashVal.h @@ -1,34 +1,34 @@ -// Filename: hashVal.h -// Created by: drose (14Nov00) -// -//////////////////////////////////////////////////////////////////// - -#ifndef HASHVAL_H -#define HASHVAL_H - -#include -#include -#include - -//////////////////////////////////////////////////////////////////// -// 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 set_value(int val, uint hash); - 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 +// Filename: hashVal.h +// Created by: drose (14Nov00) +// +//////////////////////////////////////////////////////////////////// + +#ifndef HASHVAL_H +#define HASHVAL_H + +#include +#include +#include + +//////////////////////////////////////////////////////////////////// +// 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 set_value(int val, uint hash); + 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