From: kosmirror <kos...@us...> - 2025-08-16 05:16:51
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via a6cf282777a0aa3477f725695c38eb072f97e599 (commit) via 2df8eac788c9eb90779171feca7e8ba28e0f965c (commit) via 2ea09fd2eb5ac0ddea0f1998bbe62d7b25b6a561 (commit) via f80867ad3f59d2f1566329d70b7d81d8880b34e5 (commit) via 21418d1705521474d3cd663ab7d0c8a90a124c96 (commit) from ef85bc4e70f3d37c59f2fe57bf6eefa8b1df567f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a6cf282777a0aa3477f725695c38eb072f97e599 Author: QuzarDC <qu...@co...> Date: Fri Aug 15 13:01:03 2025 -0400 examples: Remove last arch/types.h type usage from examples. commit 2df8eac788c9eb90779171feca7e8ba28e0f965c Author: QuzarDC <qu...@co...> Date: Fri Aug 15 12:29:10 2025 -0400 addons: Remove arch/types.h types. Additionally minor whitespace cleanups. commit 2ea09fd2eb5ac0ddea0f1998bbe62d7b25b6a561 Author: QuzarDC <qu...@co...> Date: Fri Aug 15 00:41:42 2025 -0400 Replace arch/types.h types in remaining misc kernel files. commit f80867ad3f59d2f1566329d70b7d81d8880b34e5 Author: QuzarDC <qu...@co...> Date: Fri Aug 15 00:28:56 2025 -0400 fs: Remove arch/types.h types. Additionaly some minor whitespace cleanups. commit 21418d1705521474d3cd663ab7d0c8a90a124c96 Author: QuzarDC <qu...@co...> Date: Thu Aug 14 20:44:09 2025 -0400 net: Remove left behind usages of `arch/types.h` types. A reflection of the fact that I did these by hand in #1102, it seems as though I missed a few. ----------------------------------------------------------------------- Summary of changes: addons/include/kos/img.h | 12 ++--- addons/include/kos/md5.h | 14 +++--- addons/include/kos/netcfg.h | 22 ++++----- addons/include/navi/flash.h | 6 +-- addons/include/navi/ide.h | 8 ++-- addons/libkosext2fs/fs_ext2.c | 2 +- addons/libkosfat/fs_fat.c | 2 +- addons/libkosutils/md5.c | 50 ++++++++++---------- addons/libkosutils/netcfg.c | 16 +++---- addons/libkosutils/pcx_small.c | 47 +++++++++---------- addons/libnavi/navi_flash.c | 20 ++++---- addons/libnavi/navi_ide.c | 45 +++++++++--------- addons/libppp/ipcp.c | 24 +++++----- addons/libppp/ppp.c | 6 +-- .../dreamcast/keyboard/keyrawtest/keyrawtest.c | 6 +-- include/kos/dbgio.h | 12 ++--- include/kos/exports.h | 1 - include/kos/fs.h | 12 ++--- include/kos/fs_socket.h | 5 +- include/kos/library.h | 2 +- include/kos/net.h | 2 +- include/kos/thread.h | 2 +- kernel/debug/dbgio.c | 12 ++--- kernel/fs/fs.c | 24 +++++----- kernel/fs/fs_dev.c | 1 - kernel/fs/fs_null.c | 1 - kernel/fs/fs_pty.c | 40 ++++++++-------- kernel/fs/fs_random.c | 1 - kernel/fs/fs_socket.c | 2 +- kernel/fs/fs_utils.c | 12 ++--- kernel/libc/koslib/malloc.c | 54 +++++++++++----------- kernel/mm/malloc_debug.c | 46 +++++++++--------- kernel/net/net_dhcp.c | 4 +- kernel/net/net_icmp6.c | 4 +- kernel/net/net_ipv4.c | 2 +- kernel/net/net_ipv4_frag.c | 4 +- kernel/net/net_ipv6.h | 2 +- kernel/net/net_ndp.c | 2 +- kernel/net/net_tcp.c | 2 +- kernel/net/net_udp.c | 2 +- 40 files changed, 260 insertions(+), 271 deletions(-) diff --git a/addons/include/kos/img.h b/addons/include/kos/img.h index ea13cbc8..70c50dd8 100644 --- a/addons/include/kos/img.h +++ b/addons/include/kos/img.h @@ -26,7 +26,7 @@ #include <sys/cdefs.h> __BEGIN_DECLS -#include <arch/types.h> +#include <stdint.h> /** \defgroup video_img Images \brief Platform-independent image representation @@ -49,13 +49,13 @@ __BEGIN_DECLS \headerfile kos/img.h */ typedef struct kos_img { - void *data; /**< \brief Image data in the specified format. */ - uint32 w; /**< \brief Width of the image. */ - uint32 h; /**< \brief Height of the image. */ - uint32 fmt; /**< \brief Format of the image data. + void *data; /**< \brief Image data in the specified format. */ + uint32_t w; /**< \brief Width of the image. */ + uint32_t h; /**< \brief Height of the image. */ + uint32_t fmt; /**< \brief Format of the image data. \see kos_img_fmts \see kos_img_fmt_macros */ - uint32 byte_count; /**< \brief Length of the image data, in bytes. */ + uint32_t byte_count; /**< \brief Length of the image data, in bytes. */ } kos_img_t; /** \defgroup video_img_fmt Format diff --git a/addons/include/kos/md5.h b/addons/include/kos/md5.h index aecd5e47..63dbd31b 100644 --- a/addons/include/kos/md5.h +++ b/addons/include/kos/md5.h @@ -20,7 +20,7 @@ #include <sys/cdefs.h> __BEGIN_DECLS -#include <arch/types.h> +#include <stdint.h> /** \brief MD5 context. @@ -31,9 +31,9 @@ __BEGIN_DECLS \headerfile kos/md5.h */ typedef struct kos_md5_cxt { - uint64 size; /**< \brief Size of the data in buf. */ - uint32 hash[4]; /**< \brief Intermediate hash value. */ - uint8 buf[64]; /**< \brief Temporary storage of values to be hashed. */ + uint64_t size; /**< \brief Size of the data in buf. */ + uint32_t hash[4]; /**< \brief Intermediate hash value. */ + uint8_t buf[64]; /**< \brief Temporary storage of values to be hashed. */ } kos_md5_cxt_t; /** \brief Initialize a MD5 context. @@ -58,7 +58,7 @@ void kos_md5_start(kos_md5_cxt_t *cxt); \param input The block of data to hash. \param size The number of bytes of input data passed in. */ -void kos_md5_hash_block(kos_md5_cxt_t *cxt, const uint8 *input, uint32 size); +void kos_md5_hash_block(kos_md5_cxt_t *cxt, const uint8_t *input, uint32_t size); /** \brief Complete a MD5 hash. @@ -68,7 +68,7 @@ void kos_md5_hash_block(kos_md5_cxt_t *cxt, const uint8 *input, uint32 size); \param cxt The MD5 context to finalize. \param output Where to store the final digest. */ -void kos_md5_finish(kos_md5_cxt_t *cxt, uint8 output[16]); +void kos_md5_finish(kos_md5_cxt_t *cxt, uint8_t output[16]); /** \brief Compute the hash of a block of data with MD5. @@ -81,7 +81,7 @@ void kos_md5_finish(kos_md5_cxt_t *cxt, uint8 output[16]); \param size The number of bytes of input data passed in. \param output Where to store the final message digest. */ -void kos_md5(const uint8 *input, uint32 size, uint8 output[16]); +void kos_md5(const uint8_t *input, uint32_t size, uint8_t output[16]); __END_DECLS diff --git a/addons/include/kos/netcfg.h b/addons/include/kos/netcfg.h index 5ea10361..3597d42d 100644 --- a/addons/include/kos/netcfg.h +++ b/addons/include/kos/netcfg.h @@ -26,7 +26,7 @@ #include <sys/cdefs.h> __BEGIN_DECLS -#include <arch/types.h> +#include <stdint.h> /** \defgroup netcfg Configuration \brief KOS Network Configuration Management @@ -83,11 +83,11 @@ typedef struct netcfg { */ int method; - uint32 ip; /**< \brief IPv4 address of the console */ - uint32 gateway; /**< \brief IPv4 address of the gateway/router. */ - uint32 netmask; /**< \brief Network mask for the local net. */ - uint32 broadcast; /**< \brief Broadcast address for the local net. */ - uint32 dns[2]; /**< \brief IPv4 address of the DNS servers. */ + uint32_t ip; /**< \brief IPv4 address of the console */ + uint32_t gateway; /**< \brief IPv4 address of the gateway/router. */ + uint32_t netmask; /**< \brief Network mask for the local net. */ + uint32_t broadcast; /**< \brief Broadcast address for the local net. */ + uint32_t dns[2]; /**< \brief IPv4 address of the DNS servers. */ char hostname[64]; /**< \brief DNS/DHCP hostname. */ char email[64]; /**< \brief E-Mail address. */ char smtp[64]; /**< \brief SMTP server address. */ @@ -114,7 +114,7 @@ typedef struct netcfg { \return 0 on success, <0 on failure. */ -int netcfg_load_from(const char * fn, netcfg_t * out); +int netcfg_load_from(const char *fn, netcfg_t *out); /** \brief Load network configuration from the Dreamcast's flashrom. \ingroup netcfg @@ -129,7 +129,7 @@ int netcfg_load_from(const char * fn, netcfg_t * out); \return 0 on success, <0 on failure. */ -int netcfg_load_flash(netcfg_t * out); +int netcfg_load_flash(netcfg_t *out); /** \brief Load network configuration. \ingroup netcfg @@ -144,7 +144,7 @@ int netcfg_load_flash(netcfg_t * out); \return 0 on success, <0 on failure. */ -int netcfg_load(netcfg_t * out); +int netcfg_load(netcfg_t *out); /** \brief Save network configuration to a file. \ingroup netcfg @@ -158,7 +158,7 @@ int netcfg_load(netcfg_t * out); \return 0 on success, <0 on failure. */ -int netcfg_save_to(const char * fn, const netcfg_t * cfg); +int netcfg_save_to(const char *fn, const netcfg_t *cfg); /** \brief Save network configuration to the first available VMU. \ingroup netcfg @@ -170,7 +170,7 @@ int netcfg_save_to(const char * fn, const netcfg_t * cfg); \return 0 on success, <0 on failure. */ -int netcfg_save(const netcfg_t * cfg); +int netcfg_save(const netcfg_t *cfg); __END_DECLS diff --git a/addons/include/navi/flash.h b/addons/include/navi/flash.h index 887ef3b6..13fa2c97 100644 --- a/addons/include/navi/flash.h +++ b/addons/include/navi/flash.h @@ -19,7 +19,7 @@ #ifndef __NAVI_FLASH_H #define __NAVI_FLASH_H -#include <arch/types.h> +#include <stdint.h> /** \brief Try to detect a compatible flashrom. \return 0 if a compatible flashrom is detected, <0 if the @@ -31,7 +31,7 @@ int nvflash_detect(void); \param addr The block of the flashrom to erase. \return 0 on success, <0 on error. */ -int nvflash_erase_block(uint32 addr); +int nvflash_erase_block(uint32_t addr); /** \brief Write data to the flashrom. \param addr The block of the flashrom to write to. @@ -39,7 +39,7 @@ int nvflash_erase_block(uint32 addr); \param len The length of the data, in bytes. \return 0 on success, <0 on error. */ -int nvflash_write_block(uint32 addr, void * data, uint32 len); +int nvflash_write_block(uint32_t addr, void *data, uint32_t len); /* Erase the whole flash chip */ /** \brief Erase the whole flashrom. diff --git a/addons/include/navi/ide.h b/addons/include/navi/ide.h index 346305c0..71ef0fef 100644 --- a/addons/include/navi/ide.h +++ b/addons/include/navi/ide.h @@ -19,7 +19,7 @@ #ifndef __NAVI_IDE_H #define __NAVI_IDE_H -#include <arch/types.h> +#include <stdint.h> /** \brief Read sectors from the hard disk via PIO. \param linear The address to begin reading from. @@ -27,7 +27,7 @@ \param bufptr The buffer to read into. \return 0 on success, <0 on error. */ -int ide_read(uint32 linear, uint32 numsects, void *bufptr); +int ide_read(uint32_t linear, uint32_t numsects, void *bufptr); /** \brief Write sectors from the hard disk via PIO. \param linear The address to begin writing to. @@ -35,12 +35,12 @@ int ide_read(uint32 linear, uint32 numsects, void *bufptr); \param bufptr The buffer to write out of. \return 0 on success, <0 on error. */ -int ide_write(uint32 linear, uint32 numsects, void *bufptr); +int ide_write(uint32_t linear, uint32_t numsects, void *bufptr); /** \brief Retrieve the number of sectors from the hard disk. \returns The total number of linear sectors. */ -uint32 ide_num_sectors(void); +uint32_t ide_num_sectors(void); /** \brief Initialize Navi IDE. \return 0 on success (no error conditions defined). diff --git a/addons/libkosext2fs/fs_ext2.c b/addons/libkosext2fs/fs_ext2.c index fa407b48..e67b4ab9 100644 --- a/addons/libkosext2fs/fs_ext2.c +++ b/addons/libkosext2fs/fs_ext2.c @@ -540,7 +540,7 @@ static _off64_t fs_ext2_tell64(void *h) { return rv; } -static uint64 fs_ext2_total64(void *h) { +static uint64_t fs_ext2_total64(void *h) { file_t fd = ((file_t)h) - 1; size_t rv; diff --git a/addons/libkosfat/fs_fat.c b/addons/libkosfat/fs_fat.c index 373bc3e2..e8cf7b9b 100644 --- a/addons/libkosfat/fs_fat.c +++ b/addons/libkosfat/fs_fat.c @@ -740,7 +740,7 @@ static _off64_t fs_fat_tell64(void *h) { return rv; } -static uint64 fs_fat_total64(void *h) { +static uint64_t fs_fat_total64(void *h) { file_t fd = ((file_t)h) - 1; size_t rv; diff --git a/addons/libkosutils/md5.c b/addons/libkosutils/md5.c index 87667f28..a10d6807 100644 --- a/addons/libkosutils/md5.c +++ b/addons/libkosutils/md5.c @@ -5,18 +5,16 @@ */ #include <string.h> -#include <arch/types.h> - #include <kos/md5.h> /* Initial values used in starting the MD5 checksum */ -static const uint32 md5initial[4] = { +static const uint32_t md5initial[4] = { 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476 }; /* We will append somewhere between 1 and 64 bytes of padding to every message, depending on its length. This is the padding that is to be used. */ -static const uint8 md5padding[64] = { +static const uint8_t md5padding[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -24,7 +22,7 @@ static const uint8 md5padding[64] = { }; /* MD5 "magic" values */ -static const uint32 md5tab[64] = { +static const uint32_t md5tab[64] = { 0xD76AA478, 0xE8C7B756, 0x242070DB, 0xC1BDCEEE, 0xF57C0FAF, 0x4787C62A, 0xA8304613, 0xFD469501, 0x698098D8, 0x8B44F7AF, 0xFFFF5BB1, 0x895CD7BE, @@ -52,7 +50,7 @@ int main(int argc, char *argv[]) { int i; double tmp; - printf("static const uint32 md5tab[64] = {"); + printf("static const uint32_t md5tab[64] = {"); for(i = 0; i < 64; ++i) { if((i % 4) == 0) @@ -119,8 +117,8 @@ void kos_md5_start(kos_md5_cxt_t *cxt) { } /* input must be at least 64 bytes long */ -static void kos_md5_process(kos_md5_cxt_t *cxt, const uint8 *input) { - uint32 a, b, c, d, w[16]; +static void kos_md5_process(kos_md5_cxt_t *cxt, const uint8_t *input) { + uint32_t a, b, c, d, w[16]; int i; /* Read in what we're starting with */ @@ -214,11 +212,11 @@ static void kos_md5_process(kos_md5_cxt_t *cxt, const uint8 *input) { cxt->hash[3] += d; } -void kos_md5_hash_block(kos_md5_cxt_t *cxt, const uint8 *input, uint32 size) { - uint32 left, copy; +void kos_md5_hash_block(kos_md5_cxt_t *cxt, const uint8_t *input, uint32_t size) { + uint32_t left, copy; /* Figure out what we had left over from last time (if anything) */ - left = (uint32)((cxt->size >> 3) & 0x3F); + left = (uint32_t)((cxt->size >> 3) & 0x3F); copy = 64 - left; /* Update the size */ @@ -246,35 +244,35 @@ void kos_md5_hash_block(kos_md5_cxt_t *cxt, const uint8 *input, uint32 size) { } } -void kos_md5_finish(kos_md5_cxt_t *cxt, uint8 output[16]) { - uint64 len = cxt->size; - uint32 blen = (cxt->size >> 3) & 0x3F; - uint32 plen = MD5_PAD_LEN(blen); +void kos_md5_finish(kos_md5_cxt_t *cxt, uint8_t output[16]) { + uint64_t len = cxt->size; + uint32_t blen = (cxt->size >> 3) & 0x3F; + uint32_t plen = MD5_PAD_LEN(blen); int i; - uint8 len_bytes[8]; + uint8_t len_bytes[8]; /* Add in the padding */ kos_md5_hash_block(cxt, md5padding, plen); /* Hash in the length -- this will finish the last 64-byte block */ - len_bytes[0] = (uint8)(len); - len_bytes[1] = (uint8)(len >> 8); - len_bytes[2] = (uint8)(len >> 16); - len_bytes[3] = (uint8)(len >> 24); - len_bytes[4] = (uint8)(len >> 32); - len_bytes[5] = (uint8)(len >> 40); - len_bytes[6] = (uint8)(len >> 48); - len_bytes[7] = (uint8)(len >> 56); + len_bytes[0] = (uint8_t)(len); + len_bytes[1] = (uint8_t)(len >> 8); + len_bytes[2] = (uint8_t)(len >> 16); + len_bytes[3] = (uint8_t)(len >> 24); + len_bytes[4] = (uint8_t)(len >> 32); + len_bytes[5] = (uint8_t)(len >> 40); + len_bytes[6] = (uint8_t)(len >> 48); + len_bytes[7] = (uint8_t)(len >> 56); kos_md5_hash_block(cxt, len_bytes, 8); /* Copy out the hash, since we're done */ for(i = 0; i < 16; ++i) { - output[i] = (uint8)(cxt->hash[i >> 2] >> ((i & 0x03) << 3)); + output[i] = (uint8_t)(cxt->hash[i >> 2] >> ((i & 0x03) << 3)); } } /* Convenience function for computing an MD5 of a complete block. */ -void kos_md5(const uint8 *input, uint32 size, uint8 output[16]) { +void kos_md5(const uint8_t *input, uint32_t size, uint8_t output[16]) { kos_md5_cxt_t cxt; kos_md5_start(&cxt); diff --git a/addons/libkosutils/netcfg.c b/addons/libkosutils/netcfg.c index df38d593..e95ef307 100644 --- a/addons/libkosutils/netcfg.c +++ b/addons/libkosutils/netcfg.c @@ -25,13 +25,13 @@ void netcfg_vmuify(const char *filename_in, const char *filename_out) { int fd, pkg_size; - uint8 *buf; - uint8 *pkg_out; + uint8_t *buf; + uint8_t *pkg_out; vmu_pkg_t pkg; dbgp("Opening source file\n"); fd = fs_open(filename_in, O_RDONLY); - buf = (uint8 *) malloc(fs_total(fd)); + buf = (uint8_t *) malloc(fs_total(fd)); if(buf == NULL) return; @@ -69,7 +69,7 @@ void netcfg_vmuify(const char *filename_in, const char *filename_out) { this fails, we try reading settings from the current dir in the VFS, and then from the root of the CD. If that fails, we give up. */ -int netcfg_load_from(const char * fn, netcfg_t * out) { +int netcfg_load_from(const char *fn, netcfg_t *out) { FILE * f; char buf[64], *b; int l; @@ -189,7 +189,7 @@ int netcfg_load_from(const char * fn, netcfg_t * out) { return 0; } -int netcfg_load_flash(netcfg_t * out) { +int netcfg_load_flash(netcfg_t *out) { flashrom_ispcfg_t cfg; if(flashrom_get_ispcfg(&cfg) < 0) @@ -256,7 +256,7 @@ int netcfg_load_flash(netcfg_t * out) { return 0; } -int netcfg_load(netcfg_t * out) { +int netcfg_load(netcfg_t *out) { file_t f; dirent_t * d; char buf[64]; @@ -305,7 +305,7 @@ int netcfg_load(netcfg_t * out) { return -1; } -int netcfg_save_to(const char * fn, const netcfg_t * cfg) { +int netcfg_save_to(const char *fn, const netcfg_t *cfg) { FILE * f; char buf[256]; @@ -383,7 +383,7 @@ error: return -1; } -int netcfg_save(const netcfg_t * cfg) { +int netcfg_save(const netcfg_t *cfg) { file_t f; dirent_t * d; char buf[64]; diff --git a/addons/libkosutils/pcx_small.c b/addons/libkosutils/pcx_small.c index 0dc8faa6..e133e3d9 100644 --- a/addons/libkosutils/pcx_small.c +++ b/addons/libkosutils/pcx_small.c @@ -7,7 +7,6 @@ */ #include <stdio.h> -#include <arch/types.h> #include <kos/fs.h> #include <kos/pcx.h> @@ -17,15 +16,15 @@ typedef struct { char ver; /* encoder version number (5) */ char enc; /* encoding code, always 1 */ char bpp; /* bits per pixel, 8 in mode 0x13 */ - uint16 xmin, ymin; /* image origin, usually 0,0 */ - uint16 xmax, ymax; /* image dimensions */ - uint16 hres; /* horizontal resolution value */ - uint16 vres; /* vertical resolution value */ + uint16_t xmin, ymin; /* image origin, usually 0,0 */ + uint16_t xmax, ymax; /* image dimensions */ + uint16_t hres; /* horizontal resolution value */ + uint16_t vres; /* vertical resolution value */ char pal[48]; /* palette (not in mode 0x13) */ char reserved; /* who knows? */ char clrplanes; /* number of planes, 1 in mode 0x13 */ - uint16 bpl; /* bytes per line, 80 in mode 0x13 */ - uint16 pltype; /* Grey or Color palette flag */ + uint16_t bpl; /* bytes per line, 80 in mode 0x13 */ ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |