-/* Copyright (C) 2009, Martin Johansson <martin@fatbob.nu>
- Copyright (C) 2005-2009, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2010, Martin Johansson <martin@fatbob.nu>
+ Copyright (C) 2005-2010, Thorvald Natvig <thorvald@natvig.com>
All rights reserved.
}
}
+uint8_t Pds_next8(pds_t *pds)
+{
+ if (pds->offset < pds->maxsize)
+ return pds->data[pds->offset++];
+ else {
+ pds->bOk = false;
+ return 0;
+ }
+}
+
+int Pds_skip(pds_t *pds, int offset)
+{
+ if (pds->offset + offset <= pds->maxsize) {
+ pds->offset += offset;
+ return offset;
+ } else {
+ pds->bOk = false;
+ return 0;
+ }
+
+}
+
static inline uint64_t next(pds_t *pds)
{
if (pds->offset < pds->maxsize)