Definition at line 1958 of file dbfopen.c.
1959{
1961 int i, iRecord;
1962 int *panFieldOffsetNew;
1963 int *panFieldSizeNew;
1964 int *panFieldDecimalsNew;
1965 char *pachFieldTypeNew;
1966 char *pszHeaderNew;
1967 char *pszRecord;
1968 char *pszRecordNew;
1969
1972
1973
1976
1977
1983
1987 {
1988 free( panFieldOffsetNew );
1989 free( panFieldSizeNew );
1990 free( panFieldDecimalsNew );
1991 free( pachFieldTypeNew );
1992 free( pszHeaderNew );
1994 }
1995
1996
1997 for(i=0; i < psDBF->
nFields; i++)
1998 {
2004 }
2005 panFieldOffsetNew[0] = 1;
2006 for(i=1; i < psDBF->
nFields; i++)
2007 {
2008 panFieldOffsetNew[i] = panFieldOffsetNew[i - 1] + panFieldSizeNew[i - 1];
2009 }
2010
2013
2014
2016 {
2017
2020
2021
2024
2025
2026 for (iRecord = 0; iRecord < psDBF->
nRecords; iRecord++)
2027 {
2028 nRecordOffset =
2030
2031
2034
2035 pszRecordNew[0] = pszRecord[0];
2036
2037 for(i=0; i < psDBF->
nFields; i++)
2038 {
2039 memcpy(pszRecordNew + panFieldOffsetNew[i],
2042 }
2043
2044
2047 }
2048
2049
2052 }
2053
2058
2063
2067
2069}
#define STATIC_CAST(type, x)
static int DBFFlushRecord(DBFHandle psDBF)
void SHPAPI_CALL DBFUpdateHeader(DBFHandle psDBF)
int bCurrentRecordModified
SAOffset(* FWrite)(void *p, SAOffset size, SAOffset nmemb, SAFile file)
SAOffset(* FRead)(void *p, SAOffset size, SAOffset nmemb, SAFile file)
SAOffset(* FSeek)(SAFile file, SAOffset offset, int whence)
References DBFInfo::bCurrentRecordModified, DBFInfo::bNoHeader, DBFInfo::bUpdated, DBFFlushRecord(), DBFUpdateHeader(), FALSE, DBFInfo::fp, SAHooks::FRead, free(), SAHooks::FSeek, SAHooks::FWrite, malloc(), DBFInfo::nCurrentRecord, DBFInfo::nFields, DBFInfo::nHeaderLength, DBFInfo::nRecordLength, DBFInfo::nRecords, DBFInfo::pachFieldType, DBFInfo::panFieldDecimals, DBFInfo::panFieldOffset, DBFInfo::panFieldSize, DBFInfo::pszHeader, DBFInfo::sHooks, SHPLIB_NULLPTR, STATIC_CAST, TRUE, and XBASE_FLDHDR_SZ.