Blame alsamixer/die.c

Packit Service a9274b
/*
Packit Service a9274b
 * die.c - error handlers
Packit Service a9274b
 * Copyright (c) Clemens Ladisch <clemens@ladisch.de>
Packit Service a9274b
 *
Packit Service a9274b
 * This program is free software: you can redistribute it and/or modify
Packit Service a9274b
 * it under the terms of the GNU General Public License as published by
Packit Service a9274b
 * the Free Software Foundation, either version 2 of the License, or
Packit Service a9274b
 * (at your option) any later version.
Packit Service a9274b
 *
Packit Service a9274b
 * This program is distributed in the hope that it will be useful,
Packit Service a9274b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a9274b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service a9274b
 * GNU General Public License for more details.
Packit Service a9274b
 *
Packit Service a9274b
 * You should have received a copy of the GNU General Public License
Packit Service a9274b
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit Service a9274b
 */
Packit Service a9274b
Packit Service a9274b
#include "aconfig.h"
Packit Service a9274b
#include <stdio.h>
Packit Service a9274b
#include <stdlib.h>
Packit Service a9274b
#include <alsa/asoundlib.h>
Packit Service a9274b
#include "gettext_curses.h"
Packit Service a9274b
#include "mainloop.h"
Packit Service a9274b
#include "die.h"
Packit Service a9274b
Packit Service a9274b
void fatal_error(const char *msg)
Packit Service a9274b
{
Packit Service a9274b
	app_shutdown();
Packit Service a9274b
	fprintf(stderr, "%s\n", msg);
Packit Service a9274b
	exit(EXIT_FAILURE);
Packit Service a9274b
}
Packit Service a9274b
Packit Service a9274b
void fatal_alsa_error(const char *msg, int err)
Packit Service a9274b
{
Packit Service a9274b
	app_shutdown();
Packit Service a9274b
	fprintf(stderr, _("%s: %s\n"), msg, snd_strerror(err));
Packit Service a9274b
	exit(EXIT_FAILURE);
Packit Service a9274b
}