*** empty log message ***

This commit is contained in:
David Rose 2000-10-31 01:48:02 +00:00
parent d9b5b8ad1c
commit 87aaa3d68d
40 changed files with 167 additions and 116 deletions

View File

@ -10,7 +10,7 @@
#if $[eq $[DEPEND_DIRS],] #if $[eq $[DEPEND_DIRS],]
#define DEPENDABLE_HEADERS #define DEPENDABLE_HEADERS
#forscopes metalib_target static_lib_target lib_target noinst_lib_target bin_target noinst_bin_target #forscopes metalib_target static_lib_target ss_lib_target lib_target noinst_lib_target bin_target noinst_bin_target
// We can optimize quite a bit by evaluating now several of the key // We can optimize quite a bit by evaluating now several of the key
// deferred variables defined in Globals.pp. This way they won't need // deferred variables defined in Globals.pp. This way they won't need
// to get repeatedly reevaluated as each directory examines each // to get repeatedly reevaluated as each directory examines each
@ -29,7 +29,7 @@ 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,$[SOURCES]]
#end metalib_target static_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
// Allow the user to define additional EXTRA_DEPENDS targets in each // Allow the user to define additional EXTRA_DEPENDS targets in each
// Sources.pp. // Sources.pp.

View File

@ -35,13 +35,13 @@
// variable as set for the dconfig library (that is, the expression // variable as set for the dconfig library (that is, the expression
// $[SOURCES] is evaluated within the named scope whose key is // $[SOURCES] is evaluated within the named scope whose key is
// "dconfig"--whose variable $[TARGET] was defined to be "dconfig"). // "dconfig"--whose variable $[TARGET] was defined to be "dconfig").
#map all_libs TARGET(*/static_lib_target */lib_target */noinst_lib_target */metalib_target) #map all_libs TARGET(*/static_lib_target */ss_lib_target */lib_target */noinst_lib_target */metalib_target)
// These allow us to determine whether a particular local library is a // These allow us to determine whether a particular local library is a
// static or a dynamic library. If the library name appears in the // static or a dynamic library. If the library name appears in the
// static_libs map, it is a static library (i.e. libname.a); // static_libs map, it is a static library (i.e. libname.a);
// otherwise, it is a dynamic library (libname.so). // otherwise, it is a dynamic library (libname.so).
#map static_libs TARGET(*/static_lib_target) #map static_libs TARGET(*/static_lib_target */ss_lib_target)
#map dynamic_libs TARGET(*/lib_target */noinst_lib_target */metalib_target) #map dynamic_libs TARGET(*/lib_target */noinst_lib_target */metalib_target)
// This lets us identify which metalib, if any, is including each // This lets us identify which metalib, if any, is including each
@ -507,7 +507,7 @@
#end lib_target noinst_lib_target #end lib_target noinst_lib_target
// These will never be part of a metalib. // These will never be part of a metalib.
#forscopes static_lib_target bin_target noinst_bin_target metalib_target #forscopes static_lib_target ss_lib_target bin_target noinst_bin_target metalib_target
#foreach depend $[LOCAL_LIBS] #foreach depend $[LOCAL_LIBS]
#define depend_metalib $[module $[TARGET],$[depend]] #define depend_metalib $[module $[TARGET],$[depend]]
#if $[ne $[depend_metalib],] #if $[ne $[depend_metalib],]
@ -518,7 +518,7 @@
#set depend_libs $[depend_libs] $[depend] #set depend_libs $[depend_libs] $[depend]
#endif #endif
#end depend #end depend
#end static_lib_target bin_target noinst_bin_target metalib_target #end static_lib_target ss_lib_target bin_target noinst_bin_target metalib_target
// In case we're defining any metalibs, these depend directly on // In case we're defining any metalibs, these depend directly on
// their components as well. // their components as well.

View File

