<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/smtk-import, branch v4.9.6</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v4.9.6</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v4.9.6'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2020-05-01T16:42:31Z</updated>
<entry>
<title>cleanup: move dive_table from dive.h to divelist.h</title>
<updated>2020-05-01T16:42:31Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-05-01T11:43:52Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=95284c026e763482ef581c8b6298012d2c1fd941'/>
<id>urn:sha1:95284c026e763482ef581c8b6298012d2c1fd941</id>
<content type='text'>
This allows us to decouple dive.h and divelist.h, a small step in
include disentangling.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>[smtk-import] Fix useless NULL check and white space issues</title>
<updated>2020-04-19T17:59:12Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2020-04-19T16:44:24Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=5a0f2fc2ccadd97e5394f2f7ac879a191e44771b'/>
<id>urn:sha1:5a0f2fc2ccadd97e5394f2f7ac879a191e44771b</id>
<content type='text'>
As commented by Berthold and Dirk for previous patches.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>[smtk-import] add some sanity checks</title>
<updated>2020-04-19T17:59:12Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2020-04-19T05:54:35Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e139b7b15fbffba6cf302ec49a67239663144a5b'/>
<id>urn:sha1:e139b7b15fbffba6cf302ec49a67239663144a5b</id>
<content type='text'>
Under some circustances values stored in this arrays may be NULL or even
previously freed.  Check them to avoid further crashes.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>[smtk-import] Do not create cylinders structure before libdc parsing</title>
<updated>2020-04-19T17:59:12Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2020-04-19T05:38:19Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=6c9a9b2fb5ff1d8e3aab9b041617349917ac5061'/>
<id>urn:sha1:6c9a9b2fb5ff1d8e3aab9b041617349917ac5061</id>
<content type='text'>
The d-&gt;cylinders created will be overriden by libdivecomputer parsing,
resulting in 0, 1 , may be 2 cylinders depending on DC data. This is not
what we want when importing a divelog, because we will miss all hand
entered tanks.
BTW, using get_cylinder() on tank number bigger than created, results in
a NULL pointer and a crash.
As we can't foresee how many tanks (or even it's positional numbers in
log) a diver has used, the full 10 tanks supported by SmarTrak can be
easily created and parsed using get_or_create_cylinder(), and unused
cleaned later.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>Grammar: replaces 'indexes' by 'indices'</title>
<updated>2020-03-11T15:26:30Z</updated>
<author>
<name>Robert C. Helling</name>
<email>helling@atdotde.de</email>
</author>
<published>2020-03-11T10:30:51Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=285fa8acbceebf5dc87c5c3befe42a2917a3b844'/>
<id>urn:sha1:285fa8acbceebf5dc87c5c3befe42a2917a3b844</id>
<content type='text'>
Grammar-nazi ran

git grep -l 'indexes' | xargs sed -i '' -e 's/indexes/indices/g'

to prevent future wincing when reading the source code.

Unfortunatly, Qt itself is infected as in
QModelIndexList QItemSelection::indexes() const

Signed-off-by: Robert C. Helling &lt;helling@atdotde.de&gt;
</content>
</entry>
<entry>
<title>Cylinders: access cylinders with get_cylinder()</title>
<updated>2019-11-09T18:19:04Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-04T20:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=794066b2367082851858d4e0da8b6e388d2acabb'/>
<id>urn:sha1:794066b2367082851858d4e0da8b6e388d2acabb</id>
<content type='text'>
Instead of accessing the cylinder table directly, use the get_cylinder()
function. This gives less unwieldy expressions. But more importantly,
the function does bound checking. This is crucial for now as the code
hasn't be properly audited since the change to arbitrarily sized
cylinder tables. Accesses of invalid cylinder indexes may lead to
silent data-corruption that is sometimes not even noticed by
valgrind. Returning NULL instead of an invalid pointer will make
debugging much easier.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Core: remove MAX_CYLINDERS restriction</title>
<updated>2019-11-09T18:19:04Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-04T16:44:57Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=7c9f46acd202121e67557bb634961ef17a9f6c1f'/>
<id>urn:sha1:7c9f46acd202121e67557bb634961ef17a9f6c1f</id>
<content type='text'>
Instead of using fixed size arrays, use a new cylinder_table structure.
The code copies the weightsystem code, but is significantly more complex
because cylinders are such an integral part of the core.

Two functions to access the cylinders were added:
get_cylinder() and get_or_create_cylinder()
The former does a simple array access and supposes that the cylinder
exists. The latter is used by the parser(s) and if a cylinder with
the given id does not exist, cylinders up to that id are generated.

One point will make C programmers cringe: the cylinder structure is
passed by value. This is due to the way the table-macros work. A
refactoring of the table macros is planned. It has to be noted that
the size of a cylinder_t is 64 bytes, i.e. 8 long words on a 64-bit
architecture, so passing on the stack is probably not even significantly
slower than passing as reference.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Cleanup: move error reporting function declarations to errorhelper.h</title>
<updated>2019-08-08T23:26:30Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2019-08-05T17:41:15Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=5da09a21bba0b3d8979d6b8e70baf52b0316242f'/>
<id>urn:sha1:5da09a21bba0b3d8979d6b8e70baf52b0316242f</id>
<content type='text'>
Move the declarations of the "report_error()" and "set_error_cb()"
functions and the "verbose" variable to errorhelper.h.
Thus, error-reporting translation units don't have to import the
big dive.h header file.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>[smtk-import] fix mem leaks on site/location failure management</title>
<updated>2019-08-02T06:58:35Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2019-08-01T22:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=99b51063812b409b031592ae771016d415755a3f'/>
<id>urn:sha1:99b51063812b409b031592ae771016d415755a3f</id>
<content type='text'>
Signed-off-by: Salvador Cuñat &lt;salvador,cunat@gmail.com&gt;
</content>
</entry>
<entry>
<title>[smtk-import] avoid infinite loop on index failure</title>
<updated>2019-08-02T06:58:35Z</updated>
<author>
<name>Salvador Cuñat</name>
<email>salvador.cunat@gmail.com</email>
</author>
<published>2019-08-01T21:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=ac1408af5fde896cf0ed331063f99434d835f054'/>
<id>urn:sha1:ac1408af5fde896cf0ed331063f99434d835f054</id>
<content type='text'>
As Berthold points out, a failure to match the site or location index
will result in an infinite loop with previous patch.
With this one the loop will end after reading the last table row even if
no idx is matched. But ... If we asume this situation is possible the
retrieved data would be wrong, and ending the function without filling
the site structure is mandatory too.

Signed-off-by: Salvador Cuñat &lt;salvador.cunat@gmail.com&gt;
</content>
</entry>
</feed>
