Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
07cc73d8
Commit
07cc73d8
authored
Feb 28, 2010
by
Ryan C. Gordon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed revision details to be a string (an hg changeset) instead of an int.
parent
e8beace1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
15 deletions
+11
-15
showrev.sh
build-scripts/showrev.sh
+3
-10
updaterev.sh
build-scripts/updaterev.sh
+1
-1
SDL_version.h
include/SDL_version.h
+4
-1
SDL.c
src/SDL.c
+1
-1
testver.c
test/testver.c
+2
-2
No files found.
build-scripts/showrev.sh
View file @
07cc73d8
...
...
@@ -2,14 +2,7 @@
#
# Print the current source revision, if available
srcdir
=
`
dirname
$0
`
/..
# FIXME: this prints the tip, which isn't useful if you're on a different
# branch, or just not sync'd to the tip.
hg tip
--template
'hg-{rev}:{node|short}'
if
[
-d
$srcdir
/.svn
]
;
then
cd
$srcdir
(
svnversion
-c
2>/dev/null
||
svnversion .
)
|
\
sed
-e
's,\([0-9]*\)[A-Z]*,\1,'
\
-e
's,[0-9]*:\([0-9]*\)[A-Z]*,\1,'
else
cd
$srcdir
git svn info |
grep
Revision |
awk
'{ print $2 }'
fi
build-scripts/updaterev.sh
View file @
07cc73d8
...
...
@@ -8,7 +8,7 @@ header=$srcdir/include/SDL_revision.h
rev
=
`
sh showrev.sh
`
if
[
"
$rev
"
!=
""
]
;
then
echo
"#define SDL_REVISION
$rev
"
>
$header
.new
echo
"#define SDL_REVISION
\"
$rev
\"
"
>
$header
.new
if
diff
$header
$header
.new
>
/dev/null 2>&1
;
then
rm
$header
.new
else
...
...
include/SDL_version.h
View file @
07cc73d8
...
...
@@ -139,8 +139,11 @@ extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver);
/**
* \brief Get the code revision of SDL that is linked against your program.
*
* This is an arbitrary string (a hash value, actually), and is only useful
* in comparing against other revisions. It is NOT an incrementing number.
*/
extern
DECLSPEC
int
SDLCALL
SDL_GetRevision
(
void
);
extern
DECLSPEC
const
char
*
SDLCALL
SDL_GetRevision
(
void
);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
...
...
src/SDL.c
View file @
07cc73d8
...
...
@@ -271,7 +271,7 @@ SDL_GetVersion(SDL_version * ver)
}
/* Get the library source revision */
int
const
char
*
SDL_GetRevision
(
void
)
{
return
SDL_REVISION
;
...
...
test/testver.c
View file @
07cc73d8
...
...
@@ -20,10 +20,10 @@ main(int argc, char *argv[])
printf
(
"Compiled with SDL older than 1.3
\n
"
);
#endif
SDL_VERSION
(
&
compiled
);
printf
(
"Compiled version: %d.%d.%d
-%d
\n
"
,
printf
(
"Compiled version: %d.%d.%d
(%s)
\n
"
,
compiled
.
major
,
compiled
.
minor
,
compiled
.
patch
,
SDL_REVISION
);
SDL_GetVersion
(
&
linked
);
printf
(
"Linked version: %d.%d.%d
-%d
\n
"
,
printf
(
"Linked version: %d.%d.%d
(%s)
\n
"
,
linked
.
major
,
linked
.
minor
,
linked
.
patch
,
SDL_GetRevision
());
SDL_Quit
();
return
(
0
);
...
...
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