📄 getcwd.c
字号:
/* * Can you believe it??? Masscomps don't have a function to return the * current working directory while in the AT&T universe! */#include <stdio.h>char *getcwd(buf, size)char *buf;int size;{ FILE *pfp, *n_popen(); if (!(pfp = n_popen("pwd", "r"))) return("."); fgets(buf, size, pfp); n_pclose(pfp); /* zap the new line */ buf[strlen(buf)-1] = '\0'; return(buf);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -