int main(void)
{
//printf("%d\n", getpid());
//printf("%s\n", getprogname());//获取程序的名字。(包括路径)。
//printf("%d\n", getpt());//在stdlib.h中。
//setlocale(LC_ALL, "C");//这样就只能处理英文(no,不是这样。而是说,这是c语言默认设置。即便,没有这个语句,c程序也会自动这样设置)。不能处理其他国家字符。这个"C"是C语言的默认设置。
//uselocale("C");
/*char * a = setlocale(LC_ALL, NULL);
printf("The proram Locale Set: %s\n", a);*/
//上面2行查看当前操作系统使用的编码环境。
//uselocale("");
start_my_vim:;
const char *version = "About:\nProgram name: My_vim \tCreate date: 2022/11/21\n Version: 1.2022.11.21 \tCreator: Bit\n Email of Bit: bitcompony@qq.com\nMain version nos: 1\n\n";
printf(version);
const char * warner = "Warning: This program only supporting English. Not support other language. If you use other language, then you will regret it.\n\n";
printf(warner);
printf("Choice from menu:\n");
printf("\t1: write file; (ESC Key exit)\t\t2: edit file; (ESC Key exit)\n\t3: Set font; (ESC Key exit)\t\t4: shutdown program;\n\nYou need one choose from menu. You must input 1~3. And press Enter key. Your select is:\n");
switch(decide())
{
case 1:
write_file();
break;
case 2:
edit_file();
break;
case 3:
printf("\n\n");
set_font();
break;
case 4:
shutdown_program();
break;
default:
break;
/*About this "break" string. Can not write form technical face. But in order to symmetry and pleasing to the eye. Can write too.*/
}
goto start_my_vim;
return 0;
}
{
//printf("%d\n", getpid());
//printf("%s\n", getprogname());//获取程序的名字。(包括路径)。
//printf("%d\n", getpt());//在stdlib.h中。
//setlocale(LC_ALL, "C");//这样就只能处理英文(no,不是这样。而是说,这是c语言默认设置。即便,没有这个语句,c程序也会自动这样设置)。不能处理其他国家字符。这个"C"是C语言的默认设置。
//uselocale("C");
/*char * a = setlocale(LC_ALL, NULL);
printf("The proram Locale Set: %s\n", a);*/
//上面2行查看当前操作系统使用的编码环境。
//uselocale("");
start_my_vim:;
const char *version = "About:\nProgram name: My_vim \tCreate date: 2022/11/21\n Version: 1.2022.11.21 \tCreator: Bit\n Email of Bit: bitcompony@qq.com\nMain version nos: 1\n\n";
printf(version);
const char * warner = "Warning: This program only supporting English. Not support other language. If you use other language, then you will regret it.\n\n";
printf(warner);
printf("Choice from menu:\n");
printf("\t1: write file; (ESC Key exit)\t\t2: edit file; (ESC Key exit)\n\t3: Set font; (ESC Key exit)\t\t4: shutdown program;\n\nYou need one choose from menu. You must input 1~3. And press Enter key. Your select is:\n");
switch(decide())
{
case 1:
write_file();
break;
case 2:
edit_file();
break;
case 3:
printf("\n\n");
set_font();
break;
case 4:
shutdown_program();
break;
default:
break;
/*About this "break" string. Can not write form technical face. But in order to symmetry and pleasing to the eye. Can write too.*/
}
goto start_my_vim;
return 0;
}
