1367{
1368 int i, j;
1369 unsigned char *pabyRec;
1370
1371
1372
1373
1374 if (hEntity < 0 || hEntity > psDBF->nRecords)
1376
1377 if (psDBF->bNoHeader)
1379
1380
1381
1382
1383 if (hEntity == psDBF->nRecords)
1384 {
1387
1388 psDBF->nRecords++;
1389 for (i = 0; i < psDBF->nRecordLength; i++)
1390 psDBF->pszCurrentRecord[i] = ' ';
1391
1392 psDBF->nCurrentRecord = hEntity;
1393 }
1394
1395
1396
1397
1398
1401
1402 pabyRec = (unsigned char *)psDBF->pszCurrentRecord;
1403
1404
1405
1406
1407 if ((int)strlen((char *)pValue) > psDBF->panFieldSize[iField])
1408 j = psDBF->panFieldSize[iField];
1409 else
1410 {
1411 memset(pabyRec + psDBF->panFieldOffset[iField], ' ', psDBF->panFieldSize[iField]);
1412 j = strlen((char *)pValue);
1413 }
1414
1415 memcpy((char *)(pabyRec + psDBF->panFieldOffset[iField]), (char *)pValue, j);
1416
1417 psDBF->bCurrentRecordModified =
TRUE;
1418 psDBF->bUpdated =
TRUE;
1419
1421}
static int DBFLoadRecord(DBFHandle psDBF, int iRecord)
static void DBFWriteHeader(DBFHandle psDBF)
static int DBFFlushRecord(DBFHandle psDBF)