339 |
abyHeader[10] = (unsigned char) (psDBF->nRecordLength % 256); |
abyHeader[10] = (unsigned char) (psDBF->nRecordLength % 256); |
340 |
abyHeader[11] = (unsigned char) (psDBF->nRecordLength / 256); |
abyHeader[11] = (unsigned char) (psDBF->nRecordLength / 256); |
341 |
|
|
342 |
|
abyHeader[29] = (unsigned char) (psDBF->nLanguageDriver); |
343 |
|
|
344 |
/* -------------------------------------------------------------------- */ |
/* -------------------------------------------------------------------- */ |
345 |
/* Write the initial 32 byte file header, and all the field */ |
/* Write the initial 32 byte file header, and all the field */ |
346 |
/* descriptions. */ |
/* descriptions. */ |
582 |
|
|
583 |
psDBF->nHeaderLength = nHeadLen = pabyBuf[8] + pabyBuf[9]*256; |
psDBF->nHeaderLength = nHeadLen = pabyBuf[8] + pabyBuf[9]*256; |
584 |
psDBF->nRecordLength = nRecLen = pabyBuf[10] + pabyBuf[11]*256; |
psDBF->nRecordLength = nRecLen = pabyBuf[10] + pabyBuf[11]*256; |
585 |
|
psDBF->nLanguageDriver = pabyBuf[29]; |
586 |
|
|
587 |
psDBF->nFields = nFields = (nHeadLen - 32) / 32; |
psDBF->nFields = nFields = (nHeadLen - 32) / 32; |
588 |
|
|
831 |
psDBF->pszCurrentRecord = NULL; |
psDBF->pszCurrentRecord = NULL; |
832 |
|
|
833 |
psDBF->bNoHeader = TRUE; |
psDBF->bNoHeader = TRUE; |
834 |
|
psDBF->nLanguageDriver = 0x03; // ANSI |
835 |
|
|
836 |
return( psDBF ); |
return( psDBF ); |
837 |
} |
} |
1713 |
void SHPAPI_CALL |
void SHPAPI_CALL |
1714 |
DBFCloneEmptyEx(DBFHandle psDBF, DBFHandle newDBF) |
DBFCloneEmptyEx(DBFHandle psDBF, DBFHandle newDBF) |
1715 |
{ |
{ |
1716 |
if ( newDBF == NULL ) return ( NULL ); |
if ( newDBF == NULL ) return; |
1717 |
|
|
1718 |
newDBF->pszHeader = (char *) malloc ( 32 * psDBF->nFields ); |
newDBF->pszHeader = (char *) malloc ( 32 * psDBF->nFields ); |
1719 |
memcpy ( newDBF->pszHeader, psDBF->pszHeader, 32 * psDBF->nFields ); |
memcpy ( newDBF->pszHeader, psDBF->pszHeader, 32 * psDBF->nFields ); |