Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
d9a4d443
Commit
d9a4d443
authored
Sep 10, 2015
by
Matthieu Schaller
Browse files
Improved the greeting message to display more information and be visually appealing
Former-commit-id: c3c0a6a05a30c8c24d5ea6057d4216cc7b09c798
parent
ea657f5e
Changes
3
Hide whitespace changes
Inline
Side-by-side
examples/test.c
View file @
d9a4d443
...
...
@@ -594,7 +594,8 @@ int main ( int argc , char *argv[] ) {
/* Greeting message */
if
(
myrank
==
0
)
message
(
"This is %s
\n
"
,
package_description
()
);
greetings
(
);
/* Init the space. */
bzero
(
&
s
,
sizeof
(
struct
space
)
);
...
...
src/version.c
View file @
d9a4d443
...
...
@@ -22,8 +22,10 @@
#include
<stdio.h>
/* This object's header. */
#include
"error.h"
#include
"version.h"
/**
* @brief Return the source code git revision
*
...
...
@@ -56,3 +58,20 @@ const char *package_description(void) {
}
return
buf
;
}
void
greetings
(
void
)
{
printf
(
" Welcome to the cosmological code
\n
"
);
printf
(
" ______ __________________
\n
"
);
printf
(
" / ___/ | / / _/ ____/_ __/
\n
"
);
printf
(
"
\\
__
\\
| | /| / // // /_ / /
\n
"
);
printf
(
" ___/ /| |/ |/ // // __/ / /
\n
"
);
printf
(
" /____/ |__/|__/___/_/ /_/
\n
"
);
printf
(
" SPH With Inter-dependent Fine-grained Tasking
\n\n
"
);
printf
(
" Version : %s
\n
"
,
package_version
()
);
printf
(
" Revision: %s
\n
"
,
git_revision
()
);
printf
(
" Webpage : www.swiftsim.com
\n\n
"
);
}
src/version.h.in
View file @
d9a4d443
...
...
@@ -31,5 +31,6 @@
const char* package_description( void );
const char* package_version(void);
const char* git_revision(void);
void greetings(void);
#endif /* SWIFT_VERSION_H */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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