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) {
for (unsigned int byte = 0; byte < bytes; ++byte) {

View File

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

View File

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

View File

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