This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "u.h" | |
#include "arena.h" | |
#include "ll.h" | |
#include <stdio.h> | |
void print_floats(struct ll *ll) | |
{ | |
static int printnum; | |
struct ll_node *n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some things that I did when half-reading https://blinry.org/tiny-linux/ | |
Some other commands used: | |
git clone --depth=1 --branch=v6.12 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git | |
make tinyconfig | |
make menuconfig | |
make -j4 | |
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c | |
index 96842ce81..8f0ab7094 100644 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec qemu-system-x86_64 \ | |
-name "Windows 7" \ | |
-enable-kvm \ | |
-cpu host \ | |
-smp 2 \ | |
-m 1G \ | |
-hda windows7.qcow2 \ | |
-vga std \ | |
-nic none `# disables network` \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C operator precedence (RL is right-to-left associativity instead of LR) | |
+------------+---------------------------------------+ | |
| precedence | operator | | |
+------------+---------------------------------------+ | |
| 1 | x++ x-- x() x[] . -> (type){list} | | |
| 2 (RL) | ++x --x +x -x ! ~ (type) *x &x sizeof | | |
| 3 | * / % | | |
| 4 | + - | | |
| 5 | << >> | | |
| 6 | < <= > >= | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Build script. | |
@echo off | |
setlocal | |
set VSLANG=1033 | |
set flags=/nologo /std:c++14 /Zi /W4 /wd4100 | |
if not exist win32_precomp.pch ( | |
cl %flags% /Yc"win32_precomp.hpp" /c win32_precomp.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; Config for GNU Emacs >= 29.4 | |
;; | |
(if (fboundp 'menu-bar-mode) | |
(menu-bar-mode -1)) | |
(if (fboundp 'tool-bar-mode) | |
(tool-bar-mode -1)) | |
(if (fboundp 'scroll-bar-mode) | |
(scroll-bar-mode -1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
int main(int argc, char **argv) { | |
if (argc != 2) return 1; | |
FILE *fp; | |
struct stat fs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// don't look at this mess | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define OP_NEG '~' | |
#define OP_CONJ '^' | |
#define OP_DISJ 'v' | |
#define OP_COND '>' |