diff --git a/tools/embed.c b/tools/embed.c index 19c3662..b154c19 100644 --- a/tools/embed.c +++ b/tools/embed.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2012 Pierre Pronchery */ +/* Copyright (c) 2012-2013 Pierre Pronchery */ /* This file is part of DeforaOS Desktop Panel */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,6 +22,11 @@ #include #include "../include/Panel.h" +/* constants */ +#ifndef PROGNAME +# define PROGNAME "panel-embed" +#endif + /* private */ /* prototypes */ @@ -122,7 +127,7 @@ static void _embed_on_child(GPid pid, gint status, gpointer data) /* error */ static int _error(char const * message, int ret) { - fprintf(stderr, "%s%s\n", "panel-embed: ", message); + fprintf(stderr, "%s%s\n", PROGNAME ": ", message); return ret; } @@ -130,7 +135,7 @@ static int _error(char const * message, int ret) /* usage */ static int _usage(void) { - fputs("Usage: panel-embed command [arguments...]\n", stderr); + fprintf(stderr, "Usage: %s command [arguments...]\n", PROGNAME); return 1; }