Commit Graph

29 Commits

Author SHA1 Message Date
Nathan Woods
a1cf492ff4 Missed these, which needed wstring_from_utf8() 2017-01-04 18:59:06 -05:00
Nathan Woods
89b2f05c0d Fixed incorrect util::string_format() ==> util::stream_format() 2017-01-04 18:48:38 -05:00
Nathan Woods
b1eed07ad9 Vas Crabb feedback:
1.  Changed the Win32 code to use _O_U8TEXT()
2.  Reordered system #includes
3.  Changed a number of 'std::wcout << ...' to use util::stream_format()

I'm getting massive code compilation issues, and it isn't clear to me what the problem is.  I'm committing my WIP right now, with the intention of reviewing the specifics soon.
2017-01-04 08:06:20 -05:00
Nathan Woods
3231c3f648 [Imgtool] Changed to use wcout/wcerr in order to support Unicode console output
I really don't like the prevalence of '#ifdef WIN32' in this change, both the _setmode() and bypassing codecvt.  I strongly suspect that the latter is the consequence of some mistake that in practice doesn't cause problems in MSVC.  I welcome all eyes.
2017-01-02 11:59:25 -05:00
R. Belmont
2461b39eb7 Merge pull request #1830 from npwoods/imgtool_dir_formatting_fix
[Imgtool] Cleaned up the output of the 'dir' command
2016-12-13 10:38:12 -05:00
Nathan Woods
1b462f7434 [Imgtool] Cleaned up the output of the 'dir' command 2016-12-12 20:29:22 -05:00
Nathan Woods
a68a72a7f7 [Imgtool] Fixed a recently introduced error in the 'dir' command line command 2016-12-12 20:16:36 -05:00
Vas Crabb
27b58ac334 Merge pull request #1543 from npwoods/imgtool_stream_open_smartpointer
[Imgtool] Changed imgtool::stream::open*() to return imgtool::stream::ptr
2016-10-24 22:46:21 +11:00
Vas Crabb
129c0feeed srcclean (nw) 2016-10-23 22:36:24 +11:00
Nathan Woods
d167f6a5e1 [Imgtool] Changed imgtool::stream::open*() to return imgtool::stream::ptr
Updated quite a bit of client code that manually owned these pointers
2016-10-22 13:13:04 -04:00
Miodrag Milanovic
864360160b TRUE/FALSE in tools section (nw) 2016-10-22 18:14:41 +02:00
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
2016-10-22 13:13:17 +02:00
Miodrag Milanovic
d2e8f61149 dynamic_buffer is just std::vector<UINT8> (nw) 2016-10-21 12:35:05 +02:00
Nathan Woods
cb11268ed8 [Imgtool] Changed imgtool::image::info() to use std::stream and std::stringstream 2016-10-17 18:33:26 -04:00
Nathan Woods
d3567b0f71 [Imgtool] More C++-ification (imgtool_stream ==> imgtool::stream)
Still a bit of work to do, most notably around adoption of std::unique_ptr<>, which may be a challenge here on account of some assumptions regarding lifetime of streams by modules.
2016-10-12 07:20:39 -04:00
Nathan Woods
c5f7de716f [Imgtool] C++-ified a few more classes
imgtool_partition ==> imgtool::partition
imgtool_directory ==> imgtool::directory
2016-10-09 18:37:32 -04:00
Nathan Woods
baae7b926d Made imgtool_image (now imgtool::image) a "real" C++ class 2016-09-27 05:13:32 -04:00
Vas Crabb
33b2c73395 srcclean (nw) 2016-09-26 04:51:59 +10:00
Vas Crabb
7867c0ed7d Merge pull request #1444 from npwoods/imgtool_readsector_uses_stdvector
Imgtool:  Changed the read_sector apparatus to use std::vector
2016-09-26 03:34:26 +10:00
Nathan Woods
89512850bc Retired imgtool_basename(), in favor of core_filename_extract_base() 2016-09-24 18:50:43 -04:00
Nathan Woods
5f3bb35b12 Imgtool: Changed the read_sector apparatus to use std::vector
This also eliminated the need for get_sector_size

The asute reviewer will note that a side effect of this change is that in scenarios where we once returned IMGTOOLERR_OUTOFMEMORY, we now throw std::bad_alloc.  This is deliberate.  Having an error code for out of memory conditions no longer makes sense with MAME's embrace of the C++ way of doing things.  It is highly likely that I will follow up this change with one that eliminates IMGTOOLERR_OUTOFMEMORY in favor of throwing std::bad_alloc.

This commit also fixes a recent regression in which we passed nullptr to an std::string ctor
2016-09-24 09:56:47 -04:00
R. Belmont
0ecea843d0 Merge pull request #1398 from fulivi/hp9845_tools
Imgtool now supports HP9845B tape image
2016-09-16 14:05:35 -04:00
fulivi
e25e1b84b0 imgtool, hp9845_tape format: write&del done, brief info added at the
start of file.
2016-09-13 16:44:37 +02:00
Nathan Woods
9a3ac8f6b8 Imgtool: Changed the Imgtool module list to be std::list 2016-09-10 12:17:36 -04:00
Nathan Woods
9c06ec0b6a Incorporating Vas Crabb feedback 2016-09-01 06:49:54 -04:00
Nathan Woods
b60879e595 option_guide C++-ification, touched up imgtool
The main point of this change is to C++-ify option_guide.  It was changed from a struct array to a class, namespaced etc, with the ultimate hope of incorporating an in-emulation image creation UI.

Imgtool got hit with a number of changes; I'll probably have to bring that off of the backburner and touch that up too
2016-08-27 16:41:11 -04:00
Vas Crabb
6a67de94f9 Fix up imgtool as well 2016-07-08 15:29:50 +10:00
Miodrag Milanovic
5a2f80dcde clang-modernize part 5 2015-12-04 07:06:18 +01:00
Miodrag Milanovic
7c19aac60e Rename *.c -> *.cpp in our source (nw) 2015-11-08 12:56:12 +01:00