diff options
author | phintuka <phintuka> | 2010-11-17 14:05:34 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-11-17 14:05:34 +0000 |
commit | 4260101fc3e0dc90de8edda90c195ee76945dfd9 (patch) | |
tree | 7383abc77be6ccadca110010b44740eb1f6ace54 | |
parent | 3c64f038f1561e094f9c1c7bab41949805bd5f1f (diff) | |
download | xineliboutput-4260101fc3e0dc90de8edda90c195ee76945dfd9.tar.gz xineliboutput-4260101fc3e0dc90de8edda90c195ee76945dfd9.tar.bz2 |
Cosmetics
-rw-r--r-- | frontend_local.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/frontend_local.c b/frontend_local.c index 6a16e128..a3ed60fc 100644 --- a/frontend_local.c +++ b/frontend_local.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_local.c,v 1.49 2010-07-19 13:33:27 phintuka Exp $ + * $Id: frontend_local.c,v 1.50 2010-11-17 14:05:34 phintuka Exp $ * */ @@ -252,24 +252,24 @@ frontend_t *cXinelibLocal::load_frontend(const char *fe_name) fe_creator_f *fe_creator = NULL; static int my_marker = 0; - if(!dladdr((void *)&my_marker, &info)) { - LOGERR("Error searching plugin: dladdr() returned false (%s)",dlerror()); + if (!dladdr((void *)&my_marker, &info)) { + LOGERR("Error searching plugin: dladdr() returned false (%s)", dlerror()); return NULL; } LOGDBG("xineliboutput: plugin file is %s", info.dli_fname); int fe_ind = strstra(fe_name, xc.s_frontends, FRONTEND_NONE); bool fe_try = false; - if(fe_ind == FRONTEND_NONE) { + if (fe_ind == FRONTEND_NONE) { LOGMSG("Front-end %s unknown!", fe_name); fe_ind = 0; fe_try = true; } strn0cpy(libname, info.dli_fname, sizeof(libname) - 128); - if(strrchr(libname, '/')) + if (strrchr(libname, '/')) *(strrchr(libname, '/')+1) = 0; - + LOGDBG("Searching frontend %s from %s", xc.s_frontends[fe_ind], libname); do { @@ -277,28 +277,28 @@ frontend_t *cXinelibLocal::load_frontend(const char *fe_name) LOGDBG("Probing %s", libname); if (stat(libname, &statbuffer)) { - LOGERR("load_frontend: can't stat %s",libname); + LOGERR("load_frontend: can't stat %s", libname); } else if((statbuffer.st_mode & S_IFMT) != S_IFREG) { LOGMSG("load_frontend: %s not regular file ! trying to load anyway ...", libname); } - if( !(lib = dlopen (libname, RTLD_LAZY | RTLD_GLOBAL))) { + if ( !(lib = dlopen (libname, RTLD_LAZY | RTLD_GLOBAL))) { LOGERR("load_frontend: cannot dlopen file %s: %s", libname, dlerror()); } else if ( (fe_creator = (fe_creator_f*)dlsym(lib, "fe_creator"))) { LOGDBG("load_frontend: entry at %p", fe_creator); frontend_t *fe = (**fe_creator)(); - if(fe) { - if(h_fe_lib) + if (fe) { + if (h_fe_lib) dlclose(h_fe_lib); h_fe_lib = lib; - LOGDBG("Using frontend %s (%s) from %s", - xc.s_frontends[fe_ind], xc.s_frontendNames[fe_ind], + LOGDBG("Using frontend %s (%s) from %s", + xc.s_frontends[fe_ind], xc.s_frontendNames[fe_ind], xc.s_frontend_files[fe_ind]); - + return fe; } else { LOGMSG("Frontend %s (%s) creation failed", @@ -308,12 +308,12 @@ frontend_t *cXinelibLocal::load_frontend(const char *fe_name) LOGERR("Frontend entry point not found"); dlclose(lib); } - + fe_ind++; // try next frontend ... - } while(fe_try && fe_ind < FRONTEND_count); + } while (fe_try && fe_ind < FRONTEND_count); - LOGMSG("No usable frontends found, giving up !"); + LOGMSG("No usable frontends found, giving up !"); return NULL; } |