Remove unused load_rom_from_commandline
[lsnes.git] / include / core / misc.hpp
blob3125c9e45f10d9e8c08b7ef239297e09ca2588fd
1 #ifndef _misc__hpp__included__
2 #define _misc__hpp__included__
4 #include <string>
5 #include <vector>
6 #include <stdexcept>
7 #include "library/string.hpp"
9 /**
10 * \brief Fatal error.
12 * Fatal error.
14 void fatal_error() throw();
16 /**
17 * \brief Get path to config directory.
19 * \return The config directory path.
20 * \throw std::bad_alloc Not enough memory.
22 std::string get_config_path() throw(std::bad_alloc);
24 /**
25 * \brief Panic on OOM.
27 void OOM_panic();
30 uint32_t gcd(uint32_t a, uint32_t b) throw();
32 /**
33 * Return hexadecimal representation of address
35 std::string format_address(void* addr);
37 /**
38 * Get state of running global ctors flag.
40 bool in_global_ctors();
41 /**
42 * Clear the global ctors flag.
44 void reached_main();
46 /**
47 * Clean up filename from dangerous chars
49 std::string safe_filename(const std::string& str);
51 /**
52 * Mangle some characters ()|/
54 std::string mangle_name(const std::string& orig);
56 /**
57 * Return a new temporary file. The file will be created.
59 std::string get_temp_file();
61 #endif