Commit Graph

4829 Commits

Author SHA1 Message Date
Florent Rougon
79f869a7f3 Move IOStreams-related files to simgear/io/iostreams; rename zfstream.[ch]xx to gzfstream.[ch]xx
- Rename zfstream.cxx (resp. zfstream.hxx) to gzfstream.cxx (resp.
  gzfstream.hxx)

  This is because these files only deal with the gzip format (RFC 1952),
  while zlib can actually read and write two slightly different formats:
  this one and the "ZLIB Compressed Data Format" (RFC 1950). Since I am
  going to add std::streambuf and std::istream subclasses able to deal
  with both formats (and supporting data sources that are general
  std::istream instances, not just files), this renaming will make
  things a bit clearer, I hope.

- Add new folder simgear/io/iostreams and move the following files to
  this folder:

    simgear/misc/gzcontainerfile.cxx
    simgear/misc/gzcontainerfile.hxx
    simgear/misc/gzfstream.cxx
    simgear/misc/gzfstream.hxx
    simgear/misc/sgstream.cxx
    simgear/misc/sgstream.hxx
    simgear/misc/sgstream_test.cxx

- Adapt other files accordingly (mainly #includes and CMakeLists.txt
  files).
2017-02-12 21:18:52 +01:00
Torsten Dreyer
1b8dfb2bef Accept time token for .dirindex files
print the timestamp on log-level "info"
2017-02-12 17:39:12 +01:00
Richard Harrison
143a47482b Change the log level of the "failed to load sound buffer" as it shouldn't be a popup because within my interpreation it is not within the definition of what POPUP should be used for. 2017-02-11 13:34:01 +01:00
James Turner
a28cf0f860 Additional SGPath test for remove + rename.
Trying to track down failure to update aircraft on Windows.
2017-02-09 18:48:05 +00:00
James Turner
d9f4d7373f SGFile uses wide-string APIs on Windows. 2017-02-07 16:15:14 +00:00
James Turner
c3f48c7261 Use sg_ofstream in one more place. 2017-02-07 16:05:06 +00:00
James Turner
48b7b70e23 BinObj code uses wide-strings on Windows. 2017-02-07 16:05:06 +00:00
James Turner
b93b362e2f Fix wide-string support for wav-file reader. 2017-02-07 16:05:06 +00:00
Bertrand Coconnier
2082b18e2e Export the symbol ENABLE_SIMD for FG to build with the same setting. 2017-02-07 00:02:39 +01:00
Erik Hofman
7f65e7f905 We need to copy the matrix before altering it's contents: Fix a SGMathTest failure 2017-02-03 15:07:35 +01:00
Erik Hofman
3417ca7e49 Add a linear-interpolation function 2017-02-02 11:35:11 +01:00
Richard Senior
6334c30eb6 Allow empty reason string in validation of HTTP response.
HTTP/1.0 and HTTP/1.1 allow the reason string to be empty.
Some servers produce empty reason strings on success,
e.g. "HTTP/1.1 200 ", which throws a "bad HTTP response"
exception.

From the specification:
    "Reason-Phrase  = *<TEXT, excluding CR, LF>"

From notational conventions:
    "*(element) allows any number, including zero"

References:
www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2
www.w3.org/Protocols/HTTP/1.0/spec.html
www.w3.org/Protocols/rfc2616/rfc2616-sec6.html
2017-02-01 10:23:10 +00:00
Erik Hofman
c87dff7e8f More code cleanups ans fix a Clang problem. And disable AVX for good, I don't have time for this crap anymore: it looks like a hardware or compielr bug 2017-01-31 00:04:01 +01:00
Erik Hofman
332f76f34d Last code cleanups and more explicit constructors 2017-01-30 18:25:42 +01:00
Erik Hofman
3387f3d084 Switch to c++11 alignas instead of our own hacks 2017-01-30 16:00:29 +01:00
Erik Hofman
bd421c381c Also make AVX available for simd4x4 2017-01-30 12:53:52 +01:00
Erik Hofman
0cce949837 Fix the last bug that prevented AVX from working properly. Hopefully this fixes all other SIMD related problems too 2017-01-30 12:25:51 +01:00
James Turner
ed3ba67925 Logging system buffers startup messages.
This allows adding log callbacks easier during startup, without 
missing the initial messages, which might be very important.
2017-01-30 07:43:35 +01:00
Erik Hofman
866f85064a Fix a mistake 2017-01-30 00:18:36 +01:00
Erik Hofman
9215c530b3 Explicit declaration of more constructors to make sure the laste lane of simd4_t<T,3> and the last two lanes of simd4_t<T,2> remain zero 2017-01-29 15:26:34 +01:00
James Turner
a6437f4e96 More SGPropertyNode::getPositions tests. 2017-01-28 15:37:41 +00:00
James Turner
5bd7be6ed1 Check for file permissions via SGPath. 2017-01-28 15:37:41 +00:00
Florent Rougon
d9cc3738b9 Improve sgstream_test.cxx
- Create "testfile" in a temporary directory (and make sure the temp dir
  and the file it contains are both removed when the test program exits).

- Use test macros such as SG_CHECK_EQUAL() instead of by-hand checks and
  "return EXIT_FAILURE" statements.

