计算机软件著作权登记源代码范本Word文件下载.docx
- 文档编号:22981260
- 上传时间:2023-02-06
- 格式:DOCX
- 页数:119
- 大小:43.90KB
计算机软件著作权登记源代码范本Word文件下载.docx
《计算机软件著作权登记源代码范本Word文件下载.docx》由会员分享,可在线阅读,更多相关《计算机软件著作权登记源代码范本Word文件下载.docx(119页珍藏版)》请在冰豆网上搜索。
#ifdefDLZ
dlz/dlz_drivers.h>
statictybs_boolean_twant_stats=TYBS_FALSE;
staticcharprogram_name[TYBS_DIR_NAMEMAX]="
named"
;
staticcharabsolute_conf];
staticcharsaved_command_line[512];
staticcharversion[512];
staticunsignedintmaxsocks=0;
void
ns_main_earlywarning(constchar*format,...){
va_listargs;
va_start(args,format);
if(ns_g_lctx!
=NULL){
tybs_log_vwrite(ns_g_lctx,NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_MAIN,TYBS_LOG_WARNING,
format,args);
}else{
fprintf(stderr,"
%s:
"
program_name);
vfprintf(stderr,format,args);
\n"
);
fflush(stderr);
}
va_end(args);
}
Voidns_main_earlyfatal(constchar*format,...){
NS_LOGMODULE_MAIN,TYBS_LOG_CRITICAL,
tybs_log_write(ns_g_lctx,NS_LOGCATEGORY_GENERAL,
"
exiting(duetoearlyfatalerror)"
exit
(1);
staticvoid
assertion_failed(constchar*file,intline,tybs_assertiontype_ttype,
constchar*cond)
{
tybs_assertion_setcallback(NULL);
%d:
%s(%s)failed"
file,line,
tybs_assertion_typetotext(type),cond);
exiting(duetoassertionfailure)"
%s(%s)failed\n"
file,line,tybs_assertion_typetotext(type),cond);
if(ns_g_coreok)
abort();
library_fatal_error(constchar*file,intline,constchar*format,
va_listargs)TYBS_FORMAT_PRINTF(3,0);
va_listargs)
tybs_error_setfatal(NULL);
fatalerror:
"
file,line);
exiting(duetofatalerrorinlibrary)"
library_unexpected_error(constchar*file,intline,constchar*format,
va_listargs)TYBS_FORMAT_PRINTF(3,0);
va_listargs)
NS_LOGMODULE_MAIN,TYBS_LOG_ERROR,
unexpectederror:
lwresd_usage(void){
fprintf(stderr,
"
usage:
lwresd[-4|-6][-cconffile|-Cresolvconffile]"
[-ddebuglevel]\n"
[-f|-g][-nnumber_of_cpus][-pport]"
[-Plisten-port][-s]\n"
[-tchrootdir][-uusername][-ipidfile]\n"
[-m{usage|trace|record|size|mctx}]\n"
usage(void){
if(ns_g_lwresdonly){
lwresd_usage();
return;
named[-4|-6][-cconffile][-ddebuglevel]"
[-f|-g][-nnumber_of_cpus]\n"
[-pport][-s][-tchrootdir][-uusername]\n"
save_command_line(intargc,char*argv[]){
inti;
char*src;
char*dst;
char*eob;
constchartruncated[]="
..."
tybs_boolean_tquoted=TYBS_FALSE;
dst=saved_command_line;
eob=saved_command_line+sizeof(saved_command_line);
for(i=1;
i<
argc&
&
dst<
eob;
i++){
*dst++='
'
src=argv[i];
while(*src!
='
\0'
&
eob){
if(quoted||isalnum(*src&
0xff)||
*src=='
-'
||*src=='
_'
||
.'
/'
){
*dst++=*src++;
quoted=TYBS_FALSE;
}else{
*dst++='
\\'
quoted=TYBS_TRUE;
}
}
INSIST(sizeof(saved_command_line)>
=sizeof(truncated));
if(dst==eob)
strcpy(eob-sizeof(truncated),truncated);
else
*dst='
staticint
parse_int(char*arg,constchar*desc){
char*endp;
inttmp;
longintltmp;
ltmp=strtol(arg,&
endp,10);
tmp=(int)ltmp;
if(*endp!
)
ns_main_earlyfatal("
%s'
%s'
mustbenumeric"
desc,arg);
if(tmp<
0||tmp!
=ltmp)
outofrange"
return(tmp);
staticstructflag_def{
constchar*name;
unsignedintvalue;
}mem_debug_flags[]={
{"
trace"
TYBS_MEM_DEBUGTRACE},
record"
TYBS_MEM_DEBUGRECORD},
usage"
TYBS_MEM_DEBUGUSAGE},
size"
TYBS_MEM_DEBUGSIZE},
mctx"
TYBS_MEM_DEBUGCTX},
{NULL,0}
};
set_flags(constchar*arg,structflag_def*defs,unsignedint*ret){
for(;
conststructflag_def*def;
constchar*end=strchr(arg,'
'
intarglen;
if(end==NULL)
end=arg+strlen(arg);
arglen=end-arg;
for(def=defs;
def->
name!
=NULL;
def++){
if(arglen==(int)strlen(def->
name)&
memcmp(arg,def->
name,arglen)==0){
*ret|=def->
value;
gotofound;
unrecognizedflag'
%.*s'
arglen,arg);
found:
if(*end=='
break;
arg=end+1;
parse_command_line(intargc,char*argv[]){
intch;
intport;
tybs_boolean_tdisable6=TYBS_FALSE;
tybs_boolean_tdisable4=TYBS_FALSE;
save_command_line(argc,argv);
tybs_commandline_errprint=TYBS_FALSE;
while((ch=tybs_commandline_parse(argc,argv,
"
46c:
C:
d:
fgi:
lm:
n:
N:
p:
P:
sS:
t:
T:
u:
vVx:
))!
=-1){
switch(ch){
case'
4'
:
if(disable4)
ns_main_earlyfatal("
cannotspecify-4and-6"
if(tybs_net_probeipv4()!
=TYBS_R_SUCCESS)
IPv4notsupportedbyOS"
tybs_net_disableipv6();
disable6=TYBS_TRUE;
6'
if(disable6)
if(tybs_net_probeipv6()!
IPv6notsupportedbyOS"
tybs_net_disableipv4();
disable4=TYBS_TRUE;
c'
ns_g_conffile=tybs_commandline_argument;
lwresd_g_conffile=tybs_commandline_argument;
if(lwresd_g_useresolvconf)
cannotspecify-cand-C"
ns_g_conf=TYBS_TRUE;
C'
lwresd_g_resolvconffile=tybs_commandline_argument;
if(ns_g_conf)
lwresd_g_useresolvconf=TYBS_TRUE;
d'
ns_g_debuglevel=parse_int(tybs_commandline_argument,
"
debuglevel"
f'
ns_g_foreground=TYBS_TRUE;
g'
ns_g_logstderr=TYBS_TRUE;
/*XXXBEW-ishouldberemoved*/
i'
lwresd_g_defaultpidfile=tybs_commandline_argument;
l'
ns_g_lwresdonly=TYBS_TRUE;
m'
set_flags(tybs_commandline_argument,mem_debug_flags,
&
tybs_mem_debugging);
N'
/*Deprecated.*/
n'
ns_g_cpus=parse_int(tybs_commandline_argument,
numberofcpus"
if(ns_g_cpus==0)
ns_g_cpus=1;
p'
port=parse_int(tybs_commandline_argument,"
port"
if(port<
1||port>
65535)
port'
tybs_commandline_argument);
ns_g_port=port;
/*XXXBEWShould-Pberemoved?
*/
P'
lwresd_g_listenport=port;
s'
want_stats=TYBS_TRUE;
S'
maxsocks=parse_int(tybs_commandline_argument,
maxnumberofsockets"
t'
ns_g_chrootdir=tybs_commandline_argument;
T'
if(strcmp(tybs_commandline_argument,"
clienttest"
)==0)
ns_g_clienttest=TYBS_TRUE;
else
fprintf(stderr,"
unknown-Tflag'
%s\n"
tybs_commandline_argument);
u'
ns_g_username=tybs_commandline_argument;
v'
printf("
BIND%s\n"
ns_g_version);
exit(0);
V'
BIND%sbuiltwith%s\n"
ns_g_version,
ns_g_configar
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 计算机软件 著作权 登记 源代码 范本