You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
350 B

#include <stdio.h>
#if defined(_WIN32)
# include <direct.h>
# define getcwd _getcwd
#else
# include <unistd.h>
#endif
int main(int argc, char** argv)
{
int i;
char cwd[1024];
if (getcwd(cwd, sizeof(cwd)) != NULL) {
printf("'%s'$", cwd);
}
for (i = 0; i < argc; ++i) {
printf(" '%s'", argv[i]);
}
printf("\n");
return 0;
}