From 5e7bf8527ceb79e9209418befa0e0d210cb79ccc Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 22 Sep 2012 22:31:49 +0200 Subject: [PATCH] Move into kernel tree. --- sortix/ata.cpp | 2 -- sortix/com.cpp | 2 -- sortix/fs/devfs.h | 2 +- sortix/fs/initfs.h | 2 +- sortix/fs/ramfs.h | 4 +-- .../include/sortix/kernel}/sortedlist.h | 33 +++++++++---------- sortix/process.cpp | 2 +- 7 files changed, 21 insertions(+), 26 deletions(-) rename {libmaxsi/include/libmaxsi => sortix/include/sortix/kernel}/sortedlist.h (88%) diff --git a/sortix/ata.cpp b/sortix/ata.cpp index 8fec7a54..7a0c684d 100644 --- a/sortix/ata.cpp +++ b/sortix/ata.cpp @@ -33,8 +33,6 @@ // TODO: Use the PCI to detect ATA devices instead of relying on them being on // standard locations. -using namespace Maxsi; - namespace Sortix { const uint16_t PRIMARY_BUS_OFFSET = 0x1F0; diff --git a/sortix/com.cpp b/sortix/com.cpp index db4b14bf..064b9e00 100644 --- a/sortix/com.cpp +++ b/sortix/com.cpp @@ -33,8 +33,6 @@ #include "fs/devfs.h" #include "com.h" -using namespace Maxsi; - namespace Sortix { namespace COM { diff --git a/sortix/fs/devfs.h b/sortix/fs/devfs.h index e76ea433..afd2f1aa 100644 --- a/sortix/fs/devfs.h +++ b/sortix/fs/devfs.h @@ -25,7 +25,7 @@ #ifndef SORTIX_FS_DEVFS_H #define SORTIX_FS_DEVFS_H -#include +#include #include "../filesystem.h" namespace Sortix diff --git a/sortix/fs/initfs.h b/sortix/fs/initfs.h index 65b071f2..d7fcfd17 100644 --- a/sortix/fs/initfs.h +++ b/sortix/fs/initfs.h @@ -25,7 +25,7 @@ #ifndef SORTIX_FS_INITFS_H #define SORTIX_FS_INITFS_H -#include +#include #include "../filesystem.h" namespace Sortix diff --git a/sortix/fs/ramfs.h b/sortix/fs/ramfs.h index f0cc66a2..c5d715bf 100644 --- a/sortix/fs/ramfs.h +++ b/sortix/fs/ramfs.h @@ -25,7 +25,7 @@ #ifndef SORTIX_FS_RAMFS_H #define SORTIX_FS_RAMFS_H -#include +#include #include "../filesystem.h" namespace Sortix @@ -43,7 +43,7 @@ namespace Sortix virtual bool Unlink(const char* path); private: - Maxsi::SortedList* files; + SortedList* files; public: size_t GetNumFiles(); diff --git a/libmaxsi/include/libmaxsi/sortedlist.h b/sortix/include/sortix/kernel/sortedlist.h similarity index 88% rename from libmaxsi/include/libmaxsi/sortedlist.h rename to sortix/include/sortix/kernel/sortedlist.h index 7b1415b7..63815ca8 100644 --- a/libmaxsi/include/libmaxsi/sortedlist.h +++ b/sortix/include/sortix/kernel/sortedlist.h @@ -1,30 +1,30 @@ -/****************************************************************************** +/******************************************************************************* - COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011, 2012. + Copyright(C) Jonas 'Sortie' Termansen 2011, 2012. - This file is part of LibMaxsi. + This file is part of Sortix. - LibMaxsi is free software: you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. + Sortix is free software: you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation, either version 3 of the License, or (at your option) any later + version. - LibMaxsi is distributed in the hope that it will be useful, but WITHOUT ANY + Sortix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for - more details. + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. - You should have received a copy of the GNU Lesser General Public License - along with LibMaxsi. If not, see . + You should have received a copy of the GNU General Public License along with + Sortix. If not, see . sortedlist.h A container that ensures its elements are always sorted when they are accessed. It also provides binary search. -******************************************************************************/ +*******************************************************************************/ -#ifndef LIBMAXSI_SORTEDLIST_H -#define LIBMAXSI_SORTEDLIST_H +#ifndef SORTIX_SORTEDLIST_H +#define SORTIX_SORTEDLIST_H #ifndef SIZE_MAX #error Define __STDC_LIMIT_MACROS before including @@ -32,7 +32,7 @@ #include -namespace Maxsi +namespace Sortix { template class SortedList { @@ -317,4 +317,3 @@ namespace Maxsi } #endif - diff --git a/sortix/process.cpp b/sortix/process.cpp index c842aa3d..b4ff7f5d 100644 --- a/sortix/process.cpp +++ b/sortix/process.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include