@ -54,7 +54,7 @@
// list of binaries that are to be built only when specifically asked // list of binaries that are to be built only when specifically asked
// for. // for.
#define lib_targets $[patsubst %,$[so_dir]\lib%$[dllext].dll,$[active_target(metalib_target noinst_lib_target)] $[real_lib_targets]] #define lib_targets $[patsubst %,$[so_dir]\lib%$[dllext].dll,$[active_target(metalib_target noinst_lib_target)] $[real_lib_targets]]
#define static_lib_targets $[active_target(static_lib_target):%=$[st_dir]\lib%$[dllext].lib] #define static_lib_targets $[active_target(static_lib_target ss_lib_target):%=$[st_dir]\lib%$[dllext].lib]
#define bin_targets \ #define bin_targets \
$[active_target(bin_target noinst_bin_target):%=$[st_dir]\%.exe] \ $[active_target(bin_target noinst_bin_target):%=$[st_dir]\%.exe] \
$[active_target(sed_bin_target):%=$[st_dir]\%] $[active_target(sed_bin_target):%=$[st_dir]\%]
@ -62,13 +62,13 @@
// And these variables will define the various things we need to // And these variables will define the various things we need to
// install. // install.
#define install_lib $[active_target(metalib_target static_lib_target)] $[real_lib_targets] #define install_lib $[active_target(metalib_target static_lib_target ss_lib_target)] $[real_lib_targets]
#define install_bin $[active_target(bin_target)] #define install_bin $[active_target(bin_target)]
#define install_scripts $[sort $[INSTALL_SCRIPTS(metalib_target lib_target static_lib_target bin_target)] $[INSTALL_SCRIPTS]] #define install_scripts $[sort $[INSTALL_SCRIPTS(metalib_target lib_target static_lib_target ss_lib_target bin_target)] $[INSTALL_SCRIPTS]]
#define install_headers $[sort $[INSTALL_HEADERS(metalib_target lib_target static_lib_target bin_target)] $[INSTALL_HEADERS]] #define install_headers $[sort $[INSTALL_HEADERS(metalib_target lib_target static_lib_target ss_lib_target bin_target)] $[INSTALL_HEADERS]]
#define install_parser_inc $[sort $[INSTALL_PARSER_INC]] #define install_parser_inc $[sort $[INSTALL_PARSER_INC]]
#define install_data $[sort $[INSTALL_DATA(metalib_target lib_target static_lib_target bin_target)] $[INSTALL_DATA]] #define install_data $[sort $[INSTALL_DATA(metalib_target lib_target static_lib_target ss_lib_target bin_target)] $[INSTALL_DATA]]
#define install_config $[sort $[INSTALL_CONFIG(metalib_target lib_target static_lib_target bin_target)] $[INSTALL_CONFIG]] #define install_config $[sort $[INSTALL_CONFIG(metalib_target lib_target static_lib_target ss_lib_target bin_target)] $[INSTALL_CONFIG]]
#define install_igatedb $[sort $[get_igatedb(metalib_target lib_target)]] #define install_igatedb $[sort $[get_igatedb(metalib_target lib_target)]]
// $[so_sources] is the set of sources that belong on a shared object, // $[so_sources] is the set of sources that belong on a shared object,
@ -77,7 +77,7 @@
// don't need to make this distinction, but we do anyway in case we // don't need to make this distinction, but we do anyway in case we
// might in the future for some nutty reason. // might in the future for some nutty reason.
#define so_sources $[get_sources(metalib_target lib_target noinst_lib_target)] #define so_sources $[get_sources(metalib_target lib_target noinst_lib_target)]
#define st_sources $[get_sources(static_lib_target bin_target noinst_bin_target test_bin_target)] #define st_sources $[get_sources(static_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target)]
// These are the source files that our dependency cache file will // These are the source files that our dependency cache file will
// depend on. If it's an empty list, we won't bother writing rules to // depend on. If it's an empty list, we won't bother writing rules to
@ -106,7 +106,7 @@
// which to build a particular source file, since some targets may // which to build a particular source file, since some targets may
// have different requirements (e.g. different local_libs, or // have different requirements (e.g. different local_libs, or
// different USE_this or USE_that) than other targets. // different USE_this or USE_that) than other targets.
#map all_sources get_sources(metalib_target lib_target noinst_lib_target static_lib_target bin_target noinst_bin_target test_bin_target) #map all_sources get_sources(metalib_target lib_target noinst_lib_target static_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target)
// We define $[complete_local_libs] as the full set of libraries (from // We define $[complete_local_libs] as the full set of libraries (from
// within this tree) that we must link a particular target with. It // within this tree) that we must link a particular target with. It
@ -214,13 +214,13 @@ cleanall : clean
$[if $[install_config],$[install_config_dir]] \ $[if $[install_config],$[install_config_dir]] \
$[if $[install_igatedb],$[install_igatedb_dir]] \ $[if $[install_igatedb],$[install_igatedb_dir]] \
] \ ] \
$[active_target(metalib_target lib_target static_lib_target):%=install-lib%] \ $[active_target(metalib_target lib_target static_lib_target ss_lib_target):%=install-lib%] \
$[active_target(bin_target sed_bin_target):%=install-%] \ $[active_target(bin_target sed_bin_target):%=install-%] \
$[installed_files] $[installed_files]
install : all $[install_targets] install : all $[install_targets]
uninstall : $[active_target(metalib_target lib_target static_lib_target):%=uninstall-lib%] $[active_target(bin_target):%=uninstall-%] uninstall : $[active_target(metalib_target lib_target static_lib_target ss_lib_target):%=uninstall-lib%] $[active_target(bin_target):%=uninstall-%]
#if $[installed_files] #if $[installed_files]
del /f $[sort $[installed_files]] del /f $[sort $[installed_files]]
#endif #endif
@ -297,9 +297,10 @@ $[osfilename $[directory]] :
#define sources \ #define sources \
$[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[so_dir]\%.obj,%,,$[get_sources] $[igateoutput] $[igatemout]]] \ $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[so_dir]\%.obj,%,,$[get_sources] $[igateoutput] $[igatemout]]] \
$[components $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[RELDIR]\$[so_dir]\%.obj,%,,$[get_sources] $[get_igateoutput]]],$[active_component_libs]] $[components $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[RELDIR]\$[so_dir]\%.obj,%,,$[get_sources] $[get_igateoutput]]],$[active_component_libs]]
lib_$[TARGET]_so = $[osfilename $[sources]] #define varname $[subst -,_,lib$[TARGET]_so]
$[varname] = $[osfilename $[sources]]
#define target $[so_dir]\lib$[TARGET]$[dllext].dll #define target $[so_dir]\lib$[TARGET]$[dllext].dll
#define sources $(lib_$[TARGET]_so) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++] $[SHARED_LIB_C++]
@ -357,7 +358,7 @@ $[install_igatedb_dir]\$[igatedb] : $[so_dir]\$[igatedb]
copy $[so_dir]\$[local] $[dest] copy $[so_dir]\$[local] $[dest]
lib$[TARGET]_igatescan = $[osfilename $[igatescan]] lib$[TARGET]_igatescan = $[osfilename $[igatescan]]
$[so_dir]\$[igatedb] $[so_dir]\$[igateoutput] : $[filter-out .c .cxx,$[igatescan]] $[so_dir]\$[igatedb] $[so_dir]\$[igateoutput] : $[filter-out %.c %.cxx,$[igatescan]]
// We use forward slash for interrogate because it prefers those. // We use forward slash for interrogate because it prefers those.
interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan)
@ -405,9 +406,10 @@ $[target] : $[source]
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
#forscopes noinst_lib_target #forscopes noinst_lib_target
lib_$[TARGET]_so = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[so_dir]\%.obj,%,,$[get_sources]]]] #define varname $[subst -,_,lib$[TARGET]_so]
$[varname] = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[so_dir]\%.obj,%,,$[get_sources]]]]
#define target $[so_dir]\lib$[TARGET]$[dllext].dll #define target $[so_dir]\lib$[TARGET]$[dllext].dll
#define sources $(lib_$[TARGET]_so) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++] $[SHARED_LIB_C++]
@ -425,10 +427,11 @@ $[target] : $[sources]
// a metalib, making the rules relatively simple. // a metalib, making the rules relatively simple.
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
#forscopes static_lib_target #forscopes static_lib_target ss_lib_target
lib_$[TARGET]_a = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[st_dir]\%.obj,%,,$[get_sources]]]] #define varname $[subst -,_,lib$[TARGET]_a]
$[varname] = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[st_dir]\%.obj,%,,$[get_sources]]]]
#define target $[st_dir]\lib$[TARGET]$[dllext].lib #define target $[st_dir]\lib$[TARGET]$[dllext].lib
#define sources $(lib_$[TARGET]_a) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[STATIC_LIB_C++] $[STATIC_LIB_C++]
@ -455,7 +458,7 @@ $[install_lib_dir]\lib$[TARGET]$[dllext].lib : $[st_dir]\lib$[TARGET]$[dllext].l
#define dest $[install_lib_dir] #define dest $[install_lib_dir]
copy $[st_dir]\$[local] $[dest] copy $[st_dir]\$[local] $[dest]
#end static_lib_target #end static_lib_target ss_lib_target
@ -500,9 +503,10 @@ $[install_bin_dir]\$[TARGET] : $[st_dir]\$[TARGET]
#forscopes bin_target #forscopes bin_target
$[TARGET] : $[st_dir]\$[TARGET].exe $[TARGET] : $[st_dir]\$[TARGET].exe
bin_$[TARGET] = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[st_dir]\%.obj,%,,$[get_sources]]]] #define varname $[subst -,_,bin_$[TARGET]]
$[varname] = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[st_dir]\%.obj,%,,$[get_sources]]]]
#define target $[st_dir]\$[TARGET].exe #define target $[st_dir]\$[TARGET].exe
#define sources $(bin_$[TARGET]) #define sources $($[varname])
#define ld $[get_ld] #define ld $[get_ld]
$[target] : $[sources] $[target] : $[sources]
#if $[ld] #if $[ld]
@ -548,9 +552,10 @@ $[install_bin_dir]\$[TARGET].exe : $[st_dir]\$[TARGET].exe
#forscopes noinst_bin_target test_bin_target #forscopes noinst_bin_target test_bin_target
$[TARGET] : $[st_dir]\$[TARGET].exe $[TARGET] : $[st_dir]\$[TARGET].exe
bin_$[TARGET] = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[st_dir]\%.obj,%,,$[get_sources]]]] #define varname $[subst -,_,bin_$[TARGET]]
$[varname] = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[st_dir]\%.obj,%,,$[get_sources]]]]
#define target $[st_dir]\$[TARGET].exe #define target $[st_dir]\$[TARGET].exe
#define sources $(bin_$[TARGET]) #define sources $($[varname])
$[target] : $[sources] $[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]] #if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[LINK_BIN_C++] $[LINK_BIN_C++]

