ImageVerifierCode 换一换
格式:DOC , 页数:60 ,大小:285KB ,
资源ID:2248537      下载积分:150 文钱
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,省得不是一点点
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.wenke99.com/d-2248537.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: QQ登录   微博登录 

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(计算机软件著作权登记-源代码范本.doc)为本站会员(11****ws)主动上传,文客久久仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知文客久久(发送邮件至hr@wenke99.com或直接QQ联系客服),我们立即给予删除!

计算机软件著作权登记-源代码范本.doc

1、天一博胜企业管理软件 V1.0 源代码 1计算机软件著作权登记-源代码范本注意事项:常见的源代码包含:C 语言,VB,C+,JAVA,.NET 等。 提交的代码必须是源代码的开头载入程序,第 30 页必须断开,第 60 页是软件的程序结尾,代码中不得出现与申请表内容不符合的日期,著作权人,软件名字等,不能出现开源代码,不能出现任何版权纠纷。格式要求:一、源代码应提交前、后各连续 30 页,不足 60 页的,应当全部提交。二、源代码页眉应标注软件的名称和版本号,应当与申请表中名称完全一致,页眉右上应标注页码,源代码每页不少于 50 行。范例如下:#include #include #includ

2、e #include #include #include #include #include #include #include #include 天一博胜企业管理软件 V1.0 源代码 2#include #include #include #include #include #include #include #include #define NS_MAIN 1#include #endif#ifdef DLZ#include #endifstatic tybs_boolean_t want_stats = TYBS_FALSE;static char program_nameTYBS_D

3、IR_NAMEMAX = “named“;static char absolute_conffileTYBS_DIR_PATHMAX;static char saved_command_line512;static char version512;static unsigned int maxsocks = 0;voidns_main_earlywarning(const char *format, .) va_list args;va_start(args, format);if (ns_g_lctx != NULL) tybs_log_vwrite(ns_g_lctx, NS_LOGCAT

4、EGORY_GENERAL,NS_LOGMODULE_MAIN, TYBS_LOG_WARNING,format, args); else fprintf(stderr, “%s: “, program_name);vfprintf(stderr, format, args);fprintf(stderr, “n“);fflush(stderr);va_end(args);Void ns_main_earlyfatal(const char *format, .) va_list args;va_start(args, format);if (ns_g_lctx != NULL) tybs_l

5、og_vwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_MAIN, TYBS_LOG_CRITICAL,format, args);tybs_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_MAIN, TYBS_LOG_CRITICAL,“exiting (due to early fatal error)“); else fprintf(stderr, “%s: “, program_name);vfprintf(stderr, format, args);fprint

6、f(stderr, “n“);fflush(stderr);天一博胜企业管理软件 V1.0 源代码 3va_end(args);exit(1);static voidassertion_failed(const char *file, int line, tybs_assertiontype_t type,const char *cond)if (ns_g_lctx != NULL) tybs_assertion_setcallback(NULL);tybs_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_MAIN, TYBS_

7、LOG_CRITICAL,“%s:%d: %s(%s) failed“, file, line,tybs_assertion_typetotext(type), cond);tybs_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_MAIN, TYBS_LOG_CRITICAL,“exiting (due to assertion failure)“); else fprintf(stderr, “%s:%d: %s(%s) failedn“,file, line, tybs_assertion_typetotext(type)

8、, cond);fflush(stderr);if (ns_g_coreok)abort();exit(1);static voidlibrary_fatal_error(const char *file, int line, const char *format,va_list args) TYBS_FORMAT_PRINTF(3, 0);static voidlibrary_fatal_error(const char *file, int line, const char *format,va_list args)if (ns_g_lctx != NULL) tybs_error_set

9、fatal(NULL);tybs_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_MAIN, TYBS_LOG_CRITICAL,“%s:%d: fatal error:“, file, line);tybs_log_vwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_MAIN, TYBS_LOG_CRITICAL,format, args);tybs_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_MAIN

10、, TYBS_LOG_CRITICAL,“exiting (due to fatal error in library)“); else fprintf(stderr, “%s:%d: fatal error: “, file, line);vfprintf(stderr, format, args);fprintf(stderr, “n“);fflush(stderr);if (ns_g_coreok)abort();exit(1);天一博胜企业管理软件 V1.0 源代码 4static voidlibrary_unexpected_error(const char *file, int l

11、ine, const char *format,va_list args) TYBS_FORMAT_PRINTF(3, 0);static voidlibrary_unexpected_error(const char *file, int line, const char *format,va_list args)if (ns_g_lctx != NULL) tybs_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_MAIN, TYBS_LOG_ERROR,“%s:%d: unexpected error:“, file, l

