summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2007-06-17 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2007-06-17 18:00:00 +0200
commitb1e4da3be6552f58f3890bf2ad48879823d2e130 (patch)
treecf42a1e6b296956b82a2820948c7b90dbcddf26e /vdr.c
parentb9b9ace9a8d2d1c0beda1dc0a2ebc6be9b47c305 (diff)
downloadvdr-patch-lnbsharing-b1e4da3be6552f58f3890bf2ad48879823d2e130.tar.gz
vdr-patch-lnbsharing-b1e4da3be6552f58f3890bf2ad48879823d2e130.tar.bz2
Version 1.5.4vdr-1.5.4
- Increased APIVERSION (forgot to do that in 1.5.2 and 1.5.3). - Fixed a crash in i18n character set conversion (thanks to Alexander Riedel, Jose Alberto Reguero and Christian Wieninger for patches that cured part of the problem). - Adjusted the 'skincurses' plugin to UTF-8 handling. - Using nl_langinfo(CODESET) to determine the local codeset to use (thanks to Thomas Günther). The codeset names in 'libsi/si.c' have been changed to the canonical spelling with '-' (thanks to Ludwig Nussel for pointing this out). - Modified handling invalid characters in VFAT mode. - Replaced strn0cpy() with Utf8Strn0Cpy() where necessary. - Now using 'fontconfig' to determine which fonts to use (thanks to Anssi Hannula for code and hints on how to do this). - If no fonts are installed, VDR now uses a dummy font that doesn't actually draw any text, and logs an error message. - The new function cFont::CreateFont() can be used by plugins to create and use fonts of their own, independent of VDR's standard fonts. - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg). - Changed the parameter "OSD font" to "Default font" in "Setup/OSD" (suggested by Rolf Ahrenberg). - Fixed handling detached processes in SystemExec() (thanks to Udo Richter). - The info.vdr file now also stores the name of the channel, and the new function cRecordingInfo::ChannelName() returns this information if available (based on a patch from Alexander Hans). - The new function cOsd::SetOsdPosition() can be used to dynamically change the position and size of the OSD (based on a request from Christoph Haubrich). Plugins that implement skins should no longer use Setup.OSDWidth etc. directly, but should rather use cOsd::OsdWidth() etc. instead. Currently a change to the OSD position will only apply to newly opened OSDs.
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/vdr.c b/vdr.c
index f7ff1b5..e28c728 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,11 +22,12 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.291 2007/06/09 12:33:53 kls Exp $
+ * $Id: vdr.c 1.293 2007/06/17 11:23:08 kls Exp $
*/
#include <getopt.h>
#include <grp.h>
+#include <langinfo.h>
#include <locale.h>
#include <pwd.h>
#include <signal.h>
@@ -493,18 +494,22 @@ int main(int argc, char *argv[])
// Set the system character table:
- char *LangEnv = setlocale(LC_CTYPE, "");
- if (!LangEnv)
- LangEnv = getenv("LANG"); // last resort in case locale stuff isn't installed
- if (LangEnv) {
- char *CodeSet = strchr(LangEnv, '.');
- if (CodeSet) {
- CodeSet++; // skip the dot
- bool known = SI::SetSystemCharacterTable(CodeSet);
- isyslog("codeset is '%s' - %s", CodeSet, known ? "known" : "unknown");
- cCharSetConv::SetSystemCharacterTable(CodeSet);
+ char *CodeSet = NULL;
+ if (setlocale(LC_CTYPE, ""))
+ CodeSet = nl_langinfo(CODESET);
+ else {
+ char *LangEnv = getenv("LANG"); // last resort in case locale stuff isn't installed
+ if (LangEnv) {
+ CodeSet = strchr(LangEnv, '.');
+ if (CodeSet)
+ CodeSet++; // skip the dot
}
}
+ if (CodeSet) {
+ bool known = SI::SetSystemCharacterTable(CodeSet);
+ isyslog("codeset is '%s' - %s", CodeSet, known ? "known" : "unknown");
+ cCharSetConv::SetSystemCharacterTable(CodeSet);
+ }
// Main program loop variables - need to be here to have them initialized before any EXIT():
@@ -545,6 +550,12 @@ int main(int argc, char *argv[])
))
EXIT(2);
+ if (!*cFont::GetFontFileName(Setup.FontOsd)) {
+ const char *msg = "no fonts available - OSD will not show any text!";
+ fprintf(stderr, "vdr: %s\n", msg);
+ esyslog("ERROR: %s", msg);
+ }
+
// Recordings:
Recordings.Update();