Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
BitchX
GitHub Repository: BitchX/BitchX1.3
Path: blob/master/dll/amp/util.c
1072 views
1
/* this file is a part of amp software
2
3
util.c: created by Andrew Richards
4
5
*/
6
7
#define AMP_UTIL
8
#include "amp.h"
9
10
#include <stdio.h>
11
#include <stdarg.h>
12
#include <string.h>
13
14
#include "audio.h"
15
16
/* die - for terminal conditions prints the error message and exits */
17
/* can not be suppressed with -q,-quiet */
18
void
19
die(char *fmt, ...)
20
{
21
#if 0
22
va_list ap;
23
va_start(ap,fmt);
24
vfprintf(stderr, fmt, ap);
25
#endif
26
_exit(-1);
27
}
28
29
30
/* warn - for warning messages. Can be suppressed by -q,-quiet */
31
void
32
warn(char *fmt, ...)
33
{
34
#if 0
35
va_list ap;
36
va_start(ap,fmt);
37
if (!A_QUIET) {
38
fprintf(stderr,"Warning: ");
39
vfprintf(stderr, fmt, ap);
40
}
41
#endif
42
}
43
44
45
/* msg - for general output. Can be suppressed by -q,-quiet. Output */
46
/* goes to stderr so it doesn't conflict with stdout output */
47
void
48
msg(char *fmt, ...)
49
{
50
#if 0
51
va_list ap;
52
va_start(ap,fmt);
53
54
if (!A_QUIET)
55
if (A_MSG_STDOUT) {
56
vfprintf(stdout, fmt, ap);
57
fflush(stdout);
58
} else {
59
vfprintf(stderr, fmt, ap);
60
fflush(stderr);
61
}
62
#endif
63
}
64
65
66