12、ine);tybs_log_vwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_MAIN, TYBS_LOG_ERROR,format, args); else fprintf(stderr, “%s:%d: fatal error: “, file, line);vfprintf(stderr, format, args);fprintf(stderr, “n“);fflush(stderr);static voidlwresd_usage(void) fprintf(stderr,“usage: lwresd -4|-6 -c con

13、ffile | -C resolvconffile “-d debugleveln“ -f|-g -n number_of_cpus -p port “-P listen-port -sn“ -t chrootdir -u username -i pidfilen“ -m usage|trace|record|size|mctxn“);static voidusage(void) if (ns_g_lwresdonly) lwresd_usage();return;fprintf(stderr,“usage: named -4|-6 -c conffile -d debuglevel “-f|

14、-g -n number_of_cpusn“ -p port -s -t chrootdir -u usernamen“ -m usage|trace|record|size|mctxn“);static voidsave_command_line(int argc, char *argv) int i;char *src;char *dst;char *eob;const char truncated = “.“;tybs_boolean_t quoted = TYBS_FALSE;天一博胜企业管理软件 V1.0 源代码 5dst = saved_command_line;eob = sav

15、ed_command_line + sizeof(saved_command_line);for (i = 1; i = sizeof(truncated);if (dst = eob)strcpy(eob - sizeof(truncated), truncated);else*dst = 0;static intparse_int(char *arg, const char *desc) char *endp;int tmp;long int ltmp;ltmp = strtol(arg, tmp = (int) ltmp;if (*endp != 0)ns_main_earlyfatal

16、(“%s %s must be numeric“, desc, arg);if (tmp name != NULL; def+) if (arglen = (int)strlen(def-name) goto found;ns_main_earlyfatal(“unrecognized flag %.*s“, arglen, arg);found:if (*end = 0)break;arg = end + 1;static voidparse_command_line(int argc, char *argv) int ch;int port;tybs_boolean_t disable6

17、= TYBS_FALSE;tybs_boolean_t disable4 = 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(“cannot specify -4 and -6“);if (tybs

18、_net_probeipv4() != TYBS_R_SUCCESS)ns_main_earlyfatal(“IPv4 not supported by OS“);tybs_net_disableipv6();disable6 = TYBS_TRUE;break;case 6:if (disable6)ns_main_earlyfatal(“cannot specify -4 and -6“);if (tybs_net_probeipv6() != TYBS_R_SUCCESS)ns_main_earlyfatal(“IPv6 not supported by OS“);tybs_net_di

19、sableipv4();disable4 = TYBS_TRUE;break;case c:ns_g_conffile = tybs_commandline_argument;lwresd_g_conffile = tybs_commandline_argument;if (lwresd_g_useresolvconf)ns_main_earlyfatal(“cannot specify -c and -C“);ns_g_conffileset = TYBS_TRUE;天一博胜企业管理软件 V1.0 源代码 7break;case C:lwresd_g_resolvconffile = tyb

20、s_commandline_argument;if (ns_g_conffileset)ns_main_earlyfatal(“cannot specify -c and -C“);lwresd_g_useresolvconf = TYBS_TRUE;break;case d:ns_g_debuglevel = parse_int(tybs_commandline_argument,“debug level“);break;case f:ns_g_foreground = TYBS_TRUE;break;case g:ns_g_foreground = TYBS_TRUE;ns_g_logst

21、derr = TYBS_TRUE;break;/* XXXBEW -i should be removed */case i:lwresd_g_defaultpidfile = tybs_commandline_argument;break;case l:ns_g_lwresdonly = TYBS_TRUE;break;case m:set_flags(tybs_commandline_argument, mem_debug_flags,break;case N: /* Deprecated. */case n:ns_g_cpus = parse_int(tybs_commandline_a

22、rgument,“number of cpus“);if (ns_g_cpus = 0)ns_g_cpus = 1;break;case p:port = parse_int(tybs_commandline_argument, “port“);if (port 65535)ns_main_earlyfatal(“port %s out of range“,tybs_commandline_argument);ns_g_port = port;break;/* XXXBEW Should -P be removed? */case P:port = parse_int(tybs_command

23、line_argument, “port“);if (port 65535)ns_main_earlyfatal(“port %s out of range“,tybs_commandline_argument);lwresd_g_listenport = port;break;case s:天一博胜企业管理软件 V1.0 源代码 8want_stats = TYBS_TRUE;break;case S:maxsocks = parse_int(tybs_commandline_argument,“max number of sockets“);break;case t:ns_g_chroot

24、dir = tybs_commandline_argument;break;case T:if (strcmp(tybs_commandline_argument, “clienttest“) = 0)ns_g_clienttest = TYBS_TRUE;elsefprintf(stderr, “unknown -T flag %sn“,tybs_commandline_argument);break;case u:ns_g_username = tybs_commandline_argument;break;case v:printf(“BIND %sn“, ns_g_version);e

25、xit(0);case V:printf(“BIND %s built with %sn“, ns_g_version,ns_g_configargs);exit(0);case ?:usage();if (tybs_commandline_option = ?)exit(0);ns_main_earlyfatal(“unknown option -%c“,tybs_commandline_option);default:ns_main_earlyfatal(“parsing options returned %d“, ch);argc -= tybs_commandline_index;ar

26、gv += tybs_commandline_index;if (argc 0) usage();ns_main_earlyfatal(“extra command line arguments“);static tybs_result_tcreate_managers(void) tybs_result_t result;unsigned int socks;#ifdef TYBS_PLATFORM_USETHREADSunsigned int cpus_detected;#endif#ifdef TYBS_PLATFORM_USETHREADScpus_detected = tybs_os

27、_ncpus();天一博胜企业管理软件 V1.0 源代码 9if (ns_g_cpus = 0)ns_g_cpus = cpus_detected;tybs_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,TYBS_LOG_INFO, “found %u CPU%s, using %u worker thread%s“,cpus_detected, cpus_detected = 1 ? “ : “s“,ns_g_cpus, ns_g_cpus = 1 ? “ : “s“);#elsens_g_cpus = 1;

28、#endifresult = tybs_taskmgr_create(ns_g_mctx, ns_g_cpus, 0, if (result != TYBS_R_SUCCESS) UNEXPECTED_ERROR(_FILE_, _LINE_,“tybs_taskmgr_create() failed: %s“,tybs_result_totext(result);return (TYBS_R_UNEXPECTED);result = tybs_timermgr_create(ns_g_mctx, if (result != TYBS_R_SUCCESS) UNEXPECTED_ERROR(_

29、FILE_, _LINE_,“tybs_timermgr_create() failed: %s“,tybs_result_totext(result);return (TYBS_R_UNEXPECTED);result = tybs_socketmgr_create2(ns_g_mctx, if (result != TYBS_R_SUCCESS) UNEXPECTED_ERROR(_FILE_, _LINE_,“tybs_socketmgr_create() failed: %s“,tybs_result_totext(result);return (TYBS_R_UNEXPECTED);

30、result = tybs_socketmgr_getmaxsockets(ns_g_socketmgr, if (result = TYBS_R_SUCCESS) tybs_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,NS_LOGMODULE_SERVER,TYBS_LOG_INFO, “using up to %u sockets“, socks);result = tybs_entropy_create(ns_g_mctx, if (result != TYBS_R_SUCCESS) UNEXPECTED_ERROR(_FILE_, _LINE

31、_,“tybs_entropy_create() failed: %s“,tybs_result_totext(result);return (TYBS_R_UNEXPECTED);result = tybs_hash_create(ns_g_mctx, ns_g_entropy, DNS_NAME_MAXWIRE);if (result != TYBS_R_SUCCESS) UNEXPECTED_ERROR(_FILE_, _LINE_,“tybs_hash_create() failed: %s“,tybs_result_totext(result);return (TYBS_R_UNEX

32、PECTED);return (TYBS_R_SUCCESS);天一博胜企业管理软件 V1.0 源代码 10static voiddestroy_managers(void) ns_lwresd_shutdown();tybs_entropy_detach(if (ns_g_fallbackentropy != NULL)tybs_entropy_detach(tybs_taskmgr_destroy(tybs_timermgr_destroy(tybs_socketmgr_destroy(tybs_hash_destroy();static voidsetup(void) tybs_resu

33、lt_t result;#ifdef HAVE_LIBSCFchar *instance = NULL;#endifns_os_inituserinfo(ns_g_username);ns_os_tzset();ns_os_opendevnull();#ifdef HAVE_LIBSCFresult = ns_smf_get_instance(if (result = TYBS_R_SUCCESS)ns_smf_got_instance = 1;elsens_smf_got_instance = 0;if (instance != NULL)tybs_mem_free(ns_g_mctx, i

34、nstance);#endif /* HAVE_LIBSCF */#ifdef PATH_RANDOMDEVif (ns_g_chrootdir != NULL) result = tybs_entropy_create(ns_g_mctx, if (result != TYBS_R_SUCCESS)ns_main_earlyfatal(“tybs_entropy_create() failed: %s“,tybs_result_totext(result);result = tybs_entropy_createfilesource(ns_g_fallbackentropy,PATH_RAN

35、DOMDEV);if (result != TYBS_R_SUCCESS) ns_main_earlywarning(“could not open pre-chroot “entropy source %s: %s“,PATH_RANDOMDEV,tybs_result_totext(result);tybs_entropy_detach(#endifns_os_chroot(ns_g_chrootdir);ns_os_minprivs();result = ns_log_init(TYBS_TF(ns_g_username != NULL);if (result != TYBS_R_SUCCESS)ns_main_earlyfatal(“ns_log_init() failed: %s“,tybs_result_totext(result);

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。