blob: ebb7d5b6d3a5cf95656147471dfbc2a71c96922c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <LibC/unistd.h>
#include <LibC/stdio.h>
int main(int c, char** v)
{
char buffer[1024];
char* ptr = getcwd(buffer, sizeof(buffer));
if (!ptr) {
printf("getcwd() failed\n");
return 1;
}
printf("%s\n", ptr);
return 0;
}
|