reformat with clang-format

This commit is contained in:
Axel Kohlmeyer
2020-10-23 21:04:45 -04:00
parent 1382559dbe
commit b4f1779b62

View File

@ -563,7 +563,7 @@ static int help_cmd()
"in the current working directory and - if present - this file will be\n" "in the current working directory and - if present - this file will be\n"
"read at the beginning of the next session of the LAMMPS shell.\n\n" "read at the beginning of the next session of the LAMMPS shell.\n\n"
"Additional information is at https://packages.lammps.org/lammps-shell.html\n\n"; "Additional information is at https://packages.lammps.org/lammps-shell.html\n\n";
return 0; return 0;
} }
static int shell_end() static int shell_end()
@ -681,7 +681,7 @@ int main(int argc, char **argv)
// switch to the user's documents directory. Avoid buffer overflow // switch to the user's documents directory. Avoid buffer overflow
// and skip this step if the path is too long for our buffer. // and skip this step if the path is too long for our buffer.
if (getcwd(buf, buflen)) { if (getcwd(buf, buflen)) {
if ((strstr(buf, "System32") || strstr(buf, "system32"))) { if ((strstr(buf, "System32") || strstr(buf, "system32"))) {
char *drive = getenv("HOMEDRIVE"); char *drive = getenv("HOMEDRIVE");
char *path = getenv("HOMEPATH"); char *path = getenv("HOMEPATH");
buf[0] = '\0'; buf[0] = '\0';
@ -725,7 +725,8 @@ int main(int argc, char **argv)
--argc; --argc;
input_file = utils::path_basename(argv[1]); input_file = utils::path_basename(argv[1]);
chdir(utils::path_dirname(input_file).c_str()); chdir(utils::path_dirname(input_file).c_str());
for (int i = 1; i < argc; ++i) argv[i] = argv[i+1]; for (int i = 1; i < argc; ++i)
argv[i] = argv[i + 1];
} }
lmp = lammps_open_no_mpi(argc, argv, nullptr); lmp = lammps_open_no_mpi(argc, argv, nullptr);
@ -736,7 +737,7 @@ int main(int argc, char **argv)
// pre-load an input file that was provided on the command line // pre-load an input file that was provided on the command line
if (!input_file.empty()) { if (!input_file.empty()) {
lammps_file(lmp, input_file.c_str()); lammps_file(lmp, input_file.c_str());
} else { } else {
for (int i = 0; i < argc; ++i) { for (int i = 0; i < argc; ++i) {
if ((strcmp(argv[i], "-in") == 0) || (strcmp(argv[i], "-i") == 0)) { if ((strcmp(argv[i], "-in") == 0) || (strcmp(argv[i], "-i") == 0)) {