Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xtc-length
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Graham
xtc-length
Commits
c67fa727
Commit
c67fa727
authored
8 years ago
by
James Graham
Browse files
Options
Downloads
Patches
Plain Diff
Show help message when no arguments are given
parent
cc60fcd8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtc-length.c
+2
-6
2 additions, 6 deletions
xtc-length.c
with
2 additions
and
6 deletions
xtc-length.c
+
2
−
6
View file @
c67fa727
...
...
@@ -66,17 +66,13 @@ int get_xtc_num_frames(const char *filename, int *nframes, int *natoms, float *p
int
main
(
const
int
argc
,
const
char
*
argv
[]){
const
char
*
help_text
=
"Count number of frames and simulation time of GROMACS XTC file
\n
"
"Usage: xtc-length <xtc
name
> [-q]
\n\n
"
"Usage: xtc-length <
.
xtc> [-q]
\n\n
"
"Default behaviour is to provide running estimate of file length
\n
"
"This can be suppressed using the '-q' flag
\n
"
;
setlocale
(
LC_ALL
,
""
);
if
(
argc
<
2
){
printf
(
"ERROR: Incorrect usage - must give input filename
\n
"
);
return
-
1
;
}
if
(
!
strcmp
(
argv
[
1
],
"-h"
)
||
!
strcmp
(
argv
[
1
],
"--help"
)){
if
(
argc
<
2
||
!
strcmp
(
argv
[
1
],
"-h"
)
||
!
strcmp
(
argv
[
1
],
"--help"
)){
printf
(
"%s"
,
help_text
);
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment