Code cleanup

This commit is contained in:
Pierre Pronchery 2013-11-21 02:28:46 +01:00
parent d2d75cebd7
commit 1d87a5af1c

View File

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