diff --git a/panda/src/downloader/httpDate.I b/panda/src/downloader/httpDate.I index f2ac2cafe6..24286babef 100644 --- a/panda/src/downloader/httpDate.I +++ b/panda/src/downloader/httpDate.I @@ -117,6 +117,16 @@ operator < (const HTTPDate &other) const { return _time < other._time; } +//////////////////////////////////////////////////////////////////// +// Function: HTTPDate::Operator > +// Access: Published +// Description: +//////////////////////////////////////////////////////////////////// +INLINE bool HTTPDate:: +operator > (const HTTPDate &other) const { + return _time > other._time; +} + //////////////////////////////////////////////////////////////////// // Function: HTTPDate::compare_to // Access: Published diff --git a/panda/src/downloader/httpDate.h b/panda/src/downloader/httpDate.h index fd1ea87d88..5a441e9818 100644 --- a/panda/src/downloader/httpDate.h +++ b/panda/src/downloader/httpDate.h @@ -21,6 +21,8 @@ #include "pandabase.h" +#include + //////////////////////////////////////////////////////////////////// // Class : HTTPDate // Description : A container for an HTTP-legal time/date indication. @@ -46,6 +48,7 @@ PUBLISHED: INLINE bool operator == (const HTTPDate &other) const; INLINE bool operator != (const HTTPDate &other) const; INLINE bool operator < (const HTTPDate &other) const; + INLINE bool operator > (const HTTPDate &other) const; INLINE int compare_to(const HTTPDate &other) const; INLINE void operator += (int seconds); diff --git a/pandaapp/src/httpbackup/Sources.pp b/pandaapp/src/httpbackup/Sources.pp index b088a67c35..1c83969614 100644 --- a/pandaapp/src/httpbackup/Sources.pp +++ b/pandaapp/src/httpbackup/Sources.pp @@ -6,9 +6,10 @@ #define USE_PACKAGES ssl #define OTHER_LIBS \ - progbase \ + progbase pandatoolbase \ express:c downloader:c pandaexpress:m \ - panda:m + panda:m dtool:m dtoolconfig:m \ + pystub #define SOURCES \ backupCatalog.I backupCatalog.cxx backupCatalog.h \ diff --git a/pandaapp/src/httpbackup/httpBackup.cxx b/pandaapp/src/httpbackup/httpBackup.cxx index 2687a22013..bda23196c9 100644 --- a/pandaapp/src/httpbackup/httpBackup.cxx +++ b/pandaapp/src/httpbackup/httpBackup.cxx @@ -240,7 +240,8 @@ post_command_line() { bool HTTPBackup:: dispatch_url(const string &opt, const string &arg, void *var) { URLSpec *up = (URLSpec *)var; - (*up) = URLSpec(arg); + URLSpec new_url(arg); + (*up) = new_url; return true; } diff --git a/pandaapp/src/indexify/Sources.pp b/pandaapp/src/indexify/Sources.pp index 484be65e6e..148a8e4670 100644 --- a/pandaapp/src/indexify/Sources.pp +++ b/pandaapp/src/indexify/Sources.pp @@ -3,8 +3,9 @@ #define TARGET indexify #define OTHER_LIBS \ - progbase \ - pnmimage:c pnmimagetypes:c panda:m \ + progbase pandatoolbase \ + pnmimage:c pnmimagetypes:c panda:m pandaexpress:m \ + dtool:m dtoolconfig:m \ pystub #define SOURCES \ @@ -25,8 +26,9 @@ #define TARGET font-samples #define OTHER_LIBS \ - progbase \ - pnmimage:c pnmimagetypes:c panda:m \ + progbase pandatoolbase \ + pnmimage:c pnmimagetypes:c panda:m pandaexpress:m \ + dtool:m dtoolconfig:m \ pystub #define SOURCES \ diff --git a/pandaapp/src/indexify/default_font.cxx b/pandaapp/src/indexify/default_font.cxx index dfcb29a736..8357532fa5 100644 --- a/pandaapp/src/indexify/default_font.cxx +++ b/pandaapp/src/indexify/default_font.cxx @@ -26,7 +26,7 @@ // This is used as a standard fallback font when no font file is // specified by the user. -const char default_font[] = { +const unsigned char default_font[] = { 0x80, 0x01, 0x6e, 0x06, 0x00, 0x00, 0x25, 0x21, 0x50, 0x53, 0x2d, 0x41, 0x64, 0x6f, 0x62, 0x65, 0x46, 0x6f, 0x6e, 0x74, 0x2d, 0x31, 0x2e, 0x30, 0x3a, 0x20, 0x4e, 0x69, 0x6d, 0x62, 0x75, 0x73, 0x53, diff --git a/pandaapp/src/indexify/default_font.h b/pandaapp/src/indexify/default_font.h index a2f5bcfbc8..ae779b331e 100644 --- a/pandaapp/src/indexify/default_font.h +++ b/pandaapp/src/indexify/default_font.h @@ -19,7 +19,7 @@ #ifndef DEFAULT_FONT_H #define DEFAULT_FONT_H -extern const char default_font[]; +extern const unsigned char default_font[]; extern const int default_font_size; #endif diff --git a/pandaapp/src/indexify/default_index_icons.cxx b/pandaapp/src/indexify/default_index_icons.cxx index d2de776349..f16717e07b 100644 --- a/pandaapp/src/indexify/default_index_icons.cxx +++ b/pandaapp/src/indexify/default_index_icons.cxx @@ -23,7 +23,7 @@ // supplied on the command line. const char *default_left_icon_filename = "left.png"; -const char default_left_icon[] = { +const unsigned char default_left_icon[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x03, 0x00, 0x00, 0x00, 0x0c, 0xee, 0x5e, 0x90, @@ -77,7 +77,7 @@ const char default_left_icon[] = { const int default_left_icon_size = sizeof(default_left_icon); const char *default_right_icon_filename = "right.png"; -const char default_right_icon[] = { +const unsigned char default_right_icon[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x03, 0x00, 0x00, 0x00, 0x0c, 0xee, 0x5e, 0x90, @@ -130,7 +130,7 @@ const char default_right_icon[] = { const int default_right_icon_size = sizeof(default_right_icon); const char *default_up_icon_filename = "up.png"; -const char default_up_icon[] = { +const unsigned char default_up_icon[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1e, 0x08, 0x03, 0x00, 0x00, 0x00, 0x0c, 0xee, 0x5e, 0x90, diff --git a/pandaapp/src/indexify/default_index_icons.h b/pandaapp/src/indexify/default_index_icons.h index bbfe1e256e..52ccaa7e7c 100644 --- a/pandaapp/src/indexify/default_index_icons.h +++ b/pandaapp/src/indexify/default_index_icons.h @@ -20,15 +20,15 @@ #define DEFAULT_INDEX_ICONS_H extern const char *default_left_icon_filename; -extern const char default_left_icon[]; +extern const unsigned char default_left_icon[]; extern const int default_left_icon_size; extern const char *default_right_icon_filename; -extern const char default_right_icon[]; +extern const unsigned char default_right_icon[]; extern const int default_right_icon_size; extern const char *default_up_icon_filename; -extern const char default_up_icon[]; +extern const unsigned char default_up_icon[]; extern const int default_up_icon_size; #endif diff --git a/pandaapp/src/indexify/fontSamples.cxx b/pandaapp/src/indexify/fontSamples.cxx index 52d77c1268..294849a31a 100644 --- a/pandaapp/src/indexify/fontSamples.cxx +++ b/pandaapp/src/indexify/fontSamples.cxx @@ -24,6 +24,10 @@ #include +#ifdef WIN32_VC +#define snprintf _snprintf +#endif + //////////////////////////////////////////////////////////////////// // Function: FontSamples::Constructor // Access: Public @@ -166,7 +170,8 @@ post_command_line() { } if (_name_text_maker == (PNMTextMaker *)NULL) { - _name_text_maker = new PNMTextMaker(default_font, default_font_size, 0); + _name_text_maker = new PNMTextMaker((const char *)default_font, + default_font_size, 0); if (!_name_text_maker->is_valid()) { nout << "Unable to open default font.\n"; delete _name_text_maker; diff --git a/pandaapp/src/indexify/indexify.cxx b/pandaapp/src/indexify/indexify.cxx index 18a36b41be..78c4afdd1e 100644 --- a/pandaapp/src/indexify/indexify.cxx +++ b/pandaapp/src/indexify/indexify.cxx @@ -376,7 +376,8 @@ post_command_line() { } if (_text_maker == (PNMTextMaker *)NULL) { - _text_maker = new PNMTextMaker(default_font, default_font_size, 0); + _text_maker = new PNMTextMaker((const char *)default_font, + default_font_size, 0); if (!_text_maker->is_valid()) { nout << "Unable to open default font.\n"; delete _text_maker; @@ -405,7 +406,7 @@ post_command_line() { nout << "Unable to write to " << icon_filename << "\n"; exit(1); } - output.write(default_left_icon, default_left_icon_size); + output.write((const char *)default_left_icon, default_left_icon_size); } } if (next_icon.empty()) { @@ -421,7 +422,7 @@ post_command_line() { nout << "Unable to write to " << icon_filename << "\n"; exit(1); } - output.write(default_right_icon, default_right_icon_size); + output.write((const char *)default_right_icon, default_right_icon_size); } } if (up_icon.empty()) { @@ -437,7 +438,7 @@ post_command_line() { nout << "Unable to write to " << icon_filename << "\n"; exit(1); } - output.write(default_up_icon, default_up_icon_size); + output.write((const char *)default_up_icon, default_up_icon_size); } } } diff --git a/pandaapp/src/stitch/Sources.pp b/pandaapp/src/stitch/Sources.pp index 371836d302..9801ace95c 100644 --- a/pandaapp/src/stitch/Sources.pp +++ b/pandaapp/src/stitch/Sources.pp @@ -3,7 +3,7 @@ #define LOCAL_LIBS \ stitchbase #define OTHER_LIBS \ - progbase converter \ + progbase pandatoolbase converter \ pnmimage:c mathutil:c linmath:c putil:c panda:m \ express:c pandabase:c pandaexpress:m \ dtoolutil:c dconfig:c dtoolbase:c dtoolconfig:m dtool:m \ @@ -21,7 +21,7 @@ #define LOCAL_LIBS \ stitchbase #define OTHER_LIBS \ - progbase converter \ + progbase pandatoolbase converter \ pnmimagetypes:c pnmimage:c linmath:c putil:c panda:m \ express:c pandabase:c pandaexpress:m \ dtoolutil:c dconfig:c dtoolbase:c dtoolconfig:m dtool:m \ diff --git a/pandaapp/src/stitchbase/layeredImage.cxx b/pandaapp/src/stitchbase/layeredImage.cxx index 29a526821f..42edc23220 100644 --- a/pandaapp/src/stitchbase/layeredImage.cxx +++ b/pandaapp/src/stitchbase/layeredImage.cxx @@ -728,7 +728,7 @@ xcf_save_tile(const LayeredImage::TileManager &tm, int level, int tile) { array[i++] = tm._data->get_red_val(x, y); array[i++] = tm._data->get_green_val(x, y); array[i++] = tm._data->get_blue_val(x, y); - array[i++] = 255; + array[i++] = -1; } } assert(i == size); diff --git a/pandaapp/src/stitchbase/stitchParser.yxx b/pandaapp/src/stitchbase/stitchParser.yxx index ec6472af88..356b0de7ac 100644 --- a/pandaapp/src/stitchbase/stitchParser.yxx +++ b/pandaapp/src/stitchbase/stitchParser.yxx @@ -91,6 +91,7 @@ stitch_init_parser(istream &in, const string &filename, stitch_file: commands + ; commands: empty @@ -333,7 +334,7 @@ points_list: length: NUMBER length_units { - $$ = $1 * $2 + $$ = $1 * $2; } | NUMBER_FEET {