summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--benchmarks/eminline_noasm.cpp2
-rw-r--r--src/devices/bus/coco/coco_dwsock.cpp4
-rw-r--r--src/devices/bus/rs232/pty.cpp2
-rw-r--r--src/devices/cpu/alph8201/8201dasm.cpp2
-rw-r--r--src/devices/cpu/drcbex64.cpp2
-rw-r--r--src/devices/cpu/drcbex86.cpp2
-rw-r--r--src/devices/cpu/dsp56156/opcode.cpp2
-rw-r--r--src/devices/cpu/dsp56156/tables.cpp6
-rw-r--r--src/devices/cpu/dsp56156/tables.h4
-rw-r--r--src/devices/cpu/g65816/g65816cm.h2
-rw-r--r--src/devices/cpu/hpc/hpcdasm.cpp2
-rw-r--r--src/devices/cpu/i386/x87priv.h2
-rw-r--r--src/devices/cpu/i860/i860dec.hxx2
-rw-r--r--src/devices/cpu/i960/i960.cpp2
-rw-r--r--src/devices/cpu/m37710/m37710cm.h2
-rw-r--r--src/devices/cpu/m68000/m68kcpu.h2
-rw-r--r--src/devices/cpu/pic16c5x/16c5xdsm.cpp2
-rw-r--r--src/devices/cpu/pic16c62x/16c62xdsm.cpp2
-rw-r--r--src/devices/cpu/sc61860/readpc.cpp2
-rw-r--r--src/devices/cpu/sharc/compute.hxx2
-rw-r--r--src/devices/cpu/spc700/spc700.cpp2
-rw-r--r--src/devices/cpu/tms32010/32010dsm.cpp2
-rw-r--r--src/devices/cpu/tms32010/dis32010.cpp4
-rw-r--r--src/devices/cpu/tms32025/32025dsm.cpp2
-rw-r--r--src/devices/cpu/z8000/makedab.cpp2
-rw-r--r--src/devices/machine/corvushd.h2
-rw-r--r--src/devices/machine/ds1204.cpp2
-rw-r--r--src/devices/machine/ds1205.cpp2
-rw-r--r--src/devices/machine/ds1994.cpp2
-rw-r--r--src/devices/machine/ds2404.cpp2
-rw-r--r--src/devices/machine/i8087.cpp2
-rw-r--r--src/devices/machine/k054321.cpp2
-rw-r--r--src/devices/machine/ram.cpp4
-rw-r--r--src/devices/machine/tms9901.cpp2
-rw-r--r--src/devices/machine/tms9902.cpp2
-rw-r--r--src/devices/machine/wd2010.cpp2
-rw-r--r--src/devices/sound/disc_mth.hxx2
-rw-r--r--src/devices/sound/mea8000.cpp2
-rw-r--r--src/devices/video/poly.h2
-rw-r--r--src/emu/attotime.h2
-rw-r--r--src/emu/debug/debugcmd.cpp2
-rw-r--r--src/emu/debug/debugcon.cpp2
-rw-r--r--src/emu/debug/debughlp.cpp2
-rw-r--r--src/emu/debug/debugvw.cpp2
-rw-r--r--src/emu/debug/dvmemory.cpp2
-rw-r--r--src/emu/debug/express.cpp2
-rw-r--r--src/emu/debugger.cpp2
-rw-r--r--src/emu/devcpu.cpp2
-rw-r--r--src/emu/device.cpp2
-rw-r--r--src/emu/drivenum.cpp2
-rw-r--r--src/emu/emucore.h12
-rw-r--r--src/emu/http.h2
-rw-r--r--src/emu/image.cpp2
-rw-r--r--src/emu/ioport.cpp4
-rw-r--r--src/emu/ioport.h2
-rw-r--r--src/emu/machine.cpp2
-rw-r--r--src/emu/machine.h2
-rw-r--r--src/emu/main.h2
-rw-r--r--src/emu/mconfig.cpp2
-rw-r--r--src/emu/network.cpp2
-rw-r--r--src/emu/render.h2
-rw-r--r--src/emu/rendlay.cpp2
-rw-r--r--src/emu/rendutil.h2
-rw-r--r--src/emu/softlist_dev.cpp2
-rw-r--r--src/emu/validity.cpp2
-rw-r--r--src/frontend/mame/cheat.cpp2
-rw-r--r--src/frontend/mame/clifront.cpp2
-rw-r--r--src/frontend/mame/infoxml.cpp2
-rw-r--r--src/frontend/mame/mame.cpp2
-rw-r--r--src/frontend/mame/mameopts.cpp2
-rw-r--r--src/frontend/mame/ui/simpleselgame.cpp2
-rw-r--r--src/lib/formats/a26_cas.cpp2
-rw-r--r--src/lib/formats/a5105_dsk.cpp2
-rw-r--r--src/lib/formats/abc800_dsk.cpp2
-rw-r--r--src/lib/formats/abcfd2_dsk.cpp2
-rw-r--r--src/lib/formats/ace_tap.cpp2
-rw-r--r--src/lib/formats/adam_cas.cpp2
-rw-r--r--src/lib/formats/adam_dsk.cpp2
-rw-r--r--src/lib/formats/agat840k_hle_dsk.cpp2
-rw-r--r--src/lib/formats/aim_dsk.cpp2
-rw-r--r--src/lib/formats/ami_dsk.cpp2
-rw-r--r--src/lib/formats/ap2_dsk.cpp6
-rw-r--r--src/lib/formats/ap_dsk35.cpp4
-rw-r--r--src/lib/formats/apf_apt.cpp2
-rw-r--r--src/lib/formats/apollo_dsk.cpp2
-rw-r--r--src/lib/formats/applix_dsk.cpp2
-rw-r--r--src/lib/formats/asst128_dsk.cpp2
-rw-r--r--src/lib/formats/atari_dsk.cpp2
-rw-r--r--src/lib/formats/atom_tap.cpp2
-rw-r--r--src/lib/formats/basicdsk.cpp6
-rw-r--r--src/lib/formats/bw12_dsk.cpp2
-rw-r--r--src/lib/formats/bw2_dsk.cpp2
-rw-r--r--src/lib/formats/c3040_dsk.cpp2
-rw-r--r--src/lib/formats/c4040_dsk.cpp2
-rw-r--r--src/lib/formats/camplynx_dsk.cpp2
-rw-r--r--src/lib/formats/cassimg.cpp4
-rw-r--r--src/lib/formats/cbm_tap.cpp2
-rw-r--r--src/lib/formats/cgen_cas.cpp2
-rw-r--r--src/lib/formats/comx35_dsk.cpp2
-rw-r--r--src/lib/formats/concept_dsk.cpp2
-rw-r--r--src/lib/formats/coupedsk.cpp2
-rw-r--r--src/lib/formats/cqm_dsk.cpp4
-rw-r--r--src/lib/formats/csw_cas.cpp4
-rw-r--r--src/lib/formats/d71_dsk.cpp2
-rw-r--r--src/lib/formats/d80_dsk.cpp2
-rw-r--r--src/lib/formats/d81_dsk.cpp2
-rw-r--r--src/lib/formats/d82_dsk.cpp2
-rw-r--r--src/lib/formats/d88_dsk.cpp2
-rw-r--r--src/lib/formats/dcp_dsk.cpp2
-rw-r--r--src/lib/formats/dim_dsk.cpp4
-rw-r--r--src/lib/formats/dip_dsk.cpp2
-rw-r--r--src/lib/formats/dmk_dsk.cpp2
-rw-r--r--src/lib/formats/dmv_dsk.cpp2
-rw-r--r--src/lib/formats/ds9_dsk.cpp2
-rw-r--r--src/lib/formats/dsk_dsk.cpp4
-rw-r--r--src/lib/formats/dvk_mx_dsk.cpp2
-rw-r--r--src/lib/formats/ep64_dsk.cpp2
-rw-r--r--src/lib/formats/esq16_dsk.cpp2
-rw-r--r--src/lib/formats/esq8_dsk.cpp2
-rw-r--r--src/lib/formats/excali64_dsk.cpp2
-rw-r--r--src/lib/formats/fc100_cas.cpp2
-rw-r--r--src/lib/formats/fdd_dsk.cpp2
-rw-r--r--src/lib/formats/fdi_dsk.cpp2
-rw-r--r--src/lib/formats/flopimg.cpp12
-rw-r--r--src/lib/formats/fm7_cas.cpp2
-rw-r--r--src/lib/formats/fmsx_cas.cpp2
-rw-r--r--src/lib/formats/fmtowns_dsk.cpp2
-rw-r--r--src/lib/formats/gtp_cas.cpp2
-rw-r--r--src/lib/formats/hect_dsk.cpp2
-rw-r--r--src/lib/formats/hect_tap.cpp2
-rw-r--r--src/lib/formats/hp_ipc_dsk.cpp2
-rw-r--r--src/lib/formats/hxcmfm_dsk.cpp2
-rw-r--r--src/lib/formats/imageutl.cpp2
-rw-r--r--src/lib/formats/imd_dsk.cpp4
-rw-r--r--src/lib/formats/ioprocs.cpp6
-rw-r--r--src/lib/formats/ioprocs.h4
-rw-r--r--src/lib/formats/ipf_dsk.cpp2
-rw-r--r--src/lib/formats/iq151_dsk.cpp2
-rw-r--r--src/lib/formats/itt3030_dsk.cpp2
-rw-r--r--src/lib/formats/kaypro_dsk.cpp2
-rw-r--r--src/lib/formats/kc85_dsk.cpp2
-rw-r--r--src/lib/formats/kc_cas.cpp2
-rw-r--r--src/lib/formats/kim1_cas.cpp2
-rw-r--r--src/lib/formats/lviv_lvt.cpp2
-rw-r--r--src/lib/formats/m5_dsk.cpp2
-rw-r--r--src/lib/formats/mbee_cas.cpp2
-rw-r--r--src/lib/formats/mfi_dsk.cpp2
-rw-r--r--src/lib/formats/mm_dsk.cpp2
-rw-r--r--src/lib/formats/ms0515_dsk.cpp2
-rw-r--r--src/lib/formats/mz_cas.cpp4
-rw-r--r--src/lib/formats/nanos_dsk.cpp2
-rw-r--r--src/lib/formats/naslite_dsk.cpp2
-rw-r--r--src/lib/formats/nes_dsk.cpp4
-rw-r--r--src/lib/formats/nfd_dsk.cpp2
-rw-r--r--src/lib/formats/orao_cas.cpp2
-rw-r--r--src/lib/formats/oric_tap.cpp2
-rw-r--r--src/lib/formats/p6001_cas.cpp2
-rw-r--r--src/lib/formats/pc98_dsk.cpp4
-rw-r--r--src/lib/formats/pc98fdi_dsk.cpp2
-rw-r--r--src/lib/formats/pc_dsk.cpp4
-rw-r--r--src/lib/formats/phc25_cas.cpp2
-rw-r--r--src/lib/formats/pmd_cas.cpp2
-rw-r--r--src/lib/formats/ppg_dsk.cpp2
-rw-r--r--src/lib/formats/primoptp.cpp2
-rw-r--r--src/lib/formats/pyldin_dsk.cpp2
-rw-r--r--src/lib/formats/ql_dsk.cpp2
-rw-r--r--src/lib/formats/rk_cas.cpp2
-rw-r--r--src/lib/formats/rx50_dsk.cpp2
-rw-r--r--src/lib/formats/sc3000_bit.cpp2
-rw-r--r--src/lib/formats/sdf_dsk.cpp2
-rw-r--r--src/lib/formats/sf7000_dsk.cpp2
-rw-r--r--src/lib/formats/smx_dsk.cpp2
-rw-r--r--src/lib/formats/sol_cas.cpp2
-rw-r--r--src/lib/formats/sorc_cas.cpp2
-rw-r--r--src/lib/formats/sorc_dsk.cpp4
-rw-r--r--src/lib/formats/sord_cas.cpp4
-rw-r--r--src/lib/formats/spc1000_cas.cpp2
-rw-r--r--src/lib/formats/st_dsk.cpp2
-rw-r--r--src/lib/formats/svi_cas.cpp2
-rw-r--r--src/lib/formats/tandy2k_dsk.cpp2
-rw-r--r--src/lib/formats/td0_dsk.cpp4
-rw-r--r--src/lib/formats/thom_cas.cpp4
-rw-r--r--src/lib/formats/thom_dsk.cpp4
-rw-r--r--src/lib/formats/ti99_dsk.cpp6
-rw-r--r--src/lib/formats/tiki100_dsk.cpp2
-rw-r--r--src/lib/formats/trd_dsk.cpp2
-rw-r--r--src/lib/formats/trs_cas.cpp2
-rw-r--r--src/lib/formats/tvc_cas.cpp2
-rw-r--r--src/lib/formats/tvc_dsk.cpp2
-rw-r--r--src/lib/formats/tzx_cas.cpp2
-rw-r--r--src/lib/formats/uef_cas.cpp6
-rw-r--r--src/lib/formats/vg5k_cas.cpp2
-rw-r--r--src/lib/formats/vt_cas.cpp2
-rw-r--r--src/lib/formats/wavfile.cpp4
-rw-r--r--src/lib/formats/x07_cas.cpp2
-rw-r--r--src/lib/formats/x1_tap.cpp2
-rw-r--r--src/lib/formats/xdf_dsk.cpp2
-rw-r--r--src/lib/formats/zx81_p.cpp2
-rw-r--r--src/lib/netlist/plib/pmain.cpp2
-rw-r--r--src/lib/util/avhuff.cpp6
-rw-r--r--src/lib/util/bitmap.cpp2
-rw-r--r--src/lib/util/cdrom.cpp4
-rw-r--r--src/lib/util/chd.cpp8
-rw-r--r--src/lib/util/chdcd.cpp6
-rw-r--r--src/lib/util/chdcodec.cpp2
-rw-r--r--src/lib/util/corealloc.h2
-rw-r--r--src/lib/util/corefile.cpp2
-rw-r--r--src/lib/util/corestr.cpp4
-rw-r--r--src/lib/util/corestr.h2
-rw-r--r--src/lib/util/coreutil.cpp2
-rw-r--r--src/lib/util/delegate.cpp4
-rw-r--r--src/lib/util/flac.cpp2
-rw-r--r--src/lib/util/harddisk.cpp4
-rw-r--r--src/lib/util/hash.cpp2
-rw-r--r--src/lib/util/huffman.cpp4
-rw-r--r--src/lib/util/jedparse.cpp8
-rw-r--r--src/lib/util/md5.cpp2
-rw-r--r--src/lib/util/opresolv.cpp8
-rw-r--r--src/lib/util/opresolv.h2
-rw-r--r--src/lib/util/options.cpp8
-rw-r--r--src/lib/util/palette.cpp6
-rw-r--r--src/lib/util/plaparse.cpp8
-rw-r--r--src/lib/util/png.cpp4
-rw-r--r--src/lib/util/pool.cpp6
-rw-r--r--src/lib/util/sha1.cpp6
-rw-r--r--src/lib/util/unicode.h2
-rw-r--r--src/lib/util/vbiparse.cpp2
-rw-r--r--src/lib/util/xmlfile.cpp2
-rw-r--r--src/lib/util/zippath.cpp2
-rw-r--r--src/mame/drivers/ldplayer.cpp2
-rw-r--r--src/mame/drivers/namcos23.cpp2
-rw-r--r--src/mame/etc/fd1094dp.cpp6
-rw-r--r--src/mame/etc/jrcrypt.cpp4
-rw-r--r--src/mame/machine/atarifdc.cpp2
-rw-r--r--src/mame/machine/bbc.cpp2
-rw-r--r--src/mame/machine/cx4fn.hxx2
-rw-r--r--src/mame/machine/dgn_beta.cpp2
-rw-r--r--src/mame/machine/gaelco3d.cpp2
-rw-r--r--src/mame/machine/ti85.cpp2
-rw-r--r--src/mame/machine/zx8302.cpp2
-rw-r--r--src/mame/video/3dom2_te.cpp2
-rw-r--r--src/mame/video/k001005.h2
-rw-r--r--src/mame/video/pdp1.cpp2
-rw-r--r--src/mame/video/thomson.cpp2
-rw-r--r--src/mame/video/vectrex.cpp2
-rw-r--r--src/osd/eigccx86.h2
-rw-r--r--src/osd/mac/window.cpp2
-rw-r--r--src/osd/modules/debugger/osx/debugview.mm2
-rw-r--r--src/osd/modules/file/posixfile.cpp4
-rw-r--r--src/osd/modules/file/posixptty.cpp4
-rw-r--r--src/osd/modules/file/stdfile.cpp2
-rw-r--r--src/osd/modules/file/windir.cpp4
-rw-r--r--src/osd/modules/file/winfile.cpp4
-rw-r--r--src/osd/modules/file/winptty.cpp2
-rw-r--r--src/osd/modules/file/winrtdir.cpp4
-rw-r--r--src/osd/modules/file/winrtfile.cpp4
-rw-r--r--src/osd/modules/file/winrtptty.cpp2
-rw-r--r--src/osd/modules/file/winrtsocket.cpp4
-rw-r--r--src/osd/modules/file/winsocket.cpp4
-rw-r--r--src/osd/modules/input/input_mac.cpp4
-rw-r--r--src/osd/modules/input/input_sdl.cpp4
-rw-r--r--src/osd/modules/input/input_sdlcommon.cpp4
-rw-r--r--src/osd/modules/input/input_x11.cpp4
-rw-r--r--src/osd/modules/lib/osdlib_macosx.cpp4
-rw-r--r--src/osd/modules/lib/osdlib_unix.cpp4
-rw-r--r--src/osd/modules/lib/osdlib_uwp.cpp2
-rw-r--r--src/osd/modules/lib/osdlib_win32.cpp2
-rw-r--r--src/osd/modules/netdev/taptun.cpp2
-rw-r--r--src/osd/modules/opengl/gl_shader_mgr.cpp4
-rw-r--r--src/osd/modules/render/bgfx/statereader.cpp2
-rw-r--r--src/osd/modules/render/bgfx/texture.cpp2
-rw-r--r--src/osd/modules/render/draw13.cpp4
-rw-r--r--src/osd/modules/render/drawd3d.h2
-rw-r--r--src/osd/modules/render/drawogl.cpp8
-rw-r--r--src/osd/modules/render/drawsdl.cpp4
-rw-r--r--src/osd/modules/sound/coreaudio_sound.cpp2
-rw-r--r--src/osd/osdcomm.h4
-rw-r--r--src/osd/osdcore.cpp2
-rw-r--r--src/osd/osdsync.cpp4
-rw-r--r--src/osd/sdl/window.cpp2
-rw-r--r--src/osd/strconv.cpp2
-rw-r--r--src/osd/uwp/uwpcompat.cpp2
-rw-r--r--src/osd/uwp/uwpcompat.h2
-rw-r--r--src/osd/windows/ledutil.cpp6
-rw-r--r--src/osd/windows/main.cpp2
-rw-r--r--src/osd/windows/winmain.cpp6
-rw-r--r--src/osd/windows/winutf8.cpp2
-rw-r--r--src/tools/aueffectutil.mm2
-rw-r--r--src/tools/castool.cpp12
-rw-r--r--src/tools/chdman.cpp14
-rw-r--r--src/tools/floptool.cpp14
-rw-r--r--src/tools/imgtool/filtbas.cpp6
-rw-r--r--src/tools/imgtool/filteoln.cpp2
-rw-r--r--src/tools/imgtool/filter.cpp2
-rw-r--r--src/tools/imgtool/filter.h4
-rw-r--r--src/tools/imgtool/formats/coco_dsk.cpp6
-rw-r--r--src/tools/imgtool/formats/vt_dsk.cpp6
-rw-r--r--src/tools/imgtool/imgtool.cpp4
-rw-r--r--src/tools/imgtool/imgtool.h6
-rw-r--r--src/tools/imgtool/library.cpp2
-rw-r--r--src/tools/imgtool/library.h2
-rw-r--r--src/tools/imgtool/main.cpp10
-rw-r--r--src/tools/imgtool/modules/amiga.cpp6
-rw-r--r--src/tools/imgtool/modules/bml3.cpp6
-rw-r--r--src/tools/imgtool/modules/concept.cpp8
-rw-r--r--src/tools/imgtool/modules/fat.cpp4
-rw-r--r--src/tools/imgtool/modules/mac.cpp10
-rw-r--r--src/tools/imgtool/modules/macbin.cpp2
-rw-r--r--src/tools/imgtool/modules/os9.cpp2
-rw-r--r--src/tools/imgtool/modules/rsdos.cpp6
-rw-r--r--src/tools/imgtool/modules/rt11.cpp6
-rw-r--r--src/tools/imgtool/modules/thomson.cpp2
-rw-r--r--src/tools/imgtool/modules/ti99.cpp10
-rw-r--r--src/tools/imgtool/modules/ti990hd.cpp8
-rw-r--r--src/tools/imgtool/modules/vzdos.cpp8
-rw-r--r--src/tools/imgtool/stream.cpp4
-rw-r--r--src/tools/jedutil.cpp8
-rw-r--r--src/tools/ldresample.cpp10
-rw-r--r--src/tools/ldverify.cpp8
-rw-r--r--src/tools/pngcmp.cpp10
-rw-r--r--src/tools/regrep.cpp10
-rw-r--r--src/tools/romcmp.cpp4
-rw-r--r--src/tools/split.cpp10
-rw-r--r--src/tools/src2html.cpp10
-rw-r--r--src/tools/unidasm.cpp2
325 files changed, 515 insertions, 515 deletions
diff --git a/benchmarks/eminline_noasm.cpp b/benchmarks/eminline_noasm.cpp
index f577154a6b7..d24ee8ec4e3 100644
--- a/benchmarks/eminline_noasm.cpp
+++ b/benchmarks/eminline_noasm.cpp
@@ -1,5 +1,5 @@
#include "benchmark/benchmark_api.h"
-#include <time.h>
+#include <ctime>
#include "osdcore.h"
#include "osdcomm.h"
#define MAME_NOASM 1
diff --git a/src/devices/bus/coco/coco_dwsock.cpp b/src/devices/bus/coco/coco_dwsock.cpp
index 049b3e658ca..252f701cebd 100644
--- a/src/devices/bus/coco/coco_dwsock.cpp
+++ b/src/devices/bus/coco/coco_dwsock.cpp
@@ -3,8 +3,8 @@
#include "emu.h"
#include "coco_dwsock.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#ifdef __GNUC__
#include <unistd.h>
#endif
diff --git a/src/devices/bus/rs232/pty.cpp b/src/devices/bus/rs232/pty.cpp
index 4c8c9f6bbf7..dec296006be 100644
--- a/src/devices/bus/rs232/pty.cpp
+++ b/src/devices/bus/rs232/pty.cpp
@@ -4,7 +4,7 @@
#include "emu.h"
#include "pty.h"
-#include <stdio.h>
+#include <cstdio>
static constexpr int TIMER_POLL = 1;
diff --git a/src/devices/cpu/alph8201/8201dasm.cpp b/src/devices/cpu/alph8201/8201dasm.cpp
index 76a1d0d98a8..cf24aff16b3 100644
--- a/src/devices/cpu/alph8201/8201dasm.cpp
+++ b/src/devices/cpu/alph8201/8201dasm.cpp
@@ -22,7 +22,7 @@ cpu/alph8201/ will be removed when the alpha 8304 has been dumped.
#include "emu.h"
#include "8201dasm.h"
-#include <ctype.h>
+#include <cctype>
#include <stdexcept>
diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp
index 499b0e40ff7..aa1860ba089 100644
--- a/src/devices/cpu/drcbex64.cpp
+++ b/src/devices/cpu/drcbex64.cpp
@@ -166,7 +166,7 @@
***************************************************************************/
-#include <stddef.h>
+#include <cstddef>
#include "emu.h"
#include "debugger.h"
#include "emuopts.h"
diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp
index f1a39068ee1..8a43a1863c5 100644
--- a/src/devices/cpu/drcbex86.cpp
+++ b/src/devices/cpu/drcbex86.cpp
@@ -82,7 +82,7 @@
**************************************************************************/
-#include <stddef.h>
+#include <cstddef>
#include "emu.h"
#include "debugger.h"
#include "emuopts.h"
diff --git a/src/devices/cpu/dsp56156/opcode.cpp b/src/devices/cpu/dsp56156/opcode.cpp
index 15b305fa09e..005b9d9a6d6 100644
--- a/src/devices/cpu/dsp56156/opcode.cpp
+++ b/src/devices/cpu/dsp56156/opcode.cpp
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Andrew Gardner
#include "emu.h"
-#include <stdio.h>
+#include <cstdio>
#include "opcode.h"
diff --git a/src/devices/cpu/dsp56156/tables.cpp b/src/devices/cpu/dsp56156/tables.cpp
index 93f591b3a5c..cccc22c8842 100644
--- a/src/devices/cpu/dsp56156/tables.cpp
+++ b/src/devices/cpu/dsp56156/tables.cpp
@@ -1,9 +1,9 @@
// license:BSD-3-Clause
// copyright-holders:Andrew Gardner
#include "emu.h"
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
#include "tables.h"
#include "dsp56def.h"
diff --git a/src/devices/cpu/dsp56156/tables.h b/src/devices/cpu/dsp56156/tables.h
index 9ef1dc76b32..b6fe4fbe815 100644
--- a/src/devices/cpu/dsp56156/tables.h
+++ b/src/devices/cpu/dsp56156/tables.h
@@ -3,8 +3,8 @@
#ifndef DSP56156_TABLES_H
#define DSP56156_TABLES_H
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include "dsp56156.h"
diff --git a/src/devices/cpu/g65816/g65816cm.h b/src/devices/cpu/g65816/g65816cm.h
index 7956eda871c..c31b43fb5e6 100644
--- a/src/devices/cpu/g65816/g65816cm.h
+++ b/src/devices/cpu/g65816/g65816cm.h
@@ -25,7 +25,7 @@
/* ================================ INCLUDES ============================== */
/* ======================================================================== */
-#include <limits.h>
+#include <climits>
/* ======================================================================== */
diff --git a/src/devices/cpu/hpc/hpcdasm.cpp b/src/devices/cpu/hpc/hpcdasm.cpp
index bbfa77b8eca..9773ab8f444 100644
--- a/src/devices/cpu/hpc/hpcdasm.cpp
+++ b/src/devices/cpu/hpc/hpcdasm.cpp
@@ -15,7 +15,7 @@
#include "hpcdasm.h"
#include "util/strformat.h"
-#include <ctype.h>
+#include <cctype>
using osd::u32;
using util::BIT;
diff --git a/src/devices/cpu/i386/x87priv.h b/src/devices/cpu/i386/x87priv.h
index 78745cce804..1d2c227b292 100644
--- a/src/devices/cpu/i386/x87priv.h
+++ b/src/devices/cpu/i386/x87priv.h
@@ -5,7 +5,7 @@
#ifndef __X87PRIV_H__
#define __X87PRIV_H__
-#include <math.h>
+#include <cmath>
/*************************************
diff --git a/src/devices/cpu/i860/i860dec.hxx b/src/devices/cpu/i860/i860dec.hxx
index 923a30b0935..b3a6e0c00b4 100644
--- a/src/devices/cpu/i860/i860dec.hxx
+++ b/src/devices/cpu/i860/i860dec.hxx
@@ -36,7 +36,7 @@
*
*/
#include "i860.h"
-#include <math.h>
+#include <cmath>
#undef HOST_MSB
diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp
index 6c53cac452f..10409923b15 100644
--- a/src/devices/cpu/i960/i960.cpp
+++ b/src/devices/cpu/i960/i960.cpp
@@ -7,7 +7,7 @@
#ifdef _MSC_VER
/* logb prototype is different for MS Visual C */
-#include <float.h>
+#include <cfloat>
#define logb _logb
#endif
diff --git a/src/devices/cpu/m37710/m37710cm.h b/src/devices/cpu/m37710/m37710cm.h
index 716c3cda445..8f5bd029d14 100644
--- a/src/devices/cpu/m37710/m37710cm.h
+++ b/src/devices/cpu/m37710/m37710cm.h
@@ -10,7 +10,7 @@
/* ================================ INCLUDES ============================== */
/* ======================================================================== */
-#include <limits.h>
+#include <climits>
#include "m37710.h"
diff --git a/src/devices/cpu/m68000/m68kcpu.h b/src/devices/cpu/m68000/m68kcpu.h
index 0326c0f4bd1..c712a861585 100644
--- a/src/devices/cpu/m68000/m68kcpu.h
+++ b/src/devices/cpu/m68000/m68kcpu.h
@@ -21,7 +21,7 @@
#undef REG_SP
#undef REG_PC
#else
-#include <limits.h>
+#include <climits>
#endif
/* ======================================================================== */
diff --git a/src/devices/cpu/pic16c5x/16c5xdsm.cpp b/src/devices/cpu/pic16c5x/16c5xdsm.cpp
index a748b553cd3..65f931df057 100644
--- a/src/devices/cpu/pic16c5x/16c5xdsm.cpp
+++ b/src/devices/cpu/pic16c5x/16c5xdsm.cpp
@@ -26,7 +26,7 @@
#include "emu.h"
#include "16c5xdsm.h"
-#include <ctype.h>
+#include <cctype>
#include <stdexcept>
diff --git a/src/devices/cpu/pic16c62x/16c62xdsm.cpp b/src/devices/cpu/pic16c62x/16c62xdsm.cpp
index 3b1dcdfca57..1e088fbb05c 100644
--- a/src/devices/cpu/pic16c62x/16c62xdsm.cpp
+++ b/src/devices/cpu/pic16c62x/16c62xdsm.cpp
@@ -29,7 +29,7 @@
#include "emu.h"
#include "16c62xdsm.h"
-#include <ctype.h>
+#include <cctype>
#include <stdexcept>
diff --git a/src/devices/cpu/sc61860/readpc.cpp b/src/devices/cpu/sc61860/readpc.cpp
index 46afbbf8a3e..bdd3928b48e 100644
--- a/src/devices/cpu/sc61860/readpc.cpp
+++ b/src/devices/cpu/sc61860/readpc.cpp
@@ -7,7 +7,7 @@
#include <fcntl.h>
#include <unistd.h>
#endif
-#include <stdio.h>
+#include <cstdio>
#include <dos.h>
// gcc -O
diff --git a/src/devices/cpu/sharc/compute.hxx b/src/devices/cpu/sharc/compute.hxx
index 766d7be044f..077788f3c3c 100644
--- a/src/devices/cpu/sharc/compute.hxx
+++ b/src/devices/cpu/sharc/compute.hxx
@@ -2,7 +2,7 @@
// copyright-holders:Ville Linde
/* compute operations */
-#include <math.h>
+#include <cmath>
#define CLEAR_ALU_FLAGS() (m_core->astat &= ~(AZ|AN|AV|AC|AS|AI))
diff --git a/src/devices/cpu/spc700/spc700.cpp b/src/devices/cpu/spc700/spc700.cpp
index b5d2b835cfc..7855bf77b1b 100644
--- a/src/devices/cpu/spc700/spc700.cpp
+++ b/src/devices/cpu/spc700/spc700.cpp
@@ -67,7 +67,7 @@ Address Function Register R/W When Reset Remarks
#include "debugger.h"
-#include <limits.h>
+#include <climits>
/* ======================================================================== */
diff --git a/src/devices/cpu/tms32010/32010dsm.cpp b/src/devices/cpu/tms32010/32010dsm.cpp
index 4601498ce64..0f385274f25 100644
--- a/src/devices/cpu/tms32010/32010dsm.cpp
+++ b/src/devices/cpu/tms32010/32010dsm.cpp
@@ -27,7 +27,7 @@
#include "emu.h"
#include "32010dsm.h"
-#include <ctype.h>
+#include <cctype>
#include <stdexcept>
diff --git a/src/devices/cpu/tms32010/dis32010.cpp b/src/devices/cpu/tms32010/dis32010.cpp
index 681c83f8891..ed1cbae3b51 100644
--- a/src/devices/cpu/tms32010/dis32010.cpp
+++ b/src/devices/cpu/tms32010/dis32010.cpp
@@ -11,8 +11,8 @@
* *
\**************************************************************************/
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
#include "32010dsm.c"
diff --git a/src/devices/cpu/tms32025/32025dsm.cpp b/src/devices/cpu/tms32025/32025dsm.cpp
index c2ae6f96b2a..99640020341 100644
--- a/src/devices/cpu/tms32025/32025dsm.cpp
+++ b/src/devices/cpu/tms32025/32025dsm.cpp
@@ -33,7 +33,7 @@
#include "emu.h"
#include "32025dsm.h"
-#include <ctype.h>
+#include <cctype>
#include <stdexcept>
diff --git a/src/devices/cpu/z8000/makedab.cpp b/src/devices/cpu/z8000/makedab.cpp
index 02a27f6783e..05538ae204e 100644
--- a/src/devices/cpu/z8000/makedab.cpp
+++ b/src/devices/cpu/z8000/makedab.cpp
@@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Juergen Buchmueller,Ernesto Corvi
-#include <stdio.h>
+#include <cstdio>
#define CF 0x100
#define HF 0x200
diff --git a/src/devices/machine/corvushd.h b/src/devices/machine/corvushd.h
index b7b9bc4e946..868d98678fb 100644
--- a/src/devices/machine/corvushd.h
+++ b/src/devices/machine/corvushd.h
@@ -18,7 +18,7 @@
#pragma once
#include "imagedev/harddriv.h"
-#include <ctype.h>
+#include <cctype>
class corvus_hdc_device : public device_t
{
diff --git a/src/devices/machine/ds1204.cpp b/src/devices/machine/ds1204.cpp
index cd722bc8929..ba86725df66 100644
--- a/src/devices/machine/ds1204.cpp
+++ b/src/devices/machine/ds1204.cpp
@@ -10,7 +10,7 @@
#include "emu.h"
#include "ds1204.h"
-#include <stdio.h>
+#include <cstdio>
#define VERBOSE_LEVEL ( 0 )
diff --git a/src/devices/machine/ds1205.cpp b/src/devices/machine/ds1205.cpp
index 3dca4c8de2f..460d267928a 100644
--- a/src/devices/machine/ds1205.cpp
+++ b/src/devices/machine/ds1205.cpp
@@ -10,7 +10,7 @@
#include "emu.h"
#include "ds1205.h"
-#include <stdio.h>
+#include <cstdio>
#define VERBOSE_LEVEL ( 0 )
diff --git a/src/devices/machine/ds1994.cpp b/src/devices/machine/ds1994.cpp
index bf0f6eef017..5bd8a7024ca 100644
--- a/src/devices/machine/ds1994.cpp
+++ b/src/devices/machine/ds1994.cpp
@@ -15,7 +15,7 @@
#include "emu.h"
#include "machine/ds1994.h"
-#include <time.h>
+#include <ctime>
#define VERBOSE_LEVEL 0
diff --git a/src/devices/machine/ds2404.cpp b/src/devices/machine/ds2404.cpp
index 4f92a844a45..ce24d0336ca 100644
--- a/src/devices/machine/ds2404.cpp
+++ b/src/devices/machine/ds2404.cpp
@@ -12,7 +12,7 @@
#include "ds2404.h"
#include <algorithm>
-#include <time.h> // FIXME: re-write in terms of device_rtc_interface and remove this
+#include <ctime> // FIXME: re-write in terms of device_rtc_interface and remove this
//**************************************************************************
diff --git a/src/devices/machine/i8087.cpp b/src/devices/machine/i8087.cpp
index b0b1bce08fc..aae326006bb 100644
--- a/src/devices/machine/i8087.cpp
+++ b/src/devices/machine/i8087.cpp
@@ -21,7 +21,7 @@
#include "emu.h"
#include "i8087.h"
-#include <math.h>
+#include <cmath>
/*************************************
*
diff --git a/src/devices/machine/k054321.cpp b/src/devices/machine/k054321.cpp
index ec59ae89d94..9a809e2d7cb 100644
--- a/src/devices/machine/k054321.cpp
+++ b/src/devices/machine/k054321.cpp
@@ -33,7 +33,7 @@
#include "emu.h"
#include "k054321.h"
-#include <math.h>
+#include <cmath>
DEFINE_DEVICE_TYPE(K054321, k054321_device, "k054321", "K054321 Maincpu-Soundcpu interface")
diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp
index 1f4712392fa..30195810ac2 100644
--- a/src/devices/machine/ram.cpp
+++ b/src/devices/machine/ram.cpp
@@ -12,8 +12,8 @@
#include "ram.h"
#include "emuopts.h"
-#include <stdio.h>
-#include <ctype.h>
+#include <cstdio>
+#include <cctype>
#include <algorithm>
#include <functional>
diff --git a/src/devices/machine/tms9901.cpp b/src/devices/machine/tms9901.cpp
index bb7148a91a6..b5ec6278865 100644
--- a/src/devices/machine/tms9901.cpp
+++ b/src/devices/machine/tms9901.cpp
@@ -147,7 +147,7 @@ Clock mode:
#include "emu.h"
#include "tms9901.h"
-#include <math.h>
+#include <cmath>
#define LOG_GENERAL (1U << 0)
#define LOG_PINS (1U << 1)
diff --git a/src/devices/machine/tms9902.cpp b/src/devices/machine/tms9902.cpp
index 813372f6f22..b6f8e4279c9 100644
--- a/src/devices/machine/tms9902.cpp
+++ b/src/devices/machine/tms9902.cpp
@@ -41,7 +41,7 @@
#include "emu.h"
#include "tms9902.h"
-#include <math.h>
+#include <cmath>
#define LOG_GENERAL (1U << 0)
#define LOG_LINES (1U << 1)
diff --git a/src/devices/machine/wd2010.cpp b/src/devices/machine/wd2010.cpp
index 95bb4803107..486d22b47f0 100644
--- a/src/devices/machine/wd2010.cpp
+++ b/src/devices/machine/wd2010.cpp
@@ -41,7 +41,7 @@ UNIMPLEMENTED FEATURES :
#define VERBOSE 1
#include "logmacro.h"
-#include <math.h>
+#include <cmath>
//**************************************************************************
// MACROS / CONSTANTS
//**************************************************************************
diff --git a/src/devices/sound/disc_mth.hxx b/src/devices/sound/disc_mth.hxx
index 9825ee0b899..cb423b175d1 100644
--- a/src/devices/sound/disc_mth.hxx
+++ b/src/devices/sound/disc_mth.hxx
@@ -49,7 +49,7 @@
*
************************************************************************/
-#include <float.h>
+#include <cfloat>
diff --git a/src/devices/sound/mea8000.cpp b/src/devices/sound/mea8000.cpp
index d4d93ca4c8e..af330349fad 100644
--- a/src/devices/sound/mea8000.cpp
+++ b/src/devices/sound/mea8000.cpp
@@ -30,7 +30,7 @@
#include "emu.h"
#include "mea8000.h"
-#include <math.h>
+#include <cmath>
//#define VERBOSE 1
#include "logmacro.h"
diff --git a/src/devices/video/poly.h b/src/devices/video/poly.h
index c619c50c2a1..908a1954902 100644
--- a/src/devices/video/poly.h
+++ b/src/devices/video/poly.h
@@ -39,7 +39,7 @@
#include "screen.h"
-#include <limits.h>
+#include <climits>
#include <atomic>
diff --git a/src/emu/attotime.h b/src/emu/attotime.h
index 945ed78a87a..f46dc795a7d 100644
--- a/src/emu/attotime.h
+++ b/src/emu/attotime.h
@@ -38,7 +38,7 @@
#include "emucore.h"
#include "xtal.h"
-#include <math.h>
+#include <cmath>
#undef min
#undef max
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index fa65b327d6c..2679845996b 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -20,7 +20,7 @@
#include "debugvw.h"
#include "natkeyboard.h"
#include "render.h"
-#include <ctype.h>
+#include <cctype>
#include <algorithm>
#include <fstream>
diff --git a/src/emu/debug/debugcon.cpp b/src/emu/debug/debugcon.cpp
index 7594a7e3527..e24c6a2336e 100644
--- a/src/emu/debug/debugcon.cpp
+++ b/src/emu/debug/debugcon.cpp
@@ -14,7 +14,7 @@
#include "debugvw.h"
#include "textbuf.h"
#include "debugger.h"
-#include <ctype.h>
+#include <cctype>
#include <fstream>
/***************************************************************************
diff --git a/src/emu/debug/debughlp.cpp b/src/emu/debug/debughlp.cpp
index 81885ab51e8..c94f97510cd 100644
--- a/src/emu/debug/debughlp.cpp
+++ b/src/emu/debug/debughlp.cpp
@@ -10,7 +10,7 @@
#include "emu.h"
#include "debughlp.h"
-#include <ctype.h>
+#include <cctype>
diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp
index 1a87cce5441..de7fcd95b0b 100644
--- a/src/emu/debug/debugvw.cpp
+++ b/src/emu/debug/debugvw.cpp
@@ -19,7 +19,7 @@
#include "dvwpoints.h"
#include "debugcpu.h"
#include "debugger.h"
-#include <ctype.h>
+#include <cctype>
diff --git a/src/emu/debug/dvmemory.cpp b/src/emu/debug/dvmemory.cpp
index 11932d6bab0..e4daaff1a80 100644
--- a/src/emu/debug/dvmemory.cpp
+++ b/src/emu/debug/dvmemory.cpp
@@ -15,7 +15,7 @@
#include "debugger.h"
#include <algorithm>
-#include <ctype.h>
+#include <cctype>
#include <tuple>
diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp
index 45fad747ab3..d6b5560a51e 100644
--- a/src/emu/debug/express.cpp
+++ b/src/emu/debug/express.cpp
@@ -31,7 +31,7 @@
#include "emu.h"
#include "express.h"
-#include <ctype.h>
+#include <cctype>
diff --git a/src/emu/debugger.cpp b/src/emu/debugger.cpp
index b7ddea04137..f3a35a2a0bb 100644
--- a/src/emu/debugger.cpp
+++ b/src/emu/debugger.cpp
@@ -14,7 +14,7 @@
#include "debug/debugcmd.h"
#include "debug/debugcon.h"
#include "debug/debugvw.h"
-#include <ctype.h>
+#include <cctype>
/***************************************************************************
GLOBAL VARIABLES
diff --git a/src/emu/devcpu.cpp b/src/emu/devcpu.cpp
index e75b621c6f0..c7163460b95 100644
--- a/src/emu/devcpu.cpp
+++ b/src/emu/devcpu.cpp
@@ -10,7 +10,7 @@
#include "emu.h"
#include "emuopts.h"
-#include <ctype.h>
+#include <cctype>
//**************************************************************************
diff --git a/src/emu/device.cpp b/src/emu/device.cpp
index cd7bc5918ec..c534969dcd5 100644
--- a/src/emu/device.cpp
+++ b/src/emu/device.cpp
@@ -13,7 +13,7 @@
#include "speaker.h"
#include "debug/debugcpu.h"
-#include <string.h>
+#include <cstring>
//**************************************************************************
diff --git a/src/emu/drivenum.cpp b/src/emu/drivenum.cpp
index 989a9cc8f46..5a29dcabd9a 100644
--- a/src/emu/drivenum.cpp
+++ b/src/emu/drivenum.cpp
@@ -14,7 +14,7 @@
#include <algorithm>
-#include <ctype.h>
+#include <cctype>
diff --git a/src/emu/emucore.h b/src/emu/emucore.h
index 2c29c0ce5be..4eef4c19f90 100644
--- a/src/emu/emucore.h
+++ b/src/emu/emucore.h
@@ -13,12 +13,12 @@
#pragma once
// standard C includes
-#include <assert.h>
-#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdarg.h>
+#include <cassert>
+#include <cmath>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
+#include <cstdarg>
// some cleanups for Solaris for things defined in stdlib.h
#if defined(__sun__) && defined(__svr4__)
diff --git a/src/emu/http.h b/src/emu/http.h
index 6c845757757..3bfe1bd9b18 100644
--- a/src/emu/http.h
+++ b/src/emu/http.h
@@ -18,7 +18,7 @@ HTTP server handling
#define MAME_EMU_HTTP_H
#include <thread>
-#include <time.h>
+#include <ctime>
#include "server_http.hpp"
#include "server_ws.hpp"
diff --git a/src/emu/image.cpp b/src/emu/image.cpp
index e2cf6d91c83..87d476056d7 100644
--- a/src/emu/image.cpp
+++ b/src/emu/image.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
-#include <ctype.h>
+#include <cctype>
#include "emu.h"
#include "emuopts.h"
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index 1f45ba4fe04..8e5a57dd9e3 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -101,8 +101,8 @@
#include "osdepend.h"
-#include <ctype.h>
-#include <time.h>
+#include <cctype>
+#include <ctime>
namespace {
diff --git a/src/emu/ioport.h b/src/emu/ioport.h
index f53f1be2916..4a2270c985a 100644
--- a/src/emu/ioport.h
+++ b/src/emu/ioport.h
@@ -21,7 +21,7 @@
#include <cstdint>
#include <cstring>
#include <vector>
-#include <time.h>
+#include <ctime>
//**************************************************************************
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index e6ef063a0ac..9480ee38803 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -85,7 +85,7 @@
#include "romload.h"
#include "tilemap.h"
#include "ui/uimain.h"
-#include <time.h>
+#include <ctime>
#include <rapidjson/writer.h>
#include <rapidjson/stringbuffer.h>
diff --git a/src/emu/machine.h b/src/emu/machine.h
index 0c14f6acdb6..69223dd33af 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -19,7 +19,7 @@
#include <functional>
-#include <time.h>
+#include <ctime>
//**************************************************************************
// CONSTANTS
diff --git a/src/emu/main.h b/src/emu/main.h
index 2a088a3995d..71d7b951e4d 100644
--- a/src/emu/main.h
+++ b/src/emu/main.h
@@ -17,7 +17,7 @@
#define MAME_EMU_MAIN_H
#include <thread>
-#include <time.h>
+#include <ctime>
//**************************************************************************
// CONSTANTS
diff --git a/src/emu/mconfig.cpp b/src/emu/mconfig.cpp
index d6385c6d628..e80d0594a19 100644
--- a/src/emu/mconfig.cpp
+++ b/src/emu/mconfig.cpp
@@ -12,7 +12,7 @@
#include "emuopts.h"
#include "screen.h"
-#include <ctype.h>
+#include <cctype>
#include <cstring>
#include <numeric>
diff --git a/src/emu/network.cpp b/src/emu/network.cpp
index 259cca30efb..701db850b58 100644
--- a/src/emu/network.cpp
+++ b/src/emu/network.cpp
@@ -6,7 +6,7 @@
Core network functions and definitions.
***************************************************************************/
-#include <ctype.h>
+#include <cctype>
#include "emu.h"
#include "network.h"
diff --git a/src/emu/render.h b/src/emu/render.h
index 3a34066b096..ce4ea3c66df 100644
--- a/src/emu/render.h
+++ b/src/emu/render.h
@@ -48,7 +48,7 @@
#include "screen.h"
-#include <math.h>
+#include <cmath>
#include <array>
#include <map>
#include <memory>
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index f13d8aff77b..ff16d8a22fa 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -18,7 +18,7 @@
#include "vecstream.h"
#include "xmlfile.h"
-#include <ctype.h>
+#include <cctype>
#include <algorithm>
#include <cmath>
#include <cstddef>
diff --git a/src/emu/rendutil.h b/src/emu/rendutil.h
index 1824fb0a34a..b5c06d6d0fc 100644
--- a/src/emu/rendutil.h
+++ b/src/emu/rendutil.h
@@ -15,7 +15,7 @@
#include "render.h"
-#include <math.h>
+#include <cmath>
/* ----- image formats ----- */
diff --git a/src/emu/softlist_dev.cpp b/src/emu/softlist_dev.cpp
index e177954b248..08075e4ff1a 100644
--- a/src/emu/softlist_dev.cpp
+++ b/src/emu/softlist_dev.cpp
@@ -15,7 +15,7 @@
#include "softlist_dev.h"
#include "validity.h"
-#include <ctype.h>
+#include <cctype>
//**************************************************************************
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp
index a46639d882e..04944255b62 100644
--- a/src/emu/validity.cpp
+++ b/src/emu/validity.cpp
@@ -15,7 +15,7 @@
#include "romload.h"
#include "video/rgbutil.h"
-#include <ctype.h>
+#include <cctype>
#include <type_traits>
#include <typeinfo>
diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp
index 0f8095cefbd..38676366a61 100644
--- a/src/frontend/mame/cheat.cpp
+++ b/src/frontend/mame/cheat.cpp
@@ -87,7 +87,7 @@
#include <iterator>
#include <utility>
-#include <ctype.h>
+#include <cctype>
diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp
index b365b1fcde9..3a881c1f667 100644
--- a/src/frontend/mame/clifront.cpp
+++ b/src/frontend/mame/clifront.cpp
@@ -36,7 +36,7 @@
#include <algorithm>
#include <new>
-#include <ctype.h>
+#include <cctype>
//**************************************************************************
diff --git a/src/frontend/mame/infoxml.cpp b/src/frontend/mame/infoxml.cpp
index c4b3c977b6e..926feffbc08 100644
--- a/src/frontend/mame/infoxml.cpp
+++ b/src/frontend/mame/infoxml.cpp
@@ -25,7 +25,7 @@
#include "xmlfile.h"
-#include <ctype.h>
+#include <cctype>
#include <cstring>
#include <unordered_set>
#include <queue>
diff --git a/src/frontend/mame/mame.cpp b/src/frontend/mame/mame.cpp
index e0d45e504c1..88ccc4e1b80 100644
--- a/src/frontend/mame/mame.cpp
+++ b/src/frontend/mame/mame.cpp
@@ -17,7 +17,7 @@
#include "validity.h"
#include "clifront.h"
#include "luaengine.h"
-#include <time.h>
+#include <ctime>
#include "ui/ui.h"
#include "ui/selgame.h"
#include "ui/simpleselgame.h"
diff --git a/src/frontend/mame/mameopts.cpp b/src/frontend/mame/mameopts.cpp
index 1ab0b81874f..48df66a337e 100644
--- a/src/frontend/mame/mameopts.cpp
+++ b/src/frontend/mame/mameopts.cpp
@@ -18,7 +18,7 @@
#include "hashfile.h"
#include "clifront.h"
-#include <ctype.h>
+#include <cctype>
#include <stack>
diff --git a/src/frontend/mame/ui/simpleselgame.cpp b/src/frontend/mame/ui/simpleselgame.cpp
index 20ce36c9b2d..f74c064640e 100644
--- a/src/frontend/mame/ui/simpleselgame.cpp
+++ b/src/frontend/mame/ui/simpleselgame.cpp
@@ -24,7 +24,7 @@
#include "mame.h"
#include "uiinput.h"
-#include <ctype.h>
+#include <cctype>
namespace ui {
diff --git a/src/lib/formats/a26_cas.cpp b/src/lib/formats/a26_cas.cpp
index 5030c2bfe0f..0074da6aba3 100644
--- a/src/lib/formats/a26_cas.cpp
+++ b/src/lib/formats/a26_cas.cpp
@@ -6,7 +6,7 @@ Atari 2600 SuperCharger support
*/
-#include <assert.h>
+#include <cassert>
#include "formats/a26_cas.h"
diff --git a/src/lib/formats/a5105_dsk.cpp b/src/lib/formats/a5105_dsk.cpp
index 33d7f15e1fd..f44c8c5f263 100644
--- a/src/lib/formats/a5105_dsk.cpp
+++ b/src/lib/formats/a5105_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/a5105_dsk.h"
diff --git a/src/lib/formats/abc800_dsk.cpp b/src/lib/formats/abc800_dsk.cpp
index e61a0a1d1ff..af1f92ec75c 100644
--- a/src/lib/formats/abc800_dsk.cpp
+++ b/src/lib/formats/abc800_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/abc800_dsk.h"
diff --git a/src/lib/formats/abcfd2_dsk.cpp b/src/lib/formats/abcfd2_dsk.cpp
index 8cc87ae20cd..94684f0ef5d 100644
--- a/src/lib/formats/abcfd2_dsk.cpp
+++ b/src/lib/formats/abcfd2_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/abcfd2_dsk.h"
diff --git a/src/lib/formats/ace_tap.cpp b/src/lib/formats/ace_tap.cpp
index 56b4bd877c8..522050f612a 100644
--- a/src/lib/formats/ace_tap.cpp
+++ b/src/lib/formats/ace_tap.cpp
@@ -10,7 +10,7 @@ For more information see:
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "ace_tap.h"
diff --git a/src/lib/formats/adam_cas.cpp b/src/lib/formats/adam_cas.cpp
index 3de9413cb90..5d24eed2543 100644
--- a/src/lib/formats/adam_cas.cpp
+++ b/src/lib/formats/adam_cas.cpp
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
-#include <assert.h>
+#include <cassert>
#include "cassimg.h"
#include "adam_cas.h"
diff --git a/src/lib/formats/adam_dsk.cpp b/src/lib/formats/adam_dsk.cpp
index e78e94a4763..3010aa309b2 100644
--- a/src/lib/formats/adam_dsk.cpp
+++ b/src/lib/formats/adam_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/adam_dsk.h"
diff --git a/src/lib/formats/agat840k_hle_dsk.cpp b/src/lib/formats/agat840k_hle_dsk.cpp
index 52cdd4668be..682b0edd7ad 100644
--- a/src/lib/formats/agat840k_hle_dsk.cpp
+++ b/src/lib/formats/agat840k_hle_dsk.cpp
@@ -12,7 +12,7 @@
************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/agat840k_hle_dsk.h"
diff --git a/src/lib/formats/aim_dsk.cpp b/src/lib/formats/aim_dsk.cpp
index 3bc2c2b5b5f..5abc410d57c 100644
--- a/src/lib/formats/aim_dsk.cpp
+++ b/src/lib/formats/aim_dsk.cpp
@@ -12,7 +12,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "aim_dsk.h"
diff --git a/src/lib/formats/ami_dsk.cpp b/src/lib/formats/ami_dsk.cpp
index 8a757e6a4c9..ba04067f752 100644
--- a/src/lib/formats/ami_dsk.cpp
+++ b/src/lib/formats/ami_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/ami_dsk.h"
diff --git a/src/lib/formats/ap2_dsk.cpp b/src/lib/formats/ap2_dsk.cpp
index a2fa0ee188a..f7687c0cc66 100644
--- a/src/lib/formats/ap2_dsk.cpp
+++ b/src/lib/formats/ap2_dsk.cpp
@@ -8,9 +8,9 @@
*********************************************************************/
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
+#include <cstdlib>
+#include <cstring>
+#include <cassert>
#include "ap2_dsk.h"
#include "basicdsk.h"
diff --git a/src/lib/formats/ap_dsk35.cpp b/src/lib/formats/ap_dsk35.cpp
index c18ea8c65d4..677cfcc9463 100644
--- a/src/lib/formats/ap_dsk35.cpp
+++ b/src/lib/formats/ap_dsk35.cpp
@@ -98,8 +98,8 @@
*********************************************************************/
-#include <stdio.h>
-#include <assert.h>
+#include <cstdio>
+#include <cassert>
#include "emu.h" // logerror
#include "ap_dsk35.h"
diff --git a/src/lib/formats/apf_apt.cpp b/src/lib/formats/apf_apt.cpp
index de919b0bddd..28793f0f853 100644
--- a/src/lib/formats/apf_apt.cpp
+++ b/src/lib/formats/apf_apt.cpp
@@ -34,7 +34,7 @@ e. A checksum byte (8-bit addition)
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/apf_apt.h"
diff --git a/src/lib/formats/apollo_dsk.cpp b/src/lib/formats/apollo_dsk.cpp
index b2fef28be71..213286dd85b 100644
--- a/src/lib/formats/apollo_dsk.cpp
+++ b/src/lib/formats/apollo_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/apollo_dsk.h"
diff --git a/src/lib/formats/applix_dsk.cpp b/src/lib/formats/applix_dsk.cpp
index 59a0d4c06f5..70a52c42ccb 100644
--- a/src/lib/formats/applix_dsk.cpp
+++ b/src/lib/formats/applix_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/applix_dsk.h"
diff --git a/src/lib/formats/asst128_dsk.cpp b/src/lib/formats/asst128_dsk.cpp
index fe64cc725ee..e0c90636484 100644
--- a/src/lib/formats/asst128_dsk.cpp
+++ b/src/lib/formats/asst128_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/asst128_dsk.h"
diff --git a/src/lib/formats/atari_dsk.cpp b/src/lib/formats/atari_dsk.cpp
index d73cbf8185f..4008ec32fe3 100644
--- a/src/lib/formats/atari_dsk.cpp
+++ b/src/lib/formats/atari_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/atari_dsk.h"
diff --git a/src/lib/formats/atom_tap.cpp b/src/lib/formats/atom_tap.cpp
index 881433ef1a8..1c8c3642838 100644
--- a/src/lib/formats/atom_tap.cpp
+++ b/src/lib/formats/atom_tap.cpp
@@ -40,7 +40,7 @@
*/
-#include <assert.h>
+#include <cassert>
#include "atom_tap.h"
#include "csw_cas.h"
diff --git a/src/lib/formats/basicdsk.cpp b/src/lib/formats/basicdsk.cpp
index 9de079232e0..c654362309e 100644
--- a/src/lib/formats/basicdsk.cpp
+++ b/src/lib/formats/basicdsk.cpp
@@ -8,9 +8,9 @@
*********************************************************************/
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
+#include <cstdlib>
+#include <cstring>
+#include <cassert>
#include "basicdsk.h"
diff --git a/src/lib/formats/bw12_dsk.cpp b/src/lib/formats/bw12_dsk.cpp
index 06c8be72347..407db641d9c 100644
--- a/src/lib/formats/bw12_dsk.cpp
+++ b/src/lib/formats/bw12_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/bw12_dsk.h"
diff --git a/src/lib/formats/bw2_dsk.cpp b/src/lib/formats/bw2_dsk.cpp
index 3dc46e9b225..297f78f863f 100644
--- a/src/lib/formats/bw2_dsk.cpp
+++ b/src/lib/formats/bw2_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/bw2_dsk.h"
diff --git a/src/lib/formats/c3040_dsk.cpp b/src/lib/formats/c3040_dsk.cpp
index 78786979953..b5c35f9d2e5 100644
--- a/src/lib/formats/c3040_dsk.cpp
+++ b/src/lib/formats/c3040_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/c3040_dsk.h"
diff --git a/src/lib/formats/c4040_dsk.cpp b/src/lib/formats/c4040_dsk.cpp
index e6314f69261..69d371525c1 100644
--- a/src/lib/formats/c4040_dsk.cpp
+++ b/src/lib/formats/c4040_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/c4040_dsk.h"
diff --git a/src/lib/formats/camplynx_dsk.cpp b/src/lib/formats/camplynx_dsk.cpp
index c58b12b9423..46cd4f2a55d 100644
--- a/src/lib/formats/camplynx_dsk.cpp
+++ b/src/lib/formats/camplynx_dsk.cpp
@@ -19,7 +19,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/camplynx_dsk.h"
diff --git a/src/lib/formats/cassimg.cpp b/src/lib/formats/cassimg.cpp
index 816af2dccfd..4f5d9320754 100644
--- a/src/lib/formats/cassimg.cpp
+++ b/src/lib/formats/cassimg.cpp
@@ -8,8 +8,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "imageutl.h"
#include "cassimg.h"
diff --git a/src/lib/formats/cbm_tap.cpp b/src/lib/formats/cbm_tap.cpp
index e621651f577..7ef8015c6f9 100644
--- a/src/lib/formats/cbm_tap.cpp
+++ b/src/lib/formats/cbm_tap.cpp
@@ -94,7 +94,7 @@ Unfortunately, I have no such a .tap file to test, so my implementation
below could be not working. FP ]
*/
-#include <assert.h>
+#include <cassert>
#include "cbm_tap.h"
diff --git a/src/lib/formats/cgen_cas.cpp b/src/lib/formats/cgen_cas.cpp
index be4b9397f89..de47a45375d 100644
--- a/src/lib/formats/cgen_cas.cpp
+++ b/src/lib/formats/cgen_cas.cpp
@@ -19,7 +19,7 @@ We now support these three types below...
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/cgen_cas.h"
diff --git a/src/lib/formats/comx35_dsk.cpp b/src/lib/formats/comx35_dsk.cpp
index aa8603f3c1c..a06f1a2dd6c 100644
--- a/src/lib/formats/comx35_dsk.cpp
+++ b/src/lib/formats/comx35_dsk.cpp
@@ -36,7 +36,7 @@
*/
-#include <assert.h>
+#include <cassert>
#include "formats/comx35_dsk.h"
diff --git a/src/lib/formats/concept_dsk.cpp b/src/lib/formats/concept_dsk.cpp
index eea65064fc7..b8c010af852 100644
--- a/src/lib/formats/concept_dsk.cpp
+++ b/src/lib/formats/concept_dsk.cpp
@@ -10,7 +10,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "flopimg.h"
#include "formats/concept_dsk.h"
diff --git a/src/lib/formats/coupedsk.cpp b/src/lib/formats/coupedsk.cpp
index 045e42b7bb5..967896195f1 100644
--- a/src/lib/formats/coupedsk.cpp
+++ b/src/lib/formats/coupedsk.cpp
@@ -8,7 +8,7 @@
**************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/coupedsk.h"
#include "flopimg.h"
diff --git a/src/lib/formats/cqm_dsk.cpp b/src/lib/formats/cqm_dsk.cpp
index e2bde8fcf8c..c38f06bde1c 100644
--- a/src/lib/formats/cqm_dsk.cpp
+++ b/src/lib/formats/cqm_dsk.cpp
@@ -8,8 +8,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "flopimg.h"
#define CQM_HEADER_SIZE 133
diff --git a/src/lib/formats/csw_cas.cpp b/src/lib/formats/csw_cas.cpp
index 84aab50d3b8..9edea5c3ff7 100644
--- a/src/lib/formats/csw_cas.cpp
+++ b/src/lib/formats/csw_cas.cpp
@@ -22,10 +22,10 @@ Offset Value Type Description
*/
-#include <string.h>
+#include <cstring>
#include <zlib.h>
-#include <assert.h>
+#include <cassert>
#include "uef_cas.h"
#include "csw_cas.h"
diff --git a/src/lib/formats/d71_dsk.cpp b/src/lib/formats/d71_dsk.cpp
index af1186948c6..16c8efea2e9 100644
--- a/src/lib/formats/d71_dsk.cpp
+++ b/src/lib/formats/d71_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/d71_dsk.h"
diff --git a/src/lib/formats/d80_dsk.cpp b/src/lib/formats/d80_dsk.cpp
index e08ef22f6b9..d350411b159 100644
--- a/src/lib/formats/d80_dsk.cpp
+++ b/src/lib/formats/d80_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/d80_dsk.h"
diff --git a/src/lib/formats/d81_dsk.cpp b/src/lib/formats/d81_dsk.cpp
index 714b9c3cd9e..a7f01c9c92e 100644
--- a/src/lib/formats/d81_dsk.cpp
+++ b/src/lib/formats/d81_dsk.cpp
@@ -73,7 +73,7 @@ PER SECTOR ORGANIZATION:
*/
-#include <assert.h>
+#include <cassert>
#include "formats/d81_dsk.h"
diff --git a/src/lib/formats/d82_dsk.cpp b/src/lib/formats/d82_dsk.cpp
index 00de1f5fd7c..0d79ad891ae 100644
--- a/src/lib/formats/d82_dsk.cpp
+++ b/src/lib/formats/d82_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/d82_dsk.h"
diff --git a/src/lib/formats/d88_dsk.cpp b/src/lib/formats/d88_dsk.cpp
index c2bf9772e7d..30073d1874d 100644
--- a/src/lib/formats/d88_dsk.cpp
+++ b/src/lib/formats/d88_dsk.cpp
@@ -29,7 +29,7 @@
*
*/
- #include <assert.h>
+ #include <cassert>
#include "flopimg.h"
#include "imageutl.h"
diff --git a/src/lib/formats/dcp_dsk.cpp b/src/lib/formats/dcp_dsk.cpp
index 179552409f8..c245d4ff0e3 100644
--- a/src/lib/formats/dcp_dsk.cpp
+++ b/src/lib/formats/dcp_dsk.cpp
@@ -20,7 +20,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "dcp_dsk.h"
diff --git a/src/lib/formats/dim_dsk.cpp b/src/lib/formats/dim_dsk.cpp
index 67c04adc2bf..ac9930e4782 100644
--- a/src/lib/formats/dim_dsk.cpp
+++ b/src/lib/formats/dim_dsk.cpp
@@ -8,8 +8,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "dim_dsk.h"
#include "basicdsk.h"
diff --git a/src/lib/formats/dip_dsk.cpp b/src/lib/formats/dip_dsk.cpp
index 310eab56a73..573f3768072 100644
--- a/src/lib/formats/dip_dsk.cpp
+++ b/src/lib/formats/dip_dsk.cpp
@@ -14,7 +14,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "dip_dsk.h"
diff --git a/src/lib/formats/dmk_dsk.cpp b/src/lib/formats/dmk_dsk.cpp
index 5ca0a3b8781..4b3336b4bcb 100644
--- a/src/lib/formats/dmk_dsk.cpp
+++ b/src/lib/formats/dmk_dsk.cpp
@@ -13,7 +13,7 @@ TODO:
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "dmk_dsk.h"
diff --git a/src/lib/formats/dmv_dsk.cpp b/src/lib/formats/dmv_dsk.cpp
index 02469ed74d4..b64fea5b318 100644
--- a/src/lib/formats/dmv_dsk.cpp
+++ b/src/lib/formats/dmv_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/dmv_dsk.h"
diff --git a/src/lib/formats/ds9_dsk.cpp b/src/lib/formats/ds9_dsk.cpp
index 0866d78d58f..cd241c3a319 100644
--- a/src/lib/formats/ds9_dsk.cpp
+++ b/src/lib/formats/ds9_dsk.cpp
@@ -14,7 +14,7 @@
************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/ds9_dsk.h"
diff --git a/src/lib/formats/dsk_dsk.cpp b/src/lib/formats/dsk_dsk.cpp
index db9d54920e5..7994f60f3ce 100644
--- a/src/lib/formats/dsk_dsk.cpp
+++ b/src/lib/formats/dsk_dsk.cpp
@@ -8,8 +8,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "imageutl.h"
#include "flopimg.h"
diff --git a/src/lib/formats/dvk_mx_dsk.cpp b/src/lib/formats/dvk_mx_dsk.cpp
index 477dd07690f..37de4111948 100644
--- a/src/lib/formats/dvk_mx_dsk.cpp
+++ b/src/lib/formats/dvk_mx_dsk.cpp
@@ -18,7 +18,7 @@
************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "flopimg.h"
#include "formats/dvk_mx_dsk.h"
diff --git a/src/lib/formats/ep64_dsk.cpp b/src/lib/formats/ep64_dsk.cpp
index 80981bf698e..f47615c76d9 100644
--- a/src/lib/formats/ep64_dsk.cpp
+++ b/src/lib/formats/ep64_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/ep64_dsk.h"
diff --git a/src/lib/formats/esq16_dsk.cpp b/src/lib/formats/esq16_dsk.cpp
index 1f6e86f295f..72e27ebfad5 100644
--- a/src/lib/formats/esq16_dsk.cpp
+++ b/src/lib/formats/esq16_dsk.cpp
@@ -10,7 +10,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "flopimg.h"
#include "formats/esq16_dsk.h"
diff --git a/src/lib/formats/esq8_dsk.cpp b/src/lib/formats/esq8_dsk.cpp
index c575fe0db2f..b7f69c85afc 100644
--- a/src/lib/formats/esq8_dsk.cpp
+++ b/src/lib/formats/esq8_dsk.cpp
@@ -12,7 +12,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "flopimg.h"
#include "formats/esq8_dsk.h"
diff --git a/src/lib/formats/excali64_dsk.cpp b/src/lib/formats/excali64_dsk.cpp
index 5d41c39f4e6..cc255052800 100644
--- a/src/lib/formats/excali64_dsk.cpp
+++ b/src/lib/formats/excali64_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/excali64_dsk.h"
diff --git a/src/lib/formats/fc100_cas.cpp b/src/lib/formats/fc100_cas.cpp
index 5004da147d3..42b99ad3f0e 100644
--- a/src/lib/formats/fc100_cas.cpp
+++ b/src/lib/formats/fc100_cas.cpp
@@ -10,7 +10,7 @@ it's all a guess.
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "fc100_cas.h"
diff --git a/src/lib/formats/fdd_dsk.cpp b/src/lib/formats/fdd_dsk.cpp
index 5e34c4ad7df..f5eb6ea19a5 100644
--- a/src/lib/formats/fdd_dsk.cpp
+++ b/src/lib/formats/fdd_dsk.cpp
@@ -31,7 +31,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "fdd_dsk.h"
diff --git a/src/lib/formats/fdi_dsk.cpp b/src/lib/formats/fdi_dsk.cpp
index c703f29cc69..57083f1230e 100644
--- a/src/lib/formats/fdi_dsk.cpp
+++ b/src/lib/formats/fdi_dsk.cpp
@@ -16,7 +16,7 @@
*/
-#include <assert.h>
+#include <cassert>
#include "imageutl.h"
#include "flopimg.h"
diff --git a/src/lib/formats/flopimg.cpp b/src/lib/formats/flopimg.cpp
index ea812506f50..79d97b1bf71 100644
--- a/src/lib/formats/flopimg.cpp
+++ b/src/lib/formats/flopimg.cpp
@@ -8,12 +8,12 @@
*********************************************************************/
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <limits.h>
-#include <assert.h>
+#include <cstdlib>
+#include <cstring>
+#include <cstdio>
+#include <cctype>
+#include <climits>
+#include <cassert>
#include "emu.h" // emu_fatalerror
#include "osdcore.h"
diff --git a/src/lib/formats/fm7_cas.cpp b/src/lib/formats/fm7_cas.cpp
index 32cd08e3b27..f275866d31b 100644
--- a/src/lib/formats/fm7_cas.cpp
+++ b/src/lib/formats/fm7_cas.cpp
@@ -4,7 +4,7 @@
* Fujitsu FM-7 series cassette handling
*/
-#include <assert.h>
+#include <cassert>
#include "fm7_cas.h"
diff --git a/src/lib/formats/fmsx_cas.cpp b/src/lib/formats/fmsx_cas.cpp
index 6da8fc47f81..3b00b81dc92 100644
--- a/src/lib/formats/fmsx_cas.cpp
+++ b/src/lib/formats/fmsx_cas.cpp
@@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Sean Young
-#include <assert.h>
+#include <cassert>
#include "formats/fmsx_cas.h"
diff --git a/src/lib/formats/fmtowns_dsk.cpp b/src/lib/formats/fmtowns_dsk.cpp
index 633b53fcd87..13d1408ba4b 100644
--- a/src/lib/formats/fmtowns_dsk.cpp
+++ b/src/lib/formats/fmtowns_dsk.cpp
@@ -8,7 +8,7 @@
* Created on: 23/03/2014
*/
- #include <assert.h>
+ #include <cassert>
#include "formats/fmtowns_dsk.h"
diff --git a/src/lib/formats/gtp_cas.cpp b/src/lib/formats/gtp_cas.cpp
index fd3a16932b3..0a5c34d140c 100644
--- a/src/lib/formats/gtp_cas.cpp
+++ b/src/lib/formats/gtp_cas.cpp
@@ -6,7 +6,7 @@
Miodrag Milanovic
*/
-#include <assert.h>
+#include <cassert>
#include "gtp_cas.h"
diff --git a/src/lib/formats/hect_dsk.cpp b/src/lib/formats/hect_dsk.cpp
index 4cd36008540..cf8fc2cacc4 100644
--- a/src/lib/formats/hect_dsk.cpp
+++ b/src/lib/formats/hect_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/hect_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/hect_tap.cpp b/src/lib/formats/hect_tap.cpp
index 4f823fb24e5..78f1bad2e42 100644
--- a/src/lib/formats/hect_tap.cpp
+++ b/src/lib/formats/hect_tap.cpp
@@ -14,7 +14,7 @@ You can find some *.K7 file on serveral server in France
Updated 3/1/10 : use real value for timing.
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "hect_tap.h"
diff --git a/src/lib/formats/hp_ipc_dsk.cpp b/src/lib/formats/hp_ipc_dsk.cpp
index 8b9efce0120..66485b461be 100644
--- a/src/lib/formats/hp_ipc_dsk.cpp
+++ b/src/lib/formats/hp_ipc_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/hp_ipc_dsk.h"
diff --git a/src/lib/formats/hxcmfm_dsk.cpp b/src/lib/formats/hxcmfm_dsk.cpp
index dcc4718c114..390e07ff3f8 100644
--- a/src/lib/formats/hxcmfm_dsk.cpp
+++ b/src/lib/formats/hxcmfm_dsk.cpp
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
-#include <assert.h>
+#include <cassert>
#include "hxcmfm_dsk.h"
diff --git a/src/lib/formats/imageutl.cpp b/src/lib/formats/imageutl.cpp
index 6ab427115e0..6bf2bbd3323 100644
--- a/src/lib/formats/imageutl.cpp
+++ b/src/lib/formats/imageutl.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
-#include <ctype.h>
+#include <cctype>
#include "imageutl.h"
int compute_log2(int val)
diff --git a/src/lib/formats/imd_dsk.cpp b/src/lib/formats/imd_dsk.cpp
index 51337a7f890..4ae22724fb9 100644
--- a/src/lib/formats/imd_dsk.cpp
+++ b/src/lib/formats/imd_dsk.cpp
@@ -8,8 +8,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "flopimg.h"
struct imddsk_tag
diff --git a/src/lib/formats/ioprocs.cpp b/src/lib/formats/ioprocs.cpp
index 69943c13dc0..34810153f9a 100644
--- a/src/lib/formats/ioprocs.cpp
+++ b/src/lib/formats/ioprocs.cpp
@@ -1,8 +1,8 @@
// license:BSD-3-Clause
// copyright-holders:Nathan Woods
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
+#include <cstdio>
+#include <cstring>
+#include <cassert>
#include "osdcore.h"
#include "ioprocs.h"
#include "corefile.h"
diff --git a/src/lib/formats/ioprocs.h b/src/lib/formats/ioprocs.h
index c569e52dd2b..5b45b4a1450 100644
--- a/src/lib/formats/ioprocs.h
+++ b/src/lib/formats/ioprocs.h
@@ -12,8 +12,8 @@
#pragma once
-#include <stdint.h>
-#include <stdlib.h>
+#include <cstdint>
+#include <cstdlib>
diff --git a/src/lib/formats/ipf_dsk.cpp b/src/lib/formats/ipf_dsk.cpp
index da50e850ea8..ed6505fd385 100644
--- a/src/lib/formats/ipf_dsk.cpp
+++ b/src/lib/formats/ipf_dsk.cpp
@@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
-#include <assert.h>
+#include <cassert>
#include "ipf_dsk.h"
const floppy_format_type FLOPPY_IPF_FORMAT = &floppy_image_format_creator<ipf_format>;
diff --git a/src/lib/formats/iq151_dsk.cpp b/src/lib/formats/iq151_dsk.cpp
index dcffad85751..b085cca0d37 100644
--- a/src/lib/formats/iq151_dsk.cpp
+++ b/src/lib/formats/iq151_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/iq151_dsk.h"
diff --git a/src/lib/formats/itt3030_dsk.cpp b/src/lib/formats/itt3030_dsk.cpp
index 305ab644233..4a4a795c7d3 100644
--- a/src/lib/formats/itt3030_dsk.cpp
+++ b/src/lib/formats/itt3030_dsk.cpp
@@ -10,7 +10,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/itt3030_dsk.h"
diff --git a/src/lib/formats/kaypro_dsk.cpp b/src/lib/formats/kaypro_dsk.cpp
index e9924ce11c9..6b3996d842c 100644
--- a/src/lib/formats/kaypro_dsk.cpp
+++ b/src/lib/formats/kaypro_dsk.cpp
@@ -16,7 +16,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/kaypro_dsk.h"
diff --git a/src/lib/formats/kc85_dsk.cpp b/src/lib/formats/kc85_dsk.cpp
index 84111ff1171..0648289af71 100644
--- a/src/lib/formats/kc85_dsk.cpp
+++ b/src/lib/formats/kc85_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/kc85_dsk.h"
diff --git a/src/lib/formats/kc_cas.cpp b/src/lib/formats/kc_cas.cpp
index 713def9ac83..ee3d392e86f 100644
--- a/src/lib/formats/kc_cas.cpp
+++ b/src/lib/formats/kc_cas.cpp
@@ -13,7 +13,7 @@
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "kc_cas.h"
diff --git a/src/lib/formats/kim1_cas.cpp b/src/lib/formats/kim1_cas.cpp
index 1bfccc7f8a0..b7853ee967e 100644
--- a/src/lib/formats/kim1_cas.cpp
+++ b/src/lib/formats/kim1_cas.cpp
@@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Wilbert Pol
-#include <assert.h>
+#include <cassert>
#include "kim1_cas.h"
diff --git a/src/lib/formats/lviv_lvt.cpp b/src/lib/formats/lviv_lvt.cpp
index 09e91eac9fd..3a94114d421 100644
--- a/src/lib/formats/lviv_lvt.cpp
+++ b/src/lib/formats/lviv_lvt.cpp
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Krzysztof Strzecha
/* .LVT tape images */
-#include <assert.h>
+#include <cassert>
#include "lviv_lvt.h"
diff --git a/src/lib/formats/m5_dsk.cpp b/src/lib/formats/m5_dsk.cpp
index 9652eedbb72..764dfeea6f1 100644
--- a/src/lib/formats/m5_dsk.cpp
+++ b/src/lib/formats/m5_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/m5_dsk.h"
diff --git a/src/lib/formats/mbee_cas.cpp b/src/lib/formats/mbee_cas.cpp
index 24024f66f5d..181bca6aac0 100644
--- a/src/lib/formats/mbee_cas.cpp
+++ b/src/lib/formats/mbee_cas.cpp
@@ -56,7 +56,7 @@ TAP - has an ID header of TAP_DGOS_BEE or MBEE, null terminated.
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "mbee_cas.h"
diff --git a/src/lib/formats/mfi_dsk.cpp b/src/lib/formats/mfi_dsk.cpp
index b6a8a18460a..0f118ce620f 100644
--- a/src/lib/formats/mfi_dsk.cpp
+++ b/src/lib/formats/mfi_dsk.cpp
@@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Olivier Galibert
-#include <assert.h>
+#include <cassert>
#include "mfi_dsk.h"
#include <zlib.h>
diff --git a/src/lib/formats/mm_dsk.cpp b/src/lib/formats/mm_dsk.cpp
index 0634c0e3ede..0268b46bf89 100644
--- a/src/lib/formats/mm_dsk.cpp
+++ b/src/lib/formats/mm_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/mm_dsk.h"
diff --git a/src/lib/formats/ms0515_dsk.cpp b/src/lib/formats/ms0515_dsk.cpp
index d16e8dbbf73..c89dae8018f 100644
--- a/src/lib/formats/ms0515_dsk.cpp
+++ b/src/lib/formats/ms0515_dsk.cpp
@@ -10,7 +10,7 @@
#include "formats/ms0515_dsk.h"
-#include <assert.h>
+#include <cassert>
ms0515_format::ms0515_format() : wd177x_format(formats)
{
diff --git a/src/lib/formats/mz_cas.cpp b/src/lib/formats/mz_cas.cpp
index cfcf9f36ed8..e7af23aafb4 100644
--- a/src/lib/formats/mz_cas.cpp
+++ b/src/lib/formats/mz_cas.cpp
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Nathan Woods
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "mz_cas.h"
#ifndef VERBOSE
diff --git a/src/lib/formats/nanos_dsk.cpp b/src/lib/formats/nanos_dsk.cpp
index 1536d0677c8..ef466f024a0 100644
--- a/src/lib/formats/nanos_dsk.cpp
+++ b/src/lib/formats/nanos_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/nanos_dsk.h"
diff --git a/src/lib/formats/naslite_dsk.cpp b/src/lib/formats/naslite_dsk.cpp
index cea109c2dc2..fdd63ca0ecc 100644
--- a/src/lib/formats/naslite_dsk.cpp
+++ b/src/lib/formats/naslite_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/naslite_dsk.h"
diff --git a/src/lib/formats/nes_dsk.cpp b/src/lib/formats/nes_dsk.cpp
index 60dbba5dafa..dd311862ca7 100644
--- a/src/lib/formats/nes_dsk.cpp
+++ b/src/lib/formats/nes_dsk.cpp
@@ -9,8 +9,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "formats/nes_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/nfd_dsk.cpp b/src/lib/formats/nfd_dsk.cpp
index 4d9d8fab980..e677f4ff6f5 100644
--- a/src/lib/formats/nfd_dsk.cpp
+++ b/src/lib/formats/nfd_dsk.cpp
@@ -77,7 +77,7 @@
*********************************************************************/
- #include <assert.h>
+ #include <cassert>
#include "nfd_dsk.h"
diff --git a/src/lib/formats/orao_cas.cpp b/src/lib/formats/orao_cas.cpp
index 2d0f96b2a14..9a2ac05547e 100644
--- a/src/lib/formats/orao_cas.cpp
+++ b/src/lib/formats/orao_cas.cpp
@@ -5,7 +5,7 @@
Tape support for Orao TAP format
*/
-#include <assert.h>
+#include <cassert>
#include "orao_cas.h"
diff --git a/src/lib/formats/oric_tap.cpp b/src/lib/formats/oric_tap.cpp
index c9f84dc7c2a..dcee2f0bd2d 100644
--- a/src/lib/formats/oric_tap.cpp
+++ b/src/lib/formats/oric_tap.cpp
@@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Kevin Thacker
-#include <assert.h>
+#include <cassert>
#include "oric_tap.h"
diff --git a/src/lib/formats/p6001_cas.cpp b/src/lib/formats/p6001_cas.cpp
index 37e1ffcfa2c..3319e377b3d 100644
--- a/src/lib/formats/p6001_cas.cpp
+++ b/src/lib/formats/p6001_cas.cpp
@@ -4,7 +4,7 @@
* NEC PC-6001 cassette format handling
*/
-#include <assert.h>
+#include <cassert>
#include "p6001_cas.h"
diff --git a/src/lib/formats/pc98_dsk.cpp b/src/lib/formats/pc98_dsk.cpp
index 3d85a4380dd..1add267da8f 100644
--- a/src/lib/formats/pc98_dsk.cpp
+++ b/src/lib/formats/pc98_dsk.cpp
@@ -8,8 +8,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "formats/pc98_dsk.h"
diff --git a/src/lib/formats/pc98fdi_dsk.cpp b/src/lib/formats/pc98fdi_dsk.cpp
index 5b37b1ede37..37cdae18ff7 100644
--- a/src/lib/formats/pc98fdi_dsk.cpp
+++ b/src/lib/formats/pc98fdi_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "pc98fdi_dsk.h"
pc98fdi_format::pc98fdi_format()
diff --git a/src/lib/formats/pc_dsk.cpp b/src/lib/formats/pc_dsk.cpp
index e4d7e02f47d..193291c8265 100644
--- a/src/lib/formats/pc_dsk.cpp
+++ b/src/lib/formats/pc_dsk.cpp
@@ -8,8 +8,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "formats/pc_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/lib/formats/phc25_cas.cpp b/src/lib/formats/phc25_cas.cpp
index 2cc9ea013e6..197c3db50ae 100644
--- a/src/lib/formats/phc25_cas.cpp
+++ b/src/lib/formats/phc25_cas.cpp
@@ -29,7 +29,7 @@ enough to make it work.
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "phc25_cas.h"
diff --git a/src/lib/formats/pmd_cas.cpp b/src/lib/formats/pmd_cas.cpp
index 79e8820b4bb..a046580bc17 100644
--- a/src/lib/formats/pmd_cas.cpp
+++ b/src/lib/formats/pmd_cas.cpp
@@ -10,7 +10,7 @@
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "pmd_cas.h"
diff --git a/src/lib/formats/ppg_dsk.cpp b/src/lib/formats/ppg_dsk.cpp
index dd08a841e00..0c844a753fc 100644
--- a/src/lib/formats/ppg_dsk.cpp
+++ b/src/lib/formats/ppg_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/ppg_dsk.h"
diff --git a/src/lib/formats/primoptp.cpp b/src/lib/formats/primoptp.cpp
index 5c6779b6613..906a08239a6 100644
--- a/src/lib/formats/primoptp.cpp
+++ b/src/lib/formats/primoptp.cpp
@@ -3,7 +3,7 @@
/* .PTP Microkey Primo tape images */
-#include <assert.h>
+#include <cassert>
#include "primoptp.h"
diff --git a/src/lib/formats/pyldin_dsk.cpp b/src/lib/formats/pyldin_dsk.cpp
index de43ab1947b..89a75ce5555 100644
--- a/src/lib/formats/pyldin_dsk.cpp
+++ b/src/lib/formats/pyldin_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/pyldin_dsk.h"
pyldin_format::pyldin_format() : upd765_format(formats)
diff --git a/src/lib/formats/ql_dsk.cpp b/src/lib/formats/ql_dsk.cpp
index b3ceb233218..6be088439cc 100644
--- a/src/lib/formats/ql_dsk.cpp
+++ b/src/lib/formats/ql_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/ql_dsk.h"
diff --git a/src/lib/formats/rk_cas.cpp b/src/lib/formats/rk_cas.cpp
index 18504fcb130..b522fea2f3b 100644
--- a/src/lib/formats/rk_cas.cpp
+++ b/src/lib/formats/rk_cas.cpp
@@ -5,7 +5,7 @@
Tape support for RK format
*/
-#include <assert.h>
+#include <cassert>
#include "rk_cas.h"
diff --git a/src/lib/formats/rx50_dsk.cpp b/src/lib/formats/rx50_dsk.cpp
index a58a8c5e59c..18bac995146 100644
--- a/src/lib/formats/rx50_dsk.cpp
+++ b/src/lib/formats/rx50_dsk.cpp
@@ -29,7 +29,7 @@
FORMAT A: /F:160 on DOS; turn MEDIACHK ON
************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "flopimg.h"
#include "formats/rx50_dsk.h"
diff --git a/src/lib/formats/sc3000_bit.cpp b/src/lib/formats/sc3000_bit.cpp
index c656b54ee95..6e3600b7aeb 100644
--- a/src/lib/formats/sc3000_bit.cpp
+++ b/src/lib/formats/sc3000_bit.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "sc3000_bit.h"
diff --git a/src/lib/formats/sdf_dsk.cpp b/src/lib/formats/sdf_dsk.cpp
index b2cd4a4e7ab..a1a0c921da7 100644
--- a/src/lib/formats/sdf_dsk.cpp
+++ b/src/lib/formats/sdf_dsk.cpp
@@ -12,7 +12,7 @@
*********************************************************************/
#include "sdf_dsk.h"
-#include <assert.h>
+#include <cassert>
sdf_format::sdf_format()
{
diff --git a/src/lib/formats/sf7000_dsk.cpp b/src/lib/formats/sf7000_dsk.cpp
index 31d0c37ab15..8e063ceba35 100644
--- a/src/lib/formats/sf7000_dsk.cpp
+++ b/src/lib/formats/sf7000_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/sf7000_dsk.h"
diff --git a/src/lib/formats/smx_dsk.cpp b/src/lib/formats/smx_dsk.cpp
index 9158a586c13..7ddcc1ae35f 100644
--- a/src/lib/formats/smx_dsk.cpp
+++ b/src/lib/formats/smx_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/smx_dsk.h"
diff --git a/src/lib/formats/sol_cas.cpp b/src/lib/formats/sol_cas.cpp
index ac668535b51..4672ff95080 100644
--- a/src/lib/formats/sol_cas.cpp
+++ b/src/lib/formats/sol_cas.cpp
@@ -34,7 +34,7 @@ SVT - The full explanation may be found on the Solace web site,
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "sol_cas.h"
diff --git a/src/lib/formats/sorc_cas.cpp b/src/lib/formats/sorc_cas.cpp
index 10fb26197f1..50585d444c7 100644
--- a/src/lib/formats/sorc_cas.cpp
+++ b/src/lib/formats/sorc_cas.cpp
@@ -25,7 +25,7 @@ header and leader bytes.
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "sorc_cas.h"
diff --git a/src/lib/formats/sorc_dsk.cpp b/src/lib/formats/sorc_dsk.cpp
index 7a1b734f780..35d293be3fc 100644
--- a/src/lib/formats/sorc_dsk.cpp
+++ b/src/lib/formats/sorc_dsk.cpp
@@ -8,8 +8,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "sorc_dsk.h"
#include "basicdsk.h"
diff --git a/src/lib/formats/sord_cas.cpp b/src/lib/formats/sord_cas.cpp
index bc11c388915..145cd3c3221 100644
--- a/src/lib/formats/sord_cas.cpp
+++ b/src/lib/formats/sord_cas.cpp
@@ -8,8 +8,8 @@
**************************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "sord_cas.h"
#define SORDM5_WAVESAMPLES_HEADER 1
diff --git a/src/lib/formats/spc1000_cas.cpp b/src/lib/formats/spc1000_cas.cpp
index d13021b0047..2e48980da3d 100644
--- a/src/lib/formats/spc1000_cas.cpp
+++ b/src/lib/formats/spc1000_cas.cpp
@@ -21,7 +21,7 @@ IPL: This seems a quickload format containing RAM dump, not a real tape
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "spc1000_cas.h"
diff --git a/src/lib/formats/st_dsk.cpp b/src/lib/formats/st_dsk.cpp
index 9808dc56ff9..36fe9a01970 100644
--- a/src/lib/formats/st_dsk.cpp
+++ b/src/lib/formats/st_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/st_dsk.h"
diff --git a/src/lib/formats/svi_cas.cpp b/src/lib/formats/svi_cas.cpp
index c681c36d9dd..fcb2142c4e3 100644
--- a/src/lib/formats/svi_cas.cpp
+++ b/src/lib/formats/svi_cas.cpp
@@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Sean Young
-#include <assert.h>
+#include <cassert>
#include "svi_cas.h"
diff --git a/src/lib/formats/tandy2k_dsk.cpp b/src/lib/formats/tandy2k_dsk.cpp
index e08865c9493..f811483251d 100644
--- a/src/lib/formats/tandy2k_dsk.cpp
+++ b/src/lib/formats/tandy2k_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/tandy2k_dsk.h"
diff --git a/src/lib/formats/td0_dsk.cpp b/src/lib/formats/td0_dsk.cpp
index b7c418af53c..4dc3ed53cbf 100644
--- a/src/lib/formats/td0_dsk.cpp
+++ b/src/lib/formats/td0_dsk.cpp
@@ -14,8 +14,8 @@
* Edited and translated to English by Kenji RIKITAKE
*/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "pool.h"
#include "flopimg.h"
diff --git a/src/lib/formats/thom_cas.cpp b/src/lib/formats/thom_cas.cpp
index 45f89ac2a29..a00c2c3234b 100644
--- a/src/lib/formats/thom_cas.cpp
+++ b/src/lib/formats/thom_cas.cpp
@@ -8,8 +8,8 @@
**********************************************************************/
-#include <math.h>
-#include <assert.h>
+#include <cmath>
+#include <cassert>
#include "pool.h"
#include "cassimg.h"
diff --git a/src/lib/formats/thom_dsk.cpp b/src/lib/formats/thom_dsk.cpp
index c8563fc1135..d525641c29f 100644
--- a/src/lib/formats/thom_dsk.cpp
+++ b/src/lib/formats/thom_dsk.cpp
@@ -10,8 +10,8 @@
*********************************************************************/
-#include <string.h>
-#include <assert.h>
+#include <cstring>
+#include <cassert>
#include "thom_dsk.h"
#include "basicdsk.h"
diff --git a/src/lib/formats/ti99_dsk.cpp b/src/lib/formats/ti99_dsk.cpp
index b248c9dd594..a82600feaa6 100644
--- a/src/lib/formats/ti99_dsk.cpp
+++ b/src/lib/formats/ti99_dsk.cpp
@@ -40,9 +40,9 @@
********************************************************************/
-#include <string.h>
-#include <time.h>
-#include <assert.h>
+#include <cstring>
+#include <ctime>
+#include <cassert>
#include <iomanip>
#include "emu.h" // osd_printf_* (in osdcore.h)
diff --git a/src/lib/formats/tiki100_dsk.cpp b/src/lib/formats/tiki100_dsk.cpp
index 2258f29c47a..9dd6555c9ff 100644
--- a/src/lib/formats/tiki100_dsk.cpp
+++ b/src/lib/formats/tiki100_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/tiki100_dsk.h"
diff --git a/src/lib/formats/trd_dsk.cpp b/src/lib/formats/trd_dsk.cpp
index 4766a3426e3..fd823e4aaba 100644
--- a/src/lib/formats/trd_dsk.cpp
+++ b/src/lib/formats/trd_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/trd_dsk.h"
diff --git a/src/lib/formats/trs_cas.cpp b/src/lib/formats/trs_cas.cpp
index a6701ed1263..582abf8869c 100644
--- a/src/lib/formats/trs_cas.cpp
+++ b/src/lib/formats/trs_cas.cpp
@@ -6,7 +6,7 @@ Support for TRS80 .cas cassette images
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/trs_cas.h"
diff --git a/src/lib/formats/tvc_cas.cpp b/src/lib/formats/tvc_cas.cpp
index 9177491278c..3cea37cc1bf 100644
--- a/src/lib/formats/tvc_cas.cpp
+++ b/src/lib/formats/tvc_cas.cpp
@@ -8,7 +8,7 @@
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "tvc_cas.h"
diff --git a/src/lib/formats/tvc_dsk.cpp b/src/lib/formats/tvc_dsk.cpp
index 8a2254cb7cc..303a5c2c09d 100644
--- a/src/lib/formats/tvc_dsk.cpp
+++ b/src/lib/formats/tvc_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/tvc_dsk.h"
diff --git a/src/lib/formats/tzx_cas.cpp b/src/lib/formats/tzx_cas.cpp
index 28d363df433..a4b2b30ed81 100644
--- a/src/lib/formats/tzx_cas.cpp
+++ b/src/lib/formats/tzx_cas.cpp
@@ -27,7 +27,7 @@ TODO:
*/
-#include <assert.h>
+#include <cassert>
#include "tzx_cas.h"
#include "formats/imageutl.h"
diff --git a/src/lib/formats/uef_cas.cpp b/src/lib/formats/uef_cas.cpp
index 78247887eb5..d19eb9b2e47 100644
--- a/src/lib/formats/uef_cas.cpp
+++ b/src/lib/formats/uef_cas.cpp
@@ -18,9 +18,9 @@ Not nice, but it works...
*/
-#include <string.h>
-#include <math.h>
-#include <assert.h>
+#include <cstring>
+#include <cmath>
+#include <cassert>
#include <zlib.h>
#include "uef_cas.h"
diff --git a/src/lib/formats/vg5k_cas.cpp b/src/lib/formats/vg5k_cas.cpp
index 898507e7139..cb8ab9636c5 100644
--- a/src/lib/formats/vg5k_cas.cpp
+++ b/src/lib/formats/vg5k_cas.cpp
@@ -5,7 +5,7 @@
Support for VG-5000 .k7 cassette images
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "vg5k_cas.h"
diff --git a/src/lib/formats/vt_cas.cpp b/src/lib/formats/vt_cas.cpp
index 9dbc68f8074..a8c30f8d25f 100644
--- a/src/lib/formats/vt_cas.cpp
+++ b/src/lib/formats/vt_cas.cpp
@@ -1,6 +1,6 @@
// license:GPL-2.0+
// copyright-holders:Juergen Buchmueller
-#include <assert.h>
+#include <cassert>
#include "formats/vt_cas.h"
diff --git a/src/lib/formats/wavfile.cpp b/src/lib/formats/wavfile.cpp
index 072be6c92a2..1408984079c 100644
--- a/src/lib/formats/wavfile.cpp
+++ b/src/lib/formats/wavfile.cpp
@@ -8,8 +8,8 @@
*********************************************************************/
-#include <stdio.h>
-#include <assert.h>
+#include <cstdio>
+#include <cassert>
#include "wavfile.h"
#include "cassimg.h"
diff --git a/src/lib/formats/x07_cas.cpp b/src/lib/formats/x07_cas.cpp
index b49d7c8d643..131693f2da1 100644
--- a/src/lib/formats/x07_cas.cpp
+++ b/src/lib/formats/x07_cas.cpp
@@ -6,7 +6,7 @@
********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "x07_cas.h"
diff --git a/src/lib/formats/x1_tap.cpp b/src/lib/formats/x1_tap.cpp
index b4fe65b8e8c..88c962bf53b 100644
--- a/src/lib/formats/x1_tap.cpp
+++ b/src/lib/formats/x1_tap.cpp
@@ -21,7 +21,7 @@
*
*/
-#include <assert.h>
+#include <cassert>
#include "x1_tap.h"
diff --git a/src/lib/formats/xdf_dsk.cpp b/src/lib/formats/xdf_dsk.cpp
index c77d685d9be..698b8799abc 100644
--- a/src/lib/formats/xdf_dsk.cpp
+++ b/src/lib/formats/xdf_dsk.cpp
@@ -8,7 +8,7 @@
*********************************************************************/
-#include <assert.h>
+#include <cassert>
#include "formats/xdf_dsk.h"
diff --git a/src/lib/formats/zx81_p.cpp b/src/lib/formats/zx81_p.cpp
index 9fa5814385f..709bdccfc4c 100644
--- a/src/lib/formats/zx81_p.cpp
+++ b/src/lib/formats/zx81_p.cpp
@@ -31,7 +31,7 @@ medium transfer rate is approx. 307 bps (38 bytes/sec) for files that contain
*****************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "zx81_p.h"
#include "tzx_cas.h"
diff --git a/src/lib/netlist/plib/pmain.cpp b/src/lib/netlist/plib/pmain.cpp
index d603baeb474..8b019265e90 100644
--- a/src/lib/netlist/plib/pmain.cpp
+++ b/src/lib/netlist/plib/pmain.cpp
@@ -5,7 +5,7 @@
#ifdef _WIN32
#include <windows.h>
-#include <string.h>
+#include <cstring>
#include <tchar.h>
#endif
diff --git a/src/lib/util/avhuff.cpp b/src/lib/util/avhuff.cpp
index 9975287f4c1..50eea9f24dc 100644
--- a/src/lib/util/avhuff.cpp
+++ b/src/lib/util/avhuff.cpp
@@ -58,14 +58,14 @@
***************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "avhuff.h"
#include "huffman.h"
#include "chd.h"
-#include <math.h>
-#include <stdlib.h>
+#include <cmath>
+#include <cstdlib>
#include <new>
diff --git a/src/lib/util/bitmap.cpp b/src/lib/util/bitmap.cpp
index 87cf8a27b76..ed814aae218 100644
--- a/src/lib/util/bitmap.cpp
+++ b/src/lib/util/bitmap.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "bitmap.h"
diff --git a/src/lib/util/cdrom.cpp b/src/lib/util/cdrom.cpp
index c2cded9f9aa..d2415108d80 100644
--- a/src/lib/util/cdrom.cpp
+++ b/src/lib/util/cdrom.cpp
@@ -16,11 +16,11 @@
***************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "cdrom.h"
-#include <stdlib.h>
+#include <cstdlib>
#include "chdcd.h"
diff --git a/src/lib/util/chd.cpp b/src/lib/util/chd.cpp
index 3b61d044cd3..d71eb436ea0 100644
--- a/src/lib/util/chd.cpp
+++ b/src/lib/util/chd.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "chd.h"
#include "avhuff.h"
@@ -17,9 +17,9 @@
#include "cdrom.h"
#include "coretmpl.h"
#include <zlib.h>
-#include <time.h>
-#include <stddef.h>
-#include <stdlib.h>
+#include <ctime>
+#include <cstddef>
+#include <cstdlib>
#include <new>
#include "eminline.h"
diff --git a/src/lib/util/chdcd.cpp b/src/lib/util/chdcd.cpp
index 85bd7cdad27..aafac22e968 100644
--- a/src/lib/util/chdcd.cpp
+++ b/src/lib/util/chdcd.cpp
@@ -7,9 +7,9 @@
***************************************************************************/
-#include <ctype.h>
-#include <stdlib.h>
-#include <assert.h>
+#include <cctype>
+#include <cstdlib>
+#include <cassert>
#include "osdcore.h"
#include "chd.h"
#include "chdcd.h"
diff --git a/src/lib/util/chdcodec.cpp b/src/lib/util/chdcodec.cpp
index 71763163a87..9785929d0bd 100644
--- a/src/lib/util/chdcodec.cpp
+++ b/src/lib/util/chdcodec.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "chd.h"
#include "hashing.h"
diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h
index 222b1428307..5d1f055e19b 100644
--- a/src/lib/util/corealloc.h
+++ b/src/lib/util/corealloc.h
@@ -15,7 +15,7 @@
#include "osdcore.h"
-#include <stdlib.h>
+#include <cstdlib>
#include <cstddef>
#include <cstring>
diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp
index 78a484c5511..5b8babfc33a 100644
--- a/src/lib/util/corefile.cpp
+++ b/src/lib/util/corefile.cpp
@@ -20,7 +20,7 @@
#include <cstring>
#include <iterator>
-#include <ctype.h>
+#include <cctype>
namespace util {
diff --git a/src/lib/util/corestr.cpp b/src/lib/util/corestr.cpp
index d0d5b576890..d4fc15b1bce 100644
--- a/src/lib/util/corestr.cpp
+++ b/src/lib/util/corestr.cpp
@@ -14,8 +14,8 @@
#include <algorithm>
#include <memory>
-#include <ctype.h>
-#include <stdlib.h>
+#include <cctype>
+#include <cstdlib>
/*-------------------------------------------------
diff --git a/src/lib/util/corestr.h b/src/lib/util/corestr.h
index 1791ae6d226..ee319d69deb 100644
--- a/src/lib/util/corestr.h
+++ b/src/lib/util/corestr.h
@@ -18,7 +18,7 @@
#include <string>
-#include <string.h>
+#include <cstring>
/***************************************************************************
diff --git a/src/lib/util/coreutil.cpp b/src/lib/util/coreutil.cpp
index d973080e354..94ec6dec273 100644
--- a/src/lib/util/coreutil.cpp
+++ b/src/lib/util/coreutil.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
#include "coreutil.h"
-#include <assert.h>
+#include <cassert>
#include <zlib.h>
diff --git a/src/lib/util/delegate.cpp b/src/lib/util/delegate.cpp
index 7b4ee8df76e..1ba81916030 100644
--- a/src/lib/util/delegate.cpp
+++ b/src/lib/util/delegate.cpp
@@ -8,9 +8,9 @@
***************************************************************************/
-#include <assert.h>
+#include <cassert>
#include <cstdint>
-#include <stdio.h>
+#include <cstdio>
#include "delegate.h"
diff --git a/src/lib/util/flac.cpp b/src/lib/util/flac.cpp
index 54a589ee2a2..7fce66c2bce 100644
--- a/src/lib/util/flac.cpp
+++ b/src/lib/util/flac.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "flac.h"
#include <new>
diff --git a/src/lib/util/harddisk.cpp b/src/lib/util/harddisk.cpp
index 5db97e3417b..e91759c44f2 100644
--- a/src/lib/util/harddisk.cpp
+++ b/src/lib/util/harddisk.cpp
@@ -8,10 +8,10 @@
***************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "harddisk.h"
#include "osdcore.h"
-#include <stdlib.h>
+#include <cstdlib>
/***************************************************************************
TYPE DEFINITIONS
diff --git a/src/lib/util/hash.cpp b/src/lib/util/hash.cpp
index ddb6f52ac5c..5808163b6b9 100644
--- a/src/lib/util/hash.cpp
+++ b/src/lib/util/hash.cpp
@@ -12,7 +12,7 @@
#include "hash.h"
#include "hashing.h"
-#include <ctype.h>
+#include <cctype>
namespace util {
diff --git a/src/lib/util/huffman.cpp b/src/lib/util/huffman.cpp
index d3a73315ea9..23b13bdaf09 100644
--- a/src/lib/util/huffman.cpp
+++ b/src/lib/util/huffman.cpp
@@ -96,8 +96,8 @@
***************************************************************************/
-#include <stdlib.h>
-#include <assert.h>
+#include <cstdlib>
+#include <cassert>
#include "coretmpl.h"
#include "huffman.h"
diff --git a/src/lib/util/jedparse.cpp b/src/lib/util/jedparse.cpp
index c2c9a139a6a..962a41a8ee0 100644
--- a/src/lib/util/jedparse.cpp
+++ b/src/lib/util/jedparse.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
#include "jedparse.h"
diff --git a/src/lib/util/md5.cpp b/src/lib/util/md5.cpp
index 712bd4a23f3..3e26d0c5b07 100644
--- a/src/lib/util/md5.cpp
+++ b/src/lib/util/md5.cpp
@@ -22,7 +22,7 @@
* Still in the public domain.
*/
-#include <string.h> /* for memcpy() */
+#include <cstring> /* for memcpy() */
#include "md5.h"
diff --git a/src/lib/util/opresolv.cpp b/src/lib/util/opresolv.cpp
index 05b8a5e8898..034f9418426 100644
--- a/src/lib/util/opresolv.cpp
+++ b/src/lib/util/opresolv.cpp
@@ -8,10 +8,10 @@
****************************************************************************/
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
+#include <cctype>
+#include <cstdlib>
+#include <cstring>
+#include <cassert>
#include "pool.h"
#include "corestr.h"
diff --git a/src/lib/util/opresolv.h b/src/lib/util/opresolv.h
index 52030dc4336..3781b602393 100644
--- a/src/lib/util/opresolv.h
+++ b/src/lib/util/opresolv.h
@@ -43,7 +43,7 @@
#pragma once
-#include <stdlib.h>
+#include <cstdlib>
#include <vector>
#include <string>
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index 65aac4a8883..5def23aa5ff 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -15,10 +15,10 @@
#include <locale>
#include <string>
-#include <assert.h>
-#include <ctype.h>
-#include <stdarg.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cctype>
+#include <cstdarg>
+#include <cstdlib>
const int core_options::MAX_UNADORNED_OPTIONS;
diff --git a/src/lib/util/palette.cpp b/src/lib/util/palette.cpp
index 488f7f8a2d2..59a63b2c8f5 100644
--- a/src/lib/util/palette.cpp
+++ b/src/lib/util/palette.cpp
@@ -8,11 +8,11 @@
******************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "palette.h"
-#include <stdlib.h>
-#include <math.h>
+#include <cstdlib>
+#include <cmath>
#include <algorithm>
diff --git a/src/lib/util/plaparse.cpp b/src/lib/util/plaparse.cpp
index d1e7c679f97..fbecd27232b 100644
--- a/src/lib/util/plaparse.cpp
+++ b/src/lib/util/plaparse.cpp
@@ -10,10 +10,10 @@
***************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
#include "jedparse.h"
#include "plaparse.h"
diff --git a/src/lib/util/png.cpp b/src/lib/util/png.cpp
index 6b13f4f9593..e3ebf10688f 100644
--- a/src/lib/util/png.cpp
+++ b/src/lib/util/png.cpp
@@ -21,8 +21,8 @@
#include <cmath>
#include <new>
-#include <math.h>
-#include <stdlib.h>
+#include <cmath>
+#include <cstdlib>
diff --git a/src/lib/util/pool.cpp b/src/lib/util/pool.cpp
index 606a7aea4b6..481b8b97f7f 100644
--- a/src/lib/util/pool.cpp
+++ b/src/lib/util/pool.cpp
@@ -8,9 +8,9 @@
***************************************************************************/
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdlib.h>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdlib>
#include "pool.h"
#include "coreutil.h"
diff --git a/src/lib/util/sha1.cpp b/src/lib/util/sha1.cpp
index fcda6ff9995..abc073cb6e8 100644
--- a/src/lib/util/sha1.cpp
+++ b/src/lib/util/sha1.cpp
@@ -27,9 +27,9 @@
#include "sha1.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
static unsigned int READ_UINT32(const uint8_t* data)
{
diff --git a/src/lib/util/unicode.h b/src/lib/util/unicode.h
index 46e1aec3496..9c727041db8 100644
--- a/src/lib/util/unicode.h
+++ b/src/lib/util/unicode.h
@@ -23,7 +23,7 @@
#include <string>
-#include <stdlib.h>
+#include <cstdlib>
diff --git a/src/lib/util/vbiparse.cpp b/src/lib/util/vbiparse.cpp
index bfd145dd99f..6b790ec7180 100644
--- a/src/lib/util/vbiparse.cpp
+++ b/src/lib/util/vbiparse.cpp
@@ -10,7 +10,7 @@
#include "osdcore.h"
#include "vbiparse.h"
-#include <math.h>
+#include <cmath>
#include <algorithm>
diff --git a/src/lib/util/xmlfile.cpp b/src/lib/util/xmlfile.cpp
index 1014a7b245c..012080c8335 100644
--- a/src/lib/util/xmlfile.cpp
+++ b/src/lib/util/xmlfile.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
-#include <assert.h>
+#include <cassert>
#include "xmlfile.h"
diff --git a/src/lib/util/zippath.cpp b/src/lib/util/zippath.cpp
index d8e90de11ff..2d44cfc4b4b 100644
--- a/src/lib/util/zippath.cpp
+++ b/src/lib/util/zippath.cpp
@@ -13,7 +13,7 @@
#include "corestr.h"
#include "osdcore.h"
-#include <stdlib.h>
+#include <cstdlib>
#include <cassert>
#include <cctype>
diff --git a/src/mame/drivers/ldplayer.cpp b/src/mame/drivers/ldplayer.cpp
index 0f7fa037b2a..6ff2df2b9c2 100644
--- a/src/mame/drivers/ldplayer.cpp
+++ b/src/mame/drivers/ldplayer.cpp
@@ -25,7 +25,7 @@
#include "pr8210.lh"
-#include <ctype.h>
+#include <cctype>
class ldplayer_state : public driver_device
diff --git a/src/mame/drivers/namcos23.cpp b/src/mame/drivers/namcos23.cpp
index addc1f813fa..ffe7a124c4d 100644
--- a/src/mame/drivers/namcos23.cpp
+++ b/src/mame/drivers/namcos23.cpp
@@ -1269,7 +1269,7 @@ Notes:
#include "speaker.h"
#include "tilemap.h"
-#include <float.h>
+#include <cfloat>
#define JVSCLOCK (XTAL(14'745'600))
diff --git a/src/mame/etc/fd1094dp.cpp b/src/mame/etc/fd1094dp.cpp
index ffaf2e187e9..04c499390f1 100644
--- a/src/mame/etc/fd1094dp.cpp
+++ b/src/mame/etc/fd1094dp.cpp
@@ -11,9 +11,9 @@ fd1094.c to decrypt the ROM data.
*****************************************************************************/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
int state2;
diff --git a/src/mame/etc/jrcrypt.cpp b/src/mame/etc/jrcrypt.cpp
index 3c30605af18..0a40a84e6fc 100644
--- a/src/mame/etc/jrcrypt.cpp
+++ b/src/mame/etc/jrcrypt.cpp
@@ -16,7 +16,7 @@
***************************************************************************/
#include "emu.h"
-#include <ctype.h>
+#include <cctype>
static int irq_mask;
@@ -455,7 +455,7 @@ the top of this file. It is included here for completeness.
//
// Comments, questions to: david@indigita.com
-#include <stdio.h>
+#include <cstdio>
typedef uint8_t byte;
diff --git a/src/mame/machine/atarifdc.cpp b/src/mame/machine/atarifdc.cpp
index ce6a5eb3e3b..2aae1dd0402 100644
--- a/src/mame/machine/atarifdc.cpp
+++ b/src/mame/machine/atarifdc.cpp
@@ -15,7 +15,7 @@
#include "formats/atari_dsk.h"
-#include <ctype.h>
+#include <cctype>
#define VERBOSE_SERIAL 0
diff --git a/src/mame/machine/bbc.cpp b/src/mame/machine/bbc.cpp
index 00a0e3051e1..d022ae919e1 100644
--- a/src/mame/machine/bbc.cpp
+++ b/src/mame/machine/bbc.cpp
@@ -10,7 +10,7 @@
******************************************************************************/
-#include <ctype.h>
+#include <cctype>
#include "emu.h"
#include "cpu/m6502/m6502.h"
#include "sound/tms5220.h"
diff --git a/src/mame/machine/cx4fn.hxx b/src/mame/machine/cx4fn.hxx
index 5021590740c..a9461567efa 100644
--- a/src/mame/machine/cx4fn.hxx
+++ b/src/mame/machine/cx4fn.hxx
@@ -10,7 +10,7 @@
***************************************************************************/
-#include <math.h>
+#include <cmath>
#define CX4_Tan(a) (CX4_CosTable[a] ? ((((int32_t)CX4_SinTable[a]) << 16) / CX4_CosTable[a]) : 0x80000000)
#define CX4_sar(b, n) ((b) >> (n))
#ifdef PI
diff --git a/src/mame/machine/dgn_beta.cpp b/src/mame/machine/dgn_beta.cpp
index b3179af551d..b71b4ec121f 100644
--- a/src/mame/machine/dgn_beta.cpp
+++ b/src/mame/machine/dgn_beta.cpp
@@ -59,7 +59,7 @@
#include <functional>
-#include <math.h>
+#include <cmath>
#include "emu.h"
#include "debug/debugcon.h"
#include "cpu/m6809/m6809.h"
diff --git a/src/mame/machine/gaelco3d.cpp b/src/mame/machine/gaelco3d.cpp
index 315cba86b4c..9ca7cb00455 100644
--- a/src/mame/machine/gaelco3d.cpp
+++ b/src/mame/machine/gaelco3d.cpp
@@ -42,7 +42,7 @@
#else
#include <unistd.h>
#endif
-#include <errno.h>
+#include <cerrno>
#ifdef SHARED_MEM_DRIVER
#include <sys/mman.h>
#endif
diff --git a/src/mame/machine/ti85.cpp b/src/mame/machine/ti85.cpp
index 9bba11de994..4af87659194 100644
--- a/src/mame/machine/ti85.cpp
+++ b/src/mame/machine/ti85.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
-#include <stdarg.h>
+#include <cstdarg>
#include "emu.h"
#include "cpu/z80/z80.h"
#include "includes/ti85.h"
diff --git a/src/mame/machine/zx8302.cpp b/src/mame/machine/zx8302.cpp
index 97d5c0ee0c9..d2e9b4f5c00 100644
--- a/src/mame/machine/zx8302.cpp
+++ b/src/mame/machine/zx8302.cpp
@@ -23,7 +23,7 @@
#include "imagedev/microdrv.h"
-#include <time.h>
+#include <ctime>
diff --git a/src/mame/video/3dom2_te.cpp b/src/mame/video/3dom2_te.cpp
index 2f3b33cbd2f..c41f7496e89 100644
--- a/src/mame/video/3dom2_te.cpp
+++ b/src/mame/video/3dom2_te.cpp
@@ -11,7 +11,7 @@
#include "machine/3dom2.h"
-#include <math.h>
+#include <cmath>
/*
TODO:
diff --git a/src/mame/video/k001005.h b/src/mame/video/k001005.h
index cf7a12fa0a4..586de02d410 100644
--- a/src/mame/video/k001005.h
+++ b/src/mame/video/k001005.h
@@ -9,7 +9,7 @@
#include "cpu/sharc/sharc.h"
#include "video/k001006.h"
-#include <float.h>
+#include <cfloat>
struct k001005_polydata
diff --git a/src/mame/video/pdp1.cpp b/src/mame/video/pdp1.cpp
index f04aa496d83..6f2462196a6 100644
--- a/src/mame/video/pdp1.cpp
+++ b/src/mame/video/pdp1.cpp
@@ -21,7 +21,7 @@
#include "cpu/pdp1/pdp1.h"
#include "includes/pdp1.h"
-#include <math.h>
+#include <cmath>
#include <algorithm>
diff --git a/src/mame/video/thomson.cpp b/src/mame/video/thomson.cpp
index a3e386b1e3c..d4f9acbe778 100644
--- a/src/mame/video/thomson.cpp
+++ b/src/mame/video/thomson.cpp
@@ -11,7 +11,7 @@
#include "emu.h"
#include "includes/thomson.h"
-#include <math.h>
+#include <cmath>
//#define VERBOSE 1
#include "logmacro.h"
diff --git a/src/mame/video/vectrex.cpp b/src/mame/video/vectrex.cpp
index 67502327e24..e819911e162 100644
--- a/src/mame/video/vectrex.cpp
+++ b/src/mame/video/vectrex.cpp
@@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:Mathis Rosenhauer
-#include <math.h>
+#include <cmath>
#include "emu.h"
#include "includes/vectrex.h"
#include "cpu/m6809/m6809.h"
diff --git a/src/osd/eigccx86.h b/src/osd/eigccx86.h
index 3c8f63aa47e..c5ec0848e01 100644
--- a/src/osd/eigccx86.h
+++ b/src/osd/eigccx86.h
@@ -15,7 +15,7 @@
// Include MMX/SSE intrinsics headers
#ifdef __SSE2__
-#include <stdlib.h>
+#include <cstdlib>
#include <mmintrin.h> // MMX
#include <xmmintrin.h> // SSE
#include <emmintrin.h> // SSE2
diff --git a/src/osd/mac/window.cpp b/src/osd/mac/window.cpp
index d22268f86f4..8a1f4d3fd3f 100644
--- a/src/osd/mac/window.cpp
+++ b/src/osd/mac/window.cpp
@@ -9,7 +9,7 @@
//============================================================
// standard C headers
-#include <math.h>
+#include <cmath>
#ifndef _MSC_VER
#include <unistd.h>
#endif
diff --git a/src/osd/modules/debugger/osx/debugview.mm b/src/osd/modules/debugger/osx/debugview.mm
index 731ea8227b2..a414e4ad8a4 100644
--- a/src/osd/modules/debugger/osx/debugview.mm
+++ b/src/osd/modules/debugger/osx/debugview.mm
@@ -16,7 +16,7 @@
#include "util/xmlfile.h"
-#include <string.h>
+#include <cstring>
static NSColor *DefaultForeground;
diff --git a/src/osd/modules/file/posixfile.cpp b/src/osd/modules/file/posixfile.cpp
index 8c78d28cbd5..4f56a8432d4 100644
--- a/src/osd/modules/file/posixfile.cpp
+++ b/src/osd/modules/file/posixfile.cpp
@@ -50,9 +50,9 @@
#include <vector>
#include <fcntl.h>
-#include <limits.h>
+#include <climits>
#include <sys/stat.h>
-#include <stdlib.h>
+#include <cstdlib>
#include <unistd.h>
diff --git a/src/osd/modules/file/posixptty.cpp b/src/osd/modules/file/posixptty.cpp
index a590dc682e2..5b38acc750a 100644
--- a/src/osd/modules/file/posixptty.cpp
+++ b/src/osd/modules/file/posixptty.cpp
@@ -15,9 +15,9 @@
#include <cstring>
#include <fcntl.h>
-#include <limits.h>
+#include <climits>
#include <unistd.h>
-#include <stdlib.h>
+#include <cstdlib>
#if defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#include <termios.h>
diff --git a/src/osd/modules/file/stdfile.cpp b/src/osd/modules/file/stdfile.cpp
index cb1f1b536b2..0bf38945f5a 100644
--- a/src/osd/modules/file/stdfile.cpp
+++ b/src/osd/modules/file/stdfile.cpp
@@ -14,7 +14,7 @@
#include <cstdlib>
#include <string>
-#include <stdio.h> // for fileno
+#include <cstdio> // for fileno
#include <unistd.h> // for ftruncate
diff --git a/src/osd/modules/file/windir.cpp b/src/osd/modules/file/windir.cpp
index f9575b27e74..73bcae13f04 100644
--- a/src/osd/modules/file/windir.cpp
+++ b/src/osd/modules/file/windir.cpp
@@ -20,8 +20,8 @@
#include "winutil.h"
// standard C headers
-#include <stdio.h>
-#include <ctype.h>
+#include <cstdio>
+#include <cctype>
#include <cassert>
#include <cstring>
diff --git a/src/osd/modules/file/winfile.cpp b/src/osd/modules/file/winfile.cpp
index 5df7c4bb8b1..b0869b7c70f 100644
--- a/src/osd/modules/file/winfile.cpp
+++ b/src/osd/modules/file/winfile.cpp
@@ -26,8 +26,8 @@
#include <winioctl.h>
#include <tchar.h>
#include <shlwapi.h>
-#include <stdlib.h>
-#include <ctype.h>
+#include <cstdlib>
+#include <cctype>
namespace {
diff --git a/src/osd/modules/file/winptty.cpp b/src/osd/modules/file/winptty.cpp
index 61867a869df..1dbc7e5cd05 100644
--- a/src/osd/modules/file/winptty.cpp
+++ b/src/osd/modules/file/winptty.cpp
@@ -10,7 +10,7 @@
#include <cassert>
#include <windows.h>
-#include <stdlib.h>
+#include <cstdlib>
namespace {
diff --git a/src/osd/modules/file/winrtdir.cpp b/src/osd/modules/file/winrtdir.cpp
index be42b6fd874..2d61097a3b4 100644
--- a/src/osd/modules/file/winrtdir.cpp
+++ b/src/osd/modules/file/winrtdir.cpp
@@ -20,8 +20,8 @@
#include "../../windows/winutil.h"
// standard C headers
-#include <stdio.h>
-#include <ctype.h>
+#include <cstdio>
+#include <cctype>
#include <cassert>
#include <cstring>
diff --git a/src/osd/modules/file/winrtfile.cpp b/src/osd/modules/file/winrtfile.cpp
index 83d8d7c4915..8e6ed4e5f43 100644
--- a/src/osd/modules/file/winrtfile.cpp
+++ b/src/osd/modules/file/winrtfile.cpp
@@ -26,8 +26,8 @@
#include <winioctl.h>
#include <tchar.h>
#include <shlwapi.h>
-#include <stdlib.h>
-#include <ctype.h>
+#include <cstdlib>
+#include <cctype>
namespace {
diff --git a/src/osd/modules/file/winrtptty.cpp b/src/osd/modules/file/winrtptty.cpp
index ec1e6e73b38..b442409a79e 100644
--- a/src/osd/modules/file/winrtptty.cpp
+++ b/src/osd/modules/file/winrtptty.cpp
@@ -9,7 +9,7 @@
#include <cassert>
#include <windows.h>
-#include <stdlib.h>
+#include <cstdlib>
namespace {
diff --git a/src/osd/modules/file/winrtsocket.cpp b/src/osd/modules/file/winrtsocket.cpp
index 3f2241c25b5..3e4880605bf 100644
--- a/src/osd/modules/file/winrtsocket.cpp
+++ b/src/osd/modules/file/winrtsocket.cpp
@@ -19,8 +19,8 @@
#include <windows.h>
#include <winioctl.h>
#include <tchar.h>
-#include <stdlib.h>
-#include <ctype.h>
+#include <cstdlib>
+#include <cctype>
namespace {
diff --git a/src/osd/modules/file/winsocket.cpp b/src/osd/modules/file/winsocket.cpp
index a383a876f9d..9fd0bb31165 100644
--- a/src/osd/modules/file/winsocket.cpp
+++ b/src/osd/modules/file/winsocket.cpp
@@ -22,8 +22,8 @@
#include <windows.h>
#include <winioctl.h>
#include <tchar.h>
-#include <stdlib.h>
-#include <ctype.h>
+#include <cstdlib>
+#include <cctype>
namespace {
diff --git a/src/osd/modules/input/input_mac.cpp b/src/osd/modules/input/input_mac.cpp
index 0784501573f..85afdaeb9cb 100644
--- a/src/osd/modules/input/input_mac.cpp
+++ b/src/osd/modules/input/input_mac.cpp
@@ -14,8 +14,8 @@
#if defined(OSD_MAC)
// System headers
-#include <ctype.h>
-#include <stddef.h>
+#include <cctype>
+#include <cstddef>
#include <mutex>
#include <memory>
#include <algorithm>
diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp
index 4d09441b24e..51af4750eb1 100644
--- a/src/osd/modules/input/input_sdl.cpp
+++ b/src/osd/modules/input/input_sdl.cpp
@@ -18,9 +18,9 @@
// standard sdl header
#include <SDL2/SDL.h>
-#include <ctype.h>
+#include <cctype>
// ReSharper disable once CppUnusedIncludeDirective
-#include <stddef.h>
+#include <cstddef>
#include <mutex>
#include <memory>
#include <queue>
diff --git a/src/osd/modules/input/input_sdlcommon.cpp b/src/osd/modules/input/input_sdlcommon.cpp
index 2e6611c74ac..a227fa9f46f 100644
--- a/src/osd/modules/input/input_sdlcommon.cpp
+++ b/src/osd/modules/input/input_sdlcommon.cpp
@@ -15,8 +15,8 @@
// standard sdl header
#include <SDL2/SDL.h>
-#include <ctype.h>
-#include <stddef.h>
+#include <cctype>
+#include <cstddef>
#include <mutex>
#include <memory>
#include <algorithm>
diff --git a/src/osd/modules/input/input_x11.cpp b/src/osd/modules/input/input_x11.cpp
index 6b66220e32a..e8888865ad5 100644
--- a/src/osd/modules/input/input_x11.cpp
+++ b/src/osd/modules/input/input_x11.cpp
@@ -20,8 +20,8 @@
// standard sdl header
#include <SDL2/SDL.h>
-#include <ctype.h>
-#include <stddef.h>
+#include <cctype>
+#include <cstddef>
#include <mutex>
#include <memory>
#include <queue>
diff --git a/src/osd/modules/lib/osdlib_macosx.cpp b/src/osd/modules/lib/osdlib_macosx.cpp
index 372293ec1a3..6f7f5f4c3e6 100644
--- a/src/osd/modules/lib/osdlib_macosx.cpp
+++ b/src/osd/modules/lib/osdlib_macosx.cpp
@@ -8,12 +8,12 @@
//
//============================================================
-#include <stdlib.h>
+#include <cstdlib>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/sysctl.h>
#include <sys/types.h>
-#include <signal.h>
+#include <csignal>
#include <dlfcn.h>
#include <cstdio>
diff --git a/src/osd/modules/lib/osdlib_unix.cpp b/src/osd/modules/lib/osdlib_unix.cpp
index 2b0e7a3d780..c2a34be7c98 100644
--- a/src/osd/modules/lib/osdlib_unix.cpp
+++ b/src/osd/modules/lib/osdlib_unix.cpp
@@ -8,11 +8,11 @@
//
//============================================================
-#include <stdlib.h>
+#include <cstdlib>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
-#include <signal.h>
+#include <csignal>
#include <dlfcn.h>
#include <cstdio>
diff --git a/src/osd/modules/lib/osdlib_uwp.cpp b/src/osd/modules/lib/osdlib_uwp.cpp
index 8d20c552cab..680594d9cc8 100644
--- a/src/osd/modules/lib/osdlib_uwp.cpp
+++ b/src/osd/modules/lib/osdlib_uwp.cpp
@@ -11,7 +11,7 @@
#include <windows.h>
#include <mmsystem.h>
-#include <stdlib.h>
+#include <cstdlib>
#include <cstdio>
#include <memory>
diff --git a/src/osd/modules/lib/osdlib_win32.cpp b/src/osd/modules/lib/osdlib_win32.cpp
index 911f95c3bfe..018161c6c0c 100644
--- a/src/osd/modules/lib/osdlib_win32.cpp
+++ b/src/osd/modules/lib/osdlib_win32.cpp
@@ -11,7 +11,7 @@
#include <windows.h>
#include <mmsystem.h>
-#include <stdlib.h>
+#include <cstdlib>
#ifndef _MSC_VER
#include <unistd.h>
#endif
diff --git a/src/osd/modules/netdev/taptun.cpp b/src/osd/modules/netdev/taptun.cpp
index 91ca323a178..df3ab7bf38d 100644
--- a/src/osd/modules/netdev/taptun.cpp
+++ b/src/osd/modules/netdev/taptun.cpp
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <net/if.h>
-#include <errno.h>
+#include <cerrno>
#endif
#include "emu.h"
diff --git a/src/osd/modules/opengl/gl_shader_mgr.cpp b/src/osd/modules/opengl/gl_shader_mgr.cpp
index 0cf3f9b6617..a4f01bca611 100644
--- a/src/osd/modules/opengl/gl_shader_mgr.cpp
+++ b/src/osd/modules/opengl/gl_shader_mgr.cpp
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:Sven Gothel
-#include <stdio.h> /* snprintf */
-#include <stdlib.h> /* malloc */
+#include <cstdio> /* snprintf */
+#include <cstdlib> /* malloc */
#include "osdcomm.h"
#include "osd_opengl.h"
diff --git a/src/osd/modules/render/bgfx/statereader.cpp b/src/osd/modules/render/bgfx/statereader.cpp
index 0f43ad71b09..afc6d652d9b 100644
--- a/src/osd/modules/render/bgfx/statereader.cpp
+++ b/src/osd/modules/render/bgfx/statereader.cpp
@@ -9,7 +9,7 @@
#include "statereader.h"
-#include <math.h>
+#include <cmath>
uint64_t state_reader::get_enum_from_value(const Value& value, std::string name, const uint64_t default_value, const string_to_enum* enums, const int count)
{
diff --git a/src/osd/modules/render/bgfx/texture.cpp b/src/osd/modules/render/bgfx/texture.cpp
index 7b6747e0c54..a187741798d 100644
--- a/src/osd/modules/render/bgfx/texture.cpp
+++ b/src/osd/modules/render/bgfx/texture.cpp
@@ -6,7 +6,7 @@
//
//============================================================
-#include <string.h>
+#include <cstring>
#include "texture.h"
diff --git a/src/osd/modules/render/draw13.cpp b/src/osd/modules/render/draw13.cpp
index f99ebf70601..96b04efc3d9 100644
--- a/src/osd/modules/render/draw13.cpp
+++ b/src/osd/modules/render/draw13.cpp
@@ -11,8 +11,8 @@
//============================================================
// standard C headers
-#include <math.h>
-#include <stdio.h>
+#include <cmath>
+#include <cstdio>
// MAME headers
#include "emu.h"
diff --git a/src/osd/modules/render/drawd3d.h b/src/osd/modules/render/drawd3d.h
index 92923904d77..03527d7374e 100644
--- a/src/osd/modules/render/drawd3d.h
+++ b/src/osd/modules/render/drawd3d.h
@@ -18,7 +18,7 @@
#include <mmsystem.h>
#include <d3d9.h>
#include <d3dx9.h>
-#include <math.h>
+#include <cmath>
#undef interface
#include "d3d/d3dcomm.h"
diff --git a/src/osd/modules/render/drawogl.cpp b/src/osd/modules/render/drawogl.cpp
index 7ab0488dfe2..6ee43cd57b7 100644
--- a/src/osd/modules/render/drawogl.cpp
+++ b/src/osd/modules/render/drawogl.cpp
@@ -13,8 +13,8 @@
//============================================================
// standard C headers
-#include <math.h>
-#include <stdio.h>
+#include <cmath>
+#include <cstdio>
// MAME headers
#include "osdcomm.h"
@@ -41,8 +41,8 @@
#include "modules/opengl/gl_shader_mgr.h"
#if defined(SDLMAME_MACOSX) || defined(OSD_MAC)
-#include <string.h>
-#include <stdio.h>
+#include <cstring>
+#include <cstdio>
#include <sys/types.h>
#include <sys/sysctl.h>
diff --git a/src/osd/modules/render/drawsdl.cpp b/src/osd/modules/render/drawsdl.cpp
index 5e04f6d4b15..76dc1375e5b 100644
--- a/src/osd/modules/render/drawsdl.cpp
+++ b/src/osd/modules/render/drawsdl.cpp
@@ -11,8 +11,8 @@
//============================================================
// standard C headers
-#include <math.h>
-#include <stdio.h>
+#include <cmath>
+#include <cstdio>
// MAME headers
#include "emu.h"
diff --git a/src/osd/modules/sound/coreaudio_sound.cpp b/src/osd/modules/sound/coreaudio_sound.cpp
index 1eb7e7fff30..dd9c953ceb5 100644
--- a/src/osd/modules/sound/coreaudio_sound.cpp
+++ b/src/osd/modules/sound/coreaudio_sound.cpp
@@ -21,7 +21,7 @@
#include <memory>
#include <new>
-#include <string.h>
+#include <cstring>
#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h
index 7e7ac805ad2..dfb9ab8ecde 100644
--- a/src/osd/osdcomm.h
+++ b/src/osd/osdcomm.h
@@ -13,8 +13,8 @@
#pragma once
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
#include <array>
#include <cstdint>
diff --git a/src/osd/osdcore.cpp b/src/osd/osdcore.cpp
index 250f51a90bc..0b0a0185837 100644
--- a/src/osd/osdcore.cpp
+++ b/src/osd/osdcore.cpp
@@ -11,7 +11,7 @@
#ifdef _WIN32
#include <windows.h>
-#include <stdio.h>
+#include <cstdio>
#include <shellapi.h>
#include "strconv.h"
#endif
diff --git a/src/osd/osdsync.cpp b/src/osd/osdsync.cpp
index f8143aa2c51..f18efb7fac2 100644
--- a/src/osd/osdsync.cpp
+++ b/src/osd/osdsync.cpp
@@ -10,10 +10,10 @@
#include <windows.h>
#include <process.h>
#include <tchar.h>
-#include <stdlib.h>
+#include <cstdlib>
#ifdef __GNUC__
-#include <stdint.h>
+#include <cstdint>
#endif
#endif
#include <mutex>
diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp
index e12337e4a97..70886d76a73 100644
--- a/src/osd/sdl/window.cpp
+++ b/src/osd/sdl/window.cpp
@@ -16,7 +16,7 @@
#include <SDL2/SDL.h>
// standard C headers
-#include <math.h>
+#include <cmath>
#ifndef _MSC_VER
#include <unistd.h>
#endif
diff --git a/src/osd/strconv.cpp b/src/osd/strconv.cpp
index 9ea2e00bd1a..717a17d862c 100644
--- a/src/osd/strconv.cpp
+++ b/src/osd/strconv.cpp
@@ -9,7 +9,7 @@
#include <windows.h>
#endif
#include <algorithm>
-#include <assert.h>
+#include <cassert>
// MAMEOS headers
#include "strconv.h"
diff --git a/src/osd/uwp/uwpcompat.cpp b/src/osd/uwp/uwpcompat.cpp
index bd7103b8e31..e4e1149f72c 100644
--- a/src/osd/uwp/uwpcompat.cpp
+++ b/src/osd/uwp/uwpcompat.cpp
@@ -9,7 +9,7 @@
#include "uwpcompat.h"
#include <windows.h>
-#include <errno.h>
+#include <cerrno>
#undef interface
diff --git a/src/osd/uwp/uwpcompat.h b/src/osd/uwp/uwpcompat.h
index 2d495238a99..5d0dbb07dcb 100644
--- a/src/osd/uwp/uwpcompat.h
+++ b/src/osd/uwp/uwpcompat.h
@@ -17,7 +17,7 @@ extern "C" {
#define NOGDI
#endif
#include <windows.h>
-#include <stdio.h>
+#include <cstdio>
int system(const char *command);
diff --git a/src/osd/windows/ledutil.cpp b/src/osd/windows/ledutil.cpp
index 8f2a781b427..f1976cd41bc 100644
--- a/src/osd/windows/ledutil.cpp
+++ b/src/osd/windows/ledutil.cpp
@@ -34,9 +34,9 @@
// standard C headers
#include <conio.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
// MAME output header file
typedef int running_machine;
diff --git a/src/osd/windows/main.cpp b/src/osd/windows/main.cpp
index 6d81d824f02..cfadf9ffe0b 100644
--- a/src/osd/windows/main.cpp
+++ b/src/osd/windows/main.cpp
@@ -12,7 +12,7 @@
#endif
#include <windows.h>
#include <tchar.h>
-#include <stdlib.h>
+#include <cstdlib>
#include <vector>
#include <string>
diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp
index 1ce656c2a37..a16904c2aa8 100644
--- a/src/osd/windows/winmain.cpp
+++ b/src/osd/windows/winmain.cpp
@@ -21,9 +21,9 @@
#include "modules/monitor/monitor_common.h"
// standard C headers
-#include <ctype.h>
-#include <stdarg.h>
-#include <stdio.h>
+#include <cctype>
+#include <cstdarg>
+#include <cstdio>
// standard windows headers
#include <windows.h>
diff --git a/src/osd/windows/winutf8.cpp b/src/osd/windows/winutf8.cpp
index a860aeb55cc..bfc1d86ad38 100644
--- a/src/osd/windows/winutf8.cpp
+++ b/src/osd/windows/winutf8.cpp
@@ -10,7 +10,7 @@
#include "winutf8.h"
#include "strconv.h"
-#include <stdlib.h>
+#include <cstdlib>
// standard windows headers
#include <shellapi.h>
diff --git a/src/tools/aueffectutil.mm b/src/tools/aueffectutil.mm
index d232c735db3..661800a3b48 100644
--- a/src/tools/aueffectutil.mm
+++ b/src/tools/aueffectutil.mm
@@ -13,7 +13,7 @@
#include <utility>
#include <vector>
-#include <stdlib.h>
+#include <cstdlib>
#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
diff --git a/src/tools/castool.cpp b/src/tools/castool.cpp
index 6c10cfe4ed8..eb9973ad48d 100644
--- a/src/tools/castool.cpp
+++ b/src/tools/castool.cpp
@@ -10,12 +10,12 @@
***************************************************************************/
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <time.h>
-#include <assert.h>
+#include <cstdio>
+#include <cstring>
+#include <cctype>
+#include <cstdlib>
+#include <ctime>
+#include <cassert>
#include "corestr.h"
diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp
index 153a4e34157..44e73083ff4 100644
--- a/src/tools/chdman.cpp
+++ b/src/tools/chdman.cpp
@@ -5,8 +5,8 @@
CHD compression frontend
****************************************************************************/
-#include <stdio.h> // must be here otherwise issues with I64FMT in MINGW
-#include <assert.h>
+#include <stdio.h> // must be stdio.h and here otherwise issues with I64FMT in MINGW
+#include <cassert>
#include "osdcore.h"
#include "corefile.h"
@@ -17,11 +17,11 @@
#include "md5.h"
#include "sha1.h"
#include "vbiparse.h"
-#include <stdarg.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <time.h>
-#include <ctype.h>
+#include <cstdarg>
+#include <cstdlib>
+#include <cstdio>
+#include <ctime>
+#include <cctype>
#include <iostream>
#include <cassert>
diff --git a/src/tools/floptool.cpp b/src/tools/floptool.cpp
index 591fd5b91ad..7a09bd2ca34 100644
--- a/src/tools/floptool.cpp
+++ b/src/tools/floptool.cpp
@@ -10,13 +10,13 @@
***************************************************************************/
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <time.h>
-#include <stdarg.h>
-#include <assert.h>
+#include <cstdio>
+#include <cstring>
+#include <cctype>
+#include <cstdlib>
+#include <ctime>
+#include <cstdarg>
+#include <cassert>
#include "corestr.h"
diff --git a/src/tools/imgtool/filtbas.cpp b/src/tools/imgtool/filtbas.cpp
index 37bf5f0ef71..4cffd0a34c3 100644
--- a/src/tools/imgtool/filtbas.cpp
+++ b/src/tools/imgtool/filtbas.cpp
@@ -18,9 +18,9 @@
*****************************************************************************/
-#include <string.h>
-#include <stdarg.h>
-#include <ctype.h>
+#include <cstring>
+#include <cstdarg>
+#include <cctype>
#include "imgtool.h"
#include "formats/imageutl.h"
diff --git a/src/tools/imgtool/filteoln.cpp b/src/tools/imgtool/filteoln.cpp
index bb589e8fafe..5a4c2f873a3 100644
--- a/src/tools/imgtool/filteoln.cpp
+++ b/src/tools/imgtool/filteoln.cpp
@@ -8,7 +8,7 @@
*****************************************************************************/
-#include <string.h>
+#include <cstring>
#include "imgtool.h"
diff --git a/src/tools/imgtool/filter.cpp b/src/tools/imgtool/filter.cpp
index e26c51a623b..df9c6ea28ac 100644
--- a/src/tools/imgtool/filter.cpp
+++ b/src/tools/imgtool/filter.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
-#include <string.h>
+#include <cstring>
#include "imgtool.h"
diff --git a/src/tools/imgtool/filter.h b/src/tools/imgtool/filter.h
index 7ddd999c2a2..e46d3781262 100644
--- a/src/tools/imgtool/filter.h
+++ b/src/tools/imgtool/filter.h
@@ -11,8 +11,8 @@
#ifndef FILTER_H
#define FILTER_H
-#include <stdlib.h>
-#include <stdio.h>
+#include <cstdlib>
+#include <cstdio>
#include "library.h"
diff --git a/src/tools/imgtool/formats/coco_dsk.cpp b/src/tools/imgtool/formats/coco_dsk.cpp
index 6f509c92767..4e5bc4aa7c6 100644
--- a/src/tools/imgtool/formats/coco_dsk.cpp
+++ b/src/tools/imgtool/formats/coco_dsk.cpp
@@ -8,9 +8,9 @@
*********************************************************************/
-#include <string.h>
-#include <time.h>
-#include <assert.h>
+#include <cstring>
+#include <ctime>
+#include <cassert>
#include "formats/coco_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/tools/imgtool/formats/vt_dsk.cpp b/src/tools/imgtool/formats/vt_dsk.cpp
index 02f74668b0f..c29d08ba88b 100644
--- a/src/tools/imgtool/formats/vt_dsk.cpp
+++ b/src/tools/imgtool/formats/vt_dsk.cpp
@@ -8,9 +8,9 @@
*********************************************************************/
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
+#include <cstdio>
+#include <cstring>
+#include <cassert>
#include "formats/vt_dsk.h"
#include "formats/basicdsk.h"
diff --git a/src/tools/imgtool/imgtool.cpp b/src/tools/imgtool/imgtool.cpp
index b51d7b4d478..fb24da8a872 100644
--- a/src/tools/imgtool/imgtool.cpp
+++ b/src/tools/imgtool/imgtool.cpp
@@ -8,8 +8,8 @@
***************************************************************************/
-#include <string.h>
-#include <ctype.h>
+#include <cstring>
+#include <cctype>
#include <iostream>
#include "imgtool.h"
diff --git a/src/tools/imgtool/imgtool.h b/src/tools/imgtool/imgtool.h
index aa4ae79e29e..614b3564dcf 100644
--- a/src/tools/imgtool/imgtool.h
+++ b/src/tools/imgtool/imgtool.h
@@ -11,9 +11,9 @@
#ifndef IMGTOOL_H
#define IMGTOOL_H
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
+#include <cstdlib>
+#include <cstdio>
+#include <cassert>
#include <functional>
#include "corestr.h"
diff --git a/src/tools/imgtool/library.cpp b/src/tools/imgtool/library.cpp
index 785054575b0..e3c75203805 100644
--- a/src/tools/imgtool/library.cpp
+++ b/src/tools/imgtool/library.cpp
@@ -9,7 +9,7 @@
****************************************************************************/
-#include <string.h>
+#include <cstring>
#include <algorithm>
#include "imgtool.h"
diff --git a/src/tools/imgtool/library.h b/src/tools/imgtool/library.h
index c709a70201b..6dc9ea8224b 100644
--- a/src/tools/imgtool/library.h
+++ b/src/tools/imgtool/library.h
@@ -17,7 +17,7 @@
#ifndef LIBRARY_H
#define LIBRARY_H
-#include <time.h>
+#include <ctime>
#include <list>
#include <chrono>
diff --git a/src/tools/imgtool/main.cpp b/src/tools/imgtool/main.cpp
index d5320beb347..d289bd01ff3 100644
--- a/src/tools/imgtool/main.cpp
+++ b/src/tools/imgtool/main.cpp
@@ -13,11 +13,11 @@
#include "modules.h"
#include "strformat.h"
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <time.h>
+#include <cstdio>
+#include <cstring>
+#include <cctype>
+#include <cstdlib>
+#include <ctime>
#include <iostream>
#ifdef _WIN32
diff --git a/src/tools/imgtool/modules/amiga.cpp b/src/tools/imgtool/modules/amiga.cpp
index c1c5563012e..91488fb91a5 100644
--- a/src/tools/imgtool/modules/amiga.cpp
+++ b/src/tools/imgtool/modules/amiga.cpp
@@ -14,9 +14,9 @@
*****************************************************************************/
-#include <time.h>
-#include <string.h>
-#include <ctype.h>
+#include <ctime>
+#include <cstring>
+#include <cctype>
#include "imgtool.h"
#include "iflopimg.h"
diff --git a/src/tools/imgtool/modules/bml3.cpp b/src/tools/imgtool/modules/bml3.cpp
index a1a3bdc203d..19c60570acc 100644
--- a/src/tools/imgtool/modules/bml3.cpp
+++ b/src/tools/imgtool/modules/bml3.cpp
@@ -18,9 +18,9 @@
- (used with MP-1802 floppy disk controller card)
*/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
#include "imgtool.h"
#include "iflopimg.h"
diff --git a/src/tools/imgtool/modules/concept.cpp b/src/tools/imgtool/modules/concept.cpp
index 6bc0fe1bf22..18b80c73c23 100644
--- a/src/tools/imgtool/modules/concept.cpp
+++ b/src/tools/imgtool/modules/concept.cpp
@@ -8,10 +8,10 @@
Raphael Nabet, 2003
*/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
+#include <climits>
#include "imgtool.h"
struct UINT16xE
diff --git a/src/tools/imgtool/modules/fat.cpp b/src/tools/imgtool/modules/fat.cpp
index 029050d1e9c..68110275e07 100644
--- a/src/tools/imgtool/modules/fat.cpp
+++ b/src/tools/imgtool/modules/fat.cpp
@@ -134,8 +134,8 @@
****************************************************************************/
-#include <time.h>
-#include <ctype.h>
+#include <ctime>
+#include <cctype>
#include "imgtool.h"
#include "formats/imageutl.h"
#include "unicode.h"
diff --git a/src/tools/imgtool/modules/mac.cpp b/src/tools/imgtool/modules/mac.cpp
index 90c68323f76..f7bc2ff118b 100644
--- a/src/tools/imgtool/modules/mac.cpp
+++ b/src/tools/imgtool/modules/mac.cpp
@@ -89,11 +89,11 @@
*****************************************************************************/
-#include <ctype.h>
-#include <string.h>
-#include <time.h>
-#include <limits.h>
-#include <stddef.h>
+#include <cctype>
+#include <cstring>
+#include <ctime>
+#include <climits>
+#include <cstddef>
#include "formats/imageutl.h"
#include "imgtool.h"
diff --git a/src/tools/imgtool/modules/macbin.cpp b/src/tools/imgtool/modules/macbin.cpp
index 30400dffdbb..29fa90f9e59 100644
--- a/src/tools/imgtool/modules/macbin.cpp
+++ b/src/tools/imgtool/modules/macbin.cpp
@@ -46,7 +46,7 @@
*****************************************************************************/
-#include <string.h>
+#include <cstring>
#include "imgtool.h"
#include "formats/imageutl.h"
diff --git a/src/tools/imgtool/modules/os9.cpp b/src/tools/imgtool/modules/os9.cpp
index cc016250c31..539b53c1818 100644
--- a/src/tools/imgtool/modules/os9.cpp
+++ b/src/tools/imgtool/modules/os9.cpp
@@ -8,7 +8,7 @@
****************************************************************************/
-#include <time.h>
+#include <ctime>
#include "imgtool.h"
#include "formats/imageutl.h"
diff --git a/src/tools/imgtool/modules/rsdos.cpp b/src/tools/imgtool/modules/rsdos.cpp
index 4bcde9444ab..43579baad37 100644
--- a/src/tools/imgtool/modules/rsdos.cpp
+++ b/src/tools/imgtool/modules/rsdos.cpp
@@ -8,9 +8,9 @@
****************************************************************************/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
#include "imgtool.h"
#include "formats/coco_dsk.h"
#include "iflopimg.h"
diff --git a/src/tools/imgtool/modules/rt11.cpp b/src/tools/imgtool/modules/rt11.cpp
index 01ab8741dd6..be6535550bb 100644
--- a/src/tools/imgtool/modules/rt11.cpp
+++ b/src/tools/imgtool/modules/rt11.cpp
@@ -75,9 +75,9 @@
#include "formats/imageutl.h"
#include "iflopimg.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
namespace
diff --git a/src/tools/imgtool/modules/thomson.cpp b/src/tools/imgtool/modules/thomson.cpp
index f122bc00520..2acb03d8b01 100644
--- a/src/tools/imgtool/modules/thomson.cpp
+++ b/src/tools/imgtool/modules/thomson.cpp
@@ -115,7 +115,7 @@
#include "iflopimg.h"
#include "formats/imageutl.h"
-#include <time.h>
+#include <ctime>
#define MAXSIZE 80*16*256*2 /* room for two faces, double-density, 80 tracks */
diff --git a/src/tools/imgtool/modules/ti99.cpp b/src/tools/imgtool/modules/ti99.cpp
index 226adc213d2..8ca2d49c529 100644
--- a/src/tools/imgtool/modules/ti99.cpp
+++ b/src/tools/imgtool/modules/ti99.cpp
@@ -18,11 +18,11 @@
- check allocation bitmap against corruption when an image is opened
*/
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <time.h>
+#include <climits>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
+#include <ctime>
#include "imgtool.h"
#include "harddisk.h"
#include "imghd.h"
diff --git a/src/tools/imgtool/modules/ti990hd.cpp b/src/tools/imgtool/modules/ti990hd.cpp
index 6a9a37063b0..9bf77fa6a6c 100644
--- a/src/tools/imgtool/modules/ti990hd.cpp
+++ b/src/tools/imgtool/modules/ti990hd.cpp
@@ -8,10 +8,10 @@
Raphael Nabet, 2003
*/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
+#include <climits>
#include "imgtool.h"
/* Max sector length is bytes. Generally 256, except for a few older disk
diff --git a/src/tools/imgtool/modules/vzdos.cpp b/src/tools/imgtool/modules/vzdos.cpp
index bf46863bb28..6a9d5b0c394 100644
--- a/src/tools/imgtool/modules/vzdos.cpp
+++ b/src/tools/imgtool/modules/vzdos.cpp
@@ -8,10 +8,10 @@
****************************************************************************/
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <math.h>
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
+#include <cmath>
#include "imgtool.h"
#include "formats/imageutl.h"
#include "formats/vt_dsk.h"
diff --git a/src/tools/imgtool/stream.cpp b/src/tools/imgtool/stream.cpp
index 9a29180c9da..9f6cba27353 100644
--- a/src/tools/imgtool/stream.cpp
+++ b/src/tools/imgtool/stream.cpp
@@ -8,8 +8,8 @@
***************************************************************************/
-#include <stdio.h>
-#include <string.h>
+#include <cstdio>
+#include <cstring>
#include <zlib.h>
#include "unzip.h"
diff --git a/src/tools/jedutil.cpp b/src/tools/jedutil.cpp
index d1c49ec7a79..49b5d00cd38 100644
--- a/src/tools/jedutil.cpp
+++ b/src/tools/jedutil.cpp
@@ -112,10 +112,10 @@
***************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
#include "corestr.h"
#include "jedparse.h"
#include "plaparse.h"
diff --git a/src/tools/ldresample.cpp b/src/tools/ldresample.cpp
index 5386ac31229..57c20f7777c 100644
--- a/src/tools/ldresample.cpp
+++ b/src/tools/ldresample.cpp
@@ -8,12 +8,12 @@
****************************************************************************/
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <math.h>
+#include <cstdio>
+#include <cctype>
+#include <cstdlib>
+#include <cmath>
#include <new>
-#include <assert.h>
+#include <cassert>
#include "bitmap.h"
#include "chd.h"
#include "avhuff.h"
diff --git a/src/tools/ldverify.cpp b/src/tools/ldverify.cpp
index 2a326508323..deee9afba36 100644
--- a/src/tools/ldverify.cpp
+++ b/src/tools/ldverify.cpp
@@ -8,11 +8,11 @@
****************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cctype>
#include <new>
-#include <assert.h>
+#include <cassert>
#include "coretmpl.h"
#include "aviio.h"
#include "avhuff.h"
diff --git a/src/tools/pngcmp.cpp b/src/tools/pngcmp.cpp
index af104e928b3..eb56d4a7ee7 100644
--- a/src/tools/pngcmp.cpp
+++ b/src/tools/pngcmp.cpp
@@ -8,11 +8,11 @@
****************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
+#include <cassert>
#include "osdcore.h"
#include "png.h"
diff --git a/src/tools/regrep.cpp b/src/tools/regrep.cpp
index 91dcaecd518..f45351272a7 100644
--- a/src/tools/regrep.cpp
+++ b/src/tools/regrep.cpp
@@ -6,12 +6,12 @@
****************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
#include <new>
-#include <assert.h>
+#include <cassert>
#include "osdcore.h"
#include "png.h"
diff --git a/src/tools/romcmp.cpp b/src/tools/romcmp.cpp
index 6a781bc8c29..9f072fc0e4f 100644
--- a/src/tools/romcmp.cpp
+++ b/src/tools/romcmp.cpp
@@ -13,8 +13,8 @@
#include "osdcomm.h"
#include "hash.h"
-#include <stdarg.h>
-#include <stdlib.h>
+#include <cstdarg>
+#include <cstdlib>
#define MAX_FILES 1000
diff --git a/src/tools/split.cpp b/src/tools/split.cpp
index 4ef18b6ad06..ba455c04b51 100644
--- a/src/tools/split.cpp
+++ b/src/tools/split.cpp
@@ -8,11 +8,11 @@
****************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
+#include <cassert>
#include "corefile.h"
#include "corestr.h"
#include "sha1.h"
diff --git a/src/tools/src2html.cpp b/src/tools/src2html.cpp
index 32a21de065e..7b0293ac4b1 100644
--- a/src/tools/src2html.cpp
+++ b/src/tools/src2html.cpp
@@ -15,11 +15,11 @@
***************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
+#include <cassert>
#include "osdcore.h"
#include "corestr.h"
#include "corefile.h"
diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp
index 08dad29b6d7..73d5a63f002 100644
--- a/src/tools/unidasm.cpp
+++ b/src/tools/unidasm.cpp
@@ -177,7 +177,7 @@ using util::BIT;
#include <iostream>
#include <stdexcept>
-#include <ctype.h>
+#include <cctype>
using u8 = util::u8;
using u16 = util::u16;