From b18347ffc9db9641e215995edea1c04c363b2bdf Mon Sep 17 00:00:00 2001 From: Angelo Rossi Date: Wed, 21 Jun 2023 12:04:16 +0000 Subject: Initial commit. --- includes/utilities.hpp | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 includes/utilities.hpp (limited to 'includes/utilities.hpp') diff --git a/includes/utilities.hpp b/includes/utilities.hpp new file mode 100644 index 0000000..958c9ea --- /dev/null +++ b/includes/utilities.hpp @@ -0,0 +1,67 @@ +//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*- + +// file utilities.hpp + +#ifndef _UTILITIES_HPP +#define _UTILITIES_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// UNIX includes. +#include +#include +#include + +#include "blkcom.hpp" +#include "dekspy.hpp" +#include "time.hpp" +#include "strcom.hpp" +#include "emtp.hpp" + +// Macros. +#define FOREVER for(;;) + +namespace kwtcom { + + extern long int nKWTVAX; + +} + +namespace utilities +{ + // Types + + // Prototypes. + bool exists (const char *); + std::string format (const std::string &, ...); + void quiter(void); + void window(std::ostream &, std::stringstream &); + void honker(const long int &); + void flager(void); + void prompt(std::ostream &, const std::string &); + bool openFile(std::fstream *, \ + std::string &, \ + const std::ios::openmode &); + bool closeFile(std::fstream *); + bool copyFile(std::fstream *, \ + std::fstream *, \ + const std::string &); + bool deleteFile(const std::string &); + struct winsize getTerminalSize(void); + void expchk(long int &, \ + long int &, \ + long int &); + +} + +#endif // _UTILITIES_HPP + +// end of file utilities.hpp -- cgit v1.2.3