move user stuff to user
This commit is contained in:
@ -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) {
|
||||||
@ -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
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#include "ScrollbackBuffer.h"
|
#include "user/ScrollbackBuffer.h"
|
||||||
|
|
||||||
// NOTE: I added this file
|
// NOTE: I added this 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
|
||||||
Reference in New Issue
Block a user