コード例 #1
0
ファイル: WhatsApp.c プロジェクト: Dani1901/TP-1
int Menu(){
	printf("\033[0m                Menú principal                  \n Opciones:\n 1)ENVIAR MENSAJES\n 2)LISTA DE AMIGOS \n 3)AGREGAR AMIGOS \n Digite 0 para salir del programa\n");
	int salir=0;
	int opcion;
	while(salir==0){
		opcion=-1;
		fflush(stdin);
		scanf("%d",&opcion);
			
		if (opcion==1){
			system("clear");  // Se llama a la función sockets para crear la comunicación entre los nodos
			sockets();
			Menu();}
		else if (opcion==2){
			system("clear");
			muestra();        // Se llama a la función mostrar para desplegar la lista de contactos que se posee
			Menu();}
		else if (opcion==3){
			system("clear");
			Escribir();      // En esta opción permite al usuario agregar amigos
			Menu();}
		else exit(0);
		}
	return 0;
}
コード例 #2
0
void create ()
{
  set ("short", "LPC 说明之 简介 -- driver");
  set("long", @LONG

This is the C program which is the game.  It accepts incoming sockets
(links to other computers), 解释由 mudlib 定义的 LPC 程式, mud 中的物
件保持在记忆体中. 周期性的清掉记忆体中没用的物件等等事情.
LONG);

  set("exits", ([
	"back"	: __DIR__"doc",
  ]) );
  setup();
}