1

move user stuff to user

This commit is contained in:
2022-07-11 19:29:42 +02:00
parent 996a45d7f8
commit ec084d3aca
4 changed files with 5 additions and 9 deletions

View File

@ -1,4 +1,4 @@
#include "MyStdLib.h" #include "user/MyLib.h"
void mmem::memset(char* destination, char value, unsigned int bytes) { void mmem::memset(char* destination, char value, unsigned int bytes) {
for (unsigned int byte = 0; byte < bytes; ++byte) { for (unsigned int byte = 0; byte < bytes; ++byte) {

View File

@ -1,8 +1,6 @@
#ifndef __MYSTDLIB_INCLUDE_H_ #ifndef __MYSTDLIB_INCLUDE_H_
#define __MYSTDLIB_INCLUDE_H_ #define __MYSTDLIB_INCLUDE_H_
// NOTE: I added this file
namespace mmem { namespace mmem {
template<typename T> template<typename T>
void memcpy(T* destination, T* source, unsigned int count = 1) { void memcpy(T* destination, T* source, unsigned int count = 1) {
@ -18,8 +16,8 @@ namespace mmem {
mmem::memset((char*)destination, '\0', sizeof(T)); mmem::memset((char*)destination, '\0', sizeof(T));
} }
void strcpy(char* destination, char* source); // void strcpy(char* destination, char* source);
unsigned int strlen(char* string); // unsigned int strlen(char* string);
} // namespace mmem } // namespace mmem
#endif #endif

View File

@ -1,4 +1,4 @@
#include "ScrollbackBuffer.h" #include "user/ScrollbackBuffer.h"
// NOTE: I added this file // NOTE: I added this file

View File

@ -2,12 +2,10 @@
#define __SCROLLBACKBUFFER_INCLUDE_H_ #define __SCROLLBACKBUFFER_INCLUDE_H_
#include "devices/CGA.h" #include "devices/CGA.h"
#include "lib/MyStdLib.h" #include "user/MyLib.h"
#include <memory> #include <memory>
#include <stddef.h> #include <stddef.h>
// NOTE: I added this file
class ScrollbackBuffer { class ScrollbackBuffer {
private: private:
std::unique_ptr<CGA::cga_page_t[]> buffer; // Circular buffer to store lines that left the screen std::unique_ptr<CGA::cga_page_t[]> buffer; // Circular buffer to store lines that left the screen