Commit Graph

6 Commits

Author SHA1 Message Date
Pekka Pessi d1d870ba7a Refactor subblock iterators.
Always initialize iterators.

Try to avoid pointer arithmetics on NULL; in other words, move all pointer
arithmetics inside g_isi_sb_iter_init().

There are 4 different ways for representing sub blocks in ISI message:
- 8-bit sub_blocks count, 8-bit sub_block_id/sub_block_len
- 16-bit sub_blocks count, 8-bit sub_block_id/sub_block_len
- 8-bit sub_blocks count, 16-bit sub_block_id/sub_block_len
- 16-bit sub_blocks count, 16-bit sub_block_id/sub_block_len

The compact form g_isi_sb_iter_init() supports 8-bit sub_block count before
start of the sub blocks themselves and 8-bit sub_block_id and sub_block_len.
The full form g_isi_sb_iter_init_full() with explicit longhdr and sub_block
count supports all other cases.
2009-10-09 12:54:04 +03:00
Pekka Pessi bc8031e2d7 gisi: use const and restrict in iter 2009-10-07 23:21:15 +03:00
Aki Niemi a34849599b Fix restrict keyword usage 2009-09-16 09:05:53 +03:00
Aki Niemi 3cec9ac67b Add support for long sub-block header 2009-09-14 23:43:17 +03:00
Aki Niemi a1ca8a9afa Add and modify string getters
Add a getter for latin ASCII only tags, and change the alpha tag
getter. Turns out not all alpha tags in ISI are of the length-value
variety.
2009-09-14 16:21:06 +03:00
Aki Niemi dec66954b6 gisi: Add ISI sub-block iterator 2009-09-14 14:34:00 +03:00