Skip to content

Commit

Permalink
sync_externals
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Smith committed Oct 9, 2023
1 parent 06f7264 commit 1c7e9c4
Show file tree
Hide file tree
Showing 44 changed files with 148 additions and 115 deletions.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ CMakeLists.txt text eol=lf

# Text file formats
*.txt text eol=lf
*.text text eol=lf
*.md text eol=lf
*.tex text eol=lf
*.?ml text eol=lf
*.kmz binary
*.log text eol=lf

# Programming languages
*.htm? text eol=lf
Expand Down Expand Up @@ -54,12 +56,21 @@ CMakeLists.txt text eol=lf
######################
# Known binary files

# executables, libraries; yes, sometimes they're part of a repository
*.exe binary
*.out binary
lib*.so* binary
*.dll binary
lib*.a* binary
*.lib binary

# from various unit_test/ directories
*.dat binary
*.*hdr binary
*.flat binary
*.sig binary
*.bin binary
*.dump binary

# images
*.bmp binary
Expand Down
11 changes: 11 additions & 0 deletions externals/coda-oss/.gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ CMakeLists.txt text eol=lf

# Text file formats
*.txt text eol=lf
*.text text eol=lf
*.md text eol=lf
*.tex text eol=lf
*.?ml text eol=lf
*.kmz binary
*.log text eol=lf

# Programming languages
*.htm? text eol=lf
Expand Down Expand Up @@ -54,12 +56,21 @@ CMakeLists.txt text eol=lf
######################
# Known binary files

# executables, libraries; yes, sometimes they're part of a repository
*.exe binary
*.out binary
lib*.so* binary
*.dll binary
lib*.a* binary
*.lib binary

# from various unit_test/ directories
*.dat binary
*.*hdr binary
*.flat binary
*.sig binary
*.bin binary
*.dump binary

# images
*.bmp binary
Expand Down
6 changes: 3 additions & 3 deletions externals/coda-oss/build/scripts/makeEnums.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def cmpValues(x, y):
s.write(' %sif (s == "%s")\n value = %s%s;\n' % (i > 0 and 'else ' or '',
n, values.cleanPrefix, item.names[0].replace(' ', '_')))
i += 1
s.write(' else\n throw except::InvalidFormatException(Ctxt(FmtX("Invalid enum value: %s", s.c_str())));\n')
s.write(' else\n throw except::InvalidFormatException(Ctxt(str::Format("Invalid enum value: %s", s.c_str())));\n')
s.write(' }\n\n')

s.write(' //! int constructor\n')
Expand All @@ -123,7 +123,7 @@ def cmpValues(x, y):
try:
idx += 1
except:{}
s.write(' default:\n throw except::InvalidFormatException(Ctxt(FmtX("Invalid enum value: %d", i)));\n')
s.write(' default:\n throw except::InvalidFormatException(Ctxt(str::Format("Invalid enum value: %d", i)));\n')
s.write(' }\n }\n\n')

s.write(' //! destructor\n')
Expand All @@ -142,7 +142,7 @@ def cmpValues(x, y):
try:
idx += 1
except:{}
s.write(' default:\n throw except::InvalidFormatException(Ctxt(FmtX("Invalid enum value: %d", value)));\n')
s.write(' default:\n throw except::InvalidFormatException(Ctxt(str::Format("Invalid enum value: %d", value)));\n')
s.write(' }\n }\n\n')

