Browse Source

Rework include files

etomic
jl777 8 years ago
parent
commit
ea46b40241
  1. 7
      iguana/iguana_json.c
  2. 8
      includes/iguana_apideclares.h
  3. 2
      includes/iguana_apiundefs.h

7
iguana/iguana_json.c

@ -191,7 +191,10 @@ cJSON *SuperNET_helpjson()
#include "../includes/iguana_apideclares.h" #include "../includes/iguana_apideclares.h"
#undef IGUANA_ARGS
#undef _IGUANA_APIDEC_H_
#include "../includes/iguana_apiundefs.h" #include "../includes/iguana_apiundefs.h"
if ( array != 0 ) if ( array != 0 )
jadd(json,"API",array); jadd(json,"API",array);
jadd(json,"agents",agents); jadd(json,"agents",agents);
@ -907,6 +910,7 @@ TWO_STRINGS(SuperNET,html,agentform,htmlfile)
} }
#undef IGUANA_ARGS #undef IGUANA_ARGS
#undef _IGUANA_APIDEC_H_
#include "../includes/iguana_apiundefs.h" #include "../includes/iguana_apiundefs.h"
char *SuperNET_parser(struct supernet_info *myinfo,char *agentstr,char *method,cJSON *json,char *remoteaddr) char *SuperNET_parser(struct supernet_info *myinfo,char *agentstr,char *method,cJSON *json,char *remoteaddr)
@ -1025,8 +1029,9 @@ char *SuperNET_parser(struct supernet_info *myinfo,char *agentstr,char *method,c
#define STRING_ARRAY_OBJ_STRING IGUANA_DISPATCH_SAOS #define STRING_ARRAY_OBJ_STRING IGUANA_DISPATCH_SAOS
#include "../includes/iguana_apideclares.h" #include "../includes/iguana_apideclares.h"
//#undef IGUANA_ARGS
#undef IGUANA_ARGS
#undef _IGUANA_APIDEC_H_
#include "../includes/iguana_apiundefs.h" #include "../includes/iguana_apiundefs.h"
char errstr[512]; char errstr[512];
sprintf(errstr,"{\"error\":\"unsupported call\",\"agent\":\"%s\",\"method\":\"%s\"}",agentstr,method); sprintf(errstr,"{\"error\":\"unsupported call\",\"agent\":\"%s\",\"method\":\"%s\"}",agentstr,method);

8
includes/iguana_apideclares.h

@ -13,6 +13,12 @@
* * * *
******************************************************************************/ ******************************************************************************/
#ifdef _IGUANA_APIDEC_H_
emit compiler error if recursively being included
#endif
#ifndef _IGUANA_APIDEC_H_
#define _IGUANA_APIDEC_H_
STRING_ARG(dpow,pending,fiat); STRING_ARG(dpow,pending,fiat);
ZERO_ARGS(dpow,notarychains); ZERO_ARGS(dpow,notarychains);
STRING_ARG(dpow,active,maskhex); STRING_ARG(dpow,active,maskhex);
@ -358,3 +364,5 @@ TWO_STRINGS(hmac,md4,message,passphrase);
TWO_STRINGS(hmac,md5,message,passphrase); TWO_STRINGS(hmac,md5,message,passphrase);
TWO_STRINGS(hmac,tiger192_3,message,passphrase); TWO_STRINGS(hmac,tiger192_3,message,passphrase);
TWO_STRINGS(hmac,whirlpool,message,passphrase); TWO_STRINGS(hmac,whirlpool,message,passphrase);
#endif

2
includes/iguana_apiundefs.h

@ -49,3 +49,5 @@
#undef IGUANA_ARGS #undef IGUANA_ARGS
#undef IGUANA_CALLARGS #undef IGUANA_CALLARGS
#undef _IGUANA_APIDEC_H_

Loading…
Cancel
Save