Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Beam Positoning Monitor - Software
Commits
a7561faa
Commit
a7561faa
authored
Jun 18, 2015
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/libs/*/{src/include}/bpm_client_revision.*: add build info functions
parent
9f10044a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
130 additions
and
6 deletions
+130
-6
bpm_client_revision.h
src/libs/libbpmclient/include/bpm_client_revision.h
+44
-4
bpm_client_revision.c
src/libs/libbpmclient/src/bpm_client_revision.c
+86
-2
No files found.
src/libs/libbpmclient/include/bpm_client_revision.h
View file @
a7561faa
...
...
@@ -12,10 +12,50 @@
extern
"C"
{
#endif
extern
const
char
*
build_revision
;
extern
const
char
*
build_date
;
extern
const
char
*
build_user_name
;
extern
const
char
*
build_user_email
;
/* Clone the build revision. Returns the cloned string is successfully or NULL
* on error */
char
*
revision_clone_build_revision
(
void
);
/* Copies the build revision into a pre-allocated buffer. Returns a negative number
* on error and the number of copied bytes otherwise */
int
revision_copy_build_revision
(
char
*
dest
,
size_t
size
);
/* Returns a const reference to build revision */
const
char
*
revision_get_build_revision
(
void
);
/* Clone the build date. Returns the cloned string is successfully or NULL
* on error */
char
*
revision_clone_build_date
(
void
);
/* Copies the build date into a pre-allocated buffer. Returns a negative number
* on error and the number of copied bytes otherwise */
int
revision_copy_build_date
(
char
*
dest
,
size_t
size
);
/* Returns a const reference to build version */
const
char
*
revision_get_build_date
(
void
);
/* Clone the build user name. Returns the cloned string is successfully or NULL
* on error */
char
*
revision_clone_build_user_name
(
void
);
/* Copies the build user name into a pre-allocated buffer. Returns a negative number
* on error and the number of copied bytes otherwise */
int
revision_copy_build_user_name
(
char
*
dest
,
size_t
size
);
/* Returns a const reference to build user name */
const
char
*
revision_get_build_user_name
(
void
);
/* Clone the build user email. Returns the cloned string is successfully or NULL
* on error */
char
*
revision_clone_build_user_email
(
void
);
/* Copies the build user email into a pre-allocated buffer. Returns a negative number
* on error and the number of copied bytes otherwise */
int
revision_copy_build_user_email
(
char
*
dest
,
size_t
size
);
/* Returns a const reference to build user email */
const
char
*
revision_get_build_user_email
(
void
);
/* Clone the build version. Returns the cloned string is successfully or NULL
* on error */
char
*
revision_clone_build_version
(
void
);
/* Copies the build version into a pre-allocated buffer. Returns a negative number
* on error and the number of copied bytes otherwise */
int
revision_copy_build_version
(
char
*
dest
,
size_t
size
);
/* Returns a const reference to build version */
const
char
*
revision_get_build_version
(
void
);
#ifdef __cplusplus
}
...
...
src/libs/libbpmclient/src/bpm_client_revision.c
View file @
a7561faa
...
...
@@ -13,5 +13,89 @@
#define BPM_CLIENT_VERSION_MINOR_STR STRINGIFY(BPM_CLIENT_VERSION_MINOR)
#define BPM_CLIENT_VERSION_PATCH_STR STRINGIFY(BPM_CLIENT_VERSION_PATCH)
const
char
*
build_revision
=
GIT_REVISION
;
const
char
*
build_date
=
__DATE__
" "
__TIME__
;
static
const
char
*
build_revision
=
GIT_REVISION
;
static
const
char
*
build_date
=
__DATE__
" "
__TIME__
;
static
const
char
*
build_user_name
=
GIT_USER_NAME
;
static
const
char
*
build_user_email
=
GIT_USER_EMAIL
;
static
const
char
*
build_version
=
BPM_CLIENT_VERSION_MAJOR_STR
"."
BPM_CLIENT_VERSION_MINOR_STR
"."
BPM_CLIENT_VERSION_PATCH_STR
;
/************************* Clone functions ***********************************/
char
*
revision_clone_build_revision
(
void
)
{
return
hutils_clone_str
(
build_revision
);
}
char
*
revision_clone_build_date
(
void
)
{
return
hutils_clone_str
(
build_date
);
}
char
*
revision_clone_build_user_name
(
void
)
{
return
hutils_clone_str
(
build_user_name
);
}
char
*
revision_clone_build_user_email
(
void
)
{
return
hutils_clone_str
(
build_user_email
);
}
char
*
revision_clone_build_version
(
void
)
{
return
hutils_clone_str
(
build_version
);
}
/************************* Get Const functions ********************************/
const
char
*
revision_get_build_revision
(
void
)
{
return
build_revision
;
}
const
char
*
revision_get_build_date
(
void
)
{
return
build_date
;
}
const
char
*
revision_get_build_user_name
(
void
)
{
return
build_user_name
;
}
const
char
*
revision_get_build_user_email
(
void
)
{
return
build_user_email
;
}
const
char
*
revision_get_build_version
(
void
)
{
return
build_version
;
}
/*************************** Copy functions **********************************/
int
revision_copy_build_revision
(
char
*
dest
,
size_t
size
)
{
return
hutils_copy_str
(
dest
,
build_revision
,
size
);
}
int
revision_copy_build_date
(
char
*
dest
,
size_t
size
)
{
return
hutils_copy_str
(
dest
,
build_date
,
size
);
}
int
revision_copy_build_user_name
(
char
*
dest
,
size_t
size
)
{
return
hutils_copy_str
(
dest
,
build_user_name
,
size
);
}
int
revision_copy_build_user_email
(
char
*
dest
,
size_t
size
)
{
return
hutils_copy_str
(
dest
,
build_user_email
,
size
);
}
int
revision_copy_build_version
(
char
*
dest
,
size_t
size
)
{
return
hutils_copy_str
(
dest
,
build_version
,
size
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment