Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

CodeStyle

Kolya edited this page Mar 1, 2025 · 2 revisions

BosyOS Code Style

Names

  • local variable - customer_data snake_case
  • arch global variable - vga snake_case
  • global variable - TTYCursor SYSCase
  • global function - TTYPrint SYSCase
  • local function - any
  • global struct - HeapMemBlock SYSCase

Files

  • nasm - *.s
  • c source - *.c
  • c header - *.h

General

  • 'U32 x', not 'U32 x'
  • 'if (x) {}', not 'if(x) {}'
  • '// InLine', not '/InLine/'
  • Use 4 spaces for indentation
  • Header files should start with #pragma once\n#include <lib/Types.h>
  • Code modules file name should start with 'K' and should be SYSCase, example "KMem.c"

Clone this wiki locally