add sys_printchar
This commit is contained in:
@@ -156,4 +156,6 @@ int execvp(const char *prog, char *const *args); /* calls execv */
|
||||
char *getcwd(char *buf, size_t buflen); /* calls __getcwd */
|
||||
time_t time(time_t *seconds); /* calls __time */
|
||||
|
||||
int printchar(char c);
|
||||
|
||||
#endif /* _UNISTD_H_ */
|
||||
|
||||
@@ -8,7 +8,7 @@ TOP=../..
|
||||
SUBDIRS=add argtest badcall bigexec bigfile bigfork bigseek bloat conman \
|
||||
crash ctest dirconc dirseek dirtest f_test factorial farm faulter \
|
||||
filetest forkbomb forktest frack hash hog huge \
|
||||
malloctest matmult multiexec palin parallelvm poisondisk psort \
|
||||
malloctest matmult multiexec palin parallelvm poisondisk printchartest psort \
|
||||
randcall redirect rmdirtest rmtest \
|
||||
sbrktest schedpong sort sparsefile tail tictac triplehuge \
|
||||
triplemat triplesort usemtest zero
|
||||
|
||||
11
userland/testbin/printchartest/Makefile
Normal file
11
userland/testbin/printchartest/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
# Makefile for printchartest
|
||||
|
||||
TOP=../../..
|
||||
.include "$(TOP)/mk/os161.config.mk"
|
||||
|
||||
PROG=printchartest
|
||||
SRCS=printchartest.c
|
||||
BINDIR=/testbin
|
||||
|
||||
.include "$(TOP)/mk/os161.prog.mk"
|
||||
|
||||
17
userland/testbin/printchartest/printchartest.c
Normal file
17
userland/testbin/printchartest/printchartest.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <unistd.h>
|
||||
|
||||
extern int printchar(char c);
|
||||
|
||||
int main() {
|
||||
|
||||
printchar('C');
|
||||
printchar('S');
|
||||
printchar('E');
|
||||
printchar('4');
|
||||
printchar('0');
|
||||
printchar('0');
|
||||
printchar('1');
|
||||
printchar('\n');
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user