mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-29 20:23:01 +02:00
copy() made some...creative...use of control flow that made it quite difficult to follow. Take a first priciples approach to simplify the logic.
20 lines
510 B
C
20 lines
510 B
C
/* SPDX-License-Identifier: ISC */
|
|
#ifndef BIN_UTIL_H_
|
|
#define BIN_UTIL_H_
|
|
#include <stdbool.h>
|
|
#include <stdio.h>
|
|
#include <libite/lite.h>
|
|
|
|
#define ERRMSG "Error: "
|
|
#define INFMSG "Note: "
|
|
|
|
int yorn (const char *fmt, ...);
|
|
|
|
int files (const char *path, const char *stripext);
|
|
|
|
const char *basenm (const char *fn);
|
|
int has_ext (const char *fn, const char *ext);
|
|
char *cfg_adjust (const char *path, const char *template, bool sanitize);
|
|
|
|
#endif /* BIN_UTIL_H_ */
|