ocutil.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
  2. See the COPYRIGHT file for more information. */
  3. #ifndef OCUTIL_H
  4. #define OCUTIL_H 1
  5. /* Forward */
  6. struct OCstate;
  7. #define ocmax(x,y) ((x) > (y) ? (x) : (y))
  8. extern char* ocstrndup(const char* s, size_t len);
  9. extern int ocstrncmp(const char* s1, const char* s2, size_t len);
  10. extern size_t octypesize(OCtype etype);
  11. extern char* octypetostring(OCtype octype);
  12. extern char* octypetoddsstring(OCtype octype);
  13. extern char* ocerrstring(int err);
  14. extern OCerror ocsvcerrordata(struct OCstate*,char**,char**,long*);
  15. extern OCerror octypeprint(OCtype etype, char* buf, size_t bufsize, void* value);
  16. extern size_t xxdrsize(OCtype etype);
  17. extern size_t totaldimsize(OCnode*);
  18. extern void makedimlist(OClist* path, OClist* dims);
  19. extern int findbod(OCbytes* buffer, size_t*, size_t*);
  20. /* Reclaimers*/
  21. extern void freeOCnode(OCnode*,int);
  22. extern void ocfreeprojectionclause(OCprojectionclause* clause);
  23. /* Misc. */
  24. extern void ocdataddsmsg(struct OCstate*, struct OCtree*);
  25. #endif /*UTIL_H*/