GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72993
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dbfopen.c File Reference
#include <grass/shapefil.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
Include dependency graph for dbfopen.c:

Go to the source code of this file.

Macros

#define CPLsprintf   sprintf
 
#define FALSE   0
 
#define TRUE   1
 

Functions

void SHPAPI_CALL DBFUpdateHeader (DBFHandle psDBF)
 
void SHPAPI_CALL DBFSetLastModifiedDate (DBFHandle psDBF, int nYYSince1900, int nMM, int nDD)
 
DBFHandle SHPAPI_CALL DBFOpen (const char *pszFilename, const char *pszAccess)
 
DBFHandle SHPAPI_CALL DBFOpenLL (const char *pszFilename, const char *pszAccess, SAHooks *psHooks)
 
void SHPAPI_CALL DBFClose (DBFHandle psDBF)
 
DBFHandle SHPAPI_CALL DBFCreate (const char *pszFilename)
 
DBFHandle SHPAPI_CALL DBFCreateEx (const char *pszFilename, const char *pszCodePage)
 
DBFHandle SHPAPI_CALL DBFCreateLL (const char *pszFilename, const char *pszCodePage, SAHooks *psHooks)
 
int SHPAPI_CALL DBFAddField (DBFHandle psDBF, const char *pszFieldName, DBFFieldType eType, int nWidth, int nDecimals)
 
int SHPAPI_CALL DBFAddNativeFieldType (DBFHandle psDBF, const char *pszFieldName, char chType, int nWidth, int nDecimals)
 
int SHPAPI_CALL DBFReadIntegerAttribute (DBFHandle psDBF, int iRecord, int iField)
 
double SHPAPI_CALL DBFReadDoubleAttribute (DBFHandle psDBF, int iRecord, int iField)
 
