mailing list of musl libc
 help / color / mirror / code / Atom feed
a7e1bdf816f7094c0fb22b48d570cb408a5f704e blob 1617 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
 
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>

extern char *__progname;

void vwarnc(int error, const char *fmt, va_list ap)
{
	fprintf (stderr, "%s: ", __progname);
	if (fmt) {
		vfprintf(stderr, fmt, ap);
		fputs (": ", stderr);
	}
	fputs(strerror(error), stderr);
	fputc('\n', stderr);
}

void vwarn(const char *fmt, va_list ap)
{
	vwarnc(errno, fmt, ap);
}

void vwarnx(const char *fmt, va_list ap)
{
	fprintf (stderr, "%s: ", __progname);
	if (fmt) vfprintf(stderr, fmt, ap);
	putc('\n', stderr);
}

_Noreturn void verrc(int status, int error, const char *fmt, va_list ap)
{
	vwarnc(error, fmt, ap);
	exit(status);
}

_Noreturn void verr(int status, const char *fmt, va_list ap)
{
	vwarn(fmt, ap);
	exit(status);
}

_Noreturn void verrx(int status, const char *fmt, va_list ap)
{
	vwarnx(fmt, ap);
	exit(status);
}

void warnc(int error, const char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	vwarnc(error, fmt, ap);
	va_end(ap);
}

void warn(const char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	vwarn(fmt, ap);
	va_end(ap);
}

void warnx(const char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	vwarnx(fmt, ap);
	va_end(ap);
}

_Noreturn void errc(int status, int error, const char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	verrc(status, error, fmt, ap);
	va_end(ap);
}

_Noreturn void err(int status, const char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	verr(status, fmt, ap);
	va_end(ap);
}

_Noreturn void errx(int status, const char *fmt, ...)
{
	va_list ap;
	va_start(ap, fmt);
	verrx(status, fmt, ap);
	va_end(ap);
}
debug log:

solving a7e1bdf ...
found a7e1bdf in https://inbox.vuxu.org/musl/20140614023330.GA557@muslin/
found 0d6ab52 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 0d6ab5242d9b769b31ced7fcc1a62fd5273a402c	src/legacy/err.c

applying [1/1] https://inbox.vuxu.org/musl/20140614023330.GA557@muslin/
diff --git a/src/legacy/err.c b/src/legacy/err.c
index 0d6ab52..a7e1bdf 100644

Checking patch src/legacy/err.c...
Applied patch src/legacy/err.c cleanly.

index at:
100644 a7e1bdf816f7094c0fb22b48d570cb408a5f704e	src/legacy/err.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).