#if HAVE_LIBXML
#include <libxml/parser.h>
+#define PROGRAM_NAME "wayland-scanner"
+
/* Embedded wayland.dtd file, see dtddata.S */
extern char DTD_DATA_begin;
extern int DTD_DATA_len;
static int
usage(int ret)
{
- fprintf(stderr, "usage: ./scanner [OPTION] [client-header|server-header|code]"
- " [input_file output_file]\n");
+ fprintf(stderr, "usage: %s [OPTION] [client-header|server-header|code]"
+ " [input_file output_file]\n", PROGRAM_NAME);
fprintf(stderr, "\n");
fprintf(stderr, "Converts XML protocol descriptions supplied on "
"stdin or input file to client\n"
static int
scanner_version(int ret)
{
- fprintf(stderr, "wayland-scanner %s\n", WAYLAND_VERSION);
+ fprintf(stderr, "%s %s\n", PROGRAM_NAME, WAYLAND_VERSION);
exit(ret);
}
fail_on_null(void *p)
{
if (p == NULL) {
- fprintf(stderr, "wayland-scanner: out of memory\n");
+ fprintf(stderr, "%s: out of memory\n", PROGRAM_NAME);
exit(EXIT_FAILURE);
}
const char *s = (side == SERVER) ? "SERVER" : "CLIENT";
char **p, *prev;
- printf("/* Generated by wayland-scanner %s */\n\n", WAYLAND_VERSION);
+ printf("/* Generated by %s %s */\n\n", PROGRAM_NAME, WAYLAND_VERSION);
printf("#ifndef %s_%s_PROTOCOL_H\n"
"#define %s_%s_PROTOCOL_H\n"
struct wl_array types;
char **p, *prev;
- printf("/* Generated by wayland-scanner %s */\n\n", WAYLAND_VERSION);
+ printf("/* Generated by %s %s */\n\n", PROGRAM_NAME, WAYLAND_VERSION);
if (protocol->copyright)
format_text_to_comment(protocol->copyright, true);