File: die.c

package info (click to toggle)
tinyssh 20250501-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,388 kB
  • sloc: ansic: 20,245; sh: 1,582; python: 1,449; makefile: 913
file content (22 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "global.h"
#include "log.h"
#include "die.h"

void die_usage(const char *x) {

    log_u1(x);
    global_die(100);
}

void die_fatal_(const char *fn, unsigned long long line, const char *trouble,
                const char *d, const char *f) {

    if (d) {
        if (f)
            log_9_(1, 0, fn, line, trouble, " ", d, "/", f, 0, 0, 0, 0);
        else
            log_9_(1, 0, fn, line, trouble, " ", d, 0, 0, 0, 0, 0, 0);
    }
    else { log_9_(1, 0, fn, line, trouble, 0, 0, 0, 0, 0, 0, 0, 0); }
    global_die(111);
}