*** 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],]
#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
// deferred variables defined in Globals.pp. This way they won't need
// to get repeatedly reevaluated as each directory examines each
@ -29,7 +29,7 @@ Warning: Lib(s) $[nonexisting], referenced in $[DIRNAME]/$[TARGET], not found.
#endif
#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
// Sources.pp.

View File

@ -35,13 +35,13 @@
// variable as set for the dconfig library (that is, the expression
// $[SOURCES] is evaluated within the named scope whose key is
// "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
// static or a dynamic library. If the library name appears in the
// static_libs map, it is a static library (i.e. libname.a);
// 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)
// This lets us identify which metalib, if any, is including each
@ -507,7 +507,7 @@
#end lib_target noinst_lib_target
// 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]
#define depend_metalib $[module $[TARGET],$[depend]]
#if $[ne $[depend_metalib],]
@ -518,7 +518,7 @@
#set depend_libs $[depend_libs] $[depend]
#endif
#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
// their components as well.

View File

@ -54,7 +54,7 @@
// list of binaries that are to be built only when specifically asked
// for.
#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 \
$[active_target(bin_target noinst_bin_target):%=$[st_dir]\%.exe] \
$[active_target(sed_bin_target):%=$[st_dir]\%]
@ -62,13 +62,13 @@
// And these variables will define the various things we need to
// 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_scripts $[sort $[INSTALL_SCRIPTS(metalib_target lib_target static_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_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 ss_lib_target bin_target)] $[INSTALL_HEADERS]]
#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_config $[sort $[INSTALL_CONFIG(metalib_target lib_target static_lib_target bin_target)] $[INSTALL_CONFIG]]
#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 ss_lib_target bin_target)] $[INSTALL_CONFIG]]
#define install_igatedb $[sort $[get_igatedb(metalib_target lib_target)]]
// $[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
// might in the future for some nutty reason.
#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
// 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
// have different requirements (e.g. different local_libs, or
// 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
// 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_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-%] \
$[installed_files]
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]
del /f $[sort $[installed_files]]
#endif
@ -297,9 +297,10 @@ $[osfilename $[directory]] :
#define sources \
$[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]]
lib_$[TARGET]_so = $[osfilename $[sources]]
#define varname $[subst -,_,lib$[TARGET]_so]
$[varname] = $[osfilename $[sources]]
#define target $[so_dir]\lib$[TARGET]$[dllext].dll
#define sources $(lib_$[TARGET]_so)
#define sources $($[varname])
$[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++]
@ -357,7 +358,7 @@ $[install_igatedb_dir]\$[igatedb] : $[so_dir]\$[igatedb]
copy $[so_dir]\$[local] $[dest]
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.
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
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 sources $(lib_$[TARGET]_so)
#define sources $($[varname])
$[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[SHARED_LIB_C++]
@ -425,10 +427,11 @@ $[target] : $[sources]
// a metalib, making the rules relatively simple.
/////////////////////////////////////////////////////////////////////
#forscopes static_lib_target
lib_$[TARGET]_a = $[osfilename $[unique $[patsubst %.cxx %.c %.yxx %.lxx,$[st_dir]\%.obj,%,,$[get_sources]]]]
#forscopes static_lib_target ss_lib_target
#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 sources $(lib_$[TARGET]_a)
#define sources $($[varname])
$[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[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]
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
$[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 sources $(bin_$[TARGET])
#define sources $($[varname])
#define ld $[get_ld]
$[target] : $[sources]
#if $[ld]
@ -548,9 +552,10 @@ $[install_bin_dir]\$[TARGET].exe : $[st_dir]\$[TARGET].exe
#forscopes noinst_bin_target test_bin_target
$[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 sources $(bin_$[TARGET])
#define sources $($[varname])
$[target] : $[sources]
#if $[filter %.cxx %.yxx %.lxx,$[get_sources]]
$[LINK_BIN_C++]

View File

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

View File

@ -22,10 +22,10 @@
#include "lmatrix.h"
#include "luse.h"
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(LMatrix3f &mat, const LVector3f &a, const LVector3f &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);
void rotate_to(LMatrix4d &mat, const LVector3d &a, const LVector3d &b);
EXPCL_PANDA void rotate_to(LMatrix4f &mat, const LVector3f &a, const LVector3f &b);
EXPCL_PANDA void rotate_to(LMatrix4d &mat, const LVector3d &a, const LVector3d &b);
#endif

View File

@ -13,6 +13,10 @@
#include <prerror.h>
#ifdef WIN32_VC
#include <winsock.h> // For gethostname()
#endif
////////////////////////////////////////////////////////////////////
// Function: ConnectionManager::Constructor
// Access: Public
@ -252,6 +256,23 @@ close_connection(const PT(Connection) &connection) {
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
// Access: Protected

View File

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

View File

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

View File

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

View File

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

View File

@ -12,8 +12,6 @@
#include <filename.h>
#include <fstream.h>
////////////////////////////////////////////////////////////////////
// Class : EggWriter
// 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];
if (access(_input_filename.c_str(), R_OK) != 0) {
if (!_input_filename.exists()) {
nout << "Cannot find input file " << _input_filename << "\n";
return false;
}

View File

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

View File

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

View File

@ -1,7 +1,7 @@
#define DIRECTORY_IF_GTKMM yes
#define USE_GTKMM yes
#begin lib_target
#begin ss_lib_target
#define TARGET gtkbase
#define LOCAL_LIBS \
progbase
@ -14,5 +14,5 @@
#define INSTALL_HEADERS \
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 LOCAL_LIBS \
progbase
@ -13,5 +13,5 @@
#define INSTALL_HEADERS \
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 <fstream.h>
////////////////////////////////////////////////////////////////////
// Class : ImageWriter
// Description : This is the base class for a program that generates

View File

@ -5,7 +5,8 @@
#define LOCAL_LIBS \
imagebase progbase
#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 \
m

View File

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

View File

@ -1,4 +1,4 @@
#begin lib_target
#begin ss_lib_target
#define TARGET pandatoolbase
#define SOURCES \
@ -7,4 +7,4 @@
#define INSTALL_HEADERS \
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 LOCAL_LIBS \
pandatoolbase
@ -14,7 +14,7 @@
programBase.I programBase.h wordWrapStream.h wordWrapStreamBuf.I \
wordWrapStreamBuf.h
#end lib_target
#end ss_lib_target
#begin test_bin_target
#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.
struct option gopt;
gopt.name = opt._option.c_str();
gopt.name = (char *)opt._option.c_str();
gopt.has_arg = (opt._parm_name.empty()) ?
no_argument : required_argument;
gopt.flag = (int *)NULL;

View File

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

View File

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

View File

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

View File

@ -12,6 +12,32 @@
#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
// Access: Public
@ -65,7 +91,7 @@ get_num_guide_bars() const {
const PStatGraph::GuideBar &PStatGraph::
get_guide_bar(int n) const {
#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);
#endif
return _guide_bars[n];
@ -171,9 +197,6 @@ make_guide_bar(double time) const {
}
}
GuideBar bar;
bar._height = time;
bar._label = label;
bar._is_target = (IS_NEARLY_EQUAL(1.0 / time, _target_frame_rate));
return bar;
return GuideBar(time, label,
IS_NEARLY_EQUAL(1.0 / time, _target_frame_rate));
}

View File

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

View File

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

View File

@ -2,6 +2,8 @@
#define TARGET stitch-command
#define LOCAL_LIBS \
stitchbase progbase
#define OTHER_LIBS \
linmath:c putil:c express:c panda:m pandaexpress:m pystub dtool
#define SOURCES \
stitchCommandProgram.cxx stitchCommandProgram.h
@ -14,6 +16,8 @@
#define TARGET stitch-image
#define LOCAL_LIBS \
stitchbase progbase
#define OTHER_LIBS \
linmath:c putil:c express:c panda:m pandaexpress:m pystub dtool
#define SOURCES \
stitchImageProgram.cxx stitchImageProgram.h
@ -27,8 +31,8 @@
#define OTHER_LIBS \
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 \
panda:m \
dtoolutil:c dconfig:c dtool:m
panda:m pandaexpress:m \
dtoolutil:c dconfig:c dtool:m pystub
#define SOURCES \
stitchViewerProgram.cxx stitchViewerProgram.h

View File

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

View File

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

View File

@ -6,9 +6,9 @@
#include "layeredImage.h"
#include <pnmImage.h>
#include <fstream.h>
#include <datagram.h>
#include <stdarg.h>
#include <netinet/in.h>
// Constants taken from various header files in Gimp.
#define TILE_WIDTH 64
@ -287,13 +287,13 @@ xcf_write_int8(const int8_t *data, int num) {
int LayeredImage::
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++) {
tmp[i] = htonl(data[i]);
dg.add_be_int32(data[i]);
}
_out->write((const char *)tmp, num * sizeof(int32_t));
delete[] tmp;
return _pos += num * sizeof(int32_t);
_out->write((const char *)dg.get_data(), dg.get_length());
return _pos += dg.get_length();
}
int LayeredImage::

View File

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

View File

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

View File

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

View File

@ -93,10 +93,8 @@ stitchyyerror(const string &msg) {
}
void
stitchyyerror(ostrstream &strm) {
char *s = strm.str();
stitchyyerror(s);
delete[] s;
stitchyyerror(ostringstream &strm) {
stitchyyerror(strm.str());
}
void
@ -110,10 +108,8 @@ stitchyywarning(const string &msg) {
}
void
stitchyywarning(ostrstream &strm) {
char *s = strm.str();
stitchyywarning(s);
delete[] s;
stitchyywarning(ostringstream &strm) {
stitchyywarning(strm);
}
// 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);
while (c != EOF && !(last_c == '*' && c == '/')) {
if (last_c == '/' && c == '*') {
ostrstream errmsg;
ostringstream errmsg;
errmsg << "This comment contains a nested /* symbol at line "
<< line << ", column " << col-1 << "--possibly unclosed?"
<< ends;
<< line << ", column " << col-1 << "--possibly unclosed?";
stitchyywarning(errmsg);
}
last_c = c;

View File

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

View File

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

View File

@ -7,7 +7,10 @@
#define TRIANGLEMESH_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;
@ -21,10 +24,10 @@ public:
GeomTristrip *build_mesh() const;
PTA(Vertexf) _coords;
PTA(Normalf) _norms;
PTA(Colorf) _colors;
PTA(TexCoordf) _texcoords;
PTA_Vertexf _coords;
PTA_Normalf _norms;
PTA_Colorf _colors;
PTA_TexCoordf _texcoords;
private:
int _x_verts, _y_verts;

View File

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