Skip to content
Snippets Groups Projects
Commit 2dcfb51d authored by Richard Berger's avatar Richard Berger
Browse files

Change info command styles syntax

Change to `info styles [all|atom|pair|compute|...]`.
By default, `info styles` will print all styles.
parent ba2b523b
No related branches found
No related tags found
No related merge requests found
...@@ -150,48 +150,6 @@ void Info::command(int narg, char **arg) ...@@ -150,48 +150,6 @@ void Info::command(int narg, char **arg)
if ((out != screen) && (out != logfile)) fclose(out); if ((out != screen) && (out != logfile)) fclose(out);
out = fopen(arg[idx+2],"w"); out = fopen(arg[idx+2],"w");
idx += 3; idx += 3;
} else if (strncmp(arg[idx],"atom_styles",3) == 0) {
flags |= ATOM_STYLES;
++idx;
} else if (strncmp(arg[idx],"integrate_styles",3) == 0) {
flags |= INTEGRATE_STYLES;
++idx;
} else if (strncmp(arg[idx],"minimize_styles",3) == 0) {
flags |= MINIMIZE_STYLES;
++idx;
} else if (strncmp(arg[idx],"pair_styles",3) == 0) {
flags |= PAIR_STYLES;
++idx;
} else if (strncmp(arg[idx],"bond_styles",3) == 0) {
flags |= BOND_STYLES;
++idx;
} else if (strncmp(arg[idx],"angle_styles",3) == 0) {
flags |= ANGLE_STYLES;
++idx;
} else if (strncmp(arg[idx],"dihedral_styles",3) == 0) {
flags |= DIHEDRAL_STYLES;
++idx;
} else if (strncmp(arg[idx],"improper_styles",3) == 0) {
flags |= IMPROPER_STYLES;
++idx;
} else if (strncmp(arg[idx],"kspace_styles",3) == 0) {
flags |= KSPACE_STYLES;
++idx;
} else if (strncmp(arg[idx],"fix_styles",3) == 0) {
flags |= FIX_STYLES;
++idx;
} else if (strncmp(arg[idx],"compute_styles",5) == 0) {
flags |= COMPUTE_STYLES;
++idx;
} else if (strncmp(arg[idx],"region_styles",3) == 0) {
flags |= REGION_STYLES;
++idx;
} else if (strncmp(arg[idx],"dump_styles",3) == 0) {
flags |= DUMP_STYLES;
++idx;
} else if (strncmp(arg[idx],"command_styles",5) == 0) {
flags |= COMMAND_STYLES;
++idx;
} else if (strncmp(arg[idx],"communication",5) == 0) { } else if (strncmp(arg[idx],"communication",5) == 0) {
flags |= COMM; flags |= COMM;
++idx; ++idx;
...@@ -223,8 +181,60 @@ void Info::command(int narg, char **arg) ...@@ -223,8 +181,60 @@ void Info::command(int narg, char **arg)
flags |= SYSTEM; flags |= SYSTEM;
++idx; ++idx;
} else if (strncmp(arg[idx],"styles",3) == 0) { } else if (strncmp(arg[idx],"styles",3) == 0) {
flags |= STYLES; if (idx+1 < narg) {
++idx; ++idx;
if (strncmp(arg[idx],"all",3) == 0) {
flags |= STYLES;
++idx;
} else if (strncmp(arg[idx],"atom",3) == 0) {
flags |= ATOM_STYLES;
++idx;
} else if (strncmp(arg[idx],"integrate",3) == 0) {
flags |= INTEGRATE_STYLES;
++idx;
} else if (strncmp(arg[idx],"minimize",3) == 0) {
flags |= MINIMIZE_STYLES;
++idx;
} else if (strncmp(arg[idx],"pair",3) == 0) {
flags |= PAIR_STYLES;
++idx;
} else if (strncmp(arg[idx],"bond",3) == 0) {
flags |= BOND_STYLES;
++idx;
} else if (strncmp(arg[idx],"angle",3) == 0) {
flags |= ANGLE_STYLES;
++idx;
} else if (strncmp(arg[idx],"dihedral",3) == 0) {
flags |= DIHEDRAL_STYLES;
++idx;
} else if (strncmp(arg[idx],"improper",3) == 0) {
flags |= IMPROPER_STYLES;
++idx;
} else if (strncmp(arg[idx],"kspace",3) == 0) {
flags |= KSPACE_STYLES;
++idx;
} else if (strncmp(arg[idx],"fix",3) == 0) {
flags |= FIX_STYLES;
++idx;
} else if (strncmp(arg[idx],"compute",4) == 0) {
flags |= COMPUTE_STYLES;
++idx;
} else if (strncmp(arg[idx],"region",3) == 0) {
flags |= REGION_STYLES;
++idx;
} else if (strncmp(arg[idx],"dump",3) == 0) {
flags |= DUMP_STYLES;
++idx;
} else if (strncmp(arg[idx],"command",4) == 0) {
flags |= COMMAND_STYLES;
++idx;
} else {
flags |= STYLES;
}
} else {
flags |= STYLES;
++idx;
}
} else { } else {
error->warning(FLERR,"Ignoring unknown or incorrect info command flag"); error->warning(FLERR,"Ignoring unknown or incorrect info command flag");
++idx; ++idx;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment