MISR Toolkit  1.5.1
Macros
hdfi.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include "H4api_adpt.h"

Go to the source code of this file.

Macros

#define DFMT_SUN   0x1111
 
#define DFMT_SUN_INTEL   0x4441
 
#define DFMT_ALLIANT   0x1111
 
#define DFMT_IRIX   0x1111
 
#define DFMT_APOLLO   0x1111
 
#define DFMT_IBM6000   0x1111
 
#define DFMT_HP9000   0x1111
 
#define DFMT_CONVEXNATIVE   0x5511
 
#define DFMT_CONVEX   0x1111
 
#define DFMT_UNICOS   0x3331
 
#define DFMT_UNICOSIEEE   0x1831
 
#define DFMT_CTSS   0x3331
 
#define DFMT_VAX   0x2221
 
#define DFMT_MIPSEL   0x4441
 
#define DFMT_PC   0x4441
 
#define DFMT_APPLE   0x1111
 
#define DFMT_APPLE_INTEL   0x4441
 
#define DFMT_MAC   0x1111
 
#define DFMT_SUN386   0x4441
 
#define DFMT_NEXT   0x1111
 
#define DFMT_MOTOROLA   0x1111
 
#define DFMT_ALPHA   0x4441
 
#define DFMT_VP   0x6611
 
#define DFMT_I860   0x4441
 
#define DFMT_CRAYMPP   0x1171
 
#define DFMT_IA64   0x4441
 
#define DFMT_LINUX64   0x4441
 
#define DFMT_POWERPC64   0x1111
 
#define UNIXUNBUFIO   1
 
#define UNIXBUFIO   2
 
#define MACIO   3
 
#define INT16ENCODE(p, i)
 
#define UINT16ENCODE(p, i)   { *(p) = (uint8)(((uintn)(i) >> 8) & 0xff); (p)++; *(p) = (uint8)((i) & 0xff); (p)++; }
 
#define INT32ENCODE(p, i)
 
#define UINT32ENCODE(p, i)
 
#define NBYTEENCODE(d, s, n)   { HDmemcpy(d,s,n); p+=n }
 
#define INT16DECODE(p, i)
 
#define UINT16DECODE(p, i)
 
#define INT32DECODE(p, i)
 
#define UINT32DECODE(p, i)
 
#define NBYTEDECODE(s, d, n)   { HDmemcpy(d,s,n); p+=n }
 
#define FCALLKEYW   /*NONE*/
 
#define FRETVAL(x)   x
 
#define FNAME(x)   x
 
#define MIN(a, b)   (((a)<(b)) ? (a) : (b))
 
#define MAX(a, b)   (((a)>(b)) ? (a) : (b))
 
#define CONSTR(v, s)   static const char v[]=s
 
#define HDgetspace   HDmalloc
 
#define HDclearspace   HDcalloc
 
#define HDregetspace   HDrealloc
 
#define HDfreespace   HDfree
 
#define HDmalloc(s)   (malloc((size_t)s))
 
#define HDcalloc(a, b)   (calloc((size_t)a,(size_t)b))
 
#define HDfree(p)   (free((void*)p))
 
#define HDrealloc(p, s)   (realloc((void*)p,(size_t)s))
 
#define HDfreenclear(p)   { if((p)!=NULL) HDfree(p); p=NULL; }
 
#define HDstrcat(s1, s2)   (strcat((s1),(s2)))
 
#define HDstrcmp(s, t)   (strcmp((s),(t)))
 
#define HDstrcpy(s, d)   (strcpy((s),(d)))
 
#define HDstrlen(s)   (strlen((const char *)(s)))
 
#define HDstrncmp(s1, s2, n)   (strncmp((s1),(s2),(n)))
 
#define HDstrncpy(s1, s2, n)   (strncpy((s1),(s2),(n)))
 
#define HDstrchr(s, c)   (strchr((s),(c)))
 
#define HDstrrchr(s, c)   (strrchr((s),(c)))
 
#define HDstrtol(s, e, b)   (strtol((s),(e),(b)))
 
#define HDstrdup(s)   ((char *)strdup((const char *)(s)))
 
#define HDmemcpy(dst, src, n)   (memcpy((void *)(dst),(const void *)(src),(size_t)(n)))
 
#define HDmemset(dst, c, n)   (memset((void *)(dst),(intn)(c),(size_t)(n)))
 