View File

@ -677,6 +677,7 @@ open_read(ifstream &stream) const {
} }
#endif #endif
stream.clear();
stream.open(to_os_specific().c_str(), open_mode); stream.open(to_os_specific().c_str(), open_mode);
return (!stream.fail()); return (!stream.fail());
} }
@ -706,6 +707,7 @@ open_write(ofstream &stream) const {
} }
#endif #endif
stream.clear();
#ifdef WIN32_VC #ifdef WIN32_VC
stream.open(to_os_specific().c_str(), open_mode); stream.open(to_os_specific().c_str(), open_mode);
#else #else
@ -740,6 +742,7 @@ open_append(ofstream &stream) const {
} }
#endif #endif
stream.clear();
#ifdef WIN32_VC #ifdef WIN32_VC
stream.open(to_os_specific().c_str(), open_mode); stream.open(to_os_specific().c_str(), open_mode);
#else #else
@ -774,6 +777,7 @@ open_read_write(fstream &stream) const {
} }
#endif #endif
stream.clear();
#ifdef WIN32_VC #ifdef WIN32_VC
stream.open(to_os_specific().c_str(), open_mode); stream.open(to_os_specific().c_str(), open_mode);
#else #else

View File

@ -22,10 +22,10 @@
#include "lmatrix.h" #include "lmatrix.h"
#include "luse.h" #include "luse.h"
void rotate_to(LMatrix3f &mat, const LVector3f &a, const LVector3f &b); EXPCL_PANDA void rotate_to(LMatrix3f &mat, const LVector3f &a, const LVector3f &b);
void rotate_to(LMatrix3d &mat, const LVector3d &a, const LVector3d &b); EXPCL_PANDA void rotate_to(LMatrix3d &mat, const LVector3d &a, const LVector3d &b);
void rotate_to(LMatrix4f &mat, const LVector3f &a, const LVector3f &b); EXPCL_PANDA void rotate_to(LMatrix4f &mat, const LVector3f &a, const LVector3f &b);
void rotate_to(LMatrix4d &mat, const LVector3d &a, const LVector3d &b); EXPCL_PANDA void rotate_to(LMatrix4d &mat, const LVector3d &a, const LVector3d &b);
#endif #endif

