diff --git a/lib/libdvbsub/helpers.cpp b/lib/libdvbsub/helpers.cpp index bed1d1a86..8cd04b52a 100644 --- a/lib/libdvbsub/helpers.cpp +++ b/lib/libdvbsub/helpers.cpp @@ -23,7 +23,7 @@ uint32_t getbits(const uint8_t* buf, uint32_t offset, uint8_t len) len -= 8; } if (len > 8) { - unsigned long long tmp = retval << 8; + uint64_t tmp = retval << 8; tmp |= *(a+4); tmp >>= ((8-(offset%8)) + (8-(len))); return tmp & (mask -1); diff --git a/lib/sectionsdclient/sectionsdMsg.h b/lib/sectionsdclient/sectionsdMsg.h index e7123fb3d..e6327a58f 100644 --- a/lib/sectionsdclient/sectionsdMsg.h +++ b/lib/sectionsdclient/sectionsdMsg.h @@ -111,9 +111,9 @@ struct sectionsd struct commandGetEPGid { - unsigned long long eventid; + uint64_t eventid; time_t starttime; - } __attribute__ ((packed)) ; + } __attribute__ ((packed)) ; struct commandSetServiceChanged { @@ -327,19 +327,19 @@ struct sectionsd // none // data of response: // success status (sizeof(bool)) -// +// // SaveLanguages // data of request: // none // data of response: // success status (sizeof(bool)) -// +// // SetLanguages // data of request: // n * 3 bytes (iso_639_2 language codes) // data of response: // success status (sizeof(bool)) -// +// // GetLanguages // data of request: // none diff --git a/lib/sectionsdclient/sectionsdclient.h b/lib/sectionsdclient/sectionsdclient.h index 2f1ed8390..9e48da5e9 100644 --- a/lib/sectionsdclient/sectionsdclient.h +++ b/lib/sectionsdclient/sectionsdclient.h @@ -88,7 +88,7 @@ class CSectionsdClient : private CBasicClient EVT_BOUQUETS_UPDATE, EVT_WRITE_SI_FINISHED }; - + struct epgflags { enum { @@ -101,7 +101,7 @@ class CSectionsdClient : private CBasicClient current_has_linkagedescriptors= 0x40 }; }; - + struct responseGetComponentTags { std::string component; // Text aus dem Component Descriptor @@ -150,7 +150,7 @@ class CSectionsdClient : private CBasicClient struct CurrentNextInfo : public responseGetCurrentNextInfoChannelID {}; - typedef struct + typedef struct { int scanMode; int epg_cache; @@ -174,7 +174,7 @@ class CSectionsdClient : private CBasicClient bool getIsTimeSet(); // void setEventsAreOldInMinutes(const unsigned short minutes); - + void setPauseScanning(const bool doPause); bool getIsScanningActive(); @@ -198,11 +198,11 @@ class CSectionsdClient : private CBasicClient void setPrivatePid(const unsigned short pid); // void setSectionsdScanMode(const int scanMode); - + void freeMemory(); - + void readSIfromXML(const char * epgxmlname); - + void writeSI2XML(const char * epgxmlname); /* @@ -217,13 +217,13 @@ class CSectionsdClient : private CBasicClient void setConfig(const epg_config config); void dumpStatus(void); - + }; class CEPGData { public: - unsigned long long eventID; + uint64_t eventID; CSectionsdClient::sectionsdTime epg_times; std::string title; std::string info1; diff --git a/lib/timerdclient/timerdclient.h b/lib/timerdclient/timerdclient.h index eb7b23af9..6b763c7c5 100644 --- a/lib/timerdclient/timerdclient.h +++ b/lib/timerdclient/timerdclient.h @@ -69,7 +69,7 @@ class CTimerdClient:private CBasicClient int addTimerEvent( CTimerd::CTimerEventTypes evType, void* data, time_t alarmtime,time_t announcetime = 0, time_t stoptime = 0, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 0, bool forceadd=true); - + void removeTimerEvent( int evId); // remove timer event void stopTimerEvent( int evId); // set timer state to stoped (rescedule on demand) @@ -86,7 +86,7 @@ class CTimerdClient:private CBasicClient void modifyTimerAPid(int eventid, unsigned char apids); // set existing sleeptimer to new times or create new sleeptimer with these times - int setSleeptimer(time_t announcetime, time_t alarmtime, int timerid = 0); + int setSleeptimer(time_t announcetime, time_t alarmtime, int timerid = 0); // returns the id of sleeptimer, 0 of no sleeptimer exists int getSleeptimerID(); @@ -109,9 +109,9 @@ class CTimerdClient:private CBasicClient {return addTimerEvent(CTimerd::TIMER_SHUTDOWN, NULL, announcetime, alarmtime, stoptime);}; // adds new record timer event - int addRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime, - unsigned long long epgID=0, time_t epg_starttime=0, time_t announcetime = 0, - unsigned char apids=TIMERD_APIDS_STD, bool safety=false,std::string recDir="", bool forceAdd=true) + int addRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime, + uint64_t epgID=0, time_t epg_starttime=0, time_t announcetime = 0, + unsigned char apids=TIMERD_APIDS_STD, bool safety=false,std::string recDir="", bool forceAdd=true) { CTimerd::RecordingInfo eventInfo; eventInfo.channel_id = channel_id; @@ -122,9 +122,9 @@ class CTimerdClient:private CBasicClient strncpy(eventInfo.recordingDir, recDir.c_str(), RECORD_DIR_MAXLEN); return addTimerEvent(CTimerd::TIMER_RECORD, &eventInfo, announcetime, alarmtime, stoptime,CTimerd::TIMERREPEAT_ONCE, 0,forceAdd); }; - - int addImmediateRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime, - unsigned long long epgID=0, time_t epg_starttime=0,unsigned char apids=TIMERD_APIDS_STD) + + int addImmediateRecordTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t stoptime, + uint64_t epgID=0, time_t epg_starttime=0,unsigned char apids=TIMERD_APIDS_STD) { CTimerd::EventInfo eventInfo; eventInfo.channel_id = channel_id; @@ -136,13 +136,13 @@ class CTimerdClient:private CBasicClient }; // adds new standby timer event - int addStandbyTimerEvent(bool standby_on,time_t alarmtime, time_t announcetime = 0, time_t stoptime = 0) + int addStandbyTimerEvent(bool standby_on,time_t alarmtime, time_t announcetime = 0, time_t stoptime = 0) {return addTimerEvent(CTimerd::TIMER_STANDBY, &standby_on, announcetime, alarmtime, stoptime);}; // adds new zapto timer event - int addZaptoTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t announcetime = 0, - time_t stoptime = 0, unsigned long long epgID=0, time_t epg_starttime=0, - unsigned char apids=TIMERD_APIDS_STD) + int addZaptoTimerEvent(const t_channel_id channel_id, time_t alarmtime, time_t announcetime = 0, + time_t stoptime = 0, uint64_t epgID=0, time_t epg_starttime=0, + unsigned char apids=TIMERD_APIDS_STD) { CTimerd::EventInfo eventInfo; eventInfo.channel_id = channel_id; diff --git a/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp index 10bd14829..fb8fc1190 100644 --- a/src/daemonc/remotecontrol.cpp +++ b/src/daemonc/remotecontrol.cpp @@ -117,7 +117,7 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data g_Zapit->zapTo_serviceID_NOWAIT(current_channel_id ); g_Sectionsd->setServiceChanged(current_channel_id &0xFFFFFFFFFFFFULL, false); - zap_completion_timeout = getcurrenttime() + 2 * (long long) 1000000; + zap_completion_timeout = getcurrenttime() + 2 * (int64_t) 1000000; return messages_return::handled; } @@ -384,7 +384,7 @@ void CRemoteControl::getNVODs() NVODs[i].original_network_id, NVODs[i].service_id, NVODs[i].transport_stream_id, - NVODs[i].zeit.startzeit, + NVODs[i].zeit.startzeit, NVODs[i].zeit.dauer); CSubServiceListSorted::iterator e= subChannels.begin(); @@ -629,7 +629,7 @@ void CRemoteControl::zapTo_ChannelID(const t_channel_id channel_id, const std::s needs_nvods = false; director_mode = 0; - unsigned long long now = getcurrenttime(); + uint64_t now = getcurrenttime(); if ( zap_completion_timeout < now ) { g_InfoViewer->chanready = 0; @@ -647,7 +647,7 @@ void CRemoteControl::zapTo_ChannelID(const t_channel_id channel_id, const std::s g_Sectionsd->setServiceChanged( current_channel_id&0xFFFFFFFFFFFFULL, false ); abort_zapit = 0; - zap_completion_timeout = now + 2 * (long long) 1000000; + zap_completion_timeout = now + 2 * (int64_t) 1000000; if ( current_programm_timer != 0 ) { g_RCInput->killTimer( current_programm_timer ); diff --git a/src/daemonc/remotecontrol.h b/src/daemonc/remotecontrol.h index 192985fa8..62ec5a668 100644 --- a/src/daemonc/remotecontrol.h +++ b/src/daemonc/remotecontrol.h @@ -71,7 +71,7 @@ typedef std::vector CSubServiceListSorted; class CRemoteControl { unsigned int current_programm_timer; - unsigned long long zap_completion_timeout; + uint64_t zap_completion_timeout; std::string current_channel_name; t_channel_id current_sub_channel_id; @@ -81,8 +81,8 @@ class CRemoteControl public: t_channel_id current_channel_id; - unsigned long long current_EPGid; - unsigned long long next_EPGid; + uint64_t current_EPGid; + uint64_t next_EPGid; CZapitClient::responseGetPIDs current_PIDs; // APID - Details diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 7e21e8f47..82ac7cce8 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -288,7 +288,7 @@ int CRCInput::messageLoop( bool anyKeyCancels, int timeout ) if ( timeout == -1 ) timeout = g_settings.timing[SNeutrinoSettings::TIMING_MENU]; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd( timeout == 0 ? 0xFFFF : timeout); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout == 0 ? 0xFFFF : timeout); while (doLoop) { @@ -328,12 +328,12 @@ int CRCInput::messageLoop( bool anyKeyCancels, int timeout ) } -int CRCInput::addTimer(unsigned long long Interval, bool oneshot, bool correct_time ) +int CRCInput::addTimer(uint64_t Interval, bool oneshot, bool correct_time ) { struct timeval tv; gettimeofday( &tv, NULL ); - unsigned long long timeNow = (unsigned long long) tv.tv_usec + (unsigned long long)((unsigned long long) tv.tv_sec * (unsigned long long) 1000000); + uint64_t timeNow = (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000); timer _newtimer; if (!oneshot) @@ -362,13 +362,13 @@ int CRCInput::addTimer(unsigned long long Interval, bool oneshot, bool correct_t int CRCInput::addTimer(struct timeval Timeout) { - unsigned long long timesout = (unsigned long long) Timeout.tv_usec + (unsigned long long)((unsigned long long) Timeout.tv_sec * (unsigned long long) 1000000); + uint64_t timesout = (uint64_t) Timeout.tv_usec + (uint64_t)((uint64_t) Timeout.tv_sec * (uint64_t) 1000000); return addTimer( timesout, true, false ); } int CRCInput::addTimer(const time_t *Timeout) { - return addTimer( (unsigned long long)*Timeout* (unsigned long long) 1000000, true, false ); + return addTimer( (uint64_t)*Timeout* (uint64_t) 1000000, true, false ); } void CRCInput::killTimer(uint32_t id) @@ -389,7 +389,7 @@ int CRCInput::checkTimers() int _id = 0; gettimeofday( &tv, NULL ); - unsigned long long timeNow = (unsigned long long) tv.tv_usec + (unsigned long long)((unsigned long long) tv.tv_sec * (unsigned long long) 1000000); + uint64_t timeNow = (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000); std::vector::iterator e; @@ -429,35 +429,35 @@ int CRCInput::checkTimers() -long long CRCInput::calcTimeoutEnd(const int timeout_in_seconds) +int64_t CRCInput::calcTimeoutEnd(const int timeout_in_seconds) { struct timeval tv; gettimeofday(&tv, NULL); - return (unsigned long long) tv.tv_usec + (unsigned long long)((unsigned long long) tv.tv_sec + (unsigned long long)timeout_in_seconds) * (unsigned long long) 1000000; + return (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec + (uint64_t)timeout_in_seconds) * (uint64_t) 1000000; } -long long CRCInput::calcTimeoutEnd_MS(const int timeout_in_milliseconds) +int64_t CRCInput::calcTimeoutEnd_MS(const int timeout_in_milliseconds) { struct timeval tv; gettimeofday(&tv, NULL); - unsigned long long timeNow = (unsigned long long) tv.tv_usec + (unsigned long long)((unsigned long long) tv.tv_sec * (unsigned long long) 1000000); + uint64_t timeNow = (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000); return ( timeNow + timeout_in_milliseconds * 1000 ); } -void CRCInput::getMsgAbsoluteTimeout(neutrino_msg_t * msg, neutrino_msg_data_t * data, unsigned long long *TimeoutEnd, bool bAllowRepeatLR) +void CRCInput::getMsgAbsoluteTimeout(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint64_t *TimeoutEnd, bool bAllowRepeatLR) { struct timeval tv; gettimeofday( &tv, NULL ); - unsigned long long timeNow = (unsigned long long) tv.tv_usec + (unsigned long long)((unsigned long long) tv.tv_sec * (unsigned long long) 1000000); + uint64_t timeNow = (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000); - unsigned long long diff; + uint64_t diff; if ( *TimeoutEnd < timeNow+ 100 ) diff = 100; // Minimum Differenz... @@ -469,35 +469,35 @@ void CRCInput::getMsgAbsoluteTimeout(neutrino_msg_t * msg, neutrino_msg_data_t * if ( *msg == NeutrinoMessages::EVT_TIMESET ) { // recalculate timeout.... - //unsigned long long ta= *TimeoutEnd; - *TimeoutEnd= *TimeoutEnd + *(long long*) *data; + //uint64_t ta= *TimeoutEnd; + *TimeoutEnd= *TimeoutEnd + *(int64_t*) *data; - //printf("[getMsgAbsoluteTimeout]: EVT_TIMESET - recalculate timeout\n%llx/%llx - %llx/%llx\n", timeNow, *(long long*) *data, *TimeoutEnd, ta ); + //printf("[getMsgAbsoluteTimeout]: EVT_TIMESET - recalculate timeout\n%llx/%llx - %llx/%llx\n", timeNow, *(int64_t*) *data, *TimeoutEnd, ta ); } } void CRCInput::getMsg(neutrino_msg_t * msg, neutrino_msg_data_t * data, int Timeout, bool bAllowRepeatLR) { - getMsg_us(msg, data, (unsigned long long) Timeout * 100 * 1000, bAllowRepeatLR); + getMsg_us(msg, data, (uint64_t) Timeout * 100 * 1000, bAllowRepeatLR); } void CRCInput::getMsg_ms(neutrino_msg_t * msg, neutrino_msg_data_t * data, int Timeout, bool bAllowRepeatLR) { - getMsg_us(msg, data, (unsigned long long) Timeout * 1000, bAllowRepeatLR); + getMsg_us(msg, data, (uint64_t) Timeout * 1000, bAllowRepeatLR); } #define ENABLE_REPEAT_CHECK -void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, unsigned long long Timeout, bool bAllowRepeatLR) +void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint64_t Timeout, bool bAllowRepeatLR) { - static unsigned long long last_keypress = 0ULL; - unsigned long long getKeyBegin; + static uint64_t last_keypress = 0ULL; + uint64_t getKeyBegin; //static __u16 rc_last_key = KEY_MAX; static __u16 rc_last_repeat_key = KEY_MAX; struct timeval tv, tvselect; - unsigned long long InitialTimeout = Timeout; - long long targetTimeout; + uint64_t InitialTimeout = Timeout; + int64_t targetTimeout; int timer_id; fd_set rfds; @@ -507,14 +507,14 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, unsig // wiederholung reinmachen - dass wirklich die ganze zeit bis timeout gewartet wird! gettimeofday( &tv, NULL ); - getKeyBegin = (unsigned long long) tv.tv_usec + (unsigned long long)((unsigned long long) tv.tv_sec * (unsigned long long) 1000000); + getKeyBegin = (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000); while(1) { timer_id = 0; if ( timers.size()> 0 ) { gettimeofday( &tv, NULL ); - unsigned long long t_n= (unsigned long long) tv.tv_usec + (unsigned long long)((unsigned long long) tv.tv_sec * (unsigned long long) 1000000); + uint64_t t_n= (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000); if ( timers[0].times_out< t_n ) { timer_id = checkTimers(); @@ -525,7 +525,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, unsig else { targetTimeout = timers[0].times_out - t_n; - if ( (unsigned long long) targetTimeout> Timeout) + if ( (uint64_t) targetTimeout> Timeout) targetTimeout= Timeout; else timer_id = timers[0].id; @@ -826,26 +826,26 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, unsig { struct timeval ltv; gettimeofday( <v, NULL ); - long long timeOld = (long long) ltv.tv_usec + (long long)((long long) ltv.tv_sec * (long long) 1000000); + int64_t timeOld = (int64_t) ltv.tv_usec + (int64_t)((int64_t) ltv.tv_sec * (int64_t) 1000000); //printf("[neutrino] event TIMESET from SECTIONSD %x %x\n", emsg.eventID, *(unsigned*) p); //g_Sectionsd->registerEvent(CSectionsdClient::EVT_TIMESET, 222, NEUTRINO_UDS_NAME); stime((time_t*) p); gettimeofday( <v, NULL ); - long long timeNew = (long long) ltv.tv_usec + (long long)((long long) ltv.tv_sec * (long long) 1000000); + int64_t timeNew = (int64_t) ltv.tv_usec + (int64_t)((int64_t) ltv.tv_sec * (int64_t) 1000000); delete[] p;//new [] delete [] - p= new unsigned char[ sizeof(long long) ]; - *(long long*) p = timeNew - timeOld; + p= new unsigned char[ sizeof(int64_t) ]; + *(int64_t*) p = timeNew - timeOld; - if ((long long)last_keypress > *(long long*)p) - last_keypress += *(long long *)p; + if ((int64_t)last_keypress > *(int64_t*)p) + last_keypress += *(int64_t *)p; // Timer anpassen for(std::vector::iterator e = timers.begin(); e != timers.end(); ++e) if (e->correct_time) - e->times_out+= *(long long*) p; + e->times_out+= *(int64_t*) p; *msg = NeutrinoMessages::EVT_TIMESET; *data = (neutrino_msg_data_t) p; @@ -1132,11 +1132,11 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); printf("got keydown native key: %04x %04x, translate: %04x -%s-\n", ev.code, ev.code&0x1f, translate(ev.code, 0), getKeyName(translate(ev.code, 0)).c_str()); printf("rc_last_key %04x rc_last_repeat_key %04x\n\n", rc_last_key, rc_last_repeat_key); #endif - unsigned long long now_pressed; + uint64_t now_pressed; bool keyok = true; tv = ev.time; - now_pressed = (unsigned long long) tv.tv_usec + (unsigned long long)((unsigned long long) tv.tv_sec * (unsigned long long) 1000000); + now_pressed = (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000); if (ev.code == rc_last_key) { /* only allow selected keys to be repeated */ /* (why?) */ @@ -1223,9 +1223,9 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); { //timeout neu kalkulieren gettimeofday( &tv, NULL ); - long long getKeyNow = (long long) tv.tv_usec + (long long)((long long) tv.tv_sec * (long long) 1000000); - long long diff = (getKeyNow - getKeyBegin); - if( Timeout <= (unsigned long long) diff ) + int64_t getKeyNow = (int64_t) tv.tv_usec + (int64_t)((int64_t) tv.tv_sec * (int64_t) 1000000); + int64_t diff = (getKeyNow - getKeyBegin); + if( Timeout <= (uint64_t) diff ) { *msg = RC_timeout; *data = 0; diff --git a/src/driver/rcinput.h b/src/driver/rcinput.h index b358935a5..cadbf42ac 100644 --- a/src/driver/rcinput.h +++ b/src/driver/rcinput.h @@ -93,8 +93,8 @@ class CRCInput struct timer { uint id; - unsigned long long interval; - unsigned long long times_out; + uint64_t interval; + uint64_t times_out; bool correct_time; }; @@ -207,8 +207,8 @@ class CRCInput void stopInput(); void restartInput(); - unsigned long long repeat_block; - unsigned long long repeat_block_generic; + uint64_t repeat_block; + uint64_t repeat_block_generic; CRCInput(); //constructor - opens rc-device and starts needed threads ~CRCInput(); //destructor - closes rc-device @@ -221,19 +221,19 @@ class CRCInput static const char * getSpecialKeyName(const unsigned int key); static std::string getKeyName(const unsigned int key); - int addTimer(unsigned long long Interval, bool oneshot= true, bool correct_time= true ); + int addTimer(uint64_t Interval, bool oneshot= true, bool correct_time= true ); int addTimer(struct timeval Timeout); int addTimer(const time_t *Timeout); void killTimer(uint32_t id); - static long long calcTimeoutEnd_MS(const int timeout_in_milliseconds); - static long long calcTimeoutEnd(const int timeout_in_seconds); + static int64_t calcTimeoutEnd_MS(const int timeout_in_milliseconds); + static int64_t calcTimeoutEnd(const int timeout_in_seconds); - void getMsgAbsoluteTimeout(neutrino_msg_t * msg, neutrino_msg_data_t * data, unsigned long long *TimeoutEnd, bool bAllowRepeatLR= false); + void getMsgAbsoluteTimeout(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint64_t *TimeoutEnd, bool bAllowRepeatLR= false); void getMsg(neutrino_msg_t * msg, neutrino_msg_data_t * data, int Timeout, bool bAllowRepeatLR= false); //get message, timeout in 1/10 secs :) void getMsg_ms(neutrino_msg_t * msg, neutrino_msg_data_t * data, int Timeout, bool bAllowRepeatLR= false); //get message, timeout in msecs :) - void getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, unsigned long long Timeout, bool bAllowRepeatLR= false);//get message, timeout in µsecs :) + void getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint64_t Timeout, bool bAllowRepeatLR= false);//get message, timeout in µsecs :) void postMsg(const neutrino_msg_t msg, const neutrino_msg_data_t data, const bool Priority = true); // push message back into buffer void clearRCMsg(); diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index a5a8f43c1..42d722d36 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -194,7 +194,7 @@ int CBEBouquetWidget::exec(CMenuTarget* parent, const std::string & /*actionKey* bouquetsChanged = false; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); bool loop=true; while (loop) diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index bb3abfcce..394e72d46 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -182,7 +182,7 @@ int CBEChannelWidget::exec(CMenuTarget* parent, const std::string & /*actionKey* channelsChanged = false; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); bool loop=true; while (loop) diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 82a7a9183..dbe222eb7 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -303,7 +303,7 @@ int CBouquetList::show(bool bShowChannelList) unsigned int chn= 0; int pos= lmaxpos; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); bool loop=true; while (loop) { diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 36f9238a7..d36c67b03 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -479,7 +479,7 @@ int CChannelList::show() int zapOnExit = false; bool bShowBouquetList = false; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); bool loop=true; while (loop) { diff --git a/src/gui/epgplus.h b/src/gui/epgplus.h index 691d389d3..b005f7073 100644 --- a/src/gui/epgplus.h +++ b/src/gui/epgplus.h @@ -57,27 +57,27 @@ class EpgPlus public: enum FontSettingID { - EPGPlus_header_font = 0, - EPGPlus_timeline_fonttime, - EPGPlus_timeline_fontdate, - EPGPlus_channelentry_font, - EPGPlus_channelevententry_font, - EPGPlus_footer_fontbouquetchannelname, - EPGPlus_footer_fonteventdescription, - EPGPlus_footer_fonteventshortdescription, - EPGPlus_footer_fontbuttons, + EPGPlus_header_font = 0, + EPGPlus_timeline_fonttime, + EPGPlus_timeline_fontdate, + EPGPlus_channelentry_font, + EPGPlus_channelevententry_font, + EPGPlus_footer_fontbouquetchannelname, + EPGPlus_footer_fonteventdescription, + EPGPlus_footer_fonteventshortdescription, + EPGPlus_footer_fontbuttons, NumberOfFontSettings }; enum SizeSettingID - { - EPGPlus_channelentry_width = 0, - EPGPlus_channelentry_separationlineheight, - EPGPlus_slider_width, - EPGPlus_horgap1_height, - EPGPlus_horgap2_height, - EPGPlus_vergap1_width, - EPGPlus_vergap2_width, + { + EPGPlus_channelentry_width = 0, + EPGPlus_channelentry_separationlineheight, + EPGPlus_slider_width, + EPGPlus_horgap1_height, + EPGPlus_horgap2_height, + EPGPlus_vergap1_width, + EPGPlus_vergap2_width, NumberOfSizeSettings }; @@ -91,20 +91,20 @@ public: struct SizeSetting { SizeSettingID settingID; - int size; + int size; }; enum TViewMode { ViewMode_Stretch, - ViewMode_Scroll, + ViewMode_Scroll }; - enum TSwapMode + enum TSwapMode { SwapMode_ByPage, - SwapMode_ByBouquet, + SwapMode_ByBouquet }; class Footer; @@ -132,7 +132,7 @@ public: int x; int y; int width; - + static Font* font; }; @@ -142,7 +142,7 @@ public: //// construction / destruction public: TimeLine ( CFrameBuffer* frameBuffer , int x , int y , int width , int startX , int durationX); - + ~TimeLine(); //// methods @@ -168,7 +168,7 @@ public: int x; int y; int width; - + static Font* fontTime; static Font* fontDate; @@ -308,7 +308,7 @@ public: ); static int getUsedHeight(); - + //// attributes public: CFrameBuffer* frameBuffer; @@ -318,7 +318,7 @@ public: int width; static Font* fontBouquetChannelName; - static Font* fontEventDescription; + static Font* fontEventDescription; static Font* fontEventShortDescription; static Font* fontButtons; @@ -328,7 +328,7 @@ public: std::string currentChannelName; }; - + class MenuTargetAddReminder : public CMenuTarget { public: @@ -393,7 +393,7 @@ public: virtual ~MenuOptionChooserSwitchViewMode(); public: - int exec ( CMenuTarget* parent); + int exec ( CMenuTarget* parent); private: int oldTimingMenuSettings; @@ -445,7 +445,7 @@ public: void init(); void free(); - int exec ( CChannelList* channelList , int selectedChannelIndex , CBouquetList* bouquetList); + int exec ( CChannelList* channelList , int selectedChannelIndex , CBouquetList* bouquetList); private: static std::string getTimeString ( const time_t& time , const std::string& format); diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 361878e1a..a739d868d 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -436,10 +436,10 @@ extern char recDir[255]; void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = ""); bool sectionsd_getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags); extern tallchans allchans; -int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_t* a_startzeit, bool doLoop ) +int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_startzeit, bool doLoop ) { int res = menu_return::RETURN_REPAINT; - static unsigned long long id; + static uint64_t id; static time_t startzeit; if (a_startzeit) @@ -659,7 +659,7 @@ int CEpgData::show(const t_channel_id channel_id, unsigned long long a_id, time_ bool loop = true; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); while (loop) { @@ -879,7 +879,7 @@ void CEpgData::hide() bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata); bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); -void CEpgData::GetEPGData(const t_channel_id channel_id, unsigned long long id, time_t* startzeit, bool clear ) +void CEpgData::GetEPGData(const t_channel_id channel_id, uint64_t id, time_t* startzeit, bool clear ) { if(clear) epgText.clear(); @@ -932,7 +932,7 @@ void CEpgData::GetEPGData(const t_channel_id channel_id, unsigned long long id, //printf("GetEPGData:: items %d descriptions %d\n", epgData.items.size(), epgData.itemDescriptions.size()); } -void CEpgData::GetPrevNextEPGData( unsigned long long id, time_t* startzeit ) +void CEpgData::GetPrevNextEPGData( uint64_t id, time_t* startzeit ) { prev_id= 0; next_id= 0; diff --git a/src/gui/epgview.h b/src/gui/epgview.h index 124a49db4..cc5c53a28 100644 --- a/src/gui/epgview.h +++ b/src/gui/epgview.h @@ -63,9 +63,9 @@ class CEpgData bool bigFonts; time_t tmp_curent_zeit; - unsigned long long prev_id; + uint64_t prev_id; time_t prev_zeit; - unsigned long long next_id; + uint64_t next_id; time_t next_zeit; int ox, oy, sx, sy, toph, sb; @@ -76,8 +76,8 @@ class CEpgData int buttonheight,botboxheight; int medlineheight,medlinecount; - void GetEPGData(const t_channel_id channel_id, unsigned long long id, time_t* startzeit, bool clear = true ); - void GetPrevNextEPGData( unsigned long long id, time_t* startzeit ); + void GetEPGData(const t_channel_id channel_id, uint64_t id, time_t* startzeit, bool clear = true ); + void GetPrevNextEPGData( uint64_t id, time_t* startzeit ); void addTextToArray( const std::string & text ); void processTextToArray(std::string text); void showText( int startPos, int ypos ); @@ -89,7 +89,7 @@ class CEpgData CEpgData(); void start( ); - int show(const t_channel_id channel_id, unsigned long long id = 0, time_t* startzeit = NULL, bool doLoop = true ); + int show(const t_channel_id channel_id, uint64_t id = 0, time_t* startzeit = NULL, bool doLoop = true ); void hide(); }; diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 3640591d5..8cec3fbbf 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -268,7 +268,7 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam int oldselected = selected; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); bool loop = true; while (loop) @@ -340,7 +340,7 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam else if (msg == (neutrino_msg_t)g_settings.key_channelList_sort) { - unsigned long long selected_id = evtlist[selected].eventID; + uint64_t selected_id = evtlist[selected].eventID; if(sort_mode==0) { sort_mode++; diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 2eed189de..9924a9941 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -555,7 +555,7 @@ bool CFileBrowser::readDir_vlc(const std::string & dirname, CFileList* flist) curl_easy_cleanup(curl_handle); // std::cout << "Answer:" << std::endl << "----------------" << std::endl << answer << std::endl; - + if (!answer.empty() && httpres == 0) { xmlDocPtr answer_parser = parseXml(answer.c_str()); @@ -583,9 +583,9 @@ bool CFileBrowser::readDir_vlc(const std::string & dirname, CFileList* flist) file.Name = dirname + xmlGetAttribute(element, "name"); ptr = xmlGetAttribute(element, "size"); - if (ptr) + if (ptr) file.Size = atoi(ptr); - else + else file.Size = 0; file.Time = 0; @@ -597,7 +597,7 @@ bool CFileBrowser::readDir_vlc(const std::string & dirname, CFileList* flist) return true; } } - + /* since all CURL error messages use only US-ASCII characters, when can safely print them as if they were UTF-8 encoded */ if (httpres == 22) { strcat(error, "\nProbably wrong vlc version\nPlease use vlc 0.8.5 or higher"); @@ -676,7 +676,7 @@ and add to neutrino playlist curl_easy_cleanup(curl_handle); //std::cout << "Answer:" << std::endl << "----------------" << std::endl << answer << std::endl; - + if (!answer.empty() && httpres == 0) { printf("CFileBrowser::readDir_sc: read done, size %d\n", answer.size()); @@ -687,9 +687,9 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", answer.size()); unsigned char xml_decode = 0; xmlNodePtr element = xmlDocGetRootElement(answer_parser); - if (strcmp(xmlGetName(element), "genrelist") == 0) + if (strcmp(xmlGetName(element), "genrelist") == 0) xml_decode = 1; - else if (strcmp(xmlGetName(element), "stationlist") == 0) + else if (strcmp(xmlGetName(element), "stationlist") == 0) xml_decode = 2; element = element->xmlChildrenNode; @@ -765,7 +765,7 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", answer.size()); return true; } } - + /* since all CURL error messages use only US-ASCII characters, when can safely print them as if they were UTF-8 encoded */ if (httpres == 22) { strcat(error, "\nProbably wrong link."); @@ -851,7 +851,7 @@ bool CFileBrowser::exec(const char * const dirname) int oldselected = selected; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER]); bool loop=true; while (loop) @@ -954,7 +954,7 @@ bool CFileBrowser::exec(const char * const dirname) #ifdef ENABLE_INTERNETRADIO if (m_Mode == ModeSC) { ChangeDir(filelist[selected].Url); - } else + } else #endif { if (filelist[selected].getFileName() != "..") { @@ -1314,7 +1314,7 @@ void CFileBrowser::paintItem(unsigned int pos) #define KILOBYTE 1024LL char tmpstr[256]; const char *unit = ""; - long long factor = 0; + int64_t factor = 0; if (actual_file->Size >= GIGABYTE) { factor = GIGABYTE; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 504b368e4..a5f66c800 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -661,7 +661,7 @@ fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_set bool hideIt = true; virtual_zap_mode = false; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR]); int res = messages_return::none; // time_t ta, tb; @@ -854,7 +854,7 @@ void CInfoViewer::showSubchan () g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (x + 30, y + dy - 2, dx - 40, g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), COL_MENUCONTENT, 0, true); // UTF-8 } - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd (2); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd (2); int res = messages_return::none; neutrino_msg_t msg; diff --git a/src/gui/pluginlist.cpp b/src/gui/pluginlist.cpp index efbe2a549..8b2c40149 100644 --- a/src/gui/pluginlist.cpp +++ b/src/gui/pluginlist.cpp @@ -138,7 +138,7 @@ int CPluginList::exec(CMenuTarget* parent, const std::string & /*actionKey*/) paint(); - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); bool loop=true; while (loop) diff --git a/src/gui/plugins.h b/src/gui/plugins.h index 532857736..bd81f6704 100644 --- a/src/gui/plugins.h +++ b/src/gui/plugins.h @@ -51,7 +51,7 @@ class CPlugins P_TYPE_DISABLED = 0x1, P_TYPE_GAME = 0x2, P_TYPE_TOOL = 0x4, - P_TYPE_SCRIPT = 0x8, + P_TYPE_SCRIPT = 0x8 } p_type_t; diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 90051394f..e42e8b10d 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -229,7 +229,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) while (!istheend) { paintRadar(); - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd_MS( 250 ); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS( 250 ); do { g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd); @@ -263,7 +263,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) //paintLine(xpos2, ypos_frequency, xpos_frequency, text); frameBuffer->paintBoxRel(x, y, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(xpos1, y + hheight, width, text, COL_MENUHEAD, 0, true); // UTF-8 - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(0xFFFF); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(0xFFFF); do { g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd); if ( msg <= CRCInput::RC_MaxRC ) diff --git a/src/gui/screensetup.cpp b/src/gui/screensetup.cpp index 19baf669c..c48b08fa6 100644 --- a/src/gui/screensetup.cpp +++ b/src/gui/screensetup.cpp @@ -90,7 +90,7 @@ int CScreenSetup::exec(CMenuTarget* parent, const std::string &) selected = 0; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings ::TIMING_MENU]); bool loop=true; diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index c5d4711f8..5eed9fd00 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -427,7 +427,7 @@ int CTimerList::show() int res = menu_return::RETURN_REPAINT; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings ::TIMING_MENU]); bool loop=true; diff --git a/src/gui/widget/colorchooser.cpp b/src/gui/widget/colorchooser.cpp index d362b92b5..44e867b84 100644 --- a/src/gui/widget/colorchooser.cpp +++ b/src/gui/widget/colorchooser.cpp @@ -118,7 +118,7 @@ int CColorChooser::exec(CMenuTarget* parent, const std::string &) int selected = 0; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings ::TIMING_MENU]); bool loop=true; diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index aefa35e88..cf43d84ce 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -230,7 +230,7 @@ int ShowHintUTF(const neutrino_locale_t Caption, const char * const Text, const timeout = 5; /// default timeout 5 sec //timeout = g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR]; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd( timeout ); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout ); int res = messages_return::none; diff --git a/src/gui/widget/keychooser.cpp b/src/gui/widget/keychooser.cpp index 0345fd77f..6c5bb9a6e 100644 --- a/src/gui/widget/keychooser.cpp +++ b/src/gui/widget/keychooser.cpp @@ -108,7 +108,7 @@ int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &) neutrino_msg_t msg; neutrino_msg_data_t data; - unsigned long long timeoutEnd; + uint64_t timeoutEnd; int res = menu_return::RETURN_REPAINT; diff --git a/src/gui/widget/keychooser.h b/src/gui/widget/keychooser.h index d43028f5b..fa135273f 100644 --- a/src/gui/widget/keychooser.h +++ b/src/gui/widget/keychooser.h @@ -96,7 +96,7 @@ class CKeyChooserItemNoKey : public CMenuTarget int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/) { - *key=CRCInput::RC_nokey; + *key=(int)CRCInput::RC_nokey; return menu_return::RETURN_REPAINT; } diff --git a/src/gui/widget/listframe.cpp b/src/gui/widget/listframe.cpp index 4fd8bb586..03218d8f5 100644 --- a/src/gui/widget/listframe.cpp +++ b/src/gui/widget/listframe.cpp @@ -578,7 +578,7 @@ void CListFrame::scrollPageDown(const int pages) } //TRACE("[CListFrame] m_nCurrentLine: %d, m_nCurrentPage: %d \r\n",m_nCurrentLine,m_nCurrentPage); refresh(); -}; +} void CListFrame::scrollPageUp(const int pages) { diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index ac52fe2a8..95800bd6d 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -184,7 +184,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) paint(); int retval = menu_return::RETURN_REPAINT; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]); if ( fadeIn ) fadeTimer = g_RCInput->addTimer( FADE_TIME, false ); diff --git a/src/gui/widget/messagebox.cpp b/src/gui/widget/messagebox.cpp index 6578d45ca..fc9d177da 100644 --- a/src/gui/widget/messagebox.cpp +++ b/src/gui/widget/messagebox.cpp @@ -195,7 +195,7 @@ int CMessageBox::exec(int timeout) if ( timeout == -1 ) timeout = g_settings.timing[SNeutrinoSettings::TIMING_EPG]; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd( timeout ); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout ); bool loop=true; while (loop) @@ -204,7 +204,7 @@ int CMessageBox::exec(int timeout) g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd ); if (msg == CRCInput::RC_timeout && returnDefaultOnTimeout) { - // return default + // return default loop = false; } else if (((msg == CRCInput::RC_timeout) || @@ -270,7 +270,7 @@ int CMessageBox::exec(int timeout) } hide(); - + return res; } @@ -281,7 +281,7 @@ int ShowMsgUTF(const neutrino_locale_t Caption, const char * const Text, const C messageBox->exec(timeout); int res = messageBox->result; delete messageBox; - + return res; } diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index e98f00216..704d7a77e 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -532,7 +532,7 @@ void CMsgBox::scrollPageDown(const int pages) m_pcTextBox->scrollPageDown(pages); } -}; +} ////////////////////////////////////////////////////////////////////// // Function Name: ScrollPageUp @@ -549,7 +549,7 @@ void CMsgBox::scrollPageUp(const int pages) { m_pcTextBox->scrollPageUp(pages); } -}; +} ////////////////////////////////////////////////////////////////////// // Function Name: Paint @@ -646,7 +646,7 @@ int CMsgBox::exec( int timeout, int returnDefaultOnTimeout) if ( timeout == -1 ) timeout = g_settings.timing[SNeutrinoSettings::TIMING_EPG]; - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd( timeout ); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout ); bool loop=true; while (loop) @@ -761,7 +761,7 @@ bool CMsgBox::setText(const std::string* newText) } return(lresult); -}; +} ////////////////////////////////////////////////////////////////////// diff --git a/src/gui/widget/rgbcsynccontroler.cpp b/src/gui/widget/rgbcsynccontroler.cpp index a42fbd653..aecf0de5b 100644 --- a/src/gui/widget/rgbcsynccontroler.cpp +++ b/src/gui/widget/rgbcsynccontroler.cpp @@ -92,7 +92,7 @@ int CRGBCSyncControler::exec(CMenuTarget* parent, const std::string &) setCSync(); paint(); - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]); + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]); bool loop=true; while (loop) diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 27ea8d326..78733568a 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -304,7 +304,14 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) neutrino_msg_data_t data; int res = menu_return::RETURN_REPAINT; - char oldval[size+1], dispval[size+1]; + char *oldval = new char[size+1]; + if(oldval == NULL) + return res; + char *dispval = new char[size+1]; + if(dispval == NULL){ + delete[] oldval; + return res; + } oldval[size] = 0; dispval[size] = 0; @@ -317,7 +324,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) paint(); - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings ::TIMING_MENU]); bool loop=true; @@ -446,7 +453,8 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) { observ->changeNotify(name, value); } - + delete[] oldval; + delete[] oldval; return res; } diff --git a/src/gui/widget/stringinput_ext.cpp b/src/gui/widget/stringinput_ext.cpp index 7e4086664..9ef5d47d4 100644 --- a/src/gui/widget/stringinput_ext.cpp +++ b/src/gui/widget/stringinput_ext.cpp @@ -136,7 +136,15 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & ) onBeforeExec(); int res = menu_return::RETURN_REPAINT; - char oldval[inputFields.size()+10], dispval[inputFields.size()+10]; + + char *oldval = new char[inputFields.size()+10]; + if(oldval == NULL) + return res; + char *dispval = new char[inputFields.size()+10]; + if(dispval == NULL){ + delete[] oldval; + return res; + } if (parent) { @@ -146,7 +154,7 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & ) strcpy(oldval, value); paint(); - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings ::TIMING_MENU]); bool loop=true; @@ -196,7 +204,7 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & ) break; } } - } + } if(!found) { for(int i = 0; i < (int) inputFields.size(); i++) { //printf("old %d sel %d size %d i %d\n", oldSelectedChar, selectedChar, inputFields.size(), i); @@ -268,6 +276,9 @@ int CExtendedInput::exec( CMenuTarget* parent, const std::string & ) observ->changeNotify(name, value); } + delete[] oldval; + delete[] oldval; + return res; } @@ -329,7 +340,7 @@ void CExtendedInput_Item_Char::paint(int x, int y, bool focusGained ) uint8_t color; fb_pixel_t bgcolor; - + if (focusGained) { color = COL_MENUCONTENTSELECTED; @@ -463,7 +474,7 @@ CDateInput::CDateInput(const neutrino_locale_t Name, time_t* Time, const neutrin sprintf( value, "%02d.%02d.%04d %02d:%02d", tmTime->tm_mday, tmTime->tm_mon+1, tmTime->tm_year+1900, tmTime->tm_hour, tmTime->tm_min); - + frameBuffer = CFrameBuffer::getInstance(); addInputField( new CExtendedInput_Item_Char("0123") ); addInputField( new CExtendedInput_Item_Char("0123456789") ); diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 1f95a495c..0543660db 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -514,7 +514,7 @@ bool CTextBox::setText(const std::string* newText, int _max_width) result = true; } return(result); -}; +} void CTextBox::paint (void) { diff --git a/src/gui/widget/vfdcontroler.cpp b/src/gui/widget/vfdcontroler.cpp index 832d8e8bf..4a6905da5 100644 --- a/src/gui/widget/vfdcontroler.cpp +++ b/src/gui/widget/vfdcontroler.cpp @@ -93,7 +93,7 @@ int CVfdControler::exec(CMenuTarget* parent, const std::string &) setVfd(); paint(); - unsigned long long timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings + uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings ::TIMING_MENU]); bool loop=true; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index cffee5fac..cabda1e5c 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3702,7 +3702,7 @@ void CNeutrinoApp::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool neutrino_msg_data_t data; - unsigned long long timeoutEnd; + uint64_t timeoutEnd; do { if (msg <= CRCInput::RC_MaxRC) { diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index 652c93f15..752b79015 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -1031,7 +1031,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) else if (hh->ParamList["eventid"] != "") { //special epg query - unsigned long long epgid; + uint64_t epgid; sscanf( hh->ParamList["eventid"].c_str(), "%llu", &epgid); CShortEPGData epg; //if (NeutrinoAPI->Sectionsd->getEPGidShort(epgid,&epg)) @@ -1046,7 +1046,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) { if (hh->ParamList["starttime"] != "") { - unsigned long long epgid; + uint64_t epgid; time_t starttime; sscanf( hh->ParamList["fskid"].c_str(), "%llu", &epgid); sscanf( hh->ParamList["starttime"].c_str(), "%lu", &starttime); diff --git a/src/plugin.h b/src/plugin.h index 7ac9212a6..3e45c0860 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -39,7 +39,7 @@ typedef enum plugin_type PLUGIN_TYPE_DISABLED = 0, PLUGIN_TYPE_GAME = 1, PLUGIN_TYPE_TOOL = 2, - PLUGIN_TYPE_SCRIPT = 3, + PLUGIN_TYPE_SCRIPT = 3 } plugin_type_t; diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 40f632858..a9f4b4554 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -818,11 +818,11 @@ void showCurrentNetworkSettings() ShowMsgUTF(LOCALE_NETWORKMENU_SHOW, text, CMessageBox::mbrBack, CMessageBox::mbBack); // UTF-8 } -unsigned long long getcurrenttime() +uint64_t getcurrenttime() { struct timeval tv; gettimeofday( &tv, NULL ); - return (unsigned long long) tv.tv_usec + (unsigned long long)((unsigned long long) tv.tv_sec * (unsigned long long) 1000000); + return (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000); } // USERMENU #define USERMENU_ITEM_OPTION_COUNT SNeutrinoSettings::ITEM_MAX diff --git a/src/system/setting_helpers.h b/src/system/setting_helpers.h index 661eb25d6..9c932c6f7 100644 --- a/src/system/setting_helpers.h +++ b/src/system/setting_helpers.h @@ -37,7 +37,7 @@ #include -unsigned long long getcurrenttime(); +uint64_t getcurrenttime(); class CSatelliteSetupNotifier : public CChangeObserver { diff --git a/src/zapit/include/zapit/channel.h b/src/zapit/include/zapit/channel.h index a2f117628..da67c6c1c 100644 --- a/src/zapit/include/zapit/channel.h +++ b/src/zapit/include/zapit/channel.h @@ -136,7 +136,7 @@ class CZapitChannel CCaPmt * caPmt; /* from neutrino CChannel class */ - unsigned long long last_unlocked_EPGid; + uint64_t last_unlocked_EPGid; friend class CChannelList; diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index f9613c870..c35c87cd9 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -356,7 +356,7 @@ struct dvb_frontend_parameters CFrontend::getFrontend(void) const uint32_t CFrontend::getBitErrorRate(void) const { - uint32_t ber; + uint32_t ber = 0; fop(ioctl, FE_READ_BER, &ber); return ber; @@ -364,7 +364,7 @@ uint32_t CFrontend::getBitErrorRate(void) const uint16_t CFrontend::getSignalStrength(void) const { - uint16_t strength; + uint16_t strength = 0; fop(ioctl, FE_READ_SIGNAL_STRENGTH, &strength); return strength; @@ -372,7 +372,7 @@ uint16_t CFrontend::getSignalStrength(void) const uint16_t CFrontend::getSignalNoiseRatio(void) const { - uint16_t snr; + uint16_t snr = 0; fop(ioctl, FE_READ_SNR, &snr); return snr; } @@ -901,10 +901,10 @@ void CFrontend::positionMotor(uint8_t motorPosition) secSetVoltage(SEC_VOLTAGE_13, 15); secSetTone(SEC_TONE_OFF, 25); cmd.msg[3] = motorPosition; - + for (int i = 0; i <= repeatUsals; ++i) sendDiseqcCommand(&cmd, 50); - + printf("[fe%d] motor positioning command sent.\n", fenumber); } }