1、软件著作权源代码范本软件著作权-源代码范本注意事项:常见的源代码包含:C语言,VB, C+, JAVA,. NET等。提交的代码必须是源代码的开头载入程序,第30页必须断开,笫60页是软 件的程序结尾,代码中不得出现与申请表内容不符合的日期,著作权人,软 件名字等,不能出现开源代码,不能出现任何版权纠纷。格式要求:一、源代码应提交前、后各连续30贝,不足60页的,应当全部提交。二、源代码页眉应标注软件的名称和版本号,应半与申请表中名称完全一致,页眉右上应标注页码,源代码每页不少于50行。#include include include include include #include incl
2、ude include #include #include include include include #include include include #include include #include #endif#ifdef DLZ#include #endifstatic tybs_boolean_t wantstats = TYBS_FALSE;static charstatic charstatic charstatic charstatic unsigned int voidprogram_name|TYBS_DIR_NAMEMAX = named; absolutc_con
3、ffilcTYBS_DIR_PATHMAX; saved_commandjine512;version512;maxsocks = 0;ns_main_earlywarning(const char *format. )vajist args;va_start(args, format);if (ns_gjctx != NULL) tybs_log_vwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL.NS_LOGMODULE_MAIN. TYBS_LOG_WARNING, format, args); else fprintf(stderr, H%s: ”,pro
4、gram_name);vfprintf(stderr, format, args);fprintf(stderr, nnH); fflush(stderr);va_end(args);Void ns_main_earlyfatal(const char format, )vajist args;va_start(args, format);if (ns_gJctx != NULL) tybs_log_vwrite(ns_g_lctx, NS丄OGCATEGORY_GENERAL NS_LOGMODULE_MAIN TYBS_LOG_CRITICAL, format, args);tybs_lo
5、gwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL. NS_LOGMODULE_MAIN. TYBS_LOG_CRITICAL. exiting (due to early fatal error)11); else fprintf(stderr, H%s: ”,program_name);vfprintf(stderr, format, args);fprintf(stderr, nnH);fflush(stderr);va_end(args);exit(l);static voidassertion_failed(const char * file, int
6、line, tybs_assertiontype_t type,const char *cond)if (ns_gctx != NULL) tybs_assertion_setcallback(NULL); tybs_logwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL. NS_LOGMODULE_MAIN. TYBS_LOG_CRITICAL. M%s:%d: %s(%s) failed”,file, line, tybs_assertion_typetotext(type), cond);tybs_logwrite(ns_g_lctx, NS丄OGCATEG
7、ORY_GENERAL NS_LOGMODULE_MAIN TYBS_LOG_CRITICAL. ”exiting (due to assertion failure)11); else fprintf(stderr, H%s:%d: %s(%s) failednM,file, line, tybs_assertion_typetotext(type), cond);fflush(stderr);if (ns_g_coreok)abort();exit(l);static voidlibrary_fataLerror(const char *file, int line, const char
8、 format.va.list args) TYBS_FORMAT_PRINTF(3,0);static void library_fatal_error(const char *file, int line, const char format.va_list args) -if (ns_gctx != NULL) tybs_error_setfatal(NULL); tybs_logwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL. NS_LOGMODULE_MAIN. TYBS_LOG_CRITICAL. fatal error:file, line);ty
9、bs_log_vwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL. word.NS_LOGMODULE_MAIN, TYBS_LOG_CRITICAL. format, args);tybs_logwrite(ns.g_lctx, NS_LOGCATEGORY_GENERAL.ns_l6gmodule_main. tybs_log_critical.Hexiting (due to fatal error in library)”); else fprintf(stderr, n%s:%d: fatal error: file, line);vfprintf(st
10、derr. format, args);fprintf(stderr. HnH);fflush(stderr);if (ns_g_coreok)abort();exit(l);static void library_unexpected_error(const char *file, int line, const char format, vajist args) TYBS_FORMAT_PRINTF(3, 0);static voidlibrary_unexpected_error(const char *file, int line const char *format, va_list
11、 args)if (ns_gjctx != NULL) tybsjogwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL.NS_LOGMODULE_MAIN TYBS_LOG_ERROR.N%s:%d: unexpected error:”,file, line); tybsjog_vwrite(ns_g_lctx, NS_LOGCATEGORY_GENERAL ns_l6gmodule_main.tybs_log_error. format, args); else fprintf(stderr, H%s:%d: fatal error: file, line);
12、vfprintf(stderr, format, args);fprintf(stderr. HnH);ftlush(stdcrr);static voidlwresd_usage(void) fprintf(stdenMusage: Iwresd -41-6 -c conffile I -C resolvconffileHM-d debugleveln-fl-g -n number_of_cpus -p portNM-P listen-port -snM-t chrootdir -u username -i pidfilenH-m usageltracelrecordlsizelmctxnN
13、);static voidusage(void) if (ns_gJwresdonly) Iwresd_usage();return;fprintf(stdenMusage: named -41-6 -c conffile -d debuglevel-n number_oLcpusnn-p port -s 4 chrootdir -u usernamenH -m usageltracelrecordlsizelmctx )n,r);static voidsave_command_line(int argc, char *argv) int i;char *src;char *dst;char *eob;const char truncated! =tybs_booleanJ quoted = TYBS_FALSE;dst = saved_command_Iine;eob = savedcommandjine + sizeof(saved_commandjine);for (i = 1; i argc & dst eob; i+) *dst+ =1:src = argvi;while (*src != O & dst eob) if (quoted II isalnum(*src & Oxff) II*src = t I
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1