mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 11:05:18 +00:00
Fix old copyright year
Change all fprintf's to ERR()
This commit is contained in:
parent
a64e9f8950
commit
90c9ac2723
13
src/llua.c
13
src/llua.c
@ -6,7 +6,7 @@
|
||||
*
|
||||
* Please see COPYING for details
|
||||
*
|
||||
* Copyright (c) 2007 Toni Spets
|
||||
* Copyright (c) 2009 Toni Spets
|
||||
* Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
|
||||
* (see AUTHORS)
|
||||
* All rights reserved.
|
||||
@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "conky.h"
|
||||
#include "logging.h"
|
||||
|
||||
lua_State *lua_L = NULL;
|
||||
|
||||
@ -41,7 +42,7 @@ void llua_load(const char *script)
|
||||
int error;
|
||||
error = luaL_loadfile(lua_L, script);
|
||||
if(error) {
|
||||
fprintf(stderr, "llua_load: %s\n", lua_tostring(lua_L, -1));
|
||||
ERR("llua_load: %s\n", lua_tostring(lua_L, -1));
|
||||
lua_pop(lua_L, 1);
|
||||
} else {
|
||||
lua_pcall(lua_L, 0, 0, 0);
|
||||
@ -71,11 +72,11 @@ char *llua_getstring(const char *args)
|
||||
}
|
||||
|
||||
if(lua_pcall(lua_L, parcount, 1, 0) != 0) {
|
||||
fprintf(stderr, "llua: function %s execution failed: %s\n", func, lua_tostring(lua_L, -1));
|
||||
ERR("llua_getstring: function %s execution failed: %s\n", func, lua_tostring(lua_L, -1));
|
||||
lua_pop(lua_L, -1);
|
||||
} else {
|
||||
if(!lua_isstring(lua_L, -1)) {
|
||||
fprintf(stderr, "llua: function %s didn't return a string, result discarded\n", func);
|
||||
ERR("llua_getstring: function %s didn't return a string, result discarded\n", func);
|
||||
} else {
|
||||
ret = strdup((char *)lua_tostring(lua_L, -1));
|
||||
lua_pop(lua_L, 1);
|
||||
@ -110,11 +111,11 @@ int llua_getpercent(const char *args, int *per)
|
||||
free(tmp);
|
||||
|
||||
if(lua_pcall(lua_L, parcount, 1, 0) != 0) {
|
||||
fprintf(stderr, "llua: function %s execution failed: %s\n", func, lua_tostring(lua_L, -1));
|
||||
ERR("llua_getpercent: function %s execution failed: %s\n", func, lua_tostring(lua_L, -1));
|
||||
lua_pop(lua_L, -1);
|
||||
} else {
|
||||
if(!lua_isnumber(lua_L, -1)) {
|
||||
fprintf(stderr, "llua: function %s didn't return a number (percent), result discarded\n", func);
|
||||
ERR("llua_getpercent: function %s didn't return a number (percent), result discarded\n", func);
|
||||
} else {
|
||||
*per = lua_tonumber(lua_L, -1);
|
||||
lua_pop(lua_L, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user