File: cli.c

package info (click to toggle)
foremost 1.5.7-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 516 kB
  • sloc: ansic: 9,218; makefile: 511
file content (26 lines) | stat: -rwxr-xr-x 510 bytes parent folder | download | duplicates (9)
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


#include "main.h"

void fatal_error (f_state * s, char *msg)
	{
	fprintf(stderr, "%s: %s%s", __progname, msg, NEWLINE);
	if (get_audit_file_open(s))
		{
		audit_msg(s, msg);
		close_audit_file(s);
		}
	exit(EXIT_FAILURE);
	}

void print_error(f_state *s, char *fn, char *msg)
{
	if (!(get_mode(s, mode_quiet)))
		fprintf(stderr, "%s: %s: %s%s", __progname, fn, msg, NEWLINE);
}

void print_message(f_state *s, char *format, va_list argp)
{
	vfprintf(stdout, format, argp);
	fprintf(stdout, "%s", NEWLINE);
}