Changeset 3607:a5296e3cfc85 in roaraudio


Ignore:
Timestamp:
03/01/10 01:19:29 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_debug_msg_simple()

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/debug.h

    r3606 r3607  
    22 
    33/* 
    4  *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009 
     4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2010 
    55 * 
    66 *  This file is part of libroar a part of RoarAudio, 
     
    5858struct roar_vio_calls * roar_debug_get_stderr(void); 
    5959 
     60void roar_debug_msg_simple(const char *format, ...); 
     61 
    6062#endif 
    6163 
  • libroar/debug.c

    r3606 r3607  
    22 
    33/* 
    4  *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009 
     4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2010 
    55 * 
    66 *  This file is part of libroar a part of RoarAudio, 
     
    6565} 
    6666 
     67void roar_debug_msg_simple(const char *format, ...) { 
     68 struct roar_vio_calls * vio; 
     69 va_list ap; 
     70 int ret; 
     71 char buf[8192]; 
     72 
     73 if ( (vio = roar_debug_get_stderr()) == NULL ) 
     74  return; 
     75 
     76 va_start(ap, format); 
     77 ret = vsnprintf(buf, 8192, format, ap); 
     78 va_end(ap); 
     79 
     80 roar_vio_write(vio, buf, ret); 
     81} 
     82 
    6783//ll 
Note: See TracChangeset for help on using the changeset viewer.