removed unnecessary whitespace

This commit is contained in:
MonkeyGG2 2024-02-18 08:40:09 -05:00
parent 7bd63fe077
commit dea41c09d8
5 changed files with 15 additions and 15 deletions

View File

@ -1,3 +1,4 @@
#include <types.h>
#define FS_ROOT_INODE 1 #define FS_ROOT_INODE 1
#define FS_BSIZE 512 #define FS_BSIZE 512
#define FS_NDIRECT 12 #define FS_NDIRECT 12
@ -17,9 +18,9 @@ struct superblock {
u32 firstlog; u32 firstlog;
u32 firstinode; u32 firstinode;
u32 firstfreemapblock; u32 firstfreemapblock;
} };
struct dirent { struct dirent {
u16 inum; u16 inum;
s8 name[FS_DIRSIZ]; s8 name[FS_DIRSIZ];
} };

View File

@ -3,7 +3,7 @@
#include <types.h> #include <types.h>
#define VGA_SIZE 4000 #define VGA_SIZE 4000
#define VGA_TEXT_SIZE 2000 #define VGA_TEXT_SIZE 2000
s32 unused = 0; s32 unused = 0;

View File

@ -5,8 +5,7 @@ strlen(const char *str)
{ {
size_t i; size_t i;
for (i = 0; str[i] != NULL; i++) for (i = 0; str[i] != NULL; i++);
;
return i; return i;
} }

View File

@ -1,10 +1,10 @@
#include <memory.h> #include <memory.h>
void * void *
malloc(s32 size) malloc(s32 size)
{ {
s32 actual_size = size + sizeof(s32) + sizeof(void *); s32 actual_size = size + sizeof(s32) + sizeof(void *);
if (start == NULL) { if (start == NULL) {
start = (void *) START; start = (void *) START;
@ -14,9 +14,9 @@ malloc(s32 size)
start[3] = '\0'; start[3] = '\0';
SIZE(m) = size; SIZE(m) = size;
return USABLE(m); return USABLE(m);
} }
/* TODO */ /* TODO */
} }

View File

@ -9,27 +9,27 @@ vga_write(s8 *sequence, s16 size, s8 flags)
for (s16 i = 0; i <= VGA_SIZE; i++) { for (s16 i = 0; i <= VGA_SIZE; i++) {
vga_vidmem[i] = sequence[using_size + i]; vga_vidmem[i] = sequence[using_size + i];
vga_vidmem[++i] = flags; } vga_vidmem[++i] = flags; }
unused = 4001; unused = 4001;
return; return;
} }
if (size * 2 + unused >= VGA_SIZE) { if (size * 2 + unused >= VGA_SIZE) {
s16 needed_space = size * 2; s16 needed_space = size * 2;
for (s16 i = 0; i <= (unused = VGA_SIZE - needed_space); i++) { for (s16 i = 0; i <= (unused = VGA_SIZE - needed_space); i++) {
vga_vidmem[i] = vga_vidmem[needed_space + i]; vga_vidmem[i] = vga_vidmem[needed_space + i];
} }
unused--; unused--;
unused--; unused--;
} }
for (s16 i = 0; i < size; i++) { for (s16 i = 0; i < size; i++) {
vga_vidmem[unused++] = sequence[i]; vga_vidmem[unused++] = sequence[i];
vga_vidmem[unused++] = flags; vga_vidmem[unused++] = flags;
} }
} }
void void
vga_clearscreen(void) vga_clearscreen(void)