diff --git a/include/libmes.h b/include/libmes.h index 4d2c3d5e..7f01c9fa 100644 --- a/include/libmes.h +++ b/include/libmes.h @@ -36,5 +36,6 @@ int fdungetc (int c, int fd); int isdigit (int c); int isspace (int c); int isxdigit (int c); +int oputs (char const* s); #endif //__MES_LIBMES_H diff --git a/include/sys/stat.h b/include/sys/stat.h index 782201f1..e934c95f 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -60,10 +60,12 @@ int mkdir (char const *file_name, mode_t mode); int chown (char const *file_name, uid_t owner, gid_t group); int rmdir (char const *file_name); -#define S_IFMT 0170000 +#define S_IFCHR 0020000 #define S_IFDIR 0040000 +#define S_IFBLK 0060000 #define S_IFREG 0100000 #define S_IFLNK 0120000 +#define S_IFMT 0170000 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) diff --git a/lib/libc-mini.c b/lib/libc-mini.c index 4eb165b1..16ac449e 100644 --- a/lib/libc-mini.c +++ b/lib/libc-mini.c @@ -49,13 +49,20 @@ eputs (char const* s) } int -puts (char const* s) +oputs (char const* s) { int i = strlen (s); write (1, s, i); return 0; } +int +puts (char const* s) +{ + oputs (s); + return oputs ("\n"); +} + #if __MESC__ #include