11a1589223
Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
/* SPDX-License-Identifier: LGPL-2.1+ */
|
|
#pragma once
|
|
|
|
/***
|
|
This file is part of systemd.
|
|
|
|
Copyright 2010 Lennart Poettering
|
|
***/
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
|
|
#include "macro.h"
|
|
|
|
char octchar(int x) _const_;
|
|
int unoctchar(char c) _const_;
|
|
|
|
char decchar(int x) _const_;
|
|
int undecchar(char c) _const_;
|
|
|
|
char hexchar(int x) _const_;
|
|
int unhexchar(char c) _const_;
|
|
|
|
char *hexmem(const void *p, size_t l);
|
|
int unhexmem(const char *p, size_t l, void **mem, size_t *len);
|
|
|
|
char base32hexchar(int x) _const_;
|
|
int unbase32hexchar(char c) _const_;
|
|
|
|
char base64char(int x) _const_;
|
|
int unbase64char(char c) _const_;
|
|
|
|
char *base32hexmem(const void *p, size_t l, bool padding);
|
|
int unbase32hexmem(const char *p, size_t l, bool padding, void **mem, size_t *len);
|
|
|
|
ssize_t base64mem(const void *p, size_t l, char **out);
|
|
int base64_append(char **prefix, int plen,
|
|
const void *p, size_t l,
|
|
int margin, int width);
|
|
int unbase64mem(const char *p, size_t l, void **mem, size_t *len);
|
|
|
|
void hexdump(FILE *f, const void *p, size_t s);
|