View File

@ -13,6 +13,10 @@
#include <prerror.h> #include <prerror.h>
#ifdef WIN32_VC
#include <winsock.h> // For gethostname()
#endif
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: ConnectionManager::Constructor // Function: ConnectionManager::Constructor
// Access: Public // Access: Public
@ -252,6 +256,23 @@ close_connection(const PT(Connection) &connection) {
return true; return true;
} }
////////////////////////////////////////////////////////////////////
// Function: ConnectionManager::get_host_name
// Access: Public, Static
// Description: Returns the name of this particular machine on the
// network, if available, or the empty string if the
// hostname cannot be determined.
////////////////////////////////////////////////////////////////////
string ConnectionManager::
get_host_name() {
char temp_buff[1024];
if (gethostname(temp_buff, 1024) == 0) {
return string(temp_buff);
}
return string();
}
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: ConnectionManager::new_connection // Function: ConnectionManager::new_connection
// Access: Protected // Access: Protected

View File

@ -50,6 +50,8 @@ public:
bool close_connection(const PT(Connection) &connection); bool close_connection(const PT(Connection) &connection);
static string get_host_name();
protected: protected:
void new_connection(const PT(Connection) &connection); void new_connection(const PT(Connection) &connection);
virtual void connection_reset(const PT(Connection) &connection)=0; virtual void connection_reset(const PT(Connection) &connection)=0;

View File

@ -4,8 +4,8 @@
eggbase progbase eggbase progbase
#define OTHER_LIBS \ #define OTHER_LIBS \
loader:c egg:c sgraphutil:c sgattrib:c sgraph:c pnmimagetypes:c \ loader:c egg:c sgraphutil:c sgattrib:c sgraph:c pnmimagetypes:c \
graph:c putil:c express:c panda:m \ graph:c putil:c express:c panda:m pandaexpress:m \
interrogatedb:c dtoolutil:c dconfig:c dtool:m interrogatedb:c dtoolutil:c dconfig:c dtool:m pystub
#define UNIX_SYS_LIBS \ #define UNIX_SYS_LIBS \
m m
@ -22,8 +22,8 @@
eggbase progbase eggbase progbase
#define OTHER_LIBS \ #define OTHER_LIBS \
loader:c egg2sg:c builder:c egg:c pnmimagetypes:c graph:c putil:c \ loader:c egg2sg:c builder:c egg:c pnmimagetypes:c graph:c putil:c \
express:c panda:m interrogatedb:c \ express:c pandaegg:m panda:m pandaexpress:m \
interrogatedb:c dtoolutil:c dconfig:c dtool:m interrogatedb:c dtoolutil:c dconfig:c dtool:m pystub
#define UNIX_SYS_LIBS \ #define UNIX_SYS_LIBS \
m m

View File

@ -1,4 +1,4 @@
#begin lib_target #begin ss_lib_target
#define TARGET eggbase #define TARGET eggbase
#define LOCAL_LIBS \ #define LOCAL_LIBS \
progbase progbase
@ -15,5 +15,5 @@
eggBase.h eggConverter.h eggFilter.h eggReader.h eggToSomething.h \ eggBase.h eggConverter.h eggFilter.h eggReader.h eggToSomething.h \
eggWriter.h somethingToEgg.h eggWriter.h somethingToEgg.h
#end lib_target #end ss_lib_target

