|
|
@ -15,10 +15,10 @@ static void insert_rtoption(char *);
|
|
|
|
|
|
|
|
|
|
|
|
/* fill buffer with short version (so caller can avoid including date.h) */
|
|
|
|
/* fill buffer with short version (so caller can avoid including date.h) */
|
|
|
|
char *
|
|
|
|
char *
|
|
|
|
version_string(char *buf, size_t bufsz)
|
|
|
|
version_string(char *buf, size_t bufsz)//获取一个版本字符串并将其存储在提供的缓冲区
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Snprintf(buf, bufsz, "%s",
|
|
|
|
Snprintf(buf, bufsz, "%s",
|
|
|
|
((nomakedefs.version_string && nomakedefs.version_string[0])
|
|
|
|
((nomakedefs.version_string && nomakedefs.version_string[0])//确定要复制哪个版本字符串。检查nomakedefs.version_string是否存在并且是否非空
|
|
|
|
? nomakedefs.version_string
|
|
|
|
? nomakedefs.version_string
|
|
|
|
/* in case we try to write a paniclog entry after releasing
|
|
|
|
/* in case we try to write a paniclog entry after releasing
|
|
|
|
the 'nomakedefs' data */
|
|
|
|
the 'nomakedefs' data */
|
|
|
@ -28,7 +28,7 @@ version_string(char *buf, size_t bufsz)
|
|
|
|
|
|
|
|
|
|
|
|
/* fill and return the given buffer with the long nethack version string */
|
|
|
|
/* fill and return the given buffer with the long nethack version string */
|
|
|
|
char *
|
|
|
|
char *
|
|
|
|
getversionstring(char *buf, size_t bufsz)
|
|
|
|
getversionstring(char *buf, size_t bufsz)//获取并格式化一个版本字符串
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Strcpy(buf, nomakedefs.version_id);
|
|
|
|
Strcpy(buf, nomakedefs.version_id);
|
|
|
|
|
|
|
|
|
|
|
@ -209,7 +209,7 @@ doextversion(void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
early_version_info(boolean pastebuf)
|
|
|
|
early_version_info(boolean pastebuf)//获取并打印程序版本信息
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char buf1[BUFSZ], buf2[BUFSZ];
|
|
|
|
char buf1[BUFSZ], buf2[BUFSZ];
|
|
|
|
char *buf, *tmp;
|
|
|
|
char *buf, *tmp;
|
|
|
@ -295,7 +295,7 @@ comp_times(long filetime)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
boolean
|
|
|
|
boolean
|
|
|
|
check_version(
|
|
|
|
check_version(//检查给定的文件版本信息是否与预期的版本和配置兼容
|
|
|
|
struct version_info *version_data,
|
|
|
|
struct version_info *version_data,
|
|
|
|
const char *filename,
|
|
|
|
const char *filename,
|
|
|
|
boolean complain,
|
|
|
|
boolean complain,
|
|
|
@ -337,7 +337,7 @@ check_version(
|
|
|
|
/* this used to be based on file date and somewhat OS-dependant,
|
|
|
|
/* this used to be based on file date and somewhat OS-dependant,
|
|
|
|
but now examines the initial part of the file's contents */
|
|
|
|
but now examines the initial part of the file's contents */
|
|
|
|
boolean
|
|
|
|
boolean
|
|
|
|
uptodate(NHFILE *nhfp, const char *name, unsigned long utdflags)
|
|
|
|
uptodate(NHFILE *nhfp, const char *name, unsigned long utdflags)//检查给定的文件是否与预期的版本和配置兼容。
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ssize_t rlen = 0;
|
|
|
|
ssize_t rlen = 0;
|
|
|
|
int cmc = 0, filecmc = 0;
|
|
|
|
int cmc = 0, filecmc = 0;
|
|
|
@ -376,7 +376,7 @@ uptodate(NHFILE *nhfp, const char *name, unsigned long utdflags)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
store_formatindicator(NHFILE *nhfp)
|
|
|
|
store_formatindicator(NHFILE *nhfp)//在给定的文件上存储格式指示符。
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char indicate = 'u';
|
|
|
|
char indicate = 'u';
|
|
|
|
int cmc = 0;
|
|
|
|
int cmc = 0;
|
|
|
@ -391,7 +391,7 @@ store_formatindicator(NHFILE *nhfp)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
store_version(NHFILE *nhfp)
|
|
|
|
store_version(NHFILE *nhfp)//在给定的文件上存储版本信息。
|
|
|
|
{
|
|
|
|
{
|
|
|
|
struct version_info version_data = {
|
|
|
|
struct version_info version_data = {
|
|
|
|
0UL, 0UL, 0UL, 0UL, 0UL
|
|
|
|
0UL, 0UL, 0UL, 0UL, 0UL
|
|
|
@ -424,7 +424,7 @@ const char amiga_version_string[] = AMIGA_VERSION_STRING;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
unsigned long
|
|
|
|
unsigned long
|
|
|
|
get_feature_notice_ver(char *str)
|
|
|
|
get_feature_notice_ver(char *str)//从给定的字符串中解析并提取版本号。
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char buf[BUFSZ];
|
|
|
|
char buf[BUFSZ];
|
|
|
|
int ver_maj, ver_min, patch;
|
|
|
|
int ver_maj, ver_min, patch;
|
|
|
|