00001
00004 #ifndef _DRMS_STATUSCODES_H
00005 #define _DRMS_STATUSCODES_H
00006
00007
00008 #define CHECKNULL(ptr) if (!(ptr)) return DRMS_ERROR_NULLPOINTER
00009 #define CHECKNULL_STAT(ptr,stat) do { \
00010 if (!(ptr)) { \
00011 if ((stat)) \
00012 *(stat) = DRMS_ERROR_NULLPOINTER; \
00013 fprintf(stderr,"ERROR at %s, line %d: "#ptr" = NULL.\n",__FILE__,__LINE__); \
00014 return NULL; \
00015 } \
00016 } while(0)
00017 #define CHECKSNPRINTF(code, len) do {\
00018 if ((code) >= (len)) { \
00019 fprintf(stderr, "WARNING: string is truncated in %s, line %d\n",__FILE__,__LINE__); \
00020 }\
00021 } while (0)
00022
00023
00024
00025
00026 #define DRMS_NO_ERROR (0)
00027 #define DRMS_SUCCESS (0)
00028
00029
00030 #define DRMS_VALUE_MISSING (-3)
00031 #define DRMS_BADSTRING (-2)
00032 #define DRMS_RANGE (-1)
00033 #define DRMS_EXACT (0)
00034 #define DRMS_INEXACT (1)
00035
00036
00037
00038 #define DRMS_ERROR_BADSEQUENCE (-10001)
00039 #define DRMS_ERROR_BADTEMPLATE (-10002)
00040
00043 #define DRMS_ERROR_UNKNOWNSERIES (-10003)
00044 #define DRMS_ERROR_UNKNOWNRECORD (-10004)
00045 #define DRMS_ERROR_UNKNOWNLINK (-10005)
00046 #define DRMS_ERROR_UNKNOWNKEYWORD (-10006)
00047 #define DRMS_ERROR_UNKNOWNSEGMENT (-10007)
00048 #define DRMS_ERROR_BADFIELDCOUNT (-10008)
00049 #define DRMS_ERROR_INVALIDLINKTYPE (-10009)
00050 #define DRMS_ERROR_BADLINK (-10010)
00051 #define DRMS_ERROR_UNKNOWNUNIT (-10011)
00052 #define DRMS_ERROR_QUERYFAILED (-10012)
00053 #define DRMS_ERROR_BADQUERYRESULT (-10013)
00054 #define DRMS_ERROR_UNKNOWNSU (-10014)
00055 #define DRMS_ERROR_RECORDREADONLY (-10015)
00056 #define DRMS_ERROR_KEYWORDREADONLY (-10016)
00057 #define DRMS_ERROR_NOTIMPLEMENTED (-10017)
00058 #define DRMS_ERROR_UNKNOWNPROTOCOL (-10018)
00059 #define DRMS_ERROR_NULLPOINTER (-10019)
00060 #define DRMS_ERROR_INVALIDTYPE (-10020)
00061 #define DRMS_ERROR_INVALIDDIMS (-10021)
00062 #define DRMS_ERROR_INVALIDACTION (-10022)
00063 #define DRMS_ERROR_COMMITREADONLY (-10023)
00064 #define DRMS_ERROR_SYNTAXERROR (-10024)
00065 #define DRMS_ERROR_BADRECORDCOUNT (-10025)
00066 #define DRMS_ERROR_NULLENV (-10026)
00067
00070 #define DRMS_ERROR_OUTOFMEMORY (-10027)
00071 #define DRMS_ERROR_UNKNOWNCOMPMETH (-10028)
00072 #define DRMS_ERROR_COMPRESSFAILED (-10029)
00073 #define DRMS_ERROR_INVALIDRANK (-10030)
00074 #define DRMS_ERROR_MKDIRFAILED (-10031)
00075 #define DRMS_ERROR_UNLINKFAILED (-10032)
00076 #define DRMS_ERROR_STATFAILED (-10033)
00077 #define DRMS_ERROR_SUMOPEN (-10034)
00078 #define DRMS_ERROR_SUMPUT (-10035)
00079 #define DRMS_ERROR_SUMGET (-10036)
00080 #define DRMS_ERROR_SUMALLOC (-10037)
00081 #define DRMS_ERROR_SUMWAIT (-10038)
00082 #define DRMS_ERROR_SUMBADOPCODE (-10039)
00083 #define DRMS_ERROR_INVALIDFILE (-10040)
00084 #define DRMS_ERROR_IOERROR (-10041)
00085 #define DRMS_ERROR_LINKNOTSET (-10042)
00086 #define DRMS_ERROR_BADJSD (-10043)
00087 #define DRMS_ERROR_INVALIDRECORD (-10044)
00088 #define DRMS_ERROR_INVALIDKEYWORD (-10045)
00089 #define DRMS_ERROR_INVALIDSEGMENT (-10046)
00090 #define DRMS_ERROR_INVALIDLINK (-10047)
00091
00094 #define DRMS_ERROR_INVALIDDATA (-10048)
00095 #define DRMS_ERROR_NODSDSSUPPORT (-10049)
00096 #define DRMS_ERROR_LIBDSDS (-10050)
00097 #define DRMS_ERROR_ABORT (-10051)
00098 #define DRMS_ERROR_CANTOPENLIBRARY (-10052)
00099 #define DRMS_ERROR_INVALIDRECSCOPETYPE (-10053)
00100 #define DRMS_ERROR_CANTCREATEHCON (-10054)
00101 #define DRMS_ERROR_EXPORT (-10055)
00102 #define DRMS_ERROR_FITSRW (-10056)
00103 #define DRMS_ERROR_CANTCREATERECORD (-10057)
00104 #define DRMS_ERROR_BADCHUNKSIZE (-10058)
00105 #define DRMS_ERROR_RECSETCHUNKRANGE (-10059)
00106 #define DRMS_ERROR_SEGMENT_DATA_MISMATCH (-10060)
00107 #define DRMS_ERROR_ARRAYCREATEFAILED (-10061)
00108 #define DRMS_ERROR_CANTCREATETASFILE (-10062)
00109 #define DRMS_ERROR_DSDSOFFLINE (-10063)
00110 #define DRMS_ERROR_UNKNOWNCMDARG (-10064)
00111 #define DRMS_ERROR_INVALIDCMDARGCONV (-10065)
00112 #define DRMS_ERROR_RECORDSETSUBSET (-10066)
00113 #define DRMS_ERROR_NOSEGMENT (-10067)
00114 #define DRMS_ERROR_RESERVEDFITSKW (-10069)
00115 #define DRMS_ERROR_FILECOPY (-10070)
00116 #define DRMS_ERROR_FILECREATE (-10071)
00117 #define DRMS_ERROR_SUMDELETESERIES (-10072)
00118 #define DRMS_ERROR_NOSTORAGEUNIT (-10073)
00119 #define DRMS_ERROR_INVALIDSU (-10074)
00120 #define DRMS_ERROR_BADDBQUERY (-10075)
00121
00122 #define DRMS_ERROR_SUMINFO (-10075)
00123 #define DRMS_ERROR_NEEDSUMS (-10076)
00124
00125 #define DRMS_ERROR_CANTCREATESHADOW (-10077)
00126
00127 #define DRMS_ERROR_UNKNOWNSHADOW (-10078)
00128 #define DRMS_ERROR_SEGMENTWRITE (-10079)
00129 #define DRMS_ERROR_CANTCONNECTTODB (-10080)
00130 #define DRMS_ERROR_CANTCOMPRESSFLOAT (-10081)
00131 #define DRMS_ERROR_SUMSTRYLATER (-10082)
00132 #define DRMS_ERROR_CANTMODPUBSERIES (-10083)
00133 #define DRMS_ERROR_PENDINGTAPEREAD (-10084)
00134 #define DRMS_ERROR_INVALIDSCALING (-10085)
00135 #define DRMS_ERROR_OVERFLOW (-10086)
00136 #define DRMS_ERROR_SHADOWTAB (-10089)
00137 #define DRMS_ERROR_DATASTRUCT (-10090)
00138 #define DRMS_ERROR_CANTCREATETHREAD (-10091)
00139 #define DRMS_ERROR_MODDBTRANS (-10092)
00140
00141
00142 #define DRMS_REMOTESUMS_TRYLATER (-30000)
00143 #define DRMS_ERROR_REMOTESUMS_MISSING (-30001)
00144 #define DRMS_ERROR_REMOTESUMS_INVALIDSUNUM (-30002)
00145 #define DRMS_ERROR_REMOTESUMS_REQUEST (-30003)
00146 #define DRMS_ERROR_REMOTESUMS_INITIALIZATION (-30004)
00147
00148
00149 #define DRMS_WARNING_BADBLANK (10000)
00150 #define DRMS_QUERY_TRUNCATED (10001)
00151 #endif
00152
00153