diff --git a/lib/connection/basicclient.cpp b/lib/connection/basicclient.cpp index cbccbff84..730aea5ef 100644 --- a/lib/connection/basicclient.cpp +++ b/lib/connection/basicclient.cpp @@ -112,7 +112,7 @@ bool CBasicClient::send_string(const char* data) } else { - send_length = length; + send_length = static_cast(length); } return (send_data((char *)&send_length, sizeof(send_length)) && send_data(data, send_length)); diff --git a/lib/connection/basicserver.cpp b/lib/connection/basicserver.cpp index 9156c1514..903e3ccee 100644 --- a/lib/connection/basicserver.cpp +++ b/lib/connection/basicserver.cpp @@ -156,7 +156,8 @@ bool CBasicServer::run(bool (parse_command)(CBasicMessage::Header &rmsg, int con return true; } else { - while(parse(parse_command, version)); + while(parse(parse_command, version)) + {}; stop(); diff --git a/lib/libcoolstream/pwrmngr.h b/lib/libcoolstream/pwrmngr.h index 0adbb267d..aabc07b2b 100644 --- a/lib/libcoolstream/pwrmngr.h +++ b/lib/libcoolstream/pwrmngr.h @@ -38,7 +38,7 @@ private: bool opened; PWR_STATE powerState; // - static void ApplicationCallback(void *hHandle, void *pUserData, signed long eEvent, void *pEventData, void *pTag) {} + static void ApplicationCallback(void */*hHandle*/, void */*pUserData*/, signed long /*eEvent*/, void */*pEventData*/, void */*pTag*/) {} bool SetState(PWR_STATE PowerState); public: bool Open(void); diff --git a/lib/libdvbsub/Debug.cpp b/lib/libdvbsub/Debug.cpp index 55d506fde..7909f09b8 100644 --- a/lib/libdvbsub/Debug.cpp +++ b/lib/libdvbsub/Debug.cpp @@ -6,7 +6,7 @@ Debug::Debug() : file_(const_cast("")), level_(0), fp_(stdout) { } - + Debug::~Debug() { if (fp_ && fp_ != stdout) { @@ -29,7 +29,7 @@ FILE* Debug::set_file(char* file) return fp_; } -void Debug::print(int level, const char *fmt, ...) +void Debug::print(int /*level*/, const char *fmt, ...) { va_list argp; va_start(argp, fmt); diff --git a/lib/libdvbsub/dvbsub.cpp b/lib/libdvbsub/dvbsub.cpp index 0e57b7f0e..9163958be 100644 --- a/lib/libdvbsub/dvbsub.cpp +++ b/lib/libdvbsub/dvbsub.cpp @@ -149,7 +149,7 @@ int dvbsub_close() static cDemux * dmx; -void* reader_thread(void *arg) +void* reader_thread(void */*arg*/) { uint8_t tmp[16]; /* actually 6 should be enough */ int count; @@ -203,7 +203,7 @@ void* reader_thread(void *arg) count += len; tosync += len; continue; - } + } tmp[0] = tmp[1]; tmp[1] = tmp[2]; count = 2; @@ -222,7 +222,7 @@ void* reader_thread(void *arg) } } - packlen = getbits(tmp, 4*8, 16) + 6; + packlen = getbits(tmp, 4*8, 16) + 6; buf = new uint8_t[packlen]; @@ -265,7 +265,7 @@ void* reader_thread(void *arg) pthread_exit(NULL); } -void* dvbsub_thread(void* arg) +void* dvbsub_thread(void* /*arg*/) { struct timespec restartWait; struct timeval now; diff --git a/lib/libdvbsub/tools.h b/lib/libdvbsub/tools.h index 0e509790a..24c72bcfb 100644 --- a/lib/libdvbsub/tools.h +++ b/lib/libdvbsub/tools.h @@ -78,7 +78,7 @@ private: public: cListObject(void); virtual ~cListObject(); - virtual int Compare(const cListObject &ListObject) const { return 0; } + virtual int Compare(const cListObject /*&ListObject*/) const { return 0; } ///< Must return 0 if this object is equal to ListObject, a positive value ///< if it is "greater", and a negative value if it is "smaller". void Append(cListObject *Object); diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index 1a309dadf..5f1a95a02 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -9,7 +9,7 @@ * ported 2006 to Dreambox 7025 / 32Bit framebuffer * * by Seddi * * * - * ported 2009 to HD1 by Coolstream LTD * + * ported 2009 to HD1 by Coolstream LTD * * * ******************************************************************************/ @@ -221,7 +221,7 @@ void ClearBB(int color) FillRect(0,(var_screeninfo.yres-var_screeninfo.yoffset),fix_screeninfo.line_length,var_screeninfo.yres, color); } -void ClearFB(int color) +void ClearFB(int /*color*/) { memset(lfb,0, var_screeninfo.yres*fix_screeninfo.line_length); //FillRect(0,var_screeninfo.yoffset,fix_screeninfo.line_length,var_screeninfo.yres,color); @@ -295,7 +295,7 @@ void setcolors(unsigned short *pcolormap, int offset, int number) bgra[j][2]=r; bgra[j][1]=g; bgra[j][0]=b; - + j++; } } @@ -1604,10 +1604,10 @@ int tuxtx_main(int _rc, void * _fb, int pid, int x, int y, int w, int h) case RC_DOWN: GetNextPageOne(swapupdown); break; - case RC_RIGHT: + case RC_RIGHT: if (boxed) { - subtitledelay++; + subtitledelay++; // display subtitledelay PosY = StartY; char ns[10]; @@ -1616,10 +1616,10 @@ int tuxtx_main(int _rc, void * _fb, int pid, int x, int y, int w, int h) RenderCharFB(ns[0],&atrtable[ATR_WB]); RenderCharFB(ns[1],&atrtable[ATR_WB]); RenderCharFB(ns[2],&atrtable[ATR_WB]); - RenderCharFB(ns[4],&atrtable[ATR_WB]); + RenderCharFB(ns[4],&atrtable[ATR_WB]); } else - GetNextSubPage(1); + GetNextSubPage(1); break; case RC_LEFT: if (boxed) @@ -1634,10 +1634,10 @@ int tuxtx_main(int _rc, void * _fb, int pid, int x, int y, int w, int h) RenderCharFB(ns[0],&atrtable[ATR_WB]); RenderCharFB(ns[1],&atrtable[ATR_WB]); RenderCharFB(ns[2],&atrtable[ATR_WB]); - RenderCharFB(ns[4],&atrtable[ATR_WB]); + RenderCharFB(ns[4],&atrtable[ATR_WB]); } else - GetNextSubPage(-1); + GetNextSubPage(-1); break; case RC_OK: if (tuxtxt_cache.subpagetable[tuxtxt_cache.page] == 0xFF) @@ -1664,10 +1664,10 @@ int tuxtx_main(int _rc, void * _fb, int pid, int x, int y, int w, int h) case RC_PLUS: SwitchZoomMode(); break; case RC_MINUS: SwitchScreenMode(-1);prevscreenmode = screenmode; break; case RC_MUTE: SwitchTranspMode(); break; - case RC_TEXT: + case RC_TEXT: if(transpmode == 1) RCCode = RC_HOME; - SwitchTranspMode(); + SwitchTranspMode(); break; case RC_HELP: SwitchHintMode(); break; case RC_DBOX: ConfigMenu(0); break; @@ -1702,7 +1702,7 @@ int tuxtx_main(int _rc, void * _fb, int pid, int x, int y, int w, int h) * MyFaceRequester ******************************************************************************/ -FT_Error MyFaceRequester(FTC_FaceID face_id, FT_Library library, FT_Pointer request_data, FT_Face *aface) +FT_Error MyFaceRequester(FTC_FaceID face_id, FT_Library library, FT_Pointer /*request_data*/, FT_Face *aface) { FT_Error result; @@ -1766,7 +1766,7 @@ int Init() tuxtxt_cache.subpage = tuxtxt_cache.subpagetable[tuxtxt_cache.page]; if (tuxtxt_cache.subpage == 0xff) tuxtxt_cache.subpage = 0; - + tuxtxt_cache.pageupdate = 0; tuxtxt_cache.zap_subpage_manual = 0; @@ -2061,7 +2061,7 @@ int Init() gethotlist(); SwitchScreenMode(screenmode); prevscreenmode = screenmode; - + printf("TuxTxt: init ok\n"); /* init successfull */ @@ -4638,7 +4638,7 @@ void RenderCharBB(int Char, tstPageAttr *Attribute) * RenderCharLCD * ******************************************************************************/ -void RenderCharLCD(int Digit, int XPos, int YPos) +void RenderCharLCD(int /*Digit*/, int /*XPos*/, int /*YPos*/) { #if 0 int x, y; @@ -4901,12 +4901,12 @@ void RenderPage() if (tv.tv_sec - tv_delay.tv_sec < subtitledelay) return; } - + /* update page or timestring */ if (transpmode != 2 && tuxtxt_cache.pageupdate && tuxtxt_cache.page_receiving != tuxtxt_cache.page && inputcounter == 2) { - if (boxed && subtitledelay) + if (boxed && subtitledelay) { if (!delaystarted) { @@ -4929,13 +4929,13 @@ void RenderPage() else startrow = 1; if (boxed) - { - if (screenmode != 0) + { + if (screenmode != 0) SwitchScreenMode(0); /* turn off divided screen */ } - else - { - if (screenmode != prevscreenmode && !transpmode) + else + { + if (screenmode != prevscreenmode && !transpmode) SwitchScreenMode(prevscreenmode); } @@ -5333,7 +5333,7 @@ void CopyBB2FB() #endif /* adapt background of backbuffer if changed */ - if (StartX > 0 && *lfb != *(lfb + fix_screeninfo.line_length * var_screeninfo.yres)) + if (StartX > 0 && *lfb != *(lfb + fix_screeninfo.line_length * var_screeninfo.yres)) FillBorder(*(lfb + fix_screeninfo.line_length * var_screeninfo.yoffset)); // ClearBB(*(lfb + var_screeninfo.xres * var_screeninfo.yoffset)); @@ -5356,7 +5356,7 @@ void CopyBB2FB() } /* copy line25 in normal height */ if (!pagecatching ) - memcpy(dst+(24*fontheight)*fix_screeninfo.line_length, src + (24*fontheight)*fix_screeninfo.line_length, fix_screeninfo.line_length*fontheight); + memcpy(dst+(24*fontheight)*fix_screeninfo.line_length, src + (24*fontheight)*fix_screeninfo.line_length, fix_screeninfo.line_length*fontheight); if (transpmode) fillcolor = transp; @@ -5367,7 +5367,7 @@ void CopyBB2FB() src += 12*fontheight*fix_screeninfo.line_length; /* copy topmenu in normal height (since PIG also keeps dimensions) */ - if (screenmode == 1) + if (screenmode == 1) { unsigned char *topdst = dst; diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h index d7a346ef7..6ef5cd0e9 100644 --- a/lib/libtuxtxt/tuxtxt_common.h +++ b/lib/libtuxtxt/tuxtxt_common.h @@ -537,7 +537,7 @@ void tuxtxt_allocate_cache(int magazine) ******************************************************************************/ //#define TUXTXT_DEBUG 1 //FIXME static int stop_cache = 0; -void *tuxtxt_CacheThread(void *arg) +void *tuxtxt_CacheThread(void * /*arg*/) { const unsigned char rev_lut[32] = { 0x00,0x08,0x04,0x0c, /* upper nibble */ diff --git a/src/driver/audiodec/basedec.cpp b/src/driver/audiodec/basedec.cpp index 6d2b0e0ef..f3cf0cc32 100644 --- a/src/driver/audiodec/basedec.cpp +++ b/src/driver/audiodec/basedec.cpp @@ -43,7 +43,7 @@ #include #include -#include +#include unsigned int CBaseDec::mSamplerate=0; @@ -194,7 +194,7 @@ bool CBaseDec::GetMetaDataBase(CAudiofile* const in, const bool nice) bool CBaseDec::SetDSP(int soundfd, int fmt, unsigned int dsp_speed, unsigned int channels) { bool crit_error=false; - + if (::ioctl(soundfd, SNDCTL_DSP_RESET)) printf("reset failed\n"); if(::ioctl(soundfd, SNDCTL_DSP_SETFMT, &fmt)) @@ -219,7 +219,7 @@ bool CBaseDec::SetDSP(int soundfd, int fmt, unsigned int dsp_speed, unsigned int // disable iec aka digi out (avia reset enables it again) //g_Zapit->IecOff(); #endif - } + } //usleep(400000); //if (!was_muted) // avs_mute(false); @@ -229,7 +229,7 @@ bool CBaseDec::SetDSP(int soundfd, int fmt, unsigned int dsp_speed, unsigned int return crit_error; } -bool CBaseDec::avs_mute(bool mute) +bool CBaseDec::avs_mute(bool /*mute*/) { return true; } diff --git a/src/driver/audiodec/int_fft.c b/src/driver/audiodec/int_fft.c index 0cf709c41..5f8a7f62d 100644 --- a/src/driver/audiodec/int_fft.c +++ b/src/driver/audiodec/int_fft.c @@ -274,7 +274,7 @@ int iscale(int value, int numer, int denom) /* fix_dot() - dot product of two fixed arrays */ -fixed fix_dot(fixed *hpa, fixed *pb, int n) +fixed fix_dot(fixed */*hpa*/, fixed *pb, int n) { fixed *pa = NULL; long sum; diff --git a/src/driver/audiodec/mp3dec.cpp b/src/driver/audiodec/mp3dec.cpp index 586ca9d2b..f4ee2da10 100644 --- a/src/driver/audiodec/mp3dec.cpp +++ b/src/driver/audiodec/mp3dec.cpp @@ -3,7 +3,7 @@ Copyright (C) 2002 Bjoern Kalkbrenner (C) 2002,2003,2004 Zwen - + libmad MP3 low-level core Homepage: http://www.cyberphoria.org/ @@ -90,7 +90,7 @@ void id3_finish_file(struct id3_file* file); } // Frames to skip in ff/rev mode -#define FRAMES_TO_SKIP 50 // 75 +#define FRAMES_TO_SKIP 50 // 75 // nr of frames to play after skipping in rev/ff mode #define FRAMES_TO_PLAY 5 @@ -267,7 +267,7 @@ inline signed short CMP3Dec::MadFixedToSShort(const mad_fixed_t Fixed) return 32767; else if (Fixed < -MAD_F_ONE) return -32768; - + return (signed short)(Fixed >> (MAD_F_FRACBITS + 1 - 16)); } #endif @@ -367,7 +367,7 @@ void CMP3Dec::CreateInfo(CAudioMetaData* m, int FrameNumber) #define INPUT_BUFFER_SIZE (2*8192) //(5*8192) /* enough to skip big id3 tags */ #define OUTPUT_BUFFER_SIZE 8192 #define SPECTRUM_CNT 4 -CBaseDec::RetCode CMP3Dec::Decoder(FILE *InputFp, const int OutputFd, +CBaseDec::RetCode CMP3Dec::Decoder(FILE *InputFp, const int /*OutputFd*/, State* const state, CAudioMetaData* meta_data, time_t* const time_played, @@ -458,7 +458,7 @@ CBaseDec::RetCode CMP3Dec::Decoder(FILE *InputFp, const int OutputFd, ReadSize=INPUT_BUFFER_SIZE, ReadStart=InputBuffer, Remaining=0; - + /* Fill-in the buffer. If an error occurs print a message * and leave the decoding loop. If the end of stream is * reached we also leave the loop but the return status is @@ -523,19 +523,19 @@ q * next mad_frame_decode() invocation. (See the comments marked * this case one can call again mad_frame_decode() in order to * skip the faulty part and re-sync to the next frame. */ - // decode 'FRAMES_TO_PLAY' frames each 'FRAMES_TO_SKIP' frames in ff/rev mode - if( (*state!=FF && - *state!=REV) || + // decode 'FRAMES_TO_PLAY' frames each 'FRAMES_TO_SKIP' frames in ff/rev mode + if( (*state!=FF && + *state!=REV) || FrameCount % actFramesToSkip < FRAMES_TO_PLAY ) ret=mad_frame_decode(&Frame,&Stream); else if(*state==FF) // in FF mode just decode the header, this sets bufferptr to next frame and also gives stats about the frame for totals if (secondsToJump != 0 && !jumpDone) - { + { jumpDone=true; // jump forwards long bytesForward = (Stream.bufend - Stream.this_frame) + ((ftell(InputFp)+Stream.this_frame-Stream.bufend) / FrameCount)*(actFramesToSkip + FRAMES_TO_PLAY); //printf("jump forwards by %d secs and %ld bytes",secondsToJump, bytesForward); - + if (fseek(InputFp, bytesForward, SEEK_CUR)!=0) { // Reached end, do nothing @@ -568,12 +568,12 @@ q * next mad_frame_decode() invocation. (See the comments marked *state=PLAY; continue; } else - { + { ret=mad_header_decode(&Frame.header,&Stream); } else { //REV - // Jump back + // Jump back long bytesBack = (Stream.bufend - Stream.this_frame) + ((ftell(InputFp)+Stream.this_frame-Stream.bufend) / FrameCount)*(actFramesToSkip + FRAMES_TO_PLAY); if (secondsToJump!=0) @@ -626,7 +626,7 @@ q * next mad_frame_decode() invocation. (See the comments marked if(MAD_RECOVERABLE(Stream.error)) { // no errrors in FF mode - if(*state!=FF && + if(*state!=FF && *state!=REV) { fprintf(stderr,"%s: recoverable frame level error (%s)\n", @@ -696,7 +696,7 @@ q * next mad_frame_decode() invocation. (See the comments marked mad_timer_reset(&Timer); Timer.seconds = *time_played; } - + /* Accounting. The computed frame duration is in the frame * header structure. It is expressed as a fixed point number * whole data type is mad_timer_t. It is different from the @@ -711,17 +711,17 @@ q * next mad_frame_decode() invocation. (See the comments marked // MAD_UNITS_MINUTES,MAD_UNITS_MILLISECONDS,0); *time_played = Timer.seconds; - + // decode 5 frames each 75 frames in ff mode if( *state!=FF || FrameCount % actFramesToSkip < FRAMES_TO_PLAY) { - + /* Once decoded the frame is synthesized to PCM samples. No errors * are reported by mad_synth_frame(); */ mad_synth_frame(&Synth, &Frame); - - + + /* Synthesized samples must be converted from mad's fixed * point number to the consumer format. Here we use signed * 16 bit native endian integers on two channels. Integer samples @@ -733,7 +733,7 @@ q * next mad_frame_decode() invocation. (See the comments marked { mad_fixed_t * leftchannel = Synth.pcm.samples[0]; mad_fixed_t * rightchannel = Synth.pcm.samples[1]; - + while (Synth.pcm.length-- > 0) { ll = MadFixedToSShort(*(leftchannel++), true); @@ -746,7 +746,7 @@ q * next mad_frame_decode() invocation. (See the comments marked #define DDIFF 0 if(g_settings.spectrum) { #if HAVE_DBOX2 - if(scnt == SPECTRUM_CNT-2) + if(scnt == SPECTRUM_CNT-2) #endif { j += 4; @@ -759,7 +759,7 @@ q * next mad_frame_decode() invocation. (See the comments marked } } #endif - + /* Flush the buffer if it is full. */ if (OutputPtr == OutputBufferEnd) { @@ -770,7 +770,7 @@ q * next mad_frame_decode() invocation. (See the comments marked Status = WRITE_ERR; break; } - + OutputPtr = OutputBuffer; #ifdef SPECTRUM if(g_settings.spectrum) { @@ -784,7 +784,7 @@ q * next mad_frame_decode() invocation. (See the comments marked //sanalyzer_render_vu(data); scnt++; #if HAVE_DBOX2 - if(scnt >= SPECTRUM_CNT) + if(scnt >= SPECTRUM_CNT) #endif { scnt = 0; @@ -798,7 +798,7 @@ q * next mad_frame_decode() invocation. (See the comments marked else { mad_fixed_t * leftchannel = Synth.pcm.samples[0]; - + while (Synth.pcm.length-- > 0) { /* Left channel => copy to right channel */ @@ -807,13 +807,13 @@ q * next mad_frame_decode() invocation. (See the comments marked ll = MadFixedToSShort(*(leftchannel++), false); rr = ll; *(((signed short *)OutputPtr) + 1) = *((signed short *)OutputPtr) = ll; - + OutputPtr += 4; #ifdef SPECTRUM #define DDIFF 1024 if(g_settings.spectrum) { #if HAVE_DBOX2 - if(scnt == SPECTRUM_CNT-2) + if(scnt == SPECTRUM_CNT-2) #endif { j += 4; @@ -826,7 +826,7 @@ q * next mad_frame_decode() invocation. (See the comments marked } } #endif - + /* Flush the buffer if it is full. */ if (OutputPtr == OutputBufferEnd) { @@ -837,7 +837,7 @@ q * next mad_frame_decode() invocation. (See the comments marked Status = WRITE_ERR; break; } - + OutputPtr = OutputBuffer; #ifdef SPECTRUM if(g_settings.spectrum) { @@ -849,7 +849,7 @@ q * next mad_frame_decode() invocation. (See the comments marked //int ms = (tv2.tv_sec - tv1.tv_sec) * 1000 + (tv2.tv_usec - tv1.tv_usec) / 1000; //if(ms)printf("Write takes %dms\n", ms); #if HAVE_DBOX2 - if(scnt >= SPECTRUM_CNT) + if(scnt >= SPECTRUM_CNT) #endif { sanalyzer_render_freq(data); @@ -860,7 +860,7 @@ q * next mad_frame_decode() invocation. (See the comments marked } } } - + // if a custom value was set we only jump once if ((*state==FF || *state==REV) && secondsToJump != 0 && !jumpDone) { jumpDone=true; @@ -1165,12 +1165,12 @@ void CMP3Dec::GetID3(FILE* in, CAudioMetaData* const m) id3_ucs4_t const *ucs4; id3_utf8_t *utf8; char const spaces[] = " "; - - struct + + struct { char const *id; char const *name; - } const info[] = + } const info[] = { { ID3_FRAME_TITLE, "Title"}, { "TIT3", 0}, /* Subtitle */ @@ -1345,7 +1345,7 @@ void CMP3Dec::GetID3(FILE* in, CAudioMetaData* const m) void id3_finish_file(struct id3_file* file) { unsigned int i; - + if (file->path) free(file->path); @@ -1353,20 +1353,20 @@ void id3_finish_file(struct id3_file* file) id3_tag_delref(file->primary); id3_tag_delete(file->primary); } - + for (i = 0; i < file->ntags; ++i) { struct id3_tag *tag; - + tag = file->tags[i].tag; if (tag) { id3_tag_delref(tag); id3_tag_delete(tag); } } - + if (file->tags) free(file->tags); - - free(file); -} + + free(file); +} diff --git a/src/driver/audiodec/oggdec.cpp b/src/driver/audiodec/oggdec.cpp index 6757a7749..3951f4118 100644 --- a/src/driver/audiodec/oggdec.cpp +++ b/src/driver/audiodec/oggdec.cpp @@ -2,14 +2,14 @@ Neutrino-GUI - DBoxII-Project Copyright (C) 2004 Sania, Zwen - + Homepage: http://www.dbox2.info/ Kommentar: ogg vorbis audio decoder uses tremor libvorbisidec - + License: GPL This program is free software; you can redistribute it and/or modify @@ -59,7 +59,7 @@ int ogg_seek(void *data, ogg_int64_t offset, int whence) return fseek((FILE*)data, (long)offset, whence); } -int ogg_close(void *data) +int ogg_close(void */*data*/) { return 0; } @@ -91,7 +91,7 @@ CBaseDec::RetCode COggDec::Decoder(FILE *in, const int OutputFd, State* const st SetMetaData(&vf, meta_data); audioDecoder->PrepareClipPlay(ov_info(&vf,0)->channels, ov_info(&vf,0)->rate, 16, 1); - + /* up and away ... */ mSlotSize = MAX_OUTPUT_SAMPLES * 2 * ov_info(&vf,0)->channels; for(int i = 0 ; i < DECODE_SLOTS ; i++) @@ -201,7 +201,7 @@ CBaseDec::RetCode COggDec::Decoder(FILE *in, const int OutputFd, State* const st /* clean up the junk from the party */ ov_clear(&vf); - + /* and drive home ;) */ return Status; } @@ -230,7 +230,7 @@ void* COggDec::OutputDsp(void * arg) return NULL; } -bool COggDec::GetMetaData(FILE *in, const bool nice, CAudioMetaData* m) +bool COggDec::GetMetaData(FILE *in, const bool /*nice*/, CAudioMetaData* m) { OggVorbis_File vf; if (!Open(in, &vf)) @@ -306,7 +306,7 @@ bool COggDec::Open(FILE* in, OggVorbis_File* vf) /* the netfile layer hooked in here. If we would not */ /* provide callbacks, the tremor lib and the netfile */ /* layer would clash and steal each other the data */ - /* from the stream ! */ + /* from the stream ! */ cb.read_func = ogg_read; cb.seek_func = ogg_seek; @@ -339,10 +339,10 @@ bool COggDec::Open(FILE* in, OggVorbis_File* vf) /* finish the opening and ignite the joint */ //ov_test_open(vf); - if(ov_seekable(vf)) + if(ov_seekable(vf)) mSeekable = true; else mSeekable = false; - + return true; } diff --git a/src/driver/audiodec/vis.cpp b/src/driver/audiodec/vis.cpp index 27b3ccfad..3f4f9b39c 100644 --- a/src/driver/audiodec/vis.cpp +++ b/src/driver/audiodec/vis.cpp @@ -41,7 +41,7 @@ static gdouble scale = 0; static gint xscale128[] = { 0, 1, 2, 3, 4, 6, 8, 9, 10, 14, 20, 27, 37, 50, 67, 94, 127 }; static gint xscale256[] = { 0, 1, 2, 3, 5, 7, 10, 14, 20, 28, 40, 54, 74, 101, 137, 187, 255 }; static gint xscale512[] = { 0, 2, 4, 6, 10, 14, 20, 28, 40, 56, 80, 108, 148, 202, 274, 374, 510 }; -#endif +#endif //#define DEBUG #if HAVE_DBOX2 #define SAMPLES 256 @@ -65,7 +65,7 @@ static void do_fft(gint16 out_data[], gint16 in_data[]) } #endif //static int threshold = -60; -void sanalyzer_render_freq (gint16 in_data[]) +void sanalyzer_render_freq (gint16 /*in_data*/[]) { #if 0 gint i, c; diff --git a/src/driver/audiodec/wavdec.cpp b/src/driver/audiodec/wavdec.cpp index 552d12987..7c6e4de40 100644 --- a/src/driver/audiodec/wavdec.cpp +++ b/src/driver/audiodec/wavdec.cpp @@ -2,13 +2,13 @@ Neutrino-GUI - DBoxII-Project Copyright (C) 2004 Zwen - + Homepage: http://www.dbox2.info/ Kommentar: wav audio decoder - + License: GPL This program is free software; you can redistribute it and/or modify @@ -78,7 +78,7 @@ int endianTest=1; CBaseDec::RetCode CWavDec::Decoder(FILE *in, int OutputFd, State* state, CAudioMetaData* meta_data, time_t* time_played, unsigned int* secondsToSkip) { char* buffer; - RetCode Status=OK; + RetCode Status=OK; if (!SetMetaData(in, meta_data)) { @@ -116,7 +116,7 @@ CBaseDec::RetCode CWavDec::Decoder(FILE *in, int OutputFd, State* state, CAudioM { while(*state==PAUSE) usleep(10000); - + if(*state==FF || *state==REV) { if (oldSecsToSkip != *secondsToSkip) @@ -158,14 +158,14 @@ CBaseDec::RetCode CWavDec::Decoder(FILE *in, int OutputFd, State* state, CAudioM { fprintf(stderr,"%s: PCM write error (%s).\n", ProgName, strerror(errno)); Status=WRITE_ERR; - } + } *time_played = (meta_data->bitrate!=0) ? (ftell(in)-header_size)*8/meta_data->bitrate : 0; } while (bytes > 0 && *state!=STOP_REQ && Status==OK); free(buffer); return Status; } -bool CWavDec::GetMetaData(FILE *in, const bool nice, CAudioMetaData* m) +bool CWavDec::GetMetaData(FILE *in, const bool /*nice*/, CAudioMetaData* m) { return SetMetaData(in, m); } @@ -186,7 +186,7 @@ bool CWavDec::SetMetaData(FILE* in, CAudioMetaData* m) struct WavHeader wh; header_size = 44; - + fseek(in, 0, SEEK_END); int filesize = ftell(in); fseek(in, 0, SEEK_SET); diff --git a/src/driver/audioplay.cpp b/src/driver/audioplay.cpp index ab903d027..3358043df 100644 --- a/src/driver/audioplay.cpp +++ b/src/driver/audioplay.cpp @@ -83,7 +83,7 @@ CAudioPlayer* CAudioPlayer::getInstance() return AudioPlayer; } -void* CAudioPlayer::PlayThread( void* dummy ) +void* CAudioPlayer::PlayThread( void* /*dummy*/ ) { int soundfd = -1; g_RCInput->close_click(); diff --git a/src/driver/fontrenderer.cpp b/src/driver/fontrenderer.cpp index 7822cd47b..7616538b2 100644 --- a/src/driver/fontrenderer.cpp +++ b/src/driver/fontrenderer.cpp @@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - + #ifdef HAVE_CONFIG_H #include #endif @@ -39,7 +39,7 @@ //#undef USE_NEVIS_GXA // since OSD problem gone with new driver, until GXA will be faster//reenabled GXA-luc FT_Error FBFontRenderClass::myFTC_Face_Requester(FTC_FaceID face_id, - FT_Library library, + FT_Library /*library*/, FT_Pointer request_data, FT_Face* aface) { @@ -90,7 +90,7 @@ FBFontRenderClass::FBFontRenderClass(const int xr, const int yr) FBFontRenderClass::~FBFontRenderClass() { fontListEntry * g; - + for (fontListEntry * f = font; f; f = g) { g = f->next; @@ -248,8 +248,8 @@ FT_Error Font::getGlyphBitmap(FT_ULong glyph_index, FTC_SBit *sbit) int Font::setSize(int isize) { - int temp = font.width; - font.width = font.height = isize; + int temp = font.width; + font.width = font.height = isize; scaler.width = isize * 64; scaler.height = isize * 64; @@ -305,7 +305,7 @@ int Font::getHeight(void) int UTF8ToUnicode(const char * &text, const bool utf8_encoded) // returns -1 on error { int unicode_value; -//printf("%c ", (unsigned char)(*text)); +//printf("%c ", (unsigned char)(*text)); if (utf8_encoded && ((((unsigned char)(*text)) & 0x80) != 0)) { int remaining_unicode_length; @@ -326,7 +326,7 @@ int UTF8ToUnicode(const char * &text, const bool utf8_encoded) // returns -1 on } else // cf.: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 return -1; // corrupted character or a character with > 4 bytes utf-8 representation - + for (int i = 0; i < remaining_unicode_length; i++) { text++; @@ -446,7 +446,7 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u (((fgt + deltat * i / 255) & ((1 << tl) - 1)) << to)); } } - + int spread_by = 0; if (stylemodifier == Font::Embolden) { diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index a5470d2e7..08091cfd9 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -105,10 +105,10 @@ static void _write_gxa(volatile unsigned char *base_addr, unsigned int offset, u static uint8_t * virtual_fb = NULL; inline unsigned int make16color(uint16_t r, uint16_t g, uint16_t b, uint16_t t, - uint32_t rl = 0, uint32_t ro = 0, - uint32_t gl = 0, uint32_t go = 0, - uint32_t bl = 0, uint32_t bo = 0, - uint32_t tl = 0, uint32_t to = 0) + uint32_t /*rl*/ = 0, uint32_t /*ro*/ = 0, + uint32_t /*gl*/ = 0, uint32_t /*go*/ = 0, + uint32_t /*bl*/ = 0, uint32_t /*bo*/ = 0, + uint32_t /*tl*/ = 0, uint32_t /*to*/ = 0) { return ((t << 24) & 0xFF000000) | ((r << 8) & 0xFF0000) | ((g << 0) & 0xFF00) | (b >> 8 & 0xFF); } @@ -284,7 +284,7 @@ CFrameBuffer::~CFrameBuffer() #endif if (lfb) munmap(lfb, available); - + if (virtual_fb) delete[] virtual_fb; close(fd); @@ -350,7 +350,7 @@ t_fb_var_screeninfo *CFrameBuffer::getScreenInfo() return &screeninfo; } -int CFrameBuffer::setMode(unsigned int nxRes, unsigned int nyRes, unsigned int nbpp) +int CFrameBuffer::setMode(unsigned int /*nxRes*/, unsigned int /*nyRes*/, unsigned int /*nbpp*/) { if (!available&&!active) return -1; @@ -400,7 +400,7 @@ printf("FB: %dx%dx%d line lenght %d\n", xRes, yRes, bpp, stride); return 0; } -void CFrameBuffer::setTransparency( int tr ) +void CFrameBuffer::setTransparency( int /*tr*/ ) { } @@ -454,7 +454,7 @@ void CFrameBuffer::paletteSet(struct fb_cmap *map) { if (!active) return; - + if(map == NULL) map = &cmap; @@ -505,37 +505,37 @@ void CFrameBuffer::paintBoxRel(const int x, const int y, const int dx, const int int corner_bl = (type & CORNER_BOTTOM_LEFT) ? 1 : 0; int corner_br = (type & CORNER_BOTTOM_RIGHT) ? 1 : 0; #ifdef USE_NEVIS_GXA - /* this table contains the x coordinates for a quarter circle (the bottom right quarter) with fixed + /* this table contains the x coordinates for a quarter circle (the bottom right quarter) with fixed radius of 540 px which is the half of the max HD graphics size of 1080 px. So with that table we ca draw boxes with round corners and als circles by just setting dx = dy = radius (max 540). */ static const int q_circle[541] = { - 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, - 540, 540, 540, 540, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, - 539, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 537, 537, 537, 537, 537, 537, 537, - 537, 537, 536, 536, 536, 536, 536, 536, 536, 536, 535, 535, 535, 535, 535, 535, 535, 535, 534, 534, - 534, 534, 534, 534, 533, 533, 533, 533, 533, 533, 532, 532, 532, 532, 532, 532, 531, 531, 531, 531, - 531, 531, 530, 530, 530, 530, 529, 529, 529, 529, 529, 529, 528, 528, 528, 528, 527, 527, 527, 527, - 527, 526, 526, 526, 526, 525, 525, 525, 525, 524, 524, 524, 524, 523, 523, 523, 523, 522, 522, 522, - 522, 521, 521, 521, 521, 520, 520, 520, 519, 519, 519, 518, 518, 518, 518, 517, 517, 517, 516, 516, - 516, 515, 515, 515, 515, 514, 514, 514, 513, 513, 513, 512, 512, 512, 511, 511, 511, 510, 510, 510, - 509, 509, 508, 508, 508, 507, 507, 507, 506, 506, 506, 505, 505, 504, 504, 504, 503, 503, 502, 502, - 502, 501, 501, 500, 500, 499, 499, 499, 498, 498, 498, 497, 497, 496, 496, 496, 495, 495, 494, 494, - 493, 493, 492, 492, 491, 491, 490, 490, 490, 489, 489, 488, 488, 487, 487, 486, 486, 485, 485, 484, - 484, 483, 483, 482, 482, 481, 481, 480, 480, 479, 479, 478, 478, 477, 477, 476, 476, 475, 475, 474, - 473, 473, 472, 472, 471, 471, 470, 470, 469, 468, 468, 467, 466, 466, 465, 465, 464, 464, 463, 462, - 462, 461, 460, 460, 459, 459, 458, 458, 457, 456, 455, 455, 454, 454, 453, 452, 452, 451, 450, 450, - 449, 449, 448, 447, 446, 446, 445, 445, 444, 443, 442, 441, 441, 440, 440, 439, 438, 437, 436, 436, - 435, 435, 434, 433, 432, 431, 431, 430, 429, 428, 427, 427, 426, 425, 425, 424, 423, 422, 421, 421, - 420, 419, 418, 417, 416, 416, 415, 414, 413, 412, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, - 403, 402, 401, 400, 399, 398, 397, 397, 395, 394, 393, 393, 392, 391, 390, 389, 388, 387, 386, 385, - 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 369, 368, 367, 367, 365, 364, - 363, 362, 361, 360, 358, 357, 356, 355, 354, 353, 352, 351, 350, 348, 347, 346, 345, 343, 342, 341, - 340, 339, 337, 336, 335, 334, 332, 331, 329, 328, 327, 326, 324, 323, 322, 321, 319, 317, 316, 315, - 314, 312, 310, 309, 308, 307, 305, 303, 302, 301, 299, 297, 296, 294, 293, 291, 289, 288, 287, 285, - 283, 281, 280, 278, 277, 275, 273, 271, 270, 268, 267, 265, 263, 261, 259, 258, 256, 254, 252, 250, - 248, 246, 244, 242, 240, 238, 236, 234, 232, 230, 228, 225, 223, 221, 219, 217, 215, 212, 210, 207, - 204, 202, 200, 197, 195, 192, 190, 187, 184, 181, 179, 176, 173, 170, 167, 164, 160, 157, 154, 150, - 147, 144, 140, 136, 132, 128, 124, 120, 115, 111, 105, 101, 95, 89, 83, 77, 69, 61, 52, 40, + 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, + 540, 540, 540, 540, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 538, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 536, 536, 536, 536, 536, 536, 536, 536, 535, 535, 535, 535, 535, 535, 535, 535, 534, 534, + 534, 534, 534, 534, 533, 533, 533, 533, 533, 533, 532, 532, 532, 532, 532, 532, 531, 531, 531, 531, + 531, 531, 530, 530, 530, 530, 529, 529, 529, 529, 529, 529, 528, 528, 528, 528, 527, 527, 527, 527, + 527, 526, 526, 526, 526, 525, 525, 525, 525, 524, 524, 524, 524, 523, 523, 523, 523, 522, 522, 522, + 522, 521, 521, 521, 521, 520, 520, 520, 519, 519, 519, 518, 518, 518, 518, 517, 517, 517, 516, 516, + 516, 515, 515, 515, 515, 514, 514, 514, 513, 513, 513, 512, 512, 512, 511, 511, 511, 510, 510, 510, + 509, 509, 508, 508, 508, 507, 507, 507, 506, 506, 506, 505, 505, 504, 504, 504, 503, 503, 502, 502, + 502, 501, 501, 500, 500, 499, 499, 499, 498, 498, 498, 497, 497, 496, 496, 496, 495, 495, 494, 494, + 493, 493, 492, 492, 491, 491, 490, 490, 490, 489, 489, 488, 488, 487, 487, 486, 486, 485, 485, 484, + 484, 483, 483, 482, 482, 481, 481, 480, 480, 479, 479, 478, 478, 477, 477, 476, 476, 475, 475, 474, + 473, 473, 472, 472, 471, 471, 470, 470, 469, 468, 468, 467, 466, 466, 465, 465, 464, 464, 463, 462, + 462, 461, 460, 460, 459, 459, 458, 458, 457, 456, 455, 455, 454, 454, 453, 452, 452, 451, 450, 450, + 449, 449, 448, 447, 446, 446, 445, 445, 444, 443, 442, 441, 441, 440, 440, 439, 438, 437, 436, 436, + 435, 435, 434, 433, 432, 431, 431, 430, 429, 428, 427, 427, 426, 425, 425, 424, 423, 422, 421, 421, + 420, 419, 418, 417, 416, 416, 415, 414, 413, 412, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, + 403, 402, 401, 400, 399, 398, 397, 397, 395, 394, 393, 393, 392, 391, 390, 389, 388, 387, 386, 385, + 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 369, 368, 367, 367, 365, 364, + 363, 362, 361, 360, 358, 357, 356, 355, 354, 353, 352, 351, 350, 348, 347, 346, 345, 343, 342, 341, + 340, 339, 337, 336, 335, 334, 332, 331, 329, 328, 327, 326, 324, 323, 322, 321, 319, 317, 316, 315, + 314, 312, 310, 309, 308, 307, 305, 303, 302, 301, 299, 297, 296, 294, 293, 291, 289, 288, 287, 285, + 283, 281, 280, 278, 277, 275, 273, 271, 270, 268, 267, 265, 263, 261, 259, 258, 256, 254, 252, 250, + 248, 246, 244, 242, 240, 238, 236, 234, 232, 230, 228, 225, 223, 221, 219, 217, 215, 212, 210, 207, + 204, 202, 200, 197, 195, 192, 190, 187, 184, 181, 179, 176, 173, 170, 167, 164, 160, 157, 154, 150, + 147, 144, 140, 136, 132, 128, 124, 120, 115, 111, 105, 101, 95, 89, 83, 77, 69, 61, 52, 40, 23}; int line = 0; @@ -755,7 +755,7 @@ void CFrameBuffer::paintVLineRel(int x, int y, int dy, const fb_pixel_t col) #if 0 fb_fillrect fillrect; fillrect.dx = x; - fillrect.dy = y; + fillrect.dy = y; fillrect.width = 1; fillrect.height = dy; fillrect.color = col; @@ -964,7 +964,7 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in #if 0 // no need if we have whole / as r/w std::string iconBasePath1 = "/var/share/icons/"; fd = open((iconBasePath1 + filename).c_str(), O_RDONLY); - if (fd == -1) + if (fd == -1) fd = open((iconBasePath + filename).c_str(), O_RDONLY); #endif fd = open((iconBasePath + filename).c_str(), O_RDONLY); @@ -1211,7 +1211,7 @@ bool CFrameBuffer::savePictureFromMem(const std::string & filename, const fb_pix struct rawHeader header; uint16_t width, height; int fd; - + width = BACKGROUNDIMAGEWIDTH; height = 576; diff --git a/src/driver/pictureviewer/bmp.cpp b/src/driver/pictureviewer/bmp.cpp index 6f2ac3fca..6b9db9f0a 100644 --- a/src/driver/pictureviewer/bmp.cpp +++ b/src/driver/pictureviewer/bmp.cpp @@ -26,13 +26,13 @@ int fh_bmp_id(const char *name) { int fd; char id[2]; - + fd = open(name, O_RDONLY); if (fd == -1) { // dbout("fh_bmp_id {\n"); return(0); } - + read(fd, id, 2); close(fd); if ( id[0]=='B' && id[1]=='M' ) { @@ -86,7 +86,7 @@ int fh_bmp_load(const char *name,unsigned char **buffer,int* xp,int* yp) read(fd, buff, 2); bpp = buff[0] + (buff[1]<<8); - + switch (bpp){ case 1: /* monochrome */ skip = fill4B(x/8+(x%8?1:0)); @@ -190,13 +190,13 @@ int fh_bmp_load(const char *name,unsigned char **buffer,int* xp,int* yp) printf("Error: malloc\n"); return (FH_ERROR_MALLOC); } - for (i=0; i (int)var->xres) x_offs = 0; if(y_offs + y_size > (int)var->yres) y_offs = 0; - + //printf("fb_display: bits_per_pixel: %d\n", var->bits_per_pixel); //printf("fb_display: var->xres %d var->yres %d x_size %d y_size %d\n", var->xres, var->yres, x_size, y_size); /* blit buffer 2 fb */ @@ -111,7 +111,7 @@ void make332map(struct fb_cmap *map) rs = 256 / (r - 1); gs = 256 / (g - 1); bs = 256 / (b - 1); - + for (i = 0; i < 256; i++) { map->red[i] = (rs * ((i / (g * b)) % r)) * 255; map->green[i] = (gs * ((i / b) % g)) * 255; @@ -156,7 +156,7 @@ void blit2FB(void *fbbuff, xc = (pic_xs > scr_xs) ? scr_xs : pic_xs; yc = (pic_ys > scr_ys) ? scr_ys : pic_ys; - + unsigned int stride = CFrameBuffer::getInstance()->getStride(); switch(cpp){ @@ -179,7 +179,7 @@ void blit2FB(void *fbbuff, } } -void clearFB(int bpp, int cpp) +void clearFB(int /*bpp*/, int cpp) { int x,y; getCurrentRes(&x,&y); @@ -240,17 +240,17 @@ inline unsigned char make8color(unsigned char r, unsigned char g, unsigned char inline unsigned short make15color(unsigned char r, unsigned char g, unsigned char b) { - return ( + return ( (((b >> 3) & 31) << 10) | (((g >> 3) & 31) << 5) | ((r >> 3) & 31) ); } -inline unsigned short make16color(uint32_t r, uint32_t g, uint32_t b, - uint32_t rl, uint32_t ro, - uint32_t gl, uint32_t go, - uint32_t bl, uint32_t bo, - uint32_t tl, uint32_t to) +inline unsigned short make16color(uint32_t r, uint32_t g, uint32_t b, + uint32_t rl, uint32_t ro, + uint32_t gl, uint32_t go, + uint32_t bl, uint32_t bo, + uint32_t /*tl*/, uint32_t /*to*/) { return ( // ((0xFF >> (8 - tl)) << to) | @@ -268,7 +268,7 @@ void* convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, in unsigned int *i_fbbuff; unsigned long count = x*y; uint32_t rl, ro, gl, go, bl, bo, tl, to; - + struct fb_var_screeninfo *var; var = CFrameBuffer::getInstance()->getScreenInfo(); rl = (var->red).length; @@ -279,7 +279,7 @@ void* convertRGB2FB(unsigned char *rgbbuff, unsigned long x, unsigned long y, in bo = (var->blue).offset; tl = (var->transp).length; to = (var->transp).offset; - + switch(bpp) { case 8: diff --git a/src/driver/pictureviewer/gif.cpp b/src/driver/pictureviewer/gif.cpp index 9d3d5cc94..84415c67d 100644 --- a/src/driver/pictureviewer/gif.cpp +++ b/src/driver/pictureviewer/gif.cpp @@ -33,7 +33,7 @@ int fh_gif_id(const char *name) return(0); } -inline void m_rend_gif_decodecolormap(unsigned char *cmb,unsigned char *rgbb,ColorMapObject *cm,int s,int l) +inline void m_rend_gif_decodecolormap(unsigned char *cmb,unsigned char *rgbb,ColorMapObject *cm,int /*s*/,int l) { GifColorType *cmentry; int i; @@ -45,7 +45,7 @@ inline void m_rend_gif_decodecolormap(unsigned char *cmb,unsigned char *rgbb,Col *(rgbb++)=cmentry->Blue; } } -int fh_gif_load(const char *name,unsigned char **buffer,int* xp,int* yp) +int fh_gif_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/) { int px,py,i,ibxs; int j; @@ -114,13 +114,13 @@ int fh_gif_load(const char *name,unsigned char **buffer,int* xp,int* yp) break; default: break; - } + } } while( rt!= TERMINATE_RECORD_TYPE ); DGifCloseFile(gft); return(FH_ERROR_OK); } -int fh_gif_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_height) +int fh_gif_getsize(const char *name,int *x,int *y, int /*wanted_width*/, int /*wanted_height*/) { int px,py; GifFileType *gft; @@ -151,7 +151,7 @@ int fh_gif_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_ break; default: break; - } + } } while( rt!= TERMINATE_RECORD_TYPE ); DGifCloseFile(gft); diff --git a/src/driver/pictureviewer/png.cpp b/src/driver/pictureviewer/png.cpp index 539b0b7b7..3b6603ef5 100644 --- a/src/driver/pictureviewer/png.cpp +++ b/src/driver/pictureviewer/png.cpp @@ -24,7 +24,7 @@ int fh_png_id(const char *name) } -int fh_png_load(const char *name,unsigned char **buffer,int* xp,int* yp) +int fh_png_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/) { static const png_color_16 my_background = {0, 0, 0, 0, 0}; @@ -48,14 +48,14 @@ int fh_png_load(const char *name,unsigned char **buffer,int* xp,int* yp) if(info_ptr == NULL) { png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL); - fclose(fh); + fclose(fh); return(FH_ERROR_FORMAT); } if(setjmp(png_ptr->jmpbuf)) { png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - fclose(fh); + fclose(fh); return(FH_ERROR_FORMAT); } @@ -116,7 +116,7 @@ int fh_png_load(const char *name,unsigned char **buffer,int* xp,int* yp) return(FH_ERROR_OK); } -int fh_png_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_height) +int fh_png_getsize(const char *name,int *x,int *y, int /*wanted_width*/, int /*wanted_height*/) { png_structp png_ptr; png_infop info_ptr; @@ -135,14 +135,14 @@ int fh_png_getsize(const char *name,int *x,int *y, int wanted_width, int wanted_ if(info_ptr == NULL) { png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL); - fclose(fh); + fclose(fh); return(FH_ERROR_FORMAT); } if(setjmp(png_ptr->jmpbuf)) { png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); - fclose(fh); + fclose(fh); return(FH_ERROR_FORMAT); } diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index b05893e3e..3a323bb92 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -227,7 +227,7 @@ void CRCInput::calculateMaxFd() for (int i = 0; i < NUMBER_OF_EVENT_DEVICES; i++) if (fd_rc[i] > fd_max) fd_max = fd_rc[i]; - + if(fd_pipe_high_priority[0] > fd_max) fd_max = fd_pipe_high_priority[0]; if(fd_pipe_low_priority[0] > fd_max) @@ -1120,12 +1120,12 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); int ret; ret = read(fd_rc[i], &ev, sizeof(t_input_event)); - if(ret != sizeof(t_input_event)) + if(ret != sizeof(t_input_event)) continue; printf("key: %04x value %d, translate: %04x -%s-\n", ev.code, ev.value, translate(ev.code, i), getKeyName(translate(ev.code, i)).c_str()); uint32_t trkey = translate(ev.code, i); - if (trkey == RC_nokey) + if (trkey == RC_nokey) continue; if (ev.value) { #ifdef RCDEBUG @@ -1151,7 +1151,7 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); if (rc_last_repeat_key != ev.code) { if ((now_pressed > last_keypress + repeat_block) || /* accept all keys after time discontinuity: */ - (now_pressed < last_keypress)) + (now_pressed < last_keypress)) rc_last_repeat_key = ev.code; else keyok = false; @@ -1170,7 +1170,7 @@ printf("[neutrino] CSectionsdClient::EVT_GOT_CN_EPG\n"); #ifdef ENABLE_REPEAT_CHECK if ((now_pressed > last_keypress + repeat_block_generic) || /* accept all keys after time discontinuity: */ - (now_pressed < last_keypress)) + (now_pressed < last_keypress)) #endif { last_keypress = now_pressed; @@ -1456,7 +1456,7 @@ std::string CRCInput::getKeyName(const unsigned int key) * transforms the rc-key to generic - internal use only! * **************************************************************************/ -int CRCInput::translate(int code, int num) +int CRCInput::translate(int code, int /*num*/) { if(code == 0x100) code = RC_up; else if(code == 0x101) code = RC_down; @@ -1474,7 +1474,7 @@ void CRCInput::open_click() { } -void CRCInput::reset_dsp(int rate) +void CRCInput::reset_dsp(int /*rate*/) { } diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index 6382e6280..1d1b95763 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -49,7 +49,7 @@ static unsigned int writebuf_size = 0; static unsigned char writebuf[PACKET_SIZE]; static int -sync_byte_offset (const unsigned char * buf, const unsigned int len) +sync_byte_offset (const unsigned char * buf, const unsigned int len) { unsigned int i; @@ -61,7 +61,7 @@ sync_byte_offset (const unsigned char * buf, const unsigned int len) return -1; } -void packet_stdout (int fd, unsigned char * buf, int count, void * p) +void packet_stdout (int fd, unsigned char * buf, int count, void * /*p*/) { unsigned int size; @@ -173,7 +173,7 @@ int open_incoming_port (int port) void * streamts_live_thread(void *data); int streamts_stop; -void streamts_main_thread(void *data) +void streamts_main_thread(void */*data*/) { struct sockaddr_in servaddr; int clilen; diff --git a/src/driver/vcrcontrol.cpp b/src/driver/vcrcontrol.cpp index eb36412a2..fe5841237 100644 --- a/src/driver/vcrcontrol.cpp +++ b/src/driver/vcrcontrol.cpp @@ -116,7 +116,7 @@ void CVCRControl::unregisterDevice() void CVCRControl::registerDevice(CDevice * const device) { unregisterDevice(); - + Device = device; } @@ -125,7 +125,7 @@ bool CVCRControl::Record(const CTimerd::RecordingInfo * const eventinfo) { int mode = g_Zapit->isChannelTVChannel(eventinfo->channel_id) ? NeutrinoMessages::mode_tv : NeutrinoMessages::mode_radio; - return Device->Record(eventinfo->channel_id, mode, eventinfo->epgID, eventinfo->epgTitle, eventinfo->apids, eventinfo->epg_starttime); + return Device->Record(eventinfo->channel_id, mode, eventinfo->epgID, eventinfo->epgTitle, eventinfo->apids, eventinfo->epg_starttime); } //------------------------------------------------------------------------- @@ -248,18 +248,18 @@ bool CVCRControl::CVCRDevice::Stop() } //------------------------------------------------------------------------- -bool CVCRControl::CVCRDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string& epgTitle, unsigned char apids, const time_t epg_time) +bool CVCRControl::CVCRDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string& /*epgTitle*/, unsigned char apids, const time_t /*epg_time*/) { printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " epg: %llx, apids 0x%X mode \n", channel_id, epgid, apids); // leave menu (if in any) g_RCInput->postMsg( CRCInput::RC_timeout, 0 ); - + last_mode = CNeutrinoApp::getInstance()->getMode(); if(mode != last_mode) { CNeutrinoApp::getInstance()->handleMsg( NeutrinoMessages::CHANGEMODE , mode | NeutrinoMessages::norezap ); } - + if(channel_id != 0) // wenn ein channel angegeben ist { if(g_Zapit->getCurrentServiceID() != channel_id) // und momentan noch nicht getuned ist @@ -319,7 +319,7 @@ void CVCRControl::CFileAndServerDevice::RestoreNeutrino(void) if (!g_Zapit->isPlayBackActive() && (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby)) g_Zapit->startPlayBack(); // alten mode wieder herstellen (ausser wen zwischenzeitlich auf oder aus sb geschalten wurde) - if(CNeutrinoApp::getInstance()->getMode() != last_mode && + if(CNeutrinoApp::getInstance()->getMode() != last_mode && CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby && last_mode != NeutrinoMessages::mode_standby) if(!autoshift) g_RCInput->postMsg( NeutrinoMessages::CHANGEMODE , last_mode); @@ -398,10 +398,10 @@ std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRComman } extMessage += extCommand; - extMessage += + extMessage += "\">\n" "\t\t"; - + CZapitClient::responseGetPIDs pids; g_Zapit->getPIDS (pids); CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo (); @@ -422,9 +422,9 @@ std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRComman extMessage += "unknown"; else extMessage += ZapitTools::UTF8_to_UTF8XML(tmpstring.c_str()); - + extMessage += "\n\t\t"; - + tmpstring = "not available"; if (epgid != 0) { @@ -440,12 +440,12 @@ std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRComman tmpstring = epgTitle; } extMessage += ZapitTools::UTF8_to_UTF8XML(tmpstring.c_str()); - + extMessage += "\n\t\t"; - + sprintf(tmp, PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id); extMessage += tmp; - + extMessage += "\n\t\t"; extMessage += ZapitTools::UTF8_to_UTF8XML(info1.c_str()); extMessage += "\n\t\t"; @@ -475,7 +475,7 @@ std::string CVCRControl::CFileAndServerDevice::getCommandString(const CVCRComman extMessage += ZapitTools::UTF8_to_UTF8XML(g_RemoteControl->current_PIDs.APIDs[i].desc); extMessage += "\"/>\n"; } - extMessage += + extMessage += "\t\t\n" "\t\t"; sprintf(tmp, "%u", si.vtxtpid); @@ -494,7 +494,7 @@ bool CVCRControl::CFileDevice::Stop() time_t end_time = time(0); //printf("[direct] Stop recording, g_movieInfo %lx\n", g_movieInfo); fflush(stdout); //FIXME why not save info if shift ? - //if(!autoshift || autoshift_delete) + //if(!autoshift || autoshift_delete) { // g_movieInfo->length = (end_time - start_time) / 60; g_movieInfo->length = (int) round((double) (end_time - start_time) / (double) 60); @@ -519,7 +519,7 @@ bool CVCRControl::CFileDevice::Stop() } std::string ext_channel_name; -bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string& epgTitle, unsigned char apids, const time_t epg_time) +bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string& epgTitle, unsigned char apids, const time_t epg_time) { printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " epg: %llx, apids 0x%X mode %d\n", channel_id, epgid, apids, mode); @@ -561,7 +561,7 @@ printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " epg: %llx // Create filename for recording pos = Directory.size(); strcpy(filename, Directory.c_str()); - + if ((pos == 0) || (filename[pos - 1] != '/')) { filename[pos] = '/'; pos++; @@ -597,21 +597,21 @@ printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " epg: %llx } else { perror("[vcrcontrol] mkdir"); } - + } else { perror("[vcrcontrol] stat"); } } else { // directory exists strcat(filename,"/"); - } - + } + } else strcat(filename, "_"); } pos = strlen(filename); - if (g_settings.recording_epg_for_filename) { + if (g_settings.recording_epg_for_filename) { if(epgid != 0) { CShortEPGData epgdata; //if (g_Sectionsd->getEPGidShort(epgid, &epgdata)) @@ -649,7 +649,7 @@ printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " epg: %llx start_time = time(0); stream2file_error_msg_t error_msg = ::start_recording(filename, - getMovieInfoString(CMD_VCR_RECORD, channel_id, epgid, epgTitle, apid_list, epg_time).c_str(), + getMovieInfoString(CMD_VCR_RECORD, channel_id, epgid, epgTitle, apid_list, epg_time).c_str(), si.vpid, pids, numpids); if (error_msg == STREAM2FILE_OK) { @@ -673,7 +673,7 @@ printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS " epg: %llx bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); -void CVCRControl::Screenshot(const t_channel_id channel_id, char * fname) +void CVCRControl::Screenshot(const t_channel_id channel_id, char * fname) { char filename[512]; // UTF-8 char cmd[512]; @@ -687,7 +687,7 @@ void CVCRControl::Screenshot(const t_channel_id channel_id, char * fname) return; strcpy(filename, "/hdd/screenshots/"); - + pos = strlen(filename); channel_name = g_Zapit->getChannelName(channel_id); if (!(channel_name.empty())) { @@ -750,7 +750,7 @@ bool CVCRControl::CServerDevice::Stop() } //------------------------------------------------------------------------- -bool CVCRControl::CServerDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string& epgTitle, unsigned char apids, const time_t epg_time) +bool CVCRControl::CServerDevice::Record(const t_channel_id channel_id, int mode, const event_id_t epgid, const std::string& epgTitle, unsigned char apids, const time_t /*epg_time*/) { printf("Record channel_id: " PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS @@ -839,7 +839,7 @@ extern unsigned short g_numpida; extern unsigned int g_currentapid, g_currentac3; //------------------------------------------------------------------------- -std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const CVCRCommand command, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, APIDList apid_list, const time_t epg_time) +std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const CVCRCommand /*command*/, const t_channel_id channel_id, const event_id_t epgid, const std::string& epgTitle, APIDList apid_list, const time_t epg_time) { std::string extMessage; std::string apids10; @@ -869,14 +869,14 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const CVCRComm tmpstring = epgdata.title; info1 = epgdata.info1; info2 = epgdata.info2; - + g_movieInfo->parentalLockAge = epgdata.fsk; if(epgdata.contentClassification.size() > 0 ) g_movieInfo->genreMajor = epgdata.contentClassification[0]; - + g_movieInfo->length = epgdata.epg_times.dauer / 60; - - printf("fsk:%d, Genre:%d, Dauer: %d\r\n",g_movieInfo->parentalLockAge,g_movieInfo->genreMajor,g_movieInfo->length); + + printf("fsk:%d, Genre:%d, Dauer: %d\r\n",g_movieInfo->parentalLockAge,g_movieInfo->genreMajor,g_movieInfo->length); } } else if (!epgTitle.empty()) { tmpstring = epgTitle; @@ -934,7 +934,7 @@ std::string CVCRControl::CFileAndServerDevice::getMovieInfoString(const CVCRComm g_movieInfo->epgVTXPID = si.vtxtpid; g_cMovieInfo->encodeMovieInfoXml(&extMessage, g_movieInfo); - + //g_movieInfo->audioPids.clear(); return extMessage; diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp index 7b73bf61e..089388c1c 100644 --- a/src/driver/vfd.cpp +++ b/src/driver/vfd.cpp @@ -94,7 +94,7 @@ void CVFD::count_down() { setPower(0); } } - } + } } void CVFD::wake_up() { @@ -121,7 +121,7 @@ void* CVFD::TimeThread(void *) return NULL; } -void CVFD::init(const char * fontfile, const char * fontname) +void CVFD::init(const char * /*fontfile*/, const char * /*fontname*/) { //InitNewClock(); /FIXME @@ -198,7 +198,7 @@ void CVFD::showTime(bool force) strftime(timestr, 20, "%H:%M", t); ShowText((char *) timestr); } - } + } } if (CNeutrinoApp::getInstance ()->recordingstatus) { @@ -215,11 +215,11 @@ void CVFD::showTime(bool force) } } -void CVFD::showRCLock(int duration) +void CVFD::showRCLock(int /*duration*/) { } -void CVFD::showVolume(const char vol, const bool perform_update) +void CVFD::showVolume(const char vol, const bool /*perform_update*/) { static int oldpp = 0; if(!has_lcd) return; @@ -253,12 +253,12 @@ printf("CVFD::showVolume: %d, bar %d\n", (int) vol, pp); } } -void CVFD::showPercentOver(const unsigned char perc, const bool perform_update) +void CVFD::showPercentOver(const unsigned char perc, const bool /*perform_update*/) { if(!has_lcd) return; if ((mode == MODE_TVRADIO) && !(g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME])) { - //if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 0) + //if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 0) { ShowIcon(VFD_ICON_FRAME, true); int pp; @@ -285,7 +285,7 @@ printf("CVFD::showPercentOver: %d, bar %d\n", (int) perc, pp); } } -void CVFD::showMenuText(const int position, const char * text, const int highlight, const bool utf_encoded) +void CVFD::showMenuText(const int /*position*/, const char * text, const int /*highlight*/, const bool /*utf_encoded*/) { if(!has_lcd) return; if (mode != MODE_MENU_UTF8) @@ -295,10 +295,10 @@ void CVFD::showMenuText(const int position, const char * text, const int highlig wake_up(); } -void CVFD::showAudioTrack(const std::string & artist, const std::string & title, const std::string & album) +void CVFD::showAudioTrack(const std::string & /*artist*/, const std::string & title, const std::string & /*album*/) { if(!has_lcd) return; - if (mode != MODE_AUDIO) + if (mode != MODE_AUDIO) return; printf("CVFD::showAudioTrack: %s\n", title.c_str()); ShowText((char *) title.c_str()); @@ -335,7 +335,7 @@ void CVFD::showAudioPlayMode(AUDIOMODES m) wake_up(); } -void CVFD::showAudioProgress(const char perc, bool isMuted) +void CVFD::showAudioProgress(const char /*perc*/, bool /*isMuted*/) { if(!has_lcd) return; #if 0 // what is this ? FIXME @@ -480,7 +480,7 @@ int CVFD::getBrightnessStandby() return g_settings.lcd_setting[SNeutrinoSettings::LCD_STANDBY_BRIGHTNESS]; } -void CVFD::setPower(int power) +void CVFD::setPower(int /*power*/) { if(!has_lcd) return; // old @@ -564,9 +564,9 @@ printf("CVFD::ShowText: [%s]\n", str); return; strcpy(text, str); - + //printf("****************************** CVFD::ShowText: %s\n", str); - //FIXME !! + //FIXME !! ret = ioctl(fd, IOC_VFD_SET_TEXT, len ? str : NULL); if(ret < 0) perror("IOC_VFD_SET_TEXT"); diff --git a/src/gui/alphasetup.cpp b/src/gui/alphasetup.cpp index 94ba4871e..16bb106ba 100644 --- a/src/gui/alphasetup.cpp +++ b/src/gui/alphasetup.cpp @@ -256,7 +256,7 @@ void CAlphaSetup::paint() //paintSlider(x + 10, y + hheight + mheight, alpha2, LOCALE_GTXALPHA_ALPHA2, ALPHA_SETUP_ICON_DESELECTED , false); } -void CAlphaSetup::paintSlider(const int x, const int y, const unsigned char * const spos, const neutrino_locale_t text, const char * const iconname, const bool selected) // UTF-8 +void CAlphaSetup::paintSlider(const int x, const int y, const unsigned char * const spos, const neutrino_locale_t text, const char * const iconname, const bool /*selected*/) // UTF-8 { if (!spos) return; diff --git a/src/gui/audio_select.cpp b/src/gui/audio_select.cpp index e8ca5ff5b..65aa07a25 100644 --- a/src/gui/audio_select.cpp +++ b/src/gui/audio_select.cpp @@ -50,7 +50,7 @@ int dvbsub_getpid(); // -- AUDIO Selector Menue Handler Class // -- to be used for calls from Menue // -- (2005-08-31 rasc) -// +// // -- this is a copy from neutrino.cpp!! #define AUDIOMENU_ANALOGOUT_OPTION_COUNT 3 @@ -61,7 +61,7 @@ const CMenuOptionChooser::keyval AUDIOMENU_ANALOGOUT_OPTIONS[AUDIOMENU_ANALOGOUT { 2, LOCALE_AUDIOMENU_MONORIGHT } }; -int CAudioSelectMenuHandler::exec(CMenuTarget* parent, const std::string &actionkey) +int CAudioSelectMenuHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/) { int res = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 537168231..fcb0a9b9a 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -183,7 +183,7 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) // we borrow this from filebrowser extern size_t CurlWriteToString(void *ptr, size_t size, size_t nmemb, void *data); -CAudioPlayerGui::CAudioPlayerGui(bool inetmode) +CAudioPlayerGui::CAudioPlayerGui(bool /*inetmode*/) { m_frameBuffer = CFrameBuffer::getInstance(); m_visible = false; diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 21a131e58..0d589cd91 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -170,7 +170,7 @@ void CBEBouquetWidget::hide() frameBuffer->paintBackgroundBoxRel(x,y, width,height+ButtonHeight); } -int CBEBouquetWidget::exec(CMenuTarget* parent, const std::string & actionKey) +int CBEBouquetWidget::exec(CMenuTarget* parent, const std::string & /*actionKey*/) { neutrino_msg_t msg; neutrino_msg_data_t data; diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index a60a4829f..bb3abfcce 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -157,7 +157,7 @@ void CBEChannelWidget::hide() frameBuffer->paintBackgroundBoxRel(x,y, width,height+ButtonHeight); } -int CBEChannelWidget::exec(CMenuTarget* parent, const std::string & actionKey) +int CBEChannelWidget::exec(CMenuTarget* parent, const std::string & /*actionKey*/) { neutrino_msg_t msg; neutrino_msg_data_t data; diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index e468bdab8..a3047038a 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -165,7 +165,7 @@ void CChannelList::updateEvents(void) sectionsd_getEventsServiceKey(chanlist[count]->channel_id &0xFFFFFFFFFFFFULL, events); chanlist[count]->nextEvent.startTime = (long)0x7fffffff; for ( CChannelEventList::iterator e= events.begin(); e != events.end(); ++e ) { - if (((long)(e->startTime) > atime) && + if (((long)(e->startTime) > atime) && ((e->startTime) < (long)(chanlist[count]->nextEvent.startTime))) { chanlist[count]->nextEvent= *e; @@ -398,7 +398,7 @@ int CChannelList::doChannelMenu(void) addChannelToBouquet(bouquet_id, channel_id); return 1; } - + break; default: break; @@ -515,7 +515,7 @@ int CChannelList::show() paintHead(); paint(); } - + } else if (msg == (neutrino_msg_t) g_settings.key_list_start) { selected=0; @@ -706,7 +706,7 @@ int CChannelList::show() } else if ((msg == CRCInput::RC_info) || (msg == CRCInput::RC_help)) { hide(); - g_EpgData->show(chanlist[selected]->channel_id); + g_EpgData->show(chanlist[selected]->channel_id); paintHead(); paint(); } else { @@ -775,11 +775,11 @@ int CChannelList::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data) { g_RemoteControl->stopvideo(); zapProtection = new CZapProtection( g_settings.parentallock_pincode, data ); - + if ( zapProtection->check() ) { g_RemoteControl->startvideo(); - + // remember it for the next time chanlist[selected]->last_unlocked_EPGid= g_RemoteControl->current_EPGid; } @@ -824,7 +824,7 @@ printf("CChannelList::adjustToChannelID me %x list size %d channel_id %llx\n", ( TVsatList->adjustToChannelID(channel_id); TVfavList->adjustToChannelID(channel_id); TVallList->adjustToChannelID(channel_id); - } + } else if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) { RADIObouquetList->adjustToChannelID(channel_id); RADIOsatList->adjustToChannelID(channel_id); @@ -912,7 +912,7 @@ printf("**************************** CChannelList::zapTo me %x %s tuned %d new % TVbouquetList->adjustToChannelID(chan->channel_id); TVsatList->adjustToChannelID(chan->channel_id); TVfavList->adjustToChannelID(chan->channel_id); - } + } else if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) { RADIObouquetList->adjustToChannelID(chan->channel_id); RADIOsatList->adjustToChannelID(chan->channel_id); @@ -1273,7 +1273,7 @@ void CChannelList::paintDetails(int index) #if 0 if (chanlist[index]->currentEvent.description.empty()) { frameBuffer->paintBackgroundBoxRel(x, y+ height, width, info_height); - } else + } else #endif { frameBuffer->paintBoxRel(x+2, y + height + 2, width-4, info_height - 4, COL_MENUCONTENTDARK_PLUS_0, ROUND_RADIUS);//round @@ -1372,7 +1372,7 @@ void CChannelList::clearItem2DetailsLine () paintItem2DetailsLine (-1, 0); } -void CChannelList::paintItem2DetailsLine (int pos, int ch_index) +void CChannelList::paintItem2DetailsLine (int pos, int /*ch_index*/) { #define ConnectLineBox_Width 16 @@ -1446,7 +1446,7 @@ void CChannelList::paintItem(int pos) g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(numpos,ypos+fheight, numwidth+5, tmp, color, fheight); char nameAndDescription[255]; if (!(chan->currentEvent.description.empty())) { - snprintf(nameAndDescription, sizeof(nameAndDescription), "%s - %s", + snprintf(nameAndDescription, sizeof(nameAndDescription), "%s - %s", chan->name.c_str(), chan->currentEvent.description.c_str()); } else { snprintf(nameAndDescription, sizeof(nameAndDescription), "%s", chan->name.c_str()); @@ -1464,7 +1464,7 @@ void CChannelList::paintItem(int pos) int title_offset=0; uint8_t tcolor=(liststart + pos == selected) ? color : COL_MENUCONTENTINACTIVE; int xtheight=fheight-2; - + if(g_settings.channellist_extended) { prg_offset=42; @@ -1480,7 +1480,7 @@ void CChannelList::paintItem(int pos) p_event = &chan->currentEvent; } - if(chan->scrambled) + if(chan->scrambled) frameBuffer->paintIcon("ca.raw", x+width- 15 - 28, ypos + (fheight - 16)/2); int numpos = x+5+numwidth- g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth(tmp); @@ -1496,7 +1496,7 @@ void CChannelList::paintItem(int pos) int pb_space = prg_offset - title_offset; int pb_max = pb_space - 4; if (!(p_event->description.empty())) { - + snprintf(nameAndDescription+l, sizeof(nameAndDescription)-l," - "); unsigned int ch_name_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(nameAndDescription, true); unsigned int ch_desc_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(p_event->description, true); @@ -1505,12 +1505,12 @@ void CChannelList::paintItem(int pos) ch_desc_len = (width- numwidth- 60- 15- ch_name_len - prg_offset); if (ch_desc_len< 0) ch_desc_len = 0; - + if(g_settings.channellist_extended){ if(displayNext) { struct tm *pStartZeit = localtime(&p_event->startTime); - + sprintf((char*) tmp, "%02d:%02d", pStartZeit->tm_hour, pStartZeit->tm_min); // g_Font[SNeutrinoSettings::FONT_TYPE_IMAGEINFO_SMALL]->RenderString(x+ 5+ numwidth+ 6, ypos+ xtheight, width- numwidth- 20- 15 -poffs, tmp, COL_MENUCONTENT, 0, true); g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(x+ 5+ numwidth+ 6, ypos+ xtheight, width- numwidth- 20- 15 -prg_offset, tmp, tcolor, 0, true); @@ -1519,7 +1519,7 @@ void CChannelList::paintItem(int pos) { time_t jetzt=time(NULL); int runningPercent = 0; - + if (((jetzt - p_event->startTime + 30) / 60) < 0 ) { runningPercent= 0; @@ -1570,7 +1570,7 @@ void CChannelList::paintItem(int pos) } if (curr == selected) { if (!(chan->currentEvent.description.empty())) { - snprintf(nameAndDescription, sizeof(nameAndDescription), "%s - %s", + snprintf(nameAndDescription, sizeof(nameAndDescription), "%s - %s", chan->name.c_str(), p_event->description.c_str()); CVFD::getInstance()->showMenuText(0, nameAndDescription, -1, true); // UTF-8 } else @@ -1618,7 +1618,7 @@ void CChannelList::paintHead() } frameBuffer->paintBoxRel(x, y + (height - buttonHeight), width, buttonHeight - 1, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); //round - ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + (height - buttonHeight) + 3, ButtonWidth, + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, x + 10, y + (height - buttonHeight) + 3, ButtonWidth, vlist ? NUM_VLIST_BUTTONS : NUM_LIST_BUTTONS, vlist ? CChannelVListButtons : CChannelListButtons); frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_HELP, x+ width- 30, y+ 5 ); diff --git a/src/gui/epg_menu.cpp b/src/gui/epg_menu.cpp index fc01605f7..c6137c6ad 100644 --- a/src/gui/epg_menu.cpp +++ b/src/gui/epg_menu.cpp @@ -48,9 +48,9 @@ // -- EPG Menue Handler Class // -- to be used for calls from Menue // -- (2004-03-06 rasc) -// +// -int CEPGMenuHandler::exec(CMenuTarget* parent, const std::string &actionkey) +int CEPGMenuHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/) { int res = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index ae298cd59..468ea5294 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -551,8 +551,8 @@ void EpgPlus::createChannelEntries (int selectedChannelEntryIndex) time_t lastEndTime = this->startTime; CChannelEventList::const_iterator lastIt (channelEventList.end ()); - //for (CChannelEventList::const_iterator It = channelEventList.begin (); (It != channelEventList.end ()) && (It->startTime < (this->startTime + this->duration)); ++It) - for (CChannelEventList::const_iterator It = channelEventList.begin (); It != channelEventList.end (); ++It) + //for (CChannelEventList::const_iterator It = channelEventList.begin (); (It != channelEventList.end ()) && (It->startTime < (this->startTime + this->duration)); ++It) + for (CChannelEventList::const_iterator It = channelEventList.begin (); It != channelEventList.end (); ++It) { //if(0x2bc000b004b7ULL == (channel->channel_id & 0xFFFFFFFFFFFFULL)) printf("*** Check1 event %s event start %ld this start %ld\n", It->description.c_str(), It->startTime, (this->startTime + this->duration)); if(!(It->startTime < (this->startTime + this->duration)) ) @@ -1167,7 +1167,7 @@ void EpgPlus::paint () // -- to be used for calls from Menue // -- (2004-03-05 rasc) -int CEPGplusHandler::exec (CMenuTarget * parent, const std::string & actionKey) +int CEPGplusHandler::exec (CMenuTarget * parent, const std::string & /*actionKey*/) { int res = menu_return::RETURN_EXIT_ALL; EpgPlus *e; @@ -1189,7 +1189,7 @@ EpgPlus::MenuTargetAddReminder::MenuTargetAddReminder (EpgPlus * epgPlus) { this->epgPlus = epgPlus; } -int EpgPlus::MenuTargetAddReminder::exec (CMenuTarget * parent, const std::string & actionKey) +int EpgPlus::MenuTargetAddReminder::exec (CMenuTarget * /*parent*/, const std::string & /*actionKey*/) { TCChannelEventEntries::const_iterator It = this->epgPlus->getSelectedEvent (); @@ -1211,7 +1211,7 @@ EpgPlus::MenuTargetAddRecordTimer::MenuTargetAddRecordTimer (EpgPlus * epgPlus) this->epgPlus = epgPlus; } -int EpgPlus::MenuTargetAddRecordTimer::exec (CMenuTarget * parent, const std::string & actionKey) +int EpgPlus::MenuTargetAddRecordTimer::exec (CMenuTarget * /*parent*/, const std::string & /*actionKey*/) { TCChannelEventEntries::const_iterator It = this->epgPlus->getSelectedEvent (); @@ -1234,7 +1234,7 @@ EpgPlus::MenuTargetRefreshEpg::MenuTargetRefreshEpg (EpgPlus * epgPlus) { this->epgPlus = epgPlus; } -int EpgPlus::MenuTargetRefreshEpg::exec (CMenuTarget * parent, const std::string & actionKey) +int EpgPlus::MenuTargetRefreshEpg::exec (CMenuTarget * /*parent*/, const std::string & /*actionKey*/) { this->epgPlus->refreshAll = true; return menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 48e27f2bf..42cef387a 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -391,7 +391,7 @@ const neutrino_locale_t * genre_sub_classes_list[10] = genre_travel_hobbies }; -bool CEpgData::hasFollowScreenings(const t_channel_id channel_id, const std::string & title) { +bool CEpgData::hasFollowScreenings(const t_channel_id /*channel_id*/, const std::string & title) { time_t curtime = time(NULL); for (CChannelEventList::iterator e = evtlist.begin(); e != evtlist.end(); ++e ) @@ -968,7 +968,7 @@ void CEpgData::GetPrevNextEPGData( unsigned long long id, time_t* startzeit ) // -- 2002-05-03 rasc // -int CEpgData::FollowScreenings (const t_channel_id channel_id, const std::string & title) +int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::string & title) { CChannelEventList::iterator e; @@ -1059,7 +1059,7 @@ void CEpgData::showTimerEventBar (bool show) // -- to be used for calls from Menue // -- (2004-03-06 rasc) -int CEPGDataHandler::exec(CMenuTarget* parent, const std::string &actionkey) +int CEPGDataHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/) { int res = menu_return::RETURN_EXIT_ALL; CChannelList *channelList; diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index c712401bd..280d02256 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -112,7 +112,7 @@ void EventList::readEvents(const t_channel_id channel_id) time_t azeit=time(NULL); CChannelEventList::iterator e; - + if ( evtlist.size() != 0 ) { CEPGData epgData; @@ -130,7 +130,7 @@ void EventList::readEvents(const t_channel_id channel_id) { CChannelEventList evtlist2; // stores the temporary eventlist of the subchannel channelid t_channel_id channel_id2; -#if 0 +#if 0 for (e=evtlist.begin(); e!=evtlist.end(); ++e ) { if ( e->startTime > azeit ) { @@ -139,14 +139,14 @@ void EventList::readEvents(const t_channel_id channel_id) } // next line is to have a valid e if (evtlist.end() == e) --e; -#endif +#endif for (unsigned int i=0; igetEventsServiceKey(channel_id2); @@ -156,10 +156,10 @@ void EventList::readEvents(const t_channel_id channel_id) for (unsigned int loop=0 ; loop= azeit) /*&& +#if 0 + if ( (evtlist2[loop].startTime >= azeit) /*&& (evtlist2[loop].startTime < e->startTime + (int)e->duration)*/ ) -#endif +#endif { //FIXME: bad ?evtlist2[loop].sub = true; evtlist.push_back(evtlist2[loop]); @@ -186,7 +186,7 @@ void EventList::readEvents(const t_channel_id channel_id) g_Timerd->getTimerList (timerlist); } - + current_event = (unsigned int)-1; for ( e=evtlist.begin(); e!=evtlist.end(); ++e ) { @@ -220,7 +220,7 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam bool in_search = 0; width = w_max (580, 20); - height = h_max (480, 20); + height = h_max (480, 20); iheight = 30; // info bar height (see below, hard coded at this time) theight = g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_TITLE]->getHeight(); @@ -402,18 +402,18 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam { int id = -1; CMountChooser recDirs(LOCALE_TIMERLIST_RECORDING_DIR,NEUTRINO_ICON_SETTINGS,&id,NULL,g_settings.network_nfs_recordingdir); - if (recDirs.hasItem()) + if (recDirs.hasItem()) { hide(); recDirs.exec(NULL,""); paint(channel_id); } else { - printf("[CEventList] no network devices available\n"); + printf("[CEventList] no network devices available\n"); } if (id != -1) recDir = g_settings.network_nfs_local_dir[id]; - else + else recDir = NULL; } if (recDir != NULL) @@ -446,7 +446,7 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam timerlist.clear(); g_Timerd->getTimerList (timerlist); paint(channel_id); - } + } } else if ( msg == (neutrino_msg_t) g_settings.key_channelList_addremind ) { @@ -460,7 +460,7 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam continue; } // FIXME g_Timerd->addZaptoTimerEvent(evtlist[selected].sub ? GET_CHANNEL_ID_FROM_EVENT_ID(evtlist[selected].eventID) : channel_id, - g_Timerd->addZaptoTimerEvent(channel_id, + g_Timerd->addZaptoTimerEvent(channel_id, evtlist[selected].startTime, evtlist[selected].startTime - ANNOUNCETIME, 0, evtlist[selected].eventID, evtlist[selected].startTime, 0); @@ -475,7 +475,7 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam selected = oldselected; loop = false; } - else if (msg == (neutrino_msg_t)g_settings.key_channelList_cancel) + else if (msg == (neutrino_msg_t)g_settings.key_channelList_cancel) { if(in_search) { in_search = false; @@ -765,7 +765,7 @@ void EventList::showFunctionBar (bool show) } } -int CEventListHandler::exec(CMenuTarget* parent, const std::string &actionkey) +int CEventListHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/) { int res = menu_return::RETURN_EXIT_ALL; EventList *e; @@ -790,13 +790,13 @@ int CEventListHandler::exec(CMenuTarget* parent, const std::string &actionkey) /************************************************************************************************/ -int EventList::findEvents(void) +int EventList::findEvents(void) /************************************************************************************************/ { int res = 0; int event = 0; t_channel_id channel_id; //g_Zapit->getCurrentServiceID() - + CEventFinderMenu menu( &event, &m_search_epg_item, &m_search_keyword, @@ -806,7 +806,7 @@ int EventList::findEvents(void) ); hide(); menu.exec(NULL,""); - + if(event == 1) { res = 1; @@ -847,7 +847,7 @@ int EventList::findEvents(void) sort(evtlist.begin(),evtlist.end(),sortByDateTime); current_event = (unsigned int)-1; time_t azeit=time(NULL); - + CChannelEventList::iterator e; for ( e=evtlist.begin(); e!=evtlist.end(); ++e ) { @@ -866,11 +866,11 @@ int EventList::findEvents(void) evt.eventID = 0; evtlist.push_back(evt); } - } + } if (current_event == (unsigned int)-1) current_event = 0; selected= current_event; - + name = g_Locale->getText(LOCALE_EVENTFINDER_SEARCH); name += ": '"; name += m_search_keyword; @@ -908,7 +908,7 @@ bool CEventFinderMenuHandler::changeNotify(const neutrino_locale_t OptionName, v return true; } */ - + #define SEARCH_LIST_OPTION_COUNT 3 const CMenuOptionChooser::keyval SEARCH_LIST_OPTIONS[SEARCH_LIST_OPTION_COUNT] = { @@ -935,7 +935,7 @@ const CMenuOptionChooser::keyval SEARCH_EPG_OPTIONS[SEARCH_EPG_OPTION_COUNT] = CEventFinderMenu::CEventFinderMenu( int* event, int* search_epg_item, std::string* search_keyword, - int* search_list, + int* search_list, t_channel_id* search_channel_id, t_bouquet_id* search_bouquet_id) /************************************************************************************************/ @@ -954,8 +954,8 @@ int CEventFinderMenu::exec(CMenuTarget* parent, const std::string &actionkey) /************************************************************************************************/ { int res = menu_return::RETURN_REPAINT; - - + + if(actionkey =="") { if(parent != NULL) @@ -968,7 +968,7 @@ int CEventFinderMenu::exec(CMenuTarget* parent, const std::string &actionkey) //printf("1\n"); *m_event = true; res = menu_return::RETURN_EXIT_ALL; - } + } else if(actionkey =="2") { //printf("2\n"); @@ -989,7 +989,7 @@ int CEventFinderMenu::exec(CMenuTarget* parent, const std::string &actionkey) m_search_channelname = ""; } */ - } + } else if(actionkey =="3") { //printf("3\n"); @@ -1023,12 +1023,12 @@ int CEventFinderMenu::exec(CMenuTarget* parent, const std::string &actionkey) m_search_channelname = bouquetList->Bouquets[nNewBouquet]->channelList->getName(); } } - } + } else if(actionkey =="4") { //printf("4\n"); - } - + } + return res; } @@ -1038,7 +1038,7 @@ int CEventFinderMenu::showMenu(void) { int res = menu_return::RETURN_REPAINT; *m_event = false; - + if(*m_search_list == EventList::SEARCH_LIST_CHANNEL) { m_search_channelname = g_Zapit->getChannelName(*m_search_channel_id); @@ -1051,15 +1051,15 @@ int CEventFinderMenu::showMenu(void) { m_search_channelname ==""; } - + CStringInputSMS stringInput(LOCALE_EVENTFINDER_KEYWORD,m_search_keyword, 20, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.: "); - + CMenuForwarder* mf2 = new CMenuForwarder(LOCALE_EVENTFINDER_KEYWORD ,true, *m_search_keyword, &stringInput, NULL, CRCInput::RC_1 ); CMenuOptionChooser* mo0 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST , m_search_list, SEARCH_LIST_OPTIONS, SEARCH_LIST_OPTION_COUNT, true, NULL, CRCInput::RC_2); CMenuForwarderNonLocalized* mf1 = new CMenuForwarderNonLocalized("", *m_search_list != EventList::SEARCH_LIST_ALL, m_search_channelname, this, "3", CRCInput::RC_3 ); CMenuOptionChooser* mo1 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_EPG, m_search_epg_item, SEARCH_EPG_OPTIONS, SEARCH_EPG_OPTION_COUNT, true, NULL, CRCInput::RC_4); CMenuForwarder* mf0 = new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, this, "1", CRCInput::RC_5 ); - + CMenuWidget searchMenu(LOCALE_EVENTFINDER_HEAD, "features.raw", 450); searchMenu.addItem(GenericMenuSeparator); @@ -1070,7 +1070,7 @@ int CEventFinderMenu::showMenu(void) searchMenu.addItem(mo1, false); searchMenu.addItem(GenericMenuSeparatorLine); searchMenu.addItem(mf0, false); - + res = searchMenu.exec(NULL,""); return(res); } diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index d316068d6..c28d2cdf0 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -71,7 +71,7 @@ static int my_filter(const struct dirent * dent) return 0; } -int CHDDMenuHandler::exec(CMenuTarget* parent, const std::string &actionkey) +int CHDDMenuHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/) { if (parent) parent->hide(); @@ -173,7 +173,7 @@ int CHDDMenuHandler::doMenu () return ret; } -int CHDDDestExec::exec(CMenuTarget* parent, const std::string&) +int CHDDDestExec::exec(CMenuTarget* /*parent*/, const std::string&) { char cmd[100]; @@ -212,7 +212,7 @@ static int check_and_umount(char * dev, char * path) return 0; } -int CHDDFmtExec::exec(CMenuTarget* parent, const std::string& key) +int CHDDFmtExec::exec(CMenuTarget* /*parent*/, const std::string& key) { char cmd[100]; CHintBox * hintbox; @@ -304,7 +304,7 @@ int CHDDFmtExec::exec(CMenuTarget* parent, const std::string& key) buf[21] = 0; progress->showGlobalStatus(20); progress->showStatusMessageUTF(buf); - } + } else if(strncmp(buf, "Creating", 8)) { progress->showGlobalStatus(40); progress->showStatusMessageUTF(buf); @@ -358,7 +358,7 @@ _return: return menu_return::RETURN_REPAINT; } -int CHDDChkExec::exec(CMenuTarget* parent, const std::string& key) +int CHDDChkExec::exec(CMenuTarget* /*parent*/, const std::string& key) { char cmd[100]; CHintBox * hintbox; @@ -453,7 +453,7 @@ ret1: break; } printf("CHDDChkExec: mount res %d\n", res); - + if(!srun) system("smbd"); return menu_return::RETURN_REPAINT; } diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 67d69652e..366e82034 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -961,10 +961,10 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) void CInfoViewer::showButton_SubServices () { if (!(g_RemoteControl->subChannels.empty ())) { - frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, + frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_YELLOW, ChanInfoX + 2 + NEUTRINO_ICON_BUTTON_RED_WIDTH + 2 + asize + 2 + NEUTRINO_ICON_BUTTON_GREEN_WIDTH + 2 + asize + 2, BBarY, InfoHeightY_Info); g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString( - ChanInfoX + 2 + NEUTRINO_ICON_BUTTON_RED_WIDTH + 2 + asize + 2 + NEUTRINO_ICON_BUTTON_GREEN_WIDTH + 2 + asize + 2 + NEUTRINO_ICON_BUTTON_YELLOW_WIDTH + 2, + ChanInfoX + 2 + NEUTRINO_ICON_BUTTON_RED_WIDTH + 2 + asize + 2 + NEUTRINO_ICON_BUTTON_GREEN_WIDTH + 2 + asize + 2 + NEUTRINO_ICON_BUTTON_YELLOW_WIDTH + 2, BBarFontY, asize, g_Locale->getText((g_RemoteControl->are_subchannels) ? LOCALE_INFOVIEWER_SUBSERVICE : LOCALE_INFOVIEWER_SELECTTIME), COL_INFOBAR_BUTTONS, 0, true); // UTF-8 } } @@ -1502,7 +1502,7 @@ void CInfoViewer::showLcdPercentOver () } } -int CInfoViewerHandler::exec (CMenuTarget * parent, const std::string & actionkey) +int CInfoViewerHandler::exec (CMenuTarget * parent, const std::string & /*actionkey*/) { int res = menu_return::RETURN_EXIT_ALL; CChannelList *channelList; @@ -1540,44 +1540,44 @@ void CInfoViewer::paint_ca_icons(int caid, char * icon) int px = 0; switch ( caid & 0xFF00 ) { - case 0x0E00: + case 0x0E00: px = endx - 48 - 38 - 9*10 - 7*14 - 10; sprintf(buf, "%s_%s.raw", "powervu", icon); break; - case 0x4A00: + case 0x4A00: px = endx - 48 - 38 - 8*10 - 6*14 - 10; sprintf(buf, "%s_%s.raw", "d", icon); break; - case 0x2600: + case 0x2600: px = endx - 48 - 38 - 7*10 - 5*14 - 10; sprintf(buf, "%s_%s.raw", "biss", icon); break; - case 0x600: - case 0x602: - case 0x1700: + case 0x600: + case 0x602: + case 0x1700: px = endx - 48 - 38 - 6*10 - 4*14 - 10; sprintf(buf, "%s_%s.raw", "ird", icon); break; - case 0x100: + case 0x100: px = endx - 48 - 38 - 5*10 - 4*14; sprintf(buf, "%s_%s.raw", "seca", icon); break; - case 0x500: + case 0x500: px = endx - 48 - 38 - 4*10 - 3*14; sprintf(buf, "%s_%s.raw", "via", icon); break; - case 0x1800: - case 0x1801: + case 0x1800: + case 0x1801: px = endx - 48 - 38 - 3*10 - 2*14; sprintf(buf, "%s_%s.raw", "nagra", icon); break; - case 0xB00: + case 0xB00: px = endx - 48 - 38 - 2*10 - 1*14; sprintf(buf, "%s_%s.raw", "conax", icon); break; - case 0xD00: + case 0xD00: px = endx - 48 - 38 - 1*10; sprintf(buf, "%s_%s.raw", "cw", icon); break; - case 0x900: + case 0x900: px = endx - 48; sprintf(buf, "%s_%s.raw", "nds", icon); break; - default: + default: break; }/*case*/ if(px) { - frameBuffer->paintIcon(buf, px, py ); + frameBuffer->paintIcon(buf, px, py ); } } diff --git a/src/gui/motorcontrol.cpp b/src/gui/motorcontrol.cpp index 778d687d3..0cb1fbe35 100644 --- a/src/gui/motorcontrol.cpp +++ b/src/gui/motorcontrol.cpp @@ -75,7 +75,7 @@ void CMotorControl::Init(void) mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); satfindpid = -1; - + width = w_max(470, 0); mheight = mheight - 2; height = hheight + (20 * mheight) - 5; @@ -114,10 +114,10 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) int lim_cmd; if (!frameBuffer->getActive()) return menu_return::RETURN_EXIT_ALL; - + if (parent) parent->hide(); - + x = frameBuffer->getScreenX() + (frameBuffer->getScreenWidth() - width) / 2; y = frameBuffer->getScreenY() + (frameBuffer->getScreenHeight() - height) / 2; @@ -190,14 +190,14 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) paintMenu(); paintStatus(); break; - + case CRCInput::RC_1: case CRCInput::RC_right: printf("[motorcontrol] left/1 key received... drive/Step motor west, stepMode: %d\n", stepMode); motorStepWest(); paintStatus(); break; - + case CRCInput::RC_red: case CRCInput::RC_2: printf("[motorcontrol] 2 key received... halt motor\n"); @@ -212,50 +212,50 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) motorStepEast(); paintStatus(); break; - + case CRCInput::RC_4: printf("[motorcontrol] 4 key received... set west (soft) limit\n"); if(g_settings.rotor_swap) lim_cmd = 0x66; else lim_cmd = 0x67; g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0); break; - + case CRCInput::RC_5: printf("[motorcontrol] 5 key received... disable (soft) limits\n"); g_Zapit->sendMotorCommand(0xE0, 0x31, 0x63, 0, 0, 0); break; - + case CRCInput::RC_6: printf("[motorcontrol] 6 key received... set east (soft) limit\n"); if(g_settings.rotor_swap) lim_cmd = 0x67; else lim_cmd = 0x66; g_Zapit->sendMotorCommand(0xE1, 0x31, lim_cmd, 0, 0, 0); break; - + case CRCInput::RC_7: printf("[motorcontrol] 7 key received... goto reference position\n"); g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6B, 1, 0, 0); satellitePosition = 0; paintStatus(); break; - + case CRCInput::RC_8: printf("[motorcontrol] 8 key received... enable (soft) limits\n"); g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, 0, 0); break; - + case CRCInput::RC_9: printf("[motorcontrol] 9 key received... (re)-calculate positions\n"); g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6F, 1, 0, 0); break; - + case CRCInput::RC_plus: case CRCInput::RC_up: printf("[motorcontrol] up key received... increase satellite position: %d\n", ++motorPosition); satellitePosition = 0; paintStatus(); break; - + case CRCInput::RC_minus: case CRCInput::RC_down: if (motorPosition > 1) motorPosition--; @@ -263,9 +263,9 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) satellitePosition = 0; paintStatus(); break; - + case CRCInput::RC_blue: - if (++stepMode > 3) + if (++stepMode > 3) stepMode = 0; if (stepMode == STEP_MODE_OFF) satellitePosition = 0; @@ -273,10 +273,10 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) printf("[motorcontrol] red key received... toggle stepmode on/off: %d\n", stepMode); paintStatus(); break; - + default: //printf("[motorcontrol] message received...\n"); - if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) + if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) delete (unsigned char*) data; break; } @@ -292,14 +292,14 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) paintMenu(); paintStatus(); break; - + case CRCInput::RC_1: case CRCInput::RC_right: printf("[motorcontrol] left/1 key received... drive/Step motor west, stepMode: %d\n", stepMode); motorStepWest(); paintStatus(); break; - + case CRCInput::RC_red: case CRCInput::RC_2: printf("[motorcontrol] 2 key received... halt motor\n"); @@ -312,19 +312,19 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) motorStepEast(); paintStatus(); break; - + case CRCInput::RC_green: case CRCInput::RC_5: printf("[motorcontrol] 5 key received... store present satellite number: %d\n", motorPosition); g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, motorPosition, 0); break; - + case CRCInput::RC_6: if (stepSize < 0x7F) stepSize++; printf("[motorcontrol] 6 key received... increase Step size: %d\n", stepSize); paintStatus(); break; - + case CRCInput::RC_yellow: case CRCInput::RC_7: printf("[motorcontrol] 7 key received... goto satellite number: %d\n", motorPosition); @@ -332,20 +332,20 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) satellitePosition = 0; paintStatus(); break; - + case CRCInput::RC_9: if (stepSize > 1) stepSize--; printf("[motorcontrol] 9 key received... decrease Step size: %d\n", stepSize); paintStatus(); break; - + case CRCInput::RC_plus: case CRCInput::RC_up: printf("[motorcontrol] up key received... increase satellite position: %d\n", ++motorPosition); satellitePosition = 0; paintStatus(); break; - + case CRCInput::RC_minus: case CRCInput::RC_down: if (motorPosition > 1) motorPosition--; @@ -353,28 +353,28 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &) satellitePosition = 0; paintStatus(); break; - + case CRCInput::RC_blue: - if (++stepMode > 2) + if (++stepMode > 2) stepMode = 0; if (stepMode == STEP_MODE_OFF) satellitePosition = 0; printf("[motorcontrol] red key received... toggle stepmode on/off: %d\n", stepMode); paintStatus(); break; - + default: //printf("[motorcontrol] message received...\n"); - if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) + if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) delete (unsigned char*) data; break; } } } - + istheend = (msg == CRCInput::RC_home); } - + hide(); return menu_return::RETURN_REPAINT; @@ -404,7 +404,7 @@ void CMotorControl::motorStepWest(void) default: g_Zapit->sendMotorCommand(0xE0, 0x31, cmd, 1, 40, 0); } -} +} void CMotorControl::motorStepEast(void) { @@ -450,7 +450,7 @@ void CMotorControl::paintLine(int x, int y, int width, char * txt) g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x, y, width, txt, COL_MENUCONTENT, 0, true); } -void CMotorControl::paintSeparator(int xpos, int * ypos, int width, char * txt) +void CMotorControl::paintSeparator(int xpos, int * ypos, int width, char * /*txt*/) { //int stringwidth = 0; //int stringstartposX = 0; @@ -459,7 +459,7 @@ void CMotorControl::paintSeparator(int xpos, int * ypos, int width, char * txt) *ypos += th; frameBuffer->paintHLineRel(xpos, width - 20, *ypos - (th >> 1), COL_MENUCONTENT_PLUS_3); frameBuffer->paintHLineRel(xpos, width - 20, *ypos - (th >> 1) + 1, COL_MENUCONTENT_PLUS_1); - + #if 0 stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(txt); stringstartposX = 0; @@ -473,19 +473,19 @@ void CMotorControl::paintStatus() { char buf[256]; char buf2[256]; - + int xpos1 = x + 10; int xpos2 = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth((char *) g_Locale->getText(LOCALE_MOTORCONTROL_MOTOR_POS)); int width2 = width - (xpos2 - xpos1) - 10; int width1 = width - 10; - + ypos = ypos_status; paintSeparator(xpos1, &ypos, width, (char *) g_Locale->getText(LOCALE_MOTORCONTROL_SETTINGS)); - + paintLine(xpos1, &ypos, width1, (char *) g_Locale->getText(LOCALE_MOTORCONTROL_MOTOR_POS)); sprintf(buf, "%d", motorPosition); paintLine(xpos2, ypos, width2 , buf); - + paintLine(xpos1, &ypos, width1, (char *) g_Locale->getText(LOCALE_MOTORCONTROL_MOVEMENT)); switch(stepMode) { @@ -503,7 +503,7 @@ void CMotorControl::paintStatus() break; } paintLine(xpos2, ypos, width2, buf); - + paintLine(xpos1, &ypos, width1, (char *) g_Locale->getText(LOCALE_MOTORCONTROL_STEP_SIZE)); switch(stepMode) { @@ -525,7 +525,7 @@ void CMotorControl::paintStatus() break; } paintLine(xpos2, ypos, width2, buf); - + paintSeparator(xpos1, &ypos, width, (char *) g_Locale->getText(LOCALE_MOTORCONTROL_STATUS)); strcpy(buf, (char *) g_Locale->getText(LOCALE_MOTORCONTROL_SAT_POS)); sprintf(buf2, "%d", satellitePosition); @@ -609,7 +609,7 @@ void CMotorControl::paintMenu() paintLine(xpos1, &ypos, width1, (char *) "(blue)"); paintLine(xpos2, ypos, width2, (char *) g_Locale->getText(LOCALE_MOTORCONTROL_STEP_DRIVE)); } - + ypos_status = ypos; } @@ -621,7 +621,7 @@ void CMotorControl::startSatFind(void) waitpid(satfindpid, 0, 0); satfindpid = -1; } - + switch ((satfindpid = fork())) { case -1: printf("[motorcontrol] fork"); @@ -634,7 +634,7 @@ void CMotorControl::startSatFind(void) //if (execlp("/bin/satfind", "satfind", "--tune", NULL) < 0) if (execlp("/bin/satfind", "satfind", NULL) < 0) #endif - printf("[motorcontrol] execlp satfind failed.\n"); + printf("[motorcontrol] execlp satfind failed.\n"); break; } /* switch */ #endif @@ -642,7 +642,7 @@ void CMotorControl::startSatFind(void) void CMotorControl::stopSatFind(void) { - + if (satfindpid != -1) { printf("[motorcontrol] killing satfind...\n"); kill(satfindpid, SIGKILL); @@ -651,7 +651,7 @@ void CMotorControl::stopSatFind(void) } } -#define BARWT 10 +#define BARWT 10 #define BAR_BL 2 #define BARW (BARWT - BAR_BL) #define BARWW (BARWT - BARW) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 2631888cd..fb495868b 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -92,7 +92,7 @@ void strReplace(std::string& orig, const char* fstr, const std::string rstr); #define VLC_URI "vlc://" #define NUMBER_OF_MOVIES_LAST 40 // This is the number of movies shown in last recored and last played list - + #define MESSAGEBOX_BROWSER_ROW_ITEM_COUNT 20 const CMenuOptionChooser::keyval MESSAGEBOX_BROWSER_ROW_ITEM[MESSAGEBOX_BROWSER_ROW_ITEM_COUNT] = { @@ -145,10 +145,10 @@ const CMenuOptionChooser::keyval MESSAGEBOX_PARENTAL_LOCKAGE_OPTIONS[MESSAGEBOX_ }; #define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX - 40) -#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40) +#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40) #define MIN_WINDOW_WIDTH ((g_settings.screen_EndX - g_settings.screen_StartX)>>1) -#define MIN_WINDOW_HEIGHT 200 +#define MIN_WINDOW_HEIGHT 200 #define TITLE_BACKGROUND_COLOR ((CFBWindow::color_t)COL_MENUHEAD_PLUS_0) #define TITLE_FONT_COLOR ((CFBWindow::color_t)COL_MENUHEAD) @@ -181,7 +181,7 @@ const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] = LOCALE_MOVIEBROWSER_SHORT_FORMAT , LOCALE_MOVIEBROWSER_SHORT_AUDIO , LOCALE_MOVIEBROWSER_SHORT_LENGTH, - LOCALE_MOVIEBROWSER_SHORT_SIZE, + LOCALE_MOVIEBROWSER_SHORT_SIZE, NONEXISTANT_LOCALE }; @@ -194,7 +194,7 @@ const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] = #define MB_ROW_WIDTH_MAJOR_GENRE 100 #define MB_ROW_WIDTH_MINOR_GENRE 30 #define MB_ROW_WIDTH_INFO2 30 -#define MB_ROW_WIDTH_PARENTAL_LOCKAGE 25 +#define MB_ROW_WIDTH_PARENTAL_LOCKAGE 25 #define MB_ROW_WIDTH_CHANNEL 80 #define MB_ROW_WIDTH_BOOKMARK 50 #define MB_ROW_WIDTH_QUALITY 25 @@ -203,11 +203,11 @@ const neutrino_locale_t m_localizedItemName[MB_INFO_MAX_NUMBER+1] = #define MB_ROW_WIDTH_PRODDATE 50 #define MB_ROW_WIDTH_COUNTRY 50 #define MB_ROW_WIDTH_GEOMETRIE 50 -#define MB_ROW_WIDTH_AUDIO 50 +#define MB_ROW_WIDTH_AUDIO 50 #define MB_ROW_WIDTH_LENGTH 40 #define MB_ROW_WIDTH_SIZE 45 -const int m_defaultRowWidth[MB_INFO_MAX_NUMBER+1] = +const int m_defaultRowWidth[MB_INFO_MAX_NUMBER+1] = { MB_ROW_WIDTH_FILENAME , MB_ROW_WIDTH_FILEPATH, @@ -228,8 +228,8 @@ const int m_defaultRowWidth[MB_INFO_MAX_NUMBER+1] = MB_ROW_WIDTH_GEOMETRIE, MB_ROW_WIDTH_AUDIO , MB_ROW_WIDTH_LENGTH, - MB_ROW_WIDTH_SIZE, - 0 //MB_ROW_WIDTH_MAX_NUMBER + MB_ROW_WIDTH_SIZE, + 0 //MB_ROW_WIDTH_MAX_NUMBER }; static MI_MOVIE_INFO* playing_info; //------------------------------------------------------------------------ @@ -342,7 +342,7 @@ bool (* const sortBy[MB_INFO_MAX_NUMBER+1])(const MI_MOVIE_INFO* a, const MI_MOV NULL, //MB_INFO_GEOMETRIE = 16, NULL, //MB_INFO_AUDIO = 17, NULL, //MB_INFO_LENGTH = 18, - &sortBySize, //MB_INFO_SIZE = 19, + &sortBySize, //MB_INFO_SIZE = 19, NULL //MB_INFO_MAX_NUMBER = 20 }; /************************************************************************ @@ -351,7 +351,7 @@ bool (* const sortBy[MB_INFO_MAX_NUMBER+1])(const MI_MOVIE_INFO* a, const MI_MOV CMovieBrowser::CMovieBrowser(const char* path): configfile ('\t') { - m_selectedDir = path; + m_selectedDir = path; //addDir(m_selectedDir); CMovieBrowser(); } @@ -365,7 +365,7 @@ CMovieBrowser::CMovieBrowser(): configfile ('\t') CMovieBrowser::~CMovieBrowser() { //TRACE("[mb] del\r\n"); - //saveSettings(&m_settings); + //saveSettings(&m_settings); hide(); m_dir.clear(); @@ -393,21 +393,21 @@ void CMovieBrowser::fileInfoStale(void) { m_file_info_stale = true; m_seriename_stale = true; - - // Also release memory buffers, since we have to reload this stuff next time anyhow + + // Also release memory buffers, since we have to reload this stuff next time anyhow m_dirNames.clear(); - + for(unsigned int i=0; i < m_vMovieInfo.size(); i++) { m_vMovieInfo[i].audioPids.clear(); } - + m_vMovieInfo.clear(); m_vHandleBrowserList.clear(); m_vHandleRecordList.clear(); m_vHandlePlayList.clear(); m_vHandleSerienames.clear(); - + for(int i = 0; i < LF_MAX_ROWS; i++) { m_browserListLines.lineArray[i].clear(); @@ -415,14 +415,14 @@ void CMovieBrowser::fileInfoStale(void) m_playListLines.lineArray[i].clear(); m_FilterLines.lineArray[i].clear(); } -}; +}; void CMovieBrowser::init(void) { //TRACE("[mb]->init\r\n"); initGlobalSettings(); loadSettings(&m_settings); - + //restart_mb_timeout = 0; m_file_info_stale = true; m_seriename_stale = true; @@ -432,16 +432,16 @@ void CMovieBrowser::init(void) m_pcLastPlay = NULL; m_pcLastRecord = NULL; m_pcInfo = NULL; - + m_windowFocus = MB_FOCUS_BROWSER; m_pcFontFoot = FOOT_FONT; m_pcFontTitle = TITLE_FONT; - + m_textTitle = g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD); - + m_currentStartPos = 0; - + m_movieSelectionHandler = NULL; m_currentBrowserSelection = 0; m_currentRecordSelection = 0; @@ -449,15 +449,15 @@ void CMovieBrowser::init(void) m_prevBrowserSelection = 0; m_prevRecordSelection = 0; m_prevPlaySelection = 0; - + m_storageType = MB_STORAGE_TYPE_NFS; - + m_parentalLock = m_settings.parentalLock; - - // check g_setting values + + // check g_setting values if(m_settings.gui >= MB_GUI_MAX_NUMBER) m_settings.gui = MB_GUI_MOVIE_INFO; - + if(m_settings.sorting.direction >= MB_DIRECTION_MAX_NUMBER) m_settings.sorting.direction = MB_DIRECTION_DOWN; if(m_settings.sorting.item >= MB_INFO_MAX_NUMBER) @@ -465,12 +465,12 @@ void CMovieBrowser::init(void) if(m_settings.filter.item >= MB_INFO_MAX_NUMBER) m_settings.filter.item = MB_INFO_MAX_NUMBER; - + if(m_settings.parentalLockAge >= MI_PARENTAL_MAX_NUMBER) m_settings.parentalLockAge = MI_PARENTAL_OVER18; if(m_settings.parentalLock >= MB_PARENTAL_LOCK_MAX_NUMBER) m_settings.parentalLock = MB_PARENTAL_LOCK_OFF; - + if(m_settings.browserFrameHeight < MIN_BROWSER_FRAME_HEIGHT ) m_settings.browserFrameHeight = MIN_BROWSER_FRAME_HEIGHT; if(m_settings.browserFrameHeight > MAX_BROWSER_FRAME_HEIGHT) @@ -499,10 +499,10 @@ void CMovieBrowser::init(void) initRows(); //initDevelopment(); - refreshLastPlayList(); - refreshLastRecordList(); - refreshBrowserList(); - refreshFilterList(); + refreshLastPlayList(); + refreshLastRecordList(); + refreshBrowserList(); + refreshFilterList(); #if 0 TRACE_1("Frames\r\n\tScren:\t%3d,%3d,%3d,%3d\r\n\tMain:\t%3d,%3d,%3d,%3d\r\n\tTitle:\t%3d,%3d,%3d,%3d \r\n\tBrowsr:\t%3d,%3d,%3d,%3d \r\n\tPlay:\t%3d,%3d,%3d,%3d \r\n\tRecord:\t%3d,%3d,%3d,%3d\r\n\r\n", g_settings.screen_StartX, @@ -536,19 +536,19 @@ void CMovieBrowser::init(void) void CMovieBrowser::initGlobalSettings(void) { //TRACE("[mb]->initGlobalSettings\r\n"); - + m_settings.gui = MB_GUI_MOVIE_INFO; - + m_settings.sorting.direction = MB_DIRECTION_DOWN; m_settings.sorting.item = MB_INFO_TITLE; m_settings.filter.item = MB_INFO_MAX_NUMBER; m_settings.filter.optionString = ""; m_settings.filter.optionVar = 0; - + m_settings.parentalLockAge = MI_PARENTAL_OVER18; m_settings.parentalLock = MB_PARENTAL_LOCK_OFF; - + for(int i = 0; i < MB_MAX_DIRS; i++) { m_settings.storageDir[i] = ""; @@ -557,7 +557,7 @@ void CMovieBrowser::initGlobalSettings(void) /***** Browser List **************/ m_settings.browserFrameHeight = g_settings.screen_EndY - g_settings.screen_StartY - 20 - ((g_settings.screen_EndY - g_settings.screen_StartY - 20)>>1) - (INTER_FRAME_SPACE>>1); - + m_settings.browserRowNr = 6; m_settings.browserRowItem[0] = MB_INFO_TITLE; m_settings.browserRowItem[1] = MB_INFO_INFO1; @@ -610,12 +610,12 @@ void CMovieBrowser::initFrames(void) m_cBoxFrameLastPlayList.iY = m_cBoxFrameBrowserList.iY ; m_cBoxFrameLastPlayList.iWidth = (m_cBoxFrameBrowserList.iWidth>>1) - (INTER_FRAME_SPACE>>1); m_cBoxFrameLastPlayList.iHeight = m_cBoxFrameBrowserList.iHeight; - + m_cBoxFrameLastRecordList.iX = m_cBoxFrameLastPlayList.iX + m_cBoxFrameLastPlayList.iWidth + INTER_FRAME_SPACE; m_cBoxFrameLastRecordList.iY = m_cBoxFrameLastPlayList.iY; m_cBoxFrameLastRecordList.iWidth = m_cBoxFrame.iWidth - m_cBoxFrameLastPlayList.iWidth - INTER_FRAME_SPACE; m_cBoxFrameLastRecordList.iHeight = m_cBoxFrameLastPlayList.iHeight; - + m_cBoxFrameInfo.iX = m_cBoxFrameBrowserList.iX; m_cBoxFrameInfo.iY = m_cBoxFrameBrowserList.iY + m_cBoxFrameBrowserList.iHeight + INTER_FRAME_SPACE; m_cBoxFrameInfo.iWidth = m_cBoxFrameBrowserList.iWidth; @@ -645,7 +645,7 @@ void CMovieBrowser::initRows(void) m_settings.lastPlayRowWidth[3] = m_defaultRowWidth[m_settings.lastPlayRow[3]]; m_settings.lastPlayRowWidth[4] = m_defaultRowWidth[m_settings.lastPlayRow[4]]; m_settings.lastPlayRowWidth[5] = m_defaultRowWidth[m_settings.lastPlayRow[5]]; - + /***** Last Record List **************/ m_settings.lastRecordRowNr = 2; m_settings.lastRecordRow[0] = MB_INFO_TITLE; @@ -661,7 +661,7 @@ void CMovieBrowser::initRows(void) m_settings.lastRecordRowWidth[4] = m_defaultRowWidth[m_settings.lastRecordRow[4]]; m_settings.lastRecordRowWidth[5] = m_defaultRowWidth[m_settings.lastRecordRow[5]]; } - + void CMovieBrowser::initDevelopment(void) { TRACE("[mb]->initDevelopment\r\n"); @@ -672,7 +672,7 @@ void CMovieBrowser::initDevelopment(void) //addDir(name); name = "/mnt/nfs/"; //addDir(name); - + } void CMovieBrowser::defaultSettings(MB_SETTINGS* settings) @@ -687,7 +687,7 @@ void CMovieBrowser::defaultSettings(MB_SETTINGS* settings) bool CMovieBrowser::loadSettings(MB_SETTINGS* settings) { bool result = true; - //TRACE("CMovieBrowser::loadSettings\r\n"); + //TRACE("CMovieBrowser::loadSettings\r\n"); //configfile.loadConfig(MOVIEBROWSER_SETTINGS_FILE); if(configfile.loadConfig(MOVIEBROWSER_SETTINGS_FILE)) { @@ -697,17 +697,17 @@ bool CMovieBrowser::loadSettings(MB_SETTINGS* settings) settings->serie_auto_create = configfile.getInt32("mb_serie_auto_create", 0); settings->gui = (MB_GUI)configfile.getInt32("mb_gui", MB_GUI_MOVIE_INFO); - + settings->sorting.item = (MB_INFO_ITEM)configfile.getInt32("mb_sorting_item", MB_INFO_TITLE); settings->sorting.direction = (MB_DIRECTION)configfile.getInt32("mb_sorting_direction", MB_DIRECTION_UP); - + settings->filter.item = (MB_INFO_ITEM)configfile.getInt32("mb_filter_item", MB_INFO_INFO1); settings->filter.optionString = configfile.getString("mb_filter_optionString", ""); settings->filter.optionVar = configfile.getInt32("mb_filter_optionVar", 0); - + settings->parentalLockAge = (MI_PARENTAL_LOCKAGE)configfile.getInt32("mb_parentalLockAge", MI_PARENTAL_OVER18); settings->parentalLock = (MB_PARENTAL_LOCK)configfile.getInt32("mb_parentalLock", MB_PARENTAL_LOCK_ACTIVE); - + settings->storageDirRecUsed = (bool)configfile.getInt32("mb_storageDir_rec", true ); settings->storageDirMovieUsed = (bool)configfile.getInt32("mb_storageDir_movie", true ); @@ -722,7 +722,7 @@ bool CMovieBrowser::loadSettings(MB_SETTINGS* settings) sprintf(cfg_key, "mb_dir_used%d", i); settings->storageDirUsed[i] = configfile.getInt32( cfg_key,false ); } - /* these variables are used for the listframes */ + /* these variables are used for the listframes */ settings->browserFrameHeight = configfile.getInt32("mb_browserFrameHeight", 250); settings->browserRowNr = configfile.getInt32("mb_browserRowNr", 0); for(int i = 0; i < MB_MAX_ROWS && i < settings->browserRowNr; i++) @@ -735,7 +735,7 @@ bool CMovieBrowser::loadSettings(MB_SETTINGS* settings) } else { - TRACE("CMovieBrowser::loadSettings failed\r\n"); + TRACE("CMovieBrowser::loadSettings failed\r\n"); configfile.clear(); result = false; } @@ -745,7 +745,7 @@ bool CMovieBrowser::loadSettings(MB_SETTINGS* settings) bool CMovieBrowser::saveSettings(MB_SETTINGS* settings) { bool result = true; - TRACE("[mb] saveSettings\r\n"); + TRACE("[mb] saveSettings\r\n"); configfile.setInt32("mb_lastPlayMaxItems", settings->lastPlayMaxItems); configfile.setInt32("mb_lastRecordMaxItems", settings->lastRecordMaxItems); @@ -753,14 +753,14 @@ bool CMovieBrowser::saveSettings(MB_SETTINGS* settings) configfile.setInt32("mb_serie_auto_create", settings->serie_auto_create); configfile.setInt32("mb_gui", settings->gui); - + configfile.setInt32("mb_sorting_item", settings->sorting.item); configfile.setInt32("mb_sorting_direction", settings->sorting.direction); - + configfile.setInt32("mb_filter_item", settings->filter.item); configfile.setString("mb_filter_optionString", settings->filter.optionString); configfile.setInt32("mb_filter_optionVar", settings->filter.optionVar); - + configfile.setInt32("mb_storageDir_rec", settings->storageDirRecUsed ); configfile.setInt32("mb_storageDir_movie", settings->storageDirMovieUsed ); @@ -778,7 +778,7 @@ bool CMovieBrowser::saveSettings(MB_SETTINGS* settings) sprintf(cfg_key, "mb_dir_used%d", i); configfile.setInt32( cfg_key, settings->storageDirUsed[i] ); // do not save this so far } - /* these variables are used for the listframes */ + /* these variables are used for the listframes */ configfile.setInt32("mb_browserFrameHeight", settings->browserFrameHeight); configfile.setInt32("mb_browserRowNr",settings->browserRowNr); for(int i = 0; i < MB_MAX_ROWS && i < settings->browserRowNr; i++) @@ -901,7 +901,7 @@ int CMovieBrowser::exec(const char* path) loadSettings(&m_settings); initFrames(); - // Clear all, to avoid 'jump' in screen + // Clear all, to avoid 'jump' in screen m_vHandleBrowserList.clear(); m_vHandleRecordList.clear(); m_vHandlePlayList.clear(); @@ -913,10 +913,10 @@ int CMovieBrowser::exec(const char* path) m_playListLines.lineArray[i].clear(); } - m_selectedDir = path; + m_selectedDir = path; if(paint() == false) - return res;// paint failed due to less memory , exit + return res;// paint failed due to less memory , exit if ( timeout == -1 ) timeout = g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER]; @@ -944,12 +944,12 @@ int CMovieBrowser::exec(const char* path) else { // since we cleared everything above, we have to refresh the list now. - refreshBrowserList(); - refreshLastPlayList(); + refreshBrowserList(); + refreshLastPlayList(); refreshLastRecordList(); } - // get old movie selection and set position in windows + // get old movie selection and set position in windows m_currentBrowserSelection = m_prevBrowserSelection; m_currentRecordSelection = m_prevRecordSelection; m_currentPlaySelection = m_prevPlaySelection; @@ -982,7 +982,7 @@ int CMovieBrowser::exec(const char* path) } else if(msg == CRCInput::RC_ok) { - m_currentStartPos = 0; + m_currentStartPos = 0; if(m_movieSelectionHandler != NULL) { @@ -991,7 +991,7 @@ int CMovieBrowser::exec(const char* path) m_movieSelectionHandler->bookmarks.start != 0) { TRACE("[mb] stop: %d start:%d \r\n",m_movieSelectionHandler->bookmarks.lastPlayStop,m_movieSelectionHandler->bookmarks.start); - m_currentStartPos = showStartPosSelectionMenu(); // display start menu m_currentStartPos = + m_currentStartPos = showStartPosSelectionMenu(); // display start menu m_currentStartPos = } if(m_currentStartPos >= 0) { playing_info = m_movieSelectionHandler; @@ -1027,7 +1027,7 @@ int CMovieBrowser::exec(const char* path) m_prevRecordSelection = m_currentRecordSelection; m_prevPlaySelection = m_currentPlaySelection; - saveSettings(&m_settings); // might be better done in ~CMovieBrowser, but for any reason this does not work if MB is killed by neutrino shutdown + saveSettings(&m_settings); // might be better done in ~CMovieBrowser, but for any reason this does not work if MB is killed by neutrino shutdown // make stale if we should reload the next time, but not if movie has to be played if(m_settings.reload == true && res == false) @@ -1062,7 +1062,7 @@ void CMovieBrowser::hide(void) delete m_pcLastPlay; m_pcLastPlay = NULL; } - if (m_pcLastRecord != NULL) + if (m_pcLastRecord != NULL) { m_currentRecordSelection = m_pcLastRecord->getSelectedLine(); delete m_pcLastRecord; @@ -1073,7 +1073,7 @@ void CMovieBrowser::hide(void) //m_pcWindow = NULL; m_pcInfo = NULL; - + } int CMovieBrowser::paint(void) @@ -1085,21 +1085,21 @@ int CMovieBrowser::paint(void) //Font* font = TEXT_FONT; Font* font = NULL; - m_pcBrowser = new CListFrame(&m_browserListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE, + m_pcBrowser = new CListFrame(&m_browserListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE, &m_cBoxFrameBrowserList); - m_pcLastPlay = new CListFrame(&m_playListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE | CListFrame::TITLE, + m_pcLastPlay = new CListFrame(&m_playListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE | CListFrame::TITLE, &m_cBoxFrameLastPlayList, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD_PLAYLIST), g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]); - m_pcLastRecord = new CListFrame(&m_recordListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE | CListFrame::TITLE, + m_pcLastRecord = new CListFrame(&m_recordListLines, font, CListFrame::SCROLL | CListFrame::HEADER_LINE | CListFrame::TITLE, &m_cBoxFrameLastRecordList, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD_RECORDLIST), g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]); - m_pcFilter = new CListFrame(&m_FilterLines, font, CListFrame::SCROLL | CListFrame::TITLE, + m_pcFilter = new CListFrame(&m_FilterLines, font, CListFrame::SCROLL | CListFrame::TITLE, &m_cBoxFrameFilter, g_Locale->getText(LOCALE_MOVIEBROWSER_HEAD_FILTER), g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]); - m_pcInfo = new CTextBox(" ", NULL, CTextBox::SCROLL, &m_cBoxFrameInfo); + m_pcInfo = new CTextBox(" ", NULL, CTextBox::SCROLL, &m_cBoxFrameInfo); - if( m_pcBrowser == NULL || m_pcLastPlay == NULL || + if( m_pcBrowser == NULL || m_pcLastPlay == NULL || m_pcLastRecord == NULL || m_pcInfo == NULL || m_pcFilter == NULL) { TRACE("[mb] paint, ERROR: not enought memory to allocate windows"); @@ -1116,8 +1116,8 @@ int CMovieBrowser::paint(void) m_pcFilter = NULL; return (false); - } - //onSetGUIWindow(m_settings.gui); + } + //onSetGUIWindow(m_settings.gui); //refreshTitle(); //refreshFoot(); refreshLCD(); @@ -1128,20 +1128,20 @@ int CMovieBrowser::paint(void) void CMovieBrowser::refresh(void) { //TRACE("[mb]->refresh\r\n"); - + refreshTitle(); if (m_pcBrowser != NULL && m_showBrowserFiles == true ) m_pcBrowser->refresh(); - if (m_pcLastPlay != NULL && m_showLastPlayFiles == true ) + if (m_pcLastPlay != NULL && m_showLastPlayFiles == true ) m_pcLastPlay->refresh(); if (m_pcLastRecord != NULL && m_showLastRecordFiles == true) m_pcLastRecord->refresh(); - if (m_pcInfo != NULL && m_showMovieInfo == true) + if (m_pcInfo != NULL && m_showMovieInfo == true) refreshMovieInfo(); //m_pcInfo->refresh(); - if (m_pcFilter != NULL && m_showFilter == true) + if (m_pcFilter != NULL && m_showFilter == true) m_pcFilter->refresh(); - + refreshFoot(); refreshLCD(); } @@ -1228,21 +1228,21 @@ void CMovieBrowser::refreshLCD(void) { CVFD::getInstance()->showMenuText(0, m_movieSelectionHandler->epgTitle.c_str(), -1, true); // UTF-8 //lcd->showMenuText(1, m_movieSelectionHandler->epgInfo1.c_str(), -1, true); // UTF-8 - } + } } void CMovieBrowser::refreshFilterList(void) { TRACE("[mb]->refreshFilterList %d\r\n",m_settings.filter.item); - + std::string string_item; - + m_FilterLines.rows = 1; m_FilterLines.lineArray[0].clear(); m_FilterLines.rowWidth[0] = 400; m_FilterLines.lineHeader[0]= ""; - if(m_vMovieInfo.size() <= 0) + if(m_vMovieInfo.size() <= 0) return; // exit here if nothing else is to do if(m_settings.filter.item == MB_INFO_MAX_NUMBER) @@ -1261,7 +1261,7 @@ void CMovieBrowser::refreshFilterList(void) { std::string tmp = g_Locale->getText(LOCALE_MENU_BACK); m_FilterLines.lineArray[0].push_back(tmp); - + if(m_settings.filter.item == MB_INFO_FILEPATH) { for(unsigned int i =0 ; i < m_dirNames.size() ;i++) @@ -1329,7 +1329,7 @@ void CMovieBrowser::refreshLastPlayList(void) //P2 for(unsigned int file=0; file < m_vMovieInfo.size(); file++) { if( /*isFiltered(m_vMovieInfo[file]) == false &&*/ - isParentalLock(m_vMovieInfo[file]) == false) + isParentalLock(m_vMovieInfo[file]) == false) { movie_handle = &(m_vMovieInfo[file]); m_vHandlePlayList.push_back(movie_handle); @@ -1357,7 +1357,7 @@ void CMovieBrowser::refreshLastPlayList(void) //P2 // update selected movie if browser is in the focus if (m_windowFocus == MB_FOCUS_LAST_PLAY) { - updateMovieSelection(); + updateMovieSelection(); } } @@ -1387,7 +1387,7 @@ void CMovieBrowser::refreshLastRecordList(void) //P2 for(unsigned int file=0; file < m_vMovieInfo.size() ;file++) { if( /*isFiltered(m_vMovieInfo[file]) == false &&*/ - isParentalLock(m_vMovieInfo[file]) == false) + isParentalLock(m_vMovieInfo[file]) == false) { movie_handle = &(m_vMovieInfo[file]); m_vHandleRecordList.push_back(movie_handle); @@ -1416,7 +1416,7 @@ void CMovieBrowser::refreshLastRecordList(void) //P2 // update selected movie if browser is in the focus if (m_windowFocus == MB_FOCUS_LAST_RECORD) { - updateMovieSelection(); + updateMovieSelection(); } } @@ -1434,8 +1434,8 @@ void CMovieBrowser::refreshBrowserList(void) //P1 m_browserListLines.lineHeader[row]= g_Locale->getText(m_localizedItemName[m_settings.browserRowItem[row]]); } m_vHandleBrowserList.clear(); - - if(m_vMovieInfo.size() <= 0) + + if(m_vMovieInfo.size() <= 0) { m_currentBrowserSelection = 0; m_movieSelectionHandler = NULL; @@ -1443,7 +1443,7 @@ void CMovieBrowser::refreshBrowserList(void) //P1 m_pcBrowser->setLines(&m_browserListLines);//FIXME last delete test return; // exit here if nothing else is to do } - + MI_MOVIE_INFO* movie_handle; // prepare Browser list for sorting and filtering for(unsigned int file=0; file < m_vMovieInfo.size(); file++) @@ -1478,7 +1478,7 @@ void CMovieBrowser::refreshBrowserList(void) //P1 // update selected movie if browser is in the focus if (m_windowFocus == MB_FOCUS_BROWSER) { - updateMovieSelection(); + updateMovieSelection(); } } @@ -1487,18 +1487,18 @@ void CMovieBrowser::refreshBookmarkList(void) // P3 //TRACE("[mb]->refreshBookmarkList \r\n"); } -void CMovieBrowser::refreshTitle(void) +void CMovieBrowser::refreshTitle(void) { //Paint Text Background //TRACE("[mb]->refreshTitle : %s\r\n",m_textTitle.c_str()); - m_pcWindow->paintBoxRel(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX, m_cBoxFrame.iY+ m_cBoxFrameTitleRel.iY, + m_pcWindow->paintBoxRel(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX, m_cBoxFrame.iY+ m_cBoxFrameTitleRel.iY, m_cBoxFrameTitleRel.iWidth, m_cBoxFrameTitleRel.iHeight, TITLE_BACKGROUND_COLOR, ROUND_RADIUS, CORNER_TOP); m_pcFontTitle->RenderString(m_cBoxFrame.iX+m_cBoxFrameTitleRel.iX + TEXT_BORDER_WIDTH, m_cBoxFrame.iY+m_cBoxFrameTitleRel.iY + m_cBoxFrameTitleRel.iHeight, m_cBoxFrameTitleRel.iWidth - (TEXT_BORDER_WIDTH << 1), m_textTitle.c_str(), TITLE_FONT_COLOR, 0, true); // UTF-8 } #define ADD_FOOT_HEIGHT 4 -void CMovieBrowser::refreshFoot(void) +void CMovieBrowser::refreshFoot(void) { //TRACE("[mb]->refreshButtonLine \r\n"); int color = (CFBWindow::color_t) COL_MENUHEAD; @@ -1508,14 +1508,14 @@ void CMovieBrowser::refreshFoot(void) std::string sort_text = g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_SORT); sort_text += g_Locale->getText(m_localizedItemName[m_settings.sorting.item]); std::string ok_text = g_Locale->getText(LOCALE_MOVIEBROWSER_FOOT_PLAY); - + // draw the background first - m_pcWindow->paintBoxRel(m_cBoxFrame.iX+m_cBoxFrameFootRel.iX, m_cBoxFrame.iY+ m_cBoxFrameFootRel.iY, - m_cBoxFrameFootRel.iWidth, m_cBoxFrameFootRel.iHeight+ 6, + m_pcWindow->paintBoxRel(m_cBoxFrame.iX+m_cBoxFrameFootRel.iX, m_cBoxFrame.iY+ m_cBoxFrameFootRel.iY, + m_cBoxFrameFootRel.iWidth, m_cBoxFrameFootRel.iHeight+ 6, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); int width = m_cBoxFrameFootRel.iWidth>>2; - + int xpos1 = m_cBoxFrameFootRel.iX+10; int width1 = width; int xpos2 = xpos1 + width1; @@ -1556,7 +1556,7 @@ bool CMovieBrowser::onButtonPress(neutrino_msg_t msg) { // TRACE("[mb]->onButtonPress %d\r\n",msg); bool result = false; - + result = onButtonPressMainFrame(msg); if(result == false) { @@ -1564,19 +1564,19 @@ bool CMovieBrowser::onButtonPress(neutrino_msg_t msg) switch(m_windowFocus) { case MB_FOCUS_BROWSER: - result = onButtonPressBrowserList(msg); + result = onButtonPressBrowserList(msg); break; case MB_FOCUS_LAST_PLAY: - result = onButtonPressLastPlayList(msg); + result = onButtonPressLastPlayList(msg); break; case MB_FOCUS_LAST_RECORD: - result = onButtonPressLastRecordList(msg); + result = onButtonPressLastRecordList(msg); break; case MB_FOCUS_MOVIE_INFO: - result = onButtonPressMovieInfoList(msg); + result = onButtonPressMovieInfoList(msg); break; case MB_FOCUS_FILTER: - result = onButtonPressFilterList(msg); + result = onButtonPressFilterList(msg); break; default: break; @@ -1597,34 +1597,34 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) else result = false; } - else if (msg == CRCInput::RC_minus) + else if (msg == CRCInput::RC_minus) { onSetGUIWindowPrev(); //refreshMovieInfo(); } - else if (msg == CRCInput::RC_plus) + else if (msg == CRCInput::RC_plus) { onSetGUIWindowNext(); //refreshMovieInfo(); } - else if (msg == CRCInput::RC_green) + else if (msg == CRCInput::RC_green) { if(m_settings.gui == MB_GUI_MOVIE_INFO) onSetGUIWindow(MB_GUI_FILTER); else if(m_settings.gui == MB_GUI_FILTER) onSetGUIWindow(MB_GUI_MOVIE_INFO); - // no effect if gui is last play or record + // no effect if gui is last play or record } - else if (msg == CRCInput::RC_yellow) + else if (msg == CRCInput::RC_yellow) { onSetFocusNext(); } - else if (msg == CRCInput::RC_blue) + else if (msg == CRCInput::RC_blue) { loadMovies(); refresh(); } - else if (msg == CRCInput::RC_red ) + else if (msg == CRCInput::RC_red ) { if(m_settings.gui != MB_GUI_LAST_PLAY && m_settings.gui != MB_GUI_LAST_RECORD) { @@ -1636,23 +1636,23 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) else m_settings.sorting.item = (MB_INFO_ITEM)(m_settings.sorting.item + 1); }while(sortBy[m_settings.sorting.item] == NULL); - + TRACE("[mb]->new sorting %d,%s\r\n",m_settings.sorting.item,g_Locale->getText(m_localizedItemName[m_settings.sorting.item])); - refreshBrowserList(); + refreshBrowserList(); refreshFoot(); } } - else if (msg == CRCInput::RC_spkr) + else if (msg == CRCInput::RC_spkr) { if(m_vMovieInfo.size() > 0) - { + { if(m_movieSelectionHandler != NULL) { onDeleteFile(*m_movieSelectionHandler); } } } - else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) + else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) { if(m_movieSelectionHandler != NULL) { @@ -1661,7 +1661,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) refresh(); } } - else if (msg == CRCInput::RC_setup) + else if (msg == CRCInput::RC_setup) { if(m_movieSelectionHandler != NULL) showMenu(m_movieSelectionHandler); @@ -1687,7 +1687,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) #if 0 if((m_movieSelectionHandler == playing_info) && (NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode())) ShowMsgUTF(LOCALE_MESSAGEBOX_ERROR, "Impossible to cut playing movie.", CMessageBox::mbrCancel, CMessageBox::mbCancel, "error.raw"); - else + else #endif if(ShowMsgUTF (LOCALE_MESSAGEBOX_INFO, "Cut jumps from movie ?", CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo) == CMessageBox::mbrYes) { CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, "Cutting, please wait"); @@ -1748,11 +1748,11 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) return (result); } -bool CMovieBrowser::onButtonPressBrowserList(neutrino_msg_t msg) +bool CMovieBrowser::onButtonPressBrowserList(neutrino_msg_t msg) { //TRACE("[mb]->onButtonPressBrowserList %d\r\n",msg); bool result = true; - + if(msg==CRCInput::RC_up) { m_pcBrowser->scrollLineUp(1); @@ -1788,11 +1788,11 @@ bool CMovieBrowser::onButtonPressBrowserList(neutrino_msg_t msg) return (result); } -bool CMovieBrowser::onButtonPressLastPlayList(neutrino_msg_t msg) +bool CMovieBrowser::onButtonPressLastPlayList(neutrino_msg_t msg) { //TRACE("[mb]->onButtonPressLastPlayList %d\r\n",msg); bool result = true; - + if(msg==CRCInput::RC_up) { m_pcLastPlay->scrollLineUp(1); @@ -1820,11 +1820,11 @@ bool CMovieBrowser::onButtonPressLastPlayList(neutrino_msg_t msg) return (result); } -bool CMovieBrowser::onButtonPressLastRecordList(neutrino_msg_t msg) +bool CMovieBrowser::onButtonPressLastRecordList(neutrino_msg_t msg) { //TRACE("[mb]->onButtonPressLastRecordList %d\r\n",msg); bool result = true; - + if(msg==CRCInput::RC_up) { m_pcLastRecord->scrollLineUp(1); @@ -1853,16 +1853,16 @@ bool CMovieBrowser::onButtonPressLastRecordList(neutrino_msg_t msg) return (result); } -bool CMovieBrowser::onButtonPressBookmarkList(neutrino_msg_t msg) +bool CMovieBrowser::onButtonPressBookmarkList(neutrino_msg_t /*msg*/) { //TRACE("[mb]->onButtonPressBookmarkList %d\r\n",msg); bool result = true; - + result = false; return (result); } -bool CMovieBrowser::onButtonPressFilterList(neutrino_msg_t msg) +bool CMovieBrowser::onButtonPressFilterList(neutrino_msg_t msg) { //TRACE("[mb]->onButtonPressFilterList %d,%d\r\n",msg,m_settings.filter.item); bool result = true; @@ -1904,9 +1904,9 @@ bool CMovieBrowser::onButtonPressFilterList(neutrino_msg_t msg) m_settings.filter.optionVar = 0; refreshFilterList(); m_pcFilter->setSelectedLine(0); - refreshBrowserList(); - refreshLastPlayList(); - refreshLastRecordList(); + refreshBrowserList(); + refreshLastPlayList(); + refreshLastRecordList(); refreshFoot(); } else @@ -1928,15 +1928,15 @@ bool CMovieBrowser::onButtonPressFilterList(neutrino_msg_t msg) // default result = false; } - + return (result); } -bool CMovieBrowser::onButtonPressMovieInfoList(neutrino_msg_t msg) +bool CMovieBrowser::onButtonPressMovieInfoList(neutrino_msg_t msg) { // TRACE("[mb]->onButtonPressEPGInfoList %d\r\n",msg); bool result = true; - + if(msg == CRCInput::RC_up) { m_pcInfo->scrollPageUp(1); @@ -1949,7 +1949,7 @@ bool CMovieBrowser::onButtonPressMovieInfoList(neutrino_msg_t msg) { // default result = false; - } + } return (result); } @@ -1958,9 +1958,9 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler) { //TRACE( "[onDeleteFile] "); int test= movieSelectionHandler.file.Name.find(".ts"); - if(test == -1) - { - // not a TS file, return!!!!! + if(test == -1) + { + // not a TS file, return!!!!! TRACE( "show_ts_info: not a TS file "); } else @@ -1974,13 +1974,13 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler) } else msg += movieSelectionHandler.file.Name; - + msg += "\r\n "; msg += g_Locale->getText(LOCALE_FILEBROWSER_DODELETE2); if (ShowMsgUTF(LOCALE_FILEBROWSER_DELETE, msg, CMessageBox::mbrNo, CMessageBox::mbYes|CMessageBox::mbNo)==CMessageBox::mbrYes) { delFile(movieSelectionHandler.file); - + #if 1 int i = 1; char newpath[1024]; @@ -1999,32 +1999,32 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler) unlink(fname.c_str()); #endif - CFile file_xml = movieSelectionHandler.file; - if(m_movieInfo.convertTs2XmlName(&file_xml.Name) == true) + CFile file_xml = movieSelectionHandler.file; + if(m_movieInfo.convertTs2XmlName(&file_xml.Name) == true) { delFile(file_xml); } - + m_vMovieInfo.erase( (std::vector::iterator)&movieSelectionHandler); TRACE("List size: %d\n", m_vMovieInfo.size()); //if(m_vMovieInfo.size() == 0) fileInfoStale(); //if(m_vMovieInfo.size() == 0) onSetGUIWindow(m_settings.gui); updateSerienames(); refreshBrowserList(); - refreshLastPlayList(); - refreshLastRecordList(); + refreshLastPlayList(); + refreshLastRecordList(); refreshMovieInfo(); - + //loadMovies(); // //TODO we might remove the handle from the handle list only, to avoid reload ..... refresh(); } - } + } } void CMovieBrowser::onSetGUIWindow(MB_GUI gui) { m_settings.gui = gui; - + if(gui == MB_GUI_MOVIE_INFO) { TRACE("[mb] browser info\r\n"); @@ -2096,12 +2096,12 @@ void CMovieBrowser::onSetGUIWindow(MB_GUI gui) m_showMovieInfo = false; m_pcInfo->hide(); m_pcFilter->paint(); - + onSetFocus(MB_FOCUS_FILTER); } } -void CMovieBrowser::onSetGUIWindowNext(void) +void CMovieBrowser::onSetGUIWindowNext(void) { if(m_settings.gui == MB_GUI_MOVIE_INFO ) { @@ -2117,7 +2117,7 @@ void CMovieBrowser::onSetGUIWindowNext(void) } } -void CMovieBrowser::onSetGUIWindowPrev(void) +void CMovieBrowser::onSetGUIWindowPrev(void) { if(m_settings.gui == MB_GUI_MOVIE_INFO ) { @@ -2181,10 +2181,10 @@ void CMovieBrowser::onSetFocus(MB_FOCUS new_focus) refreshFoot(); } -void CMovieBrowser::onSetFocusNext(void) +void CMovieBrowser::onSetFocusNext(void) { //TRACE("[mb]->onSetFocusNext \r\n"); - + if(m_settings.gui == MB_GUI_FILTER) { if(m_windowFocus == MB_FOCUS_BROWSER) @@ -2239,17 +2239,17 @@ void CMovieBrowser::onSetFocusNext(void) bool CMovieBrowser::onSortMovieInfoHandleList(std::vector& handle_list, MB_INFO_ITEM sort_item, MB_DIRECTION direction) { //TRACE("sort: %d\r\n",direction); - if(handle_list.size() <= 0) + if(handle_list.size() <= 0) return (false); // nothing to sort, return immedately - if(sortBy[sort_item] == NULL) + if(sortBy[sort_item] == NULL) return (false); - + if(direction == MB_DIRECTION_AUTO) { - if( sort_item == MB_INFO_QUALITY || - sort_item == MB_INFO_PARENTAL_LOCKAGE || - sort_item == MB_INFO_PREVPLAYDATE || - sort_item == MB_INFO_RECORDDATE || + if( sort_item == MB_INFO_QUALITY || + sort_item == MB_INFO_PARENTAL_LOCKAGE || + sort_item == MB_INFO_PREVPLAYDATE || + sort_item == MB_INFO_RECORDDATE || sort_item == MB_INFO_PRODDATE || sort_item == MB_INFO_SIZE) { @@ -2268,10 +2268,10 @@ bool CMovieBrowser::onSortMovieInfoHandleList(std::vector& handl { sortDirection = 1; } - + //TRACE("sort: %d\r\n",sortDirection); sort(handle_list.begin(), handle_list.end(), sortBy[sort_item]); - + return (true); } @@ -2304,7 +2304,7 @@ void CMovieBrowser::loadAllTsFileNamesFromStorage(void) { //TRACE("[mb]->loadAllTsFileNamesFromStorage \r\n"); bool result; - int i,size; + int i,size; m_movieSelectionHandler = NULL; m_dirNames.clear(); @@ -2342,7 +2342,7 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname) if (recursive_counter > 10) { - TRACE("[mb]loadTsFileNamesFromDir: return->recoursive error\r\n"); + TRACE("[mb]loadTsFileNamesFromDir: return->recoursive error\r\n"); return (false); // do not go deeper than 10 directories } @@ -2350,11 +2350,11 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname) int size = m_dirNames.size(); for(int i = 0; i < size; i++) { - if(strcmp(m_dirNames[i].c_str(),dirname.c_str()) == 0) + if(strcmp(m_dirNames[i].c_str(),dirname.c_str()) == 0) { // string is identical to previous one - TRACE("[mb]Dir already in list: %s\r\n",dirname.c_str()); - return (false); + TRACE("[mb]Dir already in list: %s\r\n",dirname.c_str()); + return (false); } } /* !!!!!! no return statement within the body after here !!!!*/ @@ -2367,7 +2367,7 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname) //m_movieInfo.clearMovieInfo(&movieInfo); // refresh structure for(unsigned int i = 0; i < flist.size(); i++) { - if( S_ISDIR(flist[i].Mode)) + if( S_ISDIR(flist[i].Mode)) { flist[i].Name += '/'; //TRACE("[mb] Dir: '%s'\r\n",movieInfo.file.Name.c_str()); @@ -2395,7 +2395,7 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname) //TRACE(" s:%llu\r\n",movieInfo.file.getFileName().c_str(),movieInfo.file.Size); if(file_found_in_dir == false) { - // first file in directory found, add directory to list + // first file in directory found, add directory to list m_dirNames.push_back(dirname); file_found_in_dir = true; //TRACE("[mb] new dir: :%s\r\n",dirname); @@ -2407,8 +2407,8 @@ bool CMovieBrowser::loadTsFileNamesFromDir(const std::string & dirname) } } result = true; - } - + } + recursive_counter--; return (result); } @@ -2427,7 +2427,7 @@ bool CMovieBrowser::readDir(const std::string & dirname, CFileList* flist) return(result); } -bool CMovieBrowser::readDir_vlc(const std::string & dirname, CFileList* flist) +bool CMovieBrowser::readDir_vlc(const std::string & /*dirname*/, CFileList* /*flist*/) { return false; } @@ -2488,7 +2488,7 @@ bool CMovieBrowser::delFile(CFile& file) return(result); } -bool CMovieBrowser::delFile_vlc(CFile& file) +bool CMovieBrowser::delFile_vlc(CFile& /*file*/) { bool result = false; return(result); @@ -2507,7 +2507,7 @@ void CMovieBrowser::updateMovieSelection(void) //TRACE("[mb]->updateMovieSelection %d\r\n",m_windowFocus); if (m_vMovieInfo.size() == 0) return; bool new_selection = false; - + unsigned int old_movie_selection; if(m_windowFocus == MB_FOCUS_BROWSER) { @@ -2525,7 +2525,7 @@ void CMovieBrowser::updateMovieSelection(void) //TRACE(" sel1:%d\r\n",m_currentBrowserSelection); if(m_currentBrowserSelection != old_movie_selection) new_selection = true; - + if(m_currentBrowserSelection < m_vHandleBrowserList.size()) m_movieSelectionHandler = m_vHandleBrowserList[m_currentBrowserSelection]; } @@ -2546,7 +2546,7 @@ void CMovieBrowser::updateMovieSelection(void) //TRACE(" sel2:%d\r\n",m_currentPlaySelection); if(m_currentPlaySelection != old_movie_selection) new_selection = true; - + if(m_currentPlaySelection < m_vHandlePlayList.size()) m_movieSelectionHandler = m_vHandlePlayList[m_currentPlaySelection]; } @@ -2567,12 +2567,12 @@ void CMovieBrowser::updateMovieSelection(void) //TRACE(" sel3:%d\r\n",m_currentRecordSelection); if(m_currentRecordSelection != old_movie_selection) new_selection = true; - + if(m_currentRecordSelection < m_vHandleRecordList.size()) m_movieSelectionHandler = m_vHandleRecordList[m_currentRecordSelection]; } - } - + } + if(new_selection == true) { //TRACE("new\r\n"); @@ -2616,9 +2616,9 @@ void CMovieBrowser::updateFilterSelection(void) } if(result == true) { - refreshBrowserList(); - refreshLastPlayList(); - refreshLastRecordList(); + refreshBrowserList(); + refreshLastPlayList(); + refreshLastRecordList(); refreshFoot(); } } @@ -2627,7 +2627,7 @@ bool CMovieBrowser::addDir(std::string& dirname, int* used) { if(dirname.empty()) return false; if(dirname == "/") return false; - + MB_DIR newdir; newdir.name = dirname; @@ -2645,7 +2645,7 @@ bool CMovieBrowser::addDir(std::string& dirname, int* used) { // string is identical to previous one TRACE("[mb] Dir already in list: %s\r\n",newdir.name.c_str()); - return (false); + return (false); } } TRACE("[mb] new Dir: %s\r\n",newdir.name.c_str()); @@ -2667,19 +2667,19 @@ void CMovieBrowser::loadMovies(void) clock_t clock_act = clock_start; TRACE("[mb] loadMovies: \n"); - + CHintBox loadBox(LOCALE_MOVIEBROWSER_HEAD,g_Locale->getText(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES)); loadBox.paint(); -//clock_act = clock()/10000;TRACE("[mb] *1: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; +//clock_act = clock()/10000;TRACE("[mb] *1: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; loadAllTsFileNamesFromStorage(); // P1 -//clock_act = clock()/10000;TRACE("[mb] *2: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; +//clock_act = clock()/10000;TRACE("[mb] *2: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; //loadAllMovieInfo(); // P1 -//clock_act = clock()/10000;TRACE("[mb] *3: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; +//clock_act = clock()/10000;TRACE("[mb] *3: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; m_file_info_stale = false; m_seriename_stale = true; // we reloded the movie info, so make sure the other list are updated later on as well updateSerienames(); -//clock_act = clock()/10000;TRACE("[mb] *4: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; +//clock_act = clock()/10000;TRACE("[mb] *4: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; if(m_settings.serie_auto_create == 1) { autoFindSerie(); @@ -2687,14 +2687,14 @@ void CMovieBrowser::loadMovies(void) loadBox.hide(); -//clock_act = clock()/10000;TRACE("[mb] *5: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; - refreshBrowserList(); -//clock_act = clock()/10000;TRACE("[mb] *6: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; - refreshLastPlayList(); +//clock_act = clock()/10000;TRACE("[mb] *5: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; + refreshBrowserList(); +//clock_act = clock()/10000;TRACE("[mb] *6: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; + refreshLastPlayList(); refreshLastRecordList(); refreshFilterList(); refreshMovieInfo(); // is done by refreshBrowserList if needed -//clock_act = clock()/10000;TRACE("[mb] *7: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; +//clock_act = clock()/10000;TRACE("[mb] *7: time %9ld clock %6ld dclock %6ld*\n",(long)time(NULL),clock_act,clock_act - clock_prev);clock_prev = clock_act; TRACE("[mb] ***Total:time %ld clock %ld***\n",(time(NULL)-time_start), clock_act-clock_start); } @@ -2849,7 +2849,7 @@ void CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info) } extern "C" int pinghost( const char *hostname ); -bool CMovieBrowser::showMenu(MI_MOVIE_INFO* movie_info) +bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /*movie_info*/) { /* first clear screen */ m_pcWindow->paintBackground(); @@ -2879,7 +2879,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* movie_info) optionsMenuDir.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_USE_MOVIE_DIR, (int*)(&m_settings.storageDirMovieUsed), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true )); optionsMenuDir.addItem( new CMenuForwarder (LOCALE_MOVIEBROWSER_DIR, false , g_settings.network_nfs_moviedir)); optionsMenuDir.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MOVIEBROWSER_DIR_HEAD)); - + CFileChooser* dirInput[MB_MAX_DIRS]; CMenuOptionChooser* chooser[MB_MAX_DIRS]; COnOffNotifier* notifier[MB_MAX_DIRS]; @@ -2942,7 +2942,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* movie_info) optionsMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_HIDE_SERIES, (int*)(&m_settings.browser_serie_mode), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true )); optionsMenu.addItem( new CMenuOptionChooser(LOCALE_MOVIEBROWSER_SERIE_AUTO_CREATE, (int*)(&m_settings.serie_auto_create), MESSAGEBOX_YES_NO_OPTIONS, MESSAGEBOX_YES_NO_OPTIONS_COUNT, true )); //optionsMenu.addItem(GenericMenuSeparator); - + /********************************************************************/ /** main menu ******************************************************/ CMovieHelp* movieHelp = new CMovieHelp(); @@ -2959,7 +2959,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* movie_info) mainMenu.addItem(GenericMenuSeparatorLine); mainMenu.addItem( new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_HELP_HEAD, true, NULL, movieHelp, NULL, CRCInput::RC_help, NEUTRINO_ICON_BUTTON_HELP_SMALL)); //mainMenu.addItem(GenericMenuSeparator); - + mainMenu.exec(NULL, " "); // post menu handling @@ -2969,9 +2969,9 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* movie_info) m_settings.browserFrameHeight = MIN_BROWSER_FRAME_HEIGHT; if(m_settings.browserFrameHeight > MAX_BROWSER_FRAME_HEIGHT) m_settings.browserFrameHeight = MAX_BROWSER_FRAME_HEIGHT; - if (m_settings.browserRowNr > MB_MAX_ROWS ) + if (m_settings.browserRowNr > MB_MAX_ROWS ) m_settings.browserRowNr = MB_MAX_ROWS; - if (m_settings.browserRowNr < 1 ) + if (m_settings.browserRowNr < 1 ) m_settings.browserRowNr = 1; for(i = 0; i < m_settings.browserRowNr; i++) { @@ -3002,7 +3002,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* movie_info) delete movieHelp; delete nfs; - + //restart_mb_timeout = 1; return(true); @@ -3015,18 +3015,18 @@ int CMovieBrowser::showStartPosSelectionMenu(void) // P2 int result = 0; int menu_nr= 0; int position[MAX_NUMBER_OF_BOOKMARK_ITEMS]; - + if(m_movieSelectionHandler == NULL) return(result); - - char start_pos[13]; snprintf(start_pos, 12,"%3d min",m_movieSelectionHandler->bookmarks.start/60); - char play_pos[13]; snprintf(play_pos, 12,"%3d min",m_movieSelectionHandler->bookmarks.lastPlayStop/60); - + + char start_pos[13]; snprintf(start_pos, 12,"%3d min",m_movieSelectionHandler->bookmarks.start/60); + char play_pos[13]; snprintf(play_pos, 12,"%3d min",m_movieSelectionHandler->bookmarks.lastPlayStop/60); + char book[MI_MOVIE_BOOK_USER_MAX][20]; CMenuWidgetSelection startPosSelectionMenu(LOCALE_MOVIEBROWSER_START_HEAD , "streaming.raw"); - + startPosSelectionMenu.addItem(GenericMenuSeparator); - + //startPosSelectionMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_START_RECORD_START, true,NULL)); //position[menu_nr++] = 0; if(m_movieSelectionHandler->bookmarks.start != 0) @@ -3034,7 +3034,7 @@ int CMovieBrowser::showStartPosSelectionMenu(void) // P2 startPosSelectionMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_MOVIESTART, true, start_pos)); position[menu_nr++] = m_movieSelectionHandler->bookmarks.start; } - if(m_movieSelectionHandler->bookmarks.lastPlayStop != 0) + if(m_movieSelectionHandler->bookmarks.lastPlayStop != 0) { startPosSelectionMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_BOOK_LASTMOVIESTOP, true, play_pos)); position[menu_nr++] = m_movieSelectionHandler->bookmarks.lastPlayStop; @@ -3053,7 +3053,7 @@ int CMovieBrowser::showStartPosSelectionMenu(void) // P2 position[menu_nr] = m_movieSelectionHandler->bookmarks.user[i].pos; else position[menu_nr] = m_movieSelectionHandler->bookmarks.user[i].pos + m_movieSelectionHandler->bookmarks.user[i].length; - + snprintf(book[i], 19,"%5d min",position[menu_nr]/60); TRACE("[mb] adding boomark menu N %d, position %d\n", menu_nr, position[menu_nr]); startPosSelectionMenu.addItem(new CMenuForwarderNonLocalized (m_movieSelectionHandler->bookmarks.user[i].name.c_str(), true, book[i])); @@ -3076,7 +3076,7 @@ printf("startPosSelectionMenu result %d\n", result); pos = position[result]; } TRACE("[mb] selected bookmark %d position %d \n", result, pos); - + return(pos) ; } @@ -3093,7 +3093,7 @@ bool CMovieBrowser::isParentalLock(MI_MOVIE_INFO& movie_info) bool CMovieBrowser::isFiltered(MI_MOVIE_INFO& movie_info) { bool result = true; - + switch(m_settings.filter.item) { case MB_INFO_FILEPATH: @@ -3101,7 +3101,7 @@ bool CMovieBrowser::isFiltered(MI_MOVIE_INFO& movie_info) result = false; break; case MB_INFO_INFO1: - if(strcmp(m_settings.filter.optionString.c_str(),movie_info.epgInfo1.c_str()) == 0) + if(strcmp(m_settings.filter.optionString.c_str(),movie_info.epgInfo1.c_str()) == 0) result = false; break; case MB_INFO_MAJOR_GENRE: @@ -3109,7 +3109,7 @@ bool CMovieBrowser::isFiltered(MI_MOVIE_INFO& movie_info) result = false; break; case MB_INFO_SERIE: - if(strcmp(m_settings.filter.optionString.c_str(),movie_info.serieName.c_str()) == 0) + if(strcmp(m_settings.filter.optionString.c_str(),movie_info.serieName.c_str()) == 0) result = false; break; break; @@ -3127,7 +3127,7 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite bool result = true; *item_string=""; tm* tm_tmp; - + char text[20]; int i=0; int counter=0; @@ -3176,7 +3176,7 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite // we just return the number of bookmarks for(i = 0; i < MI_MOVIE_BOOK_USER_MAX; i++) { - if(movie_info.bookmarks.user[i].pos != 0) + if(movie_info.bookmarks.user[i].pos != 0) counter++; } snprintf(text, 8,"%d",counter); @@ -3222,9 +3222,9 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite text[counter++] = '?'; // two chars ??? -> strange name continue; } - + // check for Dolby Digital / AC3 Audio audiopids (less than 5.1 is not remarkable) - if( (movie_info.audioPids[i].epgAudioPidName.find("AC3") != -1 ) || + if( (movie_info.audioPids[i].epgAudioPidName.find("AC3") != -1 ) || (movie_info.audioPids[i].epgAudioPidName.find("5.1") != -1 )) { ac3_found = true; @@ -3235,8 +3235,8 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite movie_info.audioPids[i].epgAudioPidName[0] == 'G' || // German movie_info.audioPids[i].epgAudioPidName[0] == 'g' || movie_info.audioPids[i].epgAudioPidName[0] == 'M' || // for Mono, mono and Stereo, stereo we assume German ;) - movie_info.audioPids[i].epgAudioPidName[0] == 'n' || - (movie_info.audioPids[i].epgAudioPidName[0] == 'S' && movie_info.audioPids[i].epgAudioPidName[1] == 't' ) || + movie_info.audioPids[i].epgAudioPidName[0] == 'n' || + (movie_info.audioPids[i].epgAudioPidName[0] == 'S' && movie_info.audioPids[i].epgAudioPidName[1] == 't' ) || (movie_info.audioPids[i].epgAudioPidName[0] == 's' && movie_info.audioPids[i].epgAudioPidName[1] == 't' )) { text[counter++] = 'D'; @@ -3280,18 +3280,18 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite text[counter++] = '.'; text[counter++] = '1'; } - text[counter] = 0; // terminate string + text[counter] = 0; // terminate string #endif // MB_INFO_AUDIO test break; case MB_INFO_LENGTH: // = 18, snprintf(str_tmp,MAX_STR_TMP,"%4d",movie_info.length); *item_string = str_tmp; break; - case MB_INFO_SIZE: // = 19, + case MB_INFO_SIZE: // = 19, snprintf(str_tmp,MAX_STR_TMP,"%4llu",movie_info.file.Size>>20); *item_string = str_tmp; break; - case MB_INFO_MAX_NUMBER: // = 20 + case MB_INFO_MAX_NUMBER: // = 20 default: *item_string=""; result = false; @@ -3303,9 +3303,9 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite void CMovieBrowser::updateSerienames(void) { - if(m_seriename_stale == false) + if(m_seriename_stale == false) return; - + m_vHandleSerienames.clear(); for(unsigned int i = 0; i < m_vMovieInfo.size(); i++) { @@ -3325,7 +3325,7 @@ void CMovieBrowser::updateSerienames(void) TRACE("[mb]->updateSerienames: %d\r\n",m_vHandleSerienames.size()); // TODO sort(m_serienames.begin(), m_serienames.end(), my_alphasort); m_seriename_stale = false; -} +} void CMovieBrowser::autoFindSerie(void) { @@ -3379,22 +3379,22 @@ CMenuSelector::CMenuSelector(const char * OptionName, const bool Active , std::s returnInt = ReturnInt; }; -int CMenuSelector::exec(CMenuTarget* parent) -{ +int CMenuSelector::exec(CMenuTarget* /*parent*/) +{ if(returnInt != NULL) *returnInt= returnIntValue; - - if(optionValue != NULL && optionName != NULL) + + if(optionValue != NULL && optionName != NULL) { if(optionValueString == NULL) - strcpy(optionValue,optionName); + strcpy(optionValue,optionName); else *optionValueString = optionName; } return menu_return::RETURN_EXIT; }; -int CMenuSelector::paint(bool selected, bool last) +int CMenuSelector::paint(bool selected, bool /*last*/) { CFrameBuffer * frameBuffer = CFrameBuffer::getInstance(); @@ -3422,7 +3422,7 @@ int CMenuSelector::paint(bool selected, bool last) return y+height; } -int CMovieHelp::exec(CMenuTarget* parent, const std::string & actionKey) +int CMovieHelp::exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/) { Helpbox helpbox; helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, "Sortierung ändern"); @@ -3444,7 +3444,7 @@ int CMovieHelp::exec(CMenuTarget* parent, const std::string & actionKey) ///////////////////////////////////////////////// // MenuTargets //////////////////////////////////////////////// -int CFileChooser::exec(CMenuTarget* parent, const std::string & actionKey) +int CFileChooser::exec(CMenuTarget* parent, const std::string & /*actionKey*/) { if(parent != NULL) parent->hide(); @@ -3457,9 +3457,9 @@ int CFileChooser::exec(CMenuTarget* parent, const std::string & actionKey) short a = dirPath->compare(0,5,"/mnt/"); short b = dirPath->compare(0,7,"/media/"); if(a != 0 && b != 0) - *dirPath =""; // We clear the string if the selected folder is not at leaset /mnt/ or /hdd (There is no other possibility to clear this) + *dirPath =""; // We clear the string if the selected folder is not at leaset /mnt/ or /hdd (There is no other possibility to clear this) } - + return menu_return::RETURN_REPAINT; } @@ -3484,7 +3484,7 @@ CDirMenu::CDirMenu(std::vector* dir_list) if(tmp.size()) result = (*dirList)[i].name.compare( 0,tmp.size(),tmp) ; printf("[CDirMenu] (nfs%d) %s == (mb%d) %s (%d)\n",nfs,g_settings.network_nfs_local_dir[nfs],i,(*dirList)[i].name.c_str(),result); - + if(result == 0) { dirNfsMountNr[i] = nfs; @@ -3797,7 +3797,7 @@ static int read_psi(char * spart, unsigned char * buf) static void save_info(CMovieInfo * cmovie, MI_MOVIE_INFO * minfo, char * dpart, off64_t spos, off64_t secsize) { MI_MOVIE_INFO ninfo; - + cmovie->copy(minfo, &ninfo); ninfo.file.Name = dpart; ninfo.file.Size = spos; @@ -3893,7 +3893,7 @@ static off64_t cut_movie(MI_MOVIE_INFO * minfo, CMovieInfo * cmovie) } CFrameBuffer * frameBuffer = CFrameBuffer::getInstance(); - if(!timescale) + if(!timescale) timescale = new CScale(200, 15, 0, 100, 0); int dx = 256; int x = (((g_settings.screen_EndX- g_settings.screen_StartX)- dx) / 2) + g_settings.screen_StartX; diff --git a/src/gui/moviebrowser.h b/src/gui/moviebrowser.h index 5dce329f4..176fb4a28 100644 --- a/src/gui/moviebrowser.h +++ b/src/gui/moviebrowser.h @@ -1,6 +1,6 @@ /*************************************************************************** Neutrino-GUI - DBoxII-Project - + Homepage: http://dbox.cyberphoria.org/ $Id: moviebrowser.h,v 1.5 2006/09/11 21:11:35 guenther Exp $ @@ -50,16 +50,16 @@ Update movie info on delete movie Delete Background when menu is entered Timeout updated (MB does not exit after options menu is left) - + Revision 1.4 2006/02/20 01:10:34 guenther - temporary parental lock updated - remove 1s debug prints in movieplayer- Delete file without rescan of movies- Crash if try to scroll in list with 2 movies only- UTF8XML to UTF8 conversion in preview- Last file selection recovered- use of standard folders adjustable in config- reload and remount option in config - + Revision 1.3 2005/12/18 09:23:53 metallica fix compil warnings - + Revision 1.2 2005/12/12 07:58:02 guenther - fix bug on deleting CMovieBrowser - speed up parse time (20 ms per .ts file now)- update stale function- refresh directories on reload- print scan time in debug console - + ****************************************************************************/ #ifndef MOVIEBROWSER_H_ @@ -108,14 +108,14 @@ typedef enum MB_INFO_GEOMETRIE = 16, MB_INFO_AUDIO = 17, MB_INFO_LENGTH = 18, - MB_INFO_SIZE = 19, + MB_INFO_SIZE = 19, MB_INFO_MAX_NUMBER = 20 // MUST be allways the last item in the list }MB_INFO_ITEM; typedef enum -{ +{ MB_DIRECTION_AUTO = 0, MB_DIRECTION_UP = 1, MB_DIRECTION_DOWN = 2, @@ -125,7 +125,7 @@ typedef enum typedef struct { MB_INFO_ITEM item; - MB_DIRECTION direction; + MB_DIRECTION direction; }MB_SORTING; typedef enum @@ -189,7 +189,7 @@ typedef struct MB_FILTER filter;//MB_FILTER MI_PARENTAL_LOCKAGE parentalLockAge ;//MI_PARENTAL_LOCKAGE MB_PARENTAL_LOCK parentalLock;//MB_PARENTAL_LOCK - + std::string storageDir[MB_MAX_DIRS]; int storageDirUsed[MB_MAX_DIRS]; int storageDirRecUsed; @@ -200,13 +200,13 @@ typedef struct int browser_serie_mode; int serie_auto_create; - /* these variables are used for the listframes */ + /* these variables are used for the listframes */ int browserFrameHeight; int browserRowNr; MB_INFO_ITEM browserRowItem[MB_MAX_ROWS];//MB_INFO_ITEM int browserRowWidth[MB_MAX_ROWS]; - // to be added to config later + // to be added to config later int lastPlayMaxItems; int lastPlayRowNr; MB_INFO_ITEM lastPlayRow[MB_MAX_ROWS]; @@ -224,7 +224,7 @@ class CMovieBrowser : public CMenuTarget public: // Variables ///////////////////////////////////////////////// int Multi_Select; // for FileBrowser compatibility, not used in MovieBrowser int Dirs_Selectable; // for FileBrowser compatibility, not used in MovieBrowser - + private: // Variables //CFBWindow* m_pcWindow; CFrameBuffer * m_pcWindow; @@ -233,8 +233,8 @@ class CMovieBrowser : public CMenuTarget CListFrame* m_pcLastPlay; CListFrame* m_pcLastRecord; CTextBox* m_pcInfo; - CListFrame* m_pcFilter; - + CListFrame* m_pcFilter; + CBox m_cBoxFrame; CBox m_cBoxFrameLastPlayList; CBox m_cBoxFrameLastRecordList; @@ -244,7 +244,7 @@ class CMovieBrowser : public CMenuTarget CBox m_cBoxFrameFilter; CBox m_cBoxFrameFootRel; CBox m_cBoxFrameTitleRel; - + LF_LINES m_browserListLines; LF_LINES m_recordListLines; LF_LINES m_playListLines; @@ -283,25 +283,25 @@ class CMovieBrowser : public CMenuTarget Font* m_pcFontFoot; Font* m_pcFontTitle; std::string m_textTitle; - + MB_PARENTAL_LOCK m_parentalLock; MB_STORAGE_TYPE m_storageType; - + CConfigFile configfile; CMovieInfo m_movieInfo; MB_SETTINGS m_settings; std::vector m_dir; - + int movieInfoUpdateAll[MB_INFO_MAX_NUMBER]; int movieInfoUpdateAllIfDestEmptyOnly; //bool restart_mb_timeout; public: // Functions //////////////////////////////////////////////////////////7 - CMovieBrowser(const char* path); //P1 - CMovieBrowser(); //P1 - ~CMovieBrowser(); //P1 - int exec(const char* path); //P1 + CMovieBrowser(const char* path); //P1 + CMovieBrowser(); //P1 + ~CMovieBrowser(); //P1 + int exec(const char* path); //P1 int exec(CMenuTarget* parent, const std::string & actionKey); std::string getCurrentDir(void); //P1 for FileBrowser compatibility CFile* getSelectedFile(void); //P1 for FileBrowser compatibility @@ -317,9 +317,9 @@ class CMovieBrowser : public CMenuTarget bool delFile(CFile& file); bool delFile_vlc(CFile& file); bool delFile_std(CFile& file); - + private: //Functions - ///// MovieBrowser init /////////////// + ///// MovieBrowser init /////////////// void init(void); //P1 void initGlobalSettings(void); //P1 void initFrames(void); @@ -327,7 +327,7 @@ class CMovieBrowser : public CMenuTarget void initRows(void); void reinit(void); //P1 - ///// MovieBrowser Main Window////////// + ///// MovieBrowser Main Window////////// int paint(void); //P1 void refresh(void); //P1 void hide(void); //P1 @@ -341,7 +341,7 @@ class CMovieBrowser : public CMenuTarget void refreshTitle(void); //P2 void refreshInfo(void); // P2 void refreshLCD(void); // P2 - + ///// Events /////////////////////////// bool onButtonPress(neutrino_msg_t msg); // P1 bool onButtonPressMainFrame(neutrino_msg_t msg); // P1 @@ -359,29 +359,29 @@ class CMovieBrowser : public CMenuTarget void onSetGUIWindowPrev(void); void onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler); // P4 bool onSortMovieInfoHandleList(std::vector& pv_handle_list, MB_INFO_ITEM sort_type, MB_DIRECTION direction); - - ///// parse Storage Directories ///////////// + + ///// parse Storage Directories ///////////// bool addDir(std::string& dirname, int* used); void updateDir(void); void loadAllTsFileNamesFromStorage(void); // P1 bool loadTsFileNamesFromDir(const std::string & dirname); // P1 void getStorageInfo(void); // P3 - - ///// Menu //////////////////////////////////// + + ///// Menu //////////////////////////////////// bool showMenu(MI_MOVIE_INFO* movie_info); // P2 void showMovieInfoMenu(MI_MOVIE_INFO* movie_info); // P2 int showStartPosSelectionMenu(void); // P2 - - ///// settings /////////////////////////////////// + + ///// settings /////////////////////////////////// bool loadSettings(MB_SETTINGS* settings); // P2 bool saveSettings(MB_SETTINGS* settings); // P2 void defaultSettings(MB_SETTINGS* settings); - - ///// EPG_DATA /XML /////////////////////////////// + + ///// EPG_DATA /XML /////////////////////////////// void loadMovies(); void loadAllMovieInfo(void); // P1 void saveMovieInfo(std::string* filename, MI_MOVIE_INFO* movie_info); // P2 - + // misc void showHelp(void); bool isFiltered(MI_MOVIE_INFO& movie_info); @@ -404,7 +404,7 @@ class CMovieHelp : public CMenuTarget int exec( CMenuTarget* parent, const std::string & actionKey ); }; -// I tried a lot to use the menu.cpp as ListBox selection, and I got three solution which are all garbage. +// I tried a lot to use the menu.cpp as ListBox selection, and I got three solution which are all garbage. //Might be replaced by somebody who is familiar with this stuff . // CLass to verifiy a menu was selected by the user. There might be better ways to do so. @@ -413,12 +413,12 @@ class CSelectedMenu : public CMenuTarget public: bool selected; CSelectedMenu(void){selected = false;}; -inline int exec(CMenuTarget* parent, const std::string & actionKey){selected = true; return menu_return::RETURN_EXIT;}; +inline int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/){selected = true; return menu_return::RETURN_EXIT;}; }; -// This Class creates a menue item, which writes its caption to an given string (or an given int value to an given variable). -// The programm could use this class to verify, what menu was selected. +// This Class creates a menue item, which writes its caption to an given string (or an given int value to an given variable). +// The programm could use this class to verify, what menu was selected. // A good listbox class might do the same. There might be better ways to do so. #define BUFFER_MAX 20 class CMenuSelector : public CMenuItem diff --git a/src/gui/movieinfo.cpp b/src/gui/movieinfo.cpp index 63b3a8062..020cca1fd 100644 --- a/src/gui/movieinfo.cpp +++ b/src/gui/movieinfo.cpp @@ -1,4 +1,4 @@ - /*************************************************************************** +/*************************************************************************** Neutrino-GUI - DBoxII-Project Homepage: http://dbox.cyberphoria.org/ @@ -106,7 +106,7 @@ bool CMovieInfo::convertTs2XmlName(std::string * filename) } *filename = filename->substr(0, bytes) + ".xml"; result = true; - } else // not a TS file, return!!!!! + } else // not a TS file, return!!!!! { //TRACE(" not a TS file "); } @@ -320,7 +320,7 @@ bool CMovieInfo::loadMovieInfo(MI_MOVIE_INFO * movie_info, CFile * file) /************************************************************************ ************************************************************************/ -bool CMovieInfo::parseXmlTree(char *text, MI_MOVIE_INFO * movie_info) +bool CMovieInfo::parseXmlTree(char */*text*/, MI_MOVIE_INFO * /*movie_info*/) { #ifndef XMLTREE_LIB return (false); // no XML lib available return false @@ -384,7 +384,7 @@ bool CMovieInfo::parseXmlTree(char *text, MI_MOVIE_INFO * movie_info) XML_GET_DATA_STRING(xam1, MI_XML_TAG_SERIE_NAME, movie_info->serieName); XML_GET_DATA_INT(xam1, MI_XML_TAG_LENGTH, movie_info->length); XML_GET_DATA_STRING(xam1, MI_XML_TAG_PRODUCT_COUNTRY, movie_info->productionCountry); - //if(!strcmp(xam1->GetType(), MI_XML_TAG_PRODUCT_COUNTRY)) if(xam1->GetData() != NULL)strncpy(movie_info->productionCountry, xam1->GetData(),4); + //if(!strcmp(xam1->GetType(), MI_XML_TAG_PRODUCT_COUNTRY)) if(xam1->GetData() != NULL)strncpy(movie_info->productionCountry, xam1->GetData(),4); XML_GET_DATA_INT(xam1, MI_XML_TAG_PRODUCT_DATE, movie_info->productionDate); XML_GET_DATA_INT(xam1, MI_XML_TAG_QUALITY, movie_info->quality); XML_GET_DATA_INT(xam1, MI_XML_TAG_PARENTAL_LOCKAGE, movie_info->parentalLockAge); @@ -426,7 +426,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) std::string print_buffer; tm *date_tm; char date_char[100]; - // prepare print buffer + // prepare print buffer print_buffer = movie_info.epgInfo1; print_buffer += "\n"; print_buffer += movie_info.epgInfo2; @@ -502,7 +502,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) //snprintf(date_char, 12,"%4llu",movie_info.file.Size>>20); sprintf(date_char, "%llu", movie_info.file.Size >> 20); print_buffer += date_char; - //print_buffer += "\n"; + //print_buffer += "\n"; } print_buffer += "\n"; print_buffer += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_PATH); @@ -510,7 +510,7 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) print_buffer += movie_info.file.Name; print_buffer += "\n"; - ShowMsg2UTF(movie_info.epgTitle.empty()? movie_info.file.getFileName().c_str() : movie_info.epgTitle.c_str(), print_buffer.c_str(), CMsgBox::mbrBack, CMsgBox::mbBack); // UTF-8*/ + ShowMsg2UTF(movie_info.epgTitle.empty()? movie_info.file.getFileName().c_str() : movie_info.epgTitle.c_str(), print_buffer.c_str(), CMsgBox::mbrBack, CMsgBox::mbBack); // UTF-8*/ } @@ -520,15 +520,15 @@ void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) void CMovieInfo::printDebugMovieInfo(MI_MOVIE_INFO & movie_info) { TRACE(" FileName: %s", movie_info.file.Name.c_str()); - //TRACE(" FilePath: %s", movie_info.file.GetFilePath ); - //TRACE(" FileLength: %d", movie_info.file.GetLength ); - //TRACE(" FileStatus: %d", movie_info.file.GetStatus ); + //TRACE(" FilePath: %s", movie_info.file.GetFilePath ); + //TRACE(" FileLength: %d", movie_info.file.GetLength ); + //TRACE(" FileStatus: %d", movie_info.file.GetStatus ); TRACE(" ********** Movie Data ***********\r\n"); // (date, month, year) TRACE(" dateOfLastPlay: \t%d\r\n", (int)movie_info.dateOfLastPlay); // (date, month, year) - TRACE(" dirItNr: \t\t%d\r\n", movie_info.dirItNr); // - TRACE(" genreMajor: \t\t%d\r\n", movie_info.genreMajor); //genreMajor; - TRACE(" genreMinor: \t\t%d\r\n", movie_info.genreMinor); //genreMinor; + TRACE(" dirItNr: \t\t%d\r\n", movie_info.dirItNr); // + TRACE(" genreMajor: \t\t%d\r\n", movie_info.genreMajor); //genreMajor; + TRACE(" genreMinor: \t\t%d\r\n", movie_info.genreMinor); //genreMinor; TRACE(" length: \t\t%d\r\n", movie_info.length); // (minutes) TRACE(" quality: \t\t%d\r\n", movie_info.quality); // (3 stars: classics, 2 stars: very good, 1 star: good, 0 stars: OK) TRACE(" productionCount:\t>%s<\r\n", movie_info.productionCountry.c_str()); @@ -550,7 +550,7 @@ void CMovieInfo::printDebugMovieInfo(MI_MOVIE_INFO & movie_info) } TRACE(" epgTitle: \t\t>%s<\r\n", movie_info.epgTitle.c_str()); - TRACE(" epgInfo1:\t\t>%s<\r\n", movie_info.epgInfo1.c_str()); //epgInfo1 + TRACE(" epgInfo1:\t\t>%s<\r\n", movie_info.epgInfo1.c_str()); //epgInfo1 TRACE(" epgInfo2:\t\t\t>%s<\r\n", movie_info.epgInfo2.c_str()); //epgInfo2 TRACE(" epgChannel:\t\t>%s<\r\n", movie_info.epgChannel.c_str()); TRACE(" serieName:\t\t>%s<\r\n", movie_info.serieName.c_str()); // (name e.g. 'StarWars) @@ -813,7 +813,7 @@ bool CMovieInfo::addNewBookmark(MI_MOVIE_INFO * movie_info, MI_BOOKMARK & new_bo TRACE("[mi] addNewBookmark\r\n"); bool result = false; if (movie_info != NULL) { - // search for free entry + // search for free entry bool loop = true; for (int i = 0; i < MI_MOVIE_BOOK_USER_MAX && loop == true; i++) { if (movie_info->bookmarks.user[i].pos == 0) { @@ -857,9 +857,9 @@ void CMovieInfo::clearMovieInfo(MI_MOVIE_INFO * movie_info) movie_info->file.Size = 0; // Megabytes movie_info->file.Time = mktime(&timePlay); movie_info->dateOfLastPlay = mktime(&timePlay); // (date, month, year) - movie_info->dirItNr = 0; // - movie_info->genreMajor = 0; //genreMajor; - movie_info->genreMinor = 0; //genreMinor; + movie_info->dirItNr = 0; // + movie_info->genreMajor = 0; //genreMajor; + movie_info->genreMinor = 0; //genreMinor; movie_info->length = 0; // (minutes) movie_info->quality = 0; // (3 stars: classics, 2 stars: very good, 1 star: good, 0 stars: OK) movie_info->productionDate = 0; // (Year) years since 1900 @@ -878,7 +878,7 @@ void CMovieInfo::clearMovieInfo(MI_MOVIE_INFO * movie_info) movie_info->productionCountry = ""; movie_info->epgTitle = ""; - movie_info->epgInfo1 = ""; //epgInfo1 + movie_info->epgInfo1 = ""; //epgInfo1 movie_info->epgInfo2 = ""; //epgInfo2 movie_info->epgChannel = ""; movie_info->serieName = ""; // (name e.g. 'StarWars) @@ -911,15 +911,15 @@ bool CMovieInfo::loadFile_std(CFile & file, char *buffer, int buffer_size) bool result = true; int fd = open(file.Name.c_str(), O_RDONLY); - if (fd == -1) // cannot open file, return!!!!! + if (fd == -1) // cannot open file, return!!!!! { TRACE("[mi] loadXml: cannot open (%s)\r\n", file.getFileName().c_str()); return false; } //TRACE( "show_ts_info: File found (%s)\r\n" ,filename->c_str()); - // read file content to buffer + // read file content to buffer int bytes = read(fd, buffer, buffer_size - 1); - if (bytes <= 0) // cannot read file into buffer, return!!!! + if (bytes <= 0) // cannot read file into buffer, return!!!! { TRACE("[mi] loadXml: cannot read (%s)\r\n", file.getFileName().c_str()); return false; @@ -929,7 +929,7 @@ bool CMovieInfo::loadFile_std(CFile & file, char *buffer, int buffer_size) return (result); } -bool CMovieInfo::loadFile_vlc(CFile & file, char *buffer, int buffer_size) +bool CMovieInfo::loadFile_vlc(CFile & /*file*/, char */*buffer*/, int /*buffer_size*/) { bool result = false; return (result); @@ -966,14 +966,14 @@ bool CMovieInfo::saveFile_std(const CFile & file, const char *text, const int te return (result); } -bool CMovieInfo::saveFile_vlc(const CFile & file, const char *text, const int text_size) +bool CMovieInfo::saveFile_vlc(const CFile & /*file*/, const char */*text*/, const int /*text_size*/) { bool result = false; return (result); } /* char buf[2048]; - + int done; do { @@ -988,7 +988,7 @@ bool CMovieInfo::saveFile_vlc(const CFile & file, const char *text, const int te } } while (!done); fclose(in); - * + * * */ void CMovieInfo::copy(MI_MOVIE_INFO * src, MI_MOVIE_INFO * dst) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 918fd7bd8..fadcdbc6d 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -148,7 +148,7 @@ bool get_movie_info_apid_name(int apid, MI_MOVIE_INFO * movie_info, std::string return false; } -int CAPIDSelectExec::exec(CMenuTarget * parent, const std::string & actionKey) +int CAPIDSelectExec::exec(CMenuTarget * /*parent*/, const std::string & actionKey) { apidchanged = 0; unsigned int sel = atoi(actionKey.c_str()); @@ -329,17 +329,17 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) cutNeutrino(); timeshift = 1; PlayFile(); - } + } else if (actionKey == "ptimeshift") { cutNeutrino(); timeshift = 2; PlayFile(); - } + } else if (actionKey == "rtimeshift") { cutNeutrino(); timeshift = 3; PlayFile(); - } + } #if 0 else if (actionKey == "bookmarkplayback") { isBookmark = true; @@ -545,7 +545,7 @@ void CMoviePlayerGui::PlayFile(void) //TRACE(" %6ds\r\n",play_sec); if (play_sec + 10 < jump_not_until || play_sec > jump_not_until + 10) - jump_not_until = 0; // check if !jump is stale (e.g. if user jumped forward or backward) + jump_not_until = 0; // check if !jump is stale (e.g. if user jumped forward or backward) if (new_bookmark.pos == 0) // do bookmark activities only, if there is no new bookmark started { if (p_movie_info != NULL) // process bookmarks if we have any movie info @@ -1200,7 +1200,7 @@ void CMoviePlayerGui::PlayFile(void) strReplace(fname, ".ts", ".bmp"); CVCRControl::getInstance()->Screenshot(0, (char *)fname.c_str()); } - } + } #if 0 else if (msg == CRCInput::RC_shift_radio) { if (isMovieBrowser == true && p_movie_info != NULL) { @@ -1212,7 +1212,7 @@ void CMoviePlayerGui::PlayFile(void) strcat(filename, ".bmp"); CVCRControl::getInstance()->Screenshot(0, filename); } - } + } #endif else if (msg == CRCInput::RC_timeout) { // nothing @@ -1263,7 +1263,7 @@ void CMoviePlayerGui::PlayFile(void) // checks if AR has changed an sets cropping mode accordingly (only video mode auto) static short archeck; -void checkAspectRatio(int vdec, bool init) +void checkAspectRatio(int /*vdec*/, bool init) { static time_t last_check = 0; diff --git a/src/gui/nfs.cpp b/src/gui/nfs.cpp index abd2965cd..ccf1b841b 100644 --- a/src/gui/nfs.cpp +++ b/src/gui/nfs.cpp @@ -65,7 +65,7 @@ public: m_pass = a4; m_type = type; } - bool changeNotify(const neutrino_locale_t OptionName, void *) + bool changeNotify(const neutrino_locale_t /*OptionName*/, void *) { if(*m_type == (int)CFSMounter::NFS) { @@ -103,7 +103,7 @@ int CNFSMountGui::exec( CMenuTarget* parent, const std::string & actionKey ) { //printf("exec: %s\n", actionKey.c_str()); int returnval = menu_return::RETURN_REPAINT; - + if (m_nfs_sup == CFSMounter::FS_UNPROBED) m_nfs_sup = CFSMounter::fsSupported(CFSMounter::NFS); @@ -147,7 +147,7 @@ int CNFSMountGui::exec( CMenuTarget* parent, const std::string & actionKey ) else if(actionKey.substr(0,7)=="domount") { int nr=atoi(actionKey.substr(7,1).c_str()); - CFSMounter::mount(g_settings.network_nfs_ip[nr].c_str(), g_settings.network_nfs_dir[nr], + CFSMounter::mount(g_settings.network_nfs_ip[nr].c_str(), g_settings.network_nfs_dir[nr], g_settings.network_nfs_local_dir[nr], (CFSMounter::FSType) g_settings.network_nfs_type[nr], g_settings.network_nfs_username[nr], g_settings.network_nfs_password[nr], g_settings.network_nfs_mount_options1[nr], g_settings.network_nfs_mount_options2[nr]); @@ -180,7 +180,7 @@ int CNFSMountGui::menu() for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++) { sprintf(s2,"mountentry%d",i); - sprintf(ISO_8859_1_entry[i],ZapitTools::UTF8_to_Latin1(m_entry[i]).c_str()); + sprintf(ISO_8859_1_entry[i],ZapitTools::UTF8_to_Latin1(m_entry[i]).c_str()); CMenuForwarderNonLocalized *forwarder = new CMenuForwarderNonLocalized("", true, ISO_8859_1_entry[i], this, s2); if (CFSMounter::isMounted(g_settings.network_nfs_local_dir[i])) { @@ -242,7 +242,7 @@ int CNFSMountGui::menuEntry(int nr) *type = (int) CFSMounter::LUFS; } bool typeEnabled = (m_cifs_sup != CFSMounter::FS_UNSUPPORTED && m_nfs_sup != CFSMounter::FS_UNSUPPORTED && m_lufs_sup != CFSMounter::FS_UNSUPPORTED) || - (m_cifs_sup != CFSMounter::FS_UNSUPPORTED && *type != (int)CFSMounter::CIFS) || + (m_cifs_sup != CFSMounter::FS_UNSUPPORTED && *type != (int)CFSMounter::CIFS) || (m_nfs_sup != CFSMounter::FS_UNSUPPORTED && *type != (int)CFSMounter::NFS) || (m_lufs_sup != CFSMounter::FS_UNSUPPORTED && *type != (int)CFSMounter::LUFS); diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index 440f98c28..76d740359 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -110,7 +110,7 @@ CPictureViewerGui::~CPictureViewerGui() } //------------------------------------------------------------------------ -int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & actionKey) +int CPictureViewerGui::exec(CMenuTarget* parent, const std::string & /*actionKey*/) { selected = 0; width = w_max (710, 0); diff --git a/src/gui/pluginlist.cpp b/src/gui/pluginlist.cpp index 7ee563a83..efbe2a549 100644 --- a/src/gui/pluginlist.cpp +++ b/src/gui/pluginlist.cpp @@ -58,13 +58,13 @@ #include -/* for alexW images with old drivers: +/* for alexW images with old drivers: * #define USE_VBI_INTERFACE 1 */ #ifdef USE_VBI_INTERFACE #define AVIA_VBI_START_VTXT 1 - #define AVIA_VBI_STOP_VTXT 2 + #define AVIA_VBI_STOP_VTXT 2 #endif #include @@ -101,7 +101,7 @@ CPluginList::~CPluginList() pluginlist.clear(); } -int CPluginList::exec(CMenuTarget* parent, const std::string & actionKey) +int CPluginList::exec(CMenuTarget* parent, const std::string & /*actionKey*/) { neutrino_msg_t msg; neutrino_msg_data_t data; @@ -300,7 +300,7 @@ void CPluginList::paintHead() g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+38,y+theight+1, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 } else { - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+8,y+theight+1, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+8,y+theight+1, width, g_Locale->getText(name), COL_MENUHEAD, 0, true); // UTF-8 } } @@ -313,9 +313,9 @@ void CPluginList::paint() height = theight+0+listmaxshow*fheight; // recalc height x=getScreenStartX( width ); y=getScreenStartY( height ); - + liststart = (selected/listmaxshow)*listmaxshow; - + paintHead(); paintItems(); } @@ -325,13 +325,13 @@ void CPluginList::paintItems() if(listmaxshow <= pluginlist.size()+1) { // Scrollbar - int nrOfPages = ((pluginlist.size()-1) / listmaxshow)+1; + int nrOfPages = ((pluginlist.size()-1) / listmaxshow)+1; int currPage = (liststart/listmaxshow) +1; float blockHeight = (height-theight-4)/nrOfPages; frameBuffer->paintBoxRel(x+width, y+theight, 15, height-theight, COL_MENUCONTENT_PLUS_1); frameBuffer->paintBoxRel(x+ width +2, y+theight+2+int((currPage-1)*blockHeight) , 11, int(blockHeight), COL_MENUCONTENT_PLUS_3); } - + for(unsigned int count=0;countgetScanSettings() -int CScanTs::exec(CMenuTarget* parent, const std::string & actionKey) +int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) { diseqc_t diseqcType = NO_DISEQC; neutrino_msg_t msg; @@ -146,7 +146,7 @@ int CScanTs::exec(CMenuTarget* parent, const std::string & actionKey) TP.feparams.u.qam.modulation = (fe_modulation_t) get_set.TP_mod; } //printf("[neutrino] freq %d rate %d fec %d pol %d\n", TP.feparams.frequency, TP.feparams.u.qpsk.symbol_rate, TP.feparams.u.qpsk.fec_inner, TP.polarization); - } + } satList.clear(); if(manual || !scan_all) { for(sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++) { @@ -177,7 +177,7 @@ int CScanTs::exec(CMenuTarget* parent, const std::string & actionKey) /* send diseqc type to zapit */ diseqcType = (diseqc_t) CNeutrinoApp::getInstance()->getScanSettings().diseqcMode; g_Zapit->setDiseqcType(diseqcType); - + /* send diseqc repeat to zapit */ g_Zapit->setDiseqcRepeat( CNeutrinoApp::getInstance()->getScanSettings().diseqcRepeat); g_Zapit->setScanBouquetMode( (CZapitClient::bouquetMode)CNeutrinoApp::getInstance()->getScanSettings().bouquetMode); @@ -187,7 +187,7 @@ int CScanTs::exec(CMenuTarget* parent, const std::string & actionKey) /* send scantype to zapit */ g_Zapit->setScanType((CZapitClient::scanType) CNeutrinoApp::getInstance()->getScanSettings().scanType ); - + paint(test); /* go */ if(test) { @@ -261,7 +261,7 @@ int CScanTs::exec(CMenuTarget* parent, const std::string & actionKey) } hide(); - + scan_pids = _scan_pids; videoDecoder->StopPicture(); frameBuffer->ClearFrameBuffer(); @@ -281,7 +281,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) case NeutrinoMessages::EVT_SCAN_SATELLITE: paintLine(xpos2, ypos_cur_satellite, w - 95, (char *)data); break; - + case NeutrinoMessages::EVT_SCAN_NUM_TRANSPONDERS: sprintf(buffer, "%d", data); paintLine(xpos2, ypos_transponder, w - 95, buffer); @@ -289,7 +289,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) snprintf(str, 255, "scan: %d/%d", done, total); CVFD::getInstance()->showMenuText(0, str, -1, true); break; - + case NeutrinoMessages::EVT_SCAN_REPORT_NUM_SCANNED_TRANSPONDERS: if (total == 0) data = 0; done = data; @@ -305,8 +305,8 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) xpos_frequency = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(buffer, true); paintLine(xpos2, ypos_frequency, xpos_frequency, buffer); break; - - case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCYP: + + case NeutrinoMessages::EVT_SCAN_REPORT_FREQUENCYP: { int pol = data & 0xFF; int fec = (data >> 8) & 0xFF; @@ -318,35 +318,35 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) paintLine(xpos2 + xpos_frequency, ypos_frequency, w - xpos_frequency - 80, buffer); } break; - + case NeutrinoMessages::EVT_SCAN_PROVIDER: paintLine(xpos2, ypos_provider, w, (char*)data); // UTF-8 break; - + case NeutrinoMessages::EVT_SCAN_SERVICENAME: paintLine(xpos2, ypos_channel, w, (char *)data); // UTF-8 break; - + case NeutrinoMessages::EVT_SCAN_NUM_CHANNELS: sprintf(buffer, " = %d", data); paintLine(xpos1 + 3 * 72, ypos_service_numbers + mheight, width - 3 * 72 - 10, buffer); break; - + case NeutrinoMessages::EVT_SCAN_FOUND_TV_CHAN: sprintf(buffer, "%d", data); paintLine(xpos1, ypos_service_numbers + mheight, 72, buffer); break; - + case NeutrinoMessages::EVT_SCAN_FOUND_RADIO_CHAN: sprintf(buffer, "%d", data); paintLine(xpos1 + 72, ypos_service_numbers + mheight, 72, buffer); break; - + case NeutrinoMessages::EVT_SCAN_FOUND_DATA_CHAN: sprintf(buffer, "%d", data); paintLine(xpos1 + 2 * 72, ypos_service_numbers + mheight, 72, buffer); break; - + case NeutrinoMessages::EVT_SCAN_COMPLETE: case NeutrinoMessages::EVT_SCAN_FAILED: success = (msg == NeutrinoMessages::EVT_SCAN_COMPLETE); @@ -360,7 +360,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) CNeutrinoApp::getInstance()->setVolume(msg, true, true); break; default: - if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) + if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) delete (unsigned char*) data; break; } @@ -370,7 +370,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) void CScanTs::paintRadar(void) { char filename[30]; - + sprintf(filename, "radar%d.raw", radar); radar = (radar + 1) % 10; frameBuffer->paintIcon8(filename, xpos_radar, ypos_radar, 17); @@ -403,19 +403,19 @@ void CScanTs::paint(bool fortest) int ypos; ypos = y; - + //frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0); frameBuffer->paintBoxRel(x, ypos, width, hheight, COL_MENUHEAD_PLUS_0, ROUND_RADIUS, CORNER_TOP); g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(xpos1, ypos + hheight, width, fortest ? g_Locale->getText(LOCALE_SCANTS_TEST) : g_Locale->getText(LOCALE_SCANTS_HEAD), COL_MENUHEAD, 0, true); // UTF-8 //frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x, ypos + hheight, width, height - hheight, COL_MENUCONTENT_PLUS_0, ROUND_RADIUS, CORNER_BOTTOM); - + frameBuffer->loadPal("radar.pal", 17, 37); - + ypos = y + hheight + (mheight >> 1); - + ypos_cur_satellite = ypos; - + if (g_info.delivery_system == DVB_S) { //sat paintLineLocale(xpos1, &ypos, width - xpos1, LOCALE_SCANTS_ACTSATELLITE); @@ -436,11 +436,11 @@ void CScanTs::paint(bool fortest) xpos2 = greater_xpos(xpos2, LOCALE_SCANTS_FREQDATA); ypos += mheight >> 1; // 1/2 blank line - + ypos_provider = ypos; paintLineLocale(xpos1, &ypos, width - xpos1, LOCALE_SCANTS_PROVIDER); xpos2 = greater_xpos(xpos2, LOCALE_SCANTS_PROVIDER); - + ypos_channel = ypos; paintLineLocale(xpos1, &ypos, width - xpos1, LOCALE_SCANTS_CHANNEL); xpos2 = greater_xpos(xpos2, LOCALE_SCANTS_CHANNEL); @@ -458,7 +458,7 @@ int CScanTs::greater_xpos(int xpos, const neutrino_locale_t txt) int txt_xpos = xpos1 + 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(g_Locale->getText(txt), true); // UTF-8 if (txt_xpos > xpos) return txt_xpos; - else + else return xpos; } diff --git a/src/gui/streaminfo2.cpp b/src/gui/streaminfo2.cpp index 65f4acc15..d3e98a276 100644 --- a/src/gui/streaminfo2.cpp +++ b/src/gui/streaminfo2.cpp @@ -77,7 +77,7 @@ CStreamInfo2::CStreamInfo2 () max_width = frameBuffer->getScreenWidth(true); max_height = frameBuffer->getScreenHeight(true); - + width = frameBuffer->getScreenWidth(); height = frameBuffer->getScreenHeight(); x = frameBuffer->getScreenX(); @@ -138,8 +138,8 @@ int CStreamInfo2::doSignalStrengthLoop () #define RED_BAR 40 #define YELLOW_BAR 70 #define GREEN_BAR 100 -#define BAR_WIDTH 150 -#define BAR_HEIGHT 12 +#define BAR_WIDTH 150 +#define BAR_HEIGHT 12 sigscale = new CScale(BAR_WIDTH, BAR_HEIGHT, RED_BAR, GREEN_BAR, YELLOW_BAR); snrscale = new CScale(BAR_WIDTH, BAR_HEIGHT, RED_BAR, GREEN_BAR, YELLOW_BAR); @@ -180,12 +180,12 @@ int CStreamInfo2::doSignalStrengthLoop () // int dy = y+ height - dheight - 5; if (ret && (lastb != bit_s)) { lastb = bit_s; - + if (maxb < bit_s) rate.max_short_average = maxb = bit_s; if ((cnt > 10) && ((minb == 0) || (minb > bit_s))) rate.min_short_average = minb = bit_s; - + for(i = 0; i < 3; i++){ switch (i) { case 0: @@ -223,7 +223,7 @@ int CStreamInfo2::doSignalStrengthLoop () if (signal.max_snr < signal.snr) { signal.max_snr = signal.snr; } - + if ((signal.min_ber == 0) || (signal.min_ber > signal.ber)) { signal.min_ber = signal.ber; } @@ -299,7 +299,7 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h) y1 = _y + h + iheight + iheight+iheight-8; y2 = _y + h - sheight+8; - + frameBuffer->paintBoxRel(_x+xd*0,y2- 12,16,2, COL_RED); //red g_Font[font_small]->RenderString(_x+20+xd*0, y2, 50, "BER", COL_MENUCONTENTDARK, 0, true); @@ -308,16 +308,16 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h) frameBuffer->paintBoxRel(_x+8+xd*2,y2- 12,16,2, COL_GREEN); //green g_Font[font_small]->RenderString(_x+28+xd*2, y2, 50, "SIG", COL_MENUCONTENTDARK, 0, true); - + frameBuffer->paintBoxRel(_x+xd*3,y2- 12,16,2,COL_YELLOW); // near yellow g_Font[font_small]->RenderString(_x+20+xd*3, y2, 50, "Bitrate", COL_MENUCONTENTDARK, 0, true); - + sig_text_y = y1 - iheight; sig_text_ber_x = _x + xd * 0; sig_text_snr_x = _x + 5 + xd * 1; sig_text_sig_x = _x + 5 + xd * 2; sig_text_rate_x = _x + 10 + xd * 3; - + int maxmin_x; // x-position of min and max if (paint_mode == 0) { maxmin_x = sig_text_ber_x-40; @@ -368,7 +368,7 @@ void CStreamInfo2::paint_signal_fe(struct bitrate br, struct feSignal s) old_x = sigBox_x+x_now; old_y = sigBox_y+sigBox_h-yd; } - + if (s.ber != s.old_ber) { SignalRenderStr(s.ber, sig_text_ber_x, yt - sheight); SignalRenderStr(s.max_ber, sig_text_ber_x, yt - sheight - sheight); @@ -420,7 +420,7 @@ void CStreamInfo2::SignalRenderStr(unsigned int value, int _x, int _y) g_Font[font_small]->RenderString(_x, _y + 5, 60, str, COL_MENUCONTENTDARK, 0, true); } -void CStreamInfo2::paint (int mode) +void CStreamInfo2::paint (int /*mode*/) { const char *head_string; @@ -462,7 +462,7 @@ void CStreamInfo2::paint (int mode) paint_signal_fe_box (x, y, width, height-100); } - + } void CStreamInfo2::paint_techinfo(int xpos, int ypos) @@ -475,7 +475,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) int array[4]={g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_RESOLUTION)), g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_ARATIO)), g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_FRAMERATE)), - g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_AUDIOTYPE))}; + g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_AUDIOTYPE))}; for(i=0 ; i<4; i++) { if(spaceoffset < array[i]) @@ -592,10 +592,10 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) s=const_cast("S2"); else s=const_cast("S1"); - + sprintf ((char *) buf,"%d.%d (%c) %d %s %s %s", si.tsfrequency / 1000, si.tsfrequency % 1000, si.polarisation ? 'V' : 'H', si.rate / 1000,f,m,s); g_Font[font_info]->RenderString(xpos, ypos, width*2/3-10, "Tp. Freq.:" , COL_MENUCONTENTDARK, 0, true); // UTF-8 - g_Font[font_info]->RenderString(xpos+spaceoffset, ypos, width*2/3-10, buf, COL_MENUCONTENTDARK, 0, true); // UTF-8 + g_Font[font_info]->RenderString(xpos+spaceoffset, ypos, width*2/3-10, buf, COL_MENUCONTENTDARK, 0, true); // UTF-8 } // paint labels spaceoffset = 68; @@ -617,12 +617,12 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) sprintf((char*) buf, "0x%04x (%i)", si.tsid, si.tsid); g_Font[font_small]->RenderString(xpos, ypos, width*2/3-10, "TSid:" , COL_MENUCONTENTDARK, 0, true); // UTF-8 g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, width*2/3-10, buf, COL_MENUCONTENTDARK, 0, true); // UTF-8 - + //pmtpid ypos+= sheight; sprintf((char*) buf, "0x%04x (%i)", si.pmtpid, si.pmtpid); g_Font[font_small]->RenderString(xpos, ypos, width*2/3-10, "PMTpid:", COL_MENUCONTENTDARK, 0, true); // UTF-8 - g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, width*2/3-10, buf, COL_MENUCONTENTDARK, 0, true); // UTF-8 + g_Font[font_small]->RenderString(xpos+spaceoffset, ypos, width*2/3-10, buf, COL_MENUCONTENTDARK, 0, true); // UTF-8 //vpid ypos+= sheight; @@ -670,7 +670,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos) yypos = ypos; } -int CStreamInfo2Handler::exec(CMenuTarget* parent, const std::string &actionkey) +int CStreamInfo2Handler::exec(CMenuTarget* parent, const std::string &/*actionkey*/) { int res = menu_return::RETURN_EXIT_ALL; if (parent){ @@ -723,7 +723,7 @@ int CStreamInfo2::update_rate () { unsigned char buf[TS_BUF_SIZE]; long b; - + int ret = 0; int b_len, b_start; int timeout = 100; @@ -749,14 +749,14 @@ int CStreamInfo2::update_rate () d_tim_ms = delta_time_ms (&tv, &last_tv); if (d_tim_ms <= 0) - d_tim_ms = 1; // ignore usecs + d_tim_ms = 1; // ignore usecs bit_s = (((unsigned long long) b * 8000ULL) + ((unsigned long long) d_tim_ms / 2ULL)) / (unsigned long long) d_tim_ms; d_tim_ms = delta_time_ms (&tv, &first_tv); if (d_tim_ms <= 0) - d_tim_ms = 1; // ignore usecs + d_tim_ms = 1; // ignore usecs abit_s = ((b_total * 8000ULL) + ((unsigned long long) d_tim_ms / 2ULL)) / (unsigned long long) d_tim_ms; diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index cfc16ccfc..6dd16af5e 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -103,7 +103,7 @@ public: iType=Type; stopTime=time; } - bool changeNotify(const neutrino_locale_t OptionName, void *) + bool changeNotify(const neutrino_locale_t /*OptionName*/, void *) { CTimerd::CTimerEventTypes type = (CTimerd::CTimerEventTypes) *iType; if (type == CTimerd::TIMER_RECORD) @@ -164,7 +164,7 @@ public: iRepeat=repeat; } - bool changeNotify(const neutrino_locale_t OptionName, void *) + bool changeNotify(const neutrino_locale_t /*OptionName*/, void *) { if (*iRepeat >= (int)CTimerd::TIMERREPEAT_WEEKDAYS) m1->setActive (true); diff --git a/src/gui/widget/drawable.cpp b/src/gui/widget/drawable.cpp index a337e635d..ecd348e51 100644 --- a/src/gui/widget/drawable.cpp +++ b/src/gui/widget/drawable.cpp @@ -42,7 +42,7 @@ #include Drawable::Drawable() -{ +{ } Drawable::~Drawable() @@ -66,7 +66,7 @@ Drawable::DType Drawable::getType(void) // ------------------------------------------------------------------------------ -DText::DText(std::string& text) +DText::DText(std::string& text) { m_text = text; init(); @@ -81,14 +81,14 @@ DText::DText(const char *text) void DText::init() { m_width = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(m_text, true); // UTF-8 - m_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); + m_height = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); } void DText::draw(CFBWindow *window, int x, int y, int width) { window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU], x, y + m_height, width, - m_text.c_str(), (CFBWindow::color_t)COL_MENUCONTENT, 0, true); // UTF-8 + m_text.c_str(), (CFBWindow::color_t)COL_MENUCONTENT, 0, true); // UTF-8 } void DText::print(void) @@ -115,7 +115,7 @@ void DIcon::init() m_width = 16; } -void DIcon::draw(CFBWindow *window, int x, int y, int width) +void DIcon::draw(CFBWindow *window, int x, int y, int /*width*/) { window->paintIcon(m_icon.c_str(), x, y); } @@ -132,11 +132,11 @@ DPagebreak::DPagebreak() m_width = 0; } -void DPagebreak::draw(CFBWindow *window, int x, int y, int width) +void DPagebreak::draw(CFBWindow */*window*/, int /*x*/, int /*y*/, int /*width*/) { -// window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU], -// x, y + m_height, width, "", -// (CFBWindow::color_t)COL_MENUCONTENT, 0, true); // UTF-8 +// window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU], +// x, y + m_height, width, "", +// (CFBWindow::color_t)COL_MENUCONTENT, 0, true); // UTF-8 } void DPagebreak::print(void) diff --git a/src/gui/widget/keychooser.h b/src/gui/widget/keychooser.h index b7162d3b8..d43028f5b 100644 --- a/src/gui/widget/keychooser.h +++ b/src/gui/widget/keychooser.h @@ -94,7 +94,7 @@ class CKeyChooserItemNoKey : public CMenuTarget key=Key; }; - int exec(CMenuTarget* parent, const std::string & actionKey) + int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/) { *key=CRCInput::RC_nokey; return menu_return::RETURN_REPAINT; diff --git a/src/gui/widget/listbox.cpp b/src/gui/widget/listbox.cpp index 516243cb2..3fb92bd65 100644 --- a/src/gui/widget/listbox.cpp +++ b/src/gui/widget/listbox.cpp @@ -124,13 +124,13 @@ int CListBox::getItemHeight() return fheight; } -void CListBox::paintItem(unsigned int itemNr, int paintNr, bool selected) +void CListBox::paintItem(unsigned int /*itemNr*/, int paintNr, bool selected) { int ypos = y+ theight + paintNr*getItemHeight(); uint8_t color; fb_pixel_t bgcolor; - + if (selected) { color = COL_MENUCONTENTSELECTED; @@ -146,7 +146,7 @@ void CListBox::paintItem(unsigned int itemNr, int paintNr, bool selected) g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x + 10, ypos+ fheight, width-20, "demo", color); } -int CListBox::exec(CMenuTarget* parent, const std::string & actionKey) +int CListBox::exec(CMenuTarget* parent, const std::string & /*actionKey*/) { neutrino_msg_t msg; neutrino_msg_data_t data; diff --git a/src/gui/widget/listbox.h b/src/gui/widget/listbox.h index 8c1565a09..e61c3cd96 100644 --- a/src/gui/widget/listbox.h +++ b/src/gui/widget/listbox.h @@ -48,7 +48,7 @@ class CListBox : public CMenuWidget unsigned int selected; unsigned int liststart; unsigned int listmaxshow; - + int ButtonHeight; //---------------------------- @@ -59,7 +59,7 @@ class CListBox : public CMenuWidget virtual void paintFoot(); virtual void hide(); - + //------hier Methoden überschreiben------- //------Fernbedienungsevents-------------- @@ -68,7 +68,7 @@ class CListBox : public CMenuWidget virtual void onYellowKeyPressed(){}; virtual void onBlueKeyPressed(){}; virtual void onOkKeyPressed(){}; - virtual void onOtherKeyPressed( int key ){}; + virtual void onOtherKeyPressed( int /*key*/ ){}; //------gibt die Anzahl der Listenitems--- virtual unsigned int getItemCount(); @@ -81,7 +81,7 @@ class CListBox : public CMenuWidget void setModified(void); public: - CListBox(const char * const Caption); + CListBox(const char * const Caption); virtual int exec(CMenuTarget* parent, const std::string & actionKey); }; diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 99c69e9d6..ab57bb959 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -271,7 +271,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) } else if(msg==CRCInput::RC_page_down) { pos = (int) page_start[current_page + 1];// - 1; - if(pos >= (int) items.size()) + if(pos >= (int) items.size()) pos = items.size()-1; for (unsigned int count=pos ; count < items.size(); count++) { CMenuItem* item = items[pos]; @@ -405,7 +405,7 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) while ( msg!=CRCInput::RC_timeout ); hide(); - if ( fadeIn || fadeOut ) { + if ( fadeIn || fadeOut ) { g_RCInput->killTimer(fadeTimer); frameBuffer->setBlendLevel(g_settings.gtx_alpha1, g_settings.gtx_alpha2); } @@ -1077,7 +1077,7 @@ int CMenuForwarder::getWidth(void) const option_text = option; else if (option_string) option_text = option_string->c_str(); - + if (option_text != NULL) tw += 10 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(option_text, true); @@ -1222,7 +1222,7 @@ const char * CMenuSeparator::getString(void) return g_Locale->getText(text); } -int CMenuSeparator::paint(bool selected, bool last) +int CMenuSeparator::paint(bool selected, bool /*last*/) { int height; CFrameBuffer * frameBuffer = CFrameBuffer::getInstance(); @@ -1320,7 +1320,7 @@ int CLockedMenuForwarder::exec(CMenuTarget* parent) return CMenuForwarder::exec(parent); } -int CMenuSelectorTarget::exec(CMenuTarget* parent, const std::string & actionKey) +int CMenuSelectorTarget::exec(CMenuTarget* /*parent*/, const std::string & actionKey) { if (actionKey != "") *m_select = atoi(actionKey.c_str()); diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index c03c696b6..cd1639924 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -55,7 +55,7 @@ class CChangeObserver { public: virtual ~CChangeObserver(){} - virtual bool changeNotify(const neutrino_locale_t OptionName, void *Data) + virtual bool changeNotify(const neutrino_locale_t /*OptionName*/, void */*Data*/) { return false; } @@ -107,7 +107,7 @@ class CMenuItem return false; } - virtual int exec(CMenuTarget* parent) + virtual int exec(CMenuTarget* /*parent*/) { return 0; } @@ -153,7 +153,7 @@ class CMenuForwarder : public CMenuItem virtual const char * getOption(void); virtual const char * getName(void); - + public: CMenuForwarder(const neutrino_locale_t Text, const bool Active=true, const char * const Option=NULL, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL); @@ -191,7 +191,7 @@ class CAbstractMenuOptionChooser : public CMenuItem { return height; } - + bool isSelectable(void) const { return active; @@ -214,7 +214,7 @@ class CMenuOptionNumberChooser : public CAbstractMenuOptionChooser public: CMenuOptionNumberChooser(const neutrino_locale_t name, int * const OptionValue, const bool Active, const int min_value, const int max_value, CChangeObserver * const Observ = NULL, const int print_offset = 0, const int special_value = 0, const neutrino_locale_t special_value_name = NONEXISTANT_LOCALE, const char * non_localized_name = NULL); - + int paint(bool selected, bool last = false); int exec(CMenuTarget* parent); @@ -239,7 +239,7 @@ class CMenuOptionChooser : public CAbstractMenuOptionChooser public: CMenuOptionChooser(const neutrino_locale_t OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false); - CMenuOptionChooser(const char* OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false); + CMenuOptionChooser(const char* OptionName, int * const OptionValue, const struct keyval * const Options, const unsigned Number_Of_Options, const bool Active = false, CChangeObserver * const Observ = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const std::string & IconName= "", bool Pulldown = false); void setOptionValue(const int newvalue); int getOptionValue(void) const; diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index df93882dd..523caf27d 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -59,10 +59,10 @@ #define TITLE_ICON_WIDTH (40 - TEXT_BORDER_WIDTH) #define MAX_WINDOW_WIDTH (g_settings.screen_EndX - g_settings.screen_StartX ) -#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40) +#define MAX_WINDOW_HEIGHT (g_settings.screen_EndY - g_settings.screen_StartY - 40) #define MIN_WINDOW_WIDTH (MAX_WINDOW_WIDTH>>1) -#define MIN_WINDOW_HEIGHT 40 +#define MIN_WINDOW_HEIGHT 40 #define DEFAULT_TITLE_FONT g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE] #define DEFAULT_FOOT_FONT g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL] @@ -72,21 +72,21 @@ ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// -// Function Name: CMsgBox -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: CMsgBox +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// -CMsgBox::CMsgBox( const char * text, +CMsgBox::CMsgBox( const char * text, Font* fontText, - const int _mode, - const CBox* position, + const int _mode, + const CBox* position, const char * title, Font* fontTitle, const char * icon, - int return_button , + int return_button , const result_ default_result) { //TRACE("->CMsgBox::CMsgBox\r\n"); @@ -119,7 +119,7 @@ CMsgBox::CMsgBox( const char * text, m_pcTextBox = new CTextBox( text, fontText, - _mode, + _mode, &m_cBoxFrameText); if(_mode & AUTO_WIDTH || _mode & AUTO_HIGH) @@ -144,12 +144,12 @@ CMsgBox::CMsgBox( const char * text, } ////////////////////////////////////////////////////////////////////// -// Function Name: CMsgBox -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: CMsgBox +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// CMsgBox::CMsgBox(const char * text) { @@ -161,12 +161,12 @@ CMsgBox::CMsgBox(const char * text) } ////////////////////////////////////////////////////////////////////// -// Function Name: CMsgBox -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: CMsgBox +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// CMsgBox::CMsgBox() { @@ -177,12 +177,12 @@ CMsgBox::CMsgBox() } ////////////////////////////////////////////////////////////////////// -// Function Name: ~CMsgBox -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: ~CMsgBox +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// CMsgBox::~CMsgBox() { @@ -201,12 +201,12 @@ CMsgBox::~CMsgBox() } ////////////////////////////////////////////////////////////////////// -// Function Name: InitVar -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: InitVar +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// void CMsgBox::initVar(void) { @@ -242,12 +242,12 @@ void CMsgBox::initVar(void) } ////////////////////////////////////////////////////////////////////// -// Function Name: InitFramesRel -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: InitFramesRel +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// void CMsgBox::initFramesRel(void) { @@ -312,16 +312,16 @@ void CMsgBox::initFramesRel(void) m_cBoxFrameFootRel.iWidth, m_cBoxFrameFootRel.iHeight ); -#endif +#endif } ////////////////////////////////////////////////////////////////////// -// Function Name: RefreshFoot -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: RefreshFoot +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// void CMsgBox::refreshFoot(void) { @@ -329,10 +329,10 @@ void CMsgBox::refreshFoot(void) if( !(m_nMode & FOOT)) return; // draw the background first - m_pcWindow->paintBoxRel( m_cBoxFrameFootRel.iX+m_cBoxFrame.iX, - m_cBoxFrameFootRel.iY+m_cBoxFrame.iY, - m_cBoxFrameFootRel.iWidth, - m_cBoxFrameFootRel.iHeight, + m_pcWindow->paintBoxRel( m_cBoxFrameFootRel.iX+m_cBoxFrame.iX, + m_cBoxFrameFootRel.iY+m_cBoxFrame.iY, + m_cBoxFrameFootRel.iWidth, + m_cBoxFrameFootRel.iHeight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0); //const char* text; @@ -407,12 +407,12 @@ void CMsgBox::refreshFoot(void) } ////////////////////////////////////////////////////////////////////// -// Function Name: RefreshTitle -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: RefreshTitle +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// void CMsgBox::refreshTitle(void) { @@ -420,24 +420,24 @@ void CMsgBox::refreshTitle(void) if( !(m_nMode & TITLE)) return; // draw the background - m_pcWindow->paintBoxRel( m_cBoxFrameTitleRel.iX+m_cBoxFrame.iX, - m_cBoxFrameTitleRel.iY+m_cBoxFrame.iY, - m_cBoxFrameTitleRel.iWidth, - m_cBoxFrameTitleRel.iHeight, + m_pcWindow->paintBoxRel( m_cBoxFrameTitleRel.iX+m_cBoxFrame.iX, + m_cBoxFrameTitleRel.iY+m_cBoxFrame.iY, + m_cBoxFrameTitleRel.iWidth, + m_cBoxFrameTitleRel.iHeight, (CFBWindow::color_t)COL_MENUHEAD_PLUS_0); if (!m_cIcon.empty()) { // draw icon and title text m_pcWindow->paintIcon(m_cIcon.c_str(), m_cBoxFrameTitleRel.iX + 8+m_cBoxFrame.iX, m_cBoxFrameTitleRel.iY + 5+m_cBoxFrame.iY); - /*m_pcWindow->RenderString(*/ + /*m_pcWindow->RenderString(*/ m_pcFontTitle->RenderString( - m_cBoxFrameTitleRel.iX + TITLE_ICON_WIDTH + TEXT_BORDER_WIDTH+m_cBoxFrame.iX, - m_cBoxFrameTitleRel.iHeight+3+m_cBoxFrame.iY, - m_cBoxFrameTitleRel.iWidth - TITLE_ICON_WIDTH + TEXT_BORDER_WIDTH, - m_cTitle.c_str(), - (CFBWindow::color_t)COL_MENUHEAD, - 0, + m_cBoxFrameTitleRel.iX + TITLE_ICON_WIDTH + TEXT_BORDER_WIDTH+m_cBoxFrame.iX, + m_cBoxFrameTitleRel.iHeight+3+m_cBoxFrame.iY, + m_cBoxFrameTitleRel.iWidth - TITLE_ICON_WIDTH + TEXT_BORDER_WIDTH, + m_cTitle.c_str(), + (CFBWindow::color_t)COL_MENUHEAD, + 0, true); // UTF-8 } else @@ -445,40 +445,40 @@ void CMsgBox::refreshTitle(void) // no icon available, just draw the title text /*m_pcWindow->RenderString(*/ m_pcFontTitle->RenderString( - m_cBoxFrameTitleRel.iX + TEXT_BORDER_WIDTH+m_cBoxFrame.iX, - m_cBoxFrameTitleRel.iHeight+3+m_cBoxFrame.iY, - m_cBoxFrameTitleRel.iWidth - TEXT_BORDER_WIDTH, - m_cTitle.c_str(), - (CFBWindow::color_t)COL_MENUHEAD, - 0, + m_cBoxFrameTitleRel.iX + TEXT_BORDER_WIDTH+m_cBoxFrame.iX, + m_cBoxFrameTitleRel.iHeight+3+m_cBoxFrame.iY, + m_cBoxFrameTitleRel.iWidth - TEXT_BORDER_WIDTH, + m_cTitle.c_str(), + (CFBWindow::color_t)COL_MENUHEAD, + 0, true); // UTF-8 } } ////////////////////////////////////////////////////////////////////// -// Function Name: RefreshBorder -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: RefreshBorder +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// void CMsgBox::refreshBorder(void) { if( !(m_nMode & BORDER && m_nWindowFrameBorderWidth > 0)) return; //draw bottom shadow - m_pcWindow->paintBoxRel( m_nWindowFrameBorderWidth+m_cBoxFrame.iX, - m_cBoxFrame.iHeight - m_nWindowFrameBorderWidth+m_cBoxFrame.iY, - m_cBoxFrame.iWidth - m_nWindowFrameBorderWidth, - m_nWindowFrameBorderWidth, + m_pcWindow->paintBoxRel( m_nWindowFrameBorderWidth+m_cBoxFrame.iX, + m_cBoxFrame.iHeight - m_nWindowFrameBorderWidth+m_cBoxFrame.iY, + m_cBoxFrame.iWidth - m_nWindowFrameBorderWidth, + m_nWindowFrameBorderWidth, COL_INFOBAR_SHADOW_PLUS_0); //draw right shadow - m_pcWindow->paintBoxRel( m_cBoxFrame.iWidth - m_nWindowFrameBorderWidth+m_cBoxFrame.iX, - m_nWindowFrameBorderWidth+m_cBoxFrame.iY, - m_nWindowFrameBorderWidth, - m_cBoxFrame.iHeight - m_nWindowFrameBorderWidth, + m_pcWindow->paintBoxRel( m_cBoxFrame.iWidth - m_nWindowFrameBorderWidth+m_cBoxFrame.iX, + m_nWindowFrameBorderWidth+m_cBoxFrame.iY, + m_nWindowFrameBorderWidth, + m_cBoxFrame.iHeight - m_nWindowFrameBorderWidth, COL_INFOBAR_SHADOW_PLUS_0); } @@ -488,12 +488,12 @@ void CMsgBox::refreshBorder(void) ////////////////////////////////////////////////////////////////////// -// Function Name: Hide -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: Hide +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// bool CMsgBox::hide(void) { @@ -517,12 +517,12 @@ bool CMsgBox::hide(void) } ////////////////////////////////////////////////////////////////////// -// Function Name: ScrollPageDown -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: ScrollPageDown +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// void CMsgBox::scrollPageDown(const int pages) { @@ -535,12 +535,12 @@ void CMsgBox::scrollPageDown(const int pages) }; ////////////////////////////////////////////////////////////////////// -// Function Name: ScrollPageUp -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: ScrollPageUp +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// void CMsgBox::scrollPageUp(const int pages) { @@ -552,12 +552,12 @@ void CMsgBox::scrollPageUp(const int pages) }; ////////////////////////////////////////////////////////////////////// -// Function Name: Paint -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: Paint +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// bool CMsgBox::paint(void) { @@ -587,12 +587,12 @@ bool CMsgBox::paint(void) } ////////////////////////////////////////////////////////////////////// -// Function Name: Refresh -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: Refresh +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// void CMsgBox::refresh(void) { @@ -603,7 +603,7 @@ void CMsgBox::refresh(void) TRACE(" return -> no window\r\n"); return; } - + //re-draw message box window refreshTitle(); refreshFoot(); @@ -617,12 +617,12 @@ void CMsgBox::refresh(void) } ////////////////////////////////////////////////////////////////////// -// Function Name: Exec -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: Exec +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// int CMsgBox::exec( int timeout, int returnDefaultOnTimeout) { @@ -655,7 +655,7 @@ int CMsgBox::exec( int timeout, int returnDefaultOnTimeout) if (msg == CRCInput::RC_timeout && returnDefaultOnTimeout) { - // return default + // return default loop = false; } else if ( ((msg == CRCInput::RC_timeout) || @@ -722,17 +722,17 @@ int CMsgBox::exec( int timeout, int returnDefaultOnTimeout) hide(); #endif //VC - + return res; } ////////////////////////////////////////////////////////////////////// -// Function Name: SetText -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: SetText +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// bool CMsgBox::setText(const std::string* newText) { @@ -759,18 +759,18 @@ bool CMsgBox::setText(const std::string* newText) } } } - + return(result); }; ////////////////////////////////////////////////////////////////////// -// Function Name: SetText -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: SetText +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// int CMsgBox::result(void) { @@ -778,31 +778,31 @@ int CMsgBox::result(void) } ////////////////////////////////////////////////////////////////////// -// Function Name: ShowMsg2UTF -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: ShowMsg2UTF +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// int ShowMsg2UTF( const neutrino_locale_t Caption, - const char * const Text, - const CMsgBox::result_ Default, - const uint32_t ShowButtons, - const char * const Icon, - const int Width, - const int timeout, + const char * const Text, + const CMsgBox::result_ Default, + const uint32_t ShowButtons, + const char * const Icon, + const int Width, + const int timeout, bool returnDefaultOnTimeout) { //TRACE("->CMsgBox::ShowTextUTF \r\n"); int result = ShowMsg2UTF( g_Locale->getText(Caption), - Text, - Default, - ShowButtons, - Icon, - Width, - timeout, + Text, + Default, + ShowButtons, + Icon, + Width, + timeout, returnDefaultOnTimeout); return (result); @@ -810,40 +810,40 @@ int ShowMsg2UTF( const neutrino_locale_t Caption, } ////////////////////////////////////////////////////////////////////// -// Function Name: ShowMsg2UTF -// Description: -// Parameters: -// Data IN/OUT: -// Return: -// Notes: +// Function Name: ShowMsg2UTF +// Description: +// Parameters: +// Data IN/OUT: +// Return: +// Notes: ////////////////////////////////////////////////////////////////////// int ShowMsg2UTF( const char * const Title, - const char * const Text, - const CMsgBox::result_ Default, - const uint32_t ShowButtons, - const char * const Icon, - const int Width, - const int timeout, + const char * const Text, + const CMsgBox::result_ Default, + const uint32_t ShowButtons, + const char * const Icon, + const int /*Width*/, + const int timeout, bool returnDefaultOnTimeout) { - int mode = CMsgBox::SCROLL | - CMsgBox::TITLE | - CMsgBox::FOOT | - CMsgBox::BORDER;// | - //CMsgBox::NO_AUTO_LINEBREAK | - //CMsgBox::CENTER | - //CMsgBox::AUTO_WIDTH | + int mode = CMsgBox::SCROLL | + CMsgBox::TITLE | + CMsgBox::FOOT | + CMsgBox::BORDER;// | + //CMsgBox::NO_AUTO_LINEBREAK | + //CMsgBox::CENTER | + //CMsgBox::AUTO_WIDTH | //CMsgBox::AUTO_HIGH; CBox position ( g_settings.screen_StartX+30, g_settings.screen_StartY+30, g_settings.screen_EndX - g_settings.screen_StartX-60, - g_settings.screen_EndY - g_settings.screen_StartY-60); - + g_settings.screen_EndY - g_settings.screen_StartY-60); + //TRACE("\r\n->ShowTextUTF %s\r\n",Text); - CMsgBox* msgBox = new CMsgBox( Text, - g_Font[SNeutrinoSettings::FONT_TYPE_MENU], - mode, - &position, + CMsgBox* msgBox = new CMsgBox( Text, + g_Font[SNeutrinoSettings::FONT_TYPE_MENU], + mode, + &position, Title, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE], Icon, @@ -855,6 +855,6 @@ int ShowMsg2UTF( const char * const Title, int res = msgBox->result(); delete msgBox; - + return res; } diff --git a/src/gui/widget/progresswindow.cpp b/src/gui/widget/progresswindow.cpp index a66a2696f..65047019f 100644 --- a/src/gui/widget/progresswindow.cpp +++ b/src/gui/widget/progresswindow.cpp @@ -166,7 +166,7 @@ void CProgressWindow::paint() showGlobalStatus(global_progress); } -int CProgressWindow::exec(CMenuTarget* parent, const std::string & actionKey) +int CProgressWindow::exec(CMenuTarget* parent, const std::string & /*actionKey*/) { if(parent) { diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 3f6239622..f12fb6c91 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -105,9 +105,9 @@ CStringInput::CStringInput(char * Head, char* Value, int Size, const neutrino_lo init(); } -CStringInput::~CStringInput() +CStringInput::~CStringInput() { - if (valueString != NULL) + if (valueString != NULL) { delete[] value; } @@ -116,7 +116,7 @@ CStringInput::~CStringInput() } } -void CStringInput::init() +void CStringInput::init() { width = (size*20)+40; @@ -163,7 +163,7 @@ void CStringInput::NormalKeyPressed(const neutrino_msg_t key) selected++; paintChar(selected - 1); } - + paintChar(selected); } } @@ -195,7 +195,7 @@ void CStringInput::keyRedPressed() selected++; paintChar(selected - 1); } - + paintChar(selected); } } @@ -215,7 +215,7 @@ void CStringInput::keyBluePressed() if (((value[selected] | 32) >= 'a') && ((value[selected] | 32) <= 'z')) { char newValue = value[selected] ^ 32; - if (index(validchars, newValue) != NULL) + if (index(validchars, newValue) != NULL) { value[selected] = newValue; paintChar(selected); @@ -368,7 +368,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) selected++; paintChar(selected - 1); } - + paintChar(selected); } else if (msg== CRCInput::RC_blue) @@ -450,7 +450,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) return res; } -int CStringInput::handleOthers(const neutrino_msg_t msg, const neutrino_msg_data_t data) +int CStringInput::handleOthers(const neutrino_msg_t /*msg*/, const neutrino_msg_data_t /*data*/) { return messages_return::unhandled; } @@ -507,7 +507,7 @@ void CStringInput::paintChar(int pos, const char c) uint8_t color; fb_pixel_t bgcolor; - + if (pos == selected) { color = COL_MENUCONTENTSELECTED; @@ -566,7 +566,7 @@ void CStringInputSMS::initSMS(const char * const Valid_Chars) if (strchr(Valid_Chars, CharList[i][k]) != NULL) Chars[i][j++] = CharList[i][k]; if (j == 0) - Chars[i][j++] = ' '; // prevent empty char lists + Chars[i][j++] = ' '; // prevent empty char lists arraySizes[i] = j; } @@ -642,7 +642,7 @@ void CStringInputSMS::keyDownPressed() last_digit = -1; int lastselected = selected; - + selected = size - 1; while (value[selected] == ' ') @@ -654,7 +654,7 @@ void CStringInputSMS::keyDownPressed() if (selected < (size - 1)) selected++; - + paintChar(lastselected); paintChar(selected); } diff --git a/src/gui/widget/stringinput_ext.h b/src/gui/widget/stringinput_ext.h index 368a22e08..eb49b14ad 100644 --- a/src/gui/widget/stringinput_ext.h +++ b/src/gui/widget/stringinput_ext.h @@ -54,7 +54,7 @@ class CExtendedInput : public CMenuTarget int hintPosY; int hheight; // head font height int mheight; // menu font height - int iheight; + int iheight; std::vector inputFields; int selectedChar; @@ -94,11 +94,11 @@ class CExtendedInput_Item public: virtual void setDataPointer(char* Data){data=Data;}; - virtual void init(int &x, int &y){}; - virtual void paint(int x, int y, bool focusGained){}; + virtual void init(int &/*x*/, int &/*y*/){}; + virtual void paint(int /*x*/, int /*y*/, bool /*focusGained*/){}; virtual bool isSelectable(){return true;}; - virtual void keyPressed( int key ){}; + virtual void keyPressed( int /*key*/ ){}; }; class CExtendedInput_Item_Spacer : public CExtendedInput_Item @@ -130,7 +130,7 @@ class CExtendedInput_Item_Char : public CExtendedInput_Item protected: std::string allowedChars; bool selectable; - + bool isAllowedChar( char ); int getCharID( char ); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index c5d8d6add..eeee71694 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -284,9 +284,9 @@ int safe_mkdir(char * path) int ret = 0; if(!strncmp(path, "/hdd", 4)) { ret = statfs("/hdd", &s); - if((ret != 0) || (s.f_type == 0x72b6)) + if((ret != 0) || (s.f_type == 0x72b6)) ret = -1; - else + else mkdir(path, 0755); } else mkdir(path, 0755); @@ -1079,7 +1079,7 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings strcpy( g_settings.picviewer_slide_time, configfile.getString( "picviewer_slide_time", "10" ).c_str() ); g_settings.picviewer_scaling = configfile.getInt32("picviewer_scaling", 1 /*(int)CPictureViewer::SIMPLE*/); g_settings.picviewer_decode_server_ip = configfile.getString("picviewer_decode_server_ip", ""); - + //Audio-Player g_settings.audioplayer_display = configfile.getInt32("audioplayer_display",(int)CAudioPlayerGui::ARTIST_TITLE); g_settings.audioplayer_follow = configfile.getInt32("audioplayer_follow",0); @@ -1183,7 +1183,7 @@ printf("***************************** rec dir %s timeshift dir %s\n", g_settings #endif #define DEFAULT_X_OFF 85 #define DEFAULT_Y_OFF 34 - if((g_settings.screen_width != (int) frameBuffer->getScreenWidth(true)) + if((g_settings.screen_width != (int) frameBuffer->getScreenWidth(true)) || (g_settings.screen_height != (int) frameBuffer->getScreenHeight(true))) { g_settings.screen_StartX = DEFAULT_X_OFF; g_settings.screen_StartY = DEFAULT_Y_OFF; @@ -1633,7 +1633,7 @@ void CNeutrinoApp::firstChannel() extern tallchans allchans; extern CBouquetManager *g_bouquetManager; -void CNeutrinoApp::channelsInit(bool bOnly) +void CNeutrinoApp::channelsInit(bool /*bOnly*/) { printf("[neutrino] Creating channels lists...\n"); TIMER_START(); @@ -1760,7 +1760,7 @@ void CNeutrinoApp::channelsInit(bool bOnly) if (!g_bouquetManager->Bouquets[i]->bHidden && !g_bouquetManager->Bouquets[i]->tvChannels.empty()) { CBouquet* tmp; - if(g_bouquetManager->Bouquets[i]->bUser) + if(g_bouquetManager->Bouquets[i]->bUser) tmp = TVfavList->addBouquet(g_bouquetManager->Bouquets[i]); else tmp = TVbouquetList->addBouquet(g_bouquetManager->Bouquets[i]); @@ -1784,7 +1784,7 @@ void CNeutrinoApp::channelsInit(bool bOnly) if (!g_bouquetManager->Bouquets[i]->bHidden && !g_bouquetManager->Bouquets[i]->radioChannels.empty() ) { CBouquet* tmp; - if(g_bouquetManager->Bouquets[i]->bUser) + if(g_bouquetManager->Bouquets[i]->bUser) tmp = RADIOfavList->addBouquet(g_bouquetManager->Bouquets[i]->Name.c_str(), i, g_bouquetManager->Bouquets[i]->bLocked); else tmp = RADIObouquetList->addBouquet(g_bouquetManager->Bouquets[i]->Name.c_str(), i, g_bouquetManager->Bouquets[i]->bLocked); @@ -2199,7 +2199,7 @@ void CNeutrinoApp::SendSectionsdConfig(void) void CNeutrinoApp::InitZapper() { - struct stat my_stat; + struct stat my_stat; g_InfoViewer->start(); SendSectionsdConfig(); @@ -2657,16 +2657,16 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu) else if( msg == (neutrino_msg_t) g_settings.key_subchannel_up ) { if(g_RemoteControl->subChannels.size() > 0) { g_RemoteControl->subChannelUp(); - g_InfoViewer->showSubchan(); + g_InfoViewer->showSubchan(); } else - quickZap( msg ); + quickZap( msg ); } else if( msg == (neutrino_msg_t) g_settings.key_subchannel_down ) { if(g_RemoteControl->subChannels.size()> 0) { g_RemoteControl->subChannelDown(); g_InfoViewer->showSubchan(); } else - quickZap( msg ); + quickZap( msg ); } else if( msg == (neutrino_msg_t) g_settings.key_zaphistory ) { // Zap-History "Bouquet" @@ -2723,7 +2723,7 @@ printf("[neutrino] timeshift try, recordingstatus %d, rec dir %s, timeshift dir else if( msg == CRCInput::RC_record || msg == CRCInput::RC_stop ) { printf("[neutrino] direct record\n"); if(recordingstatus) { - if(ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_SHUTDOWN_RECODING_QUERY, + if(ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_SHUTDOWN_RECODING_QUERY, CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, true) == CMessageBox::mbrYes) g_Timerd->stopTimerEvent(recording_id); } else if(msg != CRCInput::RC_stop ) { @@ -2778,7 +2778,7 @@ printf("[neutrino] direct record\n"); { bool show_info = ((msg != NeutrinoMessages::SHOW_INFOBAR) || (g_InfoViewer->is_visible || g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] != 0)); // turn on LCD display - CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); + CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); // show Infoviewer if(show_info && channelList->getSize()) { @@ -2811,7 +2811,7 @@ printf("[neutrino] direct record\n"); } } else if( msg == CRCInput::RC_shift_radio) { CVCRControl::getInstance()->Screenshot(g_RemoteControl->current_channel_id); - } + } #endif else { if (msg == CRCInput::RC_home) { @@ -2894,7 +2894,7 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data) ShowHintUTF (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, 5); } return messages_return::handled; - + } } @@ -2933,8 +2933,8 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data) old_num = bouquetList->Bouquets[old_b]->channelList->getActiveChannelNumber(); } - //if(msg == CRCInput::RC_ok && bouquetList->Bouquets.size()) - if(msg == CRCInput::RC_ok) + //if(msg == CRCInput::RC_ok && bouquetList->Bouquets.size()) + if(msg == CRCInput::RC_ok) { if(bouquetList->Bouquets.size() && bouquetList->Bouquets[old_b]->channelList->getSize() > 0) nNewChannel = bouquetList->Bouquets[old_b]->channelList->exec();//with ZAP! @@ -3105,7 +3105,7 @@ _repeat: bouquetList->activateBouquet(old_b_id, false); old_b_id = -1; g_RCInput->postMsg(CRCInput::RC_ok, 0); - } + } } else if( msg == NeutrinoMessages::EVT_BOUQUETSCHANGED ) { channelsInit(); @@ -3290,7 +3290,7 @@ _repeat: if(recordingstatus==0) { dvbsub_stop(); //FIXME if same channel ? t_channel_id channel_id=((CTimerd::RecordingInfo*)data)->channel_id; - g_Zapit->zapTo_serviceID_NOWAIT(channel_id); + g_Zapit->zapTo_serviceID_NOWAIT(channel_id); } } delete[] (unsigned char*) data; @@ -3472,7 +3472,7 @@ skip_message: return messages_return::unhandled; } -void CNeutrinoApp::ExitRun(const bool write_si, int retcode) +void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) { if (!recordingstatus || ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_SHUTDOWN_RECODING_QUERY, CMessageBox::mbrNo, CMessageBox::mbYes | CMessageBox::mbNo, NULL, 450, 30, true) == CMessageBox::mbrYes) @@ -3552,7 +3552,7 @@ void CNeutrinoApp::ExitRun(const bool write_si, int retcode) } void CNeutrinoApp::saveEpg() { - struct stat my_stat; + struct stat my_stat; if(stat(g_settings.epg_dir.c_str(), &my_stat) == 0){ printf("Saving EPG to %s....\n", g_settings.epg_dir.c_str()); neutrino_msg_t msg; @@ -3593,7 +3593,7 @@ printf("AudioMute: current %d new %d isEvent: %d\n", current_muted, newValue, is } } -void CNeutrinoApp::setvol(int vol, int avs) +void CNeutrinoApp::setvol(int vol, int /*avs*/) { audioDecoder->setVolume(vol, vol); } @@ -3649,7 +3649,7 @@ void CNeutrinoApp::setVolume(const neutrino_msg_t key, const bool bDoPaint, bool g_RCInput->postMsg(msg, data); break; } - + setvol(g_settings.current_volume,(g_settings.audio_avs_Control)); //timeoutEnd = CRCInput::calcTimeoutEnd(nowait ? 1 : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] / 2); timeoutEnd = CRCInput::calcTimeoutEnd(nowait ? 1 : 3); @@ -3836,7 +3836,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); g_Zapit->setStandby(false); - if(was_record) + if(was_record) g_Zapit->startPlayBack(); if(recordingstatus) was_record = 0; @@ -4397,7 +4397,7 @@ printf("New timeshift dir: %s\n", timeshiftDir); /************************************************************************************** * changeNotify - features menu recording start / stop * **************************************************************************************/ -bool CNeutrinoApp::changeNotify(const neutrino_locale_t OptionName, void *data) +bool CNeutrinoApp::changeNotify(const neutrino_locale_t OptionName, void */*data*/) { if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_RECORDING_START)) || (ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_RECORDING))) { diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 49190fcb9..d2909b282 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -230,7 +230,7 @@ const CMenuOptionChooser::keyval VIDEOMENU_VIDEOFORMAT_OPTIONS[VIDEOMENU_VIDEOFO }; #define VIDEOMENU_43MODE_OPTION_COUNT 4 -const CMenuOptionChooser::keyval VIDEOMENU_43MODE_OPTIONS[VIDEOMENU_43MODE_OPTION_COUNT] = +const CMenuOptionChooser::keyval VIDEOMENU_43MODE_OPTIONS[VIDEOMENU_43MODE_OPTION_COUNT] = { { DISPLAY_AR_MODE_PANSCAN, LOCALE_VIDEOMENU_PANSCAN }, { DISPLAY_AR_MODE_PANSCAN2, LOCALE_VIDEOMENU_PANSCAN2 }, @@ -250,7 +250,7 @@ const CMenuOptionChooser::keyval VIDEOMENU_VIDEOMODE_OPTIONS[VIDEOMENU_VIDEOMODE { 8, NONEXISTANT_LOCALE, "1080i 50Hz" }, { 10, NONEXISTANT_LOCALE, "1080p 24Hz" }, { 11, NONEXISTANT_LOCALE, "1080p 25Hz" }, - + { 0, NONEXISTANT_LOCALE, "NTSC" }, { 3, NONEXISTANT_LOCALE, "480p" }, { 5, NONEXISTANT_LOCALE, "720p 60Hz" }, @@ -619,7 +619,7 @@ CMenuOptionStringChooser* tzSelect; void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings, CMenuWidget &audioSettings, CMenuWidget &parentallockSettings, CMenuWidget &networkSettings, CMenuWidget &recordingSettings, CMenuWidget &colorSettings, CMenuWidget &lcdSettings, CMenuWidget &keySettings, CMenuWidget &languageSettings, CMenuWidget &miscSettings, - CMenuWidget &service, CMenuWidget &fontSettings, CMenuWidget &audiopl_picSettings, CMenuWidget &streamingSettings, CMenuWidget &moviePlayer) + CMenuWidget &service, CMenuWidget &/*fontSettings*/, CMenuWidget &audiopl_picSettings, CMenuWidget &/*streamingSettings*/, CMenuWidget &moviePlayer) { #ifdef TEST_MENU @@ -667,7 +667,7 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings moviePlayer.addItem(GenericMenuBack); moviePlayer.addItem(GenericMenuSeparatorLine); - + //moviePlayer.addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_PESPLAYBACK, true, NULL, moviePlayerGui, "pesplayback")); //moviePlayer.addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_TSPLAYBACK_PC, true, NULL, moviePlayerGui, "tsplayback_pc")); moviePlayer.addItem(new CLockedMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, g_settings.parentallock_pincode, false, true, NULL, moviePlayerGui, "tsmoviebrowser")); @@ -753,7 +753,7 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings else { delete tzSelect; tzSelect = NULL; - } + } xmlFreeDoc(parser); } mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_OSD , true, NULL, &colorSettings , NULL, CRCInput::RC_8)); @@ -782,7 +782,7 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings rfmenu->addItem( GenericMenuBack ); rfmenu->addItem( new CMenuForwarder(LOCALE_RECORDINGMENU_SETUPNOW, true, NULL, rfexec, "savesettings", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); rfmenu->addItem( GenericMenuSeparatorLine ); - + rfmenu->addItem( new CMenuOptionChooser(LOCALE_RF_CARRIER, &g_settings.rf_subcarrier, RF_CARRIER_OPTIONS, RF_CARRIER_OPTION_COUNT, true, rfnot)); rfmenu->addItem( new CMenuOptionChooser(LOCALE_RF_ENABLE, &g_settings.rf_soundenable, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, rfnot)); rfmenu->addItem( new CMenuOptionNumberChooser(LOCALE_RF_CHANNEL, &g_settings.rf_channel, true, 21, 69) ); @@ -908,7 +908,7 @@ class CTPSelectHandler : public CMenuTarget }; extern std::map select_transponders; -int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &actionkey) +int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/) { transponder_list_t::iterator tI; sat_iterator_t sit; @@ -978,7 +978,7 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &actionkey) old_selected = select; tmpI = tmplist.find(select); - printf("CTPSelectHandler::exec: selected TP: freq %d pol %d SR %d\n", tmpI->second.feparams.frequency, + printf("CTPSelectHandler::exec: selected TP: freq %d pol %d SR %d\n", tmpI->second.feparams.frequency, tmpI->second.polarization, tmpI->second.feparams.u.qpsk.symbol_rate); sprintf(get_set.TP_freq, "%d", tmpI->second.feparams.frequency); switch(frontend->getInfo()->type) { @@ -996,7 +996,7 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &actionkey) case FE_ATSC: break; } - + } if(retval == menu_return::RETURN_EXIT_ALL) return menu_return::RETURN_EXIT_ALL; @@ -1580,7 +1580,7 @@ void CNeutrinoApp::InitLanguageSettings(CMenuWidget &languageSettings) if(pos != NULL) { char iname[50]; *pos = '\0'; - sprintf(iname, "%s.raw", locale); + sprintf(iname, "%s.raw", locale); CMenuOptionLanguageChooser* oj = new CMenuOptionLanguageChooser((char*)locale, this, iname); oj->addOption(locale); languageSettings.addItem( oj ); @@ -1817,7 +1817,7 @@ void CNeutrinoApp::InitRecordingSettings(CMenuWidget &recordingSettings) g_settings.recording_audio_pids_std = ( g_settings.recording_audio_pids_default & TIMERD_APIDS_STD ) ? 1 : 0 ; g_settings.recording_audio_pids_alt = ( g_settings.recording_audio_pids_default & TIMERD_APIDS_ALT ) ? 1 : 0 ; g_settings.recording_audio_pids_ac3 = ( g_settings.recording_audio_pids_default & TIMERD_APIDS_AC3 ) ? 1 : 0 ; - + CRecAPIDSettingsNotifier * an = new CRecAPIDSettingsNotifier; CMenuOptionChooser* aoj1 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_STD, &g_settings.recording_audio_pids_std, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, an); CMenuOptionChooser* aoj2 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_APIDS_ALT, &g_settings.recording_audio_pids_alt, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true, an); @@ -2560,7 +2560,7 @@ void CNeutrinoApp::InitKeySettings(CMenuWidget &keySettings) keySettings.addItem(new CMenuForwarder(LOCALE_USERMENU_BUTTON_YELLOW, true, NULL, new CUserMenuMenu(LOCALE_USERMENU_BUTTON_YELLOW,2))); keySettings.addItem(new CMenuForwarder(LOCALE_USERMENU_BUTTON_BLUE, true, NULL, new CUserMenuMenu(LOCALE_USERMENU_BUTTON_BLUE,3))); - + } // USERMENU // leave this functions, somebody might want to use it in the future again @@ -3005,7 +3005,7 @@ bool CNeutrinoApp::showUserMenu(int button) menu->exec(NULL,""); selected[button] = menu->getSelected(); } - else if (menu_item != NULL) + else if (menu_item != NULL) menu_item->exec( NULL ); // restore mute symbol diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index 88b630c6c..652c93f15 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -86,7 +86,7 @@ THandleStatus CControlAPI::Hook_SendResponse(CyhookHandler *hh) { hh->status = HANDLED_NONE; -// log_level_printfX(4,"CControlAPI hook start url:%s\n",hh->UrlData["url"].c_str()); +// log_level_printfX(4,"CControlAPI hook start url:%s\n",hh->UrlData["url"].c_str()); init(hh); if(hh->UrlData["path"] == "/control/" @@ -94,9 +94,9 @@ THandleStatus CControlAPI::Hook_SendResponse(CyhookHandler *hh) Execute(hh); if(hh->UrlData["path"] == "/fb/") // fb-compatibility for timer-calls compatibility_Timer(hh); -// log_level_printfX(4,"CControlAPI hook ende status:%d\n",(int)hh->status); -// log_level_printfX(5,"CControlAPI hook result:%s\n",hh->yresult.c_str()); - +// log_level_printfX(4,"CControlAPI hook ende status:%d\n",(int)hh->status); +// log_level_printfX(5,"CControlAPI hook result:%s\n",hh->yresult.c_str()); + return hh->status; } @@ -107,7 +107,7 @@ THandleStatus CControlAPI::Hook_SendResponse(CyhookHandler *hh) //------------------------------------------------------------------------- void CControlAPI::compatibility_Timer(CyhookHandler *hh) { - log_level_printf(4,"CControlAPI Compatibility Timer Start url:%s\n",hh->UrlData["url"].c_str()); + log_level_printf(4,"CControlAPI Compatibility Timer Start url:%s\n",hh->UrlData["url"].c_str()); if(NeutrinoAPI->Timerd->isTimerdAvailable() && hh->ParamList.size() > 0) { if(hh->ParamList["action"] == "remove") @@ -190,7 +190,7 @@ void CControlAPI::Execute(CyhookHandler *hh) std::string yresult; std::string filename = hh->UrlData["filename"]; - log_level_printf(4,"ControlAPI.Execute filename:(%s)\n",filename.c_str()); + log_level_printf(4,"ControlAPI.Execute filename:(%s)\n",filename.c_str()); // tolower(filename) for(unsigned int i = 0; i < filename.length(); i++) filename[i] = tolower(filename[i]); @@ -233,9 +233,9 @@ void CControlAPI::Execute(CyhookHandler *hh) return; else { - (this->*yCgiCallList[index].pfunc)(hh); + (this->*yCgiCallList[index].pfunc)(hh); return; - } + } } //============================================================================= @@ -269,7 +269,7 @@ void CControlAPI::TimerCGI(CyhookHandler *hh) else hh->SendError(); } - + } else SendTimers(hh); @@ -694,7 +694,7 @@ static const struct key keynames[] = { {"KEY_RECORD", KEY_RECORD}, {"KEY_STOP", KEY_STOP}, {"KEY_PLAY", KEY_PLAY} -}; +}; // The code here is based on rcsim. Thx Carjay! void CControlAPI::RCEmCGI(CyhookHandler *hh) @@ -709,7 +709,7 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh) if (!strcmp(keyname.c_str(), keynames[i].name)) sendcode = keynames[i].code; } - + if (sendcode == -1) { printf("[nhttpd] Key %s not found\n", keyname.c_str()); hh->SendError(); @@ -746,7 +746,7 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh) return; } } -#endif +#endif if (rc_send(evd, sendcode, KEY_RELEASED)<0){ perror("writing 'KEY_RELEASED' event failed"); close(evd); @@ -810,7 +810,7 @@ void CControlAPI::VideoOutputCGI(CyhookHandler *hh) else { hh->SendError(); } - + NeutrinoAPI->Controld->setVideoOutput(videooutput); hh->SendOk(); } @@ -833,8 +833,8 @@ void CControlAPI::VCROutputCGI(CyhookHandler *hh) } // S-Video on VCR only possible when S-Video or CVBS on TV; enforce - if (vcroutput == CControldClient::VIDEOOUTPUT_SVIDEO - && (NeutrinoAPI->Controld->getVideoOutput() != CControldClient::VIDEOOUTPUT_COMPOSITE) + if (vcroutput == CControldClient::VIDEOOUTPUT_SVIDEO + && (NeutrinoAPI->Controld->getVideoOutput() != CControldClient::VIDEOOUTPUT_COMPOSITE) && (NeutrinoAPI->Controld->getVideoOutput() != CControldClient::VIDEOOUTPUT_SVIDEO)) { hh->SendError(); return; @@ -868,7 +868,7 @@ void CControlAPI::ScartModeCGI(CyhookHandler *hh) void CControlAPI::VolumeCGI(CyhookHandler *hh) { if (hh->ParamList.empty()) //without param: show actual volumen - hh->printf("%d", NeutrinoAPI->Controld->getVolume()); + hh->printf("%d", NeutrinoAPI->Controld->getVolume()); else if (hh->ParamList["1"].compare("mute") == 0) { NeutrinoAPI->Zapit->muteAudio(true); @@ -1099,7 +1099,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) { hh->SetHeader(HTTP_OK, "text/xml; charset=UTF-8"); t_channel_id channel_id = (t_channel_id)-1; - + if (!(hh->ParamList["channelid"].empty())) { sscanf(hh->ParamList["channelid"].c_str(), @@ -1120,12 +1120,12 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "\r\n", channel_id); hh->printf("\r\n", NeutrinoAPI->GetServiceName(channel_id).c_str()); - + // max = maximal output items int max = -1; if (!(hh->ParamList["max"].empty())) max = atoi( hh->ParamList["max"].c_str() ); - + // stoptime = maximal output items until starttime >= stoptime long stoptime = -1; if (!(hh->ParamList["stoptime"].empty())) @@ -1154,11 +1154,11 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) hh->printf("\t%s\r\n", zbuffer); hh->printf("\t%d\r\n", (int)(eventIterator->duration/60)); hh->printf("\t\r\n", eventIterator->description.c_str()); - + if (!(hh->ParamList["details"].empty())) { CShortEPGData epg; - + //if (NeutrinoAPI->Sectionsd->getEPGidShort(eventIterator->eventID,&epg)) if (sectionsd_getEPGidShort(eventIterator->eventID,&epg)) { @@ -1234,7 +1234,7 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh) { for(unsigned int i=0;i< desc.size();i++) { - t_channel_id sub_channel_id = + t_channel_id sub_channel_id = CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID( desc[i].serviceId, desc[i].originalNetworkId, desc[i].transportStreamId); hh->printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS @@ -1287,7 +1287,7 @@ void CControlAPI::StartPluginCGI(CyhookHandler *hh) } else hh->SendError(); - + } else hh->SendError(); @@ -1687,7 +1687,7 @@ void CControlAPI::YWeb_SendRadioStreamingPid(CyhookHandler *hh) } //----------------------------------------------------------------------------- -std::string CControlAPI::YexecuteScript(CyhookHandler *hh, std::string cmd) +std::string CControlAPI::YexecuteScript(CyhookHandler */*hh*/, std::string cmd) { std::string script, para, result; bool found = false; @@ -1707,7 +1707,7 @@ std::string CControlAPI::YexecuteScript(CyhookHandler *hh, std::string cmd) char cwd[255]; getcwd(cwd, 254); - for (unsigned int i=0;iParamList["alTime"] != "") sscanf(hh->ParamList["alTime"].c_str(),"%2d.%2d",&(alarmTime->tm_hour), &(alarmTime->tm_min)); - + correctTime(alarmTime); alarmTimeT = mktime(alarmTime); announceTimeT = alarmTimeT; @@ -1790,7 +1790,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) // Stop Time - Format exact! HH:MM if(hh->ParamList["stTime"] != "") sscanf(hh->ParamList["stTime"].c_str(),"%2d.%2d",&(stopTime->tm_hour), &(stopTime->tm_min)); - + // Stop Date - Format exact! DD.MM.YYYY if(hh->ParamList["stDate"] != "") if(sscanf(hh->ParamList["stDate"].c_str(),"%2d.%2d.%4d",&(stopTime->tm_mday), &(stopTime->tm_mon), &(stopTime->tm_year)) == 3) @@ -1838,16 +1838,16 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) correctTime(stopTime); stopTimeT = mktime(stopTime); } - - if(announceTimeT != 0) + + if(announceTimeT != 0) announceTimeT -= 60; - + CTimerd::CTimerEventTypes type; if(hh->ParamList["type"] != "") type = (CTimerd::CTimerEventTypes) atoi(hh->ParamList["type"].c_str()); else // default is: record type = CTimerd::TIMER_RECORD; - + // repeat if(hh->ParamList["repcount"] != "") { @@ -1875,7 +1875,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) &eventinfo.channel_id); else eventinfo.channel_id = NeutrinoAPI->ChannelNameToChannelId(hh->ParamList["channel_name"]); - + void *data=NULL; if(type == CTimerd::TIMER_RECORD) announceTimeT-=120; @@ -1929,7 +1929,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) timerlist.clear(); NeutrinoAPI->Timerd->getTimerList(timerlist); CTimerd::TimerList::iterator timer = timerlist.begin(); - + // Look for Recording Safety Timers too time_t real_alarmTimeT = alarmTimeT; if(eventinfo.recordingSafety) @@ -1938,7 +1938,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh) NeutrinoAPI->Timerd->getRecordingSafety(pre,post); real_alarmTimeT -= pre; } - + for(; timer != timerlist.end();timer++) if(timer->alarmTime == real_alarmTimeT) { @@ -1979,7 +1979,7 @@ void CControlAPI::saveBouquetCGI(CyhookHandler *hh) void CControlAPI::moveBouquetCGI(CyhookHandler *hh) { if (hh->ParamList["selected"] != "" && ( - hh->ParamList["action"] == "up" || + hh->ParamList["action"] == "up" || hh->ParamList["action"] == "down")) { int selected = atoi(hh->ParamList["selected"].c_str()); @@ -2026,9 +2026,9 @@ void CControlAPI::addBouquetCGI(CyhookHandler *hh) //------------------------------------------------------------------------- void CControlAPI::renameBouquetCGI(CyhookHandler *hh) { - if (hh->ParamList["selected"] != "") + if (hh->ParamList["selected"] != "") { - if (hh->ParamList["nameto"] != "") + if (hh->ParamList["nameto"] != "") { if (NeutrinoAPI->Zapit->existsBouquet((hh->ParamList["nameto"]).c_str()) == -1) { @@ -2064,7 +2064,7 @@ void CControlAPI::changeBouquetCGI(CyhookHandler *hh) &delta) > 0) { NeutrinoAPI->Zapit->addChannelToBouquet(selected - 1, channel_id); - bchannels += (delta + 1); // skip the separating ',', too + bchannels += (delta + 1); // skip the separating ',', too } NeutrinoAPI->Zapit->renumChannellist(); @@ -2090,17 +2090,17 @@ void CControlAPI::build_live_url(CyhookHandler *hh) { std::string xpids,port,yresult; int mode = NeutrinoAPI->Zapit->getMode(); - + if ( mode == CZapitClient::MODE_TV) { CZapitClient::responseGetPIDs pids; int apid=0,apid_no=0,apid_idx=0; pids.PIDs.vpid=0; - + if(hh->ParamList["audio_no"] !="") apid_no = atoi(hh->ParamList["audio_no"].c_str()); NeutrinoAPI->Zapit->getPIDS(pids); - + if( apid_no < (int)pids.APIDs.size()) apid_idx=apid_no; if(!pids.APIDs.empty()) @@ -2111,11 +2111,11 @@ void CControlAPI::build_live_url(CyhookHandler *hh) { CZapitClient::responseGetPIDs pids; int apid=0; - + NeutrinoAPI->Zapit->getPIDS(pids); if(!pids.APIDs.empty()) apid = pids.APIDs[0].pid; - + //xpids = string_printf("0x%04x",apid); xpids = string_printf("0x%04x,0x%04x",pids.PIDs.pmtpid,apid); } diff --git a/src/nhttpd/tuxboxapi/lcdapi.cpp b/src/nhttpd/tuxboxapi/lcdapi.cpp index eff45c331..45edf3ca5 100755 --- a/src/nhttpd/tuxboxapi/lcdapi.cpp +++ b/src/nhttpd/tuxboxapi/lcdapi.cpp @@ -86,7 +86,7 @@ void CLCDAPI::LockDisplay(int plock) } } -void CLCDAPI::DrawLine(int x1, int y1, int x2, int y2, int col) +void CLCDAPI::DrawLine(int /*x1*/, int /*y1*/, int /*x2*/, int /*y2*/, int /*col*/) { #if HAVE_LCD int color=(col==0)?(CLCDDisplay::PIXEL_OFF):((col==2)?(CLCDDisplay::PIXEL_INV):(CLCDDisplay::PIXEL_ON)); @@ -94,7 +94,7 @@ void CLCDAPI::DrawLine(int x1, int y1, int x2, int y2, int col) #endif } -void CLCDAPI::DrawRect(int x1, int y1, int x2, int y2, int coll, int colf) +void CLCDAPI::DrawRect(int /*x1*/, int /*y1*/, int /*x2*/, int /*y2*/, int /*coll*/, int /*colf*/) { #if HAVE_LCD int colorl=(coll==0)?(CLCDDisplay::PIXEL_OFF):((coll==2)?(CLCDDisplay::PIXEL_INV):(CLCDDisplay::PIXEL_ON)); @@ -103,7 +103,7 @@ void CLCDAPI::DrawRect(int x1, int y1, int x2, int y2, int coll, int colf) #endif } -void CLCDAPI::DrawText(int px, int py, int psize, int pcolor, int pfont, char *pmsg) +void CLCDAPI::DrawText(int /*px*/, int /*py*/, int /*psize*/, int /*pcolor*/, int /*pfont*/, char */*pmsg*/) { #if HAVE_LCD int color=(pcolor==0)?(CLCDDisplay::PIXEL_OFF):((pcolor==2)?(CLCDDisplay::PIXEL_INV):(CLCDDisplay::PIXEL_ON)); @@ -116,7 +116,7 @@ void CLCDAPI::DrawText(int px, int py, int psize, int pcolor, int pfont, char *p #endif } -bool CLCDAPI::ShowPng(char *filename) +bool CLCDAPI::ShowPng(char */*filename*/) { #if HAVE_LCD return display.load_png(filename); @@ -124,13 +124,13 @@ bool CLCDAPI::ShowPng(char *filename) return 0; } -void CLCDAPI::ShowRaw(int xpos, int ypos, int xsize, int ysize, char *ascreen) +void CLCDAPI::ShowRaw(int /*xpos*/, int /*ypos*/, int /*xsize*/, int /*ysize*/, char */*ascreen*/) { #if HAVE_LCD int sbyte,dbit,dxpos,dypos,wasinc=0,gotval; char *sptr=ascreen; raw_display_t rscreen; - + display.dump_screen(&rscreen); gotval=sscanf(sptr,"%d",&sbyte); for(dypos=ypos; gotval && (dypos<(ypos+ysize)); dypos++) @@ -173,7 +173,7 @@ void CLCDAPI::ShowRaw(int xpos, int ypos, int xsize, int ysize, char *ascreen) display.load_screen(&rscreen); #endif } - + //------------------------------------------------------------------------- // Konstruktor und destruktor @@ -183,7 +183,7 @@ CLCDAPI::CLCDAPI() { #if HAVE_LCD // int i; - + // display = new CLCDDisplay(); fontRenderer = new LcdFontRenderClass(&display); diff --git a/src/nhttpd/tuxboxapi/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/neutrinoapi.cpp index eb75d6c0a..01da03bbc 100644 --- a/src/nhttpd/tuxboxapi/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoapi.cpp @@ -136,7 +136,7 @@ void CNeutrinoAPI::UpdateBouquets(void) { #if 0 BouquetList.clear(); - Zapit->getBouquets(BouquetList, true, true); + Zapit->getBouquets(BouquetList, true, true); for (unsigned int i = 1; i <= BouquetList.size(); i++) UpdateBouquet(i); @@ -164,7 +164,7 @@ void CNeutrinoAPI::ZapToChannelId(t_channel_id channel_id) //printf("Kanal ist aktuell\n"); return; } - + if (Zapit->zapTo_serviceID(channel_id) != CZapitClient::ZAP_INVALID_PARAM) Sectionsd->setServiceChanged(channel_id&0xFFFFFFFFFFFFULL, false); } @@ -259,10 +259,10 @@ bool CNeutrinoAPI::GetChannelEvents(void) CChannelEventList::iterator eventIterator; ChannelListEvents.clear(); - + if (eList.begin() == eList.end()) return false; - + for (eventIterator = eList.begin(); eventIterator != eList.end(); eventIterator++) ChannelListEvents[(*eventIterator).get_channel_id()] = &(*eventIterator); @@ -290,19 +290,19 @@ std::string CNeutrinoAPI::GetServiceName(t_channel_id channel_id) //------------------------------------------------------------------------- -CZapitClient::BouquetChannelList *CNeutrinoAPI::GetBouquet(unsigned int BouquetNr, int Mode) +CZapitClient::BouquetChannelList *CNeutrinoAPI::GetBouquet(unsigned int /*BouquetNr*/, int /*Mode*/) { //FIXME printf("CNeutrinoAPI::GetChannelList still used !\n"); return NULL; #if 0 int mode; - + if (Mode == CZapitClient::MODE_CURRENT) mode = Zapit->getMode(); else mode = Mode; - + if (mode == CZapitClient::MODE_TV) return &TVBouquetsList[BouquetNr]; else @@ -312,19 +312,19 @@ CZapitClient::BouquetChannelList *CNeutrinoAPI::GetBouquet(unsigned int BouquetN //------------------------------------------------------------------------- -CZapitClient::BouquetChannelList *CNeutrinoAPI::GetChannelList(int Mode) +CZapitClient::BouquetChannelList *CNeutrinoAPI::GetChannelList(int /*Mode*/) { //FIXME printf("CNeutrinoAPI::GetChannelList still used !\n"); return NULL; #if 0 int mode; - + if (Mode == CZapitClient::MODE_CURRENT) mode = Zapit->getMode(); else mode = Mode; - + if (mode == CZapitClient::MODE_TV) return &TVChannelList; else @@ -334,7 +334,7 @@ CZapitClient::BouquetChannelList *CNeutrinoAPI::GetChannelList(int Mode) //------------------------------------------------------------------------- -void CNeutrinoAPI::UpdateBouquet(unsigned int BouquetNr) +void CNeutrinoAPI::UpdateBouquet(unsigned int /*BouquetNr*/) { #if 0 //FIXME TVBouquetsList[BouquetNr].clear(); diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index 00e41d89f..090fca401 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -59,7 +59,7 @@ THandleStatus CNeutrinoYParser::Hook_SendResponse(CyhookHandler *hh) { hh->status = HANDLED_NONE; -// log_level_printf(4,"Neutrinoparser Hook Start url:%s\n",hh->UrlData["url"].c_str()); +// log_level_printf(4,"Neutrinoparser Hook Start url:%s\n",hh->UrlData["url"].c_str()); init(hh); CNeutrinoYParser *yP = new CNeutrinoYParser(NeutrinoAPI); // create a Session @@ -70,13 +70,13 @@ THandleStatus CNeutrinoYParser::Hook_SendResponse(CyhookHandler *hh) yP->Execute(hh); if(hh->status == HANDLED_NOT_IMPLEMENTED) hh->status = HANDLED_NONE; // y-calls can be implemented anywhere - } - + } + delete yP; -// log_level_printf(4,"Neutrinoparser Hook Ende status:%d\n",(int)hh->status); -// log_level_printf(5,"Neutrinoparser Hook Result:%s\n",hh->yresult.c_str()); - +// log_level_printf(4,"Neutrinoparser Hook Ende status:%d\n",(int)hh->status); +// log_level_printf(5,"Neutrinoparser Hook Result:%s\n",hh->yresult.c_str()); + return hh->status; } //----------------------------------------------------------------------------- @@ -147,7 +147,7 @@ std::string CNeutrinoYParser::YWeb_cgi_func(CyhookHandler *hh, std::string ycmd //------------------------------------------------------------------------- // y-func : mount_get_list //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_mount_get_list(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_mount_get_list(CyhookHandler */*hh*/, std::string /*para*/) { CConfigFile *Config = new CConfigFile(','); std::string ysel, ytype, yip, ylocal_dir, ydir, ynr, yresult; @@ -159,11 +159,11 @@ std::string CNeutrinoYParser::func_mount_get_list(CyhookHandler *hh, std::strin ynr=itoa(i); ysel = ((i==0) ? "checked=\"checked\"" : ""); yitype = Config->getInt32("network_nfs_type_"+ynr,0); - ytype = ( (yitype==0) ? "NFS" :((yitype==1) ? "CIFS" : "FTPFS") ); + ytype = ( (yitype==0) ? "NFS" :((yitype==1) ? "CIFS" : "FTPFS") ); yip = Config->getString("network_nfs_ip_"+ynr,""); ydir = Config->getString("network_nfs_dir_"+ynr,""); ylocal_dir = Config->getString("network_nfs_local_dir_"+ynr,""); - if(ydir != "") + if(ydir != "") ydir="("+ydir+")"; yresult += string_printf("%d %s - %s %s %s
", @@ -176,7 +176,7 @@ std::string CNeutrinoYParser::func_mount_get_list(CyhookHandler *hh, std::strin //------------------------------------------------------------------------- // y-func : mount_set_values //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_mount_set_values(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_mount_set_values(CyhookHandler *hh, std::string /*para*/) { CConfigFile *Config = new CConfigFile(','); std::string ynr, yresult; @@ -201,11 +201,11 @@ std::string CNeutrinoYParser::func_mount_set_values(CyhookHandler *hh, std::str //------------------------------------------------------------------------- // y-func : get_bouquets_as_dropdown [] //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler */*hh*/, std::string para) { std::string ynr, yresult, sel, nr_str, do_show_hidden; int nr=1; - + ySplitString(para," ",nr_str, do_show_hidden); if(nr_str != "") nr = atoi(nr_str.c_str()); @@ -213,13 +213,13 @@ std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler *hh, for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++) { sel=(nr==(i+1)) ? "selected=\"selected\"" : ""; if(!g_bouquetManager->Bouquets[i]->bHidden || do_show_hidden == "true") - yresult += string_printf("\n", i + 1, sel.c_str(), + yresult += string_printf("\n", i + 1, sel.c_str(), (encodeString(std::string(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) :g_bouquetManager->Bouquets[i]->Name.c_str()))).c_str()); //yresult += string_printf("\n", i + 1, sel.c_str(), (encodeString(std::string(g_bouquetManager->Bouquets[i]->Name.c_str()))).c_str()); } #if 0 for (unsigned int i = 0; i < NeutrinoAPI->BouquetList.size();i++) - { + { sel=(nr==(i+1)) ? "selected=\"selected\"" : ""; if(!NeutrinoAPI->BouquetList[i].hidden || do_show_hidden == "true") yresult += string_printf("\n", (NeutrinoAPI->BouquetList[i].bouquet_nr) + 1, sel.c_str(), (encodeString(std::string(NeutrinoAPI->BouquetList[i].name))).c_str()); @@ -232,10 +232,10 @@ std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler *hh, // y-func : get_bouquets_as_templatelist [~] // TODO: select actual Bouquet //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_bouquets_as_templatelist(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_bouquets_as_templatelist(CyhookHandler */*hh*/, std::string para) { std::string yresult, ytemplate, do_show_hidden; - + ySplitString(para,"~",ytemplate, do_show_hidden); //ytemplate += "\n"; //FIXME add newline to printf for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++) { @@ -246,7 +246,7 @@ std::string CNeutrinoYParser::func_get_bouquets_as_templatelist(CyhookHandler * } #if 0 for (unsigned int i = 0; i < NeutrinoAPI->BouquetList.size();i++) - { + { if(!NeutrinoAPI->BouquetList[i].hidden || do_show_hidden == "true") { yresult += string_printf(ytemplate.c_str(), (NeutrinoAPI->BouquetList[i].bouquet_nr) + 1, NeutrinoAPI->BouquetList[i].name); @@ -259,7 +259,7 @@ std::string CNeutrinoYParser::func_get_bouquets_as_templatelist(CyhookHandler * //------------------------------------------------------------------------- // y-func : get_actual_bouquet_number //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_actual_bouquet_number(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_actual_bouquet_number(CyhookHandler */*hh*/, std::string /*para*/) { //CZapitClient::BouquetChannelList *bouquet; //int mode = CZapitClient::MODE_CURRENT; @@ -277,13 +277,13 @@ std::string CNeutrinoYParser::func_get_actual_bouquet_number(CyhookHandler *hh, //------------------------------------------------------------------------- // y-func : get_channel_dropdown [ []] //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler */*hh*/, std::string para) { std::string abouquet, achannel_id, yresult, sel, sid; - + int bnumber = 1; int mode = CZapitClient::MODE_CURRENT; - + ySplitString(para," ",abouquet, achannel_id); if(abouquet != "") bnumber = atoi(abouquet.c_str()); @@ -319,7 +319,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: ZapitChannelList channels; int num; int mode = NeutrinoAPI->Zapit->getMode(); - + ySplitString(para," ",abnumber, tmp); if(abnumber != "") BouquetNr = atoi(abnumber.c_str()); @@ -343,7 +343,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo; std::string timestr; bool have_logos = false; - + if(hh->WebserverConfigList["ExtrasDocumentRoot"] == "web" || (access((hh->WebserverConfigList["ExtrasDocumentRoot"]+"/logos").c_str(),4)==0) ) have_logos = true; @@ -355,7 +355,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: #if 1 CChannelEvent *event; event = NeutrinoAPI->ChannelListEvents[channel->channel_id]; - + classname = (i++ & 1) ? 'a' : 'b'; if (channel->channel_id == current_channel) classname = 'c'; @@ -367,10 +367,10 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS "')\">", classname, channel->channel_id, + ".jpg\"/>", classname, channel->channel_id, (hh->WebserverConfigList["ExtrasDocumentURL"]).c_str(), channel->channel_id & 0xFFFFFFFFFFFFULL); - + /* timer slider */ if(event && event->duration > 0) prozent = 100 * (time(NULL) - event->startTime) / event->duration; @@ -387,7 +387,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: , (prozent / 10) * 3 , (10 - (prozent / 10))*3 ); - + /* channel name and buttons */ yresult += string_printf("\n%schannel_id&0xFFFFFFFFFFFFULL, nvod_list)) { CZapitClient::subServiceList subServiceList; - + for (CSectionsdClient::NVODTimesList::iterator ni = nvod_list.begin(); ni != nvod_list.end(); ni++) { CZapitClient::commandAddSubServices cmd; CEPGData epg; - + // Byte Sequence by ntohs cmd.original_network_id = ntohs(ni->original_network_id); cmd.service_id = ntohs(ni->service_id); cmd.transport_stream_id = ntohs(ni->transport_stream_id); t_channel_id channel_id = CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(cmd.service_id, cmd.original_network_id, cmd.transport_stream_id); - + timestr = timeString(ni->zeit.startzeit); // FIXME: time is wrong (at least on little endian)! //NeutrinoAPI->Sectionsd->getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epg); // FIXME: der scheissendreck geht nit!!! @@ -455,7 +455,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: NeutrinoAPI->Zapit->setSubServices(subServiceList); } } - + else if ((event = NeutrinoAPI->ChannelListEvents[channel->channel_id])) { //bool has_current_next = NeutrinoAPI->Sectionsd->getCurrentNextServiceKey(channel->channel_id&0xFFFFFFFFFFFFULL, currentNextInfo); @@ -488,18 +488,18 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: //------------------------------------------------------------------------- // y-func : get_actual_channel_id //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_actual_channel_id(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_actual_channel_id(CyhookHandler */*hh*/, std::string /*para*/) { return string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, live_channel_id /*NeutrinoAPI->Zapit->getCurrentServiceID()*/); } //------------------------------------------------------------------------- // y-func : get_mode (returns tv|radio|unknown) //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_mode(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_mode(CyhookHandler */*hh*/, std::string /*para*/) { std::string yresult; int mode = NeutrinoAPI->Zapit->getMode(); - + if ( mode == CZapitClient::MODE_TV) yresult = "tv"; else if ( mode == CZapitClient::MODE_RADIO) @@ -512,12 +512,12 @@ std::string CNeutrinoYParser::func_get_mode(CyhookHandler *hh, std::string para //------------------------------------------------------------------------- // y-func : get_video_pids (para=audio channel, returns: 0x0000,0x0000,0x0000) //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_video_pids(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_video_pids(CyhookHandler */*hh*/, std::string para) { CZapitClient::responseGetPIDs pids; int apid=0,apid_no=0,apid_idx=0; pids.PIDs.vpid=0; - + if(para != "") apid_no = atoi(para.c_str()); NeutrinoAPI->Zapit->getPIDS(pids); @@ -531,15 +531,15 @@ std::string CNeutrinoYParser::func_get_video_pids(CyhookHandler *hh, std::strin //------------------------------------------------------------------------- // y-func : get_radio_pids (returns: 0x0000) //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_radio_pid(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_radio_pid(CyhookHandler */*hh*/, std::string /*para*/) { CZapitClient::responseGetPIDs pids; int apid=0; - + NeutrinoAPI->Zapit->getPIDS(pids); if(!pids.APIDs.empty()) apid = pids.APIDs[0].pid; - + return string_printf("0x%04x",apid); } @@ -547,13 +547,13 @@ std::string CNeutrinoYParser::func_get_radio_pid(CyhookHandler *hh, std::string // y-func : get_audio_pids_as_dropdown (from controlapi) // prara: [apid] option value = apid-Value. Default apid-Index //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler */*hh*/, std::string para) { std::string yresult; static bool init_iso=true; bool idx_as_id=true; - - if(para == "apid") + + if(para == "apid") idx_as_id=false; if(init_iso) { @@ -622,10 +622,10 @@ std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler *hh //------------------------------------------------------------------------- // y-func : build umount list //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_unmount_get_list(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_unmount_get_list(CyhookHandler */*hh*/, std::string /*para*/) { std::string ysel, ymount, ylocal_dir, yfstype, ynr, yresult, mounts; - + std::ifstream in; in.open("/proc/mounts", std::ifstream::in); int j=0; @@ -650,11 +650,11 @@ std::string CNeutrinoYParser::func_unmount_get_list(CyhookHandler *hh, std::str //------------------------------------------------------------------------- // y-func : build partition list //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler */*hh*/, std::string /*para*/) { std::string ysel, ymtd, yname, dummy, yresult; char ytmp[200]; - + std::ifstream in; in.open("/proc/mtd", std::ifstream::in); int j=0; @@ -677,14 +677,14 @@ std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler *hh, std::s //------------------------------------------------------------------------- // y-func : get boxtypetext (Nokia, Philips, Sagem) //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler */*hh*/, std::string /*para*/) { return NeutrinoAPI->Dbox_Hersteller[NeutrinoAPI->Controld->getBoxType()]; } //------------------------------------------------------------------------- // y-func : get stream info //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, std::string /*para*/) { int bitInfo[10]; CZapitClient::CCurrentServiceInfo serviceinfo; @@ -701,10 +701,10 @@ std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, s hh->ParamList["polarisation"] = serviceinfo.polarisation==1?"h":"v"; hh->ParamList["ServiceName"] = NeutrinoAPI->GetServiceName(live_channel_id);//NeutrinoAPI->Zapit->getCurrentServiceID()); NeutrinoAPI->GetStreamInfo(bitInfo); - + hh->ParamList["VideoFormat"] = string_printf("%d x %d", bitInfo[0], bitInfo[1] ); hh->ParamList["BitRate"] = string_printf("%d\n", bitInfo[4]*50); - + switch ( bitInfo[2] ) //format { case 2: hh->ParamList["AspectRatio"] = "4:3"; break; @@ -733,7 +733,7 @@ std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, s unsigned char mode = (header>> 6)&3; unsigned char copy = (header>> 3)&1; - hh->ParamList["AudioType"] = + hh->ParamList["AudioType"] = string_printf("%s (%s/%s) %s", modenames[mode], sampfreqnames[sampfreq], layernames[layer], copy?"c":""); } @@ -743,7 +743,7 @@ std::string CNeutrinoYParser::func_get_current_stream_info(CyhookHandler *hh, s // Template 1:classname, 2:zAlarmTime, 3: zStopTime, 4:zRep, 5:zRepCouunt // 6:zType, 7:sAddData, 8:timer->eventID, 9:timer->eventID //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler */*hh*/, std::string para) { std::string yresult; CTimerd::TimerList timerlist; // List of bouquets @@ -752,8 +752,8 @@ std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler *hh, std::strin NeutrinoAPI->Timerd->getTimerList(timerlist); sort(timerlist.begin(), timerlist.end()); - CZapitClient::BouquetChannelList channellist_tv; - CZapitClient::BouquetChannelList channellist_radio; + CZapitClient::BouquetChannelList channellist_tv; + CZapitClient::BouquetChannelList channellist_radio; channellist_tv.clear(); channellist_radio.clear(); @@ -777,7 +777,7 @@ std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler *hh, std::strin if(timer->stopTime > 0) { struct tm *stopTime = localtime(&(timer->stopTime)); - strftime(zStopTime,20,"%d.%m. %H:%M",stopTime); + strftime(zStopTime,20,"%d.%m. %H:%M",stopTime); } // repeat std::string zRep = NeutrinoAPI->timerEventRepeat2Str(timer->eventRepeat); @@ -885,10 +885,10 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin // init timerid if(stimerid != "") timerId = (unsigned)atoi(stimerid.c_str()); - + NeutrinoAPI->Timerd->getTimer(timer, timerId); std::string zType = NeutrinoAPI->timerEventType2Str(timer.eventType); - + hh->ParamList["timerId"] = itoa(timerId); hh->ParamList["zType"] = zType; } @@ -934,7 +934,7 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin sel = (i==(int)timer.eventType) ? "selected=\"selected\"" : ""; else sel = (i==(int)CTimerd::TIMER_RECORD) ? "selected=\"selected\"" : ""; - hh->ParamList["timertype"] += + hh->ParamList["timertype"] += string_printf("\n",i,sel.c_str(),zRep.c_str()); } } @@ -959,14 +959,14 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin sel = "selected=\"selected\""; else sel = ""; - hh->ParamList["repeat"] += + hh->ParamList["repeat"] += string_printf("\n",(int)CTimerd::TIMERREPEAT_WEEKDAYS, sel.c_str(), zRep.c_str()); // Weekdays char weekdays[8]; NeutrinoAPI->Timerd->setWeekdaysToStr(timer.eventRepeat, weekdays); hh->ParamList["weekdays"]= weekdays; - + // timer repeats if (timer.eventRepeat == CTimerd::TIMERREPEAT_ONCE) hh->ParamList["TIMERREPEAT_ONCE"] = "y"; @@ -993,7 +993,7 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin } #if 0 // program row - CZapitClient::BouquetChannelList channellist; + CZapitClient::BouquetChannelList channellist; channellist.clear(); NeutrinoAPI->Zapit->getChannels(channellist,CZapitClient::MODE_TV, CZapitClient::SORT_BOUQUET, true); CZapitClient::BouquetChannelList::iterator channel = channellist.begin(); @@ -1036,7 +1036,7 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin hh->ParamList["standby"] = (cmd == "new")? "0" : ((timer.standby_on)?"1":"0"); hh->ParamList["message"] = (cmd == "new")? "" : timer.message; hh->ParamList["pluginname"] = (cmd == "new")? "" : timer.pluginName; - + return ""; } @@ -1090,7 +1090,7 @@ std::string CNeutrinoYParser::func_bouquet_editor_main(CyhookHandler *hh, std:: //------------------------------------------------------------------------- // func: Bouquet Edit //------------------------------------------------------------------------- -std::string CNeutrinoYParser::func_set_bouquet_edit_form(CyhookHandler *hh, std::string para) +std::string CNeutrinoYParser::func_set_bouquet_edit_form(CyhookHandler *hh, std::string /*para*/) { if (!(hh->ParamList["selected"].empty())) { diff --git a/src/nhttpd/yhttpd.cpp b/src/nhttpd/yhttpd.cpp index 3b7000608..8336c201d 100644 --- a/src/nhttpd/yhttpd.cpp +++ b/src/nhttpd/yhttpd.cpp @@ -17,7 +17,7 @@ #include "ylogging.h" #include "yhook.h" -#ifdef Y_CONFIG_USE_YPARSER +#ifdef Y_CONFIG_USE_YPARSER #include "mod_yparser.h" static CyParser yParser; #endif @@ -47,12 +47,12 @@ static CTesthook *testhook = NULL; static CmWebLog *weblog = NULL; #endif -#ifdef Y_CONFIG_USE_SENDFILE +#ifdef Y_CONFIG_USE_SENDFILE #include "mod_sendfile.h" static CmodSendfile *mod_sendfile = NULL; #endif -#ifdef Y_CONFIG_USE_CACHE +#ifdef Y_CONFIG_USE_CACHE #include "mod_cache.h" static CmodCache mod_cache; // static instance #endif @@ -77,7 +77,7 @@ static void sig_catch(int msignal) switch (msignal) { // case SIGTERM: // case SIGINT: - + case SIGPIPE: aprintf("got signal PIPE, nice!\n"); break; @@ -109,7 +109,7 @@ void yhttpd_reload_config() // Main Entry //----------------------------------------------------------------------------- //int main(int argc, char **argv) -void * nhttpd_main_thread(void *data) +void * nhttpd_main_thread(void */*data*/) { //int argc = 1; //char **argv; @@ -182,11 +182,11 @@ void * nhttpd_main_thread(void *data) // Start Webserver: fork ist if not in debug mode aprintf("Webserver starting...\n"); dprintf("Start in Debug-Mode\n"); // non forked debugging loop - + yhttpd->run(); } delete yhttpd; - + aprintf("Main end\n"); return (void *) EXIT_SUCCESS; } @@ -221,7 +221,7 @@ bool Cyhttpd::Configure() struct group *grp = NULL; std::string username = ConfigList["server.user_name"]; std::string groupname= ConfigList["server.group_name"]; - + // get user data if(username != "") { @@ -240,7 +240,7 @@ bool Cyhttpd::Configure() return false; } } -#endif +#endif // change root directory #ifdef Y_CONFIG_FEATURE_CHROOT if(!ConfigList["server.chroot"].empty()) @@ -259,12 +259,12 @@ bool Cyhttpd::Configure() return false; } } -#endif +#endif #ifdef Y_CONFIG_FEATURE_HTTPD_USER if(username != "" && pwd != NULL && grp != NULL) { log_level_printf(2, "set user and groups\n"); - + // drop root privileges setgid(grp->gr_gid); setgroups(0, NULL); @@ -297,7 +297,7 @@ void Cyhttpd::run() else aprintf("Error initializing WebServer\n"); } - + //----------------------------------------------------------------------------- // Show Version Text and Number //----------------------------------------------------------------------------- @@ -322,7 +322,7 @@ void Cyhttpd::usage(FILE *dest) } //----------------------------------------------------------------------------- -// Stop WebServer +// Stop WebServer //----------------------------------------------------------------------------- void Cyhttpd::stop_webserver() { @@ -353,12 +353,12 @@ void Cyhttpd::hooks_attach() CyhookHandler::attach(NeutrinoAPI->NeutrinoYParser); CyhookHandler::attach(NeutrinoAPI->ControlAPI); #else -#ifdef Y_CONFIG_USE_YPARSER +#ifdef Y_CONFIG_USE_YPARSER CyhookHandler::attach(&yParser); #endif #endif -#ifdef Y_CONFIG_USE_CACHE +#ifdef Y_CONFIG_USE_CACHE CyhookHandler::attach(&mod_cache); #endif @@ -366,14 +366,14 @@ void Cyhttpd::hooks_attach() mod_sendfile = new CmodSendfile(); CyhookHandler::attach(mod_sendfile); #endif -#ifdef Y_CONFIG_USE_WEBLOG +#ifdef Y_CONFIG_USE_WEBLOG weblog = new CmWebLog(); CyhookHandler::attach(weblog); #endif } //----------------------------------------------------------------------------- -// Detach hooks & Destroy +// Detach hooks & Destroy //----------------------------------------------------------------------------- void Cyhttpd::hooks_detach() { @@ -390,12 +390,12 @@ void Cyhttpd::hooks_detach() #ifdef CONFIG_SYSTEM_TUXBOX CyhookHandler::detach(NeutrinoAPI->NeutrinoYParser); #else -#ifdef Y_CONFIG_USE_YPARSER +#ifdef Y_CONFIG_USE_YPARSER CyhookHandler::detach(&yParser); #endif #endif -#ifdef Y_CONFIG_USE_CACHE +#ifdef Y_CONFIG_USE_CACHE CyhookHandler::detach(&mod_cache); #endif @@ -403,7 +403,7 @@ void Cyhttpd::hooks_detach() CyhookHandler::detach(mod_sendfile); #endif -#ifdef Y_CONFIG_USE_WEBLOG +#ifdef Y_CONFIG_USE_WEBLOG CyhookHandler::detach(weblog); delete weblog; #endif @@ -415,7 +415,7 @@ void Cyhttpd::hooks_detach() //----------------------------------------------------------------------------- void Cyhttpd::ReadConfig(void) { - log_level_printf(3,"ReadConfig Start\n"); + log_level_printf(3,"ReadConfig Start\n"); CConfigFile *Config = new CConfigFile(','); bool have_config = false; if(access(HTTPD_CONFIGFILE,4) == 0) @@ -427,7 +427,7 @@ void Cyhttpd::ReadConfig(void) { CConfigFile OrgConfig = *Config; Config->clear(); - + Config->setInt32("server.log.loglevel", OrgConfig.getInt32("LogLevel", 0)); Config->setString("configfile.version", "1"); Config->setString("webserver.websites", "WebsiteMain"); @@ -445,11 +445,11 @@ void Cyhttpd::ReadConfig(void) Config->setString("mod_auth.password", OrgConfig.getString("AuthPassword", AUTHPASSWORD)); Config->setString("mod_auth.no_auth_client", OrgConfig.getString("NoAuthClient", "")); Config->setString("mod_auth.authenticate", OrgConfig.getString("Authenticate", "false")); - + Config->setString("mod_sendfile.mime_types", HTTPD_SENDFILE_EXT); - + Config->saveConfig(HTTPD_CONFIGFILE); - + } // configure debugging & logging if(CLogging::getInstance()->LogLevel == 0) @@ -473,7 +473,7 @@ void Cyhttpd::ReadConfig(void) ConfigList["SSL"] = Config->getString("WebsiteMain.ssl", "false"); ConfigList["SSL_pemfile"] = Config->getString("WebsiteMain.ssl_pemfile", SSL_PEMFILE); ConfigList["SSL_CA_file"] = Config->getString("WebsiteMain.ssl_ca_file", SSL_CA_FILE); - + CySocket::SSL_pemfile = ConfigList["SSL_pemfile"]; CySocket::SSL_CA_file = ConfigList["SSL_CA_file"]; if(ConfigList["SSL"] == "true") @@ -486,10 +486,10 @@ void Cyhttpd::ReadConfig(void) // Read App specifig settings by Hook CyhookHandler::Hooks_ReadConfig(Config, ConfigList); - + // Save if new defaults are set if (!have_config) Config->saveConfig(HTTPD_CONFIGFILE); - log_level_printf(3,"ReadConfig End\n"); + log_level_printf(3,"ReadConfig End\n"); delete Config; } diff --git a/src/nhttpd/yhttpd_core/yhook.h b/src/nhttpd/yhttpd_core/yhook.h index 796031af0..1ee4302b3 100644 --- a/src/nhttpd/yhttpd_core/yhook.h +++ b/src/nhttpd/yhttpd_core/yhook.h @@ -5,7 +5,7 @@ // Extentions for the Webserver can be implemented with Hooks. // A "Hook"-Class must be inherited from Cyhook and can override the virtual // functions from Cyhook. -// There are three types of Hooks. +// There are three types of Hooks. // 1) Server based Hooks (exactly one Instance of Cyhttpd) // 2) Webserver based Hooks (for each Instance of CWebserver, actually one; not now) // 3) Connection based Hooks (for each Instance of CWebserverConnection) @@ -31,7 +31,7 @@ // For example the CmAuth-Hook validates HTTP-Authentication and returns // HANDLED_CONTINUE if the authentication fits. // Each Hook_SendResponse is encapsulated from the webserver and should not work -// on Socket-Connections. The Response is written to yresult. There are many +// on Socket-Connections. The Response is written to yresult. There are many // helper-function for Output and Status-Handling. // The Input is encapsulated too: ParamList, HeaderList, UrlData, ... // Look at Response.SendResponse() @@ -77,7 +77,7 @@ typedef enum HANDLED_SENDFILE, // Set new URL and Send File HANDLED_REWRITE, // Set new URL and call Hooks again HANDLED_CONTINUE, // handled but go on - + } THandleStatus; typedef std::list THookList; @@ -94,13 +94,13 @@ public: virtual std::string getHookVersion(void) {return std::string("0.0.0");} virtual std::string getHookName(void) {return std::string("Abstract Hook Class");} // CWebserverConnection based hooks - virtual THandleStatus Hook_PrepareResponse(CyhookHandler *hh){return HANDLED_NONE;}; - virtual THandleStatus Hook_SendResponse(CyhookHandler *hh){return HANDLED_NONE;}; - virtual THandleStatus Hook_EndConnection(CyhookHandler *hh){return HANDLED_NONE;} - virtual THandleStatus Hook_UploadSetFilename(CyhookHandler *hh, std::string &Filename){return HANDLED_NONE;} - virtual THandleStatus Hook_UploadReady(CyhookHandler *hh, std::string Filename){return HANDLED_NONE;} + virtual THandleStatus Hook_PrepareResponse(CyhookHandler */*hh*/){return HANDLED_NONE;}; + virtual THandleStatus Hook_SendResponse(CyhookHandler */*hh*/){return HANDLED_NONE;}; + virtual THandleStatus Hook_EndConnection(CyhookHandler */*hh*/){return HANDLED_NONE;} + virtual THandleStatus Hook_UploadSetFilename(CyhookHandler */*hh*/, std::string &/*Filename*/){return HANDLED_NONE;} + virtual THandleStatus Hook_UploadReady(CyhookHandler */*hh*/, std::string /*Filename*/){return HANDLED_NONE;} // Cyhttpd based hooks - virtual THandleStatus Hook_ReadConfig(CConfigFile *Config, CStringList &ConfigList){return HANDLED_NONE;}; + virtual THandleStatus Hook_ReadConfig(CConfigFile */*Config*/, CStringList &/*ConfigList*/){return HANDLED_NONE;}; }; //----------------------------------------------------------------------------- @@ -121,7 +121,7 @@ public: time_t LastModified; // Last Modified Time of Item to send / -1 dynamic content std::string Sendfile; // Path & Name (local os style) of file to send bool keep_alive; - + // Input CStringList ParamList; // local copy of ParamList (Request) CStringList UrlData; // local copy of UrlData (Request) @@ -132,17 +132,17 @@ public: // constructor & deconstructor CyhookHandler(){}; virtual ~CyhookHandler(){}; - + // hook slot handler static void attach(Cyhook *yh) // attach a Hook-Class to HookHandler {HookList.push_back(yh);}; static void detach(Cyhook *yh) // detach a Hook-Class to HookHandler {HookList.remove(yh);}; - + // session handling - void session_init(CStringList _ParamList, CStringList _UrlData, CStringList _HeaderList, + void session_init(CStringList _ParamList, CStringList _UrlData, CStringList _HeaderList, CStringList& _ConfigList, THttp_Method _Method, bool _keep_alive); - + // Cyhttpd based hooks static THandleStatus Hooks_ReadConfig(CConfigFile *Config, CStringList &ConfigList); // CWebserverConnection based hooks @@ -152,7 +152,7 @@ public: THandleStatus Hooks_UploadSetFilename(std::string &Filename); THandleStatus Hooks_UploadReady(const std::string& Filename); - // status handling + // status handling void SetHeader(HttpResponseType _httpStatus, std::string _ResponseMimeType) {httpStatus = _httpStatus; ResponseMimeType = _ResponseMimeType;} void SetHeader(HttpResponseType _httpStatus, std::string _ResponseMimeType, THandleStatus _status) @@ -167,11 +167,11 @@ public: // output methods std::string BuildHeader(bool cache = false); void addResult(const std::string& result) {yresult += result;} - void addResult(const std::string& result, THandleStatus _status) + void addResult(const std::string& result, THandleStatus _status) {yresult += result; status = _status;} void printf(const char *fmt, ...); void Write(const std::string& text) { addResult(text); } - void WriteLn(const std::string& text) { addResult(text+"\r\n"); } + void WriteLn(const std::string& text) { addResult(text+"\r\n"); } void Write(char const *text) {Write(std::string(text));} void WriteLn(char const *text) {WriteLn(std::string(text));} void SendHTMLHeader(const std::string& Titel); diff --git a/src/nhttpd/yhttpd_mods/mod_cache.cpp b/src/nhttpd/yhttpd_mods/mod_cache.cpp index 010fbda68..fac706d02 100644 --- a/src/nhttpd/yhttpd_mods/mod_cache.cpp +++ b/src/nhttpd/yhttpd_mods/mod_cache.cpp @@ -32,7 +32,7 @@ THandleStatus CmodCache::Hook_PrepareResponse(CyhookHandler *hh) { hh->status = HANDLED_NONE; - log_level_printf(4,"mod_cache prepare hook start url:%s\n",hh->UrlData["fullurl"].c_str()); + log_level_printf(4,"mod_cache prepare hook start url:%s\n",hh->UrlData["fullurl"].c_str()); std::string url = hh->UrlData["fullurl"]; if(CacheList.find(url) != CacheList.end()) // is in Cache. Rewrite URL or not modified { @@ -45,7 +45,7 @@ THandleStatus CmodCache::Hook_PrepareResponse(CyhookHandler *hh) struct tm mod; if(strptime(hh->HeaderList["If-Modified-Since"].c_str(), RFC1123FMT, &mod) != NULL) { - mod.tm_isdst = 0; // daylight saving flag! + mod.tm_isdst = 0; // daylight saving flag! if_modified_since = mktime(&mod); // Date given } } @@ -65,8 +65,8 @@ THandleStatus CmodCache::Hook_PrepareResponse(CyhookHandler *hh) hh->SetHeader(HTTP_NOT_MODIFIED, CacheList[url].mime_type, HANDLED_READY); pthread_mutex_unlock(&mutex); } - log_level_printf(4,"mod_cache hook prepare end status:%d\n",(int)hh->status); - + log_level_printf(4,"mod_cache hook prepare end status:%d\n",(int)hh->status); + return hh->status; } //----------------------------------------------------------------------------- @@ -79,7 +79,7 @@ THandleStatus CmodCache::Hook_SendResponse(CyhookHandler *hh) { hh->status = HANDLED_NONE; std::string url = hh->UrlData["fullurl"]; - log_level_printf(4,"mod_cache hook start url:%s\n",url.c_str()); + log_level_printf(4,"mod_cache hook start url:%s\n",url.c_str()); std::string category = hh->HookVarList["CacheCategory"]; if(!(hh->HookVarList["CacheCategory"]).empty()) // Category set = cache it @@ -99,13 +99,13 @@ THandleStatus CmodCache::Hook_SendResponse(CyhookHandler *hh) else hh->status = HANDLED_CONTINUE; // y-calls can be implemented anywhere } - log_level_printf(4,"mod_cache hook end status:%d\n",(int)hh->status); - + log_level_printf(4,"mod_cache hook end status:%d\n",(int)hh->status); + return hh->status; } //----------------------------------------------------------------------------- -// HOOK: Hook_ReadConfig +// HOOK: Hook_ReadConfig // This hook ist called from ReadConfig //----------------------------------------------------------------------------- THandleStatus CmodCache::Hook_ReadConfig(CConfigFile *Config, CStringList &ConfigList) @@ -118,10 +118,10 @@ THandleStatus CmodCache::Hook_ReadConfig(CConfigFile *Config, CStringList &Confi //------------------------------------------------------------------------- // Build and Add a cache item //------------------------------------------------------------------------- -void CmodCache::AddToCache(CyhookHandler *hh, std::string url, std::string content, std::string mime_type, std::string category) +void CmodCache::AddToCache(CyhookHandler */*hh*/, std::string url, std::string content, std::string mime_type, std::string category) { FILE *fd = NULL; - pthread_mutex_lock(&mutex); + pthread_mutex_lock(&mutex); std::string filename = cache_directory + "/" + itoa(CacheList.size()); // build cache filename mkdir(cache_directory.c_str(), 0777); // Create Cache directory if((fd = fopen(filename.c_str(),"w")) != NULL) // open file @@ -157,7 +157,7 @@ void CmodCache::RemoveURLFromCache(std::string url) void CmodCache::RemoveCategoryFromCache(std::string category) { pthread_mutex_lock(&mutex); - bool restart = false; + bool restart = false; do { restart = false; @@ -203,8 +203,8 @@ void CmodCache::yshowCacheInfo(CyhookHandler *hh) // cache list yresult += string_printf("\n"); - yresult += string_printf("\n"); - pthread_mutex_lock(&mutex); + yresult += string_printf("\n"); + pthread_mutex_lock(&mutex); TCacheList::iterator i = CacheList.begin(); for ( ; i!= CacheList.end(); i++ ) { @@ -213,14 +213,14 @@ void CmodCache::yshowCacheInfo(CyhookHandler *hh) strftime(timeStr, sizeof(timeStr), RFC1123FMT, gmtime(&(item->created)) ); yresult += string_printf("" \ "\n", - ((*i).first).c_str(), + "category\n", + ((*i).first).c_str(), item->mime_type.c_str(), item->filename.c_str(), item->category.c_str(), timeStr, - ((*i).first).c_str(), - item->category.c_str() + ((*i).first).c_str(), + item->category.c_str() ); } pthread_mutex_unlock(&mutex); // Free @@ -253,6 +253,6 @@ void CmodCache::yCacheClear(CyhookHandler *hh) hh->SendHTMLHeader("Cache deletion"); hh->WriteLn(result); hh->SendHTMLFooter(); - + } diff --git a/src/nhttpd/yhttpd_mods/mod_sendfile.cpp b/src/nhttpd/yhttpd_mods/mod_sendfile.cpp index d355f4634..897b3678e 100644 --- a/src/nhttpd/yhttpd_mods/mod_sendfile.cpp +++ b/src/nhttpd/yhttpd_mods/mod_sendfile.cpp @@ -36,8 +36,8 @@ // c) If the variant has not been modified since a valid If- // Modified-Since date, the server SHOULD return a 304 (Not // Modified) response. -// -// yjogol: ASSUMPTION Date-Format is ONLY RFC 1123 compatible! +// +// yjogol: ASSUMPTION Date-Format is ONLY RFC 1123 compatible! //============================================================================= // system @@ -69,14 +69,14 @@ THandleStatus CmodSendfile::Hook_PrepareResponse(CyhookHandler *hh) hh->status = HANDLED_NONE; int filed; - log_level_printf(4,"mod_sendfile prepare hook start url:%s\n",hh->UrlData["fullurl"].c_str()); + log_level_printf(4,"mod_sendfile prepare hook start url:%s\n",hh->UrlData["fullurl"].c_str()); std::string mime = sendfileTypes[hh->UrlData["fileext"]]; if(mime != "") { //TODO: Check allowed directories / actually in GetFileName // build filename std::string fullfilename = GetFileName(hh, hh->UrlData["path"], hh->UrlData["filename"]); - + if( (filed = OpenFile(hh, fullfilename) ) != -1 ) //can access file? { struct stat statbuf; @@ -98,16 +98,16 @@ THandleStatus CmodSendfile::Hook_PrepareResponse(CyhookHandler *hh) struct tm mod; if(strptime(hh->HeaderList["If-Modified-Since"].c_str(), RFC1123FMT, &mod) != NULL) { - mod.tm_isdst = 0; // daylight saving flag! + mod.tm_isdst = 0; // daylight saving flag! if_modified_since = mktime(&mod); } } - + // normalize obj_last_modified to GMT struct tm *tmp = gmtime(&(hh->LastModified)); time_t LastModifiedGMT = mktime(tmp); bool modified = (if_modified_since == (time_t)-1) || (if_modified_since < LastModifiedGMT); - + // Send normal or not-modified header if(modified) { @@ -123,13 +123,13 @@ THandleStatus CmodSendfile::Hook_PrepareResponse(CyhookHandler *hh) hh->SetError(HTTP_NOT_FOUND); } } - log_level_printf(4,"mod_sendfile prepare hook end status:%d\n",(int)hh->status); - + log_level_printf(4,"mod_sendfile prepare hook end status:%d\n",(int)hh->status); + return hh->status; } //----------------------------------------------------------------------------- -// HOOK: Hook_ReadConfig +// HOOK: Hook_ReadConfig // This hook ist called from ReadConfig //----------------------------------------------------------------------------- THandleStatus CmodSendfile::Hook_ReadConfig(CConfigFile *Config, CStringList &ConfigList) @@ -182,7 +182,7 @@ std::string CmodSendfile::GetFileName(CyhookHandler *hh, std::string path, std:: //----------------------------------------------------------------------------- // Send File: Open File and check file type //----------------------------------------------------------------------------- -int CmodSendfile::OpenFile(CyhookHandler *hh, std::string fullfilename) +int CmodSendfile::OpenFile(CyhookHandler */*hh*/, std::string fullfilename) { int fd= -1; std::string tmpstring; @@ -209,6 +209,6 @@ std::string CmodSendfile::GetContentType(std::string ext) { ctype = MimeFileExtensions[i].mime; break; - } + } return ctype; } diff --git a/src/nhttpd/yhttpd_mods/mod_weblog.cpp b/src/nhttpd/yhttpd_mods/mod_weblog.cpp index 05fe685ff..58f696ed8 100644 --- a/src/nhttpd/yhttpd_mods/mod_weblog.cpp +++ b/src/nhttpd/yhttpd_mods/mod_weblog.cpp @@ -54,10 +54,10 @@ THandleStatus CmWebLog::Hook_EndConnection(CyhookHandler *hh) } //----------------------------------------------------------------------------- -// HOOK: Hook_ReadConfig +// HOOK: Hook_ReadConfig // This hook ist called from ReadConfig //----------------------------------------------------------------------------- -THandleStatus CmWebLog::Hook_ReadConfig(CConfigFile *Config, CStringList &ConfigList) +THandleStatus CmWebLog::Hook_ReadConfig(CConfigFile *Config, CStringList &/*ConfigList*/) { LogFormat = Config->getString("mod_weblog.log_format", LOG_FORMAT); WebLogFilename = Config->getString("mod_weblog.logfile", LOG_FILE); @@ -126,18 +126,18 @@ bool CmWebLog::printf(const char *fmt, ...) //----------------------------------------------------------------------------- // CLF - Common Logfile Format // -// Example: 127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 +// Example: 127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 // -// The common logfile format is as follows: +// The common logfile format is as follows: // remotehost rfc931 authuser [date] "request" status bytes // -// remotehost: Remote hostname (or IP number if DNS hostname is not available, or if DNSLookup is Off. -// rfc931: The remote logname of the user. -// authuser: The username as which the user has authenticated himself. -// [date]: Date and time of the request. -// "request": The request line exactly as it came from the client. -// status: The HTTP status code returned to the client. -// bytes: The content-length of the document transferred. +// remotehost: Remote hostname (or IP number if DNS hostname is not available, or if DNSLookup is Off. +// rfc931: The remote logname of the user. +// authuser: The username as which the user has authenticated himself. +// [date]: Date and time of the request. +// "request": The request line exactly as it came from the client. +// status: The HTTP status code returned to the client. +// bytes: The content-length of the document transferred. //----------------------------------------------------------------------------- void CmWebLog::AddLogEntry_CLF(CyhookHandler *hh) { @@ -156,67 +156,67 @@ void CmWebLog::AddLogEntry_CLF(CyhookHandler *hh) std::string request_startline = hh->UrlData["startline"].c_str(); int s_status = hh->httpStatus; int bytes = hh->GetContentLength(); - + struct tm *time_now; time_t now = time(NULL); char request_time[80]; time_now = localtime(&now); strftime(request_time, 80, "[%d/%b/%Y:%H:%M:%S]", time_now); - - printf("%s - - %s \"%s\" %d %d\n", + + printf("%s - - %s \"%s\" %d %d\n", c_ip.c_str(), request_time, request_startline.c_str(), s_status, bytes); -} +} //----------------------------------------------------------------------------- /* Definition: (ELF) Extended Log File Format W3C Working Draft WD-logfile-960323 (http://www.w3.org/pub/WWW/TR/WD-logfile-960323.html) - An extended log file contains a sequence of lines containing ASCII - characters terminated by either the sequence LF or CRLF. - Log file generators should follow the line termination convention for - the platform on which they are executed. Analyzers should accept either form. - Each line may contain either a directive or an entry. - - Entries consist of a sequence of fields relating to a single HTTP - transaction. Fields are separated by whitespace, the use of tab characters - for this purpose is encouraged. If a field is unused in a particular - entry dash "-" marks the omitted field. Directives record information about - the logging process itself. - - Lines beginning with the # character contain directives. - The following directives are defined: - - - Version: . - The version of the extended log file format used. - This draft defines version 1.0. - - Fields: [...] - Specifies the fields recorded in the log. - - Software: string - Identifies the software which generated the log. - - Start-Date:
URLMimeFilenameCategoryCreatedRemove
URLMimeFilenameCategoryCreatedRemove
%s%s%s%s%surl " \ - "category