-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproc.h
More file actions
46 lines (37 loc) · 1.74 KB
/
Copy pathproc.h
File metadata and controls
46 lines (37 loc) · 1.74 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* $SchulteIT: proc.h 15260 2025-11-04 03:03:57Z schulte $ */
/* $JDTAUS: proc.h 9674 2026-08-07 17:02:19Z schulte $ */
/*
* Copyright (c) 2018 - 2026 Christian Schulte <cs@schulte.it>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef PROC_H
#define PROC_H
#ifdef HAVE_HOST_H
#include "host.h"
#endif
#include <stdlib.h>
#define panic() \
(werr("%s: Abort: %s: %d\n", __func__, __FILE__, __LINE__), abort())
#define fatal(_fmt, ...) \
(werr("%s: Failure: " _fmt "\n", __func__, __VA_ARGS__), exit(EXIT_FAILURE))
void wout(const char *, ...) __attribute__((__format__(printf, 1, 2)));
void werr(const char *, ...) __attribute__((__format__(printf, 1, 2)));
const char *envs(const char *restrict const, const char *restrict const);
const char *envuri(const char *restrict const, const char *restrict const);
unsigned long envul(const char *restrict const, const unsigned long);
#ifdef MULTI_THREADED
void proc_init(void);
void proc_destroy(void);
#endif
#endif