replaced all the __u8, __u16, __u32 etc types with stdint verstions.
authorCaptnoord <captnoord@gmail.com>
Sat, 16 Aug 2014 13:44:54 +0000 (15:44 +0200)
committerErik Slagter <erik@openpli.org>
Sat, 23 Aug 2014 17:25:28 +0000 (19:25 +0200)
33 files changed:
lib/base/buffer.cpp
lib/base/buffer.h
lib/base/freesatv2.cpp
lib/driver/rc.cpp
lib/dvb/demux.cpp
lib/dvb/demux.h
lib/dvb/dvbtime.cpp
lib/dvb/epgcache.cpp
lib/dvb/epgcache.h
lib/dvb/esection.cpp
lib/dvb/esection.h
lib/dvb/fastscan.h
lib/dvb/idemux.h
lib/dvb/idvb.h
lib/dvb/isection.h
lib/dvb/pesparse.cpp
lib/dvb/pesparse.h
lib/dvb/radiotext.cpp
lib/dvb/radiotext.h
lib/dvb/sec.h
lib/dvb/subtitle.cpp
lib/dvb/subtitle.h
lib/dvb/teletext.cpp
lib/dvb/teletext.h
lib/dvb/tstools.cpp
lib/dvb/tstools.h
lib/dvb_ci/dvbci.cpp
lib/dvb_ci/dvbci.h
lib/gdi/fb.cpp
lib/gdi/fb.h
lib/gdi/gpixmap.cpp
lib/gdi/lcd.h
lib/service/event.cpp

