Mercurial > hg > audiodb
comparison soap.cpp @ 345:30384a82983a
Quieten newer compilers with MORE CONST CORRECTNESS.
(except, haha, gengetopt doesn't generate const-correct function
prototypes. Happy happy joy joy. Put in an explicit cast when calling
cmdline_parser().)
Adjust gengetopt.in and Makefile to support both old (2.19) and new
(2.22) versions of gengetopt. This only really means that we've lost -H
as a help switch; --help still works.
author | mas01cr |
---|---|
date | Wed, 08 Oct 2008 11:06:11 +0000 |
parents | cdb31e8b94e3 |
children | 75a59f58319e 4871a3ed9e36 |
comparison
equal
deleted
inserted
replaced
344:223a5994a962 | 345:30384a82983a |
---|---|
141 char str[256]; \ | 141 char str[256]; \ |
142 snprintf(str, 256, "%f", val); | 142 snprintf(str, 256, "%f", val); |
143 | 143 |
144 /* Server definitions */ | 144 /* Server definitions */ |
145 int adb__status(struct soap* soap, xsd__string dbName, adb__statusResponse &adbStatusResponse){ | 145 int adb__status(struct soap* soap, xsd__string dbName, adb__statusResponse &adbStatusResponse){ |
146 char* const argv[]={"./audioDB",COM_STATUS,"-d",dbName}; | 146 const char *const argv[]={"./audioDB",COM_STATUS,"-d",dbName}; |
147 const unsigned argc = 4; | 147 const unsigned argc = 4; |
148 try { | 148 try { |
149 audioDB(argc, argv, &adbStatusResponse); | 149 audioDB(argc, argv, &adbStatusResponse); |
150 return SOAP_OK; | 150 return SOAP_OK; |
151 } catch(char *err) { | 151 } catch(char *err) { |
158 adb__lisztResponse& adbLisztResponse){ | 158 adb__lisztResponse& adbLisztResponse){ |
159 | 159 |
160 INTSTRINGIFY(lisztOffset, lisztOffsetStr); | 160 INTSTRINGIFY(lisztOffset, lisztOffsetStr); |
161 INTSTRINGIFY(lisztLength, lisztLengthStr); | 161 INTSTRINGIFY(lisztLength, lisztLengthStr); |
162 | 162 |
163 char* const argv[] = {"./audioDB", COM_LISZT, "-d",dbName, "--lisztOffset", lisztOffsetStr, "--lisztLength", lisztLengthStr}; | 163 const char* const argv[] = {"./audioDB", COM_LISZT, "-d",dbName, "--lisztOffset", lisztOffsetStr, "--lisztLength", lisztLengthStr}; |
164 const unsigned argc = 8; | 164 const unsigned argc = 8; |
165 try{ | 165 try{ |
166 audioDB(argc, argv, &adbLisztResponse); | 166 audioDB(argc, argv, &adbLisztResponse); |
167 return SOAP_OK; | 167 return SOAP_OK; |
168 } catch(char *err) { | 168 } catch(char *err) { |
235 } | 235 } |
236 if (lsh_exact) { | 236 if (lsh_exact) { |
237 argc++; | 237 argc++; |
238 } | 238 } |
239 | 239 |
240 char **argv = new char*[argc+1]; | 240 const char **argv = new const char*[argc+1]; |
241 argv[0] = "./audioDB"; | 241 argv[0] = "./audioDB"; |
242 argv[1] = COM_QUERY; | 242 argv[1] = COM_QUERY; |
243 argv[2] = queryType; | 243 argv[2] = queryType; |
244 argv[3] = COM_DATABASE; | 244 argv[3] = COM_DATABASE; |
245 argv[4] = (char *) (ENSURE_STRING(dbName)); | 245 argv[4] = (char *) (ENSURE_STRING(dbName)); |