Add further clarity to example package

This commit is contained in:
Justine Tunney 2020-06-18 16:14:47 -07:00
parent d2b20422c8
commit a2c2d14100
6 changed files with 40 additions and 14 deletions

View file

@ -1,10 +1,19 @@
#include "examples/package/lib/myprint.h"
#include "libc/stdio/stdio.h"
/**
* Calls MyPrint2() indirected via assembly function.
*/
void MyPrint(const char *s) {
MyAsm(s);
}
/**
* Prints string to output.
*
* @param s is null-terminated c string usually having \n
* @see printf() which has domain-specific language
*/
void MyPrint2(const char *s) {
fputs(s, stdout);
}