more c89 conformance

variables should be declared at the beginning of functions
This commit is contained in:
Elad Salomons
2015-06-13 00:01:30 +03:00
parent 79fb7ab9a4
commit 82da5db7ec
3 changed files with 9 additions and 7 deletions

View File

@@ -3329,11 +3329,12 @@ int DLLEXPORT ENgetaveragepatternvalue(int index, EN_API_FLOAT_TYPE *value)
** and pattern
**----------------------------------------------------------------
*/
{ *value = 0.0;
{
int i;
*value = 0.0;
if (!Openflag) return(102);
if (index < 1 || index > Npats) return(205);
//if (period < 1 || period > Pattern[index].Length) return(251);
int i;
for (i=0; i<Pattern[index].Length; i++) {
*value+=Pattern[index].F[i];
}