⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setup.c

📁 sip 开源代码 源于novell sip 开源代码 源于novell
💻 C
字号:
#include "config.h"#include <stdio.h>#include <stdlib.h>#include "display.h"#include "setup.h"#include "sflphone.h"#define IBUFSIZE 512static char ibuf[IBUFSIZE + 1];char *read_input (const char *string) {  printf("%s", string);  return fgets(ibuf, IBUFSIZE, stdin);}#ifdef HAVE_LIBREADLINE#include <readline/readline.h>#include <readline/history.h>#else#define readline read_input#endifintsetup_first (void) {	char *text;	display_info ("Welcome to SFLphone.");	display_info ("This wizard will guide you to setup your first account.");	printf ("\n");	display_info ("Please enter your full name");	text = readline ("ie. John doe> ");	if (text != NULL) {		sflphone_set_fullname (text);		free (text);	}	display_info ("Please enter your SIP username.");	text = readline ("ie. 104> ");	if (text != NULL) {		sflphone_set_sipuser (text);		free (text);	}		display_info ("Please enter your SIP domain.");	text = readline ("ie. mycompany.net> ");	if (text != NULL) {		sflphone_set_siphost (text);		free (text);	}	display_info ("Please enter your SIP proxy address.");	text = readline ("ie. sip.mycompany.net> ");	if (text != NULL) {		sflphone_set_proxy (text);		free (text);	}	display_info ("If you wish to use STUN, enter your server address.");	text = readline ("ie. stun.mycompany.net> ");	if (text != NULL) {		if (strlen (text) > 3) {			sflphone_set_stun (text);		} else {			display_info ("Answer was too short, ignored.");		}		free (text);	}	printf ("\n");	sflphone_list_audiodevs ();	display_info ("Now choose your audio device.");	text = readline ("Number to use? ");	if (text != NULL) {		free (text);	}	display_info ("Setup done.");	return 1;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -