git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14220 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -11,9 +11,9 @@
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "ctype.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "force.h"
|
||||
#include "style_bond.h"
|
||||
#include "style_angle.h"
|
||||
@ -262,7 +262,7 @@ Bond *Force::new_bond(const char *style, int trysuffix, int &sflag)
|
||||
sflag = 1;
|
||||
char estyle[256];
|
||||
sprintf(estyle,"%s/%s",style,lmp->suffix);
|
||||
|
||||
|
||||
if (0) return NULL;
|
||||
|
||||
#define BOND_CLASS
|
||||
@ -277,7 +277,7 @@ Bond *Force::new_bond(const char *style, int trysuffix, int &sflag)
|
||||
sflag = 2;
|
||||
char estyle[256];
|
||||
sprintf(estyle,"%s/%s",style,lmp->suffix2);
|
||||
|
||||
|
||||
if (0) return NULL;
|
||||
|
||||
#define BOND_CLASS
|
||||
@ -342,7 +342,7 @@ Angle *Force::new_angle(const char *style, int trysuffix, int &sflag)
|
||||
sflag = 1;
|
||||
char estyle[256];
|
||||
sprintf(estyle,"%s/%s",style,lmp->suffix);
|
||||
|
||||
|
||||
if (0) return NULL;
|
||||
|
||||
#define ANGLE_CLASS
|
||||
@ -357,7 +357,7 @@ Angle *Force::new_angle(const char *style, int trysuffix, int &sflag)
|
||||
sflag = 2;
|
||||
char estyle[256];
|
||||
sprintf(estyle,"%s/%s",style,lmp->suffix);
|
||||
|
||||
|
||||
if (0) return NULL;
|
||||
|
||||
#define ANGLE_CLASS
|
||||
@ -759,7 +759,7 @@ void Force::bounds(char *str, int nmax, int &nlo, int &nhi, int nmin)
|
||||
nhi = atoi(ptr+1);
|
||||
}
|
||||
|
||||
if (nlo < nmin || nhi > nmax || nlo > nhi)
|
||||
if (nlo < nmin || nhi > nmax || nlo > nhi)
|
||||
error->all(FLERR,"Numeric index is out of bounds");
|
||||
}
|
||||
|
||||
@ -772,7 +772,7 @@ void Force::bounds(char *str, int nmax, int &nlo, int &nhi, int nmin)
|
||||
return nlo,nhi
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Force::boundsbig(char *str, bigint nmax, bigint &nlo, bigint &nhi,
|
||||
void Force::boundsbig(char *str, bigint nmax, bigint &nlo, bigint &nhi,
|
||||
bigint nmin)
|
||||
{
|
||||
char *ptr = strchr(str,'*');
|
||||
@ -793,7 +793,7 @@ void Force::boundsbig(char *str, bigint nmax, bigint &nlo, bigint &nhi,
|
||||
nhi = ATOBIGINT(ptr+1);
|
||||
}
|
||||
|
||||
if (nlo < nmin || nhi > nmax || nlo > nhi)
|
||||
if (nlo < nmin || nhi > nmax || nlo > nhi)
|
||||
error->all(FLERR,"Numeric index is out of bounds");
|
||||
}
|
||||
|
||||
@ -832,11 +832,11 @@ double Force::numeric(const char *file, int line, char *str)
|
||||
|
||||
int Force::inumeric(const char *file, int line, char *str)
|
||||
{
|
||||
if (!str)
|
||||
if (!str)
|
||||
error->all(file,line,
|
||||
"Expected integer parameter in input script or data file");
|
||||
int n = strlen(str);
|
||||
if (n == 0)
|
||||
if (n == 0)
|
||||
error->all(file,line,
|
||||
"Expected integer parameter in input script or data file");
|
||||
|
||||
@ -857,11 +857,11 @@ int Force::inumeric(const char *file, int line, char *str)
|
||||
|
||||
bigint Force::bnumeric(const char *file, int line, char *str)
|
||||
{
|
||||
if (!str)
|
||||
if (!str)
|
||||
error->all(file,line,
|
||||
"Expected integer parameter in input script or data file");
|
||||
int n = strlen(str);
|
||||
if (n == 0)
|
||||
if (n == 0)
|
||||
error->all(file,line,
|
||||
"Expected integer parameter in input script or data file");
|
||||
|
||||
@ -882,11 +882,11 @@ bigint Force::bnumeric(const char *file, int line, char *str)
|
||||
|
||||
tagint Force::tnumeric(const char *file, int line, char *str)
|
||||
{
|
||||
if (!str)
|
||||
if (!str)
|
||||
error->all(file,line,
|
||||
"Expected integer parameter in input script or data file");
|
||||
int n = strlen(str);
|
||||
if (n == 0)
|
||||
if (n == 0)
|
||||
error->all(file,line,
|
||||
"Expected integer parameter in input script or data file");
|
||||
|
||||
@ -964,7 +964,7 @@ const char *Force::potential_name(const char *path)
|
||||
|
||||
#if defined(_WIN32)
|
||||
// skip over the disk drive part of windows pathnames
|
||||
if (isalpha(path[0]) && path[1] == ':')
|
||||
if (isalpha(path[0]) && path[1] == ':')
|
||||
path += 2;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user