index 38670e4..ba37b59 100644 (file)
@@ -17,7 +17,7 @@ void eIOBuffer::removeblock()
 eIOBuffer::eIOBufferData &eIOBuffer::addblock()
 {
        eIOBufferData s;
-       s.data=new __u8[allocationsize];
+       s.data=new uint8_t[allocationsize];
        s.len=0;
        buffer.push_back(s);
        return buffer.back();
@@ -50,7 +50,7 @@ int eIOBuffer::empty() const
 
 int eIOBuffer::peek(void *dest, int len) const
 {
-       __u8 *dst=(__u8*)dest;
+       uint8_t *dst=(uint8_t*)dest;
        std::list<eIOBufferData>::const_iterator i(buffer.begin());
        int p=ptr;
        int written=0;
@@ -92,7 +92,7 @@ void eIOBuffer::skip(int len)
 
 int eIOBuffer::read(void *dest, int len)
 {
-       __u8 *dst=(__u8*)dest;
+       uint8_t *dst=(uint8_t*)dest;
        len=peek(dst, len);
        skip(len);
        return len;
@@ -100,7 +100,7 @@ int eIOBuffer::read(void *dest, int len)
 
 void eIOBuffer::write(const void *source, int len)
 {
-       const __u8 *src=(const __u8*)source;
+       const uint8_t *src=(const uint8_t*)source;
        while (len)
        {
                int tc=len;
@@ -147,7 +147,6 @@ int eIOBuffer::fromfile(int fd, int len)
 int eIOBuffer::tofile(int fd, int len)
 {
        int written=0;
-       int w;
        while (len && !buffer.empty())
        {
                if (buffer.begin() == buffer.end())
@@ -156,7 +155,7 @@ int eIOBuffer::tofile(int fd, int len)
                if (tc > len)
                        tc = len;
 
-               w=::write(fd, buffer.front().data+ptr, tc);
+               int w=::write(fd, buffer.front().data+ptr, tc);
                if (w < 0)
                {
                        if (errno != EWOULDBLOCK && errno != EBUSY && errno != EINTR)
index 9108ba8..79f303d 100644 (file)
@@ -12,7 +12,7 @@ class eIOBuffer
        int allocationsize;
        struct eIOBufferData
        {
-               __u8 *data;
+               uint8_t *data;
                int len;
        };
        std::list<eIOBufferData> buffer;
index b66f85e..9aa9d87 100644 (file)
@@ -38,9 +38,10 @@ GNU General Public License for more details.
 static void loadFile(huffTableEntry **table, const char *filename);
 
 
-struct huffTableEntry {
-       __u32 value;
-       __u16 bits;
+struct huffTableEntry
+{
+       uint32_t value;
+       uint16_t bits;
        char next;
        huffTableEntry * nextEntry;
 
index ad2ade4..5b742c3 100644 (file)
@@ -58,7 +58,7 @@ eRCDriver::~eRCDriver()
 
 void eRCShortDriver::keyPressed(int)
 {
-       __u16 rccode;
+       uint16_t rccode;
        while (1)
        {
                if (read(handle, &rccode, 2)!=2)
index 063e0d4..9b1129f 100644 (file)
@@ -169,7 +169,7 @@ RESULT eDVBDemux::connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &
 
 void eDVBSectionReader::data(int)
 {
-       __u8 data[4096]; // max. section size
+       uint8_t data[4096]; // max. section size
        int r;
        r = ::read(fd, data, 4096);
        if(r < 0)
@@ -270,7 +270,7 @@ RESULT eDVBSectionReader::stop()
        return 0;
 }
 
-RESULT eDVBSectionReader::connectRead(const Slot1<void,const __u8*> &r, ePtr<eConnection> &conn)
+RESULT eDVBSectionReader::connectRead(const Slot1<void,const uint8_t*> &r, ePtr<eConnection> &conn)
 {
        conn = new eConnection(this, read.connect(r));
        return 0;
@@ -280,7 +280,7 @@ void eDVBPESReader::data(int)
 {
        while (1)
        {
-               __u8 buffer[16384];
+               uint8_t buffer[16384];
                int r;
                r = ::read(m_fd, buffer, 16384);
                if (!r)
@@ -372,7 +372,7 @@ RESULT eDVBPESReader::stop()
        return 0;
 }
 
-RESULT eDVBPESReader::connectRead(const Slot2<void,const __u8*,int> &r, ePtr<eConnection> &conn)
+RESULT eDVBPESReader::connectRead(const Slot2<void,const uint8_t*,int> &r, ePtr<eConnection> &conn)
 {
        conn = new eConnection(this, m_read.connect(r));
        return 0;
@@ -862,7 +862,7 @@ RESULT eDVBTSRecorder::connectEvent(const Slot1<void,int> &event, ePtr<eConnecti
 RESULT eDVBTSRecorder::startPID(int pid)
 {
        while(true) {
-               __u16 p = pid;
+               uint16_t p = pid;
                if (::ioctl(m_source_fd, DMX_ADD_PID, &p) < 0) {
                        perror("DMX_ADD_PID");
                        if (errno == EAGAIN || errno == EINTR) {
@@ -881,7 +881,7 @@ void eDVBTSRecorder::stopPID(int pid)
        if (m_pids[pid] != -1)
        {
                while(true) {
-                       __u16 p = pid;
+                       uint16_t p = pid;
                        if (::ioctl(m_source_fd, DMX_REMOVE_PID, &p) < 0) {
                                perror("DMX_REMOVE_PID");
                                if (errno == EAGAIN || errno == EINTR) {
index 60ab0a1..64d6c83 100644 (file)
@@ -55,7 +55,7 @@ class eDVBSectionReader: public iDVBSectionReader, public Object
 {
        DECLARE_REF(eDVBSectionReader);
        int fd;
-       Signal1<void, const __u8*> read;
+       Signal1<void, const uint8_t*> read;
        ePtr<eDVBDemux> demux;
        int active;
        int checkcrc;
@@ -67,14 +67,14 @@ public:
        RESULT setBufferSize(int size);
        RESULT start(const eDVBSectionFilterMask &mask);
        RESULT stop();
-       RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn);
+       RESULT connectRead(const Slot1<void,const uint8_t*> &read, ePtr<eConnection> &conn);
 };
 
 class eDVBPESReader: public iDVBPESReader, public Object
 {
        DECLARE_REF(eDVBPESReader);
        int m_fd;
-       Signal2<void, const __u8*, int> m_read;
+       Signal2<void, const uint8_t*, int> m_read;
        ePtr<eDVBDemux> m_demux;
        int m_active;
        void data(int);
@@ -85,7 +85,7 @@ public:
        RESULT setBufferSize(int size);
        RESULT start(int pid);
        RESULT stop();
-       RESULT connectRead(const Slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn);
+       RESULT connectRead(const Slot2<void,const uint8_t*, int> &read, ePtr<eConnection> &conn);
 };
 
 class eDVBRecordFileThread: public eFilePushThreadRecorder
index f6651a7..ac4da7a 100644 (file)
@@ -67,7 +67,7 @@ time_t getRTC()
        return rtc_time != prev_time ? rtc_time : 0;
 }
 
-time_t parseDVBtime(__u8 t1, __u8 t2, __u8 t3, __u8 t4, __u8 t5, __u16 *hash)
+time_t parseDVBtime(uint8_t t1, uint8_t t2, uint8_t t3, uint8_t t4, uint8_t t5, uint16_t *hash)
 {
        tm t;
        t.tm_sec=fromBCD(t5);
@@ -109,7 +109,7 @@ void TDT::ready(int error)
        eDVBLocalTimeHandler::getInstance()->updateTime(error, chan, ++update_count);
 }
 
-int TDT::createTable(unsigned int nr, const __u8 *data, unsigned int max)
+int TDT::createTable(unsigned int nr, const uint8_t *data, unsigned int max)
 {
        if ( data && (data[0] == 0x70 || data[0] == 0x73 ))
        {
index 236efcc..5e589e8 100644 (file)
@@ -25,7 +25,7 @@
 int eventData::CacheSize=0;
 bool eventData::isCacheCorrupt = 0;
 descriptorMap eventData::descriptors;
-__u8 eventData::data[2 * 4096 + 12];
+uint8_t eventData::data[2 * 4096 + 12];
 extern const uint32_t crc32_table[256];
 
 const eServiceReference &handleGroup(const eServiceReference &ref)
@@ -57,16 +57,16 @@ eventData::eventData(const eit_event_struct* e, int size, int type, int tsidonid
        if (!e)
                return;
 
-       __u32 descr[65];
-       __u32 *pdescr=descr;
+       uint32_t descr[65];
+       uint32_t *pdescr=descr;
 
-       __u8 *data = (__u8*)e;
+       uint8_t *data = (uint8_t*)e;
        int ptr=12;
        size -= 12;
 
        while(size > 1)
        {
-               __u8 *descr = data+ptr;
+               uint8_t *descr = data+ptr;
                int descr_len = descr[1];
                descr_len += 2;
                if (size >= descr_len)
@@ -79,7 +79,7 @@ eventData::eventData(const eit_event_struct* e, int size, int type, int tsidonid
                                case CONTENT_DESCRIPTOR:
                                case PARENTAL_RATING_DESCRIPTOR:
                                {
-                                       __u32 crc = 0;
+                                       uint32_t crc = 0;
                                        int cnt=0;
                                        while(cnt++ < descr_len)
                                                crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ data[ptr++]) & 0xFF];
@@ -88,7 +88,7 @@ eventData::eventData(const eit_event_struct* e, int size, int type, int tsidonid
                                        if ( it == descriptors.end() )
                                        {
                                                CacheSize+=descr_len;
-                                               __u8 *d = new __u8[descr_len];
+                                               uint8_t *d = new uint8_t[descr_len];
                                                memcpy(d, descr, descr_len);
                                                descriptors[crc] = descriptorPair(1, d);
                                        }
@@ -125,7 +125,7 @@ eventData::eventData(const eit_event_struct* e, int size, int type, int tsidonid
                                                */
                                                eventNameUTF8len = truncateUTF8(eventNameUTF8, 255 - 6);
                                                int title_len = 6 + eventNameUTF8len;
-                                               __u8 *title_data = new __u8[title_len + 2];
+                                               uint8_t *title_data = new uint8_t[title_len + 2];
                                                title_data[0] = SHORT_EVENT_DESCRIPTOR;
                                                title_data[1] = title_len;
                                                title_data[2] = descr[2];
@@ -137,7 +137,7 @@ eventData::eventData(const eit_event_struct* e, int size, int type, int tsidonid
                                                title_data[7 + eventNameUTF8len] = 0;
 
                                                //Calculate the CRC, based on our new data
-                                               __u32 title_crc = 0;
+                                               uint32_t title_crc = 0;
                                                int cnt=0;
                                                int tmpPtr = 0;
                                                title_len += 2; //add 2 the length to include the 2 bytes in the header
@@ -163,7 +163,7 @@ eventData::eventData(const eit_event_struct* e, int size, int type, int tsidonid
                                        {
                                                textUTF8len = truncateUTF8(textUTF8, 255 - 6);
                                                int text_len = 6 + textUTF8len;
-                                               __u8 *text_data = new __u8[text_len + 2];
+                                               uint8_t *text_data = new uint8_t[text_len + 2];
                                                text_data[0] = SHORT_EVENT_DESCRIPTOR;
                                                text_data[1] = text_len;
                                                text_data[2] = descr[2];
@@ -174,7 +174,7 @@ eventData::eventData(const eit_event_struct* e, int size, int type, int tsidonid
                                                text_data[7] = 0x15; //identify text as UTF-8
                                                memcpy(&text_data[8], textUTF8.data(), textUTF8len);
 
-                                               __u32 text_crc = 0;
+                                               uint32_t text_crc = 0;
                                                int cnt=0;
                                                int tmpPtr = 0;
                                                text_len += 2; //add 2 the length to include the 2 bytes in the header
@@ -209,9 +209,9 @@ eventData::eventData(const eit_event_struct* e, int size, int type, int tsidonid
        }
        ASSERT(pdescr <= &descr[65]);
        ByteSize = 10+((pdescr-descr)*4);
-       EITdata = new __u8[ByteSize];
+       EITdata = new uint8_t[ByteSize];
        CacheSize+=ByteSize;
-       memcpy(EITdata, (__u8*) e, 10);
+       memcpy(EITdata, (uint8_t*) e, 10);
        memcpy(EITdata+10, descr, ByteSize-10);
 }
 
@@ -221,7 +221,7 @@ const eit_event_struct* eventData::get() const
        int tmp = ByteSize - 10;
        memcpy(data, EITdata, 10);
        unsigned int descriptors_length = 0;
-       __u32 *p = (__u32*)(EITdata + 10);
+       uint32_t *p = (uint32_t*)(EITdata + 10);
        while (tmp > 3)
        {
                descriptorMap::iterator it = descriptors.find(*p++);
@@ -249,7 +249,7 @@ eventData::~eventData()
        if ( ByteSize )
        {
                CacheSize -= ByteSize;
-               __u32 *d = (__u32*)(EITdata+10);
+               uint32_t *d = (uint32_t*)(EITdata+10);
                ByteSize -= 10;
                while(ByteSize>3)
                {
@@ -279,16 +279,16 @@ void eventData::load(FILE *f)
 {
        int size=0;
        int id=0;
-       __u8 header[2];
+       uint8_t header[2];
        descriptorPair p;
        fread(&size, sizeof(int), 1, f);
        while(size)
        {
-               fread(&id, sizeof(__u32), 1, f);
+               fread(&id, sizeof(uint32_t), 1, f);
                fread(&p.first, sizeof(int), 1, f);
                fread(header, 2, 1, f);
                int bytes = header[1]+2;
-               p.second = new __u8[bytes];
+               p.second = new uint8_t[bytes];
                p.second[0] = header[0];
                p.second[1] = header[1];
                fread(p.second+2, bytes-2, 1, f);
@@ -307,7 +307,7 @@ void eventData::save(FILE *f)
        fwrite(&size, sizeof(int), 1, f);
        while(size)
        {
-               fwrite(&it->first, sizeof(__u32), 1, f);
+               fwrite(&it->first, sizeof(uint32_t), 1, f);
                fwrite(&it->second.first, sizeof(int), 1, f);
                fwrite(it->second.second, it->second.second[1]+2, 1, f);
                ++it;
@@ -608,7 +608,7 @@ bool eEPGCache::FixOverlapping(std::pair<eventMap,timeMap> &servicemap, time_t T
 #endif
                        )
                {
-                       __u16 event_id = tmp->second->getEventID();
+                       uint16_t event_id = tmp->second->getEventID();
                        servicemap.first.erase(event_id);
 #ifdef EPG_DEBUG
                        Event evt((uint8_t*)tmp->second->get());
@@ -643,7 +643,7 @@ bool eEPGCache::FixOverlapping(std::pair<eventMap,timeMap> &servicemap, time_t T
        {
                if (tmp->first != TM && tmp->second->type != PRIVATE)
                {
-                       __u16 event_id = tmp->second->getEventID();
+                       uint16_t event_id = tmp->second->getEventID();
                        servicemap.first.erase(event_id);
 #ifdef EPG_DEBUG
                        Event evt((uint8_t*)tmp->second->get());
@@ -667,7 +667,7 @@ bool eEPGCache::FixOverlapping(std::pair<eventMap,timeMap> &servicemap, time_t T
        return ret;
 }
 
-void eEPGCache::sectionRead(const __u8 *data, int source, channel_data *channel)
+void eEPGCache::sectionRead(const uint8_t *data, int source, channel_data *channel)
 {
        eit_t *eit = (eit_t*) data;
 
@@ -735,7 +735,7 @@ void eEPGCache::sectionRead(const __u8 *data, int source, channel_data *channel)
 
        while (ptr<len)
        {
-               __u16 event_hash;
+               uint16_t event_hash;
                eit_event_size = HILO(eit_event->descriptors_loop_length)+EIT_LOOP_SIZE;
 
                duration = fromBCD(eit_event->duration_1)*3600+fromBCD(eit_event->duration_2)*60+fromBCD(eit_event->duration_3);
@@ -757,7 +757,7 @@ void eEPGCache::sectionRead(const __u8 *data, int source, channel_data *channel)
                     ( (onid != 1714) || (duration != (24*3600-1)) )    // PlatformaHD invalid event
                   )
                {
-                       __u16 event_id = HILO(eit_event->event_id);
+                       uint16_t event_id = HILO(eit_event->event_id);
                        eventData *evt = 0;
                        int ev_erase_count = 0;
                        int tm_erase_count = 0;
@@ -859,7 +859,7 @@ void eEPGCache::sectionRead(const __u8 *data, int source, channel_data *channel)
                        {
                                // exempt memory
                                delete tm_it->second;
-                               ev_it=prevEventIt=servicemap.first.insert( prevEventIt, std::pair<const __u16, eventData*>( event_id, evt) );
+                               ev_it=prevEventIt=servicemap.first.insert( prevEventIt, std::pair<const uint16_t, eventData*>( event_id, evt) );
                                tm_it->second=evt;
                        }
                        else // added new eventData
@@ -867,7 +867,7 @@ void eEPGCache::sectionRead(const __u8 *data, int source, channel_data *channel)
 #ifdef EPG_DEBUG
                                consistencyCheck=false;
 #endif
-                               ev_it=prevEventIt=servicemap.first.insert( prevEventIt, std::pair<const __u16, eventData*>( event_id, evt) );
+                               ev_it=prevEventIt=servicemap.first.insert( prevEventIt, std::pair<const uint16_t, eventData*>( event_id, evt) );
                                tm_it=prevTimeIt=servicemap.second.insert( prevTimeIt, std::pair<const time_t, eventData*>( TM, evt ) );
                        }
 
@@ -924,7 +924,7 @@ next:
                }
 #endif
                ptr += eit_event_size;
-               eit_event=(eit_event_struct*)(((__u8*)eit_event)+eit_event_size);
+               eit_event=(eit_event_struct*)(((uint8_t*)eit_event)+eit_event_size);
        }
 }
 
@@ -1248,13 +1248,13 @@ void eEPGCache::load()
                                fread( &size, sizeof(int), 1, f);
                                while(size--)
                                {
-                                       __u8 len=0;
-                                       __u8 type=0;
+                                       uint8_t len=0;
+                                       uint8_t type=0;
                                        eventData *event=0;
-                                       fread( &type, sizeof(__u8), 1, f);
-                                       fread( &len, sizeof(__u8), 1, f);
+                                       fread( &type, sizeof(uint8_t), 1, f);
+                                       fread( &len, sizeof(uint8_t), 1, f);
                                        event = new eventData(0, len, type);
-                                       event->EITdata = new __u8[len];
+                                       event->EITdata = new uint8_t[len];
                                        eventData::CacheSize+=len;
                                        fread( event->EITdata, len, 1, f);
                                        evMap[ event->getEventID() ]=event;
@@ -1288,11 +1288,11 @@ void eEPGCache::load()
                                                while(size--)
                                                {
                                                        time_t time1, time2;
-                                                       __u16 event_id;
+                                                       uint16_t event_id;
                                                        fread( &time1, sizeof(time_t), 1, f);
                                                        fread( &time2, sizeof(time_t), 1, f);
-                                                       fread( &event_id, sizeof(__u16), 1, f);
-                                                       content_time_tables[key][content_id][time1]=std::pair<time_t, __u16>(time2, event_id);
+                                                       fread( &event_id, sizeof(uint16_t), 1, f);
+                                                       content_time_tables[key][content_id][time1]=std::pair<time_t, uint16_t>(time2, event_id);
                                                        eventMap::iterator it =
                                                                evMap.find(event_id);
                                                        if (it != evMap.end())
@@ -1382,9 +1382,9 @@ void eEPGCache::save()
                fwrite( &size, sizeof(int), 1, f);
                for (timeMap::iterator time_it(timemap.begin()); time_it != timemap.end(); ++time_it)
                {
-                       __u8 len = time_it->second->ByteSize;
-                       fwrite( &time_it->second->type, sizeof(__u8), 1, f );
-                       fwrite( &len, sizeof(__u8), 1, f);
+                       uint8_t len = time_it->second->ByteSize;
+                       fwrite( &time_it->second->type, sizeof(uint8_t), 1, f );
+                       fwrite( &len, sizeof(uint8_t), 1, f);
                        fwrite( time_it->second->EITdata, len, 1, f);
                        ++cnt;
                }
@@ -1412,7 +1412,7 @@ void eEPGCache::save()
                        {
                                fwrite( &it->first, sizeof(time_t), 1, f);
                                fwrite( &it->second.first, sizeof(time_t), 1, f);
-                               fwrite( &it->second.second, sizeof(__u16), 1, f);
+                               fwrite( &it->second.second, sizeof(uint16_t), 1, f);
                        }
                }
        }
@@ -1852,7 +1852,7 @@ void eEPGCache::channel_data::abortEPG()
        pthread_mutex_unlock(&channel_active);
 }
 
-void eEPGCache::channel_data::readData( const __u8 *data, int source)
+void eEPGCache::channel_data::readData( const uint8_t *data, int source)
 {
        int map;
        iDVBSectionReader *reader = NULL;
@@ -1953,7 +1953,7 @@ void eEPGCache::channel_data::readData( const __u8 *data, int source)
        else
        {
                eit_t *eit = (eit_t*) data;
-               __u32 sectionNo = data[0] << 24;
+               uint32_t sectionNo = data[0] << 24;
                sectionNo |= data[3] << 16;
                sectionNo |= data[4] << 8;
                sectionNo |= eit->section_number;
@@ -1965,8 +1965,8 @@ void eEPGCache::channel_data::readData( const __u8 *data, int source)
                {
                        seenSections.insert(sectionNo);
                        calcedSections.insert(sectionNo);
-                       __u32 tmpval = sectionNo & 0xFFFFFF00;
-                       __u8 incr = source == NOWNEXT ? 1 : 8;
+                       uint32_t tmpval = sectionNo & 0xFFFFFF00;
+                       uint8_t incr = source == NOWNEXT ? 1 : 8;
                        for ( int i = 0; i <= eit->last_section_number; i+=incr )
                        {
                                if ( i == eit->section_number )
@@ -1984,12 +1984,12 @@ void eEPGCache::channel_data::readData( const __u8 *data, int source)
 
 #if ENABLE_FREESAT
 
-freesatEITSubtableStatus::freesatEITSubtableStatus(u_char version, __u8 maxSection) : version(version)
+freesatEITSubtableStatus::freesatEITSubtableStatus(u_char version, uint8_t maxSection) : version(version)
 {
        initMap(maxSection);
 }
 
-void freesatEITSubtableStatus::initMap(__u8 maxSection)
+void freesatEITSubtableStatus::initMap(uint8_t maxSection)
 {
        int i, maxSectionIdx = maxSection / 8;
        for (i = 0; i < 32; i++)
@@ -1998,18 +1998,18 @@ void freesatEITSubtableStatus::initMap(__u8 maxSection)
        }
 }
 
-bool freesatEITSubtableStatus::isSectionPresent(__u8 sectionNo)
+bool freesatEITSubtableStatus::isSectionPresent(uint8_t sectionNo)
 {
-       __u8 sectionIdx = sectionNo / 8;
-       __u8 bitOffset = sectionNo % 8;
+       uint8_t sectionIdx = sectionNo / 8;
+       uint8_t bitOffset = sectionNo % 8;
 
        return ((sectionMap[sectionIdx] & (1 << bitOffset)) != 0);
 }
 
 bool freesatEITSubtableStatus::isCompleted()
 {
-       __u32 i = 0;
-       __u8 calc;
+       uint32_t i = 0;
+       uint8_t calc;
 
        while ( i < 32 )
        {
@@ -2022,11 +2022,11 @@ bool freesatEITSubtableStatus::isCompleted()
        return true; // All segments ok
 }
 
-void freesatEITSubtableStatus::seen(__u8 sectionNo, __u8 maxSegmentSection)
+void freesatEITSubtableStatus::seen(uint8_t sectionNo, uint8_t maxSegmentSection)
 {
-       __u8 sectionIdx = sectionNo / 8;
-       __u8 bitOffset = sectionNo % 8;
-       __u8 maxBitOffset = maxSegmentSection % 8;
+       uint8_t sectionIdx = sectionNo / 8;
+       uint8_t bitOffset = sectionNo % 8;
+       uint8_t maxBitOffset = maxSegmentSection % 8;
 
        sectionMap[sectionIdx] &= 0x00FF; // Clear calc map
        sectionMap[sectionIdx] |= ((0x01FF << maxBitOffset) & 0xFF00); // Set calc map
@@ -2038,7 +2038,7 @@ bool freesatEITSubtableStatus::isVersionChanged(u_char testVersion)
        return version != testVersion;
 }
 
-void freesatEITSubtableStatus::updateVersion(u_char newVersion, __u8 maxSection)
+void freesatEITSubtableStatus::updateVersion(u_char newVersion, uint8_t maxSection)
 {
        version = newVersion;
        initMap(maxSection);
@@ -2050,16 +2050,16 @@ void eEPGCache::channel_data::cleanupFreeSat()
        m_FreesatTablesToComplete = 0;
 }
 
-void eEPGCache::channel_data::readFreeSatScheduleOtherData( const __u8 *data)
+void eEPGCache::channel_data::readFreeSatScheduleOtherData( const uint8_t *data)
 {
        eit_t *eit = (eit_t*) data;
-       __u32 subtableNo = data[0] << 24; // Table ID
+       uint32_t subtableNo = data[0] << 24; // Table ID
        subtableNo |= data[3] << 16; // Service ID Hi
        subtableNo |= data[4] << 8; // Service ID Lo
 
        // Check for sub-table version in map
-       std::map<__u32, freesatEITSubtableStatus> &freeSatSubTableStatus = this->m_FreeSatSubTableStatus;
-       std::map<__u32, freesatEITSubtableStatus>::iterator itmap = freeSatSubTableStatus.find(subtableNo);
+       std::map<uint32_t, freesatEITSubtableStatus> &freeSatSubTableStatus = this->m_FreeSatSubTableStatus;
+       std::map<uint32_t, freesatEITSubtableStatus>::iterator itmap = freeSatSubTableStatus.find(subtableNo);
 
        freesatEITSubtableStatus *fsstatus;
        if ( itmap == freeSatSubTableStatus.end() )
@@ -2068,7 +2068,7 @@ void eEPGCache::channel_data::readFreeSatScheduleOtherData( const __u8 *data)
                //eDebug("[EPGC] New subtable (%x) version (%d) now/next (%d) tsid (%x/%x) onid (%x/%x)", subtableNo, eit->version_number, eit->current_next_indicator, eit->transport_stream_id_hi, eit->transport_stream_id_lo, eit->original_network_id_hi, eit->original_network_id_lo);
                fsstatus = new freesatEITSubtableStatus(eit->version_number, eit->last_section_number);
                m_FreesatTablesToComplete++;
-               freeSatSubTableStatus.insert(std::pair<__u32,freesatEITSubtableStatus>(subtableNo, *fsstatus));
+               freeSatSubTableStatus.insert(std::pair<uint32_t,freesatEITSubtableStatus>(subtableNo, *fsstatus));
        }
        else
        {
@@ -2695,8 +2695,8 @@ static void fill_eit_duration(eit_event_struct *evt, int time)
     evt->duration_3 = toBCD((time % 3600) % 60);
 }
 
-static inline __u8 HI(int x) { return (__u8) ((x >> 8) & 0xFF); }
-static inline __u8 LO(int x) { return (__u8) (x & 0xFF); }
+static inline uint8_t HI(int x) { return (uint8_t) ((x >> 8) & 0xFF); }
+static inline uint8_t LO(int x) { return (uint8_t) (x & 0xFF); }
 #define SET_HILO(x, val) {x##_hi = ((val) >> 8); x##_lo = (val) & 0xff; }
 // convert from set of strings to DVB format (EIT)
 void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& serviceRefs, long start,
@@ -2706,8 +2706,8 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
        if (!title)
                return;
        static const int EIT_LENGTH = 4108;
-       static const __u8 codePage = 0x15; // UTF-8 encoding
-       __u8 data[EIT_LENGTH];
+       static const uint8_t codePage = 0x15; // UTF-8 encoding
+       uint8_t data[EIT_LENGTH];
 
        eit_t *packet = (eit_t *) data;
        packet->table_id = 0x50;
@@ -2723,7 +2723,7 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
 
        eit_event_t *evt_struct = (eit_event_t*) (data + EIT_SIZE);
 
-       __u16 eventId = start & 0xFFFF;
+       uint16_t eventId = start & 0xFFFF;
        SET_HILO(evt_struct->event_id, eventId);
 
        //6 bytes start time, 3 bytes duration
@@ -2735,7 +2735,7 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
 
        //no support for different code pages, only DVB's latin1 character set
        //TODO: convert text to correct character set (data is probably passed in as UTF-8)
-       __u8 *x = (__u8 *) evt_struct;
+       uint8_t *x = (uint8_t *) evt_struct;
        x += EIT_LOOP_SIZE;
        int nameLength = strnlen(title, 246);
        int descLength = short_summary ? strnlen(short_summary, 246 - nameLength) : 0;
@@ -2749,7 +2749,7 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
        short_evt->language_code_2 = 'n';
        short_evt->language_code_3 = 'g';
        short_evt->event_name_length = nameLength ? nameLength + 1 : 0;
-       x = (__u8 *) short_evt;
+       x = (uint8_t *) short_evt;
        x += EIT_SHORT_EVENT_DESCRIPTOR_SIZE;
        *x = codePage;
        ++x;
@@ -2781,7 +2781,7 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
        }
 
        //Long description
-       int currentLoopLength = x - (__u8*)short_evt;
+       int currentLoopLength = x - (uint8_t*)short_evt;
        static const int overheadPerDescriptor = 9; //increase if codepages are added!!!
        static const int MAX_LEN = 256 - overheadPerDescriptor;
 
@@ -2820,7 +2820,7 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
        }
 
        //TODO: add age and more
-       int desc_loop_length = x - ((__u8*)evt_struct + EIT_LOOP_SIZE);
+       int desc_loop_length = x - ((uint8_t*)evt_struct + EIT_LOOP_SIZE);
        SET_HILO(evt_struct->descriptors_loop_length, desc_loop_length);
 
        int packet_length = (x - data) - 3; //should add 1 for crc....
@@ -2987,7 +2987,7 @@ PyObject *eEPGCache::search(ePyObject arg)
 {
        ePyObject ret;
        int descridx = -1;
-       __u32 descr[512];
+       uint32_t descr[512];
        int eventid = -1;
        const char *argstring=0;
        char *refstr=0;
@@ -3063,18 +3063,18 @@ PyObject *eEPGCache::search(ePyObject arg)
                                                lookupEventId(ref, eventid, evData);
                                                if (evData)
                                                {
-                                                       __u8 *data = evData->EITdata;
+                                                       uint8_t *data = evData->EITdata;
                                                        int tmp = evData->ByteSize-10;
-                                                       __u32 *p = (__u32*)(data+10);
+                                                       uint32_t *p = (uint32_t*)(data+10);
                                                        // search short and extended event descriptors
                                                        while(tmp>3)
                                                        {
-                                                               __u32 crc = *p++;
+                                                               uint32_t crc = *p++;
                                                                descriptorMap::iterator it =
                                                                        eventData::descriptors.find(crc);
                                                                if (it != eventData::descriptors.end())
                                                                {
-                                                                       __u8 *descr_data = it->second.second;
+                                                                       uint8_t *descr_data = it->second.second;
                                                                        switch(descr_data[0])
                                                                        {
                                                                        case 0x4D ... 0x4E:
@@ -3132,7 +3132,7 @@ PyObject *eEPGCache::search(ePyObject arg)
                                        for (descriptorMap::iterator it(eventData::descriptors.begin());
                                                it != eventData::descriptors.end() && descridx < 511; ++it)
                                        {
-                                               __u8 *data = it->second.second;
+                                               uint8_t *data = it->second.second;
                                                if ( data[0] == 0x4D ) // short event descriptor
                                                {
                                                        const char *titleptr = (const char*)&data[6];
@@ -3246,14 +3246,14 @@ PyObject *eEPGCache::search(ePyObject arg)
                                        if (evit->second->getEventID() == eventid)
                                                continue;
                                }
-                               __u8 *data = evit->second->EITdata;
+                               uint8_t *data = evit->second->EITdata;
                                int tmp = evit->second->ByteSize-10;
-                               __u32 *p = (__u32*)(data+10);
+                               uint32_t *p = (uint32_t*)(data+10);
                                // check if any of our descriptor used by this event
                                int cnt=-1;
                                while(tmp>3)
                                {
-                                       __u32 crc32 = *p++;
+                                       uint32_t crc32 = *p++;
                                        for ( int i=0; i <= descridx; ++i)
                                        {
                                                if (descr[i] == crc32)  // found...
@@ -3398,7 +3398,7 @@ void eEPGCache::PMTready(eDVBServicePMTHandler *pmthandler)
                                                        case 0xC2: // user defined
                                                                if ((*desc)->getLength() == 8)
                                                                {
-                                                                       __u8 buffer[10];
+                                                                       uint8_t buffer[10];
                                                                        (*desc)->writeToBuffer(buffer);
                                                                        if (!memcmp((const char *)buffer+2, "EPGDATA", 7))
                                                                        {
@@ -3482,14 +3482,14 @@ void eEPGCache::PMTready(eDVBServicePMTHandler *pmthandler)
 
 struct date_time
 {
-       __u8 data[5];
+       uint8_t data[5];
        time_t tm;
        date_time( const date_time &a )
        {
                memcpy(data, a.data, 5);
                tm = a.tm;
        }
-       date_time( const __u8 data[5])
+       date_time( const uint8_t data[5])
        {
                memcpy(this->data, data, 5);
                tm = parseDVBtime(data[0], data[1], data[2], data[3], data[4]);
@@ -3497,7 +3497,7 @@ struct date_time
        date_time()
        {
        }
-       const __u8& operator[](int pos) const
+       const uint8_t& operator[](int pos) const
        {
                return data[pos];
        }
@@ -3511,7 +3511,7 @@ struct less_datetime
        }
 };
 
-void eEPGCache::privateSectionRead(const uniqueEPGKey &current_service, const __u8 *data)
+void eEPGCache::privateSectionRead(const uniqueEPGKey &current_service, const uint8_t *data)
 {
        contentMap &content_time_table = content_time_tables[current_service];
        singleLock s(cache_lock);
@@ -3539,14 +3539,14 @@ void eEPGCache::privateSectionRead(const uniqueEPGKey &current_service, const __
        }
        time_event_map.clear();
 
-       __u8 duration[3];
+       uint8_t duration[3];
        memcpy(duration, data+ptr, 3);
        ptr+=3;
        int duration_sec =
                fromBCD(duration[0])*3600+fromBCD(duration[1])*60+fromBCD(duration[2]);
 
-       const __u8 *descriptors[65];
-       const __u8 **pdescr = descriptors;
+       const uint8_t *descriptors[65];
+       const uint8_t **pdescr = descriptors;
 
        int descriptors_length = (data[ptr++]&0x0F) << 8;
        descriptors_length |= data[ptr++];
@@ -3588,7 +3588,7 @@ void eEPGCache::privateSectionRead(const uniqueEPGKey &current_service, const __
                                descr_len -= 6;
                                while( descr_len > 2 )
                                {
-                                       __u8 datetime[5];
+                                       uint8_t datetime[5];
                                        datetime[0] = data[ptr++];
                                        datetime[1] = data[ptr++];
                                        int tmp_len = data[ptr++];
@@ -3615,13 +3615,13 @@ void eEPGCache::privateSectionRead(const uniqueEPGKey &current_service, const __
                }
        }
        ASSERT(pdescr <= &descriptors[65]);
-       __u8 event[4098];
+       uint8_t event[4098];
        eit_event_struct *ev_struct = (eit_event_struct*) event;
        ev_struct->running_status = 0;
        ev_struct->free_CA_mode = 1;
        memcpy(event+7, duration, 3);
        ptr = 12;
-       const __u8 **d=descriptors;
+       const uint8_t **d=descriptors;
        while ( d < pdescr )
        {
                memcpy(event+ptr, *d, ((*d)[1])+2);
@@ -3640,7 +3640,7 @@ void eEPGCache::privateSectionRead(const uniqueEPGKey &current_service, const __
                for (std::list<uniqueEPGKey>::iterator i(it->second.begin()); i != it->second.end(); ++i)
                {
                        event[bptr++] = 0x4A;
-                       __u8 *len = event+(bptr++);
+                       uint8_t *len = event+(bptr++);
                        event[bptr++] = (i->tsid & 0xFF00) >> 8;
                        event[bptr++] = (i->tsid & 0xFF);
                        event[bptr++] = (i->onid & 0xFF00) >> 8;
@@ -3659,12 +3659,12 @@ void eEPGCache::privateSectionRead(const uniqueEPGKey &current_service, const __
                while( tmMap.find(stime) != tmMap.end() )
                        ++stime;
                event[6] += (stime - it->first.tm);
-               __u16 event_id = 0;
+               uint16_t event_id = 0;
                while( evMap.find(event_id) != evMap.end() )
                        ++event_id;
                event[0] = (event_id & 0xFF00) >> 8;
                event[1] = (event_id & 0xFF);
-               time_event_map[it->first.tm]=std::pair<time_t, __u16>(stime, event_id);
+               time_event_map[it->first.tm]=std::pair<time_t, uint16_t>(stime, event_id);
                eventData *d = new eventData( ev_struct, bptr, PRIVATE );
                evMap[event_id] = d;
                tmMap[stime] = d;
@@ -3693,7 +3693,7 @@ void eEPGCache::channel_data::startPrivateReader()
        m_PrivateReader->start(mask);
 }
 
-void eEPGCache::channel_data::readPrivateData( const __u8 *data)
+void eEPGCache::channel_data::readPrivateData( const uint8_t *data)
 {
        if ( seenPrivateSections.find(data[6]) == seenPrivateSections.end() )
        {
@@ -3725,7 +3725,7 @@ void eEPGCache::channel_data::cleanupMHW()
        m_program_ids.clear();
 }
 
-__u8 *eEPGCache::channel_data::delimitName( __u8 *in, __u8 *out, int len_in )
+uint8_t *eEPGCache::channel_data::delimitName( uint8_t *in, uint8_t *out, int len_in )
 {
        // Names in mhw structs are not strings as they are not '\0' terminated.
        // This function converts the mhw name into a string.
@@ -3760,7 +3760,7 @@ void eEPGCache::channel_data::timeMHW2DVB( u_char day, u_char hours, u_char minu
 {
        char tz_saved[1024];
        // Remove offset in mhw time.
-       __u8 local_hours = hours;
+       uint8_t local_hours = hours;
        if ( hours >= 16 )
                local_hours -= 4;
        else if ( hours >= 8 )
@@ -3811,10 +3811,10 @@ void eEPGCache::channel_data::timeMHW2DVB( u_char day, u_char hours, u_char minu
        timeMHW2DVB( recdate.tm_hour, minutes, return_time+2 );
 }
 
-void eEPGCache::channel_data::storeMHWTitle(std::map<__u32, mhw_title_t>::iterator itTitle, std::string sumText, const __u8 *data)
+void eEPGCache::channel_data::storeMHWTitle(std::map<uint32_t, mhw_title_t>::iterator itTitle, std::string sumText, const uint8_t *data)
 // data is borrowed from calling proc to save memory space.
 {
-       __u8 name[34];
+       uint8_t name[34];
 
        // For each title a separate EIT packet will be sent to eEPGCache::sectionRead()
        bool isMHW2 = itTitle->second.mhw2_mjd_hi || itTitle->second.mhw2_mjd_lo ||
@@ -3837,7 +3837,7 @@ void eEPGCache::channel_data::storeMHWTitle(std::map<__u32, mhw_title_t>::iterat
        packet->segment_last_section_number = 0; // eEPGCache::sectionRead() will dig this for the moment
        packet->segment_last_table_id = 0x50;
 
-       __u8 *title = isMHW2 ? ((__u8*)(itTitle->second.title))-4 : (__u8*)itTitle->second.title;
+       uint8_t *title = isMHW2 ? ((uint8_t*)(itTitle->second.title))-4 : (uint8_t*)itTitle->second.title;
        std::string prog_title = (char *) delimitName( title, name, isMHW2 ? 35 : 23 );
        int prog_title_length = prog_title.length();
 
@@ -3963,7 +3963,7 @@ void eEPGCache::channel_data::startMHWTimeout(int msec)
        m_MHWTimeoutet=false;
 }
 
-void eEPGCache::channel_data::startMHWReader(__u16 pid, __u8 tid)
+void eEPGCache::channel_data::startMHWReader(uint16_t pid, uint8_t tid)
 {
        m_MHWFilterMask.pid = pid;
        m_MHWFilterMask.data[0] = tid;
@@ -3971,7 +3971,7 @@ void eEPGCache::channel_data::startMHWReader(__u16 pid, __u8 tid)
 //     eDebug("start 0x%02x 0x%02x", pid, tid);
 }
 
-void eEPGCache::channel_data::startMHWReader2(__u16 pid, __u8 tid, int ext)
+void eEPGCache::channel_data::startMHWReader2(uint16_t pid, uint8_t tid, int ext)
 {
        m_MHWFilterMask2.pid = pid;
        m_MHWFilterMask2.data[0] = tid;
@@ -3990,7 +3990,7 @@ void eEPGCache::channel_data::startMHWReader2(__u16 pid, __u8 tid, int ext)
        m_MHWReader2->start(m_MHWFilterMask2);
 }
 
-void eEPGCache::channel_data::readMHWData(const __u8 *data)
+void eEPGCache::channel_data::readMHWData(const uint8_t *data)
 {
        if ( m_MHWReader2 )
                m_MHWReader2->stop();
@@ -4029,9 +4029,9 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
                int record_size = sizeof( mhw_theme_name_t );
                int nbr_records = int (len/record_size);
                int idx_ptr = 0;
-               __u8 next_idx = (__u8) *(data + 3 + idx_ptr);
-               __u8 idx = 0;
-               __u8 sub_idx = 0;
+               uint8_t next_idx = (uint8_t) *(data + 3 + idx_ptr);
+               uint8_t idx = 0;
+               uint8_t sub_idx = 0;
                for ( int i = 0; i < nbr_records; i++ )
                {
                        mhw_theme_name_t *theme = (mhw_theme_name_t*) &data[19 + i*record_size];
@@ -4039,7 +4039,7 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
                        {
                                idx = (idx_ptr<<4);
                                idx_ptr++;
-                               next_idx = (__u8) *(data + 3 + idx_ptr);
+                               next_idx = (uint8_t) *(data + 3 + idx_ptr);
                                sub_idx = 0;
                        }
                        else
@@ -4057,7 +4057,7 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
        // Titles table
        {
                mhw_title_t *title = (mhw_title_t*) data;
-               __u8 name[24];
+               uint8_t name[24];
                std::string prog_title = (char *) delimitName( title->title, name, 23 );
 
                if ( title->channel_id == 0xFF || prog_title.substr(0,7) == "BIENTOT" ) // Separator or BIENTOT record
@@ -4065,9 +4065,9 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
                else
                {
                        // Create unique key per title
-                       __u32 title_id = ((title->channel_id)<<16)|((title->dh.day)<<13)|((title->dh.hours)<<8)|
+                       uint32_t title_id = ((title->channel_id)<<16)|((title->dh.day)<<13)|((title->dh.hours)<<8)|
                                (title->ms.minutes);
-                       __u32 program_id = ((title->program_id_hi)<<24)|((title->program_id_mh)<<16)|
+                       uint32_t program_id = ((title->program_id_hi)<<24)|((title->program_id_mh)<<16)|
                                ((title->program_id_ml)<<8)|(title->program_id_lo);
 
                        if ( m_titles.find( title_id ) == m_titles.end() )
@@ -4080,7 +4080,7 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
                                m_titles[ title_id ] = *title;
                                if ( (title->ms.summary_available) && (m_program_ids.find(program_id) == m_program_ids.end()) )
                                        // program_ids will be used to gather summaries.
-                                       m_program_ids.insert(std::pair<__u32,__u32>(program_id,title_id));
+                                       m_program_ids.insert(std::pair<uint32_t,uint32_t>(program_id,title_id));
                                return; // Continue reading of the current table.
                        }
                        else if (!checkMHWTimeout())
@@ -4104,7 +4104,7 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
                mhw_summary_t *summary = (mhw_summary_t*) data;
 
                // Create unique key per record
-               __u32 program_id = ((summary->program_id_hi)<<24)|((summary->program_id_mh)<<16)|
+               uint32_t program_id = ((summary->program_id_hi)<<24)|((summary->program_id_mh)<<16)|
                        ((summary->program_id_ml)<<8)|(summary->program_id_lo);
                int len = ((data[1]&0xf)<<8) + data[2];
 
@@ -4113,7 +4113,7 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
                memcpy(&tmp, &data, sizeof(void*));
                tmp[len+3] = 0; // Terminate as a string.
 
-               std::multimap<__u32, __u32>::iterator itProgid( m_program_ids.find( program_id ) );
+               std::multimap<uint32_t, uint32_t>::iterator itProgid( m_program_ids.find( program_id ) );
                if ( itProgid == m_program_ids.end() )
                { /*    This part is to prevent to looping forever if some summaries are not received yet.
                        There is a timeout of 4 sec. after the last successfully read summary. */
@@ -4129,7 +4129,7 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
                                the_text.replace(pos, 2, " ");
 
                        // Find corresponding title, store title and summary in epgcache.
-                       std::map<__u32, mhw_title_t>::iterator itTitle( m_titles.find( itProgid->second ) );
+                       std::map<uint32_t, mhw_title_t>::iterator itTitle( m_titles.find( itProgid->second ) );
                        if ( itTitle != m_titles.end() )
                        {
                                startMHWTimeout(4000);
@@ -4146,7 +4146,7 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
                m_program_ids.size());
        // Summaries have been read, titles that have summaries have been stored.
        // Now store titles that do not have summaries.
-       for (std::map<__u32, mhw_title_t>::iterator itTitle(m_titles.begin()); itTitle != m_titles.end(); itTitle++)
+       for (std::map<uint32_t, mhw_title_t>::iterator itTitle(m_titles.begin()); itTitle != m_titles.end(); itTitle++)
                storeMHWTitle( itTitle, "", data );
        isRunning &= ~MHW;
        m_MHWConn=0;
@@ -4156,7 +4156,7 @@ void eEPGCache::channel_data::readMHWData(const __u8 *data)
                finishEPG();
 }
 
-void eEPGCache::channel_data::readMHWData2(const __u8 *data)
+void eEPGCache::channel_data::readMHWData2(const uint8_t *data)
 {
        int dataLen = (((data[1]&0xf) << 8) | data[2]) + 3;
 
@@ -4192,7 +4192,7 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
                else
                        goto abort;
                // data seems consistent...
-               const __u8 *tmp = data+121;
+               const uint8_t *tmp = data+121;
                for (int i=0; i < num_channels; ++i)
                {
                        mhw_channel_name_t channel;
@@ -4273,17 +4273,17 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
                        title.mhw2_duration_lo = duration&0xFF;
 
                        // Create unique key per title
-                       __u32 title_id = (data[pos+7] << 24) | (data[pos+8] << 16) | (data[pos+9] << 8) | data[pos+10];
+                       uint32_t title_id = (data[pos+7] << 24) | (data[pos+8] << 16) | (data[pos+9] << 8) | data[pos+10];
 
-                       __u8 slen = data[pos+18] & 0x3f;
-                       __u8 *dest = ((__u8*)title.title)-4;
+                       uint8_t slen = data[pos+18] & 0x3f;
+                       uint8_t *dest = ((uint8_t*)title.title)-4;
                        memcpy(dest, &data[pos+19], slen>35 ? 35 : slen);
                        memset(dest+slen, 0, 35-slen);
                        pos += 19 + slen;
 //                     eDebug("%02x [%02x %02x]: %s", data[pos], data[pos+1], data[pos+2], dest);
 
 //                     not used theme id (data[7] & 0x3f) + (data[pos] & 0x3f);
-                       __u32 summary_id = (data[pos+1] << 8) | data[pos+2];
+                       uint32_t summary_id = (data[pos+1] << 8) | data[pos+2];
 
 //                     if (title.channel_id > m_channels.size())
 //                             eDebug("channel_id(%d %02x) to big!!", title.channel_id);
@@ -4295,7 +4295,7 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
 
                        pos += 3;
 
-                       std::map<__u32, mhw_title_t>::iterator it = m_titles.find( title_id );
+                       std::map<uint32_t, mhw_title_t>::iterator it = m_titles.find( title_id );
                        if ( it == m_titles.end() )
                        {
                                startMHWTimeout(5000);
@@ -4303,7 +4303,7 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
                                if (summary_id != 0xFFFF)
                                {
                                        bool add=true;
-                                       std::multimap<__u32, __u32>::iterator it(m_program_ids.lower_bound(summary_id));
+                                       std::multimap<uint32_t, uint32_t>::iterator it(m_program_ids.lower_bound(summary_id));
                                        while (it != m_program_ids.end() && it->first == summary_id)
                                        {
                                                if (it->second == title_id) {
@@ -4313,7 +4313,7 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
                                                ++it;
                                        }
                                        if (add)
-                                               m_program_ids.insert(std::pair<__u32,__u32>(summary_id,title_id));
+                                               m_program_ids.insert(std::pair<uint32_t,uint32_t>(summary_id,title_id));
                                }
                        }
                        else
@@ -4377,7 +4377,7 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
                        if (valid)
                        {
                                // data seems consistent...
-                               __u32 summary_id = (data[3]<<8)|data[4];
+                               uint32_t summary_id = (data[3]<<8)|data[4];
 //                             eDebug ("summary id %04x\n", summary_id);
 //                             eDebug("[%02x %02x] %02x %02x %02x %02x %02x %02x %02x %02x XX\n", data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11], data[12], data[13] );
 
@@ -4401,7 +4401,7 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
                                else
                                        tmp[pos+1] = 0;
 
-                               std::multimap<__u32, __u32>::iterator itProgId( m_program_ids.lower_bound(summary_id) );
+                               std::multimap<uint32_t, uint32_t>::iterator itProgId( m_program_ids.lower_bound(summary_id) );
                                if ( itProgId == m_program_ids.end() || itProgId->first != summary_id)
                                { /*    This part is to prevent to looping forever if some summaries are not received yet.
                                        There is a timeout of 4 sec. after the last successfully read summary. */
@@ -4419,7 +4419,7 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
                                        {
 //                                             eDebug(".");
                                                // Find corresponding title, store title and summary in epgcache.
-                                               std::map<__u32, mhw_title_t>::iterator itTitle( m_titles.find( itProgId->second ) );
+                                               std::map<uint32_t, mhw_title_t>::iterator itTitle( m_titles.find( itProgId->second ) );
                                                if ( itTitle != m_titles.end() )
                                                {
                                                        storeMHWTitle( itTitle, the_text, data );
@@ -4453,7 +4453,7 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
                {
                        // Summaries have been read, titles that have summaries have been stored.
                        // Now store titles that do not have summaries.
-                       for (std::map<__u32, mhw_title_t>::iterator itTitle(m_titles.begin()); itTitle != m_titles.end(); itTitle++)
+                       for (std::map<uint32_t, mhw_title_t>::iterator itTitle(m_titles.begin()); itTitle != m_titles.end(); itTitle++)
                                storeMHWTitle( itTitle, "", data );
                        eDebug("[EPGC] mhw2 finished(%ld) %d summaries not found",
                                ::time(0),
index 6d32972..7ba5cb6 100644 (file)
@@ -93,7 +93,7 @@ struct uniqueEPGKey
 };
 
 //eventMap is sorted by event_id
-#define eventMap std::map<__u16, eventData*>
+#define eventMap std::map<uint16_t, eventData*>
 //timeMap is sorted by beginTime
 #define timeMap std::map<time_t, eventData*>
 
@@ -108,35 +108,35 @@ struct hash_uniqueEPGKey
        }
 };
 
-#define tidMap std::set<__u32>
+#define tidMap std::set<uint32_t>
 #if 0
        typedef std::unordered_map<uniqueEPGKey, std::pair<eventMap, timeMap>, hash_uniqueEPGKey, uniqueEPGKey::equal> eventCache;
        #ifdef ENABLE_PRIVATE_EPG
-               typedef std::unordered_map<time_t, std::pair<time_t, __u16> > contentTimeMap;
+               typedef std::unordered_map<time_t, std::pair<time_t, uint16_t> > contentTimeMap;
                typedef std::unordered_map<int, contentTimeMap > contentMap;
                typedef std::unordered_map<uniqueEPGKey, contentMap, hash_uniqueEPGKey, uniqueEPGKey::equal > contentMaps;
        #endif
 #else
        typedef __gnu_cxx::hash_map<uniqueEPGKey, std::pair<eventMap, timeMap>, hash_uniqueEPGKey, uniqueEPGKey::equal> eventCache;
        #ifdef ENABLE_PRIVATE_EPG
-               typedef __gnu_cxx::hash_map<time_t, std::pair<time_t, __u16> > contentTimeMap;
+               typedef __gnu_cxx::hash_map<time_t, std::pair<time_t, uint16_t> > contentTimeMap;
                typedef __gnu_cxx::hash_map<int, contentTimeMap > contentMap;
                typedef __gnu_cxx::hash_map<uniqueEPGKey, contentMap, hash_uniqueEPGKey, uniqueEPGKey::equal > contentMaps;
        #endif
 #endif
 
 #define descriptorPair std::pair<int,__u8*>
-#define descriptorMap std::map<__u32, descriptorPair >
+#define descriptorMap std::map<uint32_t, descriptorPair >
 
 class eventData
 {
        friend class eEPGCache;
 private:
-       __u8* EITdata;
-       __u8 ByteSize;
-       __u8 type;
+       uint8_t* EITdata;
+       uint8_t ByteSize;
+       uint8_t type;
        static descriptorMap descriptors;
-       static __u8 data[];
+       static uint8_t data[];
        static int CacheSize;
        static bool isCacheCorrupt;
        static void load(FILE *);
@@ -171,15 +171,15 @@ class freesatEITSubtableStatus
 {
 private:
        u_char version;
-       __u16 sectionMap[32];
-       void initMap(__u8 maxSection);
+       uint16_t sectionMap[32];
+       void initMap(uint8_t maxSection);
 
 public:
-       freesatEITSubtableStatus(u_char version, __u8 maxSection);
-       bool isSectionPresent(__u8 sectionNo);
-       void seen(__u8 sectionNo, __u8 maxSegmentSection);
+       freesatEITSubtableStatus(u_char version, uint8_t maxSection);
+       bool isSectionPresent(uint8_t sectionNo);
+       void seen(uint8_t sectionNo, uint8_t maxSegmentSection);
        bool isVersionChanged(u_char testVersion);
-       void updateVersion(u_char newVersion, __u8 maxSection);
+       void updateVersion(u_char newVersion, uint8_t maxSection);
        bool isCompleted();
 };
 #endif
@@ -212,9 +212,9 @@ class eEPGCache: public eMainloop, private eThread, public Object
 #ifdef ENABLE_FREESAT
                ePtr<eConnection> m_FreeSatScheduleOtherConn, m_FreeSatScheduleOtherConn2;
                ePtr<iDVBSectionReader> m_FreeSatScheduleOtherReader, m_FreeSatScheduleOtherReader2;
-               std::map<__u32, freesatEITSubtableStatus> m_FreeSatSubTableStatus;
-               __u32 m_FreesatTablesToComplete;
-               void readFreeSatScheduleOtherData(const __u8 *data);
+               std::map<uint32_t, freesatEITSubtableStatus> m_FreeSatSubTableStatus;
+               uint32_t m_FreesatTablesToComplete;
+               void readFreeSatScheduleOtherData(const uint8_t *data);
                void cleanupFreeSat();
 #endif
 #ifdef ENABLE_PRIVATE_EPG
@@ -224,36 +224,36 @@ class eEPGCache: public eMainloop, private eThread, public Object
                uniqueEPGKey m_PrivateService;
                ePtr<eConnection> m_PrivateConn;
                ePtr<iDVBSectionReader> m_PrivateReader;
-               std::set<__u8> seenPrivateSections;
-               void readPrivateData(const __u8 *data);
+               std::set<uint8_t> seenPrivateSections;
+               void readPrivateData(const uint8_t *data);
                void startPrivateReader();
 #endif
 #ifdef ENABLE_MHW_EPG
                std::vector<mhw_channel_name_t> m_channels;
-               std::map<__u8, mhw_theme_name_t> m_themes;
-               std::map<__u32, mhw_title_t> m_titles;
-               std::multimap<__u32, __u32> m_program_ids;
+               std::map<uint8_t, mhw_theme_name_t> m_themes;
+               std::map<uint32_t, mhw_title_t> m_titles;
+               std::multimap<uint32_t, uint32_t> m_program_ids;
                ePtr<eConnection> m_MHWConn, m_MHWConn2;
                ePtr<iDVBSectionReader> m_MHWReader, m_MHWReader2;
                eDVBSectionFilterMask m_MHWFilterMask, m_MHWFilterMask2;
                ePtr<eTimer> m_MHWTimeoutTimer;
-               __u16 m_mhw2_channel_pid, m_mhw2_title_pid, m_mhw2_summary_pid;
+               uint16_t m_mhw2_channel_pid, m_mhw2_title_pid, m_mhw2_summary_pid;
                bool m_MHWTimeoutet;
                void MHWTimeout() { m_MHWTimeoutet=true; }
-               void readMHWData(const __u8 *data);
-               void readMHWData2(const __u8 *data);
-               void startMHWReader(__u16 pid, __u8 tid);
-               void startMHWReader2(__u16 pid, __u8 tid, int ext=-1);
+               void readMHWData(const uint8_t *data);
+               void readMHWData2(const uint8_t *data);
+               void startMHWReader(uint16_t pid, uint8_t tid);
+               void startMHWReader2(uint16_t pid, uint8_t tid, int ext=-1);
                void startMHWTimeout(int msek);
                bool checkMHWTimeout() { return m_MHWTimeoutet; }
                void cleanupMHW();
-               __u8 *delimitName( __u8 *in, __u8 *out, int len_in );
+               uint8_t *delimitName( uint8_t *in, uint8_t *out, int len_in );
                void timeMHW2DVB( u_char hours, u_char minutes, u_char *return_time);
                void timeMHW2DVB( int minutes, u_char *return_time);
                void timeMHW2DVB( u_char day, u_char hours, u_char minutes, u_char *return_time);
-               void storeMHWTitle(std::map<__u32, mhw_title_t>::iterator itTitle, std::string sumText, const __u8 *data);
+               void storeMHWTitle(std::map<uint32_t, mhw_title_t>::iterator itTitle, std::string sumText, const uint8_t *data);
 #endif
-               void readData(const __u8 *data, int source);
+               void readData(const uint8_t *data, int source);
                void startChannel();
                void startEPG();
                bool finishEPG();
@@ -325,9 +325,9 @@ private:
        void thread();  // thread function
 
 #ifdef ENABLE_PRIVATE_EPG
-       void privateSectionRead(const uniqueEPGKey &, const __u8 *);
+       void privateSectionRead(const uniqueEPGKey &, const uint8_t *);
 #endif
-       void sectionRead(const __u8 *data, int source, channel_data *channel);
+       void sectionRead(const uint8_t *data, int source, channel_data *channel);
        void gotMessage(const Message &message);
        void flushEPG(const uniqueEPGKey & s=uniqueEPGKey());
        void cleanLoop();
index 38fb05a..09f237c 100644 (file)
@@ -1,7 +1,7 @@
 #include <lib/dvb/esection.h>
 #include <lib/base/eerror.h>
 
-void eGTable::sectionRead(const __u8 *d)
+void eGTable::sectionRead(const uint8_t *d)
 {
        unsigned int last_section_number = d[7];
        m_table.flags &= ~eDVBTableSpec::tfAnyVersion;
index c849003..f1e2520 100644 (file)
@@ -17,12 +17,12 @@ class eGTable: public iObject, public Object
 
        ePtr<eTimer> m_timeout;
 
-       void sectionRead(const __u8 *data);
+       void sectionRead(const uint8_t *data);
        void timeout();
        ePtr<eConnection> m_sectionRead_conn;
 protected:
        static const bool m_debug = false;
-       virtual int createTable(unsigned int nr, const __u8 *data, unsigned int max)=0;
+       virtual int createTable(unsigned int nr, const uint8_t *data, unsigned int max)=0;
        virtual unsigned int totalSections(unsigned int max) { return max + 1; }
 public:
        Signal1<void, int> tableReady;
@@ -42,7 +42,7 @@ private:
        std::vector<Section*> sections;
        std::set<int> avail;
 protected:
-       int createTable(unsigned int nr, const __u8 *data, unsigned int max)
+       int createTable(unsigned int nr, const uint8_t *data, unsigned int max)
        {
                unsigned int ssize = sections.size();
                if (max < ssize || nr >= max)
index 33af4ba..1d6d36c 100644 (file)
@@ -190,7 +190,7 @@ class eFastScanTable : public eTable<Section>
 {
        std::set<int> seen;
 public:
-       int createTable(unsigned int nr, const __u8 *data, unsigned int max)
+       int createTable(unsigned int nr, const uint8_t *data, unsigned int max)
        {
                seen.insert(nr);
                tableProgress(seen.size(), max);
index a36e05d..435c035 100644 (file)
@@ -9,7 +9,7 @@ public:
        virtual RESULT setBufferSize(int size)=0;
        virtual RESULT start(const eDVBSectionFilterMask &mask)=0;
        virtual RESULT stop()=0;
-       virtual RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn)=0;
+       virtual RESULT connectRead(const Slot1<void,const uint8_t*> &read, ePtr<eConnection> &conn)=0;
        virtual ~iDVBSectionReader() { };
 };
 
@@ -19,7 +19,7 @@ public:
        virtual RESULT setBufferSize(int size)=0;
        virtual RESULT start(int pid)=0;
        virtual RESULT stop()=0;
-       virtual RESULT connectRead(const Slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn)=0;
+       virtual RESULT connectRead(const Slot2<void,const uint8_t*, int> &read, ePtr<eConnection> &conn)=0;
        virtual ~iDVBPESReader() { };
 };
 
index 7c40f3b..dcb64c6 100644 (file)
@@ -23,8 +23,9 @@ struct eDVBSectionFilterMask
 {
        int pid;
                /* mode is 0 for positive, 1 for negative filtering */
-       __u8 data[DMX_FILTER_SIZE], mask[DMX_FILTER_SIZE], mode[DMX_FILTER_SIZE];
-       enum {
+       uint8_t data[DMX_FILTER_SIZE], mask[DMX_FILTER_SIZE], mode[DMX_FILTER_SIZE];
+       enum
+       {
                rfCRC=1,
                rfNoAbort=2
        };
@@ -38,20 +39,20 @@ struct eDVBTableSpec
        int timeout;        /* timeout in ms */
        enum
        {
-               tfInOrder=1,
+               tfInOrder               = 1,
                /*
                        tfAnyVersion      filter ANY version
                        0                 filter all EXCEPT given version (negative filtering)
                        tfThisVersion     filter only THIS version
                */
-               tfAnyVersion=2,
-               tfThisVersion=4,
-               tfHaveTID=8,
-               tfHaveTIDExt=16,
-               tfCheckCRC=32,
-               tfHaveTimeout=64,
-               tfHaveTIDMask=128,
-               tfHaveTIDExtMask=256
+               tfAnyVersion    = 2,
+               tfThisVersion   = 4,
+               tfHaveTID               = 8,
+               tfHaveTIDExt    = 16,
+               tfCheckCRC              = 32,
+               tfHaveTimeout   = 64,
+               tfHaveTIDMask   = 128,
+               tfHaveTIDExtMask= 256
        };
        int flags;
 };
@@ -70,15 +71,15 @@ struct eBouquet
        RESULT setListName(const std::string &name);
 };
 
-               /* these structures have by intention no operator int() defined.
-                  the reason of these structures is to avoid mixing for example
-                  a onid and a tsid (as there's no general order for them).
+/* these structures have by intention no operator int() defined.
+       the reason of these structures is to avoid mixing for example
+       a onid and a tsid (as there's no general order for them).
 
-                  defining an operator int() would implicitely convert values
-                  between them over the constructor with the int argument.
+       defining an operator int() would implicitely convert values
+       between them over the constructor with the int argument.
 
-                  'explicit' doesn't here - eTransportStreamID(eOriginalNetworkID(n))
-                  would still work. */
+       'explicit' doesn't here - eTransportStreamID(eOriginalNetworkID(n))
+       would still work. */
 
 struct eTransportStreamID
 {
@@ -177,13 +178,21 @@ struct eDVBChannelID
        }
 };
 
-struct eServiceReferenceDVB: public eServiceReference
+class eServiceReferenceDVB: public eServiceReference
 {
-       int getServiceType() const { return data[0]; }
-       void setServiceType(int service_type) { data[0]=service_type; }
+public:
+       enum service_ref
+       {
+               ref_service_type= 0,
+               ref_service_id  = 1,
+
+       };
+
+       int getServiceType() const { return data[ref_service_type]; }
+       void setServiceType(int service_type) { data[ref_service_type]=service_type; }
 
-       eServiceID getServiceID() const { return eServiceID(data[1]); }
-       void setServiceID(eServiceID service_id) { data[1]=service_id.get(); }
+       eServiceID getServiceID() const { return eServiceID(data[ref_service_id]); }
+       void setServiceID(eServiceID service_id) { data[ref_service_id]=service_id.get(); }
 
        eTransportStreamID getTransportStreamID() const { return eTransportStreamID(data[2]); }
        void setTransportStreamID(eTransportStreamID transport_stream_id) { data[2]=transport_stream_id.get(); }
@@ -420,7 +429,7 @@ class eDVBDiseqcCommand
 public:
 #endif
        int len;
-       __u8 data[MAX_DISEQC_LENGTH];
+       uint8_t data[MAX_DISEQC_LENGTH];
 #ifdef SWIG
 public:
 #endif
index 2b48a6b..7105b4f 100644 (file)
@@ -8,7 +8,7 @@ class iDVBSectionReader: public iObject
 public:
        virtual RESULT start(const eDVBSectionFilterMask &mask)=0;
        virtual RESULT stop()=0;
-       virtual RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn)=0;
+       virtual RESULT connectRead(const Slot1<void,const uint8_t*> &read, ePtr<eConnection> &conn)=0;
        virtual ~iDVBSectionReader() { };
 };
 
index d880d0c..20c812b 100644 (file)
@@ -18,7 +18,7 @@ void ePESParser::setStreamID(unsigned char id, unsigned char id_mask)
        m_stream_id_mask = id_mask;
 }
 
-void ePESParser::processData(const __u8 *p, int len)
+void ePESParser::processData(const uint8_t *p, int len)
 {
                /* this is a state machine, handling arbitary amounts of pes-formatted data. */
        while (len)
index 8bc84b0..d794e5b 100644 (file)
@@ -8,8 +8,8 @@ class ePESParser
 public:
        ePESParser();
        void setStreamID(unsigned char id, unsigned char id_mask=0xff);
-       void processData(const __u8 *data, int len);
-       virtual void processPESPacket(__u8 *pkt, int len) = 0;
+       void processData(const uint8_t *data, int len);
+       virtual void processPESPacket(uint8_t *pkt, int len) = 0;
        virtual ~ePESParser() { }
 private:
        unsigned char m_pes_buffer[65536+6];  // max pes packetlength + pes header
index 5cdb4c4..d8e693c 100644 (file)
@@ -139,7 +139,7 @@ void eDVBRdsDecoder::removeFromPictureMask(int id)
        }
 }
 
-void eDVBRdsDecoder::processPESPacket(__u8 *data, int len)
+void eDVBRdsDecoder::processPESPacket(uint8_t *data, int len)
 {
        int pos=9+data[8];// skip pes header
 
@@ -316,7 +316,7 @@ void eDVBRdsDecoder::process_qdar(unsigned char *buf)
        }
 }
 
-void eDVBRdsDecoder::gotAncillaryData(const __u8 *buf, int len)
+void eDVBRdsDecoder::gotAncillaryData(const uint8_t *buf, int len)
 {
        if (len <= 0)
                return;
index 7a73eea..59e794d 100644 (file)
@@ -34,8 +34,8 @@ public:
        int getPid() { return m_pid; }
 private:
        void abortNonAvail();
-       void processPESPacket(__u8 *pkt, int len);
-       void gotAncillaryData(const __u8 *data, int len);
+       void processPESPacket(uint8_t *pkt, int len);
+       void gotAncillaryData(const uint8_t *data, int len);
        void process_qdar(unsigned char*);
        ePtr<iDVBPESReader> m_pes_reader;
        ePtr<eConnection> m_read_connection;
index fbd626e..5f7caf6 100644 (file)
@@ -153,14 +153,14 @@ public:
        enum t_diseqc_mode { NONE=0, V1_0=1, V1_1=2, V1_2=3, SMATV=4 }; // DiSEqC Mode
        enum t_toneburst_param { NO=0, A=1, B=2 };
 #ifndef SWIG
-       __u8 m_committed_cmd;
+       uint8_t m_committed_cmd;
        t_diseqc_mode m_diseqc_mode;
        t_toneburst_param m_toneburst_param;
 
-       __u8 m_repeats; // for cascaded switches
+       uint8_t m_repeats;      // for cascaded switches
        bool m_use_fast;        // send no DiSEqC on H/V or Lo/Hi change
        bool m_seq_repeat;      // send the complete DiSEqC Sequence twice...
-       __u8 m_command_order;
+       uint8_t m_command_order;
        /*      diseqc 1.0)
                        0) commited, toneburst
                        1) toneburst, committed
@@ -169,7 +169,7 @@ public:
                        3) toneburst, committed, uncommitted
                        4) uncommitted, committed, toneburst
                        5) toneburst, uncommitted, committed */
-       __u8 m_uncommitted_cmd; // state of the 4 uncommitted switches..
+       uint8_t m_uncommitted_cmd;      // state of the 4 uncommitted switches..
 #endif
 };
 
@@ -185,7 +185,7 @@ public:
 #ifndef SWIG
        t_voltage_mode m_voltage_mode;
        t_22khz_signal m_22khz_signal;
-       __u8 m_rotorPosNum; // 0 is disable.. then use gotoxx
+       uint8_t m_rotorPosNum; // 0 is disable.. then use gotoxx
 #endif
 };
 
@@ -204,15 +204,15 @@ public:
        struct eDVBSatelliteRotorInputpowerParameters
        {
                bool m_use;     // can we use rotor inputpower to detect rotor running state ?
-               __u8 m_delta;   // delta between running and stopped rotor
+               uint8_t m_delta;        // delta between running and stopped rotor
                unsigned int m_turning_speed; // SLOW, FAST, or fast turning epoch
        };
        eDVBSatelliteRotorInputpowerParameters m_inputpower_parameters;
 
        struct eDVBSatelliteRotorGotoxxParameters
        {
-               __u8 m_lo_direction;    // EAST, WEST
-               __u8 m_la_direction;    // NORT, SOUTH
+               uint8_t m_lo_direction; // EAST, WEST
+               uint8_t m_la_direction; // NORT, SOUTH
                double m_longitude;     // longitude for gotoXX? function
                double m_latitude;      // latitude for gotoXX? function
        };
index 5f55034..eef39fb 100644 (file)
@@ -14,7 +14,7 @@
 
 void bitstream_init(bitstream *bit, const void *buffer, int size)
 {
-       bit->data = (__u8*) buffer;
+       bit->data = (uint8_t*) buffer;
        bit->size = size;
        bit->avail = 8;
        bit->consumed = 0;
@@ -34,7 +34,7 @@ int bitstream_get(bitstream *bit)
        return val;
 }
 
-static int extract_pts(pts_t &pts, __u8 *pkt)
+static int extract_pts(pts_t &pts, uint8_t *pkt)
 {
        if (pkt[7] & 0x80) /* PTS present? */
        {
@@ -49,7 +49,7 @@ static int extract_pts(pts_t &pts, __u8 *pkt)
                return -1;
 }
 
-void eDVBSubtitleParser::subtitle_process_line(subtitle_region *region, subtitle_region_object *object, int line, __u8 *data, int len)
+void eDVBSubtitleParser::subtitle_process_line(subtitle_region *region, subtitle_region_object *object, int line, uint8_t *data, int len)
 {
        bool subcentered = eConfigManager::getConfigBoolValue("config.subtitles.dvb_subtitles_centered");
        int x = subcentered ? (region->width - len) /2 : object->object_horizontal_position;
@@ -77,17 +77,17 @@ void eDVBSubtitleParser::subtitle_process_line(subtitle_region *region, subtitle
        }
 //     eDebug("inserting %d bytes (into region %d)", len, region->region_id);
 //     eDebug("put data to buffer %p", &(*region->buffer));
-       memcpy((__u8*)region->buffer->surface->data + region->buffer->surface->stride * y + x, data, len);
+       memcpy((uint8_t*)region->buffer->surface->data + region->buffer->surface->stride * y + x, data, len);
 }
 
 static int map_2_to_4_bit_table[4];
 static int map_2_to_8_bit_table[4];
 static int map_4_to_8_bit_table[16];
 
-int eDVBSubtitleParser::subtitle_process_pixel_data(subtitle_region *region, subtitle_region_object *object, int *linenr, int *linep, __u8 *data)
+int eDVBSubtitleParser::subtitle_process_pixel_data(subtitle_region *region, subtitle_region_object *object, int *linenr, int *linep, uint8_t *data)
 {
        int data_type = *data++;
-       static __u8 line[1920];
+       static uint8_t line[1920];
 
        bitstream bit;
        bit.size=0;
@@ -290,7 +290,7 @@ int eDVBSubtitleParser::subtitle_process_pixel_data(subtitle_region *region, sub
        return 0;
 }
 
-int eDVBSubtitleParser::subtitle_process_segment(__u8 *segment)
+int eDVBSubtitleParser::subtitle_process_segment(uint8_t *segment)
 {
        int segment_type, page_id, segment_length, processed_length;
        if (*segment++ !=  0x0F)
@@ -849,7 +849,7 @@ int eDVBSubtitleParser::subtitle_process_segment(__u8 *segment)
        return segment_length + 6;
 }
 
-void eDVBSubtitleParser::subtitle_process_pes(__u8 *pkt, int len)
+void eDVBSubtitleParser::subtitle_process_pes(uint8_t *pkt, int len)
 {
 //     eDebugNoNewLine("subtitle_process_pes");
        if (!extract_pts(m_show_time, pkt))
index c7a7e96..6d9726e 100644 (file)
@@ -1,17 +1,16 @@
 #ifndef __lib_dvb_subtitle_h
 #define __lib_dvb_subtitle_h
 
+#include <stdint.h>
 #include <lib/base/object.h>
 #include <lib/dvb/idvb.h>
 #include <lib/dvb/pesparse.h>
 #include <lib/gdi/gpixmap.h>
 
-typedef unsigned char __u8;
-
 struct subtitle_clut_entry
 {
-       __u8 Y, Cr, Cb, T;
-       __u8 valid;
+       uint8_t Y, Cr, Cb, T;
+       uint8_t valid;
 };
 
 struct subtitle_clut
@@ -84,7 +83,7 @@ struct subtitle_page
 
 struct bitstream
 {
-       __u8 *data;
+       uint8_t *data;
        int size;
        int avail;
        int consumed;
@@ -128,14 +127,14 @@ public:
        int stop();
        void connectNewPage(const Slot1<void, const eDVBSubtitlePage&> &slot, ePtr<eConnection> &connection);
 private:
-       void subtitle_process_line(subtitle_region *region, subtitle_region_object *object, int line, __u8 *data, int len);
-       int subtitle_process_pixel_data(subtitle_region *region, subtitle_region_object *object, int *linenr, int *linep, __u8 *data);
-       int subtitle_process_segment(__u8 *segment);
-       void subtitle_process_pes(__u8 *buffer, int len);
+       void subtitle_process_line(subtitle_region *region, subtitle_region_object *object, int line, uint8_t *data, int len);
+       int subtitle_process_pixel_data(subtitle_region *region, subtitle_region_object *object, int *linenr, int *linep, uint8_t *data);
+       int subtitle_process_segment(uint8_t *segment);
+       void subtitle_process_pes(uint8_t *buffer, int len);
        void subtitle_redraw_all();
        void subtitle_reset();
        void subtitle_redraw(int page_id);
-       void processPESPacket(__u8 *pkt, int len) { subtitle_process_pes(pkt, len); }
+       void processPESPacket(uint8_t *pkt, int len) { subtitle_process_pes(pkt, len); }
 };
 
 #endif
index 8176589..735efac 100644 (file)
@@ -256,7 +256,7 @@ char *get_bits(int val, int count)
        return buf;
 }
 
-void eDVBTeletextParser::processPESPacket(__u8 *pkt, int len)
+void eDVBTeletextParser::processPESPacket(uint8_t *pkt, int len)
 {
        unsigned char *p = pkt;
 
index ae1f5f5..aa5aacf 100644 (file)
@@ -49,7 +49,7 @@ public:
        std::set<eDVBServicePMTHandler::subtitleStream> m_found_subtitle_pages;
 private:
        std::map<int, unsigned int> m_modifications;
-       void processPESPacket(__u8 *pkt, int len);
+       void processPESPacket(uint8_t *pkt, int len);
 
        ePtr<iDVBPESReader> m_pes_reader;
        ePtr<eConnection> m_read_connection;
index abf5205..5d03872 100644 (file)
@@ -46,7 +46,7 @@ RESULT eTSFileSectionReader::stop()
        return 0;
 }
 
-RESULT eTSFileSectionReader::connectRead(const Slot1<void,const __u8*> &r, ePtr<eConnection> &conn)
+RESULT eTSFileSectionReader::connectRead(const Slot1<void,const uint8_t*> &r, ePtr<eConnection> &conn)
 {
        conn = new eConnection(this, read.connect(r));
        return 0;
index 0d3e127..bf91a6a 100644 (file)
@@ -20,7 +20,7 @@ class eTSFileSectionReader: public iDVBSectionReader, public Object
        DECLARE_REF(eTSFileSectionReader);
        unsigned char sectionData[4096];
        unsigned int sectionSize;
-       Signal1<void, const __u8*> read;
+       Signal1<void, const uint8_t*> read;
 
 public:
        eTSFileSectionReader(eMainloop *context);
@@ -29,7 +29,7 @@ public:
        RESULT setBufferSize(int size) { return 0; }
        RESULT start(const eDVBSectionFilterMask &mask);
        RESULT stop();
-       RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn);
+       RESULT connectRead(const Slot1<void,const uint8_t*> &read, ePtr<eConnection> &conn);
 };
 
 class eDVBTSTools : public eDVBPMTParser
index 9a4fd5e..daca87f 100644 (file)
@@ -992,7 +992,7 @@ void eDVBCISlot::data(int what)
        }
 
        if (what & eSocketNotifier::Read) {
-               __u8 data[4096];
+               uint8_t data[4096];
                int r;
                r = ::read(fd, data, 4096);
                if(r > 0) {
index 310f742..8431e95 100644 (file)
@@ -19,10 +19,10 @@ class eDVBCIInterfaces;
 
 struct queueData
 {
-       __u8 prio;
+       uint8_t prio;
        unsigned char *data;
        unsigned int len;
-       queueData( unsigned char *data, unsigned int len, __u8 prio = 0 )
+       queueData( unsigned char *data, unsigned int len, uint8_t prio = 0 )
                :prio(prio), data(data), len(len)
        {
 
index 49501e6..1caf520 100644 (file)
@@ -10,7 +10,7 @@
 #include <lib/gdi/fb.h>
 
 #ifndef FBIO_WAITFORVSYNC
-#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
+#define FBIO_WAITFORVSYNC _IOW('F', 0x20, uint32_t)
 #endif
 
 #ifndef FBIO_BLIT
index 92ad353..42dd37b 100644 (file)
@@ -11,7 +11,7 @@ class fbClass
        int available;
        struct fb_var_screeninfo screeninfo;
        fb_cmap cmap;
-       __u16 red[256], green[256], blue[256], trans[256];
+       uint16_t red[256], green[256], blue[256], trans[256];
        static fbClass *instance;
        int locked;
 
index 908f9be..6d5f55d 100644 (file)
@@ -175,27 +175,27 @@ void gPixmap::fill(const gRegion &region, const gColor &color)
                                memset(((__u8*)surface->data)+y*surface->stride+area.left(), color.color, area.width());
                } else if (surface->bpp == 16)
                {
-                       __u32 icol;
+                       uint32_t icol;
 
                        if (surface->clut.data && color < surface->clut.colors)
                                icol=surface->clut.data[color].argb();
                        else
                                icol=0x10101*color;
 #if BYTE_ORDER == LITTLE_ENDIAN
-                       __u16 col = bswap_16(((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19);
+                       uint16_t col = bswap_16(((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19);
 #else
-                       __u16 col = ((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19;
+                       uint16_t col = ((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19;
 #endif
                        for (int y=area.top(); y<area.bottom(); y++)
                        {
-                               __u16 *dst=(__u16*)(((__u8*)surface->data)+y*surface->stride+area.left()*surface->bypp);
+                               uint16_t *dst=(uint16_t*)(((uint8_t*)surface->data)+y*surface->stride+area.left()*surface->bypp);
                                int x=area.width();
                                while (x--)
                                        *dst++=col;
                        }
                } else if (surface->bpp == 32)
                {
-                       __u32 col;
+                       uint32_t col;
 
                        if (surface->clut.data && color < surface->clut.colors)
                                col = surface->clut.data[color].argb();
@@ -210,7 +210,7 @@ void gPixmap::fill(const gRegion &region, const gColor &color)
 
                        for (int y=area.top(); y<area.bottom(); y++)
                        {
-                               __u32 *dst=(__u32*)(((__u8*)surface->data)+y*surface->stride+area.left()*surface->bypp);
+                               uint32_t *dst=(uint32_t*)(((uint8_t*)surface->data)+y*surface->stride+area.left()*surface->bypp);
                                int x=area.width();
                                while (x--)
                                        *dst++=col;
@@ -231,7 +231,7 @@ void gPixmap::fill(const gRegion &region, const gRGB &color)
 
                if (surface->bpp == 32)
                {
-                       __u32 col;
+                       uint32_t col;
 
                        col = color.argb();
                        col^=0xFF000000;
@@ -250,7 +250,7 @@ void gPixmap::fill(const gRegion &region, const gRGB &color)
 
                        for (int y=area.top(); y<area.bottom(); y++)
                        {
-                               __u32 *dst=(__u32*)(((__u8*)surface->data)+y*surface->stride+area.left()*surface->bypp);
+                               uint32_t *dst=(uint32_t*)(((uint8_t*)surface->data)+y*surface->stride+area.left()*surface->bypp);
                                int x=area.width();
                                while (x--)
                                        *dst++=col;
@@ -261,15 +261,15 @@ void gPixmap::fill(const gRegion &region, const gRGB &color)
 #endif
                } else if (surface->bpp == 16)
                {
-                       __u32 icol = color.argb();
+                       uint32_t icol = color.argb();
 #if BYTE_ORDER == LITTLE_ENDIAN
-                       __u16 col = bswap_16(((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19);
+                       uint16_t col = bswap_16(((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19);
 #else
-                       __u16 col = ((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19;
+                       uint16_t col = ((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19;
 #endif
                        for (int y=area.top(); y<area.bottom(); y++)
                        {
-                               __u16 *dst=(__u16*)(((__u8*)surface->data)+y*surface->stride+area.left()*surface->bypp);
+                               uint16_t *dst=(uint16_t*)(((uint8_t*)surface->data)+y*surface->stride+area.left()*surface->bypp);
                                int x=area.width();
                                while (x--)
                                        *dst++=col;
@@ -279,13 +279,13 @@ void gPixmap::fill(const gRegion &region, const gRGB &color)
        }
 }
 
-static inline void blit_8i_to_32(__u32 *dst, const __u8 *src, const __u32 *pal, int width)
+static inline void blit_8i_to_32(uint32_t *dst, const uint8_t *src, const uint32_t *pal, int width)
 {
        while (width--)
                *dst++=pal[*src++];
 }
 
-static inline void blit_8i_to_32_at(__u32 *dst, const __u8 *src, const __u32 *pal, int width)
+static inline void blit_8i_to_32_at(uint32_t *dst, const uint8_t *src, const uint32_t *pal, int width)
 {
        while (width--)
        {
@@ -298,13 +298,13 @@ static inline void blit_8i_to_32_at(__u32 *dst, const __u8 *src, const __u32 *pa
        }
 }
 
-static inline void blit_8i_to_16(__u16 *dst, const __u8 *src, const __u32 *pal, int width)
+static inline void blit_8i_to_16(uint16_t *dst, const uint8_t *src, const uint32_t *pal, int width)
 {
        while (width--)
                *dst++=pal[*src++] & 0xFFFF;
 }
 
-static inline void blit_8i_to_16_at(__u16 *dst, const __u8 *src, const __u32 *pal, int width)
+static inline void blit_8i_to_16_at(uint16_t *dst, const uint8_t *src, const uint32_t *pal, int width)
 {
        while (width--)
        {
@@ -317,7 +317,7 @@ static inline void blit_8i_to_16_at(__u16 *dst, const __u8 *src, const __u32 *pa
        }
 }
 
-static void blit_8i_to_32_ab(gRGB *dst, const __u8 *src, const gRGB *pal, int width)
+static void blit_8i_to_32_ab(gRGB *dst, const uint8_t *src, const gRGB *pal, int width)
 {
        while (width--)
        {
@@ -326,7 +326,7 @@ static void blit_8i_to_32_ab(gRGB *dst, const __u8 *src, const gRGB *pal, int wi
        }
 }
 
-static void convert_palette(__u32* pal, const gPalette& clut)
+static void convert_palette(uint32_t* pal, const gPalette& clut)
 {
        int i = 0;
        if (clut.data)
@@ -454,9 +454,9 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                {
                        if ((surface->bpp == 32) && (src.surface->bpp==8))
                        {
-                               const __u8 *srcptr = (__u8*)src.surface->data;
-                               __u8 *dstptr=(__u8*)surface->data; // !!
-                               __u32 pal[256];
+                               const uint8_t *srcptr = (uint8_t*)src.surface->data;
+                               uint8_t *dstptr=(uint8_t*)surface->data; // !!
+                               uint32_t pal[256];
                                convert_palette(pal, src.surface->clut);
 
                                const int src_stride = src.surface->stride;
@@ -470,11 +470,11 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                                {
                                        for (int y = 0; y < height; ++y)
                                        {
-                                               const __u8 *src_row_ptr = srcptr + (((y * src_height) / height) * src_stride);
-                                               __u32 *dst = (__u32*)dstptr;
+                                               const uint8_t *src_row_ptr = srcptr + (((y * src_height) / height) * src_stride);
+                                               uint32_t *dst = (uint32_t*)dstptr;
                                                for (int x = 0; x < width; ++x)
                                                {
-                                                       __u32 pixel = pal[src_row_ptr[(x *src_width) / width]];
+                                                       uint32_t pixel = pal[src_row_ptr[(x *src_width) / width]];
                                                        if (pixel & 0x80000000)
                                                                *dst = pixel;
                                                        ++dst;
@@ -486,7 +486,7 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                                {
                                        for (int y = 0; y < height; ++y)
                                        {
-                                               const __u8 *src_row_ptr = srcptr + (((y * src_height) / height) * src_stride);
+                                               const uint8_t *src_row_ptr = srcptr + (((y * src_height) / height) * src_stride);
                                                gRGB *dst = (gRGB*)dstptr;
                                                for (int x = 0; x < width; ++x)
                                                {
@@ -500,8 +500,8 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                                {
                                        for (int y = 0; y < height; ++y)
                                        {
-                                               const __u8 *src_row_ptr = srcptr + (((y * src_height) / height) * src_stride);
-                                               __u32 *dst = (__u32*)dstptr;
+                                               const uint8_t *src_row_ptr = srcptr + (((y * src_height) / height) * src_stride);
+                                               uint32_t *dst = (uint32_t*)dstptr;
                                                for (int x = 0; x < width; ++x)
                                                {
                                                        *dst = pal[src_row_ptr[(x * src_width) / width]];
@@ -514,8 +514,8 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                        else if ((surface->bpp == 32) && (src.surface->bpp == 32))
                        {
                                const int src_stride = src.surface->stride;
-                               const __u8* srcptr = (const __u8*)src.surface->data + srcarea.left()*src.surface->bypp + srcarea.top()*src_stride;
-                               __u8* dstptr = (__u8*)surface->data + area.left()*surface->bypp + area.top()*surface->stride;
+                               const uint8_t* srcptr = (const uint8_t*)src.surface->data + srcarea.left()*src.surface->bypp + srcarea.top()*src_stride;
+                               uint8_t* dstptr = (uint8_t*)surface->data + area.left()*surface->bypp + area.top()*surface->stride;
                                const int width = area.width();
                                const int height = area.height();
                                const int src_height = srcarea.height();
@@ -524,11 +524,11 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                                {
                                        for (int y = 0; y < height; ++y)
                                        {
-                                               const __u32 *src_row_ptr = (__u32*)(srcptr + (((y * src_height) / height) * src_stride));
-                                               __u32 *dst = (__u32*)dstptr;
+                                               const uint32_t *src_row_ptr = (uint32_t*)(srcptr + (((y * src_height) / height) * src_stride));
+                                               uint32_t *dst = (uint32_t*)dstptr;
                                                for (int x = 0; x < width; ++x)
                                                {
-                                                       __u32 pixel = src_row_ptr[(x *src_width) / width];
+                                                       uint32_t pixel = src_row_ptr[(x *src_width) / width];
                                                        if (pixel & 0x80000000)
                                                                *dst = pixel;
                                                        ++dst;
@@ -554,8 +554,8 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                                {
                                        for (int y = 0; y < height; ++y)
                                        {
-                                               const __u32 *src_row_ptr = (__u32*)(srcptr + (((y * src_height) / height) * src_stride));
-                                               __u32 *dst = (__u32*)dstptr;
+                                               const uint32_t *src_row_ptr = (uint32_t*)(srcptr + (((y * src_height) / height) * src_stride));
+                                               uint32_t *dst = (uint32_t*)dstptr;
                                                for (int x = 0; x < width; ++x)
                                                {
                                                        *dst = src_row_ptr[(x * src_width) / width];
@@ -578,8 +578,8 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
 
                if ((surface->bpp == 8) && (src.surface->bpp == 8))
                {
-                       __u8 *srcptr=(__u8*)src.surface->data;
-                       __u8 *dstptr=(__u8*)surface->data;
+                       uint8_t *srcptr=(uint8_t*)src.surface->data;
+                       uint8_t *dstptr=(uint8_t*)surface->data;
 
                        srcptr+=srcarea.left()*src.surface->bypp+srcarea.top()*src.surface->stride;
                        dstptr+=area.left()*surface->bypp+area.top()*surface->stride;
@@ -621,8 +621,8 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                }
                else if ((surface->bpp == 32) && (src.surface->bpp==32))
                {
-                       __u32 *srcptr=(__u32*)src.surface->data;
-                       __u32 *dstptr=(__u32*)surface->data;
+                       uint32_t *srcptr=(uint32_t*)src.surface->data;
+                       uint32_t *dstptr=(uint32_t*)surface->data;
 
                        srcptr+=srcarea.left()+srcarea.top()*src.surface->stride/4;
                        dstptr+=area.left()+area.top()*surface->stride/4;
@@ -654,15 +654,15 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                                        }
                                } else
                                        memcpy(dstptr, srcptr, area.width()*surface->bypp);
-                               srcptr = (__u32*)((__u8*)srcptr + src.surface->stride);
-                               dstptr = (__u32*)((__u8*)dstptr + surface->stride);
+                               srcptr = (uint32_t*)((uint8_t*)srcptr + src.surface->stride);
+                               dstptr = (uint32_t*)((uint8_t*)dstptr + surface->stride);
                        }
                }
                else if ((surface->bpp == 32) && (src.surface->bpp==8))
                {
-                       const __u8 *srcptr = (__u8*)src.surface->data;
-                       __u8 *dstptr=(__u8*)surface->data; // !!
-                       __u32 pal[256];
+                       const uint8_t *srcptr = (uint8_t*)src.surface->data;
+                       uint8_t *dstptr=(uint8_t*)surface->data; // !!
+                       uint32_t pal[256];
                        convert_palette(pal, src.surface->clut);
 
                        srcptr+=srcarea.left()*src.surface->bypp+srcarea.top()*src.surface->stride;
@@ -671,24 +671,24 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                        for (int y = area.height(); y != 0; --y)
                        {
                                if (flag & blitAlphaTest)
-                                       blit_8i_to_32_at((__u32*)dstptr, srcptr, pal, width);
+                                       blit_8i_to_32_at((uint32_t*)dstptr, srcptr, pal, width);
                                else if (flag & blitAlphaBlend)
                                        blit_8i_to_32_ab((gRGB*)dstptr, srcptr, (const gRGB*)pal, width);
                                else
-                                       blit_8i_to_32((__u32*)dstptr, srcptr, pal, width);
+                                       blit_8i_to_32((uint32_t*)dstptr, srcptr, pal, width);
                                srcptr += src.surface->stride;
                                dstptr += surface->stride;
                        }
                }
                else if ((surface->bpp == 16) && (src.surface->bpp==8))
                {
-                       __u8 *srcptr=(__u8*)src.surface->data;
-                       __u8 *dstptr=(__u8*)surface->data; // !!
-                       __u32 pal[256];
+                       uint8_t *srcptr=(uint8_t*)src.surface->data;
+                       uint8_t *dstptr=(uint8_t*)surface->data; // !!
+                       uint32_t pal[256];
 
                        for (int i=0; i != 256; ++i)
                        {
-                               __u32 icol;
+                               uint32_t icol;
                                if (src.surface->clut.data && (i<src.surface->clut.colors))
                                        icol = src.surface->clut.data[i].argb();
                                else
@@ -711,7 +711,7 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                        {
                                int width=area.width();
                                unsigned char *psrc=(unsigned char*)srcptr;
-                               __u16 *dst=(__u16*)dstptr;
+                               uint16_t *dst=(uint16_t*)dstptr;
                                if (flag & blitAlphaTest)
                                        blit_8i_to_16_at(dst, psrc, pal, width);
                                else
@@ -722,8 +722,8 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                }
                else if ((surface->bpp == 16) && (src.surface->bpp==32))
                {
-                       __u8 *srcptr=(__u8*)src.surface->data;
-                       __u8 *dstptr=(__u8*)surface->data;
+                       uint8_t *srcptr=(uint8_t*)src.surface->data;
+                       uint8_t *dstptr=(uint8_t*)surface->data;
 
                        srcptr+=srcarea.left()+srcarea.top()*src.surface->stride;
                        dstptr+=area.left()+area.top()*surface->stride;
@@ -734,8 +734,8 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                        for (int y=0; y<area.height(); y++)
                        {
                                int width=area.width();
-                               __u32 *srcp=(__u32*)srcptr;
-                               __u16 *dstp=(__u16*)dstptr;
+                               uint32_t *srcp=(uint32_t*)srcptr;
+                               uint16_t *dstp=(uint16_t*)dstptr;
 
                                if (flag & blitAlphaTest)
                                {
@@ -747,7 +747,7 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                                                        dstp++;
                                                } else
                                                {
-                                                       __u32 icol = *srcp++;
+                                                       uint32_t icol = *srcp++;
 #if BYTE_ORDER == LITTLE_ENDIAN
                                                        *dstp++ = bswap_16(((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19);
 #else
@@ -759,7 +759,7 @@ void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
                                {
                                        while (width--)
                                        {
-                                               __u32 icol = *srcp++;
+                                               uint32_t icol = *srcp++;
 #if BYTE_ORDER == LITTLE_ENDIAN
                                                *dstp++ = bswap_16(((icol & 0xFF) >> 3) << 11 | ((icol & 0xFF00) >> 10) << 5 | (icol & 0xFF0000) >> 19);
 #else
@@ -797,7 +797,7 @@ void gPixmap::mergePalette(const gPixmap &target)
        surface->clut.data=new gRGB[surface->clut.colors];
        memcpy(surface->clut.data, target.surface->clut.data, sizeof(gRGB)*surface->clut.colors);
 
-       __u8 *dstptr=(__u8*)surface->data;
+       uint8_t *dstptr=(uint8_t*)surface->data;
 
        for (int ay=0; ay<surface->y; ay++)
        {
@@ -821,7 +821,7 @@ static inline int sgn(int a)
 
 void gPixmap::line(const gRegion &clip, ePoint start, ePoint dst, gColor color)
 {
-       __u32 col = color;
+       uint32_t col = color;
        if (surface->bpp != 8)
        {
                if (surface->clut.data && color < surface->clut.colors)
@@ -844,7 +844,7 @@ void gPixmap::line(const gRegion &clip, ePoint start, ePoint dst, gColor color)
 
 void gPixmap::line(const gRegion &clip, ePoint start, ePoint dst, gRGB color)
 {
-       __u32 col;
+       uint32_t col;
        col = color.argb();
        col^=0xFF000000;
        line(clip, start, dst, col);
@@ -855,22 +855,22 @@ void gPixmap::line(const gRegion &clip, ePoint start, ePoint dst, unsigned int c
        if (clip.rects.empty())
                return;
 
-       __u8 *srf8 = 0;
-       __u16 *srf16 = 0;
-       __u32 *srf32 = 0;
+       uint8_t *srf8 = 0;
+       uint16_t *srf16 = 0;
+       uint32_t *srf32 = 0;
        int stride = surface->stride;
 
        switch (surface->bpp)
        {
                case 8:
-                       srf8 = (__u8*)surface->data;
+                       srf8 = (uint8_t*)surface->data;
                        break;
                case 16:
-                       srf16 = (__u16*)surface->data;
+                       srf16 = (uint16_t*)surface->data;
                        stride /= 2;
                        break;
                case 32:
-                       srf32 = (__u32*)surface->data;
+                       srf32 = (uint32_t*)surface->data;
                        stride /= 4;
                        break;
        }
index c2787de..6044939 100644 (file)
@@ -32,7 +32,7 @@ public:
 #ifndef SWIG
        eLCD();
        virtual ~eLCD();
-       __u8 *buffer() { return (__u8*)_buffer; }
+       uint8_t *buffer() { return (uint8_t*)_buffer; }
        int stride() { return _stride; }
        eSize size() { return res; }
        virtual void update()=0;
index 8ca16c7..acbb839 100644 (file)
@@ -201,7 +201,7 @@ RESULT eServiceEvent::parseFrom(const std::string& filename, int tsidonid)
                int fd = ::open( filename.c_str(), O_RDONLY );
                if ( fd > -1 )
                {
-                       __u8 buf[4096];
+                       uint8_t buf[4096];
                        int rd = ::read(fd, buf, 4096);
                        ::close(fd);
                        if ( rd > 12 /*EIT_LOOP_SIZE*/ )