#define HDmemcmp(dst, src, n)   (memcmp((const void *)(dst),(const void *)(src),(size_t)(n)))
 
#define HDstat(path, result)   (stat(path, result))
 
#define HDgetenv(s1)   (getenv(s1))
 
#define HDputenv(s1)   (putenv(s1))
 
#define HDltoa(v)   (ltoa(v))
 
#define HDatexit(f)   (atexit(f))
 
#define DFSDnumber   DFSDndatasets
 

Macro Definition Documentation

◆ CONSTR

#define CONSTR (   v,
 
)    static const char v[]=s

Definition at line 1527 of file hdfi.h.

◆ DFMT_ALLIANT

#define DFMT_ALLIANT   0x1111

Definition at line 53 of file hdfi.h.

◆ DFMT_ALPHA

#define DFMT_ALPHA   0x4441

Definition at line 72 of file hdfi.h.

◆ DFMT_APOLLO

#define DFMT_APOLLO   0x1111

Definition at line 55 of file hdfi.h.

◆ DFMT_APPLE

#define DFMT_APPLE   0x1111

Definition at line 66 of file hdfi.h.

◆ DFMT_APPLE_INTEL

#define DFMT_APPLE_INTEL   0x4441

Definition at line 67 of file hdfi.h.

◆ DFMT_CONVEX

#define DFMT_CONVEX   0x1111

Definition at line 59 of file hdfi.h.

◆ DFMT_CONVEXNATIVE

#define DFMT_CONVEXNATIVE   0x5511

Definition at line 58 of file hdfi.h.

◆ DFMT_CRAYMPP

#define DFMT_CRAYMPP   0x1171

Definition at line 75 of file hdfi.h.

◆ DFMT_CTSS

#define DFMT_CTSS   0x3331

Definition at line 62 of file hdfi.h.

◆ DFMT_HP9000

#define DFMT_HP9000   0x1111

Definition at line 57 of file hdfi.h.

◆ DFMT_I860

#define DFMT_I860   0x4441

Definition at line 74 of file hdfi.h.

◆ DFMT_IA64

#define DFMT_IA64   0x4441

Definition at line 76 of file hdfi.h.

◆ DFMT_IBM6000

#define DFMT_IBM6000   0x1111

Definition at line 56 of file hdfi.h.

◆ DFMT_IRIX

#define DFMT_IRIX   0x1111

Definition at line 54 of file hdfi.h.

◆ DFMT_LINUX64

#define DFMT_LINUX64   0x4441

Definition at line 77 of file hdfi.h.

◆ DFMT_MAC

#define DFMT_MAC   0x1111

Definition at line 68 of file hdfi.h.

◆ DFMT_MIPSEL

#define DFMT_MIPSEL   0x4441

Definition at line 64 of file hdfi.h.

◆ DFMT_MOTOROLA

#define DFMT_MOTOROLA   0x1111

Definition at line 71 of file hdfi.h.

◆ DFMT_NEXT

#define DFMT_NEXT   0x1111

Definition at line 70 of file hdfi.h.

◆ DFMT_PC

#define DFMT_PC   0x4441

Definition at line 65 of file hdfi.h.

◆ DFMT_POWERPC64

#define DFMT_POWERPC64   0x1111

Definition at line 78 of file hdfi.h.

◆ DFMT_SUN

#define DFMT_SUN   0x1111

Definition at line 51 of file hdfi.h.

◆ DFMT_SUN386

#define DFMT_SUN386   0x4441

Definition at line 69 of file hdfi.h.

◆ DFMT_SUN_INTEL

#define DFMT_SUN_INTEL   0x4441

Definition at line 52 of file hdfi.h.

◆ DFMT_UNICOS

#define DFMT_UNICOS   0x3331

Definition at line 60 of file hdfi.h.

◆ DFMT_UNICOSIEEE

#define DFMT_UNICOSIEEE   0x1831

Definition at line 61 of file hdfi.h.

◆ DFMT_VAX

#define DFMT_VAX   0x2221

Definition at line 63 of file hdfi.h.

◆ DFMT_VP

#define DFMT_VP   0x6611

Definition at line 73 of file hdfi.h.

◆ DFSDnumber

#define DFSDnumber   DFSDndatasets

Definition at line 1594 of file hdfi.h.

