for(i=0;i-len-1;i++) strHelper[i]=' '
This was probably a typo and i<len-1 was meant.
This overflow bug had a very severe consequence on one of my
machine: all negative values were parsed as being positive.
Adding a check that a maximum size of len is 256, and also the length
of strHelper/strError strings changed to 257, or the last char in
strExpression was eaten. For more detailes see the file.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5517 c92efa57-630b-4861-b058-cf58834340f0
F77_FUNC (func,FUNC) for functions without underscore(s) in name
F77_FUNC_(f_nc,F_NC) for functions with underscore(s) in name
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5043 c92efa57-630b-4861-b058-cf58834340f0
wrapper and functions to allow the input of atomic coordinates.
The author of the parser is Vincenzo Lo Cicero who I wish to thank.
PLEASE READ THIS PARAGRAPH:
fortran strings and c strings are different in very subtle ways, thus I am
far from sure that it will work with all compiler. Please try this patch
on you system and report to me if it's giving strange problems!
The parser understands only +, -, *, / and ^ (power), which is more than
enough for out purposes.
At the moment a single card must not contain spaces, e.g. the following line
is correct:
Si 1/4 1/4 1/4
while the following would return an error:
Si 1 / 4 1 / 4 1 / 4
this can be improved, but I have not time now.
Additional colums are NOT parsed.
LICENCE:
The parser is copyrighted by Vincenzo Lo Cicero, originally released
under the GPL v3 licence has been relicenced under the GPL v2 in order
to be included in the Quantum-ESPRESSO code.
The author permission has been expressed in the following way by email:
``Per me va bene. Potete includere il codice nel vostro
software sotto licenza GPLv2.''
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5040 c92efa57-630b-4861-b058-cf58834340f0