- Use sg_ofstream instead of plain std::ostream. This simplifies things
  a tiny bit, because one SGPath instance is enough to create both the
  sg_ofstream instance and the sg_gzifstream instance used afterwards to
  reread the created file.

- Don't call (sg_)ofstream::close() at the end of the block the instance
  is declared in: this is entirely unnecessary, since sg_ofstream
  derives from std::ofstream, which is automatically close()d when
  destroyed (RAII behavior).
2017-01-26 16:58:20 +01:00
Erik Hofman
edec5bbc01 There is still a segmenttion fault issue with the AVX code, disable it until this is sorted out 2017-01-26 14:46:36 +01:00
Florent Rougon
6a2d86c526 Small improvements for simgear::Dir
- Add method simgear::Dir::isNull(), analogous to SGPath::isNull().

- Make sure that simgear::Dir::tempDir() returns a null simgear::Dir
  instance when creation of the directory failed (so far, this was only
  the case on systems where HAVE_MKDTEMP is defined).

- Use simgear::strutils::error_string() instead of strerror() (the
  latter is not guaranteed to be thread-safe).

- Make sure <cerrno> is #included, regardless of the platform.

- Add automated tests for isNull(), setRemoveOnDestroy() and tempDir().
2017-01-26 12:41:59 +01:00
Stuart Buchanan
6c64e9b36c Add scenery-path-suffix support to terrasync
Remove /sim/rendering/building-mesh as it is
redundant.

Add check that objects are in the correct bounding
box of the containing STG file.
2017-01-21 22:19:38 +00:00
Erik Hofman
bcecee0f76 Small optimization to my own cross product implementation 2017-01-21 10:28:24 +01:00
Richard Harrison
c5cdfa1a1d Prevent null pointer deference when load has failed.
This was triggered by the TU154B; probably related to the console error

* "Image loading failed:Warning: reading "fgdata\AI\Aircraft\tu154b\Model" not supported.
2017-01-21 00:54:30 +01:00
Erik Hofman
f9f2b4cbdb Bring the ARM NEON code in line with the SSE code 2017-01-20 15:32:28 +01:00
Erik Hofman
33feb9a416 Move SIMD flags to CMAKE_CXX_FLAGS_RELEASE and fix a typo in the process 2017-01-20 14:56:15 +01:00
Erik Hofman
9e1aaa8b56 Make a distinction between a null-pointer and the value of 0 2017-01-19 23:14:39 +01:00
Erik Hofman
ef2eb635af Fix a header path 2017-01-19 16:41:01 +01:00
Erik Hofman
2db412a923 Specialize class constructors in the hope to ged rid of wrong compiler assignment of an unaligned float array to an SSE register 2017-01-19 16:39:30 +01:00
Erik Hofman
061fea48c8 Add an ARM NEON readu simd4x4_neon.hxx and small fixes for simd_neon.hxx 2017-01-19 13:20:52 +01:00
Erik Hofman
c4ea62a899 Add a version of simd.hxx for ARM NEON 2017-01-18 15:41:12 +01:00
Erik Hofman
789c09a402 I forgot the linux variant of ALIGN 2017-01-12 14:19:09 +01:00
Erik Hofman
de9b329115 reorganize the code a bit 2017-01-12 11:43:46 +01:00
Erik Hofman
1b793a127c Be more explicit about alignment 2017-01-12 10:18:39 +01:00
James Turner
3cb3084725 Rename ‘new’ thumbnails to ‘previews’
This avoids an XML naming clash, and allows both systems to exist in
parallel peacefully. Update the tests to check both the thumbnails
and preview system in parallel with each other.
2017-01-10 18:05:40 +00:00
Erik Hofman
637f67888a Reinstate AVX support again 2017-01-07 13:55:09 +01:00
Erik Hofman
fbc0986fd8 Do not rely on SSE3, this is just a slight drawback 2017-01-06 15:10:52 +01:00
Erik Hofman
14ebe0b618 Disable AVX support until someone figures out why it is not working properly 2017-01-06 00:11:05 +01:00
James Turner
fd34cc30b8 compare_versions: limit how many parts are checked.
This can be used to only check the first one or two parts of a version,
to ensure only the major, or major+minor parts match.
2017-01-05 10:55:14 +00:00
Erik Hofman
7b0faed03a Fix an AVX error 2017-01-04 16:30:19 +01:00
Erik Hofman
8d1dc30b07 Try to fix a possible AVX core dump 2017-01-04 12:55:28 +01:00
Erik Hofman
03cff6abca Fix Never use <avxintrin.h> directly; include <immintrin.h> instead. 2017-01-01 13:26:36 +01:00
Erik Hofman
d7821324b8 Fix a wrong enclosing bracket 2017-01-01 11:40:59 +01:00
Ron Haertel
f3e066cce0 Bug fix for bug 1920
In pt_lights.cxx in SGLightFactory::getOdal, at segment "centerline lights",
the decrement loop index i is initialized with lights.getNumLights(), then is used at lights.getLight. (ERROR)
The function getNumLights is set to the size of the vector which is one more than the max index refernce.

This restores the behavior that was in place before commit 8ddb99f62f
2016-12-30 18:49:19 -05:00
James Turner
45ac758cc9 Expose position on SGPropertyNode. 2016-12-27 11:09:07 +00:00
Erik Hofman
f0e6402fff One more, and hopefully the last, MSVC fix 2016-12-23 15:31:40 +01:00