◆ FCALLKEYW

#define FCALLKEYW   /*NONE*/

Definition at line 1478 of file hdfi.h.

◆ FNAME

#define FNAME (   x)    x

Definition at line 1501 of file hdfi.h.

◆ FRETVAL

#define FRETVAL (   x)    x

Definition at line 1479 of file hdfi.h.

◆ HDatexit

#define HDatexit (   f)    (atexit(f))

Definition at line 1590 of file hdfi.h.

◆ HDcalloc

#define HDcalloc (   a,
  b 
)    (calloc((size_t)a,(size_t)b))

Definition at line 1541 of file hdfi.h.

◆ HDclearspace

#define HDclearspace   HDcalloc

Definition at line 1532 of file hdfi.h.

◆ HDfree

#define HDfree (   p)    (free((void*)p))

Definition at line 1542 of file hdfi.h.

◆ HDfreenclear

#define HDfreenclear (   p)    { if((p)!=NULL) HDfree(p); p=NULL; }

Definition at line 1546 of file hdfi.h.

◆ HDfreespace

#define HDfreespace   HDfree

Definition at line 1534 of file hdfi.h.

◆ HDgetenv

#define HDgetenv (   s1)    (getenv(s1))

Definition at line 1584 of file hdfi.h.

◆ HDgetspace

#define HDgetspace   HDmalloc

Definition at line 1531 of file hdfi.h.

◆ HDltoa

#define HDltoa (   v)    (ltoa(v))

Definition at line 1586 of file hdfi.h.

◆ HDmalloc

#define HDmalloc (   s)    (malloc((size_t)s))

Definition at line 1540 of file hdfi.h.

◆ HDmemcmp

#define HDmemcmp (   dst,
  src,
  n 
)    (memcmp((const void *)(dst),(const void *)(src),(size_t)(n)))

Definition at line 1573 of file hdfi.h.

◆ HDmemcpy

#define HDmemcpy (   dst,
  src,
  n 
)    (memcpy((void *)(dst),(const void *)(src),(size_t)(n)))

Definition at line 1571 of file hdfi.h.

◆ HDmemset

#define HDmemset (   dst,
  c,
  n 
)    (memset((void *)(dst),(intn)(c),(size_t)(n)))

Definition at line 1572 of file hdfi.h.

◆ HDputenv

#define HDputenv (   s1)    (putenv(s1))

Definition at line 1585 of file hdfi.h.

◆ HDrealloc

#define HDrealloc (   p,
 
)    (realloc((void*)p,(size_t)s))

Definition at line 1543 of file hdfi.h.

◆ HDregetspace

#define HDregetspace   HDrealloc

Definition at line 1533 of file hdfi.h.

◆ HDstat

#define HDstat (   path,
  result 
)    (stat(path, result))

Definition at line 1582 of file hdfi.h.

◆ HDstrcat

#define HDstrcat (   s1,
  s2 
)    (strcat((s1),(s2)))

Definition at line 1552 of file hdfi.h.

◆ HDstrchr

#define HDstrchr (   s,
 
)    (strchr((s),(c)))

Definition at line 1558 of file hdfi.h.

◆ HDstrcmp

#define HDstrcmp (   s,
 
)    (strcmp((s),(t)))

Definition at line 1553 of file hdfi.h.

◆ HDstrcpy

#define HDstrcpy (   s,
 
)    (strcpy((s),(d)))

Definition at line 1554 of file hdfi.h.

◆ HDstrdup

#define HDstrdup (   s)    ((char *)strdup((const char *)(s)))

Definition at line 1563 of file hdfi.h.

◆ HDstrlen

#define HDstrlen (   s)    (strlen((const char *)(s)))

Definition at line 1555 of file hdfi.h.

◆ HDstrncmp

#define HDstrncmp (   s1,
  s2,
  n 
)    (strncmp((s1),(s2),(n)))

Definition at line 1556 of file hdfi.h.

◆ HDstrncpy

#define HDstrncpy (   s1,
  s2,
  n 
)    (strncpy((s1),(s2),(n)))

Definition at line 1557 of file hdfi.h.

◆ HDstrrchr

#define HDstrrchr (   s,
 
)    (strrchr((s),(c)))

Definition at line 1559 of file hdfi.h.

◆ HDstrtol