View File

@ -96,8 +96,7 @@ get_output() {
} else { } else {
// Attempt to open the named file. // Attempt to open the named file.
unlink(_output_filename.c_str()); unlink(_output_filename.c_str());
_output_stream.open(_output_filename.c_str(), ios::out, 0666); if (!_output_filename.open_write(_output_stream)) {
if (!_output_stream) {
nout << "Unable to write to " << _output_filename << "\n"; nout << "Unable to write to " << _output_filename << "\n";
exit(1); exit(1);
} }

View File

@ -12,8 +12,6 @@
#include <filename.h> #include <filename.h>
#include <fstream.h>
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : EggWriter // Class : EggWriter
// Description : This is the base class for a program that generates // Description : This is the base class for a program that generates

View File

@ -77,7 +77,7 @@ handle_args(Args &args) {
_input_filename = args[0]; _input_filename = args[0];
if (access(_input_filename.c_str(), R_OK) != 0) { if (!_input_filename.exists()) {
nout << "Cannot find input file " << _input_filename << "\n"; nout << "Cannot find input file " << _input_filename << "\n";
return false; return false;
} }

View File

@ -5,8 +5,8 @@
#define LOCAL_LIBS \ #define LOCAL_LIBS \
eggbase progbase eggbase progbase
#define OTHER_LIBS \ #define OTHER_LIBS \
egg:c linmath:c putil:c express:c panda:m \ egg:c linmath:c putil:c express:c pandaegg:m panda:m pandaexpress:m \
dtoolutil:c dconfig:c dtool:m dtoolutil:c dconfig:c dtool:m pystub
#define UNIX_SYS_LIBS \ #define UNIX_SYS_LIBS \
m m

View File

@ -1,4 +1,4 @@
#begin lib_target #begin ss_lib_target
#define TARGET flt #define TARGET flt
#define LOCAL_LIBS pandatoolbase #define LOCAL_LIBS pandatoolbase
#define OTHER_LIBS \ #define OTHER_LIBS \
@ -43,7 +43,7 @@
fltTransformTranslate.h fltUnsupportedRecord.h fltVertex.I \ fltTransformTranslate.h fltUnsupportedRecord.h fltVertex.I \
fltVertex.h fltVertexList.h fltVertex.h fltVertexList.h
#end lib_target #end ss_lib_target
#begin test_bin_target #begin test_bin_target
#define TARGET test_flt #define TARGET test_flt

View File

@ -1,7 +1,7 @@
#define DIRECTORY_IF_GTKMM yes #define DIRECTORY_IF_GTKMM yes
#define USE_GTKMM yes #define USE_GTKMM yes
#begin lib_target #begin ss_lib_target
#define TARGET gtkbase #define TARGET gtkbase
#define LOCAL_LIBS \ #define LOCAL_LIBS \
progbase progbase
@ -14,5 +14,5 @@
#define INSTALL_HEADERS \ #define INSTALL_HEADERS \
basicGtkDialog.h basicGtkWindow.h gtkBase.h request_initial_size.h basicGtkDialog.h basicGtkWindow.h gtkBase.h request_initial_size.h
#end lib_target #end ss_lib_target

View File

@ -1,4 +1,4 @@
#begin lib_target #begin ss_lib_target
#define TARGET imagebase #define TARGET imagebase
#define LOCAL_LIBS \ #define LOCAL_LIBS \
progbase progbase
@ -13,5 +13,5 @@
#define INSTALL_HEADERS \ #define INSTALL_HEADERS \
imageBase.h imageFilter.h imageReader.h imageWriter.I imageWriter.h imageBase.h imageFilter.h imageReader.h imageWriter.I imageWriter.h
#end lib_target #end ss_lib_target

View File

@ -12,8 +12,6 @@
#include <filename.h> #include <filename.h>
#include <fstream.h>
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Class : ImageWriter // Class : ImageWriter
// Description : This is the base class for a program that generates // Description : This is the base class for a program that generates

View File

@ -5,7 +5,8 @@
#define LOCAL_LIBS \ #define LOCAL_LIBS \
imagebase progbase imagebase progbase
#define OTHER_LIBS \ #define OTHER_LIBS \
pnmimagetypes:c pnmimage:c putil:c express:c panda:m dtool pnmimagetypes:c pnmimage:c putil:c express:c panda:m \
pandaexpress:m dtool pystub
#define UNIX_SYS_LIBS \ #define UNIX_SYS_LIBS \
m m

View File

@ -15,8 +15,6 @@
#include <eggNurbsCurve.h> #include <eggNurbsCurve.h>
#include <eggPolygon.h> #include <eggPolygon.h>
#include <iostream.h>
#include <maya/MArgList.h> #include <maya/MArgList.h>
#include <maya/MColor.h> #include <maya/MColor.h>
#include <maya/MDagPath.h> #include <maya/MDagPath.h>

View File

@ -1,4 +1,4 @@
#begin lib_target #begin ss_lib_target
#define TARGET pandatoolbase #define TARGET pandatoolbase
#define SOURCES \ #define SOURCES \
@ -7,4 +7,4 @@
#define INSTALL_HEADERS \ #define INSTALL_HEADERS \
pandatoolbase.h pandatoolbase.h
#end lib_target #end ss_lib_target

View File

@ -1,4 +1,4 @@
#begin lib_target #begin ss_lib_target
#define TARGET progbase #define TARGET progbase
#define LOCAL_LIBS \ #define LOCAL_LIBS \
pandatoolbase pandatoolbase
@ -14,7 +14,7 @@
programBase.I programBase.h wordWrapStream.h wordWrapStreamBuf.I \ programBase.I programBase.h wordWrapStream.h wordWrapStreamBuf.I \
wordWrapStreamBuf.h wordWrapStreamBuf.h
#end lib_target #end ss_lib_target
#begin test_bin_target #begin test_bin_target
#define TARGET test_prog #define TARGET test_prog

View File

@ -233,7 +233,7 @@ parse_command_line(int argc, char *argv[]) {
// Now add it to the GNU data structures. // Now add it to the GNU data structures.
struct option gopt; struct option gopt;
gopt.name = opt._option.c_str(); gopt.name = (char *)opt._option.c_str();
gopt.has_arg = (opt._parm_name.empty()) ? gopt.has_arg = (opt._parm_name.empty()) ?
no_argument : required_argument; no_argument : required_argument;
gopt.flag = (int *)NULL; gopt.flag = (int *)NULL;

View File

@ -9,8 +9,8 @@
#include <pandatoolbase.h> #include <pandatoolbase.h>
#include <filename.h> #include <filename.h>
#include <vector_string.h>
#include <iostream.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <map> #include <map>
@ -36,7 +36,7 @@ public:
virtual void parse_command_line(int argc, char *argv[]); virtual void parse_command_line(int argc, char *argv[]);
typedef vector<string> Args; typedef vector_string Args;
Filename _program_name; Filename _program_name;
Args _program_args; Args _program_args;
@ -94,7 +94,7 @@ private:
}; };
string _description; string _description;
typedef vector<string> Runlines; typedef vector_string Runlines;
Runlines _runlines; Runlines _runlines;
typedef map<string, Option> OptionsByName; typedef map<string, Option> OptionsByName;

View File

@ -23,7 +23,7 @@
// force a line break without a paragraph break, use // force a line break without a paragraph break, use
// '\r'. // '\r'.
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
class EXPCL_PANDA WordWrapStream : public ostream { class WordWrapStream : public ostream {
public: public:
WordWrapStream(ProgramBase *program); WordWrapStream(ProgramBase *program);

View File

@ -1,7 +1,7 @@
#define DIRECTORY_IF_NET yes #define DIRECTORY_IF_NET yes
#define USE_NET yes #define USE_NET yes
#begin lib_target #begin ss_lib_target
#define TARGET pstatserver #define TARGET pstatserver
#define LOCAL_LIBS pandatoolbase #define LOCAL_LIBS pandatoolbase
#define OTHER_LIBS \ #define OTHER_LIBS \
@ -26,5 +26,5 @@
pStatThreadData.I pStatThreadData.h pStatView.I pStatView.h \ pStatThreadData.I pStatThreadData.h pStatView.I pStatView.h \
pStatViewLevel.I pStatViewLevel.h pStatViewLevel.I pStatViewLevel.h
#end lib_target #end ss_lib_target

View File

@ -12,6 +12,32 @@
#include <stdio.h> // for sprintf #include <stdio.h> // for sprintf
////////////////////////////////////////////////////////////////////
// Function: PStatGraph::GuideBar::Constructor
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
PStatGraph::GuideBar::
GuideBar(double height, const string &label, bool is_target) :
_height(height),
_label(label),
_is_target(is_target)
{
}
////////////////////////////////////////////////////////////////////
// Function: PStatGraph::GuideBar::Copy Constructor
// Access: Public
// Description:
////////////////////////////////////////////////////////////////////
PStatGraph::GuideBar::
GuideBar(const PStatGraph::GuideBar &copy) :
_height(copy._height),
_label(copy._label),
_is_target(copy._is_target)
{
}
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: PStatGraph::Constructor // Function: PStatGraph::Constructor
// Access: Public // Access: Public
@ -65,7 +91,7 @@ get_num_guide_bars() const {
const PStatGraph::GuideBar &PStatGraph:: const PStatGraph::GuideBar &PStatGraph::
get_guide_bar(int n) const { get_guide_bar(int n) const {
#ifndef NDEBUG #ifndef NDEBUG
static GuideBar bogus_bar = { 0.0, "bogus", false }; static GuideBar bogus_bar(0.0, "bogus", false);
nassertr(n >= 0 && n < _guide_bars.size(), bogus_bar); nassertr(n >= 0 && n < _guide_bars.size(), bogus_bar);
#endif #endif
return _guide_bars[n]; return _guide_bars[n];
@ -171,9 +197,6 @@ make_guide_bar(double time) const {
} }
} }
GuideBar bar; return GuideBar(time, label,
bar._height = time; IS_NEARLY_EQUAL(1.0 / time, _target_frame_rate));
bar._label = label;
bar._is_target = (IS_NEARLY_EQUAL(1.0 / time, _target_frame_rate));
return bar;
} }

View File

@ -44,6 +44,9 @@ public:
class GuideBar { class GuideBar {
public: public:
GuideBar(double height, const string &label, bool is_target);
GuideBar(const GuideBar &copy);
double _height; double _height;
string _label; string _label;
bool _is_target; bool _is_target;

View File

@ -12,6 +12,7 @@
#include <pStatFrameData.h> #include <pStatFrameData.h>
#include <datagram.h> #include <datagram.h>
#include <datagramIterator.h> #include <datagramIterator.h>
#include <connectionManager.h>
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: PStatReader::Constructor // Function: PStatReader::Constructor
@ -118,10 +119,8 @@ idle() {
string PStatReader:: string PStatReader::
get_hostname() { get_hostname() {
if (_hostname.empty()) { if (_hostname.empty()) {
char temp_buff[1024]; _hostname = ConnectionManager::get_host_name();
if (gethostname(temp_buff, 1024) == 0) { if (_hostname.empty()) {
_hostname = temp_buff;
} else {
_hostname = "unknown"; _hostname = "unknown";
} }
} }

View File

@ -2,6 +2,8 @@
#define TARGET stitch-command #define TARGET stitch-command
#define LOCAL_LIBS \ #define LOCAL_LIBS \
stitchbase progbase stitchbase progbase
#define OTHER_LIBS \
linmath:c putil:c express:c panda:m pandaexpress:m pystub dtool
#define SOURCES \ #define SOURCES \
stitchCommandProgram.cxx stitchCommandProgram.h stitchCommandProgram.cxx stitchCommandProgram.h
@ -14,6 +16,8 @@
#define TARGET stitch-image #define TARGET stitch-image
#define LOCAL_LIBS \ #define LOCAL_LIBS \
stitchbase progbase stitchbase progbase
#define OTHER_LIBS \
linmath:c putil:c express:c panda:m pandaexpress:m pystub dtool
#define SOURCES \ #define SOURCES \
stitchImageProgram.cxx stitchImageProgram.h stitchImageProgram.cxx stitchImageProgram.h
@ -27,8 +31,8 @@
#define OTHER_LIBS \ #define OTHER_LIBS \
device:c tform:c graph:c dgraph:c sgraph:c gobj:c sgattrib:c \ device:c tform:c graph:c dgraph:c sgraph:c gobj:c sgattrib:c \
event:c chancfg:c display:c sgraphutil:c light:c putil:c express:c \ event:c chancfg:c display:c sgraphutil:c light:c putil:c express:c \
panda:m \ panda:m pandaexpress:m \
dtoolutil:c dconfig:c dtool:m dtoolutil:c dconfig:c dtool:m pystub
#define SOURCES \ #define SOURCES \
stitchViewerProgram.cxx stitchViewerProgram.h stitchViewerProgram.cxx stitchViewerProgram.h

View File

@ -1,7 +1,7 @@
#define YACC_PREFIX stitchyy #define YACC_PREFIX stitchyy
#define LFLAGS -i #define LFLAGS -i
#begin lib_target #begin ss_lib_target
#define TARGET stitchbase #define TARGET stitchbase
#define LOCAL_LIBS \ #define LOCAL_LIBS \
progbase progbase
@ -35,4 +35,4 @@
stitchParserDefs.h stitchPerspectiveLens.h stitchPoint.h \ stitchParserDefs.h stitchPerspectiveLens.h stitchPoint.h \
stitcher.h triangle.h triangleRasterizer.h stitcher.h triangle.h triangleRasterizer.h
#end lib_target #end ss_lib_target

View File

@ -6,9 +6,7 @@
#ifndef CONFIG_STITCH_H #ifndef CONFIG_STITCH_H
#define CONFIG_STITCH_H #define CONFIG_STITCH_H
#include <string> #include <pandatoolbase.h>
using namespace std;
extern string chan_cfg; extern string chan_cfg;

View File

@ -6,9 +6,9 @@
#include "layeredImage.h" #include "layeredImage.h"
#include <pnmImage.h> #include <pnmImage.h>
#include <fstream.h> #include <datagram.h>
#include <stdarg.h> #include <stdarg.h>
#include <netinet/in.h>
// Constants taken from various header files in Gimp. // Constants taken from various header files in Gimp.
#define TILE_WIDTH 64 #define TILE_WIDTH 64
@ -287,13 +287,13 @@ xcf_write_int8(const int8_t *data, int num) {
int LayeredImage:: int LayeredImage::
xcf_write_int32(const int32_t *data, int num) { xcf_write_int32(const int32_t *data, int num) {
int32_t *tmp = new int32_t[num]; // We need to write a bunch of big-endian int32's.
Datagram dg;
for (int i = 0; i < num; i++) { for (int i = 0; i < num; i++) {
tmp[i] = htonl(data[i]); dg.add_be_int32(data[i]);
} }
_out->write((const char *)tmp, num * sizeof(int32_t)); _out->write((const char *)dg.get_data(), dg.get_length());
delete[] tmp; return _pos += dg.get_length();
return _pos += num * sizeof(int32_t);
} }
int LayeredImage:: int LayeredImage::

View File

@ -9,6 +9,7 @@
#include <mathNumbers.h> #include <mathNumbers.h>
#include <math.h> #include <math.h>
#include <assert.h>
MorphGrid::Vertex:: MorphGrid::Vertex::
Vertex(const LPoint2d &p) { Vertex(const LPoint2d &p) {

View File

@ -95,6 +95,7 @@ private:
}; };
TriangleTree *_tree; TriangleTree *_tree;
friend class TriangleTree;
}; };
#endif #endif

View File

@ -9,8 +9,6 @@
#include "stitchParserDefs.h" #include "stitchParserDefs.h"
#include "stitchLexerDefs.h" #include "stitchLexerDefs.h"
#include <fstream.h>
StitchFile:: StitchFile::
StitchFile() { StitchFile() {
} }

View File

@ -93,10 +93,8 @@ stitchyyerror(const string &msg) {
} }
void void
stitchyyerror(ostrstream &strm) { stitchyyerror(ostringstream &strm) {
char *s = strm.str(); stitchyyerror(strm.str());
stitchyyerror(s);
delete[] s;
} }
void void
@ -110,10 +108,8 @@ stitchyywarning(const string &msg) {
} }
void void
stitchyywarning(ostrstream &strm) { stitchyywarning(ostringstream &strm) {
char *s = strm.str(); stitchyywarning(strm);
stitchyywarning(s);
delete[] s;
} }
// Now define a function to take input from an istream instead of a // Now define a function to take input from an istream instead of a
@ -216,10 +212,9 @@ eat_c_comment() {
c = read_char(line, col); c = read_char(line, col);
while (c != EOF && !(last_c == '*' && c == '/')) { while (c != EOF && !(last_c == '*' && c == '/')) {
if (last_c == '/' && c == '*') { if (last_c == '/' && c == '*') {
ostrstream errmsg; ostringstream errmsg;
errmsg << "This comment contains a nested /* symbol at line " errmsg << "This comment contains a nested /* symbol at line "
<< line << ", column " << col-1 << "--possibly unclosed?" << line << ", column " << col-1 << "--possibly unclosed?";
<< ends;
stitchyywarning(errmsg); stitchyywarning(errmsg);
} }
last_c = c; last_c = c;

View File

@ -13,10 +13,10 @@ int stitch_error_count();
int stitch_warning_count(); int stitch_warning_count();
void stitchyyerror(const string &msg); void stitchyyerror(const string &msg);
void stitchyyerror(ostrstream &strm); void stitchyyerror(ostringstream &strm);
void stitchyywarning(const string &msg); void stitchyywarning(const string &msg);
void stitchyywarning(ostrstream &strm); void stitchyywarning(ostringstream &strm);
int stitchyylex(); int stitchyylex();

View File

@ -1,4 +1,4 @@
#begin lib_target #begin ss_lib_target
#define TARGET stitchviewer #define TARGET stitchviewer
#define LOCAL_LIBS \ #define LOCAL_LIBS \
stitchbase stitchbase
@ -15,5 +15,5 @@
#define INSTALL_HEADERS \ #define INSTALL_HEADERS \
stitchImageConverter.h stitchImageVisualizer.h triangleMesh.h stitchImageConverter.h stitchImageVisualizer.h triangleMesh.h
#end lib_target #end ss_lib_target

View File

@ -7,7 +7,10 @@
#define TRIANGLEMESH_H #define TRIANGLEMESH_H
#include <luse.h> #include <luse.h>
#include <pointerToArray.h> #include <pta_Vertexf.h>
#include <pta_Normalf.h>
#include <pta_Colorf.h>
#include <pta_TexCoordf.h>
class GeomTristrip; class GeomTristrip;
@ -21,10 +24,10 @@ public:
GeomTristrip *build_mesh() const; GeomTristrip *build_mesh() const;
PTA(Vertexf) _coords; PTA_Vertexf _coords;
PTA(Normalf) _norms; PTA_Normalf _norms;
PTA(Colorf) _colors; PTA_Colorf _colors;
PTA(TexCoordf) _texcoords; PTA_TexCoordf _texcoords;
private: private:
int _x_verts, _y_verts; int _x_verts, _y_verts;

View File

@ -6,8 +6,8 @@
#define LOCAL_LIBS \ #define LOCAL_LIBS \
progbase pstatserver progbase pstatserver
#define OTHER_LIBS \ #define OTHER_LIBS \
pstatclient:c linmath:c putil:c express:c panda:m \ pstatclient:c linmath:c putil:c express:c panda:m pandaexpress:m \
dtoolutil:c dconfig:c dtool:m dtoolutil:c dconfig:c dtool:m pystub
#define UNIX_SYS_LIBS \ #define UNIX_SYS_LIBS \
m m