-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathversion.cpp
65 lines (54 loc) · 1.5 KB
/
version.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
static char *version_id =
"@(#)Copyright (C) 2004-2012 H.Shirouzu Version.cpp ver1.0.0";
static char *organize_str =
"L'espace Vision";
static char *version_id_2 =
"Copyright (C) 2016 Kengo Sawatsu";
/* ========================================================================
Project Name : Fast/Force copy file and directory
Module Name : Version
Create : 2010-06-13(Sun)
Update : 2014-04-16(Wed)
ported update : 2019-01-22
Copyright : H.Shirouzu,Kengo Sawatsu
Reference :
======================================================================== */
#include <string.h>
#include <stdio.h>
#include "version.h"
static char version_str[32];
static char copyright_str[128];
static char admin_str[32];
void SetVersionStr(BOOL is_admin)
{
char *versionstr = "1.3.0";
sprintf(version_str,"v%s",versionstr);
}
const char *GetVersionStr()
{
if(version_str[0] == 0)
SetVersionStr();
return version_str;
}
const char *GetVerAdminStr()
{
return admin_str;
}
const char *GetCopyrightStr(void)
{
if(copyright_str[0] == 0){
char *s = strchr(version_id, 'C');
char *e = strchr(version_id, '\t');
if(s && e && s < e){
sprintf(copyright_str, "%.*s", e-s, s);
}
}
return copyright_str;
}
const char *GetVersionStr2(void){
return version_id_2;
}
const char *GetOrganizeStr(void)
{
return organize_str;
}