1
0
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:
Toni Spets 2009-05-15 21:48:11 +03:00
parent a64e9f8950
commit 90c9ac2723

View File

@ -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);