Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

log.cc

Go to the documentation of this file.
00001 /*
00002  *      HT Editor
00003  *      log.cc
00004  *
00005  *      Copyright (C) 1999-2002 Stefan Weyergraf (stefan@weyergraf.de)
00006  *
00007  *      This program is free software; you can redistribute it and/or modify
00008  *      it under the terms of the GNU General Public License version 2 as
00009  *      published by the Free Software Foundation.
00010  *
00011  *      This program is distributed in the hope that it will be useful,
00012  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *      GNU General Public License for more details.
00015  *
00016  *      You should have received a copy of the GNU General Public License
00017  *      along with this program; if not, write to the Free Software
00018  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 #include "htapp.h"
00022 #include "log.h"
00023 #include "snprintf.h"
00024 
00025 void ht_logf(int color, const char *format, ...)
00026 {
00027         char buf[256];
00028         va_list arg;
00029         va_start(arg, format);
00030         ht_vsnprintf(buf, sizeof buf, format, arg);
00031         va_end(arg);
00032         loglines->log(color, buf);
00033 
00034         ht_window *w = ((ht_app*)app)->get_window_by_type(AWT_LOG);
00035         if (w) w->sendmsg(msg_log_changed);
00036         app->sendmsg(msg_draw);
00037 }
00038 

Generated on Fri May 7 21:15:41 2004 by doxygen 1.3.5