Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-frontend.git;a=commitdiff;h=7ff3a8401c47e1f6f73e1d037d6cab593d5517b3

commit 7ff3a8401c47e1f6f73e1d037d6cab593d5517b3
Author: James Buren <r...@frugalware.org>
Date:   Mon Sep 26 11:47:25 2011 -0500

add internal log function for frontend

diff --git a/pacman-frontend.c b/pacman-frontend.c
index d162041..a9618d0 100644
--- a/pacman-frontend.c
+++ b/pacman-frontend.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <stdio.h>
+#include <stdarg.h>
#include <assert.h>
#include "pacman-frontend.h"

@@ -28,6 +29,23 @@ xmalloc(size_t n)
return p;
}

+static void
+_log(unsigned short lvl,const char *fmt,...)
+{
+       char buf[256];
+       va_list args;
+
+       va_start(args,fmt);
+
+       vsnprintf(buf,sizeof(buf),fmt,args);
+
+       va_end(args);
+
+       G.log(lvl,buf);
+
+       pacman_logaction(buf);
+}
+
static void *
xrealloc(void *p,size_t n)
{
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to