软件著作权-源代码范本Word格式文档下载.doc
《软件著作权-源代码范本Word格式文档下载.doc》由会员分享,可在线阅读,更多相关《软件著作权-源代码范本Word格式文档下载.doc(60页珍藏版)》请在冰豆网上搜索。
![软件著作权-源代码范本Word格式文档下载.doc](https://file1.bdocx.com/fileroot1/2022-10/16/f5aeec37-89db-4e25-b71f-df66d73d1ac0/f5aeec37-89db-4e25-b71f-df66d73d1ac01.gif)
二、源代码页眉应标注软件的名称和版本号,应当与申请表中名称完全一致,页眉右上应标注页码,源代码每页不少于50行。
范例如下:
#include<
tybs/commandline.h>
tybs/dir.h>
tybs/entropy.h>
tybs/file.h>
tybs/hash.h>
tybs/os.h>
tybs/platform.h>
tybs/resource.h>
tybs/stdio.h>
tybs/string.h>
tybs/task.h>
tybs/timer.h>
tybs/util.h>
tybscc/result.h>
dns/dispatch.h>
dns/name.h>
dns/result.h>
dns/view.h>
dst/result.h>
#defineNS_MAIN1
named/ns_smf_globals.h>
#endif
#ifdefDLZ
dlz/dlz_drivers.h>
statictybs_boolean_t want_stats=TYBS_FALSE;
staticchar program_name[TYBS_DIR_NAMEMAX]="
named"
;
staticchar absolute_conffile[TYBS_DIR_PATHMAX];
staticchar saved_command_line[512];
staticchar version[512];
staticunsignedint maxsocks=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);
NS_LOGMODULE_MAIN,TYBS_LOG_CRITICAL,
"
%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:
NS_LOGMODULE_MAIN,TYBS_LOG_ERROR,
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_cp