X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Flog.c;h=9c7c22826945d21975a55b78ccd6b0a05115c06b;hb=8873581f76d2dee9c132d03ad0edf9d0d9f9cf18;hp=ffa0e17a3e77fbf7e50ae1ae5dcb1eecfa9b23d7;hpb=9a1cd49d755ebec6a9f085ca2025706b94927b82;p=swftools.git diff --git a/lib/log.c b/lib/log.c index ffa0e17..9c7c228 100644 --- a/lib/log.c +++ b/lib/log.c @@ -6,7 +6,19 @@ Copyright (c) 2001 Matthias Kramm - This file is distributed under the GPL, see file COPYING for details */ + This program 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. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef __NT__ #include "stdafx.h" @@ -27,7 +39,7 @@ #include "log.h" -static int screenloglevel = 1; +int screenloglevel = 1; static int fileloglevel = -1; static int socketloglevel = -1; static int maxloglevel = 1; @@ -244,7 +256,7 @@ static inline void log(char* logString) free (logBuffer); } -void logf(const char* format, ...) +void msg(const char* format, ...) { char buf[1024]; va_list arglist; @@ -253,7 +265,7 @@ void logf(const char* format, ...) /* speed up hack */ if(format[0]=='<') { char*z = "fewnvd"; - char*x = strchr(z,format[0]); + char*x = strchr(z,format[1]); if(x && (x-z)>maxloglevel) return; }