Mercurial > audlegacy
annotate src/audtool/audtool_report.c @ 3732:40d138de8460
Automated merge with ssh://hg.atheme.org//hg/audacious
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sat, 13 Oct 2007 19:12:09 -0500 |
parents | d1198fb765c6 |
children | 895297e46ee3 |
rev | line source |
---|---|
2930
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
1 /* |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
2 * Audtool2 |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
3 * Copyright (c) 2007 Audacious development team |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
4 * |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
5 * Redistribution and use in source and binary forms, with or without |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
6 * modification, are permitted provided that the following conditions are |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
7 * met: |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
8 * |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
9 * 1. Redistributions of source code must retain the above copyright notice, |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
10 * this list of conditions and the following disclaimer. |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
11 * |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
12 * 2. Redistributions in binary form must reproduce the above copyright |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
13 * notice, this list of conditions and the following disclaimer in the |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
14 * documentation and/or other materials provided with the distribution. |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
15 * |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
16 * 3. The name of the author may not be used to endorse or promote products |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
17 * derived from this software without specific prior written permission. |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
18 * |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
22 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
23 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
25 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
27 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
28 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
29 * POSSIBILITY OF SUCH DAMAGE. |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
30 */ |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
31 |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
32 #include <stdlib.h> |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
33 #include <string.h> |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
34 #include <glib.h> |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
35 #include <mowgli.h> |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
36 #include <locale.h> |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
37 #include "libaudclient/audctrl.h" |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
38 #include "audtool.h" |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
39 |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
40 void audtool_report(const gchar *str, ...) |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
41 { |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
42 gchar *buf; |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
43 va_list va; |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
44 |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
45 va_start(va, str); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
46 buf = g_strdup_vprintf(str, va); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
47 va_end(va); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
48 |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
49 g_print("%s\n", buf); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
50 g_free(buf); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
51 } |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
52 |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
53 void audtool_whine(const gchar *str, ...) |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
54 { |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
55 gchar *buf; |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
56 va_list va; |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
57 |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
58 va_start(va, str); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
59 buf = g_strdup_vprintf(str, va); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
60 va_end(va); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
61 |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
62 g_printerr("audtool: %s\n", buf); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
63 g_free(buf); |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
64 } |
d1198fb765c6
Add audtool_report() and audtool_whine() for message handling.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
65 |