diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/formats/thom_dsk.cpp | 28 | ||||
-rw-r--r-- | src/lib/netlist/devices/nlid_truthtable.h | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | src/lib/netlist/plib/pstring.h | 82 | ||||
-rw-r--r-- | src/lib/util/coreutil.h | 2 | ||||
-rw-r--r-- | src/lib/util/timeconv.h | 40 |
5 files changed, 79 insertions, 79 deletions
diff --git a/src/lib/formats/thom_dsk.cpp b/src/lib/formats/thom_dsk.cpp index 2b9f6a79d36..c8563fc1135 100644 --- a/src/lib/formats/thom_dsk.cpp +++ b/src/lib/formats/thom_dsk.cpp @@ -377,42 +377,42 @@ static floperr_t fd_construct(floppy_image_legacy *floppy, int tracks, int secto static FLOPPY_IDENTIFY(fd_80_256_identify) { - return fd_identify(floppy, vote, 80, 256); + return fd_identify(floppy, vote, 80, 256); } static FLOPPY_CONSTRUCT(fd_80_256_construct) { - return fd_construct(floppy, 80, 256); + return fd_construct(floppy, 80, 256); } static FLOPPY_IDENTIFY(fd_40_256_identify) { - return fd_identify(floppy, vote, 40, 256); + return fd_identify(floppy, vote, 40, 256); } static FLOPPY_CONSTRUCT(fd_40_256_construct) { - return fd_construct(floppy, 40, 256); + return fd_construct(floppy, 40, 256); } static FLOPPY_IDENTIFY(fd_80_128_identify) { - return fd_identify(floppy, vote, 80, 128); + return fd_identify(floppy, vote, 80, 128); } static FLOPPY_CONSTRUCT(fd_80_128_construct) { - return fd_construct(floppy, 80, 128); + return fd_construct(floppy, 80, 128); } static FLOPPY_IDENTIFY(fd_40_128_identify) { - return fd_identify(floppy, vote, 40, 128); + return fd_identify(floppy, vote, 40, 128); } static FLOPPY_CONSTRUCT(fd_40_128_construct) { - return fd_construct(floppy, 40, 128); + return fd_construct(floppy, 40, 128); } @@ -421,24 +421,24 @@ static FLOPPY_CONSTRUCT(fd_40_128_construct) LEGACY_FLOPPY_OPTIONS_START(thomson) LEGACY_FLOPPY_OPTION(fdmfm2, "fd", "Thomson FD (MFM) 80 tracks disk image (3\"1/2 DD)", - fd_80_256_identify, fd_80_256_construct, nullptr, nullptr) + fd_80_256_identify, fd_80_256_construct, nullptr, nullptr) // Note: no way to distinguish between FD files for 5"1/4 DD and 3"1/2 SD actually, as they have the same size // however, we expect 3"1/2 SD to be rather rare, so, we simply put it after 5"1/4 DD LEGACY_FLOPPY_OPTION(fdmfm, "fd", "Thomson FD (MFM) 40 tracks disk image (5\"1/4 DD)", - fd_40_256_identify, fd_40_256_construct, nullptr, nullptr) + fd_40_256_identify, fd_40_256_construct, nullptr, nullptr) LEGACY_FLOPPY_OPTION(fd2, "fd", "Thomson FD (FM) 80 tracks disk image (3\"1/2 SD)", - fd_80_128_identify, fd_80_128_construct, nullptr, nullptr) + fd_80_128_identify, fd_80_128_construct, nullptr, nullptr) LEGACY_FLOPPY_OPTION(fd, "fd", "Thomson FD (FM) 40 tracks disk image (5\"1/4 SD)", - fd_40_128_identify, fd_40_128_construct, nullptr, nullptr) + fd_40_128_identify, fd_40_128_construct, nullptr, nullptr) LEGACY_FLOPPY_OPTION(sap,"sap", "Thomson SAP floppy disk image", - sap_dsk_identify, sap_dsk_construct, nullptr, nullptr) + sap_dsk_identify, sap_dsk_construct, nullptr, nullptr) LEGACY_FLOPPY_OPTION(qdd,"qd", "Thomson QDD floppy disk image (2\"8 SD)", - qdd_dsk_identify, qdd_dsk_construct, nullptr, nullptr) + qdd_dsk_identify, qdd_dsk_construct, nullptr, nullptr) LEGACY_FLOPPY_OPTIONS_END diff --git a/src/lib/netlist/devices/nlid_truthtable.h b/src/lib/netlist/devices/nlid_truthtable.h index 416294ae0e4..311f5ebd8ca 100644 --- a/src/lib/netlist/devices/nlid_truthtable.h +++ b/src/lib/netlist/devices/nlid_truthtable.h @@ -44,9 +44,9 @@ namespace netlist struct need_bytes_for_bits { enum { value = - bits <= 8 ? 1 : - bits <= 16 ? 2 : - bits <= 32 ? 4 : + bits <= 8 ? 1 : + bits <= 16 ? 2 : + bits <= 32 ? 4 : 8 }; }; diff --git a/src/lib/netlist/plib/pstring.h b/src/lib/netlist/plib/pstring.h index 63f53f791cb..ced1cdc1f22 100755..100644 --- a/src/lib/netlist/plib/pstring.h +++ b/src/lib/netlist/plib/pstring.h @@ -62,18 +62,18 @@ public: typedef typename traits_type::mem_t mem_t; typedef typename traits_type::code_t code_t; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef typename traits_type::string_type string_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef typename traits_type::string_type string_type; class ref_value_type final { public: - ref_value_type() = delete; - ref_value_type(const ref_value_type &) = delete; - ref_value_type(ref_value_type &&) = delete; - ref_value_type &operator=(const ref_value_type &) = delete; - ref_value_type &operator=(ref_value_type &&) = delete; + ref_value_type() = delete; + ref_value_type(const ref_value_type &) = delete; + ref_value_type(ref_value_type &&) = delete; + ref_value_type &operator=(const ref_value_type &) = delete; + ref_value_type &operator=(ref_value_type &&) = delete; operator code_t() const noexcept { return traits_type::code(&m); } private: const mem_t m; @@ -166,8 +166,8 @@ public: const_iterator cend() const { return const_iterator(m_str.end()); } // C string conversion helpers - const mem_t *c_str() const { return static_cast<const mem_t *>(m_str.c_str()); } - const mem_t *data() const { return c_str(); } + const mem_t *c_str() const { return static_cast<const mem_t *>(m_str.c_str()); } + const mem_t *data() const { return c_str(); } size_type length() const { return traits_type::len(m_str); } size_type size() const { return traits_type::len(m_str); } @@ -369,7 +369,7 @@ struct putf16_traits while (i != p.end()) { // FIXME: check that size is equal - uint16_t c = static_cast<uint16_t>(*i++); + uint16_t c = static_cast<uint16_t>(*i++); if (!((c & 0xd800) == 0xd800)) ret++; } @@ -377,8 +377,8 @@ struct putf16_traits } static std::size_t codelen(const mem_t *p) { - uint16_t c = static_cast<uint16_t>(*p); - return ((c & 0xd800) == 0xd800) ? 2 : 1; + uint16_t c = static_cast<uint16_t>(*p); + return ((c & 0xd800) == 0xd800) ? 2 : 1; } static std::size_t codelen(const code_t c) { @@ -389,28 +389,28 @@ struct putf16_traits } static code_t code(const mem_t *p) { - uint32_t c = static_cast<uint32_t>(*p++); - if ((c & 0xd800) == 0xd800) - { - c = (c - 0xd800) << 10; - c += static_cast<uint32_t>(*p) - 0xdc00 + 0x10000; - } - return static_cast<code_t>(c); + uint32_t c = static_cast<uint32_t>(*p++); + if ((c & 0xd800) == 0xd800) + { + c = (c - 0xd800) << 10; + c += static_cast<uint32_t>(*p) - 0xdc00 + 0x10000; + } + return static_cast<code_t>(c); } static void encode(code_t c, string_type &s) { uint32_t cu = static_cast<uint32_t>(c); - if (c > 0xffff) - { //make a surrogate pair - uint32_t t = ((cu - 0x10000) >> 10) + 0xd800; - cu = (cu & 0x3ff) + 0xdc00; - s += static_cast<mem_t>(t); - s += static_cast<mem_t>(cu); - } - else - { - s += static_cast<mem_t>(cu); - } + if (c > 0xffff) + { //make a surrogate pair + uint32_t t = ((cu - 0x10000) >> 10) + 0xd800; + cu = (cu & 0x3ff) + 0xdc00; + s += static_cast<mem_t>(t); + s += static_cast<mem_t>(cu); + } + else + { + s += static_cast<mem_t>(cu); + } } static const mem_t *nthcode(const mem_t *p, const std::size_t n) { @@ -435,7 +435,7 @@ struct pwchar_traits while (i != p.end()) { // FIXME: check that size is equal - uint32_t c = static_cast<uint32_t>(*i++); + uint32_t c = static_cast<uint32_t>(*i++); if (!((c & 0xd800) == 0xd800)) ret++; } @@ -449,8 +449,8 @@ struct pwchar_traits { if (sizeof(wchar_t) == 2) { - uint16_t c = static_cast<uint16_t>(*p); - return ((c & 0xd800) == 0xd800) ? 2 : 1; + uint16_t c = static_cast<uint16_t>(*p); + return ((c & 0xd800) == 0xd800) ? 2 : 1; } else return 1; @@ -468,13 +468,13 @@ struct pwchar_traits { if (sizeof(wchar_t) == 2) { - uint32_t c = static_cast<uint32_t>(*p++); - if ((c & 0xd800) == 0xd800) - { - c = (c - 0xd800) << 10; - c += static_cast<uint32_t>(*p) - 0xdc00 + 0x10000; - } - return static_cast<code_t>(c); + uint32_t c = static_cast<uint32_t>(*p++); + if ((c & 0xd800) == 0xd800) + { + c = (c - 0xd800) << 10; + c += static_cast<uint32_t>(*p) - 0xdc00 + 0x10000; + } + return static_cast<code_t>(c); } else return static_cast<code_t>(*p); diff --git a/src/lib/util/coreutil.h b/src/lib/util/coreutil.h index 4e5526fc6f0..0a584c4a39e 100644 --- a/src/lib/util/coreutil.h +++ b/src/lib/util/coreutil.h @@ -38,7 +38,7 @@ constexpr bool gregorian_is_leap_year(int year) //------------------------------------------------- // gregorian_days_in_month - given a year and a one-counted -// month, return the amount of days in that month +// month, return the amount of days in that month //------------------------------------------------- inline int gregorian_days_in_month(int month, int year) diff --git a/src/lib/util/timeconv.h b/src/lib/util/timeconv.h index e2f6a987135..7f9a7830b8e 100644 --- a/src/lib/util/timeconv.h +++ b/src/lib/util/timeconv.h @@ -21,7 +21,7 @@ namespace util { /*************************************************************************** - GLOBAL VARIABLES + GLOBAL VARIABLES ***************************************************************************/ extern std::chrono::system_clock::duration system_clock_adjustment; @@ -35,18 +35,18 @@ typedef std::chrono::duration<std::uint64_t, std::ratio<1, 10000000> > ntfs_dura //--------------------------------------------------------- -// arbitrary_clock - an std::chrono clock that "knows" the -// date of the epoch's begining +// arbitrary_clock - an std::chrono clock that "knows" the +// date of the epoch's begining //--------------------------------------------------------- template<typename Rep, int Y, int M, int D, int H, int N, int S, typename Ratio> class arbitrary_clock { public: - typedef Rep rep; - typedef Ratio period; - typedef std::chrono::duration<rep, period> duration; - typedef std::chrono::time_point<arbitrary_clock> time_point; + typedef Rep rep; + typedef Ratio period; + typedef std::chrono::duration<rep, period> duration; + typedef std::chrono::time_point<arbitrary_clock> time_point; static constexpr int base_year = Y; static constexpr int base_month = M; static constexpr int base_day = D; @@ -55,8 +55,8 @@ public: static constexpr int base_second = S; //--------------------------------------------------------- - // from_arbitrary_time_point - converts an arbitrary_clock - // with a different scale to this arbitrary_clock's scale + // from_arbitrary_time_point - converts an arbitrary_clock + // with a different scale to this arbitrary_clock's scale //--------------------------------------------------------- template<typename Rep2, int Y2, int M2, int D2, int H2, int N2, int S2, typename Ratio2> @@ -75,8 +75,8 @@ public: //--------------------------------------------------------- - // to_arbitrary_time_point - converts an arbitrary_clock - // of this scale to one of different scale + // to_arbitrary_time_point - converts an arbitrary_clock + // of this scale to one of different scale //--------------------------------------------------------- template<typename Rep2, int Y2, int M2, int D2, int H2, int N2, int S2, typename Ratio2> @@ -87,7 +87,7 @@ public: //--------------------------------------------------------- - // to_tm - formats a structure of type 'struct tm' + // to_tm - formats a structure of type 'struct tm' //--------------------------------------------------------- static struct tm to_tm(const time_point &tp) @@ -106,7 +106,7 @@ public: //--------------------------------------------------------- - // to_system_clock - converts to a system_clock time_point + // to_system_clock - converts to a system_clock time_point //--------------------------------------------------------- static std::chrono::time_point<std::chrono::system_clock> to_system_clock(const time_point &tp) @@ -124,7 +124,7 @@ public: } //--------------------------------------------------------- - // from_system_clock - converts from a system_clock time_point + // from_system_clock - converts from a system_clock time_point //--------------------------------------------------------- static time_point from_system_clock(const std::chrono::time_point<std::chrono::system_clock> &tp) @@ -138,13 +138,13 @@ private: // // * years with leap years are at the end of every quadyear // * quadyears without leap years are at the end of every century - // * centuries where the last quadyear has a leap year at the end are at the - // end of every quadcentury + // * centuries where the last quadyear has a leap year at the end are at the + // end of every quadcentury typedef arbitrary_clock<std::int64_t, 1601, 1, 1, 0, 0, 0, std::ratio<1, 1> > tm_conversion_clock; //--------------------------------------------------------- - // internal_to_tm - formats a structure of type 'struct tm' - // based on a normalized clock + // internal_to_tm - formats a structure of type 'struct tm' + // based on a normalized clock //--------------------------------------------------------- static struct tm internal_to_tm(std::chrono::duration<std::int64_t, std::ratio<1, 1> > duration) @@ -217,8 +217,8 @@ private: typedef arbitrary_clock<std::int64_t, 1970, 1, 1, 0, 0, 0, std::chrono::system_clock::period > system_conversion_clock; //------------------------------------------------- - // absolute_day - returns the absolute day count - // for the specified year/month/day + // absolute_day - returns the absolute day count + // for the specified year/month/day //------------------------------------------------- static int64_t absolute_day(int year, int month, int day) |