git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8758 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2012-09-10 14:24:09 +00:00
parent dfb38392c9
commit f764b2bc10

View File

@ -19,7 +19,6 @@
#include "math.h"
#include "stdlib.h"
#include "string.h"
#include "ctype.h"
#include "pair_table.h"
#include "atom.h"
#include "force.h"
@ -344,11 +343,8 @@ void PairTable::read_table(Table *tb, char *file, char *keyword)
error->one(FLERR,"Did not find keyword in table file");
if (strspn(line," \t\n\r") == strlen(line)) continue; // blank line
if (line[0] == '#') continue; // comment
int i = 0;
while (isalnum(line[i]) || line[i] == '_') i++;
char *word = new char[i];
strncpy(word,&line[0],i);
if (strcmp(word,keyword) == 0) break; // matching keyword
char *word = strtok(line," \t\n\r");
if (strcmp(word,keyword) == 0) break; // matching keyword
fgets(line,MAXLINE,fp); // no match, skip section
param_extract(tb,line);
fgets(line,MAXLINE,fp);