#define HDstrtol (   s,
  e,
  b 
)    (strtol((s),(e),(b)))

Definition at line 1560 of file hdfi.h.

◆ INT16DECODE

#define INT16DECODE (   p,
 
)
Value:
{ (i) = ((*(p) & 0x80) ? ~0xffff : 0x00) | ((int16)(*(p) & 0xff) << 8); (p)++; \
(i) |= (int16)((*(p) & 0xff)); (p)++; }

Definition at line 1430 of file hdfi.h.

◆ INT16ENCODE

#define INT16ENCODE (   p,
 
)
Value:
{ *(p) = (uint8)(((uintn)(i) >> 8) & 0xff); (p)++; \
*(p) = (uint8)((uintn)(i) & 0xff); (p)++; }

Definition at line 1400 of file hdfi.h.

◆ INT32DECODE

#define INT32DECODE (   p,
 
)
Value:
{ (i) = ((*(p) & 0x80) ? ~0xffffffff : 0x00) | ((int32)(*(p) & 0xff) << 24); (p)++; \
(i) |= ((int32)(*(p) & 0xff) << 16); (p)++; \
(i) |= ((int32)(*(p) & 0xff) << 8); (p)++; \
(i) |= (*(p) & 0xff); (p)++; }

Definition at line 1438 of file hdfi.h.

◆ INT32ENCODE

#define INT32ENCODE (   p,
 
)
Value:
{ *(p) = (uint8)(((uint32)(i) >> 24) & 0xff); (p)++; \
*(p) = (uint8)(((uint32)(i) >> 16) & 0xff); (p)++; \
*(p) = (uint8)(((uint32)(i) >> 8) & 0xff); (p)++; \
*(p) = (uint8)((uint32)(i) & 0xff); (p)++; }

Definition at line 1407 of file hdfi.h.

◆ MACIO

#define MACIO   3

Definition at line 83 of file hdfi.h.

◆ MAX

#define MAX (   a,
  b 
)    (((a)>(b)) ? (a) : (b))

Definition at line 1511 of file hdfi.h.

◆ MIN

#define MIN (   a,
  b 
)    (((a)<(b)) ? (a) : (b))

Definition at line 1508 of file hdfi.h.

◆ NBYTEDECODE

#define NBYTEDECODE (   s,
  d,
  n 
)    { HDmemcpy(d,s,n); p+=n }

Definition at line 1452 of file hdfi.h.

◆ NBYTEENCODE

#define NBYTEENCODE (   d,
  s,
  n 
)    { HDmemcpy(d,s,n); p+=n }

Definition at line 1419 of file hdfi.h.

◆ UINT16DECODE

#define UINT16DECODE (   p,
 
)
Value:
{ (i) = (uint16)((*(p) & 0xff) << 8); (p)++; \
(i) |= (uint16)(*(p) & 0xff); (p)++; }

Definition at line 1434 of file hdfi.h.

◆ UINT16ENCODE

#define UINT16ENCODE (   p,
 
)    { *(p) = (uint8)(((uintn)(i) >> 8) & 0xff); (p)++; *(p) = (uint8)((i) & 0xff); (p)++; }

Definition at line 1404 of file hdfi.h.

◆ UINT32DECODE

#define UINT32DECODE (   p,
 
)
Value:
{ (i) = ((uint32)(*(p) & 0xff) << 24); (p)++; \
(i) |= ((uint32)(*(p) & 0xff) << 16); (p)++; \
(i) |= ((uint32)(*(p) & 0xff) << 8); (p)++; \
(i) |= (uint32)(*(p) & 0xff); (p)++; }

Definition at line 1444 of file hdfi.h.

◆ UINT32ENCODE

#define UINT32ENCODE (   p,
 
)
Value:
{ *(p) = (uint8)(((i) >> 24) & 0xff); (p)++; \
*(p) = (uint8)(((i) >> 16) & 0xff); (p)++; \
*(p) = (uint8)(((i) >> 8) & 0xff); (p)++; \
*(p) = (uint8)((i) & 0xff); (p)++; }

Definition at line 1413 of file hdfi.h.

◆ UNIXBUFIO

#define UNIXBUFIO   2

Definition at line 82 of file hdfi.h.

◆ UNIXUNBUFIO

#define UNIXUNBUFIO   1

Definition at line 81 of file hdfi.h.


MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:53