s.write(' //! assignment operator\n')
Expand Down
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/dbi/tests/SQLTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main(int argc, char* argv[])
{
try
{
if (argc < 4) throw except::Exception(Ctxt(FmtX("Usage %s <database> <user> <password> [host] [port]", argv[0])));
if (argc < 4) throw except::Exception(Ctxt(str::Format("Usage %s <database> <user> <password> [host] [port]", argv[0])));

std::string database(argv[1]);
std::string user(argv[2]);
Expand Down
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/dbi/tests/SQLTest2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int main(int argc, char* argv[])
{
try
{
if (argc != 6) throw except::Exception(Ctxt(FmtX("Usage %s <database> <user> <password> <host> <port>", argv[0])));
if (argc != 6) throw except::Exception(Ctxt(str::Format("Usage %s <database> <user> <password> <host> <port>", argv[0])));

std::string database(argv[1]);
std::string host(argv[4]);
Expand Down
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/io/tests/ioTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int main(int argc, char **argv)
{
if (argc != 3)
{
throw Exception(Ctxt(FmtX("Usage: %s <input file> <output file>",
throw Exception(Ctxt(str::Format("Usage: %s <input file> <output file>",
argv[0])));
}

Expand Down
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/io/tests/ioTest3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main(int argc, char **argv)
try
{
if (argc != 3)
throw Exception(Ctxt(FmtX("Usage: %s <input> <output>", argv[0])));
throw Exception(Ctxt(str::Format("Usage: %s <input> <output>", argv[0])));

Copy::run(argv[1], argv[2]);
}
Expand Down
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/io/tests/ioTest4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ int main(int argc, char **argv)
if (argc != 3)
throw except::Error(
Ctxt(
FmtX(
str::Format(
"Usage: %s <input file> <output file>",
argv[0])));

Expand Down
12 changes: 6 additions & 6 deletions externals/coda-oss/modules/c++/io/tests/serializeTest1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class A : public Serializable
virtual void serialize(OutputStream& os) override
{
os.writeln("Class A");
os.writeln(FmtX("%f", vec[0]));
os.writeln(FmtX("%f", vec[1]));
os.writeln(FmtX("%f", vec[2]));
os.writeln(str::Format("%f", vec[0]));
os.writeln(str::Format("%f", vec[1]));
os.writeln(str::Format("%f", vec[2]));

}
virtual void deserialize(InputStream& is) override
Expand All @@ -60,9 +60,9 @@ class A : public Serializable
string vec_2 = fillString(is);

assert(classType == "Class A");
dbg.writeln(FmtX("vec[0] = %s", vec_0.c_str()));
dbg.writeln(FmtX("vec[1] = %s", vec_1.c_str()));
dbg.writeln(FmtX("vec[2] = %s", vec_2.c_str()));
dbg.writeln(str::Format("vec[0] = %s", vec_0.c_str()));
dbg.writeln(str::Format("vec[1] = %s", vec_1.c_str()));
dbg.writeln(str::Format("vec[2] = %s", vec_2.c_str()));

vec[0] = str::toType<float>(vec_0);
vec[1] = str::toType<float>(vec_1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Thespian : public Runnable
}
void run() override
{
//__debugln__(FmtX("[%s]:", mName.c_str()));
//__debugln__(str::Format("[%s]:", mName.c_str()));
doLines();
}
virtual void doLines() = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main(int argc, char **argv)
try
{
if (argc != 2)
throw Exception(FmtX("Usage: %s <url>", argv[0]));
throw Exception(str::Format("Usage: %s <url>", argv[0]));

URL url(argv[1]);
//int sslOn = atoi(argv[2]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int main(int argc, char** argv)
try
{
if (argc != 3)
throw Exception(FmtX("Usage: %s <host> <port>", argv[0]));
throw Exception(str::Format("Usage: %s <host> <port>", argv[0]));

std::string host(argv[1]);
int port(atoi(argv[2]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main(int argc, char **argv)
try
{
if (argc != 3)
throw Exception(FmtX("Usage: %s <host> <port>", argv[0]));
throw Exception(str::Format("Usage: %s <host> <port>", argv[0]));

std::string host(argv[1]);
int port(atoi(argv[2]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int main(int argc, char **argv)
try
{
if (argc < 2)
throw Exception(FmtX("Usage: %s <port> (-mt|-st|-tp)", argv[0]));
throw Exception(str::Format("Usage: %s <port> (-mt|-st|-tp)", argv[0]));

net::AllocStrategy* strategy = nullptr;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main(int argc, char **argv)
try
{
if (argc != 2)
throw Exception(FmtX("Usage: %s <url>", argv[0]));
throw Exception(str::Format("Usage: %s <url>", argv[0]));

URL url(argv[1]);

Expand Down
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/net/tests/URLTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main(int argc, char **argv)
try
{
if (argc != 2)
throw Exception(FmtX("Usage: %s <url>", argv[0]));
throw Exception(str::Format("Usage: %s <url>", argv[0]));

URL url(argv[1]);

Expand Down
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/str/tests/VersionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

int main()
{
std::cout << FmtX("Your version of str is %d.%d.%d\n",
std::cout << str::Format("Your version of str is %d.%d.%d\n",
STR_MAJOR_VERSION, STR_MINOR_VERSION, STR_MICRO_VERSION);
std::cout << "Specialization for string test...\n";
std::string ok("This test passes");
Expand Down
2 changes: 1 addition & 1 deletion externals/coda-oss/modules/c++/sys/tests/OSTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int main(int argc, char **argv)
std::string tempFileName = os.getTempName();
std::ofstream ofs(tempFileName.c_str());
if (!ofs.is_open())
throw except::Exception(FmtX("Could not open file named: %s",
throw except::Exception(str::Format("Could not open file named: %s",
tempFileName.c_str()));
ofs << "Im writing some crap to this file!" << std::endl;
ofs.close();
Expand Down
4 changes: 2 additions & 2 deletions externals/coda-oss/modules/c++/tiff/tests/DumpHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int main(int argc, char **argv)
try
{
if (argc < 2)
throw except::Exception(FmtX("usage: %s <tiff file>", argv[0]));
throw except::Exception(str::Format("usage: %s <tiff file>", argv[0]));

sys::OS os;
std::string path = sys::Path::absolutePath(argv[1]);
Expand All @@ -47,7 +47,7 @@ int main(int argc, char **argv)
if (tiff::Utils::hasGeoTiffIFD(reader[i]->getIFD()))
{
outStream.writeln("===========================");
outStream.writeln(FmtX("GeoTIFF detected: Image %d\n", (i + 1)));
outStream.writeln(str::Format("GeoTIFF detected: Image %d\n", (i + 1)));
tiff::IFD *geoIFD =
tiff::Utils::createGeoTiffIFD(reader[i]->getIFD());
geoIFD->print(outStream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main(int argc, char **argv)

// Check to make sure we have right length
if (argc != 2)
throw Exception(Ctxt(FmtX("Usage: %s <xml file>\n", argv[0])));
throw Exception(Ctxt(str::Format("Usage: %s <xml file>\n", argv[0])));

// Create an input stream
FileInputStream xmlFile(argv[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int main(int argc, char **argv)

// Check to make sure we have right length
if (argc != 2)
throw Exception(Ctxt(FmtX("Usage: %s <xml file>\n", argv[0])));
throw Exception(Ctxt(str::Format("Usage: %s <xml file>\n", argv[0])));

// Create an input stream
FileInputStream xmlFile(argv[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(int argc, char **argv)
{
if (argc != 5)
{
throw Exception(Ctxt(FmtX(
throw Exception(Ctxt(str::Format(
"Usage: %s [OPTION] <service> <uri> <file>\n\n\t-a\tadd service\n\t-s\tsubtract service\n\t-o\toutput file\n",
argv[0])));
}
Expand Down Expand Up @@ -123,7 +123,7 @@ int main(int argc, char **argv)
if (rootElement) rootElement->print(out);
break;
default:
throw Exception(Ctxt(FmtX(
throw Exception(Ctxt(str::Format(
"Usage: %s [OPTION] <service> <uri> <file>\n\n\t-a\tadd service\n\t-s\tsubtract service\n\t-o\toutput file\n",
argv[0])));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ int main(int argc, char **argv)
{
// Check to make sure we have right length
if (argc != 2)
throw Exception(Ctxt(FmtX("Usage: %s <xml file>\n", argv[0])));
throw Exception(Ctxt(str::Format("Usage: %s <xml file>\n", argv[0])));

// Create an input stream
FileInputStream
Expand Down
11 changes: 11 additions & 0 deletions externals/nitro/.gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ CMakeLists.txt text eol=lf

# Text file formats
*.txt text eol=lf
*.text text eol=lf
*.md text eol=lf
*.tex text eol=lf
*.?ml text eol=lf
*.kmz binary
*.log text eol=lf

# Programming languages
*.htm? text eol=lf
Expand Down Expand Up @@ -54,12 +56,21 @@ CMakeLists.txt text eol=lf
######################
# Known binary files

# executables, libraries; yes, sometimes they're part of a repository
*.exe binary
*.out binary
lib*.so* binary
*.dll binary
lib*.a* binary
*.lib binary

# from various unit_test/ directories
*.dat binary
*.*hdr binary
*.flat binary
*.sig binary
*.bin binary
*.dump binary

# images
*.bmp binary
Expand Down
8 changes: 4 additions & 4 deletions six/modules/c++/cphd03/tests/cphd_extract_xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ int main(int argc, char** argv)

return 0;
}
catch (const std::exception& ex)
catch (const except::Exception& ex)
{
std::cerr << ex.what() << std::endl;
std::cerr << ex.toString() << std::endl;
return 1;
}
catch (const except::Exception& ex)
catch (const std::exception& ex)
{
std::cerr << ex.toString() << std::endl;
std::cerr << ex.what() << std::endl;
return 1;
}
catch (...)
Expand Down
8 changes: 4 additions & 4 deletions six/modules/c++/cphd03/tests/print_cphd_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ int main(int argc, char** argv)

return 0;
}
catch (const std::exception& ex)
catch (const except::Exception& ex)
{
std::cerr << ex.what() << std::endl;
std::cerr << ex.toString() << std::endl;
return 1;
}
catch (const except::Exception& ex)
catch (const std::exception& ex)
{
std::cerr << ex.toString() << std::endl;
std::cerr << ex.what() << std::endl;
return 1;
}
catch (...)
Expand Down
Loading

0 comments on commit 1c7e9c4

Please sign in to comment.