Mercurial > hg > audiodb
comparison audioDB.h @ 166:ea6936b82915
Defensive treatment of SOAP input
Ensure that things that are assumed to be supplied are actually
supplied, so that we will fail gracefully rather than trip over broken
assumptions...
author | mas01cr |
---|---|
date | Tue, 06 Nov 2007 16:29:56 +0000 |
parents | a5d5a55a412d |
children | cdd441dcc9a8 |
comparison
equal
deleted
inserted
replaced
165:324699d56429 | 166:ea6936b82915 |
---|---|
80 // Macros | 80 // Macros |
81 #define O2_ACTION(a) (strcmp(command,a)==0) | 81 #define O2_ACTION(a) (strcmp(command,a)==0) |
82 | 82 |
83 #define ALIGN_UP(x,w) ((x) + ((1<<w)-1) & ~((1<<w)-1)) | 83 #define ALIGN_UP(x,w) ((x) + ((1<<w)-1) & ~((1<<w)-1)) |
84 #define ALIGN_DOWN(x,w) ((x) & ~((1<<w)-1)) | 84 #define ALIGN_DOWN(x,w) ((x) & ~((1<<w)-1)) |
85 | |
86 #define ENSURE_STRING(x) ((x) ? (x) : "") | |
85 | 87 |
86 using namespace std; | 88 using namespace std; |
87 | 89 |
88 typedef struct dbTableHeader{ | 90 typedef struct dbTableHeader{ |
89 uint32_t magic; | 91 uint32_t magic; |