summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-04-03 16:47:24 -0400
committerFreya Murphy <freya@freyacat.org>2025-04-03 16:47:24 -0400
commit729f64b69ec05a4ba38feb444bbde3e8e1cf8101 (patch)
tree18ba5249d085db8eefeb1598f44c51403facad84
parentvolatile string fns (diff)
downloadcomus-729f64b69ec05a4ba38feb444bbde3e8e1cf8101.tar.gz
comus-729f64b69ec05a4ba38feb444bbde3e8e1cf8101.tar.bz2
comus-729f64b69ec05a4ba38feb444bbde3e8e1cf8101.zip
remove undeeded headers, add global lib.h header
-rw-r--r--include/lib.h6
-rw-r--r--include/offsets.h83
-rw-r--r--include/stddef.h16
-rw-r--r--include/stdint.h27
4 files changed, 6 insertions, 126 deletions
diff --git a/include/lib.h b/include/lib.h
new file mode 100644
index 0000000..7635845
--- /dev/null
+++ b/include/lib.h
@@ -0,0 +1,6 @@
+#include <ctype.h>
+#include <error.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
diff --git a/include/offsets.h b/include/offsets.h
deleted file mode 100644
index bf19776..0000000
--- a/include/offsets.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
-** @file offsets.h
-**
-** GENERATED AUTOMATICALLY - DO NOT EDIT
-**
-** This header file contains C Preprocessor macros which expand
-** into the byte offsets needed to reach fields within structs
-** used in the baseline system. Should those struct declarations
-** change, the Offsets program should be modified (if needed),
-** recompiled, and re-run to recreate this file.
-*/
-
-#ifndef OFFSETS_H_
-#define OFFSETS_H_
-
-// Sizes of basic types
-
-#define SZ_char 1
-#define SZ_short 2
-#define SZ_int 4
-#define SZ_long 4
-#define SZ_long_long 8
-#define SZ_pointer 4
-
-// Sizes of our types
-
-#define SZ_int8_t 1
-#define SZ_uint8_t 1
-#define SZ_int16_t 2
-#define SZ_uint16_t 2
-#define SZ_int32_t 4
-#define SZ_uint32_t 4
-#define SZ_int64_t 8
-#define SZ_uint64_t 8
-#define SZ_bool_t 1
-
-// context_t structure
-
-#define SZ_CTX 72
-
-#define CTX_ss 0
-#define CTX_gs 4
-#define CTX_fs 8
-#define CTX_es 12
-#define CTX_ds 16
-#define CTX_edi 20
-#define CTX_esi 24
-#define CTX_ebp 28
-#define CTX_esp 32
-#define CTX_ebx 36
-#define CTX_edx 40
-#define CTX_ecx 44
-#define CTX_eax 48
-#define CTX_vector 52
-#define CTX_code 56
-#define CTX_eip 60
-#define CTX_cs 64
-#define CTX_eflags 68
-
-// section_t structure
-
-#define SZ_SCT 8
-
-#define SCT_length 0
-#define SCT_addr 4
-
-// pcb_t structure
-
-#define SZ_PCB 72
-
-#define PCB_context 0
-#define PCB_pdir 4
-#define PCB_sects 8
-#define PCB_next 40
-#define PCB_parent 44
-#define PCB_wakeup 48
-#define PCB_exit_status 52
-#define PCB_pid 56
-#define PCB_state 60
-#define PCB_priority 64
-#define PCB_ticks 68
-
-#endif
diff --git a/include/stddef.h b/include/stddef.h
deleted file mode 100644
index 2814c8d..0000000
--- a/include/stddef.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * @file stddef.h
- * @author Freya Murphy <freya@freyacat.org>
- *
- * Basic type definitions.
- */
-
-#ifndef _STDDEF_H
-#define _STDDEF_H
-
-typedef int size_t;
-typedef unsigned int usize_t;
-
-#define NULL ((void *)0)
-
-#endif /* stddef.h */
diff --git a/include/stdint.h b/include/stdint.h
deleted file mode 100644
index 25c442d..0000000
--- a/include/stdint.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * @file stdint.h
- * @author Freya Murphy <freya@freyacat.org>
- * @author Warren R. Carithers
- *
- * Integer definitions.
- */
-
-#ifndef _STDINT_H
-#define _STDINT_H
-
-// standard integer sized types
-typedef char int8_t;
-typedef unsigned char uint8_t;
-typedef short int16_t;
-typedef unsigned short uint16_t;
-typedef int int32_t;
-typedef unsigned int uint32_t;
-typedef long long int int64_t;
-typedef unsigned long long int uint64_t;
-
-// other integer types
-typedef unsigned char uchar_t;
-typedef unsigned int uint_t;
-typedef unsigned long int ulong_t;
-
-#endif /* stdint.h */