Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ c4 - C in four functions

An exercise in minimalism.

Try the following:
Try the following under GNU/Linux:

gcc -o c4 c4.c (you may need the -m32 option on 64bit machines)
./c4 hello.c
Expand All @@ -12,3 +12,13 @@ Try the following:
./c4 c4.c hello.c
./c4 c4.c c4.c hello.c


Try the following under Microsoft Windows/Visual Studio 2017 in the "x86 Native Tools Command Prompt for VS 2017" or "x64_x86 Cross Tools Command Prompt for VS 2017":

cl c4.c
c4 hello.c
c4 -s hello.c

c4 c4.c hello.c
c4 c4.c c4.c hello.c

2 changes: 2 additions & 0 deletions c4.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#ifndef _WIN32
#include <unistd.h>
#endif
#include <fcntl.h>

char *p, *lp, // current position in source code
Expand Down