Fix prototype locations

master
Christopher J. Morrone 2011-11-11 15:18:17 -08:00
parent 0072f26946
commit e7fea4f102
6 changed files with 36 additions and 44 deletions

View File

@ -70,9 +70,7 @@
/**************************** P R O T O T Y P E S *****************************/
static IOR_offset_t SeekOffset_HDF5(void *, IOR_offset_t, IOR_param_t *);
void SetHints(MPI_Info *, char *);
void SetupDataSet_HDF5(void *, IOR_param_t *);
void ShowHints(MPI_Info *);
void *IOR_Create_HDF5(char *, IOR_param_t *);
void *IOR_Open_HDF5(char *, IOR_param_t *);

View File

@ -23,8 +23,6 @@
/**************************** P R O T O T Y P E S *****************************/
static IOR_offset_t SeekOffset_MPIIO(MPI_File, IOR_offset_t, IOR_param_t *);
void SetHints(MPI_Info *, char *);
void ShowHints(MPI_Info *);
void *IOR_Create_MPIIO(char *, IOR_param_t *);
void *IOR_Open_MPIIO(char *, IOR_param_t *);

View File

@ -37,8 +37,6 @@
/**************************** P R O T O T Y P E S *****************************/
static int GetFileMode(IOR_param_t *);
void SetHints(MPI_Info *, char *);
void ShowHints(MPI_Info *);
void *IOR_Create_NCMPI(char *, IOR_param_t *);
void *IOR_Open_NCMPI(char *, IOR_param_t *);

View File

@ -183,5 +183,7 @@ typedef struct ior_aiori {
} ior_aiori_t;
void init_IOR_Param_t(IOR_param_t *p);
void SetHints (MPI_Info *, char *);
void ShowHints (MPI_Info *);
#endif /* not _AIORI_H */

View File

@ -81,13 +81,10 @@ void WriteTimes (IOR_param_t *, double **, int, int);
char * CurrentTimeString(void);
void DumpBuffer (void *, size_t);
void ExtractHint (char *, char *, char *);
void SetHints (MPI_Info *, char *);
void ShowHints (MPI_Info *);
IOR_offset_t StringToBytes (char *);
#if USE_UNDOC_OPT
void CorruptFile (char *, IOR_param_t *, int, int);
void ModifyByteInFile (char *, IOR_offset_t, int);
#endif /* USE_UNDOC_OPTS */
void SeedRandGen (MPI_Comm);

View File

@ -381,6 +381,40 @@ int Regex(char *string, char *pattern)
}
#if USE_UNDOC_OPT /* corruptFile */
/*
* Modify byte in file - used to testing write/read data checking.
*/
static void ModifyByteInFile(char *fileName, IOR_offset_t offset, int byteValue)
{
int fd;
int rc;
char old;
char new;
new = (char)byteValue;
/* open file, show old value, update to new value */
fd = open(fileName, O_RDWR);
rc = lseek(fd, offset, SEEK_SET);
if (rc == -1)
goto out;
rc = read(fd, &old, 1);
if (rc == -1)
goto out;
rc = lseek(fd, offset, SEEK_SET);
if (rc == -1)
goto out;
rc = write(fd, &new, 1);
if (rc == -1)
goto out;
fprintf(stdout,
"** DEBUG: offset %lld in %s changed from %d to %d **\n",
offset, fileName, (unsigned char)old, (unsigned char)new);
out:
close(fd);
return;
}
/*
* Corrupt file to testing data checking options.
*/
@ -417,41 +451,6 @@ void CorruptFile(char *testFileName, IOR_param_t * test, int rep, int access)
return;
}
/*
* Modify byte in file - used to testing write/read data checking.
*/
void ModifyByteInFile(char *fileName, IOR_offset_t offset, int byteValue)
{
int fd;
int rc;
char old;
char new;
new = (char)byteValue;
/* open file, show old value, update to new value */
fd = open(fileName, O_RDWR);
rc = lseek(fd, offset, SEEK_SET);
if (rc == -1)
goto out;
rc = read(fd, &old, 1);
if (rc == -1)
goto out;
rc = lseek(fd, offset, SEEK_SET);
if (rc == -1)
goto out;
rc = write(fd, &new, 1);
if (rc == -1)
goto out;
fprintf(stdout,
"** DEBUG: offset %lld in %s changed from %d to %d **\n",
offset, fileName, (unsigned char)old, (unsigned char)new);
out:
close(fd);
return;
}
#endif /* USE_UNDOC_OPT - corruptFile */
/*