diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-09-22 10:52:09 +0200 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-09-22 10:52:09 +0200 |
commit | ab24c7ec507478f9993718f773edebaad101a315 (patch) | |
tree | e08208c5233325eab7f9027346caca934f61b8a4 /spuregion.c | |
parent | 2c7e9b338de9ac735e0342ea73208385a2659c75 (diff) | |
download | vdr-plugin-dxr3-ab24c7ec507478f9993718f773edebaad101a315.tar.gz vdr-plugin-dxr3-ab24c7ec507478f9993718f773edebaad101a315.tar.bz2 |
add method to add a new section to a region
Diffstat (limited to 'spuregion.c')
-rw-r--r-- | spuregion.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spuregion.c b/spuregion.c index da36a64..6ad9cca 100644 --- a/spuregion.c +++ b/spuregion.c @@ -39,6 +39,16 @@ uint8_t cSpuRegion::openSections() return usedSections + 1; } +bool cSpuRegion::newSection() +{ + if (usedSections + 1 == MAX_SECTIONS) { + return false; + } + + usedSections++; + return true; +} + sSection *cSpuRegion::section(uint8_t num) { if (usedSections == MAX_SECTIONS) { |