You can subscribe to this list here.
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
(8) |
Feb
(6) |
Mar
(5) |
Apr
(7) |
May
(3) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(2) |
Nov
(8) |
Dec
(2) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(3) |
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(4) |
Nov
(5) |
Dec
(1) |
2015 |
Jan
|
Feb
(6) |
Mar
(24) |
Apr
(29) |
May
(43) |
Jun
(17) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: GetAway <tux...@ne...> - 2015-07-02 20:28:31
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 9238e6a29abd4d55c50e21fefab0dc6a779625c1 (commit) from a1e4044f02243c233e6302c39420da0015672b87 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9238e6a29abd4d55c50e21fefab0dc6a779625c1 Author: GetAway <get...@t-...> Date: Thu Jul 2 22:27:39 2015 +0200 basicsocket: fix poll Signed-off-by: GetAway <get...@t-...> diff --git a/misc/libs/libconnection/basicserver.cpp b/misc/libs/libconnection/basicserver.cpp index 7d5a0c7..f892d24 100644 --- a/misc/libs/libconnection/basicserver.cpp +++ b/misc/libs/libconnection/basicserver.cpp @@ -36,8 +36,8 @@ #include <sys/un.h> #include <unistd.h> -#define RECEIVE_TIMEOUT_IN_SECONDS 5 -#define SEND_TIMEOUT_IN_SECONDS 5 +#define RECEIVE_TIMEOUT_IN_SECONDS 60 +#define SEND_TIMEOUT_IN_SECONDS 60 bool CBasicServer::receive_data(int fd, void * data, const size_t size) { diff --git a/misc/libs/libconnection/basicsocket.cpp b/misc/libs/libconnection/basicsocket.cpp index cf69656..b6b282d 100644 --- a/misc/libs/libconnection/basicsocket.cpp +++ b/misc/libs/libconnection/basicsocket.cpp @@ -29,22 +29,24 @@ #include <stdio.h> #include <sys/socket.h> #include <sys/types.h> +#include <unistd.h> #include <poll.h> bool send_data(int fd, const void * data, const size_t size, const timeval timeout) { - char *buffer = (char *)data; size_t left = size; while (left > 0) { + const void * buffer = (void *)((char *)data + (size - left)); int len = ::send(fd, buffer, left, MSG_DONTWAIT | MSG_NOSIGNAL); - if (len < 0) + if (len == -1) { - perror("[basicsocket] send_data"); - - if (errno != EINTR && errno != EAGAIN) + int olderr = errno; + if (errno != EAGAIN) // this is "write would block...", which is not an error + fprintf(stderr,"[basicsocket] send_data: %m (n = %d/%d, pid = %d)\n", left, size, getpid()); + if (olderr == EPIPE || olderr == ESPIPE) return false; struct pollfd pfd; @@ -59,7 +61,7 @@ bool send_data(int fd, const void * data, const size_t size, const timeval timeo printf("[basicsocket] send timed out.\n"); return false; } - if (rc < 0) + if (rc == -1) { perror("[basicsocket] send_data poll"); return false; @@ -71,10 +73,7 @@ bool send_data(int fd, const void * data, const size_t size, const timeval timeo } } else - { - buffer += len; left -= len; - } } return true; } @@ -82,7 +81,6 @@ bool send_data(int fd, const void * data, const size_t size, const timeval timeo bool receive_data(int fd, void * data, const size_t size, const timeval timeout) { - char *buffer = (char *)data; size_t left = size; while (left > 0) @@ -92,45 +90,48 @@ bool receive_data(int fd, void * data, const size_t size, const timeval timeout) pfd.events = POLLIN; pfd.revents = 0; - int to = timeout.tv_sec * 1000 + timeout.tv_usec / 1000; - - int rc = poll(&pfd, 1, to); + int rc = poll(&pfd, 1, timeout.tv_sec * 1000 + timeout.tv_usec / 1000); if (rc == 0) { - printf("[basicsocket] recv timed out.\n"); + printf("[basicsocket] receive timed out. waiting process %d\n", getpid()); return false; } - if (rc < 0) + if (rc == -1) { perror("[basicsocket] recv_data poll"); return false; } if (!(pfd.revents & POLLIN)) { - perror("[basicsocket] recv_data POLLIN"); + perror("[basicsocket] receive_data POLLIN"); return false; } - int len = ::recv(fd, data, left, MSG_DONTWAIT | MSG_NOSIGNAL); + void * buffer = (void *)((char *)data + (size - left)); + int len = ::recv(fd, buffer, left, MSG_DONTWAIT | MSG_NOSIGNAL); - if (len > 0) { - left -= len; - buffer += len; - } else if (len < 0) + if ((len == 0) || (len == -1)) { - perror("[basicsocket] receive_data"); - if (errno != EINTR && errno != EAGAIN) + if (len == -1) + { + perror("[basicsocket] receive_data"); + + if (errno == EPIPE || errno == ESPIPE) + return false; + } + else + { + /* + * silently return false + * + * printf("[basicsocket] no more data\n"); + */ return false; + } + } - else // len == 0 - { - /* - * silently return false - * - * printf("[basicsocket] no more data\n"); - */ - return false; - } + else + left -= len; } return true; } ----------------------------------------------------------------------- Summary of changes: misc/libs/libconnection/basicserver.cpp | 4 +- misc/libs/libconnection/basicsocket.cpp | 65 ++++++++++++++++--------------- 2 files changed, 35 insertions(+), 34 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-07-02 14:45:43
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via a1e4044f02243c233e6302c39420da0015672b87 (commit) via 58753d2c58c94538b8249b38825fa1dc3b4b592e (commit) from 7354b4358507932405ff6a297fc2f2b74e04119b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a1e4044f02243c233e6302c39420da0015672b87 Author: striper <striper@e54a6e83-5905-42d5-8d5c-058d10e6a962> Date: Thu Jul 2 16:45:03 2015 +0200 extend debug output Signed-off-by: GetAway <get...@t-...> diff --git a/misc/libs/libconnection/basicserver.cpp b/misc/libs/libconnection/basicserver.cpp index dcfc38b..7d5a0c7 100644 --- a/misc/libs/libconnection/basicserver.cpp +++ b/misc/libs/libconnection/basicserver.cpp @@ -135,7 +135,8 @@ bool CBasicServer::parse(bool (parse_command)(CBasicMessage::Header &rmsg, int c if (rmsg.version == version) parse_another_command = parse_command(rmsg, conn_fd); else - printf("[%s] Command ignored: cmd version %d received - server cmd version is %d\n", name.c_str(), rmsg.version, version); + printf("[%s] Command ignored: cmd %x version %d received - server cmd version is %d\n", name.c_str(), rmsg.cmd, rmsg.version, version); + close(conn_fd); commit 58753d2c58c94538b8249b38825fa1dc3b4b592e Author: GetAway <get...@t-...> Date: Thu Jul 2 16:22:42 2015 +0200 fix casting Signed-off-by: GetAway <get...@t-...> diff --git a/misc/libs/libconnection/messagetools.cpp b/misc/libs/libconnection/messagetools.cpp index cf140aa..66b2d54 100644 --- a/misc/libs/libconnection/messagetools.cpp +++ b/misc/libs/libconnection/messagetools.cpp @@ -27,7 +27,7 @@ size_t write_length_field (unsigned char * buffer, unsigned int length) { if (length < 128) { - buffer[0] = length; + buffer[0] = static_cast<unsigned char>(length); return 1; } else @@ -47,7 +47,7 @@ size_t write_length_field (unsigned char * buffer, unsigned int length) while (shiftby != 0) { shiftby -= 8; - buffer[pos++] = length >> shiftby; + buffer[pos++] = static_cast<unsigned char>(length >> shiftby); } return pos; } @@ -66,7 +66,7 @@ unsigned int parse_length_field (const unsigned char * buffer) else if (size_indicator == 1) { - unsigned char length_field_size = buffer[0] & 0x7F; + unsigned char length_field_size = static_cast<unsigned char>(buffer[0] & 0x7F); unsigned int i; for (i = 0; i < length_field_size; i++) ----------------------------------------------------------------------- Summary of changes: misc/libs/libconnection/basicserver.cpp | 3 ++- misc/libs/libconnection/messagetools.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-18 13:55:19
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 7354b4358507932405ff6a297fc2f2b74e04119b (commit) from 44d20e94dd472e749809105d6f0a0aa3038292e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7354b4358507932405ff6a297fc2f2b74e04119b Author: GetAway <get...@t-...> Date: Thu Jun 18 15:54:42 2015 +0200 yWeb: fix translation Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Tools_Boxcontrol.yhtm b/tuxbox/neutrino/daemons/nhttpd/web/Y_Tools_Boxcontrol.yhtm index b3e1d51..7dc8961 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Tools_Boxcontrol.yhtm +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Tools_Boxcontrol.yhtm @@ -28,8 +28,8 @@ function goUrl(_url){ <tr><td class="y_form_header">{=L:0406=}</td><td class="y_form_header">{=L:0403=}</td></tr> <tr> <td> - <input type="button" value="{=L:0412=}" onclick='goConfirmUrl("{=bc.control.reboot.ask=}","/control/reboot");' /> - <input type="button" value="{=L:0414=}" onclick='goConfirmUrl("{=bc.control.shutdown.ask=}","/control/shutdown");' /> + <input type="button" value="{=L:0412=}" onclick='goConfirmUrl("{=L:0411=}","/control/reboot");' /> + <input type="button" value="{=L:0414=}" onclick='goConfirmUrl("{=L:0413=}","/control/shutdown");' /> </td> <td> <input type="button" value="{=L:0031=}" onclick='goUrl("/control/standby?on");' /> diff --git a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt index 3938606..5fd09fb 100644 --- a/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt +++ b/tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt @@ -1,4 +1,4 @@ -version=2.8.3.01 -date=14.05.2015 +version=2.8.3.02 +date=18.06.2015 type=Release info=Tuxbox ----------------------------------------------------------------------- Summary of changes: .../daemons/nhttpd/web/Y_Tools_Boxcontrol.yhtm | 4 ++-- tuxbox/neutrino/daemons/nhttpd/web/Y_Version.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-17 14:03:15
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 44d20e94dd472e749809105d6f0a0aa3038292e1 (commit) from d936ee9b40bbca32cbf577af8b8257ae0fe7beb3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 44d20e94dd472e749809105d6f0a0aa3038292e1 Author: GetAway <get...@t-...> Date: Wed Jun 17 16:02:32 2015 +0200 sectionsd: move adjtime back to rcinput cuz sometime the infobar freezed at startup, when there is a time jump. So it works not as expected and I revert it. Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp index 24a8cdc..30fc113 100644 --- a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp @@ -83,7 +83,7 @@ #include "SIsections.hpp" #include "SIlanguage.hpp" -#define SECTIONSD_VERSION "1.349" +#define SECTIONSD_VERSION "1.350" // 60 Minuten Zyklus... #define TIME_EIT_SCHEDULED_PAUSE 60 * 60 @@ -170,7 +170,6 @@ static long secondsExtendedTextCache; //static long oldEventsAre = 60*60L; // 2h (sometimes want to know something about current/last movie) static long oldEventsAre; static int scanning = 1; -static long long timediff; std::string epg_filter_dir = "/var/tuxbox/config/zapit/epgfilter.xml"; static bool epg_filter_is_whitelist = false; @@ -6823,47 +6822,6 @@ static void parseDescriptors(const char *des, unsigned len, const char *countryC } */ -static void setSystemTime(time_t tim) -{ - struct timeval tv; - struct tm t; - time_t now = time(NULL); - struct tm *tmTime = localtime_r(&now, &t); - - gettimeofday(&tv, NULL); - timediff = (long long)(tim * 1000000 - (tv.tv_usec + tv.tv_sec * 1000000)); - char tbuf[26]; - ctime_r(&tim, tbuf); - xprintf("[%sThread] timediff %lld, current: %02d.%02d.%04d %02d:%02d:%02d, dvb: %s", "time", timediff, - tmTime->tm_mday, tmTime->tm_mon+1, tmTime->tm_year+1900, - tmTime->tm_hour, tmTime->tm_min, tmTime->tm_sec, tbuf); - - - if (timediff == 0) /* very unlikely... :-) */ - return; - - time_t diff_time = tim - tv.tv_sec; - if (timeset && abs(diff_time) < 120) { /* abs() is int */ - struct timeval oldd; - tv.tv_sec = time_t(timediff / 1000000LL); - tv.tv_usec = suseconds_t(timediff % 1000000LL); - if (adjtime(&tv, &oldd)) - xprintf("adjtime(%d, %d) failed: %m\n", (int)tv.tv_sec, (int)tv.tv_usec); - else { - xprintf("difference is < 120s (%lds), using adjtime(%d, %d). oldd(%d, %d)\n", diff_time, - (int)tv.tv_sec, (int)tv.tv_usec, (int)oldd.tv_sec, (int)oldd.tv_usec); - timediff = 0; - return; - } - } - - if (timeset) - xprintf("[%sThread] difference is %lds, stepping...\n", "time", diff_time); - tv.tv_sec = tim; - tv.tv_usec = 0; - if (settimeofday(&tv, NULL) < 0) - perror("[sectionsd] settimeofday"); -} static void setTimeSet(void) { @@ -6873,13 +6831,6 @@ static void setTimeSet(void) pthread_mutex_unlock(&timeIsSetMutex ); } -static void sendTimeEvent(void) -{ - if (timediff) - eventServer->sendEvent(CSectionsdClient::EVT_TIMESET, CEventServer::INITID_SECTIONSD, &timediff, sizeof(timediff)); - setTimeSet(); -} - static void *timeThread(void *) { UTC_t UTC; @@ -6890,6 +6841,7 @@ static void *timeThread(void *) struct timeval now; bool time_ntp = false; bool success = true; + long long timediff; try { @@ -6900,18 +6852,26 @@ static void *timeThread(void *) while(1) { + timediff = 0; if (bTimeCorrect == true){ // sectionsd started with parameter "-tc" if (first_time == true) { // only do this once! - sendTimeEvent(); + time_t actTime; + actTime=time(NULL); + setTimeSet(); + eventServer->sendEvent(CSectionsdClient::EVT_TIMESET, CEventServer::INITID_SECTIONSD, &actTime, sizeof(actTime) ); printf("[timeThread] Time is already set by system, no further timeThread work!\n"); break; } } + else if ( ntpenable && system( ntp_system_cmd.c_str() ) == 0) { + time_t actTime; + actTime=time(NULL); first_time = false; time_ntp = true; - sendTimeEvent(); + setTimeSet(); + eventServer->sendEvent(CSectionsdClient::EVT_TIMESET, CEventServer::INITID_SECTIONSD, &actTime, sizeof(actTime) ); } else if (scanning && dvb_time_update) { @@ -6932,9 +6892,19 @@ static void *timeThread(void *) } } } - setSystemTime(tim); + + struct tm tmTime; + time_t actTime = time(NULL); + localtime_r(&actTime, &tmTime); + struct timeval lt; + gettimeofday(<, NULL); + timediff = (long long)tim * 1000000LL - (lt.tv_usec + lt.tv_sec * 1000000LL); + char tbuf[26]; + ctime_r(&tim, tbuf); + xprintf("[%sThread] timediff %lld, current: %02d.%02d.%04d %02d:%02d:%02d, dvb: %s", "time", timediff, tmTime.tm_mday, tmTime.tm_mon+1, tmTime.tm_year+1900, tmTime.tm_hour, tmTime.tm_min, tmTime.tm_sec, tbuf); time_ntp= false; - sendTimeEvent(); + setTimeSet(); + eventServer->sendEvent(CSectionsdClient::EVT_TIMESET, CEventServer::INITID_SECTIONSD, &tim, sizeof(tim)); } } diff --git a/tuxbox/neutrino/src/driver/rcinput.cpp b/tuxbox/neutrino/src/driver/rcinput.cpp index acf2bf9..540a3a3 100644 --- a/tuxbox/neutrino/src/driver/rcinput.cpp +++ b/tuxbox/neutrino/src/driver/rcinput.cpp @@ -1311,7 +1311,6 @@ void CRCInput::getMsg_us(neutrino_msg_t *msg, neutrino_msg_data_t *data, unsigne { case CSectionsdClient::EVT_TIMESET: { -#if 0 gettimeofday(&tv, NULL); long long timeOld = tv.tv_usec + tv.tv_sec * 1000000LL; long long timediff; @@ -1337,7 +1336,7 @@ void CRCInput::getMsg_us(neutrino_msg_t *msg, neutrino_msg_data_t *data, unsigne tv.tv_usec = timediff % 1000000LL; if (adjtime(&tv, &oldd)) perror("adjtime"); - printf("difference is %ld s (< 120s), using adjtime(%d, %d). oldd(%d, %d)\n", diff_time, + printf("difference is < 120s (%lds), using adjtime(%d, %d). oldd(%d, %d)\n", diff_time, (int)tv.tv_sec, (int)tv.tv_usec, (int)oldd.tv_sec, (int)oldd.tv_usec); } else @@ -1350,17 +1349,15 @@ void CRCInput::getMsg_us(neutrino_msg_t *msg, neutrino_msg_data_t *data, unsigne delete [] p; p = new unsigned char[sizeof(long long)]; *(long long*) p = timeNew - timeOld; -#endif - printf("[neutrino] CSectionsdClient::EVT_TIMESET: timediff %lld \n", *(long long*) p); - /* FIXME what this code really do ? */ + if ((long long)last_keypress > *(long long*)p) last_keypress += *(long long *)p; -#if 0 // Timer anpassen + // Timer anpassen for (std::vector<timer>::iterator e = timers.begin(); e != timers.end(); ++e) if (e->correct_time) e->times_out += *(long long*) p; -#endif + *msg = NeutrinoMessages::EVT_TIMESET; *data = (neutrino_msg_data_t) p; dont_delete_p = true; ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp | 78 +++++++---------------- tuxbox/neutrino/src/driver/rcinput.cpp | 11 +-- 2 files changed, 28 insertions(+), 61 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-16 17:49:14
|
Project "Tuxbox-GIT: hostapps": The branch, master has been updated via ad437c4aff75065b686702ec46fe153e4ae1f038 (commit) from ed90b09ee12f201b666c883cb01b55953e39ae51 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ad437c4aff75065b686702ec46fe153e4ae1f038 Author: GetAway <get...@t-...> Date: Tue Jun 16 19:34:32 2015 +0200 revert -> mkflfs: miniLZO update to version 2.09 u-boot does not work correctly when create a flashimage. Signed-off-by: GetAway <get...@t-...> diff --git a/mkflfs/README.LZO b/mkflfs/README.LZO deleted file mode 100644 index b82d13b..0000000 --- a/mkflfs/README.LZO +++ /dev/null @@ -1,123 +0,0 @@ - - ============================================================================ - miniLZO -- mini subset of the LZO real-time data compression library - ============================================================================ - - Author : Markus Franz Xaver Johannes Oberhumer - <ma...@ob...> - http://www.oberhumer.com/opensource/lzo/ - Version : 2.09 - Date : 04 Feb 2015 - - I've created miniLZO for projects where it is inconvenient to - include (or require) the full LZO source code just because you - want to add a little bit of data compression to your application. - - miniLZO implements the LZO1X-1 compressor and both the standard and - safe LZO1X decompressor. Apart from fast compression it also useful - for situations where you want to use pre-compressed data files (which - must have been compressed with LZO1X-999). - - miniLZO consists of one C source file and three header files: - minilzo.c - minilzo.h, lzoconf.h, lzodefs.h - - To use miniLZO just copy these files into your source directory, add - minilzo.c to your Makefile and #include minilzo.h from your program. - Note: you also must distribute this file ('README.LZO') with your project. - - minilzo.o compiles to about 6 KiB (using gcc or Visual C on an i386), and - the sources are about 30 KiB when packed with zip - so there's no more - excuse that your application doesn't support data compression :-) - - For more information, documentation, example programs and other support - files (like Makefiles and build scripts) please download the full LZO - package from - http://www.oberhumer.com/opensource/lzo/ - - Have fun, - Markus - - - P.S. minilzo.c is generated automatically from the LZO sources and - therefore functionality is completely identical - - - Appendix A: building miniLZO - ---------------------------- - miniLZO is written such a way that it should compile and run - out-of-the-box on most machines. - - If you are running on a very unusual architecture and lzo_init() fails then - you should first recompile with '-DLZO_DEBUG' to see what causes the failure. - The most probable case is something like 'sizeof(void *) != sizeof(size_t)'. - After identifying the problem you can compile by adding some defines - like '-DSIZEOF_VOID_P=8' to your Makefile. - - The best solution is (of course) using Autoconf - if your project uses - Autoconf anyway just add '-DMINILZO_HAVE_CONFIG_H' to your compiler - flags when compiling minilzo.c. See the LZO distribution for an example - how to set up configure.ac. - - - Appendix B: list of public functions available in miniLZO - --------------------------------------------------------- - Library initialization - lzo_init() - - Compression - lzo1x_1_compress() - - Decompression - lzo1x_decompress() - lzo1x_decompress_safe() - - Checksum functions - lzo_adler32() - - Version functions - lzo_version() - lzo_version_string() - lzo_version_date() - - Portable (but slow) string functions - lzo_memcmp() - lzo_memcpy() - lzo_memmove() - lzo_memset() - - - Appendix C: suggested macros for 'configure.ac' when using Autoconf - ------------------------------------------------------------------- - Checks for typedefs and structures - AC_CHECK_TYPE(ptrdiff_t,long) - AC_TYPE_SIZE_T - AC_CHECK_SIZEOF(short) - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(long long) - AC_CHECK_SIZEOF(__int64) - AC_CHECK_SIZEOF(void *) - AC_CHECK_SIZEOF(size_t) - AC_CHECK_SIZEOF(ptrdiff_t) - - Checks for compiler characteristics - AC_C_CONST - - Checks for library functions - AC_CHECK_FUNCS(memcmp memcpy memmove memset) - - - Appendix D: Copyright - --------------------- - LZO and miniLZO are Copyright (C) 1996-2015 Markus Franz Xaver Oberhumer - All Rights Reserved. - - LZO and miniLZO are distributed under the terms of the GNU General - Public License (GPL). See the file COPYING. - - Special licenses for commercial and other applications which - are not willing to accept the GNU General Public License - are available by contacting the author. - - diff --git a/mkflfs/lzoconf.h b/mkflfs/lzoconf.h index 64ef279..6120f62 100644 --- a/mkflfs/lzoconf.h +++ b/mkflfs/lzoconf.h @@ -1,9 +1,12 @@ -/* lzoconf.h -- configuration of the LZO data compression library +/* lzoconf.h -- configuration for the LZO real-time data compression library This file is part of the LZO real-time data compression library. - Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. + Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer The LZO library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -18,27 +21,30 @@ You should have received a copy of the GNU General Public License along with the LZO library; see the file COPYING. If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Markus F.X.J. Oberhumer - <ma...@ob...> - http://www.oberhumer.com/opensource/lzo/ + <mar...@jk...> + http://wildsau.idv.uni-linz.ac.at/mfx/lzo.html */ -#ifndef __LZOCONF_H_INCLUDED -#define __LZOCONF_H_INCLUDED 1 +#ifndef __LZOCONF_H +#define __LZOCONF_H -#define LZO_VERSION 0x2090 -#define LZO_VERSION_STRING "2.09" -#define LZO_VERSION_DATE "Feb 04 2015" +#define LZO_VERSION 0x1070 +#define LZO_VERSION_STRING "1.07" +#define LZO_VERSION_DATE "Oct 18 2000" /* internal Autoconf configuration file - only used when building LZO */ #if defined(LZO_HAVE_CONFIG_H) # include <config.h> #endif #include <limits.h> -#include <stddef.h> + +#ifdef __cplusplus +extern "C" { +#endif /*********************************************************************** @@ -48,38 +54,78 @@ #if !defined(CHAR_BIT) || (CHAR_BIT != 8) # error "invalid CHAR_BIT" #endif -#if !defined(UCHAR_MAX) || !defined(USHRT_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) +#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) # error "check your compiler installation" #endif #if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) # error "your limits.h macros are broken" #endif -/* get OS and architecture defines */ -#ifndef __LZODEFS_H_INCLUDED -#include <lzo/lzodefs.h> -#endif +/* workaround a cpp bug under hpux 10.20 */ +#define LZO_0xffffffffL 4294967295ul -#ifdef __cplusplus -extern "C" { +/*********************************************************************** +// architecture defines +************************************************************************/ + +#if !defined(__LZO_WIN) && !defined(__LZO_DOS) && !defined(__LZO_OS2) +# if defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +# define __LZO_WIN +# elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) +# define __LZO_WIN +# elif defined(__NT__) || defined(__NT_DLL__) || defined(__WINDOWS_386__) +# define __LZO_WIN +# elif defined(__DOS__) || defined(__MSDOS__) || defined(MSDOS) +# define __LZO_DOS +# elif defined(__OS2__) || defined(__OS2V2__) || defined(OS2) +# define __LZO_OS2 +# elif defined(__palmos__) +# define __LZO_PALMOS +# elif defined(__TOS__) || defined(__atarist__) +# define __LZO_TOS +# endif #endif +#if (UINT_MAX < LZO_0xffffffffL) +# if defined(__LZO_WIN) +# define __LZO_WIN16 +# elif defined(__LZO_DOS) +# define __LZO_DOS16 +# elif defined(__LZO_PALMOS) +# define __LZO_PALMOS16 +# elif defined(__LZO_TOS) +# define __LZO_TOS16 +# elif defined(__C166__) +# else +# error "16-bit target not supported - contact me for porting hints" +# endif +#endif -/*********************************************************************** -// some core defines -************************************************************************/ +#if !defined(__LZO_i386) +# if defined(__LZO_DOS) || defined(__LZO_WIN16) +# define __LZO_i386 +# elif defined(__i386__) || defined(__386__) || defined(_M_IX86) +# define __LZO_i386 +# endif +#endif + +#if defined(__LZO_STRICT_16BIT) +# if (UINT_MAX < LZO_0xffffffffL) +# include <lzo16bit.h> +# endif +#endif /* memory checkers */ #if !defined(__LZO_CHECKER) # if defined(__BOUNDS_CHECKING_ON) -# define __LZO_CHECKER 1 +# define __LZO_CHECKER # elif defined(__CHECKER__) -# define __LZO_CHECKER 1 +# define __LZO_CHECKER # elif defined(__INSURE__) -# define __LZO_CHECKER 1 +# define __LZO_CHECKER # elif defined(__PURIFY__) -# define __LZO_CHECKER 1 +# define __LZO_CHECKER # endif #endif @@ -88,35 +134,36 @@ extern "C" { // integral and pointer types ************************************************************************/ -/* lzo_uint must match size_t */ +/* Integral types with 32 bits or more */ +#if !defined(LZO_UINT32_MAX) +# if (UINT_MAX >= LZO_0xffffffffL) + typedef unsigned int lzo_uint32; + typedef int lzo_int32; +# define LZO_UINT32_MAX UINT_MAX +# define LZO_INT32_MAX INT_MAX +# define LZO_INT32_MIN INT_MIN +# elif (ULONG_MAX >= LZO_0xffffffffL) + typedef unsigned long lzo_uint32; + typedef long lzo_int32; +# define LZO_UINT32_MAX ULONG_MAX +# define LZO_INT32_MAX LONG_MAX +# define LZO_INT32_MIN LONG_MIN +# else +# error "lzo_uint32" +# endif +#endif + +/* lzo_uint is used like size_t */ #if !defined(LZO_UINT_MAX) -# if (LZO_ABI_LLP64) -# if (LZO_OS_WIN64) - typedef unsigned __int64 lzo_uint; - typedef __int64 lzo_int; -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF___INT64 -# else - typedef lzo_ullong_t lzo_uint; - typedef lzo_llong_t lzo_int; -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG_LONG -# endif -# define LZO_SIZEOF_LZO_INT 8 -# define LZO_UINT_MAX 0xffffffffffffffffull -# define LZO_INT_MAX 9223372036854775807LL -# define LZO_INT_MIN (-1LL - LZO_INT_MAX) -# elif (LZO_ABI_IP32L64) /* MIPS R5900 */ +# if (UINT_MAX >= LZO_0xffffffffL) typedef unsigned int lzo_uint; typedef int lzo_int; -# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_INT -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_INT # define LZO_UINT_MAX UINT_MAX # define LZO_INT_MAX INT_MAX # define LZO_INT_MIN INT_MIN # elif (ULONG_MAX >= LZO_0xffffffffL) typedef unsigned long lzo_uint; typedef long lzo_int; -# define LZO_SIZEOF_LZO_INT LZO_SIZEOF_LONG -# define LZO_TYPEOF_LZO_INT LZO_TYPEOF_LONG # define LZO_UINT_MAX ULONG_MAX # define LZO_INT_MAX LONG_MAX # define LZO_INT_MIN LONG_MIN @@ -125,84 +172,47 @@ extern "C" { # endif #endif -/* The larger type of lzo_uint and lzo_uint32_t. */ -#if (LZO_SIZEOF_LZO_INT >= 4) -# define lzo_xint lzo_uint -#else -# define lzo_xint lzo_uint32_t -#endif - -typedef int lzo_bool; -/* sanity checks */ -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_int) == LZO_SIZEOF_LZO_INT) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == LZO_SIZEOF_LZO_INT) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_xint) >= sizeof(lzo_uint32_t)) - -#ifndef __LZO_MMODEL -#define __LZO_MMODEL /*empty*/ +/* Memory model that allows to access memory at offsets of lzo_uint. */ +#if !defined(__LZO_MMODEL) +# if (LZO_UINT_MAX <= UINT_MAX) +# define __LZO_MMODEL +# elif defined(__LZO_DOS16) || defined(__LZO_WIN16) +# define __LZO_MMODEL __huge +# define LZO_999_UNSUPPORTED +# elif defined(__LZO_PALMOS16) || defined(__LZO_TOS16) +# define __LZO_MMODEL +# else +# error "__LZO_MMODEL" +# endif #endif /* no typedef here because of const-pointer issues */ +#define lzo_byte unsigned char __LZO_MMODEL #define lzo_bytep unsigned char __LZO_MMODEL * #define lzo_charp char __LZO_MMODEL * #define lzo_voidp void __LZO_MMODEL * #define lzo_shortp short __LZO_MMODEL * #define lzo_ushortp unsigned short __LZO_MMODEL * -#define lzo_intp lzo_int __LZO_MMODEL * +#define lzo_uint32p lzo_uint32 __LZO_MMODEL * +#define lzo_int32p lzo_int32 __LZO_MMODEL * #define lzo_uintp lzo_uint __LZO_MMODEL * -#define lzo_xintp lzo_xint __LZO_MMODEL * +#define lzo_intp lzo_int __LZO_MMODEL * #define lzo_voidpp lzo_voidp __LZO_MMODEL * #define lzo_bytepp lzo_bytep __LZO_MMODEL * -#define lzo_int8_tp lzo_int8_t __LZO_MMODEL * -#define lzo_uint8_tp lzo_uint8_t __LZO_MMODEL * -#define lzo_int16_tp lzo_int16_t __LZO_MMODEL * -#define lzo_uint16_tp lzo_uint16_t __LZO_MMODEL * -#define lzo_int32_tp lzo_int32_t __LZO_MMODEL * -#define lzo_uint32_tp lzo_uint32_t __LZO_MMODEL * -#if defined(lzo_int64_t) -#define lzo_int64_tp lzo_int64_t __LZO_MMODEL * -#define lzo_uint64_tp lzo_uint64_t __LZO_MMODEL * -#endif +typedef int lzo_bool; -/* Older LZO versions used to support ancient systems and memory models - * such as 16-bit MSDOS with __huge pointers or Cray PVP, but these - * obsolete configurations are not supported any longer. - */ -#if defined(__LZO_MMODEL_HUGE) -#error "__LZO_MMODEL_HUGE memory model is unsupported" -#endif -#if (LZO_MM_PVP) -#error "LZO_MM_PVP memory model is unsupported" -#endif -#if (LZO_SIZEOF_INT < 4) -#error "LZO_SIZEOF_INT < 4 is unsupported" -#endif -#if (__LZO_UINTPTR_T_IS_POINTER) -#error "__LZO_UINTPTR_T_IS_POINTER is unsupported" +#ifndef lzo_sizeof_dict_t +# define lzo_sizeof_dict_t sizeof(lzo_bytep) #endif -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(int) >= 4) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) >= 4) -/* Strange configurations where sizeof(lzo_uint) != sizeof(size_t) should - * work but have not received much testing lately, so be strict here. - */ -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == sizeof(size_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == sizeof(ptrdiff_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(void *) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(char *) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(long *) == sizeof(lzo_uintptr_t)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(void *) == sizeof(lzo_voidp)) -LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(char *) == sizeof(lzo_bytep)) /*********************************************************************** // function types ************************************************************************/ -/* name mangling */ +/* linkage */ #if !defined(__LZO_EXTERN_C) # ifdef __cplusplus # define __LZO_EXTERN_C extern "C" @@ -211,92 +221,81 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(char *) == sizeof(lzo_bytep)) # endif #endif -/* calling convention */ +/* calling conventions */ #if !defined(__LZO_CDECL) -# define __LZO_CDECL __lzo_cdecl +# if defined(__LZO_DOS16) || defined(__LZO_WIN16) +# define __LZO_CDECL __far __cdecl +# elif defined(__LZO_i386) && defined(_MSC_VER) +# define __LZO_CDECL __cdecl +# elif defined(__LZO_i386) && defined(__WATCOMC__) +# define __LZO_CDECL __near __cdecl +# else +# define __LZO_CDECL +# endif +#endif +#if !defined(__LZO_ENTRY) +# define __LZO_ENTRY __LZO_CDECL #endif /* DLL export information */ #if !defined(__LZO_EXPORT1) -# define __LZO_EXPORT1 /*empty*/ +# define __LZO_EXPORT1 #endif #if !defined(__LZO_EXPORT2) -# define __LZO_EXPORT2 /*empty*/ +# define __LZO_EXPORT2 #endif -/* __cdecl calling convention for public C and assembly functions */ +/* calling convention for C functions */ #if !defined(LZO_PUBLIC) -# define LZO_PUBLIC(r) __LZO_EXPORT1 r __LZO_EXPORT2 __LZO_CDECL +# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_ENTRY #endif #if !defined(LZO_EXTERN) -# define LZO_EXTERN(r) __LZO_EXTERN_C LZO_PUBLIC(r) +# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype) #endif #if !defined(LZO_PRIVATE) -# define LZO_PRIVATE(r) static r __LZO_CDECL +# define LZO_PRIVATE(_rettype) static _rettype __LZO_ENTRY +#endif + +/* cdecl calling convention for assembler functions */ +#if !defined(LZO_PUBLIC_CDECL) +# define LZO_PUBLIC_CDECL(_rettype) \ + __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL +#endif +#if !defined(LZO_EXTERN_CDECL) +# define LZO_EXTERN_CDECL(_rettype) __LZO_EXTERN_C LZO_PUBLIC_CDECL(_rettype) #endif -/* function types */ + typedef int -(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, +(__LZO_ENTRY *lzo_compress_t) ( const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, lzo_voidp wrkmem ); typedef int -(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, +(__LZO_ENTRY *lzo_decompress_t) ( const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, lzo_voidp wrkmem ); typedef int -(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, +(__LZO_ENTRY *lzo_optimize_t) ( lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, lzo_voidp wrkmem ); typedef int -(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len ); +(__LZO_ENTRY *lzo_compress_dict_t)(const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem, + const lzo_byte *dict, lzo_uint dict_len ); typedef int -(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len, - lzo_bytep dst, lzo_uintp dst_len, - lzo_voidp wrkmem, - const lzo_bytep dict, lzo_uint dict_len ); - - -/* Callback interface. Currently only the progress indicator ("nprogress") - * is used, but this may change in a future release. */ +(__LZO_ENTRY *lzo_decompress_dict_t)(const lzo_byte *src, lzo_uint src_len, + lzo_byte *dst, lzo_uint *dst_len, + lzo_voidp wrkmem, + const lzo_byte *dict, lzo_uint dict_len ); -struct lzo_callback_t; -typedef struct lzo_callback_t lzo_callback_t; -#define lzo_callback_p lzo_callback_t __LZO_MMODEL * - -/* malloc & free function types */ -typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t) - (lzo_callback_p self, lzo_uint items, lzo_uint size); -typedef void (__LZO_CDECL *lzo_free_func_t) - (lzo_callback_p self, lzo_voidp ptr); /* a progress indicator callback function */ -typedef void (__LZO_CDECL *lzo_progress_func_t) - (lzo_callback_p, lzo_uint, lzo_uint, int); - -struct lzo_callback_t -{ - /* custom allocators (set to 0 to disable) */ - lzo_alloc_func_t nalloc; /* [not used right now] */ - lzo_free_func_t nfree; /* [not used right now] */ - - /* a progress indicator callback function (set to 0 to disable) */ - lzo_progress_func_t nprogress; - - /* INFO: the first parameter "self" of the nalloc/nfree/nprogress - * callbacks points back to this struct, so you are free to store - * some extra info in the following variables. */ - lzo_voidp user1; - lzo_xint user2; - lzo_xint user3; -}; +typedef void (__LZO_ENTRY *lzo_progress_callback_t) (lzo_uint, lzo_uint); /*********************************************************************** @@ -309,35 +308,26 @@ struct lzo_callback_t */ #define LZO_E_OK 0 #define LZO_E_ERROR (-1) -#define LZO_E_OUT_OF_MEMORY (-2) /* [lzo_alloc_func_t failure] */ -#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ +#define LZO_E_OUT_OF_MEMORY (-2) /* not used right now */ +#define LZO_E_NOT_COMPRESSIBLE (-3) /* not used right now */ #define LZO_E_INPUT_OVERRUN (-4) #define LZO_E_OUTPUT_OVERRUN (-5) #define LZO_E_LOOKBEHIND_OVERRUN (-6) #define LZO_E_EOF_NOT_FOUND (-7) #define LZO_E_INPUT_NOT_CONSUMED (-8) -#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ -#define LZO_E_INVALID_ARGUMENT (-10) -#define LZO_E_INVALID_ALIGNMENT (-11) /* pointer argument is not properly aligned */ -#define LZO_E_OUTPUT_NOT_CONSUMED (-12) -#define LZO_E_INTERNAL_ERROR (-99) -#ifndef lzo_sizeof_dict_t -# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep)) -#endif - /* lzo_init() should be the first function you call. * Check the return code ! * * lzo_init() is a macro to allow checking that the library and the * compiler's view of various types are consistent. */ -#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ - (int)sizeof(long),(int)sizeof(lzo_uint32_t),(int)sizeof(lzo_uint),\ +#define lzo_init() __lzo_init2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ + (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\ (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\ - (int)sizeof(lzo_callback_t)) -LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int); + (int)sizeof(lzo_compress_t)) +LZO_EXTERN(int) __lzo_init2(unsigned,int,int,int,int,int,int,int,int,int); /* version functions (useful for shared libraries) */ LZO_EXTERN(unsigned) lzo_version(void); @@ -348,99 +338,44 @@ LZO_EXTERN(const lzo_charp) _lzo_version_date(void); /* string functions */ LZO_EXTERN(int) - lzo_memcmp(const lzo_voidp a, const lzo_voidp b, lzo_uint len); +lzo_memcmp(const lzo_voidp _s1, const lzo_voidp _s2, lzo_uint _len); LZO_EXTERN(lzo_voidp) - lzo_memcpy(lzo_voidp dst, const lzo_voidp src, lzo_uint len); +lzo_memcpy(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); LZO_EXTERN(lzo_voidp) - lzo_memmove(lzo_voidp dst, const lzo_voidp src, lzo_uint len); +lzo_memmove(lzo_voidp _dest, const lzo_voidp _src, lzo_uint _len); LZO_EXTERN(lzo_voidp) - lzo_memset(lzo_voidp buf, int c, lzo_uint len); +lzo_memset(lzo_voidp _s, int _c, lzo_uint _len); /* checksum functions */ -LZO_EXTERN(lzo_uint32_t) - lzo_adler32(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len); -LZO_EXTERN(lzo_uint32_t) - lzo_crc32(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len); -LZO_EXTERN(const lzo_uint32_tp) - lzo_get_crc32_table(void); - -/* misc. */ -LZO_EXTERN(int) _lzo_config_check(void); -typedef union { - lzo_voidp a00; lzo_bytep a01; lzo_uint a02; lzo_xint a03; lzo_uintptr_t a04; - void *a05; unsigned char *a06; unsigned long a07; size_t a08; ptrdiff_t a09; -#if defined(lzo_int64_t) - lzo_uint64_t a10; -#endif -} lzo_align_t; +LZO_EXTERN(lzo_uint32) +lzo_adler32(lzo_uint32 _adler, const lzo_byte *_buf, lzo_uint _len); +LZO_EXTERN(lzo_uint32) +lzo_crc32(lzo_uint32 _c, const lzo_byte *_buf, lzo_uint _len); -/* align a char pointer on a boundary that is a multiple of 'size' */ -LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp p, lzo_uint size); -#define LZO_PTR_ALIGN_UP(p,size) \ - ((p) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(p),(lzo_uint)(size))) +/* memory allocation functions */ +LZO_EXTERN(lzo_bytep) lzo_alloc(lzo_uint _nelems, lzo_uint _size); +LZO_EXTERN(lzo_bytep) lzo_malloc(lzo_uint _size); +LZO_EXTERN(void) lzo_free(lzo_voidp _ptr); +typedef lzo_bytep (__LZO_ENTRY *lzo_alloc_hook_t) (lzo_uint, lzo_uint); +typedef void (__LZO_ENTRY *lzo_free_hook_t) (lzo_voidp); -/*********************************************************************** -// deprecated macros - only for backward compatibility -************************************************************************/ - -/* deprecated - use 'lzo_bytep' instead of 'lzo_byte *' */ -#define lzo_byte unsigned char -/* deprecated type names */ -#define lzo_int32 lzo_int32_t -#define lzo_uint32 lzo_uint32_t -#define lzo_int32p lzo_int32_t __LZO_MMODEL * -#define lzo_uint32p lzo_uint32_t __LZO_MMODEL * -#define LZO_INT32_MAX LZO_INT32_C(2147483647) -#define LZO_UINT32_MAX LZO_UINT32_C(4294967295) -#if defined(lzo_int64_t) -#define lzo_int64 lzo_int64_t -#define lzo_uint64 lzo_uint64_t -#define lzo_int64p lzo_int64_t __LZO_MMODEL * -#define lzo_uint64p lzo_uint64_t __LZO_MMODEL * -#define LZO_INT64_MAX LZO_INT64_C(9223372036854775807) -#define LZO_UINT64_MAX LZO_UINT64_C(18446744073709551615) -#endif -/* deprecated types */ -typedef union { lzo_bytep a; lzo_uint b; } __lzo_pu_u; -typedef union { lzo_bytep a; lzo_uint32_t b; } __lzo_pu32_u; -/* deprecated defines */ -#if !defined(LZO_SIZEOF_LZO_UINT) -# define LZO_SIZEOF_LZO_UINT LZO_SIZEOF_LZO_INT -#endif +extern lzo_alloc_hook_t lzo_alloc_hook; +extern lzo_free_hook_t lzo_free_hook; -#if defined(LZO_CFG_COMPAT) - -#define __LZOCONF_H 1 - -#if defined(LZO_ARCH_I086) -# define __LZO_i386 1 -#elif defined(LZO_ARCH_I386) -# define __LZO_i386 1 -#endif - -#if defined(LZO_OS_DOS16) -# define __LZO_DOS 1 -# define __LZO_DOS16 1 -#elif defined(LZO_OS_DOS32) -# define __LZO_DOS 1 -#elif defined(LZO_OS_WIN16) -# define __LZO_WIN 1 -# define __LZO_WIN16 1 -#elif defined(LZO_OS_WIN32) -# define __LZO_WIN 1 -#endif - -#define __LZO_CMODEL /*empty*/ -#define __LZO_DMODEL /*empty*/ -#define __LZO_ENTRY __LZO_CDECL -#define LZO_EXTERN_CDECL LZO_EXTERN -#define LZO_ALIGN LZO_PTR_ALIGN_UP +/* misc. */ +LZO_EXTERN(lzo_bool) lzo_assert(int _expr); +LZO_EXTERN(int) _lzo_config_check(void); +typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u; +typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u; -#define lzo_compress_asm_t lzo_compress_t -#define lzo_decompress_asm_t lzo_decompress_t +/* align a char pointer on a boundary that is a multiple of `size' */ +LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp _ptr, lzo_uint _size); +#define LZO_PTR_ALIGN_UP(_ptr,_size) \ + ((_ptr) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(_ptr),(lzo_uint)(_size))) -#endif /* LZO_CFG_COMPAT */ +/* deprecated - only for backward compatibility */ +#define LZO_ALIGN(_ptr,_size) LZO_PTR_ALIGN_UP(_ptr,_size) #ifdef __cplusplus @@ -449,5 +384,3 @@ typedef union { lzo_bytep a; lzo_uint32_t b; } __lzo_pu32_u; #endif /* already included */ - -/* vim:set ts=4 sw=4 et: */ diff --git a/mkflfs/lzodefs.h b/mkflfs/lzodefs.h deleted file mode 100644 index 1535c1e..0000000 --- a/mkflfs/lzodefs.h +++ /dev/null @@ -1,3134 +0,0 @@ -/* lzodefs.h -- architecture, OS and compiler specific defines - - This file is part of the LZO real-time data compression library. - - Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer - All Rights Reserved. - - The LZO library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - The LZO library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with the LZO library; see the file COPYING. - If not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Markus F.X.J. Oberhumer - <ma...@ob...> - http://www.oberhumer.com/opensource/lzo/ - */ - - -#ifndef __LZODEFS_H_INCLUDED -#define __LZODEFS_H_INCLUDED 1 - -#if defined(__CYGWIN32__) && !defined(__CYGWIN__) -# define __CYGWIN__ __CYGWIN32__ -#endif -#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) -# define _ALL_SOURCE 1 -#endif -#if defined(__mips__) && defined(__R5900__) -# if !defined(__LONG_MAX__) -# define __LONG_MAX__ 9223372036854775807L -# endif -#endif -#if !defined(LZO_CFG_NO_DISABLE_WUNDEF) -#if defined(__ARMCC_VERSION) -# pragma diag_suppress 193 -#elif defined(__clang__) && defined(__clang_minor__) -# pragma clang diagnostic ignored "-Wundef" -#elif defined(__INTEL_COMPILER) -# pragma warning(disable: 193) -#elif defined(__KEIL__) && defined(__C166__) -# pragma warning disable = 322 -#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__) -# if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2)) -# pragma GCC diagnostic ignored "-Wundef" -# endif -#elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) -# if ((_MSC_VER-0) >= 1300) -# pragma warning(disable: 4668) -# endif -#endif -#endif -#if 0 && defined(__POCC__) && defined(_WIN32) -# if (__POCC__ >= 400) -# pragma warn(disable: 2216) -# endif -#endif -#if 0 && defined(__WATCOMC__) -# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) -# pragma warning 203 9 -# endif -#endif -#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) -# pragma option -h -#endif -#if !(LZO_CFG_NO_DISABLE_WCRTNONSTDC) -#ifndef _CRT_NONSTDC_NO_DEPRECATE -#define _CRT_NONSTDC_NO_DEPRECATE 1 -#endif -#ifndef _CRT_NONSTDC_NO_WARNINGS -#define _CRT_NONSTDC_NO_WARNINGS 1 -#endif -#ifndef _CRT_SECURE_NO_DEPRECATE -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif -#ifndef _CRT_SECURE_NO_WARNINGS -#define _CRT_SECURE_NO_WARNINGS 1 -#endif -#endif -#if 0 -#define LZO_0xffffUL 0xfffful -#define LZO_0xffffffffUL 0xfffffffful -#else -#define LZO_0xffffUL 65535ul -#define LZO_0xffffffffUL 4294967295ul -#endif -#define LZO_0xffffL LZO_0xffffUL -#define LZO_0xffffffffL LZO_0xffffffffUL -#if (LZO_0xffffL == LZO_0xffffffffL) -# error "your preprocessor is broken 1" -#endif -#if (16ul * 16384ul != 262144ul) -# error "your preprocessor is broken 2" -#endif -#if 0 -#if (32767 >= 4294967295ul) -# error "your preprocessor is broken 3" -#endif -#if (65535u >= 4294967295ul) -# error "your preprocessor is broken 4" -#endif -#endif -#if defined(__COUNTER__) -# ifndef LZO_CFG_USE_COUNTER -# define LZO_CFG_USE_COUNTER 1 -# endif -#else -# undef LZO_CFG_USE_COUNTER -#endif -#if (UINT_MAX == LZO_0xffffL) -#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) -# if !defined(MSDOS) -# define MSDOS 1 -# endif -# if !defined(_MSDOS) -# define _MSDOS 1 -# endif -#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) -# if (__VERSION == 520) && (MB_LEN_MAX == 1) -# if !defined(__AZTEC_C__) -# define __AZTEC_C__ __VERSION -# endif -# if !defined(__DOS__) -# define __DOS__ 1 -# endif -# endif -#endif -#endif -#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) -# define ptrdiff_t long -# define _PTRDIFF_T_DEFINED 1 -#endif -#if (UINT_MAX == LZO_0xffffL) -# undef __LZO_RENAME_A -# undef __LZO_RENAME_B -# if defined(__AZTEC_C__) && defined(__DOS__) -# define __LZO_RENAME_A 1 -# elif defined(_MSC_VER) && defined(MSDOS) -# if (_MSC_VER < 600) -# define __LZO_RENAME_A 1 -# elif (_MSC_VER < 700) -# define __LZO_RENAME_B 1 -# endif -# elif defined(__TSC__) && defined(__OS2__) -# define __LZO_RENAME_A 1 -# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) -# define __LZO_RENAME_A 1 -# elif defined(__PACIFIC__) && defined(DOS) -# if !defined(__far) -# define __far far -# endif -# if !defined(__near) -# define __near near -# endif -# endif -# if defined(__LZO_RENAME_A) -# if !defined(__cdecl) -# define __cdecl cdecl -# endif -# if !defined(__far) -# define __far far -# endif -# if !defined(__huge) -# define __huge huge -# endif -# if !defined(__near) -# define __near near -# endif -# if !defined(__pascal) -# define __pascal pascal -# endif -# if !defined(__huge) -# define __huge huge -# endif -# elif defined(__LZO_RENAME_B) -# if !defined(__cdecl) -# define __cdecl _cdecl -# endif -# if !defined(__far) -# define __far _far -# endif -# if !defined(__huge) -# define __huge _huge -# endif -# if !defined(__near) -# define __near _near -# endif -# if !defined(__pascal) -# define __pascal _pascal -# endif -# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) -# if !defined(__cdecl) -# define __cdecl cdecl -# endif -# if !defined(__pascal) -# define __pascal pascal -# endif -# endif -# undef __LZO_RENAME_A -# undef __LZO_RENAME_B -#endif -#if (UINT_MAX == LZO_0xffffL) -#if defined(__AZTEC_C__) && defined(__DOS__) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -#elif defined(_MSC_VER) && defined(MSDOS) -# if (_MSC_VER < 600) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -# endif -# if (_MSC_VER < 700) -# define LZO_BROKEN_INTEGRAL_PROMOTION 1 -# define LZO_BROKEN_SIZEOF 1 -# endif -#elif defined(__PACIFIC__) && defined(DOS) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -#elif defined(__TURBOC__) && defined(__MSDOS__) -# if (__TURBOC__ < 0x0150) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -# define LZO_BROKEN_INTEGRAL_PROMOTION 1 -# endif -# if (__TURBOC__ < 0x0200) -# define LZO_BROKEN_SIZEOF 1 -# endif -# if (__TURBOC__ < 0x0400) && defined(__cplusplus) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# endif -#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) -# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 -# define LZO_BROKEN_SIZEOF 1 -#endif -#endif -#if defined(__WATCOMC__) && (__WATCOMC__ < 900) -# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 -#endif -#if defined(_CRAY) && defined(_CRAY1) -# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 -#endif -#define LZO_PP_STRINGIZE(x) #x -#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) -#define LZO_PP_CONCAT0() /*empty*/ -#define LZO_PP_CONCAT1(a) a -#define LZO_PP_CONCAT2(a,b) a ## b -#define LZO_PP_CONCAT3(a,b,c) a ## b ## c -#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d -#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e -#define LZO_PP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f -#define LZO_PP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g -#define LZO_PP_ECONCAT0() LZO_PP_CONCAT0() -#define LZO_PP_ECONCAT1(a) LZO_PP_CONCAT1(a) -#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) -#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) -#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) -#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) -#define LZO_PP_ECONCAT6(a,b,c,d,e,f) LZO_PP_CONCAT6(a,b,c,d,e,f) -#define LZO_PP_ECONCAT7(a,b,c,d,e,f,g) LZO_PP_CONCAT7(a,b,c,d,e,f,g) -#define LZO_PP_EMPTY /*empty*/ -#define LZO_PP_EMPTY0() /*empty*/ -#define LZO_PP_EMPTY1(a) /*empty*/ -#define LZO_PP_EMPTY2(a,b) /*empty*/ -#define LZO_PP_EMPTY3(a,b,c) /*empty*/ -#define LZO_PP_EMPTY4(a,b,c,d) /*empty*/ -#define LZO_PP_EMPTY5(a,b,c,d,e) /*empty*/ -#define LZO_PP_EMPTY6(a,b,c,d,e,f) /*empty*/ -#define LZO_PP_EMPTY7(a,b,c,d,e,f,g) /*empty*/ -#if 1 -#define LZO_CPP_STRINGIZE(x) #x -#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) -#define LZO_CPP_CONCAT2(a,b) a ## b -#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c -#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d -#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e -#define LZO_CPP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f -#define LZO_CPP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g -#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) -#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) -#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) -#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) -#define LZO_CPP_ECONCAT6(a,b,c,d,e,f) LZO_CPP_CONCAT6(a,b,c,d,e,f) -#define LZO_CPP_ECONCAT7(a,b,c,d,e,f,g) LZO_CPP_CONCAT7(a,b,c,d,e,f,g) -#endif -#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-!!(b))) - (o)) << 1) + (o)*!!(b)) -#if 1 && defined(__cplusplus) -# if !defined(__STDC_CONSTANT_MACROS) -# define __STDC_CONSTANT_MACROS 1 -# endif -# if !defined(__STDC_LIMIT_MACROS) -# define __STDC_LIMIT_MACROS 1 -# endif -#endif -#if defined(__cplusplus) -# define LZO_EXTERN_C extern "C" -# define LZO_EXTERN_C_BEGIN extern "C" { -# define LZO_EXTERN_C_END } -#else -# define LZO_EXTERN_C extern -# define LZO_EXTERN_C_BEGIN /*empty*/ -# define LZO_EXTERN_C_END /*empty*/ -#endif -#if !defined(__LZO_OS_OVERRIDE) -#if (LZO_OS_FREESTANDING) -# define LZO_INFO_OS "freestanding" -#elif (LZO_OS_EMBEDDED) -# define LZO_INFO_OS "embedded" -#elif 1 && defined(__IAR_SYSTEMS_ICC__) -# define LZO_OS_EMBEDDED 1 -# define LZO_INFO_OS "embedded" -#elif defined(__CYGWIN__) && defined(__GNUC__) -# define LZO_OS_CYGWIN 1 -# define LZO_INFO_OS "cygwin" -#elif defined(__EMX__) && defined(__GNUC__) -# define LZO_OS_EMX 1 -# define LZO_INFO_OS "emx" -#elif defined(__BEOS__) -# define LZO_OS_BEOS 1 -# define LZO_INFO_OS "beos" -#elif defined(__Lynx__) -# define LZO_OS_LYNXOS 1 -# define LZO_INFO_OS "lynxos" -#elif defined(__OS400__) -# define LZO_OS_OS400 1 -# define LZO_INFO_OS "os400" -#elif defined(__QNX__) -# define LZO_OS_QNX 1 -# define LZO_INFO_OS "qnx" -#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -#elif defined(__BORLANDC__) && defined(__DPMI16__) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -#elif defined(__ZTC__) && defined(DOS386) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -#elif defined(__OS2__) || defined(__OS2V2__) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_OS216 1 -# define LZO_INFO_OS "os216" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_OS2 1 -# define LZO_INFO_OS "os2" -# else -# error "check your limits.h header" -# endif -#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) -# define LZO_OS_WIN64 1 -# define LZO_INFO_OS "win64" -#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -#elif defined(__MWERKS__) && defined(__INTEL__) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_WIN16 1 -# define LZO_INFO_OS "win16" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -# else -# error "check your limits.h header" -# endif -#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) -# if (UINT_MAX == LZO_0xffffL) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -# elif (UINT_MAX == LZO_0xffffffffL) -# define LZO_OS_DOS32 1 -# define LZO_INFO_OS "dos32" -# else -# error "check your limits.h header" -# endif -#elif defined(__WATCOMC__) -# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) -# define LZO_OS_DOS16 1 -# define LZO_INFO_OS "dos16" -# elif defined(__NT__) && (__WATCOMC__ < 1100) -# define LZO_OS_WIN32 1 -# define LZO_INFO_OS "win32" -# elif defined(__linux__) || defined(__LINUX__) -# define LZO_OS_POSIX 1 -# define LZO_INFO_OS "posix" -# else -# error "please specify a target using the -bt compiler option" -# endif -#elif defined(__palmos__) -# define LZO_OS_PALMOS 1 -# define LZO_INFO_OS "palmos" -#elif defined(__TOS__) || defined(__atarist__) -# define LZO_OS_TOS 1 -# define LZO_INFO_OS "tos" -#elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__) -# define LZO_OS_MACCLASSIC 1 -# define LZO_INFO_OS "macclassic" -#elif defined(__VMS) -# define LZO_OS_VMS 1 -# define LZO_INFO_OS "vms" -#elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__) -# define LZO_OS_CONSOLE 1 -# define LZO_OS_CONSOLE_PS2 1 -# define LZO_INFO_OS "console" -# define LZO_INFO_OS_CONSOLE "ps2" -#elif defined(__mips__) && defined(__psp__) -# define LZO_OS_CONSOLE 1 -# define LZO_OS_CONSOLE_PSP 1 -# define LZO_INFO_OS "console" -# define LZO_INFO_OS_CONSOLE "psp" -#else -# define LZO_OS_POSIX 1 -# define LZO_INFO_OS "posix" -#endif -#if (LZO_OS_POSIX) -# if defined(_AIX) || defined(__AIX__) || defined(__aix__) -# define LZO_OS_POSIX_AIX 1 -# define LZO_INFO_OS_POSIX "aix" -# elif defined(__FreeBSD__) -# define LZO_OS_POSIX_FREEBSD 1 -# define LZO_INFO_OS_POSIX "freebsd" -# elif defined(__hpux__) || defined(__hpux) -# define LZO_OS_POSIX_HPUX 1 -# define LZO_INFO_OS_POSIX "hpux" -# elif defined(__INTERIX) -# define LZO_OS_POSIX_INTERIX 1 -# define LZO_INFO_OS_POSIX "interix" -# elif defined(__IRIX__) || defined(__irix__) -# define LZO_OS_POSIX_IRIX 1 -# define LZO_INFO_OS_POSIX "irix" -# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) -# define LZO_OS_POSIX_LINUX 1 -# define LZO_INFO_OS_POSIX "linux" -# elif defined(__APPLE__) && defined(__MACH__) -# if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000) -# define LZO_OS_POSIX_DARWIN 1040 -# define LZO_INFO_OS_POSIX "darwin_iphone" -# elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040) -# define LZO_OS_POSIX_DARWIN __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ -# define LZO_INFO_OS_POSIX "darwin" -# else -# define LZO_OS_POSIX_DARWIN 1 -# define LZO_INFO_OS_POSIX "darwin" -# endif -# define LZO_OS_POSIX_MACOSX LZO_OS_POSIX_DARWIN -# elif defined(__minix__) || defined(__minix) -# define LZO_OS_POSIX_MINIX 1 -# define LZO_INFO_OS_POSIX "minix" -# elif defined(__NetBSD__) -# define LZO_OS_POSIX_NETBSD 1 -# define LZO_INFO_OS_POSIX "netbsd" -# elif defined(__OpenBSD__) -# define LZO_OS_POSIX_OPENBSD 1 -# define LZO_INFO_OS_POSIX "openbsd" -# elif defined(__osf__) -# define LZO_OS_POSIX_OSF 1 -# define LZO_INFO_OS_POSIX "osf" -# elif defined(__solaris__) || defined(__sun) -# if defined(__SVR4) || defined(__svr4__) -# define LZO_OS_POSIX_SOLARIS 1 -# define LZO_INFO_OS_POSIX "solaris" -# else -# define LZO_OS_POSIX_SUNOS 1 -# define LZO_INFO_OS_POSIX "sunos" -# endif -# elif defined(__ultrix__) || defined(__ultrix) -# define LZO_OS_POSIX_ULTRIX 1 -# define LZO_INFO_OS_POSIX "ultrix" -# elif defined(_UNICOS) -# define LZO_OS_POSIX_UNICOS 1 -# define LZO_INFO_OS_POSIX "unicos" -# else -# define LZO_OS_POSIX_UNKNOWN 1 -# define LZO_INFO_OS_POSIX "unknown" -# endif -#endif -#endif -#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -# if (UINT_MAX != LZO_0xffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) -# if (UINT_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -# if (ULONG_MAX != LZO_0xffffffffL) -# error "unexpected configuration - check your compiler defines" -# endif -#endif -#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) -# define LZO_CC_CILLY 1 -# define LZO_INFO_CC "Cilly" -# if defined(__CILLY__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) -# define LZO_CC_SDCC 1 -# define LZO_INFO_CC "sdcc" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) -#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) -# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0)) -# define LZO_INFO_CC "Pathscale C" -# define LZO_INFO_CCVER __PATHSCALE__ -# if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0) -# define LZO_CC_INTELC __INTEL_COMPILER -# define LZO_INFO_CC "Intel C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_INTELC_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_INTELC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__POCC__) && defined(_WIN32) -# define LZO_CC_PELLESC 1 -# define LZO_INFO_CC "Pelles C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) -#elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# if defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# else -# define LZO_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# endif -# define LZO_CC_ARMCC __ARMCC_VERSION -# define LZO_INFO_CC "ARM C Compiler" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__) -# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) -# define LZO_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0)) -# else -# define LZO_CC_CLANG 0x010000L -# endif -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_CLANG_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -# define LZO_INFO_CC "clang" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# if defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# else -# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# endif -# define LZO_CC_LLVM LZO_CC_LLVM_GNUC -# define LZO_INFO_CC "llvm-gcc" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(__ACK__) && defined(_ACK) -# define LZO_CC_ACK 1 -# define LZO_INFO_CC "Amsterdam Compiler Kit C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__ARMCC_VERSION) && !defined(__GNUC__) -# define LZO_CC_ARMCC __ARMCC_VERSION -# define LZO_CC_ARMCC_ARMCC __ARMCC_VERSION -# define LZO_INFO_CC "ARM C Compiler" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ARMCC_VERSION) -#elif defined(__AZTEC_C__) -# define LZO_CC_AZTECC 1 -# define LZO_INFO_CC "Aztec C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) -#elif defined(__CODEGEARC__) -# define LZO_CC_CODEGEARC 1 -# define LZO_INFO_CC "CodeGear C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) -#elif defined(__BORLANDC__) -# define LZO_CC_BORLANDC 1 -# define LZO_INFO_CC "Borland C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) -#elif defined(_CRAYC) && defined(_RELEASE) -# define LZO_CC_CRAYC 1 -# define LZO_INFO_CC "Cray C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) -#elif defined(__DMC__) && defined(__SC__) -# define LZO_CC_DMC 1 -# define LZO_INFO_CC "Digital Mars C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) -#elif defined(__DECC) -# define LZO_CC_DECC 1 -# define LZO_INFO_CC "DEC C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) -#elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0) -# define LZO_CC_GHS 1 -# define LZO_INFO_CC "Green Hills C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER) -# if defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_GHS_MSC _MSC_VER -# elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) -# define LZO_CC_GHS_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# endif -#elif defined(__HIGHC__) -# define LZO_CC_HIGHC 1 -# define LZO_INFO_CC "MetaWare High C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__HP_aCC) && ((__HP_aCC-0) > 0) -# define LZO_CC_HPACC __HP_aCC -# define LZO_INFO_CC "HP aCC" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__HP_aCC) -#elif defined(__IAR_SYSTEMS_ICC__) -# define LZO_CC_IARC 1 -# define LZO_INFO_CC "IAR C" -# if defined(__VER__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__IBMC__) && ((__IBMC__-0) > 0) -# define LZO_CC_IBMC __IBMC__ -# define LZO_INFO_CC "IBM C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) -#elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0) -# define LZO_CC_IBMC __IBMCPP__ -# define LZO_INFO_CC "IBM C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMCPP__) -#elif defined(__KEIL__) && defined(__C166__) -# define LZO_CC_KEILC 1 -# define LZO_INFO_CC "Keil C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) -#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) -# define LZO_CC_LCCWIN32 1 -# define LZO_INFO_CC "lcc-win32" -# define LZO_INFO_CCVER "unknown" -#elif defined(__LCC__) -# define LZO_CC_LCC 1 -# define LZO_INFO_CC "lcc" -# if defined(__LCC_VERSION__) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) -# else -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__MWERKS__) && ((__MWERKS__-0) > 0) -# define LZO_CC_MWERKS __MWERKS__ -# define LZO_INFO_CC "Metrowerks C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) -#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) -# define LZO_CC_NDPC 1 -# define LZO_INFO_CC "Microway NDP C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__PACIFIC__) -# define LZO_CC_PACIFICC 1 -# define LZO_INFO_CC "Pacific C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) -#elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0)) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) "." LZO_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__) -# else -# define LZO_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PGIC__) "." LZO_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0" -# endif -# define LZO_INFO_CC "Portland Group PGI C" -#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) -# define LZO_CC_PGI 1 -# define LZO_INFO_CC "Portland Group PGI C" -# define LZO_INFO_CCVER "unknown" -#elif defined(__PUREC__) && defined(__TOS__) -# define LZO_CC_PUREC 1 -# define LZO_INFO_CC "Pure C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) -#elif defined(__SC__) && defined(__ZTC__) -# define LZO_CC_SYMANTECC 1 -# define LZO_INFO_CC "Symantec C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) -#elif defined(__SUNPRO_C) -# define LZO_INFO_CC "SunPro C" -# if ((__SUNPRO_C-0) > 0) -# define LZO_CC_SUNPROC __SUNPRO_C -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) -# else -# define LZO_CC_SUNPROC 1 -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__SUNPRO_CC) -# define LZO_INFO_CC "SunPro C" -# if ((__SUNPRO_CC-0) > 0) -# define LZO_CC_SUNPROC __SUNPRO_CC -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) -# else -# define LZO_CC_SUNPROC 1 -# define LZO_INFO_CCVER "unknown" -# endif -#elif defined(__TINYC__) -# define LZO_CC_TINYC 1 -# define LZO_INFO_CC "Tiny C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) -#elif defined(__TSC__) -# define LZO_CC_TOPSPEEDC 1 -# define LZO_INFO_CC "TopSpeed C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) -#elif defined(__WATCOMC__) -# define LZO_CC_WATCOMC 1 -# define LZO_INFO_CC "Watcom C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) -#elif defined(__TURBOC__) -# define LZO_CC_TURBOC 1 -# define LZO_INFO_CC "Turbo C" -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) -#elif defined(__ZTC__) -# define LZO_CC_ZORTECHC 1 -# define LZO_INFO_CC "Zortech C" -# if ((__ZTC__-0) == 0x310) -# define LZO_INFO_CCVER "0x310" -# else -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) -# endif -#elif defined(__GNUC__) && defined(__VERSION__) -# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) -# define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0)) -# elif defined(__GNUC_MINOR__) -# define LZO_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100) -# else -# define LZO_CC_GNUC (__GNUC__ * 0x10000L) -# endif -# define LZO_INFO_CC "gcc" -# define LZO_INFO_CCVER __VERSION__ -#elif defined(_MSC_VER) && ((_MSC_VER-0) > 0) -# define LZO_CC_MSC _MSC_VER -# define LZO_INFO_CC "Microsoft C" -# if defined(_MSC_FULL_VER) -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) -# else -# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) -# endif -#else -# define LZO_CC_UNKNOWN 1 -# define LZO_INFO_CC "unknown" -# define LZO_INFO_CCVER "unknown" -#endif -#if (LZO_CC_GNUC) && defined(__OPEN64__) -# if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__) -# define LZO_CC_OPEN64 (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0)) -# define LZO_CC_OPEN64_GNUC LZO_CC_GNUC -# endif -#endif -#if (LZO_CC_GNUC) && defined(__PCC__) -# if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__) -# define LZO_CC_PCC (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0)) -# define LZO_CC_PCC_GNUC LZO_CC_GNUC -# endif -#endif -#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) -# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" -#endif -#if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) -# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) -# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) -# define LZO_ARCH_CRAY_MPP 1 -# elif defined(_CRAY1) -# define LZO_ARCH_CRAY_PVP 1 -# endif -# endif -#endif -#if !defined(__LZO_ARCH_OVERRIDE) -#if (LZO_ARCH_GENERIC) -# define LZO_INFO_ARCH "generic" -#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) -# define LZO_ARCH_I086 1 -# define LZO_INFO_ARCH "i086" -#elif defined(__aarch64__) -# define LZO_ARCH_ARM64 1 -# define LZO_INFO_ARCH "arm64" -#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) -# define LZO_ARCH_ALPHA 1 -# define LZO_INFO_ARCH "alpha" -#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) -# define LZO_ARCH_ALPHA 1 -# define LZO_INFO_ARCH "alpha" -#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) -# define LZO_ARCH_AMD64 1 -# define LZO_INFO_ARCH "amd64" -#elif defined(__arm__) || defined(_M_ARM) -# define LZO_ARCH_ARM 1 -# define LZO_INFO_ARCH "arm" -#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) -# define LZO_ARCH_ARM 1 -# define LZO_INFO_ARCH "arm" -#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) -# define LZO_ARCH_AVR 1 -# define LZO_INFO_ARCH "avr" -#elif defined(__avr32__) || defined(__AVR32__) -# define LZO_ARCH_AVR32 1 -# define LZO_INFO_ARCH "avr32" -#elif defined(__bfi... [truncated message content] |
From: GetAway <tux...@ne...> - 2015-06-14 13:28:38
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via d936ee9b40bbca32cbf577af8b8257ae0fe7beb3 (commit) from 6a2e3ec0bead9e2f42fec81248b1c94bc345462f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d936ee9b40bbca32cbf577af8b8257ae0fe7beb3 Author: GetAway <get...@t-...> Date: Sun Jun 14 15:28:03 2015 +0200 lcdd.cpp: use file_exists Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/driver/lcdd.cpp b/tuxbox/neutrino/src/driver/lcdd.cpp index fa42e22..c3e4fe9 100644 --- a/tuxbox/neutrino/src/driver/lcdd.cpp +++ b/tuxbox/neutrino/src/driver/lcdd.cpp @@ -35,6 +35,7 @@ #include <global.h> #include <neutrino.h> #include <system/settings.h> +#include <system/helper.h> #include <driver/encoding.h> #include <driver/newclock.h> @@ -47,7 +48,6 @@ #include <fcntl.h> #include <time.h> #include <unistd.h> -#include <sys/stat.h> #include <daemonc/remotecontrol.h> extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ @@ -108,8 +108,7 @@ void* CLCD::TimeThread(void *) while(1) { sleep(1); - struct stat buf; - if (stat("/tmp/lcd.locked", &buf) == -1) { + if (!file_exists("/tmp/lcd.locked")) { CLCD::getInstance()->showTime(); CLCD::getInstance()->count_down(); } else @@ -277,8 +276,7 @@ bool CLCD::lcdInit(const char *fontfile, const char *fontfile2, const char *font void CLCD::displayUpdate() { - struct stat buf; - if (stat("/tmp/lcd.locked", &buf) == -1) + if (!file_exists("/tmp/lcd.locked")) display.update(); } ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/driver/lcdd.cpp | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-13 17:54:35
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 6a2e3ec0bead9e2f42fec81248b1c94bc345462f (commit) from af19455866e85fb7a5a27ccf6a735e05e888c261 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6a2e3ec0bead9e2f42fec81248b1c94bc345462f Author: GetAway <get...@t-...> Date: Sat Jun 13 19:53:59 2015 +0200 plugins.cpp: use file_exists Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/gui/plugins.cpp b/tuxbox/neutrino/src/gui/plugins.cpp index 7b236d2..06f3708 100644 --- a/tuxbox/neutrino/src/gui/plugins.cpp +++ b/tuxbox/neutrino/src/gui/plugins.cpp @@ -51,6 +51,8 @@ #include <global.h> #include <neutrino.h> +#include <system/helper.h> + #include <zapit/client/zapittools.h> #include <daemonc/remotecontrol.h> @@ -75,19 +77,6 @@ int CPlugins::find_plugin(const std::string & filename) return -1; } -bool CPlugins::pluginfile_exists(const std::string & filename) -{ - FILE *file = fopen(filename.c_str(),"r"); - if (file != NULL) - { - fclose(file); - return true; - } else - { - return false; - } -} - void CPlugins::scanDir(const char *dir) { struct dirent **namelist; @@ -309,7 +298,7 @@ void CPlugins::startScriptPlugin(int number) { const char *script = plugin_list[number].pluginfile.c_str(); printf("[CPlugins] executing %s\n",script); - if (!pluginfile_exists(plugin_list[number].pluginfile)) + if (!file_exists(script)) { printf("[CPlugins] could not find %s,\nperhaps wrong plugin type in %s\n", script, plugin_list[number].cfgfile.c_str()); @@ -343,7 +332,7 @@ void CPlugins::startPlugin(int number, int param, int param2) startScriptPlugin(number); return; } - if (!pluginfile_exists(plugin_list[number].pluginfile)) + if (!file_exists(plugin_list[number].pluginfile.c_str())) { printf("[CPlugins] could not find %s,\nperhaps wrong plugin type in %s\n", plugin_list[number].pluginfile.c_str(), plugin_list[number].cfgfile.c_str()); @@ -566,7 +555,7 @@ bool CPlugins::hasPlugin(const char * const filename) it != plugin_list.end(); ++it) { if (it->filename.compare(filename) == 0) - return pluginfile_exists(it->pluginfile); + return file_exists(it->pluginfile.c_str()); } return false; } diff --git a/tuxbox/neutrino/src/gui/plugins.h b/tuxbox/neutrino/src/gui/plugins.h index 0cb6461..02753b2 100644 --- a/tuxbox/neutrino/src/gui/plugins.h +++ b/tuxbox/neutrino/src/gui/plugins.h @@ -51,7 +51,7 @@ class CPlugins P_TYPE_DISABLED = 0x1, P_TYPE_GAME = 0x2, P_TYPE_TOOL = 0x4, - P_TYPE_SCRIPT = 0x8, + P_TYPE_SCRIPT = 0x8 } p_type_t; @@ -98,7 +98,6 @@ class CPlugins void scanDir(const char *dir); bool plugin_exists(const std::string & filename); int find_plugin(const std::string & filename); - bool pluginfile_exists(const std::string & filename); CPlugins::p_type_t getPluginType(int type); public: ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/gui/plugins.cpp | 21 +++++---------------- tuxbox/neutrino/src/gui/plugins.h | 3 +-- 2 files changed, 6 insertions(+), 18 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-12 09:27:36
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via af19455866e85fb7a5a27ccf6a735e05e888c261 (commit) from e7580f6382be79d23e51486b3af889a317ffc80c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit af19455866e85fb7a5a27ccf6a735e05e888c261 Author: GetAway <get...@t-...> Date: Fri Jun 12 11:26:51 2015 +0200 create Neutrino-HD compatible TS-Files Based on the code by bellum i added a menu to switch on/off this function - later, the menu could be removed. Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index ea360ba..a648230 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -1197,6 +1197,7 @@ recordingmenu.gen_psi PSI in TS einfügen recordingmenu.head Aufnahme Einstellungen recordingmenu.help Aufnahmegeräte:\n-----------------------\nServer:\nauf PC mit Hilfe eines Streaming-Programmes\n\n(analoger) Videorekorder:\nüber VCR-Ausgang\n\nDirekt (Datei):\nauf ein per NFS gemountetes Verzeichnis\noder eine interne Festplatte\nTS: SPTS-Mode Treiber laden\nPES: SPTS-Mode Treiber nicht laden\n\n\nMaximale DateigröÃe:\n----------------------\nNFS V2: 2 GB (2048 MB)\nNFS V3: fast unendlich (0 MB)\nFAT: 2 GB (2048 MB)\nFAT32: 4 GB (4096 MB) recordingmenu.max_rectime Max. Sofortaufnahmezeit +recordingmenu.nhd_compatible_ts N-HD komp. TS-Dateien erzeugen recordingmenu.no_scart Unterdrücke Scart-Umschaltung recordingmenu.off aus recordingmenu.record_in_spts_mode in SPTS-Modus aufnehmen diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale index 76bcdd1..0fa313f 100644 --- a/tuxbox/neutrino/data/locale/english.locale +++ b/tuxbox/neutrino/data/locale/english.locale @@ -1197,6 +1197,7 @@ recordingmenu.gen_psi Insert PSI in TS recordingmenu.head Recording Settings recordingmenu.help Recording devices:\n--------------------------\nserver:\nusing streaming software on a PC\n\n(analog) vcr:\nusing the vcr outlet\n\ndirect (file):\ndirectly into an NFS mounted directory\nor onto an internal hard drive\nTS: use spts mode\nPES: do not use spts mode\n\n\nMax. file size:\n---------------------\nNFS V2: 2 GB (2048 MB)\nNFS V3: almost unlimited (0 MB)\nFAT: 2 GB (2048 MB)\nFAT32: 4 GB (4096 MB) recordingmenu.max_rectime Max. instant recording time +recordingmenu.nhd_compatible_ts Create N-HD comp. TS-Files recordingmenu.no_scart Switch to SCART recordingmenu.off off recordingmenu.record_in_spts_mode Use spts mode diff --git a/tuxbox/neutrino/src/driver/genpsi.c b/tuxbox/neutrino/src/driver/genpsi.c index 8e91fdd..511f17f 100644 --- a/tuxbox/neutrino/src/driver/genpsi.c +++ b/tuxbox/neutrino/src/driver/genpsi.c @@ -20,8 +20,9 @@ $Id: genpsi.c,v 1.2 2006/01/16 12:45:54 sat_man Exp $ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, USA. - Mit diesem Programm koennen Neutrino TS Streams für das Abspielen unter Enigma gepatched werden + Mit diesem Programm koennen Neutrino TS Streams für das Abspielen unter Enigma und Coolstream Neutrino-HD gepatched werden */ + #include <transform.h> #include <driver/genpsi.h> @@ -76,6 +77,12 @@ void reset_pids(void) avPids.nba = 0; } +static short nhd_ts = 0; +void activate_compatible_ts(const short compatible) +{ + nhd_ts = compatible; +} + //-- special enigma stream description packet for -- //-- at least 1 video, 1 audo and 1 PCR-Pid stream -- //------------------------------------------------------------------------------------ @@ -85,7 +92,7 @@ static uint8_t pkt_enigma[] = 0x7F, 0x80, 0x24, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x66, 0x30, 0x19, - 0x80, 0x13, 'N','E','U','T','R','I','N','O','N','G', // tag(8), len(8), text(10) -> NG hihi ;) + 0x80, 0x13, 'N','E','U','T','R','I','N','O','N','G', // tag(8), len(8), text(10) 0x00, 0x02, 0x00, 0x6e, // cVPID(8), len(8), PID(16) 0x01, 0x03, 0x00, 0x78, 0x00, // cAPID(8), len(8), PID(16), ac3flag(8) // 0x02, 0x02, 0x00, 0x82,// cTPID(8), len(8), ... @@ -169,8 +176,25 @@ int genpsi(int fd2) //-- calculate CRC -- calc_crc32psi(&pkt[data_len], &pkt[OFS_HDR_2], data_len-OFS_HDR_2 ); + if (nhd_ts) + { + //-- after all add dummy record length (60sec = 60000ms) to TS packet + // so that basic playback on Coolstream PVRs is possible + // correct record length is added in stream2file.cpp + // 60sec = 60000ms (dez) -> 0000EA60 hex + pkt[SIZE_TS_PKT-8] = 0x60; + pkt[SIZE_TS_PKT-7] = 0xEA; + pkt[SIZE_TS_PKT-6] = 0x00; + pkt[SIZE_TS_PKT-5] = 0x00; + //-- and finally add coolstream "magic bytes" to TS packet + pkt[SIZE_TS_PKT-4] = 0xBC; + pkt[SIZE_TS_PKT-3] = 0x00; + pkt[SIZE_TS_PKT-2] = 0x00; + pkt[SIZE_TS_PKT-1] = 0x00; + } //-- write TS packet -- bytes += write(fd2, pkt, SIZE_TS_PKT); + //-- (II) build PAT -- data_len = COPY_TEMPLATE(pkt, pkt_pat); //-- calculate CRC -- diff --git a/tuxbox/neutrino/src/driver/genpsi.h b/tuxbox/neutrino/src/driver/genpsi.h index 7b2ae0b..988ec95 100644 --- a/tuxbox/neutrino/src/driver/genpsi.h +++ b/tuxbox/neutrino/src/driver/genpsi.h @@ -34,5 +34,6 @@ $Id: genpsi.h,v 1.1 2005/08/15 14:47:52 metallica Exp $ int genpsi(int fd2); void transfer_pids(uint16_t pid,uint16_t pidart,short isAC3); void reset_pids(void); +void activate_compatible_ts(const short compatible); #endif diff --git a/tuxbox/neutrino/src/driver/stream2file.cpp b/tuxbox/neutrino/src/driver/stream2file.cpp index d94756e..b1d4273 100644 --- a/tuxbox/neutrino/src/driver/stream2file.cpp +++ b/tuxbox/neutrino/src/driver/stream2file.cpp @@ -115,6 +115,7 @@ static pthread_t demux_thread[MAXPIDS]; static bool use_o_sync; static bool use_fdatasync; static bool gen_psi; +static bool nhd_ts; static unsigned long long limit; static unsigned int ringbuffersize; static time_t record_start_time = 0; @@ -129,8 +130,8 @@ typedef struct filenames_t ringbuffer_t * ringbuffer; }; -static int sync_byte_offset(const unsigned char * buf, const unsigned int len) { - +static int sync_byte_offset(const unsigned char * buf, const unsigned int len) +{ unsigned int i; for (i = 0; i < len; i++) @@ -206,6 +207,9 @@ void * FileThread(void * v_arg) { ringbuffer_data_t vec[2]; size_t readsize; + time_t file_start_time = 0; + time_t file_end_time = 0; + unsigned long cs_file_time = 0; unsigned int filecount = 0; char radio_extension[5]; const unsigned long long splitsize = (limit / TS_SIZE) * TS_SIZE; @@ -236,8 +240,26 @@ void * FileThread(void * v_arg) printf("[stream2file] filename: '%s'\n" " myfilename: '%s'\n", filename, myfilename); if (fd2 != -1) + { + if (nhd_ts) + { + time(&file_end_time); + // calculate record time for coolstream neutrino-hd (record time in ms, little endian format) + printf("[stream2file] file record time is: %lu sec \n", file_end_time - file_start_time); + //printf("DEBUG - stream2file.cpp: CS file_record_time is: %lX \n", (file_end_time - file_start_time) * 1000); + // conversion into little endian + cs_file_time = ((((file_end_time - file_start_time) * 1000)>>24)&0xff) | // move byte 3 to byte 0 + ((((file_end_time - file_start_time) * 1000)<<8)&0xff0000) | // move byte 1 to byte 2 + ((((file_end_time - file_start_time) * 1000)>>8)&0xff00) | // move byte 2 to byte 1 + ((((file_end_time - file_start_time) * 1000)<<24)&0xff000000); // byte 0 to byte 3 + //printf("DEBUG - stream2file.cpp: CS file_record_time stored in ts file: %lX \n", cs_file_time); + lseek(fd2, 180, SEEK_SET); + write(fd2, &cs_file_time, 4); + } close(fd2); + } + time(&file_start_time); if ((fd2 = open(filename, flags, REC_FILE_PERMISSIONS)) < 0) { if (errno == EEXIST) { @@ -316,8 +338,24 @@ void * FileThread(void * v_arg) } terminate_thread: if (fd2 != -1) - close (fd2); - + { + if (nhd_ts) + { + time(&file_end_time); + // calculate record time for coolstream neutrino-hd (record time in ms, little endian format) + printf("[stream2file] file record time is: %lu sec \n", file_end_time - file_start_time); + //printf("DEBUG - stream2file.cpp: CS file_record_time is: %lX \n", (file_end_time - file_start_time) * 1000); + // conversion into little endian + cs_file_time = ((((file_end_time - file_start_time) * 1000)>>24)&0xff) | // move byte 3 to byte 0 + ((((file_end_time - file_start_time) * 1000)<<8)&0xff0000) | // move byte 1 to byte 2 + ((((file_end_time - file_start_time) * 1000)>>8)&0xff00) | // move byte 2 to byte 1 + ((((file_end_time - file_start_time) * 1000)<<24)&0xff000000); // byte 0 to byte 3 + //printf("DEBUG - stream2file.cpp: CS file_record_time stored in ts file: %lX \n", cs_file_time); + lseek(fd2, 180, SEEK_SET); + write(fd2, &cs_file_time, 4); + } + close(fd2); + } pthread_exit(NULL); } @@ -522,7 +560,7 @@ stream2file_error_msg_t start_recording(const char * const filename, const unsigned short * const pids, const bool write_ts, const unsigned int ringbuffers, - const bool with_gen_psi ) + const bool with_gen_psi, const bool nhd_compatible_ts ) { int fd; char buf[FILENAMEBUFFERSIZE]; @@ -576,6 +614,9 @@ stream2file_error_msg_t start_recording(const char * const filename, use_o_sync = with_o_sync; use_fdatasync = with_fdatasync; gen_psi = with_gen_psi; + nhd_ts = nhd_compatible_ts; + + activate_compatible_ts(nhd_ts); if (ringbuffers > 4) ringbuffersize = ((1 << 19) << 4); @@ -683,7 +724,7 @@ stream2file_error_msg_t stop_recording(void) mi.clearMovieInfo(&movieinfo); time(&record_end_time); - printf("record time: %lu \n",record_end_time-record_start_time); + printf("[stream2file] record time: %lu sec \n",record_end_time - record_start_time); //load MovieInfo and set record time movieinfo.file.Name = myfilename; movieinfo.file.Name += ".ts"; diff --git a/tuxbox/neutrino/src/driver/stream2file.h b/tuxbox/neutrino/src/driver/stream2file.h index 0a564aa..a19017c 100644 --- a/tuxbox/neutrino/src/driver/stream2file.h +++ b/tuxbox/neutrino/src/driver/stream2file.h @@ -61,7 +61,7 @@ stream2file_error_msg_t start_recording(const char * const filename, const unsigned short * const pids, const bool write_ts = true, const unsigned int ringbuffers = 20, - const bool gen_psi = true); + const bool gen_psi = true, const bool nhd_compatible_ts = false); stream2file_error_msg_t stop_recording(void); #endif diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.cpp b/tuxbox/neutrino/src/driver/vcrcontrol.cpp index 9134307..b0c7bd3 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.cpp +++ b/tuxbox/neutrino/src/driver/vcrcontrol.cpp @@ -896,7 +896,8 @@ bool CVCRControl::CFileDevice::Record(const t_channel_id channel_id, int mode, c pids, sptsmode, RingBuffers, - GenPsi); + GenPsi, + NHD_TS); } CreateTemplateDirectories = true; if (error_msg == STREAM2FILE_OK) diff --git a/tuxbox/neutrino/src/driver/vcrcontrol.h b/tuxbox/neutrino/src/driver/vcrcontrol.h index 6d457a0..dc9e82a 100644 --- a/tuxbox/neutrino/src/driver/vcrcontrol.h +++ b/tuxbox/neutrino/src/driver/vcrcontrol.h @@ -149,6 +149,7 @@ class CVCRControl bool StreamVTxtPid; bool StreamSubtitlePid; bool GenPsi; + bool NHD_TS; unsigned int RingBuffers; virtual CVCRDevices getDeviceType(void) const @@ -161,12 +162,12 @@ class CVCRControl const std::string& epgTitle = "", unsigned char apids = 0, const time_t epg_time = 0, const CTimerd::CTimerEventRepeat eventRepeat = CTimerd::TIMERREPEAT_ONCE); - CFileDevice(const bool stopplayback, const int stopsectionsd, const char * const directory, const unsigned int splitsize, const bool use_o_sync, const bool use_fdatasync, const bool stream_vtxt_pid, const bool stream_subtitle_pid, const unsigned int ringbuffers, const bool gen_psi, bool createTemplateDirectories) + CFileDevice(const bool stopplayback, const int stopsectionsd, const char * const directory, const unsigned int splitsize, const bool use_o_sync, const bool use_fdatasync, const bool stream_vtxt_pid, const bool stream_subtitle_pid, const unsigned int ringbuffers, const bool gen_psi, const bool nhd_compatible_ts, bool createTemplateDirectories) : Directory(directory), FilenameTemplate(""), CreateTemplateDirectories(createTemplateDirectories), SplitSize(splitsize), Use_O_Sync(use_o_sync), Use_Fdatasync(use_fdatasync), StreamVTxtPid(stream_vtxt_pid), - StreamSubtitlePid(stream_subtitle_pid), GenPsi(gen_psi), RingBuffers(ringbuffers) + StreamSubtitlePid(stream_subtitle_pid), GenPsi(gen_psi), NHD_TS(nhd_compatible_ts), RingBuffers(ringbuffers) { StopPlayBack = stopplayback; StopSectionsd = stopsectionsd; diff --git a/tuxbox/neutrino/src/gui/record_setup.cpp b/tuxbox/neutrino/src/gui/record_setup.cpp index fb413da..ab95170 100644 --- a/tuxbox/neutrino/src/gui/record_setup.cpp +++ b/tuxbox/neutrino/src/gui/record_setup.cpp @@ -286,6 +286,8 @@ int CRecordSetup::showRecordSetup() CMenuOptionNumberChooser* oj15 = new CMenuOptionNumberChooser(LOCALE_RECORDINGMENU_MAX_RECTIME, &g_settings.recording_max_rectime, true, 1, 8); oj15->setNumberFormat("%d " + std::string(g_Locale->getText(LOCALE_WORD_HOURS_SHORT))); + CMenuOptionChooser* oj16 = new CMenuOptionChooser(LOCALE_RECORDINGMENU_NHD_COMPATIBLE_TS, &g_settings.recording_nhd_compatible_ts, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true); + CStringInput recordingSettings_filenameTemplate(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, &g_settings.recording_filename_template_default, 21, false, LOCALE_RECORDINGMENU_FILENAME_TEMPLATE_HINT, LOCALE_IPSETUP_HINT_2, "%/-_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "); CMenuForwarder* mf11 = new CMenuForwarder(LOCALE_RECORDINGMENU_FILENAME_TEMPLATE, true, g_settings.recording_filename_template_default, &recordingSettings_filenameTemplate); @@ -344,6 +346,7 @@ int CRecordSetup::showRecordSetup() directRecordingSettings->addItem(oj8); directRecordingSettings->addItem(oj9); directRecordingSettings->addItem(oj14); //gen_psi + directRecordingSettings->addItem(oj16); //nhd_compatible_ts int res = recordingSettings->exec(NULL, ""); selected = recordingSettings->getSelected(); diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index 054ad0a..a6ef809 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -576,7 +576,8 @@ int CNeutrinoApp::loadSetup() g_settings.recording_filename_template[i] = configfile.getString("recording_filename_template_" + i_str, "" ); strcpy(g_settings.recording_splitsize[i], configfile.getString("recording_splitsize_" + i_str, "" ).c_str()); } - g_settings.recording_gen_psi = configfile.getBool("recordingmenu.gen_psi", true); + g_settings.recording_gen_psi = configfile.getBool("recordingmenu.gen_psi", true); + g_settings.recording_nhd_compatible_ts = configfile.getBool("recordingmenu.nhd_compatible_ts", true); //streaming (server) g_settings.streaming_type = configfile.getInt32( "streaming_type", 0 ); @@ -1074,6 +1075,7 @@ void CNeutrinoApp::saveSetup() configfile.setBool ("recordingmenu.stream_subtitle_pid" , g_settings.recording_stream_subtitle_pid); configfile.setInt32 ("recordingmenu.ringbuffers" , g_settings.recording_ringbuffers); configfile.setBool ("recordingmenu.gen_psi" , g_settings.recording_gen_psi); + configfile.setBool ("recordingmenu.nhd_compatible_ts" , g_settings.recording_nhd_compatible_ts); configfile.setInt32 ("recording_choose_direct_rec_dir" , g_settings.recording_choose_direct_rec_dir); configfile.setBool ("recording_in_spts_mode" , g_settings.recording_in_spts_mode ); configfile.setBool ("recording_zap_on_announce" , g_settings.recording_zap_on_announce ); @@ -1960,7 +1962,16 @@ void CNeutrinoApp::setupRecordingDevice(void) sscanf(g_settings.recording_splitsize_default, "%u", &splitsize); ringbuffers = g_settings.recording_ringbuffers; - recordingdevice = new CVCRControl::CFileDevice(g_settings.recording_stopplayback, g_settings.recording_stopsectionsd, g_settings.recording_dir[0].c_str(), splitsize, g_settings.recording_use_o_sync, g_settings.recording_use_fdatasync, g_settings.recording_stream_vtxt_pid, g_settings.recording_stream_subtitle_pid, ringbuffers, g_settings.recording_gen_psi, true); + recordingdevice = new CVCRControl::CFileDevice (g_settings.recording_stopplayback, + g_settings.recording_stopsectionsd, + g_settings.recording_dir[0].c_str(), + splitsize, + g_settings.recording_use_o_sync, + g_settings.recording_use_fdatasync, + g_settings.recording_stream_vtxt_pid, + g_settings.recording_stream_subtitle_pid, + ringbuffers, g_settings.recording_gen_psi, + g_settings.recording_nhd_compatible_ts, true); CVCRControl::getInstance()->registerDevice(recordingdevice); } diff --git a/tuxbox/neutrino/src/system/locals.h b/tuxbox/neutrino/src/system/locals.h index 9cad528..ced7f2f 100644 --- a/tuxbox/neutrino/src/system/locals.h +++ b/tuxbox/neutrino/src/system/locals.h @@ -1224,6 +1224,7 @@ typedef enum LOCALE_RECORDINGMENU_HEAD, LOCALE_RECORDINGMENU_HELP, LOCALE_RECORDINGMENU_MAX_RECTIME, + LOCALE_RECORDINGMENU_NHD_COMPATIBLE_TS, LOCALE_RECORDINGMENU_NO_SCART, LOCALE_RECORDINGMENU_OFF, LOCALE_RECORDINGMENU_RECORD_IN_SPTS_MODE, diff --git a/tuxbox/neutrino/src/system/locals_intern.h b/tuxbox/neutrino/src/system/locals_intern.h index eea4202..75818c4 100644 --- a/tuxbox/neutrino/src/system/locals_intern.h +++ b/tuxbox/neutrino/src/system/locals_intern.h @@ -1224,6 +1224,7 @@ const char * locale_real_names[] = "recordingmenu.head", "recordingmenu.help", "recordingmenu.max_rectime", + "recordingmenu.nhd_compatible_ts", "recordingmenu.no_scart", "recordingmenu.off", "recordingmenu.record_in_spts_mode", diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h index 66eb16c..1bb9e34 100644 --- a/tuxbox/neutrino/src/system/settings.h +++ b/tuxbox/neutrino/src/system/settings.h @@ -283,6 +283,7 @@ struct { std::string recording_filename_template[MAX_RECORDING_DIR]; char recording_splitsize[MAX_RECORDING_DIR][10]; int recording_gen_psi; + int recording_nhd_compatible_ts; //streaming int streaming_type; ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/data/locale/deutsch.locale | 1 + tuxbox/neutrino/data/locale/english.locale | 1 + tuxbox/neutrino/src/driver/genpsi.c | 28 +++++++++++++- tuxbox/neutrino/src/driver/genpsi.h | 1 + tuxbox/neutrino/src/driver/stream2file.cpp | 53 ++++++++++++++++++++++++--- tuxbox/neutrino/src/driver/stream2file.h | 2 +- tuxbox/neutrino/src/driver/vcrcontrol.cpp | 3 +- tuxbox/neutrino/src/driver/vcrcontrol.h | 5 ++- tuxbox/neutrino/src/gui/record_setup.cpp | 3 ++ tuxbox/neutrino/src/neutrino.cpp | 15 +++++++- tuxbox/neutrino/src/system/locals.h | 1 + tuxbox/neutrino/src/system/locals_intern.h | 1 + tuxbox/neutrino/src/system/settings.h | 1 + 13 files changed, 101 insertions(+), 14 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-08 20:49:13
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via e7580f6382be79d23e51486b3af889a317ffc80c (commit) from b5fb984270c44c20e633cd8f398a2d0f9903681b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e7580f6382be79d23e51486b3af889a317ffc80c Author: GetAway <get...@t-...> Date: Mon Jun 8 22:48:17 2015 +0200 sectionsd: move adjtime to sectionsd - more structure for timethread Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp index f628bb0..24a8cdc 100644 --- a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp @@ -83,7 +83,7 @@ #include "SIsections.hpp" #include "SIlanguage.hpp" -#define SECTIONSD_VERSION "1.348" +#define SECTIONSD_VERSION "1.349" // 60 Minuten Zyklus... #define TIME_EIT_SCHEDULED_PAUSE 60 * 60 @@ -170,6 +170,7 @@ static long secondsExtendedTextCache; //static long oldEventsAre = 60*60L; // 2h (sometimes want to know something about current/last movie) static long oldEventsAre; static int scanning = 1; +static long long timediff; std::string epg_filter_dir = "/var/tuxbox/config/zapit/epgfilter.xml"; static bool epg_filter_is_whitelist = false; @@ -6822,6 +6823,62 @@ static void parseDescriptors(const char *des, unsigned len, const char *countryC } */ +static void setSystemTime(time_t tim) +{ + struct timeval tv; + struct tm t; + time_t now = time(NULL); + struct tm *tmTime = localtime_r(&now, &t); + + gettimeofday(&tv, NULL); + timediff = (long long)(tim * 1000000 - (tv.tv_usec + tv.tv_sec * 1000000)); + char tbuf[26]; + ctime_r(&tim, tbuf); + xprintf("[%sThread] timediff %lld, current: %02d.%02d.%04d %02d:%02d:%02d, dvb: %s", "time", timediff, + tmTime->tm_mday, tmTime->tm_mon+1, tmTime->tm_year+1900, + tmTime->tm_hour, tmTime->tm_min, tmTime->tm_sec, tbuf); + + + if (timediff == 0) /* very unlikely... :-) */ + return; + + time_t diff_time = tim - tv.tv_sec; + if (timeset && abs(diff_time) < 120) { /* abs() is int */ + struct timeval oldd; + tv.tv_sec = time_t(timediff / 1000000LL); + tv.tv_usec = suseconds_t(timediff % 1000000LL); + if (adjtime(&tv, &oldd)) + xprintf("adjtime(%d, %d) failed: %m\n", (int)tv.tv_sec, (int)tv.tv_usec); + else { + xprintf("difference is < 120s (%lds), using adjtime(%d, %d). oldd(%d, %d)\n", diff_time, + (int)tv.tv_sec, (int)tv.tv_usec, (int)oldd.tv_sec, (int)oldd.tv_usec); + timediff = 0; + return; + } + } + + if (timeset) + xprintf("[%sThread] difference is %lds, stepping...\n", "time", diff_time); + tv.tv_sec = tim; + tv.tv_usec = 0; + if (settimeofday(&tv, NULL) < 0) + perror("[sectionsd] settimeofday"); +} + +static void setTimeSet(void) +{ + pthread_mutex_lock(&timeIsSetMutex); + timeset = true; + pthread_cond_broadcast(&timeIsSetCond); + pthread_mutex_unlock(&timeIsSetMutex ); +} + +static void sendTimeEvent(void) +{ + if (timediff) + eventServer->sendEvent(CSectionsdClient::EVT_TIMESET, CEventServer::INITID_SECTIONSD, &timediff, sizeof(timediff)); + setTimeSet(); +} static void *timeThread(void *) { @@ -6833,7 +6890,6 @@ static void *timeThread(void *) struct timeval now; bool time_ntp = false; bool success = true; - long long timediff; try { @@ -6844,32 +6900,18 @@ static void *timeThread(void *) while(1) { - timediff = 0; if (bTimeCorrect == true){ // sectionsd started with parameter "-tc" if (first_time == true) { // only do this once! - time_t actTime; - actTime=time(NULL); - pthread_mutex_lock(&timeIsSetMutex); - timeset = true; - pthread_cond_broadcast(&timeIsSetCond); - pthread_mutex_unlock(&timeIsSetMutex ); - eventServer->sendEvent(CSectionsdClient::EVT_TIMESET, CEventServer::INITID_SECTIONSD, &actTime, sizeof(actTime) ); + sendTimeEvent(); printf("[timeThread] Time is already set by system, no further timeThread work!\n"); break; } } - else if ( ntpenable && system( ntp_system_cmd.c_str() ) == 0) { - time_t actTime; - actTime=time(NULL); first_time = false; - pthread_mutex_lock(&timeIsSetMutex); - timeset = true; time_ntp = true; - pthread_cond_broadcast(&timeIsSetCond); - pthread_mutex_unlock(&timeIsSetMutex ); - eventServer->sendEvent(CSectionsdClient::EVT_TIMESET, CEventServer::INITID_SECTIONSD, &actTime, sizeof(actTime) ); + sendTimeEvent(); } else if (scanning && dvb_time_update) { @@ -6890,21 +6932,9 @@ static void *timeThread(void *) } } } - - struct tm tmTime; - time_t actTime = time(NULL); - localtime_r(&actTime, &tmTime); - struct timeval lt; - gettimeofday(<, NULL); - timediff = (long long)tim * 1000000LL - (lt.tv_usec + lt.tv_sec * 1000000LL); - char tbuf[26]; - xprintf("[%sThread] timediff %lld, current: %02d.%02d.%04d %02d:%02d:%02d, dvb: %s", "time", timediff, tmTime.tm_mday, tmTime.tm_mon+1, tmTime.tm_year+1900, tmTime.tm_hour, tmTime.tm_min, tmTime.tm_sec, ctime_r(&tim, tbuf)); - pthread_mutex_lock(&timeIsSetMutex); - timeset = true; + setSystemTime(tim); time_ntp= false; - pthread_cond_broadcast(&timeIsSetCond); - pthread_mutex_unlock(&timeIsSetMutex ); - eventServer->sendEvent(CSectionsdClient::EVT_TIMESET, CEventServer::INITID_SECTIONSD, &tim, sizeof(tim)); + sendTimeEvent(); } } diff --git a/tuxbox/neutrino/src/driver/rcinput.cpp b/tuxbox/neutrino/src/driver/rcinput.cpp index a3bd64f..acf2bf9 100644 --- a/tuxbox/neutrino/src/driver/rcinput.cpp +++ b/tuxbox/neutrino/src/driver/rcinput.cpp @@ -1311,6 +1311,7 @@ void CRCInput::getMsg_us(neutrino_msg_t *msg, neutrino_msg_data_t *data, unsigne { case CSectionsdClient::EVT_TIMESET: { +#if 0 gettimeofday(&tv, NULL); long long timeOld = tv.tv_usec + tv.tv_sec * 1000000LL; long long timediff; @@ -1349,15 +1350,17 @@ void CRCInput::getMsg_us(neutrino_msg_t *msg, neutrino_msg_data_t *data, unsigne delete [] p; p = new unsigned char[sizeof(long long)]; *(long long*) p = timeNew - timeOld; - +#endif + printf("[neutrino] CSectionsdClient::EVT_TIMESET: timediff %lld \n", *(long long*) p); + /* FIXME what this code really do ? */ if ((long long)last_keypress > *(long long*)p) last_keypress += *(long long *)p; - // Timer anpassen +#if 0 // Timer anpassen for (std::vector<timer>::iterator e = timers.begin(); e != timers.end(); ++e) if (e->correct_time) e->times_out += *(long long*) p; - +#endif *msg = NeutrinoMessages::EVT_TIMESET; *data = (neutrino_msg_data_t) p; dont_delete_p = true; ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp | 94 +++++++++++++++-------- tuxbox/neutrino/src/driver/rcinput.cpp | 9 ++- 2 files changed, 68 insertions(+), 35 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-07 13:20:37
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via b5fb984270c44c20e633cd8f398a2d0f9903681b (commit) from f63448b80a8b344b674c79b3edd7a2bb96e52bd2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b5fb984270c44c20e633cd8f398a2d0f9903681b Author: GetAway <get...@t-...> Date: Sun Jun 7 15:20:00 2015 +0200 sectionsd: move some debug code small cleanup Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp index 916088b..f628bb0 100644 --- a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp @@ -83,7 +83,7 @@ #include "SIsections.hpp" #include "SIlanguage.hpp" -#define SECTIONSD_VERSION "1.347" +#define SECTIONSD_VERSION "1.348" // 60 Minuten Zyklus... #define TIME_EIT_SCHEDULED_PAUSE 60 * 60 @@ -354,6 +354,18 @@ static time_t messaging_last_requested = time(NULL); static bool messaging_neutrino_sets_time = false; //static bool messaging_WaitForServiceDesc = false; +/* helper function for the housekeeping-thread */ +static void print_meminfo(void) +{ + if (!debug) + return; + + struct mallinfo meminfo = mallinfo(); + dprintf("total size of memory occupied by chunks handed out by malloc: %d\n" + "total bytes memory allocated with `sbrk' by malloc, in bytes: %d (%dkB)\n", + meminfo.uordblks, meminfo.arena, meminfo.arena / 1024); +} + inline bool waitForTimeset(void) { pthread_mutex_lock(&timeIsSetMutex); @@ -1178,18 +1190,18 @@ xmlNodePtr FindTransponder(xmlNodePtr provider, const t_original_network_id onid static void removeOldEvents(const long seconds) { - bool goodtimefound; std::vector<event_id_t> to_delete; // Alte events loeschen time_t zeit = time(NULL); readLockEvents(); + unsigned total_events = mySIeventsOrderUniqueKey.size(); MySIeventsOrderFirstEndTimeServiceIDEventUniqueKey::iterator e = mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.begin(); while ((e != mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.end()) && (!messaging_zap_detected)) { - goodtimefound = false; + bool goodtimefound = false; for (SItimes::iterator t = (*e)->times.begin(); t != (*e)->times.end(); ++t) { if (t->startzeit + (long)t->dauer >= zeit - seconds) { goodtimefound=true; @@ -1201,7 +1213,7 @@ static void removeOldEvents(const long seconds) if (false == goodtimefound) to_delete.push_back((*e)->uniqueKey()); ++e; - } + } unlockEvents(); while (!to_delete.empty()) @@ -1210,6 +1222,13 @@ static void removeOldEvents(const long seconds) to_delete.pop_back(); } + if (debug) { + readLockEvents(); + print_meminfo(); + xprintf("[sectionsd] Removed %d old events (%d left), zap detected %d.\n", (int)(total_events - mySIeventsOrderUniqueKey.size()), (int)mySIeventsOrderUniqueKey.size(), messaging_zap_detected); + unlockEvents(); + } + return; } @@ -1229,6 +1248,7 @@ static void removeWasteEvents() bool lastidfound = true; readLockEvents(); + unsigned total_events = mySIeventsOrderUniqueKey.size(); MySIeventsOrderUniqueKey::iterator e = mySIeventsOrderUniqueKey.begin(); @@ -1300,6 +1320,13 @@ static void removeWasteEvents() to_delete.pop_back(); } + if (debug) { + readLockEvents(); + print_meminfo(); + xprintf("[sectionsd] Removed %d waste events (%d left), zap detected %d.\n", (int)(total_events - mySIeventsOrderUniqueKey.size()), (int)mySIeventsOrderUniqueKey.size(), messaging_zap_detected); + unlockEvents(); + } + xmlFreeDoc(service_parser); return; } @@ -8204,18 +8231,6 @@ static void *pptThread(void *) #endif -/* helper function for the housekeeping-thread */ -static void print_meminfo(void) -{ - if (!debug) - return; - - struct mallinfo meminfo = mallinfo(); - dprintf("total size of memory occupied by chunks handed out by malloc: %d\n" - "total bytes memory allocated with `sbrk' by malloc, in bytes: %d (%dkB)\n", - meminfo.uordblks, meminfo.arena, meminfo.arena / 1024); -} - //--------------------------------------------------------------------- // housekeeping-thread // does cleaning on fetched datas @@ -8248,39 +8263,16 @@ static void *houseKeepingThread(void *) // TODO: maybe we need to stop scanning here?... - readLockEvents(); - - unsigned anzEventsAlt = mySIeventsOrderUniqueKey.size(); - dprintf("before removeoldevents\n"); - unlockEvents(); removeOldEvents(oldEventsAre); // alte Events - dprintf("after removeoldevents\n"); - readLockEvents(); - if (mySIeventsOrderUniqueKey.size() != anzEventsAlt) - { - print_meminfo(); - dprintf("Removed %d old events.\n", anzEventsAlt - mySIeventsOrderUniqueKey.size()); - } - unlockEvents(); -// usleep(100); -// lockEvents(); - anzEventsAlt = mySIeventsOrderUniqueKey.size(); - dprintf("before removewasteepg\n"); + removeWasteEvents(); // Events for channels not in services.xml - dprintf("after removewasteepg\n"); - readLockEvents(); - if (mySIeventsOrderUniqueKey.size() != anzEventsAlt) - { - print_meminfo(); - dprintf("Removed %d waste events.\n", anzEventsAlt - mySIeventsOrderUniqueKey.size()); - } + readLockEvents(); dprintf("Number of sptr events (event-ID): %u\n", mySIeventsOrderUniqueKey.size()); dprintf("Number of sptr events (service-id, start time, event-id): %u\n", mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.size()); dprintf("Number of sptr events (end time, service-id, event-id): %u\n", mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.size()); dprintf("Number of sptr nvod events (event-ID): %u\n", mySIeventsNVODorderUniqueKey.size()); dprintf("Number of cached meta-services: %u\n", mySIeventUniqueKeysMetaOrderServiceUniqueKey.size()); - unlockEvents(); readLockServices(); ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp | 74 ++++++++++------------- 1 files changed, 33 insertions(+), 41 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-03 14:44:40
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via f63448b80a8b344b674c79b3edd7a2bb96e52bd2 (commit) from cd8130fcbb66cf0ff3265d514f806a284338320b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f63448b80a8b344b674c79b3edd7a2bb96e52bd2 Author: GetAway <get...@t-...> Date: Wed Jun 3 16:43:48 2015 +0200 deamons: change versioning Signed-off-by: GetAway <get...@t-...> diff --git a/dvb/zapit/src/zapit.cpp b/dvb/zapit/src/zapit.cpp index 19cdb89..0f1423a 100644 --- a/dvb/zapit/src/zapit.cpp +++ b/dvb/zapit/src/zapit.cpp @@ -1,6 +1,4 @@ /* - * $Id: zapit.cpp,v 1.463 2012/08/14 18:24:12 rhabarber1848 Exp $ - * * zapit - d-box2 linux project * * (C) 2001, 2002 by Philipp Leusmann <fa...@be...> @@ -88,6 +86,9 @@ #ifdef HAVE_TRIPLEDRAGON #include <tdgfx/stb04gfx.h> #endif + +#define ZAPIT_VERSION "1.464" + /* the conditional access module */ CCam *cam = NULL; /* the configuration file */ @@ -3164,7 +3165,7 @@ void loadScanSettings(void) int main(int argc, char **argv) { - fprintf(stdout, "$Id: zapit.cpp,v 1.463 2012/08/14 18:24:12 rhabarber1848 Exp $\n"); + fprintf(stdout, "$Id: zapit.cpp, v%s\n", ZAPIT_VERSION); bool check_lock = true; int opt; diff --git a/tuxbox/neutrino/daemons/timerd/timerd.cpp b/tuxbox/neutrino/daemons/timerd/timerd.cpp index 592ae7d..907c522 100644 --- a/tuxbox/neutrino/daemons/timerd/timerd.cpp +++ b/tuxbox/neutrino/daemons/timerd/timerd.cpp @@ -4,8 +4,6 @@ Copyright (C) 2001 Steffen Hehn 'McClean' Homepage: http://dbox.cyberphoria.org/ - $Id: timerd.cpp,v 1.67 2012/11/01 19:37:34 rhabarber1848 Exp $ - License: GPL This program is free software; you can redistribute it and/or modify @@ -37,6 +35,8 @@ #include <connection/basicserver.h> #include <timerdclient/timerdmsg.h> +#define TIMERD_VERSION "1.68" + int timerd_debug = 0; char *config_file_name = CONFIGFILE; @@ -505,6 +505,8 @@ void usage(FILE *dest) int main(int argc, char **argv) { + fprintf(stdout, "$Id: timerd.cpp, v%s\n", TIMERD_VERSION); + bool do_fork = true; dprintf("startup\n"); ----------------------------------------------------------------------- Summary of changes: dvb/zapit/src/zapit.cpp | 7 ++++--- tuxbox/neutrino/daemons/timerd/timerd.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-03 14:30:34
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via cd8130fcbb66cf0ff3265d514f806a284338320b (commit) from 82dd4747d7b54ffc0938d968f36008fe3e1f935e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cd8130fcbb66cf0ff3265d514f806a284338320b Author: GetAway <get...@t-...> Date: Wed Jun 3 16:29:59 2015 +0200 sectionsd: change versioning; small fix for better legibility of code Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp index 893fc20..916088b 100644 --- a/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp +++ b/tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp @@ -1,6 +1,4 @@ // -// $Id: sectionsd.cpp,v 1.346 2013/03/20 22:40:00 GetAway Exp $ -// // sectionsd.cpp (network daemon for SI-sections) // (dbox-II-project) // @@ -85,8 +83,7 @@ #include "SIsections.hpp" #include "SIlanguage.hpp" -//#include "timerdclient.h" -//#include "../timermanager.h" +#define SECTIONSD_VERSION "1.347" // 60 Minuten Zyklus... #define TIME_EIT_SCHEDULED_PAUSE 60 * 60 @@ -239,6 +236,8 @@ static DMX dmxPPT(0x00, 256); unsigned int privatePid=0; #endif +static int sectionsd_stop = 0; + inline void readLockServices(void) { pthread_rwlock_rdlock(&servicesLock); @@ -2621,7 +2620,7 @@ static void commandDumpStatusInformation(int connfd, char* /*data*/, const unsig char tbuf[26]; snprintf(stati, MAX_SIZE_STATI, - "$Id: sectionsd.cpp,v 1.346 2013/03/20 22:40:00 GetAway Exp $\n" + "$Id: sectionsd.cpp, v%s\n" "%sCurrent time: %s" "Hours to cache: %ld\n" "Hours to cache extended text: %ld\n" @@ -2637,6 +2636,7 @@ static void commandDumpStatusInformation(int connfd, char* /*data*/, const unsig "handed out by malloc: %d (%dkb)\n" "Total bytes memory allocated with `sbrk' by malloc,\n" "in bytes: %d (%dkb)\n", + SECTIONSD_VERSION, #ifdef ENABLE_FREESATEPG "FreeSat enabled\n" #else @@ -8228,7 +8228,7 @@ static void *houseKeepingThread(void *) char servicename[MAX_SIZE_SERVICENAME]; dprintf("housekeeping-thread started.\n"); - for (;;) + while (!sectionsd_stop) { if (count == META_HOUSEKEEPING) { dprintf("meta housekeeping - deleting all transponders, services, bouquets.\n"); @@ -8617,7 +8617,7 @@ int main(int argc, char **argv) struct sched_param parm; - printf("$Id: sectionsd.cpp,v 1.346 2013/03/20 22:40:00 GetAway Exp $\n"); + printf("$Id: sectionsd.cpp, v%s\n", SECTIONSD_VERSION); #ifdef ENABLE_FREESATEPG printf("[sectionsd] FreeSat enabled\n"); #endif ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/daemons/sectionsd/sectionsd.cpp | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-02 14:50:02
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 82dd4747d7b54ffc0938d968f36008fe3e1f935e (commit) via c679a8b741be8c017303abc9b3fb55a8388fdda4 (commit) via 7af02ea5bc01492efc4121b3c4e69959daa22415 (commit) via 830b4d63747354e0f5ab45f4e33a469117938d6a (commit) via 47f57db509ee85139e2bf07e15b2015a04d2dc83 (commit) via 750e94fc6c1ef0fcd43c1692416a38413b5ee1e3 (commit) from 98a2a1858856304bf7bccd73d70cd09443805376 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 82dd4747d7b54ffc0938d968f36008fe3e1f935e Author: [CST] Focus <foc...@gm...> Date: Tue Jun 2 16:44:43 2015 +0200 0 calls timer-list in event-list Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index aa19229..ea360ba 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -433,7 +433,7 @@ eventfinder.start_search Starte Suche eventlistbar.channelswitch Umschalten eventlistbar.eventsort Sortieren eventlistbar.recordevent Aufnehmen -eventlistbar.reload Aktualisieren +eventlistbar.reload Aktual. experimentalsettings Experimentelle Einstellungen experimentalsettings.head Experimentelle Einstellungen favorites.addchannel Der aktuelle Kanal wird dem Bouquet \n"Meine Favoriten" hinzugefügt. \nDie Speicherung benötigt einen Moment... diff --git a/tuxbox/neutrino/src/gui/eventlist.cpp b/tuxbox/neutrino/src/gui/eventlist.cpp index 24bca77..ad20c86 100644 --- a/tuxbox/neutrino/src/gui/eventlist.cpp +++ b/tuxbox/neutrino/src/gui/eventlist.cpp @@ -555,6 +555,20 @@ int EventList::exec(const t_channel_id channel_id, const std::string& channelnam { loop= false; } + else if (msg == CRCInput::RC_0) { + hide(); + + CTimerList *Timerlist = new CTimerList; + Timerlist->exec(NULL, ""); + delete Timerlist; + timerlist.clear(); + g_Timerd->getTimerList (timerlist); + + paintHead(); + paint(); + showFunctionBar(true); + timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); + } #ifdef ENABLE_EPGPLUS else if (msg == CRCInput::RC_epg) { @@ -814,13 +828,14 @@ void EventList::updateSelection(unsigned int newpos) // -- Just display/hide function bar // -- 2004-04-12 rasc // -struct button_label EventListButtons[5] = +struct button_label EventListButtons[6] = { { "", LOCALE_GENERIC_EMPTY }, // timerlist delete / record button { "", LOCALE_EVENTFINDER_SEARCH }, // search button { "", LOCALE_GENERIC_EMPTY }, // timerlist delete / channelswitch { "", LOCALE_EVENTLISTBAR_EVENTSORT }, // sort button - { "", LOCALE_EVENTLISTBAR_RELOAD } // reload button + { "", LOCALE_EVENTLISTBAR_RELOAD }, // reload button + { "", LOCALE_TIMERLIST_NAME } // Timerlist button }; void EventList::showFunctionBar (bool show) @@ -976,9 +991,17 @@ void EventList::showFunctionBar (bool show) keyhelper.get(&dummy, &icon, g_settings.key_channelList_reload); EventListButtons[4].button = icon; + btncaption = g_Locale->getText(LOCALE_EVENTLISTBAR_RELOAD); + cellwidth = std::min(ButtonWidth, iconw + 4 + space + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(btncaption, true)); + // paint 5th button ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[4]); + bx += cellwidth; } + // Button 6 Timerlist - show always + EventListButtons[5].locale = LOCALE_TIMERLIST_NAME; + EventListButtons[5].button = NEUTRINO_ICON_BUTTON_0; + ::paintButtons(frameBuffer, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL], g_Locale, bx, by, ButtonWidth, 1, &EventListButtons[5]); } diff --git a/tuxbox/neutrino/src/gui/sleeptimer.cpp b/tuxbox/neutrino/src/gui/sleeptimer.cpp index 562a2f5..5bd42fd 100644 --- a/tuxbox/neutrino/src/gui/sleeptimer.cpp +++ b/tuxbox/neutrino/src/gui/sleeptimer.cpp @@ -85,9 +85,15 @@ int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &) sprintf(value, "%03d", g_settings.sleeptimer_min); } inbox = new CStringInput(LOCALE_SLEEPTIMERBOX_TITLE, value, 3, LOCALE_SLEEPTIMERBOX_HINT1, LOCALE_SLEEPTIMERBOX_HINT2, "0123456789 ", this, NEUTRINO_ICON_TIMER); - inbox->exec (NULL, ""); + int ret = inbox->exec (NULL, ""); delete inbox; + + /* exit pressed, cancel timer setup */ + if(ret == menu_return::RETURN_REPAINT) + { + return ret; + } return res; } commit c679a8b741be8c017303abc9b3fb55a8388fdda4 Author: Jacek Jendrzej <cra...@go...> Date: Tue Jun 2 09:33:04 2015 +0200 netfile: fix some possible errors with bufsize Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/driver/netfile.cpp b/tuxbox/neutrino/src/driver/netfile.cpp index f638c70..15d3f90 100644 --- a/tuxbox/neutrino/src/driver/netfile.cpp +++ b/tuxbox/neutrino/src/driver/netfile.cpp @@ -370,7 +370,7 @@ int request_file(URL *url) /* if we have a entity, announce it to the server */ if(url->entity[0]) { - snprintf(str, sizeof(str)-1, "Content-Length: %d\r\n", strlen(url->entity)); + snprintf(str, sizeof(str)-1, "Content-Length: %d\r\n", (int)strlen(url->entity)); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); } @@ -548,7 +548,7 @@ void readln(int fd, char *buf) int parse_response(URL *url, void *opt, CSTATE *state) { - char header[2049], /*str[255]*/ str[2048]; // combined with 2nd local str from id3 part + char header[2048], /*str[255]*/ str[2048]; // combined with 2nd local str from id3 part char *ptr, chr=0, lastchr=0; int hlen = 0, response; int meta_interval = 0, rval; diff --git a/tuxbox/neutrino/src/driver/netfile.h b/tuxbox/neutrino/src/driver/netfile.h index 5ea13bb..e5d157b 100644 --- a/tuxbox/neutrino/src/driver/netfile.h +++ b/tuxbox/neutrino/src/driver/netfile.h @@ -191,10 +191,10 @@ typedef struct typedef struct { - char id[4]; + char id[5]; uint32_t size; char flags[3]; - char base[1024]; + char base[2048]; } ID3_frame; #define CRLFCut(a) \ commit 7af02ea5bc01492efc4121b3c4e69959daa22415 Author: Jacek Jendrzej <cra...@go...> Date: Tue Jun 2 09:18:23 2015 +0200 netfile: fix bufsize Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/driver/netfile.cpp b/tuxbox/neutrino/src/driver/netfile.cpp index 8ff3788..f638c70 100644 --- a/tuxbox/neutrino/src/driver/netfile.cpp +++ b/tuxbox/neutrino/src/driver/netfile.cpp @@ -1040,6 +1040,7 @@ FILE *f_open(const char *filename, const char *acctype) for(int i=0; ((ptr != NULL) && (i<25)); ptr = strstr(ptr, "http://") ) { strncpy(servers[i], ptr, 1023); + servers[i][1023] = '\0'; ptr2 = strchr(servers[i], '\n'); if(ptr2) *ptr2 = 0; // change ptr so that next strstr searches in buf and not in servers[i] @@ -1283,6 +1284,7 @@ const char *f_type(FILE *stream, const char *type) { stream_type[i].stream = stream; strncpy(stream_type[i].type, type, 64); + stream_type[i].type[64] = '\0'; dprintf(stderr, "added entry (%s) for %p\n", type, stream); } return type; @@ -1700,7 +1702,8 @@ void ShoutCAST_ParseMetaData(char *md, CSTATE *state) if(!ptr) { ptr = strchr(md, '='); - strncpy(state->title, ptr + 2, 4096); + strncpy(state->title, ptr + 2, 4095); + state->title[4095] = '\0'; if ((ptr = strchr(state->title, '\n')) != NULL) *(ptr - 1) = 0; else if ((ptr = strchr(state->title, ';')) != NULL) @@ -1718,7 +1721,8 @@ void ShoutCAST_ParseMetaData(char *md, CSTATE *state) ptr = strstr(md, "StreamTitle="); ptr = strchr(ptr, '\''); - strncpy(state->artist, ptr + 1, 4096); + strncpy(state->artist, ptr + 1, 4095); + state->artist[4095] = '\0'; ptr = strstr(state->artist, " - "); if(!ptr) ptr = strstr(state->artist, ", "); commit 830b4d63747354e0f5ab45f4e33a469117938d6a Author: Jacek Jendrzej <cra...@go...> Date: Tue Jun 2 09:12:13 2015 +0200 netfile: fix compile Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/driver/netfile.cpp b/tuxbox/neutrino/src/driver/netfile.cpp index 1fb571c..8ff3788 100644 --- a/tuxbox/neutrino/src/driver/netfile.cpp +++ b/tuxbox/neutrino/src/driver/netfile.cpp @@ -1082,7 +1082,7 @@ FILE *f_open(const char *filename, const char *acctype) /* magic, if there is any */ for (int i = 0; i < known_magic_count; i++) { - if (((*(uint32_t *)&(magic[0])) & *(uint32_t *)&(known_magic[i].mask[0])) == *(uint32_t *)&(known_magic[i].mode[0])) + if (((*(unsigned char *)&(magic[0])) & *(unsigned char *)&(known_magic[i].mask[0])) == *(unsigned char *)&(known_magic[i].mode[0])) { f_type(fd, known_magic[i].type); goto magic_found; commit 47f57db509ee85139e2bf07e15b2015a04d2dc83 Author: GetAway <get...@t-...> Date: Tue Jun 2 09:01:39 2015 +0200 netfile: small fix for caching Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/driver/netfile.cpp b/tuxbox/neutrino/src/driver/netfile.cpp index ea68226..1fb571c 100644 --- a/tuxbox/neutrino/src/driver/netfile.cpp +++ b/tuxbox/neutrino/src/driver/netfile.cpp @@ -1154,6 +1154,8 @@ int f_close(FILE *stream) dprintf(stderr, "f_close: waiting for fill tread to finish\n"); pthread_join(cache[i].fill_thread, NULL); + cache[i].fill_thread = 0; + dprintf(stderr, "f_close: closing cache\n"); rval = fclose(cache[i].fd); /* close the stream */ free(cache[i].cache); /* free the cache */ commit 750e94fc6c1ef0fcd43c1692416a38413b5ee1e3 Author: GetAway <get...@t-...> Date: Tue Jun 2 08:48:32 2015 +0200 netfile: never used value Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/driver/netfile.cpp b/tuxbox/neutrino/src/driver/netfile.cpp index 74b79ca..ea68226 100644 --- a/tuxbox/neutrino/src/driver/netfile.cpp +++ b/tuxbox/neutrino/src/driver/netfile.cpp @@ -1002,7 +1002,7 @@ FILE *f_open(const char *filename, const char *acctype) case MODE_PLS: { char *ptr2, /*buf[4096], use local buf from function */ servers[25][1024]; - int rval, retries = retry_num; + int /*rval,*/ retries = retry_num; ptr = NULL; /* fetch the playlist from the shoutcast directory with our own */ @@ -1018,7 +1018,7 @@ FILE *f_open(const char *filename, const char *acctype) /* operating system because we don't need/want stream caching for */ /* this operation */ - rval = fread(buf, sizeof(char), 4096, fd); + /*rval =*/fread(buf, sizeof(char), 4096, fd); f_close(fd); ptr = strstr(buf, "http://"); ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/data/locale/deutsch.locale | 2 +- tuxbox/neutrino/src/driver/netfile.cpp | 20 +++++++++++++------- tuxbox/neutrino/src/driver/netfile.h | 4 ++-- tuxbox/neutrino/src/gui/eventlist.cpp | 27 +++++++++++++++++++++++++-- tuxbox/neutrino/src/gui/sleeptimer.cpp | 8 +++++++- 5 files changed, 48 insertions(+), 13 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-01 21:30:05
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 98a2a1858856304bf7bccd73d70cd09443805376 (commit) from d3f09d1d2a545a728407dbb255eea4b050c8d282 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 98a2a1858856304bf7bccd73d70cd09443805376 Author: GetAway <get...@t-...> Date: Mon Jun 1 23:29:30 2015 +0200 helper.cpp: close va_list before return Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/system/helper.cpp b/tuxbox/neutrino/src/system/helper.cpp index 1681c1b..740cad0 100644 --- a/tuxbox/neutrino/src/system/helper.cpp +++ b/tuxbox/neutrino/src/system/helper.cpp @@ -84,6 +84,7 @@ int my_system(int argc, const char *arg, ...) if (i == argv_max) { fprintf(stderr, "my_system: too many arguments!\n"); + va_end(args); return -1; } argv[i] = va_arg(args, const char *); ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/system/helper.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-01 20:15:18
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via d3f09d1d2a545a728407dbb255eea4b050c8d282 (commit) from 0be97e87fa41e35f92c666a5bb6e148ae758a209 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d3f09d1d2a545a728407dbb255eea4b050c8d282 Author: Stefan Seyfried <se...@tu...> Date: Mon Jun 1 22:14:43 2015 +0200 this threw a lot of "warning: suggest a space before ';' or explicit braces around empty body in 'for' statement" Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/driver/netfile.cpp b/tuxbox/neutrino/src/driver/netfile.cpp index a8e7165..74b79ca 100644 --- a/tuxbox/neutrino/src/driver/netfile.cpp +++ b/tuxbox/neutrino/src/driver/netfile.cpp @@ -523,7 +523,7 @@ int request_file(URL *url) if(_ptr) \ { \ _ptr = strchr(_ptr, ':'); \ - for(; !isalnum(*_ptr); _ptr++); \ + for(; !isalnum(*_ptr); _ptr++) {}; \ b = atoi(_ptr); \ } else b = -1; } @@ -534,7 +534,7 @@ int request_file(URL *url) { \ unsigned int i; \ _ptr = strchr(_ptr, ':'); \ - for(_ptr++; isspace(*_ptr); _ptr++); \ + for(_ptr++; isspace(*_ptr); _ptr++) {}; \ for (i=0; (_ptr[i]!='\n') && (_ptr[i]!='\r') && (_ptr[i]!='\0') && (i<sizeof(b)); i++) b[i] = _ptr[i]; \ b[i] = 0; \ } } @@ -749,7 +749,7 @@ FILE *f_open(const char *filename, const char *acctype) URL url; FILE *fd; int /*i,*/ compatibility_mode = 0; - char *ptr = NULL, buf[4096], type[10]; + char *ptr = NULL, buf[4096] = {0} , type[10] = {0}; if(acctype) strcpy(type, acctype); @@ -1674,7 +1674,7 @@ int f_status(FILE *stream, void (*cb)(void*)) /* information into the CSTATE structure */ void ShoutCAST_ParseMetaData(char *md, CSTATE *state) { - #define SKIP(a) for(;(a && !isalnum(*a)); ++a); + #define SKIP(a) for(;(a && !isalnum(*a)); ++a) {}; char *ptr; /* abort if we were submitted a NULL pointer */ ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/driver/netfile.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-01 19:54:09
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 0be97e87fa41e35f92c666a5bb6e148ae758a209 (commit) from 2c580c15d234fec3f041e1343322cf8408d5a9fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0be97e87fa41e35f92c666a5bb6e148ae758a209 Author: GetAway <get...@t-...> Date: Mon Jun 1 21:53:39 2015 +0200 netfile: dprintf - fix warning about wrong format Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/driver/netfile.cpp b/tuxbox/neutrino/src/driver/netfile.cpp index 5219024..a8e7165 100644 --- a/tuxbox/neutrino/src/driver/netfile.cpp +++ b/tuxbox/neutrino/src/driver/netfile.cpp @@ -883,7 +883,7 @@ FILE *f_open(const char *filename, const char *acctype) return NULL; } - dprintf(stderr, "f_open: adding stream %x to cache[%d]\n", fd, i); + dprintf(stderr, "f_open: adding stream %p to cache[%d]\n", fd, i); cache[i].fd = fd; cache[i].csize = CACHESIZE; @@ -1136,7 +1136,7 @@ int f_close(FILE *stream) if(cache[i].fd == stream) { - dprintf(stderr, "f_close: removing stream %lx from cache[%d]\n", (size_t)stream, i); + dprintf(stderr, "f_close: removing stream %p from cache[%d]\n", stream, i); cache[i].closed = 1; /* indicate that the cache is closed */ @@ -1270,7 +1270,7 @@ const char *f_type(FILE *stream, const char *type) /* if the stream could not be found, look for a free slot ... */ if(i == CACHEENTMAX) { - dprintf(stderr, "stream %x not in type table, ", stream); + dprintf(stderr, "stream %p not in type table, ", stream); for(i=0 ; (i<CACHEENTMAX) && (stream_type[i].stream != NULL); i++){}; @@ -1281,7 +1281,7 @@ const char *f_type(FILE *stream, const char *type) { stream_type[i].stream = stream; strncpy(stream_type[i].type, type, 64); - dprintf(stderr, "added entry (%s) for %x\n", type, stream); + dprintf(stderr, "added entry (%s) for %p\n", type, stream); } return type; } @@ -1293,7 +1293,7 @@ const char *f_type(FILE *stream, const char *type) /* the stream is already in the table */ else { - dprintf(stderr, "stream %x lookup in type table succeded\n", stream); + dprintf(stderr, "stream %p lookup in type table succeded\n", stream); if(!type) return stream_type[i].type; @@ -1441,12 +1441,12 @@ int push(FILE *fd, char *buf, long len) } else { - dprintf(stderr, "push: no cache present for stream %0x\n", fd); + dprintf(stderr, "push: no cache present for stream %p\n", fd); rval = -1; } // dprintf(stderr, "push: exitstate: [filled: %d of %d], stream: %x\n", cache[i].filled, CACHESIZE, fd); - dprintf(stderr, "push: exitstate: [filled: %3.1f %%], stream: %x\r", 100.0 * (float)cache[i].filled / (float)cache[i].csize, fd); + dprintf(stderr, "push: exitstate: [filled: %3.1f %%], stream: %p\r", 100.0 * (float)cache[i].filled / (float)cache[i].csize, fd); return rval; } @@ -1461,8 +1461,8 @@ int pop(FILE *fd, char *buf, long len) if(i < 0) return -1; - dprintf(stderr, "pop: %d bytes requested [filled: %d of %d], stream: %lx\n", - len, cache[i].filled, CACHESIZE, (size_t)fd); + dprintf(stderr, "pop: %d bytes requested [filled: %d of %d], stream: %p buf %p\n", + (int)len, (int)cache[i].filled, (int)CACHESIZE, fd, buf); if(cache[i].fd == fd) { @@ -1508,8 +1508,8 @@ int pop(FILE *fd, char *buf, long len) if(amt[j]) { - dprintf(stderr, "pop(): rptr: 0x%08x, buf: 0x%08x, amt[%d]=%d, blen=%d, len=%d, rval=%d\n", - cache[i].rptr, buf, j, amt[j], blen, len, rval); + dprintf(stderr, "pop(): rptr: %p, buf: %p, amt[%d]=%d, blen=%d, len=%d, rval=%d\n", + cache[i].rptr, buf, j, amt[j], blen, (int)len, rval); memmove(buf, cache[i].rptr, amt[j]); @@ -1523,7 +1523,7 @@ int pop(FILE *fd, char *buf, long len) } } - dprintf(stderr, "pop: %d/%d/%d bytes read [filled: %d of %d], stream: %x\n", amt[0] + amt[1], rval, len, cache[i].filled, CACHESIZE, fd); + dprintf(stderr, "pop: %d/%d/%d bytes read [filled: %d of %d], stream: %p\n", amt[0] + amt[1], rval, (int)len, (int)cache[i].filled, (int)CACHESIZE, fd); /* if the cache is closed and empty, then */ /* force the end condition to be met */ @@ -1556,7 +1556,7 @@ int pop(FILE *fd, char *buf, long len) } else { - dprintf(stderr, "pop: no cache present for stream %0x\n", fd); + dprintf(stderr, "pop: no cache present for stream %p\n", fd); rval = -1; } @@ -1581,7 +1581,7 @@ void CacheFillThread(void *c) if(scache->closed) return; - dprintf(stderr, "CacheFillThread: thread started, using stream %8x\n", scache->fd); + dprintf(stderr, "CacheFillThread: thread started, using stream %p\n", scache->fd); buf = (char*)malloc(CACHEBTRANS); @@ -1627,7 +1627,7 @@ void CacheFillThread(void *c) pthread_mutex_unlock( &scache->readable ); /* ... and exit this thread. */ - dprintf(stderr, "CacheFillThread: thread exited, stream %8x \n", scache->fd); + dprintf(stderr, "CacheFillThread: thread exited, stream %p \n", scache->fd); free(buf); pthread_exit(0); @@ -1681,7 +1681,7 @@ void ShoutCAST_ParseMetaData(char *md, CSTATE *state) if((!md) || (!state)) return; - dprintf(stderr, "ShoutCAST_ParseMetaData(%x : %s, %x)\n", md, md, state); + dprintf(stderr, "ShoutCAST_ParseMetaData(%p : %s, %p)\n", md, md, state); ptr = strstr(md, "StreamTitle="); ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/driver/netfile.cpp | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-01 19:26:59
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 2c580c15d234fec3f041e1343322cf8408d5a9fc (commit) from 77bc28568f4c142acbe789c6dc85c7211672a55e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2c580c15d234fec3f041e1343322cf8408d5a9fc Author: Stefan Seyfried <se...@tu...> Date: Mon Jun 1 21:26:20 2015 +0200 netfile: making f_type const char * Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/driver/netfile.cpp b/tuxbox/neutrino/src/driver/netfile.cpp index 9547dfd..5219024 100644 --- a/tuxbox/neutrino/src/driver/netfile.cpp +++ b/tuxbox/neutrino/src/driver/netfile.cpp @@ -202,7 +202,7 @@ static int base64_encode(char *dest, const char *src); void getOpts() { - char *dirs[] = { "/var/etc", ".", NULL }; + const char *dirs[] = { "/var/etc", ".", NULL }; char buf[4096], *ptr; int i; FILE *fd = NULL; @@ -1084,7 +1084,7 @@ FILE *f_open(const char *filename, const char *acctype) { if (((*(uint32_t *)&(magic[0])) & *(uint32_t *)&(known_magic[i].mask[0])) == *(uint32_t *)&(known_magic[i].mode[0])) { - f_type(fd, (char *)known_magic[i].type); + f_type(fd, known_magic[i].type); goto magic_found; } } @@ -1260,7 +1260,7 @@ size_t f_read (void *ptr, size_t size, size_t nitems, FILE *stream) return rval; } -char *f_type(FILE *stream, char *type) +const char *f_type(FILE *stream, const char *type) { int i; diff --git a/tuxbox/neutrino/src/driver/netfile.h b/tuxbox/neutrino/src/driver/netfile.h index 97a89e1..5ea13bb 100644 --- a/tuxbox/neutrino/src/driver/netfile.h +++ b/tuxbox/neutrino/src/driver/netfile.h @@ -83,7 +83,7 @@ extern long f_tell(FILE *); extern void f_rewind(FILE *); extern int f_seek(FILE *, long, int); extern int f_status(FILE *, void (*)(void*)); -extern char *f_type(FILE*, char*); +extern const char *f_type(FILE*, const char*); extern char err_txt[2048]; ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/driver/netfile.cpp | 6 +++--- tuxbox/neutrino/src/driver/netfile.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-06-01 18:04:06
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via d7dbf0bfb2b4a4df170726183ec0091183a0a49b (commit) from 78ea901b62850700783d7b95fd552e9c9dbf76a6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d7dbf0bfb2b4a4df170726183ec0091183a0a49b Author: GetAway <get...@t-...> Date: Mon Jun 1 20:03:17 2015 +0200 bump version gcc-4.1.2-patches-1.5.tar.bz2 update link Signed-off-by: GetAway <get...@t-...> diff --git a/rules-archive b/rules-archive index 185e4b4..71d7528 100644 --- a/rules-archive +++ b/rules-archive @@ -22,7 +22,7 @@ gcc-core-3.4.6.tar.bz2;ftp://$(gnuserver)/../../../gcc/releases/gcc-3.4.6 gcc-g++-3.4.6.tar.bz2;ftp://$(gnuserver)/../../../gcc/releases/gcc-3.4.6 gcc-core-4.1.2.tar.bz2;ftp://$(gnuserver)/../../../gcc/releases/gcc-4.1.2 gcc-g++-4.1.2.tar.bz2;ftp://$(gnuserver)/../../../gcc/releases/gcc-4.1.2 -gcc-4.1.2-patches-1.3.tar.bz2;http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles +gcc-4.1.2-patches-1.5.tar.bz2;http://dev.gentoo.org/~vapier/dist 100-uclibc-conf.patch;http://wl500g.googlecode.com/svn-history/r1623/toolchain/toolchain/gcc/patches/4.1.2 200-uclibc-locale.patch;http://wl500g.googlecode.com/svn-history/r1623/toolchain/toolchain/gcc/patches/4.1.2 glibc-2.3.6.tar.bz2;ftp://ftp.gnu.org/gnu/glibc diff --git a/rules-make b/rules-make index 592253c..2cd5ce7 100644 --- a/rules-make +++ b/rules-make @@ -17,9 +17,9 @@ linux24;2.4.37.11-dbox2;linux-2.4.37.11;linux-2.4.37.11.tar.bz2:linux-2.4-dbox2. linux;2.6.26.8-dbox2;linux-2.6.26.8;linux-2.6.26.8.tar.bz2:squashfs3.0.tar.gz:linux-2.6.26.4-dbox2.diff:linux-2.6.25-create-console.diff:linux-2.6.25-squashfs3.0.diff:linux-2.6.25.6-squashfs3.0.diff:linux-2.6.25.6-squashfs3.0_lzma.diff:linux-2.6-jffs2_lzma.diff;remove:linux;extract:linux-2.6.26.8.tar.bz2;extract:squashfs3.0.tar.gz;move:squashfs3.0/linux-2.6.15/squashfs3.0-patch:Patches/squashfs3.0_2.6-patch;remove:squashfs3.0;patch:linux-2.6.26.4-dbox2.diff;patch:linux-2.6.25-create-console.diff;patch:linux-2.6.25-squashfs3.0.diff;patch:squashfs3.0_2.6-patch;patch:linux-2.6.25.6-squashfs3.0.diff;patch:linux-2.6.25.6-squashfs3.0_lzma.diff;patch:linux-2.6.26.8-new-make.patch;link:linux-2.6.26.8:linux binutils;2.24.51.0.3;binutils-2.24.51.0.3;binutils-2.24.51.0.3.tar.gz:binutils.diff;extract:binutils-2.24.51.0.3.tar.gz;patch:binutils.diff;apatch:300-001_ld_makefile_patch.patch;apatch:300-012_check_ldrunpath_length.patch bootstrap_gcc;3.4.6;gcc-3.4.6;gcc-core-3.4.6.tar.bz2:gcc-core.diff;extract:gcc-core-3.4.6.tar.bz2;patch:gcc-core.diff -bootstrap_gcc41;4.1.2;gcc-4.1.2;gcc-core-4.1.2.tar.bz2:gcc-4.1.2-patches-1.3.tar.bz2;extract:gcc-core-4.1.2.tar.bz2 +bootstrap_gcc41;4.1.2;gcc-4.1.2;gcc-core-4.1.2.tar.bz2:gcc-4.1.2-patches-1.5.tar.bz2;extract:gcc-core-4.1.2.tar.bz2 gcc;3.4.6;gcc-3.4.6;gcc-core-3.4.6.tar.bz2:gcc-g++-3.4.6.tar.bz2:gcc-core.diff:gcc-binutils.diff;extract:gcc-core-3.4.6.tar.bz2;extract:gcc-g++-3.4.6.tar.bz2;patch:gcc-core.diff;patch:gcc-binutils.diff -gcc41;4.1.2;gcc-4.1.2;gcc-core-4.1.2.tar.bz2:gcc-g++-4.1.2.tar.bz2:gcc-4.1.2-patches-1.3.tar.bz2;extract:gcc-core-4.1.2.tar.bz2;extract:gcc-g++-4.1.2.tar.bz2 +gcc41;4.1.2;gcc-4.1.2;gcc-core-4.1.2.tar.bz2:gcc-g++-4.1.2.tar.bz2:gcc-4.1.2-patches-1.5.tar.bz2;extract:gcc-core-4.1.2.tar.bz2;extract:gcc-g++-4.1.2.tar.bz2 glibc;2.3.6;glibc-2.3.6;glibc-2.3.6.tar.bz2:glibc-linuxthreads-2.3.6.tar.bz2:glibc.diff;extract:glibc-2.3.6.tar.bz2;dirextract:glibc-linuxthreads-2.3.6.tar.bz2;patch:glibc.diff;patch:glibc-2.3.2-new-make.diff uclibc;0.9.30.3;uClibc-0.9.30.3;uClibc-0.9.30.3.tar.bz2:uclibc.diff;extract:uClibc-0.9.30.3.tar.bz2;patch:uclibc.diff watchdog;5.2.4;watchdog-5.2.4.orig;watchdog_5.2.4.orig.tar.gz:watchdog.diff;extract:watchdog_5.2.4.orig.tar.gz;patch:watchdog.diff ----------------------------------------------------------------------- Summary of changes: rules-archive | 2 +- rules-make | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- Tuxbox-GIT: cdk |
From: GetAway <tux...@ne...> - 2015-06-01 10:29:13
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 77bc28568f4c142acbe789c6dc85c7211672a55e (commit) from 9329e5b0197328e27df0467d0ffc13242f0ee05a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 77bc28568f4c142acbe789c6dc85c7211672a55e Author: GetAway <get...@t-...> Date: Mon Jun 1 12:28:37 2015 +0200 ysocket.cpp: fix warning len >= 0 is always true Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ysocket.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ysocket.cpp index 93e1ba6..1e23b08 100644 --- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ysocket.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/ysocket.cpp @@ -66,6 +66,7 @@ CySocket::~CySocket() //----------------------------------------------------------------------------- void CySocket::init(void) { + BytesSend = 0; handling = false; isOpened = false; isValid = true; @@ -302,7 +303,7 @@ int CySocket::Send(char const *buffer, unsigned int length) else #endif len = ::send(sock, buffer, length, MSG_NOSIGNAL); - if(len >= 0) + if(len > 0) BytesSend += len; return len; } @@ -311,7 +312,7 @@ int CySocket::Send(char const *buffer, unsigned int length) //----------------------------------------------------------------------------- bool CySocket::CheckSocketOpen() { - char buffer[32]; + char buffer[32] = { 0 }; #ifdef CONFIG_SYSTEM_CYGWIN return !(recv(sock, buffer, sizeof(buffer), MSG_PEEK | MSG_NOSIGNAL) == 0); ----------------------------------------------------------------------- Summary of changes: .../daemons/nhttpd/yhttpd_core/ysocket.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-05-31 19:56:49
|
Project "Tuxbox-GIT: cdk": The branch, master has been updated via 78ea901b62850700783d7b95fd552e9c9dbf76a6 (commit) from ae11d7818a2bf0565ff2399a9b26739f590bc4a2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 78ea901b62850700783d7b95fd552e9c9dbf76a6 Author: GetAway <get...@t-...> Date: Sun May 31 21:55:59 2015 +0200 bump version giflib-5.1.1 Signed-off-by: GetAway <get...@t-...> diff --git a/rules-archive b/rules-archive index 81f3cab..185e4b4 100644 --- a/rules-archive +++ b/rules-archive @@ -97,7 +97,7 @@ gmp-4.1.2.tar.bz2;ftp://ftp.informatik.rwth-aachen.de/pub/gnu/gmp libmad-0.15.1b.tar.gz;http://prdownloads.sourceforge.net/sourceforge/mad libid3tag-0.15.1b.tar.gz;http://prdownloads.sourceforge.net/sourceforge/mad glib-2.8.3.tar.gz;http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.8 -giflib-5.1.0.tar.bz2;http://prdownloads.sourceforge.net/sourceforge/giflib +giflib-5.1.1.tar.bz2;http://sourceforge.net/projects/giflib/files libiconv-1.9.1.tar.gz;http://ftp.gnu.org/pub/gnu/libiconv flac-1.2.0.tar.gz;http://prdownloads.sourceforge.net/sourceforge/flac gettext-0.17.tar.gz;http://ftp.gnu.org/pub/gnu/gettext diff --git a/rules-make b/rules-make index 1c02e1b..592253c 100644 --- a/rules-make +++ b/rules-make @@ -88,7 +88,7 @@ libvorbisidec;1.0.2+svn15687;libvorbisidec-1.0.2+svn15687;libvorbisidec_1.0.2+sv libxml2;2.4.30;libxml2-2.4.30;libxml2-2.4.30.tar.gz:libxml2.diff;extract:libxml2-2.4.30.tar.gz;patch:libxml2.diff libz;1.2.8;zlib-1.2.8;zlib-1.2.8.tar.gz;extract:zlib-1.2.8.tar.gz libglib;2.8.3;glib-2.8.3;glib-2.8.3.tar.gz;extract:glib-2.8.3.tar.gz -giflib;5.1.0;giflib-5.1.0;giflib-5.1.0.tar.bz2;extract:giflib-5.1.0.tar.bz2 +giflib;5.1.1;giflib-5.1.1;giflib-5.1.1.tar.bz2;extract:giflib-5.1.1.tar.bz2 libiconv;1.9.1;libiconv-1.9.1;libiconv-1.9.1.tar.gz;extract:libiconv-1.9.1.tar.gz libFLAC;1.2.0;flac-1.2.0;flac-1.2.0.tar.gz;extract:flac-1.2.0.tar.gz;patch:flac.diff libgettext;0.17;gettext-0.17;gettext-0.17.tar.gz:gettext.diff;extract:gettext-0.17.tar.gz;patch:gettext.diff ----------------------------------------------------------------------- Summary of changes: rules-archive | 2 +- rules-make | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- Tuxbox-GIT: cdk |
From: GetAway <tux...@ne...> - 2015-05-31 17:19:59
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 9329e5b0197328e27df0467d0ffc13242f0ee05a (commit) from 561f790b26148434212bfc21de9c9f680c1be1ca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9329e5b0197328e27df0467d0ffc13242f0ee05a Author: martii <m4...@gm...> Date: Sun May 31 19:18:31 2015 +0200 gui/keybind_setup: use CMenuOptionNumberChooser instead of CStringInput based on martii's code with some changes for dbox Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/data/locale/deutsch.locale b/tuxbox/neutrino/data/locale/deutsch.locale index c3834cb..aa19229 100644 --- a/tuxbox/neutrino/data/locale/deutsch.locale +++ b/tuxbox/neutrino/data/locale/deutsch.locale @@ -1227,8 +1227,6 @@ recordingmenu.use_o_sync Synchrones Schreiben (O_SYNC) recordingmenu.vcr Videorekorder recordingmenu.zap_on_announce Umschalten bei Ankündigung recordtimer.announce Die Aufnahme beginnt in wenigen Minuten. -repeatblocker.hint_1 Mindestzeit (in ms) zwischen 2 Tastendrücken -repeatblocker.hint_2 0 schaltet den Blocker aus (Rot ist " ") sambaserver.setup Globale Samba-Einstellungen sambaserver.setup_configfile_path Konfigurationsdatei sambaserver.setup_configfile_path_hint1 Bitte Pfad zur Samba-Konfigurationsdatei eingeben! @@ -1559,6 +1557,7 @@ videomenu.videosignal_yuv_c YUV + CVBS videomenu.videosignal_yuv_v YUV + VBS word.from ab word.hours_short Std. +word.milliseconds_short ms word.minutes_short Min. zapit.scantype Service-Auswahl zapit.scantype.all Alle Services diff --git a/tuxbox/neutrino/data/locale/english.locale b/tuxbox/neutrino/data/locale/english.locale index c6cf746..76bcdd1 100644 --- a/tuxbox/neutrino/data/locale/english.locale +++ b/tuxbox/neutrino/data/locale/english.locale @@ -1227,8 +1227,6 @@ recordingmenu.use_o_sync Write Synchronous (O_SYNC) recordingmenu.vcr vcr recordingmenu.zap_on_announce Announce zap recordtimer.announce Recording starts in a few minutes -repeatblocker.hint_1 Shortest time (in ms) to recognize 2 keystrokes -repeatblocker.hint_2 Enter 0 to switch of the blocker (red is space) sambaserver.setup Global Samba-settings sambaserver.setup_configfile_path Configfile sambaserver.setup_configfile_path_hint1 Please enter path for samba config file! @@ -1559,6 +1557,7 @@ videomenu.videosignal_yuv_c YUV + CVBS videomenu.videosignal_yuv_v YUV + VBS word.from from word.hours_short hr. +word.milliseconds_short ms word.minutes_short min. zapit.scantype scan for services zapit.scantype.all all services diff --git a/tuxbox/neutrino/src/gui/audio_setup.cpp b/tuxbox/neutrino/src/gui/audio_setup.cpp index 06ef19e..1728c06 100644 --- a/tuxbox/neutrino/src/gui/audio_setup.cpp +++ b/tuxbox/neutrino/src/gui/audio_setup.cpp @@ -91,9 +91,9 @@ const CMenuOptionChooser::keyval AUDIOMENU_ANALOGOUT_OPTIONS[AUDIOMENU_ANALOGOUT const CMenuOptionChooser::keyval AUDIOMENU_AVS_CONTROL_OPTIONS[AUDIOMENU_AVS_CONTROL_OPTION_COUNT] = { { CControld::TYPE_OST , LOCALE_AUDIOMENU_OST }, - { CControld::TYPE_AVS , LOCALE_AUDIOMENU_AVS }, + { CControld::TYPE_AVS , LOCALE_AUDIOMENU_AVS } #ifdef ENABLE_LIRC - { CControld::TYPE_LIRC, LOCALE_AUDIOMENU_LIRC } + ,{ CControld::TYPE_LIRC, LOCALE_AUDIOMENU_LIRC } #endif }; #endif @@ -149,8 +149,7 @@ int CAudioSetup::showAudioSetup() audioSettings->addItem(GenericMenuSeparatorLine); #ifdef HAVE_DBOX_HARDWARE - CStringInput audio_PCMOffset(LOCALE_AUDIOMENU_PCMOFFSET, g_settings.audio_PCMOffset, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 ", &audioSetupNotifier); - CMenuForwarder *mf = new CMenuForwarder(LOCALE_AUDIOMENU_PCMOFFSET, (g_settings.audio_avs_Control == CControld::TYPE_LIRC), g_settings.audio_PCMOffset, &audio_PCMOffset); + CMenuOptionNumberChooser *mf = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_PCMOFFSET, &g_settings.audio_PCMOffset, (g_settings.audio_avs_Control == CControld::TYPE_LIRC), 0, 99, 0, 0, NONEXISTANT_LOCALE, NULL, &audioSetupNotifier, CRCInput::RC_nokey, "", true); CAudioSetupNotifier2 audioSetupNotifier2(mf); oj = new CMenuOptionChooser(LOCALE_AUDIOMENU_AVS_CONTROL, &g_settings.audio_avs_Control, AUDIOMENU_AVS_CONTROL_OPTIONS, AUDIOMENU_AVS_CONTROL_OPTION_COUNT, true, &audioSetupNotifier2); @@ -164,8 +163,7 @@ int CAudioSetup::showAudioSetup() #endif // volume bar steps - CStringInput audio_step(LOCALE_AUDIOMENU_VOLUMEBAR_AUDIOSTEPS, g_settings.audio_step, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 "); - CMenuForwarder *as = new CMenuForwarder(LOCALE_AUDIOMENU_VOLUMEBAR_AUDIOSTEPS, true, g_settings.audio_step, &audio_step); + CMenuOptionNumberChooser *as = new CMenuOptionNumberChooser(LOCALE_AUDIOMENU_VOLUMEBAR_AUDIOSTEPS, &g_settings.audio_step, true, 0, 25, 0, 0, NONEXISTANT_LOCALE, NULL, NULL, CRCInput::RC_nokey, "", true); audioSettings->addItem(as); // initial volume @@ -187,7 +185,7 @@ bool CAudioSetupNotifier::changeNotify(const neutrino_locale_t OptionName, void if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_PCMOFFSET)) { if (g_settings.audio_avs_Control == CControld::TYPE_LIRC) - g_Controld->setVolume(100 - atoi(g_settings.audio_PCMOffset), CControld::TYPE_OST); + g_Controld->setVolume(100 - g_settings.audio_PCMOffset, CControld::TYPE_OST); } else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_AUDIOMENU_ANALOGOUT)) { @@ -207,7 +205,7 @@ bool CAudioSetupNotifier2::changeNotify(const neutrino_locale_t, void *) toDisable[0]->setActive(g_settings.audio_avs_Control == CControld::TYPE_LIRC); if (g_settings.audio_avs_Control == CControld::TYPE_LIRC) - g_Controld->setVolume(100 - atoi(g_settings.audio_PCMOffset), CControld::TYPE_OST); + g_Controld->setVolume(100 - g_settings.audio_PCMOffset, CControld::TYPE_OST); // tell controld the new volume_type g_Controld->setVolume(g_Controld->getVolume((CControld::volume_type)g_settings.audio_avs_Control), (CControld::volume_type)g_settings.audio_avs_Control); diff --git a/tuxbox/neutrino/src/gui/keybind_setup.cpp b/tuxbox/neutrino/src/gui/keybind_setup.cpp index ffd562a..80c56eb 100644 --- a/tuxbox/neutrino/src/gui/keybind_setup.cpp +++ b/tuxbox/neutrino/src/gui/keybind_setup.cpp @@ -181,10 +181,12 @@ int CKeybindSetup::showSetup() CMenuWidget * ks_rc = new CMenuWidget(menue_title, menue_icon, width); CMenuForwarder *ks_rc_fw = new CMenuForwarder(LOCALE_KEYBINDINGMENU, true, NULL, ks_rc, NULL, CRCInput::RC_red); - CStringInput keySettings_repeat_genericblocker(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, g_settings.repeat_genericblocker, 3, LOCALE_REPEATBLOCKER_HINT_1, LOCALE_REPEATBLOCKER_HINT_2, "0123456789 ", this); - CStringInput keySettings_repeatBlocker(LOCALE_KEYBINDINGMENU_REPEATBLOCK, g_settings.repeat_blocker, 3, LOCALE_REPEATBLOCKER_HINT_1, LOCALE_REPEATBLOCKER_HINT_2, "0123456789 ", this); - CMenuForwarder *ks_rc_repeat_fw = new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCK, true, g_settings.repeat_blocker, &keySettings_repeatBlocker); - CMenuForwarder *ks_rc_repeat_generic_fw = new CMenuForwarder(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, true, g_settings.repeat_genericblocker, &keySettings_repeat_genericblocker); + std::string ms_number_format("%d "); + ms_number_format += g_Locale->getText(LOCALE_WORD_MILLISECONDS_SHORT); + CMenuOptionNumberChooser *ks_rc_repeat_fw = new CMenuOptionNumberChooser(LOCALE_KEYBINDINGMENU_REPEATBLOCK , &g_settings.repeat_blocker , true, 0, 999, 0, 0, NONEXISTANT_LOCALE, NULL, this, CRCInput::RC_nokey, "", true); + ks_rc_repeat_fw->setNumberFormat(ms_number_format); + CMenuOptionNumberChooser *ks_rc_repeat_generic_fw = new CMenuOptionNumberChooser(LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC, &g_settings.repeat_genericblocker, true, 0, 999, 0, 0, NONEXISTANT_LOCALE, NULL, this, CRCInput::RC_nokey, "", true); + ks_rc_repeat_generic_fw->setNumberFormat(ms_number_format); //mode change CMenuForwarder * ks_mc_fw = new CMenuForwarder(keydescription[VIRTUALKEY_TV_RADIO_MODE], true, keychooser[VIRTUALKEY_TV_RADIO_MODE]->getKeyName(), keychooser[VIRTUALKEY_TV_RADIO_MODE]); @@ -246,7 +248,7 @@ bool CKeybindSetup::changeNotify(const neutrino_locale_t OptionName, void *) if (ARE_LOCALES_EQUAL(OptionName, LOCALE_KEYBINDINGMENU_REPEATBLOCK) || ARE_LOCALES_EQUAL(OptionName, LOCALE_KEYBINDINGMENU_REPEATBLOCKGENERIC)) { - g_RCInput->setRepeat(atoi(g_settings.repeat_blocker), atoi(g_settings.repeat_genericblocker)); + g_RCInput->setRepeat(g_settings.repeat_blocker, g_settings.repeat_genericblocker); } return false; } diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index 3ac3bea..054ad0a 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -409,10 +409,10 @@ int CNeutrinoApp::loadSetup() g_settings.audio_initial_volume = configfile.getInt32( "audio_initial_volume" , 0 ); #ifdef HAVE_DBOX_HARDWARE g_settings.audio_avs_Control = configfile.getInt32( "audio_avs_Control", CControld::TYPE_AVS ); - strcpy( g_settings.audio_step, configfile.getString( "audio_step" , "5" ).c_str() ); + g_settings.audio_step = configfile.getInt32( "audio_step" , 5 ); #else // the dreambox 500 (and the TD) has 32 volume steps, so a stepwidth of 3 matches the hardware better - strcpy( g_settings.audio_step, configfile.getString( "audio_step" , "3" ).c_str() ); + g_settings.audio_step = configfile.getInt32( "audio_step" , 3 ); #ifdef HAVE_TRIPLEDRAGON g_settings.audio_avs_Control = configfile.getInt32("audio_avs_Control", CControld::TYPE_AVS); #else @@ -420,7 +420,7 @@ int CNeutrinoApp::loadSetup() g_settings.audio_avs_Control = CControld::TYPE_OST; #endif #endif - strcpy( g_settings.audio_PCMOffset, configfile.getString( "audio_PCMOffset", "0" ).c_str() ); + g_settings.audio_PCMOffset = configfile.getInt32( "audio_PCMOffset", 0 ); //vcr g_settings.vcr_AutoSwitch = configfile.getBool("vcr_AutoSwitch" , true ); @@ -640,12 +640,12 @@ int CNeutrinoApp::loadSetup() g_settings.key_menu_pagedown = (neutrino_msg_t)configfile.getInt32("key_menu_pagedown", CRCInput::RC_page_down); #ifdef HAVE_DBOX_HARDWARE - strcpy(g_settings.repeat_blocker, configfile.getString("repeat_blocker", g_info.box_Type == CControld::TUXBOX_MAKER_PHILIPS ? "150" : "25").c_str()); - strcpy(g_settings.repeat_genericblocker, configfile.getString("repeat_genericblocker", g_info.box_Type == CControld::TUXBOX_MAKER_PHILIPS ? "25" : "0").c_str()); + g_settings.repeat_blocker = configfile.getInt32("repeat_blocker" , g_info.box_Type == CControld::TUXBOX_MAKER_PHILIPS ? 150 : 25); + g_settings.repeat_genericblocker = configfile.getInt32("repeat_genericblocker", g_info.box_Type == CControld::TUXBOX_MAKER_PHILIPS ? 25 : 0); #else // my dm500s and tripledragon works good with those - seife - strcpy(g_settings.repeat_blocker, configfile.getString("repeat_blocker", "300").c_str()); - strcpy(g_settings.repeat_genericblocker, configfile.getString("repeat_genericblocker", "100").c_str()); + g_settings.repeat_blocker = configfile.getInt32("repeat_blocker", 300); + g_settings.repeat_genericblocker = configfile.getInt32("repeat_genericblocker", 100); #endif g_settings.audiochannel_up_down_enable = configfile.getBool("audiochannel_up_down_enable", false); g_settings.audio_left_right_selectable = configfile.getBool("audio_left_right_selectable", false); @@ -956,8 +956,8 @@ void CNeutrinoApp::saveSetup() configfile.setBool("audio_DolbyDigital" , g_settings.audio_DolbyDigital); configfile.setInt32( "audio_initial_volume" , g_settings.audio_initial_volume); configfile.setInt32( "audio_avs_Control", g_settings.audio_avs_Control); - configfile.setString( "audio_PCMOffset" , g_settings.audio_PCMOffset); - configfile.setString( "audio_step" , g_settings.audio_step); + configfile.setInt32( "audio_PCMOffset" , g_settings.audio_PCMOffset); + configfile.setInt32( "audio_step" , g_settings.audio_step); //vcr configfile.setBool("vcr_AutoSwitch" , g_settings.vcr_AutoSwitch); @@ -1139,8 +1139,8 @@ void CNeutrinoApp::saveSetup() configfile.setInt32( "key_menu_pageup", (int)g_settings.key_menu_pageup ); configfile.setInt32( "key_menu_pagedown", (int)g_settings.key_menu_pagedown ); - configfile.setString( "repeat_blocker", g_settings.repeat_blocker ); - configfile.setString( "repeat_genericblocker", g_settings.repeat_genericblocker ); + configfile.setInt32( "repeat_blocker", g_settings.repeat_blocker ); + configfile.setInt32( "repeat_genericblocker", g_settings.repeat_genericblocker ); configfile.setBool ( "audiochannel_up_down_enable", g_settings.audiochannel_up_down_enable ); configfile.setBool ( "audio_left_right_selectable", g_settings.audio_left_right_selectable ); @@ -2627,11 +2627,8 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t m, neutrino_msg_data_t data) struct timeval endtime; time_t seconds; - int timeout = 0; - int timeout1 = 0; - - sscanf(g_settings.repeat_blocker, "%d", &timeout); - sscanf(g_settings.repeat_genericblocker, "%d", &timeout1); + int timeout = g_settings.repeat_blocker; + int timeout1 = g_settings.repeat_genericblocker; if (timeout1 > timeout) timeout = timeout1; @@ -3458,7 +3455,7 @@ void CNeutrinoApp::setVolume(const neutrino_msg_t key, const bool bDoPaint) const int bwtop = 20; // border width y from top const int bwbot = 20; // border width y from bottom int x, y; - int a_step = atoi(g_settings.audio_step); + int a_step = g_settings.audio_step; volumeBarIsVisible = ((g_settings.volumebar_disp_pos != VOLUMEBAR_DISP_POS_OFF) ? true : false); if( g_settings.volumebar_disp_pos == VOLUMEBAR_DISP_POS_TOP_RIGHT ) diff --git a/tuxbox/neutrino/src/system/locals.h b/tuxbox/neutrino/src/system/locals.h index 2e40fe0..9cad528 100644 --- a/tuxbox/neutrino/src/system/locals.h +++ b/tuxbox/neutrino/src/system/locals.h @@ -1254,8 +1254,6 @@ typedef enum LOCALE_RECORDINGMENU_VCR, LOCALE_RECORDINGMENU_ZAP_ON_ANNOUNCE, LOCALE_RECORDTIMER_ANNOUNCE, - LOCALE_REPEATBLOCKER_HINT_1, - LOCALE_REPEATBLOCKER_HINT_2, LOCALE_SAMBASERVER_SETUP, LOCALE_SAMBASERVER_SETUP_CONFIGFILE_PATH, LOCALE_SAMBASERVER_SETUP_CONFIGFILE_PATH_HINT1, @@ -1586,6 +1584,7 @@ typedef enum LOCALE_VIDEOMENU_VIDEOSIGNAL_YUV_V, LOCALE_WORD_FROM, LOCALE_WORD_HOURS_SHORT, + LOCALE_WORD_MILLISECONDS_SHORT, LOCALE_WORD_MINUTES_SHORT, LOCALE_ZAPIT_SCANTYPE, LOCALE_ZAPIT_SCANTYPE_ALL, diff --git a/tuxbox/neutrino/src/system/locals_intern.h b/tuxbox/neutrino/src/system/locals_intern.h index 381b664..eea4202 100644 --- a/tuxbox/neutrino/src/system/locals_intern.h +++ b/tuxbox/neutrino/src/system/locals_intern.h @@ -1254,8 +1254,6 @@ const char * locale_real_names[] = "recordingmenu.vcr", "recordingmenu.zap_on_announce", "recordtimer.announce", - "repeatblocker.hint_1", - "repeatblocker.hint_2", "sambaserver.setup", "sambaserver.setup_configfile_path", "sambaserver.setup_configfile_path_hint1", @@ -1586,6 +1584,7 @@ const char * locale_real_names[] = "videomenu.videosignal_yuv_v", "word.from", "word.hours_short", + "word.milliseconds_short", "word.minutes_short", "zapit.scantype", "zapit.scantype.all", diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h index 0261f65..66eb16c 100644 --- a/tuxbox/neutrino/src/system/settings.h +++ b/tuxbox/neutrino/src/system/settings.h @@ -100,8 +100,8 @@ struct SNeutrinoSettings int audio_DolbyDigital; int audio_avs_Control; int audio_initial_volume; - char audio_step[3]; - char audio_PCMOffset[3]; + int audio_step; + int audio_PCMOffset; //vcr int vcr_AutoSwitch; @@ -337,8 +337,8 @@ struct { neutrino_msg_t key_menu_pageup; neutrino_msg_t key_menu_pagedown; - char repeat_blocker[4]; - char repeat_genericblocker[4]; + int repeat_blocker; + int repeat_genericblocker; int audiochannel_up_down_enable; int audio_left_right_selectable; ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/data/locale/deutsch.locale | 3 +- tuxbox/neutrino/data/locale/english.locale | 3 +- tuxbox/neutrino/src/gui/audio_setup.cpp | 14 +++++------- tuxbox/neutrino/src/gui/keybind_setup.cpp | 12 ++++++---- tuxbox/neutrino/src/neutrino.cpp | 31 ++++++++++++--------------- tuxbox/neutrino/src/system/locals.h | 3 +- tuxbox/neutrino/src/system/locals_intern.h | 3 +- tuxbox/neutrino/src/system/settings.h | 8 +++--- 8 files changed, 35 insertions(+), 42 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-05-30 18:53:34
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 561f790b26148434212bfc21de9c9f680c1be1ca (commit) from 317ee11f0c79e80b3727d4054b1cef2f6dc6b8a8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 561f790b26148434212bfc21de9c9f680c1be1ca Author: [CST] Focus <foc...@gm...> Date: Sat May 30 20:52:46 2015 +0200 neutrino.cpp: pause sectionsd on shutdown before saving epg Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index 7bbd4a4..3ac3bea 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -3335,6 +3335,7 @@ void CNeutrinoApp::ExitRun(const bool write_si) if (!g_settings.epg_dir.empty()) { waitforshutdown = true; AudioMute(true); + g_Sectionsd->setPauseScanning(true); g_Sectionsd->writeSI2XML(g_settings.epg_dir.c_str()); } else { ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/neutrino.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-05-29 17:42:36
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via 317ee11f0c79e80b3727d4054b1cef2f6dc6b8a8 (commit) from df4282c81b2e990852dd4de4ac83e1bca392184f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 317ee11f0c79e80b3727d4054b1cef2f6dc6b8a8 Author: GetAway <get...@t-...> Date: Fri May 29 19:41:59 2015 +0200 settings: more char[] to string Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/gui/proxyserver_setup.cpp b/tuxbox/neutrino/src/gui/proxyserver_setup.cpp index 6ce5a0e..1b2ef0a 100644 --- a/tuxbox/neutrino/src/gui/proxyserver_setup.cpp +++ b/tuxbox/neutrino/src/gui/proxyserver_setup.cpp @@ -79,13 +79,13 @@ int CProxySetup::showProxySetup() mn->addIntroItems(menue_title != LOCALE_FLASHUPDATE_PROXYSERVER_SEP ? LOCALE_FLASHUPDATE_PROXYSERVER_SEP : NONEXISTANT_LOCALE); - CStringInputSMS softUpdate_proxy(LOCALE_FLASHUPDATE_PROXYSERVER, g_settings.softupdate_proxyserver, 23, LOCALE_FLASHUPDATE_PROXYSERVER_HINT1, LOCALE_FLASHUPDATE_PROXYSERVER_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789-.: "); + CStringInputSMS softUpdate_proxy(LOCALE_FLASHUPDATE_PROXYSERVER, &g_settings.softupdate_proxyserver, 23, false, LOCALE_FLASHUPDATE_PROXYSERVER_HINT1, LOCALE_FLASHUPDATE_PROXYSERVER_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789-.: "); mn->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYSERVER, true, g_settings.softupdate_proxyserver, &softUpdate_proxy, NULL, CRCInput::RC_red)); - CStringInputSMS softUpdate_proxyuser(LOCALE_FLASHUPDATE_PROXYUSERNAME, g_settings.softupdate_proxyusername, 23, LOCALE_FLASHUPDATE_PROXYUSERNAME_HINT1, LOCALE_FLASHUPDATE_PROXYUSERNAME_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789!""\xA7$%&/()=?-. "); + CStringInputSMS softUpdate_proxyuser(LOCALE_FLASHUPDATE_PROXYUSERNAME, &g_settings.softupdate_proxyusername, 23, false, LOCALE_FLASHUPDATE_PROXYUSERNAME_HINT1, LOCALE_FLASHUPDATE_PROXYUSERNAME_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789!""\xA7$%&/()=?-. "); mn->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYUSERNAME, true, g_settings.softupdate_proxyusername, &softUpdate_proxyuser, NULL, CRCInput::RC_green)); - CStringInputSMS softUpdate_proxypass(LOCALE_FLASHUPDATE_PROXYPASSWORD, g_settings.softupdate_proxypassword, 20, LOCALE_FLASHUPDATE_PROXYPASSWORD_HINT1, LOCALE_FLASHUPDATE_PROXYPASSWORD_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789!""\xA7$%&/()=?-. "); + CStringInputSMS softUpdate_proxypass(LOCALE_FLASHUPDATE_PROXYPASSWORD, &g_settings.softupdate_proxypassword, 20, false, LOCALE_FLASHUPDATE_PROXYPASSWORD_HINT1, LOCALE_FLASHUPDATE_PROXYPASSWORD_HINT2, "abcdefghijklmnopqrstuvwxyz0123456789!""\xA7$%&/()=?-. "); mn->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_PROXYPASSWORD, true, g_settings.softupdate_proxypassword, &softUpdate_proxypass, NULL, CRCInput::RC_yellow)); int res = mn->exec(NULL, ""); diff --git a/tuxbox/neutrino/src/gui/software_update.cpp b/tuxbox/neutrino/src/gui/software_update.cpp index 7733395..5bbe731 100755 --- a/tuxbox/neutrino/src/gui/software_update.cpp +++ b/tuxbox/neutrino/src/gui/software_update.cpp @@ -143,7 +143,7 @@ int CSoftwareUpdate::showSoftwareUpdateExpert() #ifndef DISABLE_INTERNET_UPDATE mtdexpert->addItem(GenericMenuSeparatorLine); - CStringInputSMS softUpdate_url_file(LOCALE_FLASHUPDATE_URL_FILE, g_settings.softupdate_url_file, 30, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789!""$%&/()=?-. "); + CStringInputSMS softUpdate_url_file(LOCALE_FLASHUPDATE_URL_FILE, &g_settings.softupdate_url_file, 30, false, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789!""$%&/()=?-. "); mtdexpert->addItem(new CMenuForwarder(LOCALE_FLASHUPDATE_URL_FILE, true, g_settings.softupdate_url_file, &softUpdate_url_file)); #endif /*DISABLE_INTERNET_UPDATE*/ diff --git a/tuxbox/neutrino/src/gui/update.cpp b/tuxbox/neutrino/src/gui/update.cpp index 598384d..e911754 100644 --- a/tuxbox/neutrino/src/gui/update.cpp +++ b/tuxbox/neutrino/src/gui/update.cpp @@ -146,7 +146,7 @@ bool CFlashUpdate::selectHttpImage(void) SelectionWidget.addItem(GenericMenuSeparator); SelectionWidget.addItem(GenericMenuBack); - std::ifstream urlFile(g_settings.softupdate_url_file); + std::ifstream urlFile(g_settings.softupdate_url_file.c_str()); unsigned int i = 0; bool update_prefix_tried = false; diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index c3b64b5..7bbd4a4 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -661,11 +661,11 @@ int CNeutrinoApp::loadSetup() #ifndef DISABLE_INTERNET_UPDATE //Software-update - g_settings.softupdate_mode = configfile.getInt32( "softupdate_mode", CFlashUpdate::UPDATEMODE_INTERNET ); - strcpy(g_settings.softupdate_url_file, configfile.getString("softupdate_url_file", "/etc/update.urls").c_str()); - strcpy(g_settings.softupdate_proxyserver, configfile.getString("softupdate_proxyserver", "" ).c_str()); - strcpy(g_settings.softupdate_proxyusername, configfile.getString("softupdate_proxyusername", "" ).c_str()); - strcpy(g_settings.softupdate_proxypassword, configfile.getString("softupdate_proxypassword", "" ).c_str()); + g_settings.softupdate_mode = configfile.getInt32( "softupdate_mode", CFlashUpdate::UPDATEMODE_INTERNET ); + g_settings.softupdate_url_file = configfile.getString("softupdate_url_file", "/etc/update.urls" ); + g_settings.softupdate_proxyserver = configfile.getString("softupdate_proxyserver", "" ); + g_settings.softupdate_proxyusername = configfile.getString("softupdate_proxyusername", "" ); + g_settings.softupdate_proxypassword = configfile.getString("softupdate_proxypassword", "" ); #endif // GUI font g_settings.font_file = configfile.getString( "font_file", FONTDIR"/LiberationSans-Regular.ttf" ); diff --git a/tuxbox/neutrino/src/system/httptool.cpp b/tuxbox/neutrino/src/system/httptool.cpp index 3a08c88..39e90ce 100644 --- a/tuxbox/neutrino/src/system/httptool.cpp +++ b/tuxbox/neutrino/src/system/httptool.cpp @@ -91,19 +91,18 @@ bool CHTTPTool::downloadFile(const std::string & URL, const char * const downloa curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION,1); //curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); - if(strcmp(g_settings.softupdate_proxyserver,"")!=0) + if(!g_settings.softupdate_proxyserver.empty()) {//use proxyserver //printf("use proxyserver\n"); - curl_easy_setopt(curl, CURLOPT_PROXY, g_settings.softupdate_proxyserver); + curl_easy_setopt(curl, CURLOPT_PROXY, g_settings.softupdate_proxyserver.c_str()); - if(strcmp(g_settings.softupdate_proxyusername,"")!=0) + if(!g_settings.softupdate_proxyusername.empty()) {//use auth //printf("use proxyauth\n"); - char tmp[200]; - strcpy(tmp, g_settings.softupdate_proxyusername); - strcat(tmp, ":"); - strcat(tmp, g_settings.softupdate_proxypassword); - curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, tmp); + std::string tmp = g_settings.softupdate_proxyusername; + tmp += ":"; + tmp += g_settings.softupdate_proxypassword; + curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, tmp.c_str()); } } diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h index d45cffd..0261f65 100644 --- a/tuxbox/neutrino/src/system/settings.h +++ b/tuxbox/neutrino/src/system/settings.h @@ -353,10 +353,10 @@ struct { #ifndef DISABLE_INTERNET_UPDATE //Software-update int softupdate_mode; - char softupdate_url_file[31]; - char softupdate_proxyserver[31]; - char softupdate_proxyusername[31]; - char softupdate_proxypassword[31]; + std::string softupdate_url_file; + std::string softupdate_proxyserver; + std::string softupdate_proxyusername; + std::string softupdate_proxypassword; #endif //BouquetHandling ----------------------------------------------------------------------- Summary of changes: tuxbox/neutrino/src/gui/proxyserver_setup.cpp | 6 +++--- tuxbox/neutrino/src/gui/software_update.cpp | 2 +- tuxbox/neutrino/src/gui/update.cpp | 2 +- tuxbox/neutrino/src/neutrino.cpp | 10 +++++----- tuxbox/neutrino/src/system/httptool.cpp | 15 +++++++-------- tuxbox/neutrino/src/system/settings.h | 8 ++++---- 6 files changed, 21 insertions(+), 22 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-05-28 16:41:42
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via df4282c81b2e990852dd4de4ac83e1bca392184f (commit) via 99d3ea53f05c1c2ef734fadaeb98caaa0d8fd9b7 (commit) from a723bc73dd2c37ee24e0537e23c6c7b61f0a8dcc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit df4282c81b2e990852dd4de4ac83e1bca392184f Author: GetAway <get...@t-...> Date: Thu May 28 18:40:56 2015 +0200 convert var font_file to std::string Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/src/gui/osd_setup.cpp b/tuxbox/neutrino/src/gui/osd_setup.cpp index efe5f43..e70fdb5 100644 --- a/tuxbox/neutrino/src/gui/osd_setup.cpp +++ b/tuxbox/neutrino/src/gui/osd_setup.cpp @@ -186,8 +186,8 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) fileBrowser.Filter = &fileFilter; if (fileBrowser.exec(font_Dir.c_str())) { - strcpy(g_settings.font_file, fileBrowser.getSelectedFile()->Name.c_str()); - printf("[neutrino] new font file %s\n", fileBrowser.getSelectedFile()->Name.c_str()); + g_settings.font_file = fileBrowser.getSelectedFile()->Name; + printf("[neutrino] new font file %s\n", g_settings.font_file.c_str()); CNeutrinoApp::getInstance()->SetupFonts(); font_file_name = fileBrowser.getSelectedFile()->getFileName(); } diff --git a/tuxbox/neutrino/src/neutrino.cpp b/tuxbox/neutrino/src/neutrino.cpp index 31a7707..c3b64b5 100644 --- a/tuxbox/neutrino/src/neutrino.cpp +++ b/tuxbox/neutrino/src/neutrino.cpp @@ -668,7 +668,7 @@ int CNeutrinoApp::loadSetup() strcpy(g_settings.softupdate_proxypassword, configfile.getString("softupdate_proxypassword", "" ).c_str()); #endif // GUI font - strcpy(g_settings.font_file, configfile.getString( "font_file", FONTDIR"/LiberationSans-Regular.ttf" ).c_str()); + g_settings.font_file = configfile.getString( "font_file", FONTDIR"/LiberationSans-Regular.ttf" ); //BouquetHandling g_settings.bouquetlist_mode = configfile.getInt32( "bouquetlist_mode", bsmChannels ); @@ -1611,9 +1611,9 @@ bool CNeutrinoApp::ChangeFonts(int unicode_locale) { loadLocale_ret = unicode_locale; if (unicode_locale == CLocaleManager::UNICODE_FONT && - strcmp(g_settings.font_file, FONTDIR"/LiberationSans-Regular.ttf") != 0) + g_settings.font_file == FONTDIR"/LiberationSans-Regular.ttf") { - strcpy(g_settings.font_file, FONTDIR"/LiberationSans-Regular.ttf"); + g_settings.font_file = FONTDIR"/LiberationSans-Regular.ttf"; SetupFonts(); } if (lcd_font.filename[0] == NULL) @@ -1636,12 +1636,12 @@ void CNeutrinoApp::SetupFonts() if(font.filename != NULL) free((void *)font.filename); - printf("[neutrino] settings font file %s\n", g_settings.font_file); + printf("[neutrino] settings font file %s\n", g_settings.font_file.c_str()); - if(access(g_settings.font_file, F_OK)) { + if(access(g_settings.font_file.c_str(), F_OK)) { if(!access(FONTDIR"/LiberationSans-Regular.ttf", F_OK)){ font.filename = strdup(FONTDIR"/LiberationSans-Regular.ttf"); - strcpy(g_settings.font_file, font.filename); + g_settings.font_file = font.filename; } else{ fprintf( stderr,"[neutrino] font file [%s] not found\n neutrino exit\n",FONTDIR"/LiberationSans-Regular.ttf"); @@ -1650,7 +1650,7 @@ void CNeutrinoApp::SetupFonts() } else{ - font.filename = strdup(g_settings.font_file); + font.filename = strdup(g_settings.font_file.c_str()); } style[FONT_STYLE_REGULAR] = g_fontRenderer->AddFont(font.filename); @@ -2050,7 +2050,7 @@ int CNeutrinoApp::run(int argc, char **argv) unsigned int use_true_unicode_font = (loadLocale_ret == CLocaleManager::ISO_8859_1_FONT) ? 0 : 1; if (use_true_unicode_font) - strcpy(g_settings.font_file, FONTDIR"/LiberationSans-Regular.ttf"); + g_settings.font_file = FONTDIR"/LiberationSans-Regular.ttf"; if (lcd_font.filename[0] == NULL) /* no lcd font specified in command line */ { CLCD::getInstance()->init(predefined_lcd_font[use_true_unicode_font].filename[0], diff --git a/tuxbox/neutrino/src/system/settings.h b/tuxbox/neutrino/src/system/settings.h index a8e37b9..d45cffd 100644 --- a/tuxbox/neutrino/src/system/settings.h +++ b/tuxbox/neutrino/src/system/settings.h @@ -477,7 +477,7 @@ struct { int uboot_lcd_bias; //osd - char font_file[100]; + std::string font_file; // USERMENU typedef enum commit 99d3ea53f05c1c2ef734fadaeb98caaa0d8fd9b7 Author: [CST] Focus <foc...@gm...> Date: Thu May 28 18:39:31 2015 +0200 Add Latin1_to_UTF8 for std::string Signed-off-by: GetAway <get...@t-...> diff --git a/dvb/zapit/include/zapit/client/zapittools.h b/dvb/zapit/include/zapit/client/zapittools.h index c5ee188..5ffc55f 100644 --- a/dvb/zapit/include/zapit/client/zapittools.h +++ b/dvb/zapit/include/zapit/client/zapittools.h @@ -32,6 +32,7 @@ namespace ZapitTools std::string UTF8_to_Latin1 (const std::string &s); std::string UTF8_to_UTF8XML(const char *); std::string Latin1_to_UTF8 (const char *); + std::string Latin1_to_UTF8 (const std::string &s); } #endif diff --git a/dvb/zapit/lib/zapittools.cpp b/dvb/zapit/lib/zapittools.cpp index 5ef5de5..e69d1ff 100644 --- a/dvb/zapit/lib/zapittools.cpp +++ b/dvb/zapit/lib/zapittools.cpp @@ -65,6 +65,10 @@ namespace ZapitTools { } return r; } + std::string UTF8_to_Latin1(const std::string &s) + { + return UTF8_to_Latin1(s.c_str()); + } std::string UTF8_to_UTF8XML(const char * s) { @@ -124,9 +128,9 @@ namespace ZapitTools { } return r; } - std::string UTF8_to_Latin1(const std::string &s) + std::string Latin1_to_UTF8(const std::string & s) { - return UTF8_to_Latin1(s.c_str()); + return Latin1_to_UTF8(s.c_str()); } } ----------------------------------------------------------------------- Summary of changes: dvb/zapit/include/zapit/client/zapittools.h | 1 + dvb/zapit/lib/zapittools.cpp | 8 ++++++-- tuxbox/neutrino/src/gui/osd_setup.cpp | 4 ++-- tuxbox/neutrino/src/neutrino.cpp | 16 ++++++++-------- tuxbox/neutrino/src/system/settings.h | 2 +- 5 files changed, 18 insertions(+), 13 deletions(-) -- Tuxbox-GIT: apps |
From: GetAway <tux...@ne...> - 2015-05-28 14:54:34
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via a723bc73dd2c37ee24e0537e23c6c7b61f0a8dcc (commit) from d28c0857af1346b73564b00091069453db874ace (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a723bc73dd2c37ee24e0537e23c6c7b61f0a8dcc Author: martii <m4...@gm...> Date: Thu May 28 16:53:52 2015 +0200 zapittools: UTF8_to_Latin1 also std::string Signed-off-by: GetAway <get...@t-...> diff --git a/dvb/zapit/include/zapit/client/zapittools.h b/dvb/zapit/include/zapit/client/zapittools.h index 487d2a4..c5ee188 100644 --- a/dvb/zapit/include/zapit/client/zapittools.h +++ b/dvb/zapit/include/zapit/client/zapittools.h @@ -29,6 +29,7 @@ namespace ZapitTools { std::string UTF8_to_Latin1 (const char *); + std::string UTF8_to_Latin1 (const std::string &s); std::string UTF8_to_UTF8XML(const char *); std::string Latin1_to_UTF8 (const char *); } diff --git a/dvb/zapit/lib/zapittools.cpp b/dvb/zapit/lib/zapittools.cpp index 1c1ce51..5ef5de5 100644 --- a/dvb/zapit/lib/zapittools.cpp +++ b/dvb/zapit/lib/zapittools.cpp @@ -124,4 +124,9 @@ namespace ZapitTools { } return r; } + std::string UTF8_to_Latin1(const std::string &s) + { + return UTF8_to_Latin1(s.c_str()); + } + } diff --git a/tuxbox/neutrino/src/gui/nfs.cpp b/tuxbox/neutrino/src/gui/nfs.cpp index d58bca4..55fde5b 100644 --- a/tuxbox/neutrino/src/gui/nfs.cpp +++ b/tuxbox/neutrino/src/gui/nfs.cpp @@ -137,7 +137,7 @@ int CNFSMountGui::exec( CMenuTarget* parent, const std::string & actionKey ) for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES; i++) { m_entry[i] = getEntryString(i); - ISO_8859_1_entry[i] = ZapitTools::UTF8_to_Latin1(m_entry[i].c_str()); + ISO_8859_1_entry[i] = ZapitTools::UTF8_to_Latin1(m_entry[i]); } } else if(actionKey.substr(0,7)=="domount") @@ -178,7 +178,7 @@ int CNFSMountGui::menu() for(int i=0 ; i < NETWORK_NFS_NR_OF_ENTRIES ; i++) { std::string s2 = "mountentry" + to_string(i); - ISO_8859_1_entry[i] = ZapitTools::UTF8_to_Latin1(m_entry[i].c_str()); + ISO_8859_1_entry[i] = ZapitTools::UTF8_to_Latin1(m_entry[i]); mountMenuEntry[i] = new CMenuForwarder("", true, ISO_8859_1_entry[i], this, s2.c_str()); if (CFSMounter::isMounted(g_settings.network_nfs[i].local_dir)) mountMenuEntry[i]->iconName = NEUTRINO_ICON_MOUNTED; ----------------------------------------------------------------------- Summary of changes: dvb/zapit/include/zapit/client/zapittools.h | 1 + dvb/zapit/lib/zapittools.cpp | 5 +++++ tuxbox/neutrino/src/gui/nfs.cpp | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) -- Tuxbox-GIT: apps |