Changeset 16143
- Timestamp:
- Jan 18, 2008, 3:11:53 PM (18 years ago)
- File:
-
- 1 edited
-
branches/end_stage/ippTools/src/pxtools.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/end_stage/ippTools/src/pxtools.h
r16125 r16143 114 114 } \ 115 115 \ 116 if (required && (var != max)) { \116 if (required && (var == max)) { \ 117 117 psError(PS_ERR_UNKNOWN, true, "%s is required", key); \ 118 118 return ret; \ … … 170 170 171 171 #define PXOPT_COPY_PRIMITIVE(from, to, type, suffix, oldname, newname, comment) \ 172 { \ 173 bool status = false; \ 174 type var = psMetadataLookup##suffix(&status, from, oldname); \ 175 if (!status) { \ 176 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for " oldname); \ 177 return false; \ 178 } \ 179 if (!psMetadataAdd##suffix(to, PS_LIST_TAIL, newname, PS_META_DUPLICATE_OK, comment, var)) { \ 180 psError(PS_ERR_UNKNOWN, false, "failed to add item " newname); \ 181 psFree(to); \ 182 return false; \ 183 } \ 184 } 185 186 #define PXOPT_COPY_V(from, to, type, suffix, oldname, newname, comment) \ 172 187 { \ 173 188 bool status = false; \ … … 183 198 return false; \ 184 199 } \ 185 } \ 186 } 187 188 #define PXOPT_COPY_V(from, to, type, suffix, oldname, newname, comment) \ 189 PXOPT_COPY_PRIMITIVE(from, to, type*, suffix, oldname, newname, comment) \ 200 }\ 201 } 190 202 191 203 #define PXOPT_COPY_F(from, to, type, oldname, newname, comment) \ … … 213 225 214 226 #define PXOPT_COPY_TIME(from, to, oldname, newname, comment) \ 215 PXOPT_COPY_V(from, to, psTime , Time, oldname, newname, comment)227 PXOPT_COPY_V(from, to, psTime *, Time, oldname, newname, comment) 216 228 217 229 #define PXOPT_COPY_STR(from, to, oldname, newname, comment) \ 218 PXOPT_COPY_PRIMITIVE(from, to, psString, Str, oldname, newname, comment) 230 PXOPT_COPY_V(from, to, psString, Str, oldname, newname, comment) 231 232 #define PXOPT_COPY_S16(from, to, oldname, newname, comment) \ 233 PXOPT_COPY_PRIMITIVE(from, to, psS16, S16, oldname, newname, comment) 234 235 #define PXOPT_COPY_S32(from, to, oldname, newname, comment) \ 236 PXOPT_COPY_PRIMITIVE(from, to, psS32, S32, oldname, newname, comment) 237 238 #define PXOPT_COPY_S64(from, to, oldname, newname, comment) \ 239 PXOPT_COPY_PRIMITIVE(from, to, psS64, S64, oldname, newname, comment) 240 241 #define PXOPT_COPY_U16(from, to, oldname, newname, comment) \ 242 PXOPT_COPY_PRIMITIVE(from, to, psU16, U16, oldname, newname, comment) 243 244 #define PXOPT_COPY_U32(from, to, oldname, newname, comment) \ 245 PXOPT_COPY_PRIMITIVE(from, to, psU32, U32, oldname, newname, comment) 246 247 #define PXOPT_COPY_U64(from, to, oldname, newname, comment) \ 248 PXOPT_COPY_PRIMITIVE(from, to, psU64, U64, oldname, newname, comment) 219 249 220 250 #endif // PXTOOLS_H
Note:
See TracChangeset
for help on using the changeset viewer.
