fixed
This commit is contained in:
parent
7a048f8787
commit
f8dd7660ae
143 changed files with 74 additions and 248 deletions
19
src/pwd.c
Normal file
19
src/pwd.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
|
||||
int main(void) {
|
||||
char cwd[PATH_MAX];
|
||||
|
||||
if (getcwd(cwd, sizeof(cwd)))
|
||||
puts(cwd);
|
||||
|
||||
else {
|
||||
fprintf(stderr, "pwd: %s\n", strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue