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
################################################################### | |
Writing C software without the standard library | |
Linux Edition | |
################################################################### | |
There are many tutorials on the web that explain how to build a | |
simple hello world in C without the libc on AMD64, but most of them | |
stop there. | |
I will provide a more complete explanation that will allow you to | |
build yourself a little framework to write more complex programs. |
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
Show hidden characters
{ | |
"Add include guard": { | |
"prefix": "guard", | |
"description": "Adds an ifndef include guard to a C header", | |
"body": [ | |
"#ifndef __${TM_FILENAME/^([^\\.]*)\\..*$/${1:/upcase}/}_${TM_FILENAME/^.*\\.([^\\.]*)$/${1:/upcase}/}__", | |
"#define __${TM_FILENAME/^([^\\.]*)\\..*$/${1:/upcase}/}_${TM_FILENAME/^.*\\.([^\\.]*)$/${1:/upcase}/}__", | |
"", | |
"$0", | |
"", |