int loadFileToArray(const char * filename,CHARUSER * localSeatID)
{
CHARUSER sID;
int user_count;
ProcessEventLog(TRC_WRN,ERR_TRC,Info(0),"Entered loadFileToArray\n");
user_count = 0;
while ( user_count < maxSeatID )
{
ProcessEventLog(TRC_WRN,ERR_TRC,Info(0),"user_count = [%d]",user_count);
if (feof(SeatIDstream))
{
ProcessEventLog(TRC_WRN,ERR_TRC,Info(0),"Error in feof(stream)\n");
return -1;
}
ProcessEventLog(TRC_WRN,ERR_TRC,Info(0),"feof(SeatIDstream) = [%d]",feof(SeatIDstream));
fscanf(SeatIDstream,"%s \n", sID);
ProcessEventLog(TRC_WRN,ERR_TRC,Info(0),"fscanf");
strncpy(localSeatID[user_count],sID,sizeof(sID));
ProcessEventLog(TRC_WRN,ERR_TRC,Info(0),"strncpy");
ProcessEventLog(TRC_DBG,ERR_TRC,Info(0),"->[%s]\n", localSeatID[user_count]);
user_count++;
}
ProcessEventLog(TRC_DBG,ERR_TRC,Info(0),"Number of Records %d", (user_count));
return 0;
}