11-22-2005 09:18 PM
11-23-2005 03:11 AM
int CVIFUNC InternationalFileDate(char filePath[], char dateString[], int bufferSize)
{
time_t time;
VCAST_WRITE_TO_INST_FILE("001 017 001 ");
{ // <--
int error = 0;
int success;VCAST_WRITE_TO_INST_FILE("001 017 002 ");
errChk( success = GetFileCLibTime(filePath, &time));VCAST_WRITE_TO_INST_FILE("001 017 003 ");
if (success) {
VCAST_WRITE_TO_INST_FILE("001 017 004 ");
return InternationalDateString(time, dateString, bufferSize);
}
else {
VCAST_WRITE_TO_INST_FILE("001 017 005 ");
return 0;
}VCAST_WRITE_TO_INST_FILE("001 017 006 ");
Error:
VCAST_WRITE_TO_INST_FILE("001 017 007 ");
return error;
} // <--
}
11-23-2005 11:16 AM
Thanks for your suggestion. But I have a large code base which would make this fix very labor intensive and time consuming.
Regarding mixing declarations and statements, I believe ISO C99 allowed mixing of declarations and statements to move ANSI-C closer to C++. I was hoping to import the latest Visual C or GNU C compiler, which I believe will support mixing declarations and statements.
11-23-2005 04:22 PM
11-25-2005 03:15 AM