const char SHPAPI_CALL1DBFReadStringAttribute (DBFHandle psDBF, int iRecord, int iField){return((const char *) DBFReadAttribute(psDBF, iRecord, iField, 'C')
 
const char SHPAPI_CALL1DBFReadLogicalAttribute (DBFHandle psDBF, int iRecord, int iField){return((const char *) DBFReadAttribute(psDBF, iRecord, iField, 'L')
 
int SHPAPI_CALL DBFIsAttributeNULL (DBFHandle psDBF, int iRecord, int iField)
 
int SHPAPI_CALL DBFGetFieldCount (DBFHandle psDBF)
 
int SHPAPI_CALL DBFGetRecordCount (DBFHandle psDBF)
 
DBFFieldType SHPAPI_CALL DBFGetFieldInfo (DBFHandle psDBF, int iField, char *pszFieldName, int *pnWidth, int *pnDecimals)
 
int SHPAPI_CALL DBFWriteAttributeDirectly (DBFHandle psDBF, int hEntity, int iField, void *pValue)
 
int SHPAPI_CALL DBFWriteDoubleAttribute (DBFHandle psDBF, int iRecord, int iField, double dValue)
 
int SHPAPI_CALL DBFWriteIntegerAttribute (DBFHandle psDBF, int iRecord, int iField, int nValue)
 
int SHPAPI_CALL DBFWriteStringAttribute (DBFHandle psDBF, int iRecord, int iField, const char *pszValue)
 
int SHPAPI_CALL DBFWriteNULLAttribute (DBFHandle psDBF, int iRecord, int iField)
 
int SHPAPI_CALL DBFWriteLogicalAttribute (DBFHandle psDBF, int iRecord, int iField, const char lValue)
 
int SHPAPI_CALL DBFWriteTuple (DBFHandle psDBF, int hEntity, void *pRawTuple)
 
const char SHPAPI_CALL1DBFReadTuple (DBFHandle psDBF, int hEntity){return(NULL
 
 return (const char *)
 
char SHPAPI_CALL DBFGetNativeFieldType (DBFHandle psDBF, int iField)
 
int SHPAPI_CALL DBFGetFieldIndex (DBFHandle psDBF, const char *pszFieldName)
 
int SHPAPI_CALL DBFIsRecordDeleted (DBFHandle psDBF, int iShape)
 
int SHPAPI_CALL DBFMarkRecordDeleted (DBFHandle psDBF, int iShape, int bIsDeleted)
 
const char SHPAPI_CALL1DBFGetCodePage (DBFHandle psDBF){return NULL;return psDBF->pszCodePage;}int SHPAPI_CALLDBFDeleteField(DBFHandle psDBF, int iField
 
int SHPAPI_CALL DBFReorderFields (DBFHandle psDBF, int *panMap)
 
int SHPAPI_CALL DBFAlterFieldDefn (DBFHandle psDBF, int iField, const char *pszFieldName, char chType, int nWidth, int nDecimals)
 

Variables

return NULL
 

Macro Definition Documentation

#define CPLsprintf   sprintf

Definition at line 170 of file dbfopen.c.

Function Documentation

int SHPAPI_CALL DBFAddField ( DBFHandle  psDBF,
const char *  pszFieldName,
DBFFieldType  eType,
int  nWidth,
int  nDecimals 
)

Definition at line 809 of file dbfopen.c.

References DBFAddNativeFieldType(), FTLogical, and FTString.

DBFHandle SHPAPI_CALL DBFCreate ( const char *  pszFilename)

Definition at line 662 of file dbfopen.c.

References DBFCreateEx().

DBFHandle SHPAPI_CALL DBFCreateEx ( const char *  pszFilename,
const char *  pszCodePage 
)

Definition at line 675 of file dbfopen.c.

References DBFCreateLL(), and SASetupDefaultHooks().

Referenced by DBFCreate().

const char SHPAPI_CALL1* DBFGetCodePage ( DBFHandle  psDBF)

Definition at line 1810 of file dbfopen.c.

References NULL.

int SHPAPI_CALL DBFGetFieldCount ( DBFHandle  psDBF)

Definition at line 1225 of file dbfopen.c.

References DBFInfo::nFields.

Referenced by DBFGetFieldIndex().

int SHPAPI_CALL DBFGetFieldIndex ( DBFHandle  psDBF,
const char *  pszFieldName 
)

Definition at line 1714 of file dbfopen.c.

References DBFGetFieldCount(), DBFGetFieldInfo(), name, and NULL.

DBFFieldType SHPAPI_CALL DBFGetFieldInfo ( DBFHandle  psDBF,
int  iField,
char *  pszFieldName,
int pnWidth,
int pnDecimals 
)
char SHPAPI_CALL DBFGetNativeFieldType ( DBFHandle  psDBF,
int  iField 
)

Definition at line 1680 of file dbfopen.c.

References DBFInfo::pachFieldType.

int SHPAPI_CALL DBFGetRecordCount ( DBFHandle  psDBF)

Definition at line 1238 of file dbfopen.c.

References DBFInfo::nRecords.

int SHPAPI_CALL DBFIsAttributeNULL ( DBFHandle  psDBF,
int  iRecord,
int  iField 
)

Definition at line 1205 of file dbfopen.c.

References DBFReadStringAttribute(), NULL, DBFInfo::pachFieldType, and TRUE.

int SHPAPI_CALL DBFIsRecordDeleted ( DBFHandle  psDBF,
int  iShape 
)

Definition at line 1743 of file dbfopen.c.

References FALSE, DBFInfo::nRecords, DBFInfo::pszCurrentRecord, and TRUE.

int SHPAPI_CALL DBFMarkRecordDeleted ( DBFHandle  psDBF,
int  iShape,
int  bIsDeleted 
)
DBFHandle SHPAPI_CALL DBFOpen ( const char *  pszFilename,
const char *  pszAccess 
)

Definition at line 395 of file dbfopen.c.

References DBFOpenLL(), and SASetupDefaultHooks().

double SHPAPI_CALL DBFReadDoubleAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
)

Definition at line 1110 of file dbfopen.c.

References NULL.

int SHPAPI_CALL DBFReadIntegerAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
)

Definition at line 1090 of file dbfopen.c.

References NULL.

const char SHPAPI_CALL1* DBFReadLogicalAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
) const
const char SHPAPI_CALL1* DBFReadStringAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
) const

Referenced by DBFIsAttributeNULL().

const char SHPAPI_CALL1* DBFReadTuple ( DBFHandle  psDBF,
int  hEntity 
)
void SHPAPI_CALL DBFSetLastModifiedDate ( DBFHandle  psDBF,
int  nYYSince1900,
int  nMM,
int  nDD 
)

Definition at line 381 of file dbfopen.c.

References DBFInfo::nUpdateDay, DBFInfo::nUpdateMonth, and DBFInfo::nUpdateYearSince1900.

Referenced by DBFCreateLL(), and DBFOpenLL().

int SHPAPI_CALL DBFWriteAttributeDirectly ( DBFHandle  psDBF,
int  hEntity,
int  iField,
void *  pValue 
)
int SHPAPI_CALL DBFWriteDoubleAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField,
double  dValue 
)

Definition at line 1486 of file dbfopen.c.

int SHPAPI_CALL DBFWriteIntegerAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField,
int  nValue 
)

Definition at line 1500 of file dbfopen.c.

int SHPAPI_CALL DBFWriteLogicalAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField,
const char  lValue 
)

Definition at line 1543 of file dbfopen.c.

int SHPAPI_CALL DBFWriteNULLAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField 
)

Definition at line 1530 of file dbfopen.c.

References NULL.

int SHPAPI_CALL DBFWriteStringAttribute ( DBFHandle  psDBF,
int  iRecord,
int  iField,
const char *  pszValue 
)

Definition at line 1516 of file dbfopen.c.

return ( const char *  )

Definition at line 1621 of file dbfopen.c.

Variable Documentation

return NULL

Definition at line 1619 of file dbfopen.c.