Logo Search packages:      
Sourcecode: hmisc version File versions  Download package

Hmisc.h

#ifndef _HMISC_H_
#define _HMISC_H_

#include <string.h>
#include <errno.h>
#include <S.h>
#include <R.h>
#include <Rdefines.h>

#ifdef _SPLUS_
#  define STRING_ELT(x,i) (CHARACTER_POINTER(x)[i])
#  define TO_CHAR(x) (x)
#  define translateChar(x) (x)
#  define IS_NA_LGL(x) (is_na(&x, LGL))
#  define SET_NA_LGL(x) (na_set(&x, LGL))
   typedef s_object *SEXP ;
   typedef char *STR_ELT;
#else
#  define TO_CHAR(x) (CHAR(x))
#  define STR_ELT SEXP   
#  define IS_NA_LGL(x) (x == NA_LOGICAL)
#  define SET_NA_LGL(x) (x = NA_LOGICAL)
#endif

#define MAXELTSIZE 8192

00027 typedef struct 
{
     char *data;
     size_t bufsize;
     size_t defaultSize;
} Hmisc_StringBuffer;

char *Hmisc_AllocStringBuffer(size_t blen, Hmisc_StringBuffer *buf);

void Hmisc_FreeStringBuffer(Hmisc_StringBuffer *buf);

#endif

Generated by  Doxygen 1.6.0   Back to index