blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
250
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
58
license_type
stringclasses
2 values
repo_name
stringlengths
5
107
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
185 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
15.7k
664M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
68 values
src_encoding
stringclasses
27 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
6
9.36M
extension
stringclasses
31 values
content
stringlengths
4
9.36M
authors
sequencelengths
1
1
author
stringlengths
0
73
6e142e946a8eea810bceb15f7ada544ab9931cb0
6ef6213d2fa39d1d0ab7e2373d882b9d263e8c6d
/ti_components/algorithms/vlib_c66x_3_3_2_0/packages/ti/vlib/src/VLIB_ORB_computeOrientation/VLIB_ORB_computeOrientation_cn.h
b894dbc58a0b2a4caf5af6d8c2a4c550a38628ff
[]
no_license
Zhangh2018/PROCESSOR_SDK_VISION_03_06_00_00
9c380d3167b156a11a8f21814e94ac5550cddc87
05c72de5d031006c7565d4234abd53670a926acd
refs/heads/master
2021-10-16T13:43:05.313842
2019-02-11T09:10:44
2019-02-11T09:10:44
null
0
0
null
null
null
null
UTF-8
C
false
false
3,069
h
/******************************************************************************* **+--------------------------------------------------------------------------+** **| **** |** **| **** |** **| ******o*** |** **| ********_///_**** |** **| ***** /_//_/ **** |** **| ** ** (__/ **** |** **| ********* |** **| **** |** **| *** |** **| |** **| Copyright (c) 2007-2012 Texas Instruments Incorporated |** **| ALL RIGHTS RESERVED |** **| |** **| Permission to use, copy, modify, or distribute this software, |** **| whether in part or in whole, for any purpose is forbidden without |** **| a signed licensing agreement and NDA from Texas Instruments |** **| Incorporated (TI). |** **| |** **| TI makes no representation or warranties with respect to the |** **| performance of this computer program, and specifically disclaims |** **| any responsibility for any damages, special or consequential, |** **| connected with the use of this program. |** **| |** **+--------------------------------------------------------------------------+** *******************************************************************************/ #ifndef VLIB_ORB_COMPUTEORIENTATION_CN_H_ #define VLIB_ORB_COMPUTEORIENTATION_CN_H_ 1 #include "../common/VLIB_types.h" #include "../common/VLIB_orb.h" CORBResult VLIB_ORB_computeOrientation_cn(uint8_t *inImg, uint16_t imgWidth, uint16_t imgHeight, uint16_t imgPitch, uint32_t *featuresLoc, uint16_t numFeatures, int16_t *outAngle, uint8_t *momentPattern, uint8_t *scratch); #endif /* ======================================================================== */ /* End of file: VLIB_ORB_computeOrientation_cn.h */ /* ======================================================================== */
[ "yukichen@otobrite.com" ]
yukichen@otobrite.com
87b393e0e37d196a9779122a7240425d0269f0da
3c406f63a82affe48a40c6e4312ad071aebcf62e
/static/test.c
d6839978199fc1bb3d5e211d972bd5e850265b0f
[]
no_license
vivek703/OWN_EXP
d1a2c78ea69a7114088783e373660d2d39ed317e
fe0f7359693d8822b52121e07d808495f1c93e5e
refs/heads/master
2022-05-29T13:37:09.261695
2020-05-04T18:23:16
2020-05-04T18:23:16
257,104,389
0
0
null
null
null
null
UTF-8
C
false
false
125
c
#include "test.h" #include <stdio.h> static int static_1(void) { printf("HI\n"); } void test(void) { static_1(); }
[ "vivekp9922@gmail.com" ]
vivekp9922@gmail.com
cf438c03fe427b18d5ef0c3ee6b083cbcaf7fb89
2837f8a4e1c618f00ad7ba5cf4c248232ea1743b
/1012.c
13ca81f31503b51ffd86f58d4a77bd3cf3a1fc50
[]
no_license
jorgeduartejr/URI-online-judge---C
c56a2e887db097725694bef25ac390e9edb38b26
d913288c68870f1058bd7fb0ce754ebc3a015ef8
refs/heads/main
2023-07-17T19:04:10.937097
2021-08-24T22:33:49
2021-08-24T22:33:49
399,618,839
0
0
null
null
null
null
UTF-8
C
false
false
610
c
#include <stdio.h> int main() { double A,B,C; double areaTriangulo, areaCirculo, areaTrapezio, areaQuadrado, areaRetangulo; double pi = 3.14159; scanf("%lf""%lf""%lf", &A,&B,&C); areaTriangulo = (A * C)/2; areaCirculo = C * C * pi; areaTrapezio = ((A + B) * C)/2; areaQuadrado = B * B; areaRetangulo = A * B; printf("TRIANGULO: %.3lf\n", areaTriangulo); printf("CIRCULO: %.3lf\n",areaCirculo); printf("TRAPEZIO: %.3lf\n",areaTrapezio); printf("QUADRADO: %.3lf\n", areaQuadrado); printf("RETANGULO: %.3lf\n", areaRetangulo); return 0; }
[ "migueljunior1000@gmail.com" ]
migueljunior1000@gmail.com
6e4b62fc82e9d7f43ce043d45c270328142a1c71
dec6419e67295954f5c526d9631685d9d8499342
/src/xoip_messages.c
7d8d11f458027296451ce911469b4db64fdc59bf
[]
no_license
vassilux/xoip2
23029e19221f98fbb24368259ba0770541cdb8e2
4893d31a9dbad1fc585b515c3a371ce59f752180
refs/heads/master
2021-01-01T05:49:33.621313
2014-08-21T14:12:06
2014-08-21T14:12:06
null
0
0
null
null
null
null
UTF-8
C
false
false
10,909
c
/* * XoIP -- telephony toolkit. * * Copyright (C) <2014>, <vassilux> * * <Vassili Gontcharov> <v.gontcharov@gmail.com> * */ /*! \file * * \brief Xoipeton application * * \author\verbatim <Vassili Gontcharov> <vassili.gontcharov@esifrance.net> \endverbatim * * This is a Xoip for development of an Asterisk application * \ingroup applications */ /*** MODULEINFO <defaultenabled>no</defaultenabled> <support_level>core</support_level> ***/ #include <stdio.h> #include <stdlib.h> #include "asterisk.h" #include "asterisk/logger.h" //#include "asterisk/astmm.h" #include "xoip_messages.h" int do_process_message (const char *buf, int size, struct f1_messages_handlers *handlers); static void do_process_message_fa(int track, int callref, char *code, struct f1_messages_handlers *handlers) { if(code == NULL){ return; } if(code[0] == 'M'){ handlers->mute_micro_operator(track, callref, true); }else if(code[0] == 'N'){ handlers->mute_micro_operator(track, callref, false); } } /*! * \brief Intiaialize the emmessions configuration for the given communication. * * \param track The track number. * \param callref The call reference. * \param messages The string array of parameters. * \param handlers The pointer to the wrapper of the app_xoip functions. */ static void do_process_message_fc(int track, int callref, char messages[10][255], struct f1_messages_handlers *handlers) { char *emmission_type = messages[3]; int dtmf_duration = 0; int silence_duration = 0; int loudness = 0; if(emmission_type != NULL &&(strcmp(emmission_type, "DTMF") == 0)){ if(messages[4] != NULL){ /* * pay an attention cause the F1 send packege without , between DTMF * and duration */ dtmf_duration = atoi(messages[4] + 4); // move 4 to skip DTMF string } if(messages[5] != NULL){ silence_duration = atoi(messages[5]); } if(messages[6] != NULL){ loudness = atoi(messages[6]); } } } /*! * \brief Send the frequencies to th] channel identified by the given track and callref */ static void do_process_message_ff(int track, int callref, char messages[10][255], struct f1_messages_handlers *handlers) { int freq; int duration; int level; char *mode = NULL; char *break_record; if(messages[3] != NULL){ freq = atoi(messages[3]); } if(messages[4] != NULL){ duration = atoi(messages[4]); } if(messages[5] != NULL){ level = atoi(messages[5]); } mode = messages[6]; break_record = messages[6]; handlers->send_freq(track, callref, freq, duration, level, mode, break_record); } /*! * \brief Process FL message. Send data to the channel identificated by the given track and callref */ static void do_process_message_fl(int track, int callref, char messages[10][255], struct f1_messages_handlers *handlers) { int mode_transfer; char *data; char *mode_operator = NULL; char *break_record; if(messages[3] != NULL){ mode_transfer = atoi(messages[3]); } data = messages[4]; mode_operator = messages[5]; break_record = messages[6]; handlers->send_data(track, callref, mode_transfer, data, mode_operator, break_record); } /*! * */ int do_process_message (const char *buf, int size, struct f1_messages_handlers *handlers) { int res = 0; char *buffer = strdup (buf); const char *sep = ","; char messages[10][255] = { '\0' }; int count = 0; ast_verb(5, "Get packet from f1 endpoint : [%s\n]", buffer); char *token = NULL; for (token = strtok (buffer, sep); token; token = strtok (NULL, sep)) { if (token != NULL) { strcpy (messages[count], token); count++; } } char type = messages[0][2]; /* this is special case for ithe polling and mode request messages */ if(messages[0][0] == 'R' && type == 'S'){ handlers->request_reboot(); goto goout; }else if(type == 'N'){ /* skip this one */ handlers->request_mode_normal(); goto goout; }else if(messages[0][0]== 'V' && type == 'R'){ goto goout; }else if(type == 'P'){ ast_verb(5, "Get polling [%s].\n", messages[3]); handlers->polling(messages[3]); goto goout; } int track = atoi (messages[1]); long callref = 0; sscanf(messages[2], "%04X", &callref); /* so far sor good */ switch (type) { case 'A': do_process_message_fa(track, callref, messages[3], handlers); break; case 'C': do_process_message_fc(track, callref, messages, handlers); break; case 'F': do_process_message_ff(track, callref, messages, handlers); break; case 'G': { char proto = messages[3][0]; int level = 0; if (messages[4] != NULL) { level = atoi (messages[4]); } handlers->answer (track, callref, proto, level); } break; case 'H': { char *callee = messages[3]; char *caller = messages[4]; char *volum = messages[5]; handlers->commut (track, callref, callee, caller, volum); } break; case 'I': { char proto = messages[3][0]; int loudness = 0; if(messages[4] != NULL){ loudness = atoi(messages[4]); } handlers->switch_protocol(track, callref, proto, loudness); } break; case 'K': handlers->ack_alarm(track, callref); break; case 'L': do_process_message_fl(track, callref, messages, handlers); break; case 'M': { int record_track = 0; if(messages[3] != NULL){ record_track = atoi(messages[4]); } handlers->record_request(track, callref, record_track); } break; case 'r': case 'R': //ast_log(AST_LOG_VERBOSE, " Processing R.\n"); handlers->hangup (track, callref); break; case 'V': { int volume; if(messages[3] != NULL){ volume = atoi(messages[3]); } handlers->volume_adjust(track, callref, volume); } break; case 'W': handlers->queuing_call(track, callref, messages[3]); break; case 'U': break; default: ast_log (AST_LOG_VERBOSE, " Processing but type not found : [%c]..\n", buf); break; } goto goout; goout: res = size; free (buffer); return res; } /*! * */ int xoip_build_XC_msg (int voie, int callref, const char *did, const char *caller, const char *transfered, char *dest, int size) { snprintf (dest, size - 1, "X C,%02d,%04X,%s,%s,T%s\r", voie, callref, did, caller, transfered); if(strlen(dest) == 0){ return -1; } return 0; } /*! * */ int xoip_build_Xg_msg (int voie, int callref, int state, int res, char *dest, int size) { if(res != 0){ snprintf (dest, size - 1, "X g,%02d,%04X,1,%01d\r", voie, callref, res); }else{ snprintf (dest, size - 1, "X g,%02d,%04X,%d\r", voie, callref,state); } if(strlen(dest) == 0){ return -1; } return 0; } /*! * */ int xoip_build_XL_msg (int voie, int callref, int res, char *dest, int size) { if(res != 0){ snprintf (dest, size - 1, "X L,%02d,%04X,1,%01d\r", voie, callref, res); }else{ snprintf (dest, size - 1, "X L,%02d,%04d\r", voie, callref); } if(strlen(dest) == 0){ return -1; } return 0; } /*! * */ int xoip_build_Xm_msg(int voie, int callref, int state, int res, char *dest, int size) { if(res != 0){ snprintf (dest, size - 1, "X m,%02d,%04X,1,%01d\r", voie, callref, res); }else{ snprintf (dest, size - 1, "X m,%02d,%04d\r", voie, callref); } if(strlen(dest) == 0){ return -1; } return 0; } /*! * */ int xoip_build_XE_msg(int status, char *dest, int size) { snprintf (dest, size - 1, "X E,%01d,%s\r", status, "XoIP Alarms-V0.2.0.80,Dem V0000,Mod V0000"); if(strlen(dest) == 0){ return -1; } return 0; } /*! * */ int xoip_build_Xr_msg (int voie, int callref, char *dest, int size) { snprintf (dest, size, "X r,%02d,%04d\r", voie, callref); return 0; } /*! * */ int xoip_build_Xh_msg (int voie, int callref, int state, const char *callee, char *dest, int size) { snprintf (dest, size, "X h,%02d,%04X,%01d,%s\r", voie, callref, state, callee); return 0; } /*! * */ int xoip_build_Xi_msg(int voie, int callref, int state, int res, char *dest, int size) { snprintf (dest, size - 1, "X i,%02d,%04X,%01d,%01d\r", voie, callref, state, res); if(strlen(dest) == 0){ return -1; } return 0; } /*! * */ int xoip_build_Xk_msg(int voie, int callref, int state, int res, char *dest, int size) { snprintf (dest, size - 1, "X k,%02d,%04X,%01d,%01d\r", voie, callref, state, res); if(strlen(dest) == 0){ return -1; } return 0; } /*! * */ int xoip_build_Xf_msg (int voie, int callref, int state, int res, char *dest, int size) { snprintf (dest, size - 1, "X f,%02d,%04X,%01d,%01d\r", voie, callref, state, res); if(strlen(dest) == 0){ return -1; } return 0; } /*! * */ int xoip_build_XA_msg (int voie, int callref, const char *data, char *dest, int size) { snprintf (dest, size, "X A,%02d,%04X,%s\r", voie, callref, data); return 0; } /*! * \brief Build X w message. * The response for f1 F W request : qeueuing a call */ int xoip_build_Xw_msg(int voie, int callref, int res, char *dest, int size) { snprintf (dest, size - 1, "X w,%02d,%04X,%01d\r", voie, callref, res); if(strlen(dest) == 0){ return -1; } return 0; } /*! * \brief Parsing message from the given buffer. * Buffer can content few messges * * \param buf messages buffer * \param size the length of the buffer * \params handlers the structur of callback for each type of message * * \retval -1 on error * \retval > 0 the lenth of processing messages */ int process_message (const char *buf, int size, struct f1_messages_handlers *handlers) { int res = 0; int i = 0; int count = 0; char *buffer = strdup (buf); const char *sep = "\r"; char *token = NULL; /* must be changed */ char messages[10][255] = { '\0' }; for (token = strtok (buffer, sep); token; token = strtok (NULL, sep)) { strcpy (messages[count], token); count++; } res = 0; for (i = 0; i < count; i++) { /* increment by the token length */ res += do_process_message (messages[i], strlen (messages[i]), handlers); } /* add to the result the number of tokens. May be addt length(sep) can be good idea */ res += count; free (buffer); return res; }
[ "v.gontcharov@gmail.com" ]
v.gontcharov@gmail.com
37c89afb473fb1f0e71c3f743b0cc646712c4985
5c255f911786e984286b1f7a4e6091a68419d049
/vulnerable_code/0f76e37c-5ba9-431e-acb0-97747e28c6bb.c
d70ff0058833ce6c0df966372d79fbd154c48354
[]
no_license
nmharmon8/Deep-Buffer-Overflow-Detection
70fe02c8dc75d12e91f5bc4468cf260e490af1a4
e0c86210c86afb07c8d4abcc957c7f1b252b4eb2
refs/heads/master
2021-09-11T19:09:59.944740
2018-04-06T16:26:34
2018-04-06T16:26:34
125,521,331
0
0
null
null
null
null
UTF-8
C
false
false
558
c
#include <string.h> #include <stdio.h> int main() { int i=4; int j=13; int k; int l; k = 53; l = 64; k = i/j; l = i/j; l = j/j; l = l/j; l = l%j; l = l-j; k = k-k*i; //variables /* START VULNERABILITY */ int a; int b[28]; int c[67]; a = 0; while (a > -1) { //random /* START BUFFER SET */ *((int *)c + a) = *((int *)b + a); /* END BUFFER SET */ a--; } /* END VULNERABILITY */ printf("%d%d\n",k,l); return 0; }
[ "nharmon8@gmail.com" ]
nharmon8@gmail.com
435d938de995c245d164b32e935ec8b55a8bc340
bb762a49e4f5324de253d6287438899a4c645632
/Lista9/Questao1/tadArvoreBB3.c
9f8071a9ac77eb7d89a79a9acd91267be9385138
[]
no_license
RaquelBelmiro/estruturas-de-dados-c
7de2defe4ffaf1849eb5408c533658c0637a1366
f38f6e6758a897a24e8091e773b6651f02e09a45
refs/heads/master
2023-08-01T07:46:45.736711
2021-09-21T21:42:25
2021-09-21T21:42:25
408,981,056
0
0
null
null
null
null
UTF-8
C
false
false
3,945
c
#include<stdio.h> #include<stdlib.h> struct reg_no_arvore { struct reg_no_arvore *ptrEsquerda; int chave; struct reg_no_arvore *ptrDireita; }; typedef struct reg_no_arvore **tipo_no_arvore; tipo_no_arvore inicializar_arvore(tipo_no_arvore sub_raiz) { sub_raiz = (struct reg_no_arvore**)malloc(sizeof(struct reg_no_arvore*)); *sub_raiz = NULL; } void incluir_no_arvore(tipo_no_arvore sub_raiz, int chave) { if (*sub_raiz == NULL) { *sub_raiz = malloc(sizeof(struct reg_no_arvore)); (*sub_raiz)->chave = chave; (*sub_raiz)->ptrEsquerda = NULL; (*sub_raiz)->ptrDireita = NULL; } else { if (chave < (*sub_raiz)->chave) { incluir_no_arvore(&((*sub_raiz)->ptrEsquerda), chave); } else { if (chave > (*sub_raiz)->chave) { incluir_no_arvore(&((*sub_raiz)->ptrDireita), chave); } } } } void percurso_em_ordem(tipo_no_arvore sub_raiz) { if (*sub_raiz != NULL) { percurso_em_ordem(&((*sub_raiz)->ptrEsquerda)); printf("%d ", (*sub_raiz)->chave); percurso_em_ordem(&((*sub_raiz)->ptrDireita)); } } void percurso_em_pre_ordem(tipo_no_arvore sub_raiz) { if (*sub_raiz != NULL) { printf("%d ", (*sub_raiz)->chave); percurso_em_pre_ordem(&((*sub_raiz)->ptrEsquerda)); percurso_em_pre_ordem(&((*sub_raiz)->ptrDireita)); } } void percurso_em_pos_ordem(tipo_no_arvore sub_raiz) { if (*sub_raiz != NULL) { percurso_em_pos_ordem(&((*sub_raiz)->ptrEsquerda)); percurso_em_pos_ordem(&((*sub_raiz)->ptrDireita)); printf("%d ", (*sub_raiz)->chave); } } int encontrar_elemento(tipo_no_arvore sub_raiz, int chave) { if ((*sub_raiz) == NULL) { return 0; } else { if (chave == (*sub_raiz)->chave) { return 1; } else { if (chave < (*sub_raiz)->chave) { return encontrar_elemento(&((*sub_raiz)->ptrEsquerda), chave); } else { if (chave > (*sub_raiz)->chave) { return encontrar_elemento(&((*sub_raiz)->ptrDireita), chave); } } } } } int numero_nos(tipo_no_arvore sub_raiz){ if (*sub_raiz != NULL) { return 1+numero_nos(&((*sub_raiz)->ptrEsquerda))+numero_nos(&((*sub_raiz)->ptrDireita)); } return 0; } int qtdFolha(tipo_no_arvore sub_raiz){ if (*sub_raiz !=NULL) { if(((*sub_raiz)->ptrEsquerda==NULL) && ((*sub_raiz)->ptrDireita==NULL)) return 1+qtdFolha(&(*sub_raiz)->ptrEsquerda) + qtdFolha(&(*sub_raiz)->ptrDireita); else return qtdFolha(&(*sub_raiz)->ptrDireita) + qtdFolha(&(*sub_raiz)->ptrEsquerda); } else return 0; } int qtdNull(tipo_no_arvore sub_raiz){ if (*sub_raiz !=NULL) { return qtdNull(&(*sub_raiz)->ptrEsquerda)+qtdNull(&(*sub_raiz)->ptrDireita); } else return 1; } int altura(tipo_no_arvore sub_raiz){ if (*sub_raiz !=NULL) { if( altura(&((*sub_raiz)->ptrEsquerda)) > altura(&((*sub_raiz)->ptrDireita))) return 1+altura(&(*sub_raiz)->ptrEsquerda); else return 1+altura(&(*sub_raiz)->ptrDireita); } return 0; } void copiarArvore(tipo_no_arvore sub_raiz_original, tipo_no_arvore sub_raiz_copia){ if(*sub_raiz_original!=NULL){ incluir_no_arvore(sub_raiz_copia,(*sub_raiz_original)->chave); copiarArvore(&((*sub_raiz_original)->ptrDireita),sub_raiz_copia); copiarArvore(&((*sub_raiz_original)->ptrEsquerda),sub_raiz_copia); } }
[ "raquelsilvabelmiro@gmail.com" ]
raquelsilvabelmiro@gmail.com
9b15002d5bd412d9ae808f94e24062e867912908
79b2d3126476fe7c997ebc5b8f0a1298b34630fd
/PROG/Sem1/Lab4/logo.h
f18a8f5846e8655b25d16b0468fe9ed466ff3075
[]
no_license
DenisVasenin/Labs
13ba28d4c29cbe8899cd20ac9cc1f1dbdd825659
4b96ea12987d2a0046f58fe8b6d36e775769233b
refs/heads/master
2020-03-18T20:20:16.447809
2018-05-28T15:57:45
2018-05-28T15:57:45
null
0
0
null
null
null
null
UTF-8
C
false
false
646
h
int logo() { puts(""); puts(" ============================"); puts(" "); puts(" XX XX YY YY NN NN "); puts(" XXXX YYYY NNNN NN "); puts(" XX YY NN NN NN "); puts(" XXXX YY NN NNNN "); puts(" XX XX YY NN NN "); puts(" "); puts(" "); puts(" Пенкин Станислав гр ИВТ-11 "); puts(" "); puts(" ============================"); puts(""); return(0); }
[ "ps.smartbox@gmail.com" ]
ps.smartbox@gmail.com
a2ee19d7d87b6949e20292b2a52ca26dc7dd75dd
0b98befdd49f707ed1923703bcdac9740bb4d699
/priv/codegolf/Draw the Sawtooth Alphabet.c
de85b8d2d1997998ac9bef46d8908dbbd40b99cb
[]
no_license
jbebe/all-my-projects
a957f2ae70d3ca09d49e1efc52c3cd9f6f786094
32a8b12b17d48c0138005eb54cb1ed9745baa737
refs/heads/master
2021-01-10T08:55:55.291099
2015-05-29T20:16:05
2015-05-29T20:16:05
35,968,468
0
0
null
null
null
null
UTF-8
C
false
false
884
c
/* A simple one today. Write the shortest program that draws a "sawtooth alphabet" given a positive integer for the height. You must write the name of your programming language when you come to the letter it starts with. For example, if your language is Python and the input is 1 the output should be: ABCDEFGHIJKLMNOPythonQRSTUVWXYZ If the input is 2 the output should be: B D F H J L N Python R T V X Z A C E G I K M O Q S U W Y If the input is 4 the output should be: D J Python V C E I K O Q U W B F H L N R T X Z A G M S Y */ /* if n holds the height: */ // C + escape codes: 81 x;main(y){for(y=n--;x<26;x++)printf("\033[%d;%dH%c",n?x/n&1?y++:y--:y,x+1,x+65);} // C 110 x;char a[702]={[0 ...701]=32};main(y){for(y=--n;x<26;a[x*27-1]=10)a[27*(n?x/n&1?y++:y--:y)+x]=x+++65;puts(a);}
[ "juhasz.balint.bebe@gmail.com" ]
juhasz.balint.bebe@gmail.com
a6268cf05d542102a4e024b55ddb4478cd60d8ce
e250176d7fc2d1d1ac604aa843543afe91e8843e
/chapter1/fold.c
0e37e96d78aa3e77a5172cc49be766743550f4ba
[]
no_license
alicewriteswrongs/programminginc
3ea2ebd1a4622856eecb1b49e8011d5fb2cc4ed8
69f17bfede6ccfea70677eb06c6dd76305429ca8
refs/heads/master
2021-08-27T15:31:10.765001
2015-07-14T19:53:23
2015-07-14T19:53:23
null
0
0
null
null
null
null
UTF-8
C
false
false
1,419
c
#include <stdio.h> /* this is program to 'fold' long lines onto two lines, and I think we're going to do 80 * characters/line * */ #define MAXLINE 1000 // not going to bother with lines longer than 1000 #define OUTPUTMAXLINE 1020 // longer incase input is actually 1000 characters #define SPLIT 79 // number of characters per output line (indexed from 0, so 79 == 80 characters per line int mygetline(char line[], int maxline); void foldit(char old[], char new[], int length); main() { int lim = MAXLINE; int len; char before[MAXLINE]; char after[OUTPUTMAXLINE]; while ((len = mygetline(before, lim)) > 0) { foldit(before,after,len); printf("%s", after); } } int mygetline(char before[], int maxline) { int c, i; for (i = 0; i < maxline && (c = getchar()) != EOF && c != '\n'; i++) before[i] = c; if (c == '\n') { before[i] = c; i++; } before[i] = '\0'; return i; } void foldit(char old[], char new[], int length) { int i, offset, count; offset = count = 0; for (i = 0; i <= length; i++) { if (count != SPLIT) { new[i+offset] = old[i]; count += 1; } else if (count == SPLIT) { new[i+offset] = old[i]; offset += 1; new[i+offset] = '\n'; count = 0; } } } // I think it works! hahahaha!
[ "alice.writes.wrongs@gmail.com" ]
alice.writes.wrongs@gmail.com
ad6c47c43213451cd6735ee31d3b8c2cb5b854d4
fd0137df01992ad3153ba9658e71e6c763760b7f
/Emu48/DDESERV.C
6478426a222253dd6a1def7b7c0fb139a99e39fc
[]
no_license
tolkien/Emu48
b22a61dc952d70f9fd93e32a9a8a95c103f96e4b
777d5a9c399f4b2d800e8376bf2e62431bda71a0
refs/heads/master
2021-06-20T01:36:10.050248
2017-05-12T18:11:34
2017-05-12T18:11:34
null
0
0
null
null
null
null
ISO-8859-1
C
false
false
4,855
c
/* * DdeServ.c * * This file is part of Emu48 * * Copyright (C) 1998 Christoph Gießelink * */ #include "pch.h" #include "Emu48.h" #include "io.h" HDDEDATA CALLBACK DdeCallback(UINT iType,UINT iFmt,HCONV hConv, HSZ hsz1,HSZ hsz2,HDDEDATA hData, DWORD dwData1,DWORD dwData2) { TCHAR *psz,szBuffer[32]; HDDEDATA hReturn; LPBYTE lpData,lpHeader; DWORD dwAddress,dwSize,dwLoop,dwIndex; UINT nStkLvl; BOOL bSuccess; // disable stack loading items on HP38G, HP39/40G BOOL bStackEnable = cCurrentRomType!='6' && cCurrentRomType!='A' && cCurrentRomType!='E'; switch (iType) { case XTYP_CONNECT: // get service name DdeQueryString(idDdeInst,hsz2,szBuffer,ARRAYSIZEOF(szBuffer),0); if (0 != lstrcmp(szBuffer,szAppName)) return (HDDEDATA) FALSE; // get topic name DdeQueryString(idDdeInst,hsz1,szBuffer,ARRAYSIZEOF(szBuffer),0); return (HDDEDATA) (INT_PTR) (0 == lstrcmp(szBuffer,szTopic)); case XTYP_POKE: // quit on models without stack or illegal data format or not in running state if (!bStackEnable || iFmt != uCF_HpObj || nState != SM_RUN) return (HDDEDATA) DDE_FNOTPROCESSED; // get item name DdeQueryString(idDdeInst,hsz2,szBuffer,ARRAYSIZEOF(szBuffer),0); nStkLvl = _tcstoul(szBuffer,&psz,10); if (*psz != 0 || nStkLvl < 1) // invalid number format return (HDDEDATA) DDE_FNOTPROCESSED; SuspendDebugger(); // suspend debugger bDbgAutoStateCtrl = FALSE; // disable automatic debugger state control if (!(Chipset.IORam[BITOFFSET]&DON)) // HP off { // turn on HP KeyboardEvent(TRUE,0,0x8000); Sleep(dwWakeupDelay); KeyboardEvent(FALSE,0,0x8000); } if (WaitForSleepState()) // wait for cpu SHUTDN then sleep state { hReturn = DDE_FNOTPROCESSED; goto cancel; } while (nState!=nNextState) Sleep(0); _ASSERT(nState==SM_SLEEP); bSuccess = FALSE; // get data and size lpData = DdeAccessData(hData,&dwSize); // has object length header if (lpData && dwSize >= sizeof(DWORD)) { dwIndex = *(LPDWORD) lpData; // object length if (dwIndex <= dwSize - sizeof(DWORD)) { // reserve unpacked object length memory LPBYTE pbyMem = (LPBYTE) malloc(dwIndex * 2); if (pbyMem != NULL) { // copy data and write to stack CopyMemory(pbyMem+dwIndex,lpData+sizeof(DWORD),dwIndex); bSuccess = (WriteStack(nStkLvl,pbyMem,dwIndex) == S_ERR_NO); free(pbyMem); // free memory } } } DdeUnaccessData(hData); SwitchToState(SM_RUN); // run state while (nState!=nNextState) Sleep(0); _ASSERT(nState==SM_RUN); if (bSuccess == FALSE) { hReturn = DDE_FNOTPROCESSED; goto cancel; } KeyboardEvent(TRUE,0,0x8000); Sleep(dwWakeupDelay); KeyboardEvent(FALSE,0,0x8000); // wait for sleep mode while (Chipset.Shutdn == FALSE) Sleep(0); hReturn = (HDDEDATA) DDE_FACK; cancel: bDbgAutoStateCtrl = TRUE; // enable automatic debugger state control ResumeDebugger(); return hReturn; case XTYP_REQUEST: // quit on models without stack or illegal data format or not in running state if (!bStackEnable || iFmt != uCF_HpObj || nState != SM_RUN) return NULL; // get item name DdeQueryString(idDdeInst,hsz2,szBuffer,ARRAYSIZEOF(szBuffer),0); nStkLvl = _tcstoul(szBuffer,&psz,10); if (*psz != 0 || nStkLvl < 1) // invalid number format return NULL; if (WaitForSleepState()) // wait for cpu SHUTDN then sleep state return NULL; while (nState!=nNextState) Sleep(0); _ASSERT(nState==SM_SLEEP); dwAddress = RPL_Pick(nStkLvl); // pick address of stack level "item" object if (dwAddress == 0) { SwitchToState(SM_RUN); // run state return NULL; } dwLoop = dwSize = (RPL_SkipOb(dwAddress) - dwAddress + 1) / 2; lpHeader = (Chipset.type != 'X') ? (LPBYTE) BINARYHEADER48 : (LPBYTE) BINARYHEADER49; // length of binary header dwIndex = (DWORD) strlen((LPCSTR) lpHeader); // size of objectsize + header + object dwSize += dwIndex + sizeof(DWORD); // reserve memory if ((lpData = (LPBYTE) malloc(dwSize)) == NULL) { SwitchToState(SM_RUN); // run state return NULL; } // save data length *(DWORD *)lpData = dwLoop + dwIndex; // copy header memcpy(lpData + sizeof(DWORD),lpHeader,dwIndex); // copy data for (dwIndex += sizeof(DWORD);dwLoop--;++dwIndex,dwAddress += 2) lpData[dwIndex] = Read2(dwAddress); // write data hReturn = DdeCreateDataHandle(idDdeInst,lpData,dwSize,0,hsz2,iFmt,0); free(lpData); SwitchToState(SM_RUN); // run state while (nState!=nNextState) Sleep(0); _ASSERT(nState==SM_RUN); return hReturn; } return NULL; UNREFERENCED_PARAMETER(hConv); UNREFERENCED_PARAMETER(dwData1); UNREFERENCED_PARAMETER(dwData2); }
[ "ryanbee@microsoft.com" ]
ryanbee@microsoft.com
e4ca123d176646b4ad4c5e6601e1ec61881ef2b6
eb127d545b1aa5d4f6dfe7b900613678a061ed8e
/clip/libclipmain/_util/clip_CLIP_HOSTCS.c
68fd4dedfca7aaaf9947cfc9d259df1827c1ab7f
[]
no_license
amery/clip-angelo
a41fccb525b2fb311b2e179508b8ec50457ee7ae
556fb1d40645d4c8fc33cda4014ab31a5b6500ea
refs/heads/master
2020-05-05T04:12:01.911229
2010-12-25T10:42:00
2011-01-01T13:08:14
null
0
0
null
null
null
null
UTF-8
C
false
false
119
c
int clip_CLIP_HOSTCS(ClipMachine * ClipMachineMemory) { _clip_retc(ClipMachineMemory, _clip_hostcs); return 0; }
[ "amery@geeks.cl" ]
amery@geeks.cl
f3aba8ef613f6ee571dcd7583931e508a0734276
99bdb3251fecee538e0630f15f6574054dfc1468
/bsp/lm3s8962/Libraries/driverlib/lpc.h
15023178da16496a198e68242b6002c3aa35a2e2
[ "Apache-2.0", "LicenseRef-scancode-proprietary-license", "Zlib", "MIT", "BSD-3-Clause", "X11", "BSD-4-Clause-UC", "LicenseRef-scancode-unknown-license-reference" ]
permissive
RT-Thread/rt-thread
03a7c52c2aeb1b06a544143b0e803d72f47d1ece
3602f891211904a27dcbd51e5ba72fefce7326b2
refs/heads/master
2023-09-01T04:10:20.295801
2023-08-31T16:20:55
2023-08-31T16:20:55
7,408,108
9,599
5,805
Apache-2.0
2023-09-14T13:37:26
2013-01-02T14:49:21
C
UTF-8
C
false
false
26,535
h
//***************************************************************************** // // lpc.h - Prototypes for the Low Pin Count (LPC) driver. // // Copyright (c) 2010-2011 Texas Instruments Incorporated. All rights reserved. // Software License Agreement // // Texas Instruments (TI) is supplying this software for use solely and // exclusively on TI's microcontroller products. The software is owned by // TI and/or its suppliers, and is protected under applicable copyright // laws. You may not combine this software with "viral" open-source // software in order to form a larger program. // // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL // DAMAGES, FOR ANY REASON WHATSOEVER. // // This is part of revision 8264 of the Stellaris Peripheral Driver Library. // //***************************************************************************** #ifndef __LPC_H__ #define __LPC_H__ //***************************************************************************** // // If building with a C++ compiler, make all of the definitions in this header // have a C binding. // //***************************************************************************** #ifdef __cplusplus extern "C" { #endif //***************************************************************************** // // Values that can be passed to LPCConfigSet as the ulConfig value, and // returned from LPCConfigGet. // //***************************************************************************** #define LPC_CFG_WAKE 0x00000100 // Restart the LPC Bus //***************************************************************************** // // Values that can be returned from LPCStatus. // //***************************************************************************** #define LPC_STATUS_RST 0x00000400 // LPC is in Reset #define LPC_STATUS_BUSY 0x00000200 // LPC is Busy #define LPC_STATUS_SLEEP 0x00000100 // LPC is in Sleep Mode #define LPC_STATUS_CA7 0x00000080 // Channel 7 Active #define LPC_STATUS_CA6 0x00000040 // Channel 6 Active #define LPC_STATUS_CA5 0x00000020 // Channel 5 Active #define LPC_STATUS_CA4 0x00000010 // Channel 4 Active #define LPC_STATUS_CA3 0x00000008 // Channel 3 Active #define LPC_STATUS_CA2 0x00000004 // Channel 2 Active #define LPC_STATUS_CA1 0x00000002 // Channel 1 Active #define LPC_STATUS_CA0 0x00000001 // Channel 0 Active //***************************************************************************** // // Values that can be passed to LPCIRQSet and LPCIRQClear in the ulIRQ // parameter and returned from LPCIRQGet. // //***************************************************************************** #define LPC_IRQ15 0x80000000 // Serial IRQ15 #define LPC_IRQ14 0x40000000 // Serial IRQ14 #define LPC_IRQ13 0x20000000 // Serial IRQ13 #define LPC_IRQ12 0x10000000 // Serial IRQ12 #define LPC_IRQ11 0x08000000 // Serial IRQ11 #define LPC_IRQ10 0x04000000 // Serial IRQ10 #define LPC_IRQ9 0x02000000 // Serial IRQ9 #define LPC_IRQ8 0x01000000 // Serial IRQ8 #define LPC_IRQ7 0x00800000 // Serial IRQ7 #define LPC_IRQ6 0x00400000 // Serial IRQ6 #define LPC_IRQ5 0x00200000 // Serial IRQ5 #define LPC_IRQ4 0x00100000 // Serial IRQ4 #define LPC_IRQ3 0x00080000 // Serial IRQ3 #define LPC_IRQ2 0x00040000 // Serial IRQ2 #define LPC_IRQ1 0x00020000 // Serial IRQ1 #define LPC_IRQ0 0x00010000 // Serial IRQ0 //***************************************************************************** // // Addition values that can be returned from LPCIRQGet. // //***************************************************************************** #define LPC_IRQ_BUSY 0x00000004 // SERIRQ frame in progress #define LPC_IRQ_CONT 0x00000001 // SERIRQ in Continuous Mode //***************************************************************************** // // Values that can be passed as the ulChannel parameter in LPCChannel... // API calls. // //***************************************************************************** #define LPC_CHAN_CH0 0 // LPC Channel 0 #define LPC_CHAN_CH1 1 // LPC Channel 1 #define LPC_CHAN_CH2 2 // LPC Channel 2 #define LPC_CHAN_CH3 3 // LPC Channel 3 #define LPC_CHAN_CH4 4 // LPC Channel 4 #define LPC_CHAN_CH5 5 // LPC Channel 5 #define LPC_CHAN_CH6 6 // LPC Channel 6 #define LPC_CHAN_CH7 7 // LPC Channel 7 (COMx) #define LPC_CHAN_COMx 7 // LPC Channel 7 (COMx) //***************************************************************************** // // Values that can be passed as part of the ulConfig parameter in the // LPCChannelConfig... functions. // //***************************************************************************** #define LPC_CHAN_IRQSEL2_NONE 0x00000000 // LPC Channel IRQSEL2 Disabled #define LPC_CHAN_IRQSEL2_IRQ0 0x00080000 // LPC Channel IRQSEL2 IRQ0 #define LPC_CHAN_IRQSEL2_IRQ1 0x10080000 // LPC Channel IRQSEL2 IRQ1 #define LPC_CHAN_IRQSEL2_IRQ2 0x20080000 // LPC Channel IRQSEL2 IRQ2 #define LPC_CHAN_IRQSEL2_IRQ3 0x30080000 // LPC Channel IRQSEL2 IRQ3 #define LPC_CHAN_IRQSEL2_IRQ4 0x40080000 // LPC Channel IRQSEL2 IRQ4 #define LPC_CHAN_IRQSEL2_IRQ5 0x50080000 // LPC Channel IRQSEL2 IRQ5 #define LPC_CHAN_IRQSEL2_IRQ6 0x60080000 // LPC Channel IRQSEL2 IRQ6 #define LPC_CHAN_IRQSEL2_IRQ7 0x70080000 // LPC Channel IRQSEL2 IRQ7 #define LPC_CHAN_IRQSEL2_IRQ8 0x80080000 // LPC Channel IRQSEL2 IRQ8 #define LPC_CHAN_IRQSEL2_IRQ9 0x90080000 // LPC Channel IRQSEL2 IRQ9 #define LPC_CHAN_IRQSEL2_IRQ10 0xA0080000 // LPC Channel IRQSEL2 IRQ10 #define LPC_CHAN_IRQSEL2_IRQ11 0xB0080000 // LPC Channel IRQSEL2 IRQ11 #define LPC_CHAN_IRQSEL2_IRQ12 0xC0080000 // LPC Channel IRQSEL2 IRQ12 #define LPC_CHAN_IRQSEL2_IRQ13 0xD0080000 // LPC Channel IRQSEL2 IRQ13 #define LPC_CHAN_IRQSEL2_IRQ14 0xE0080000 // LPC Channel IRQSEL2 IRQ14 #define LPC_CHAN_IRQSEL2_IRQ15 0xF0080000 // LPC Channel IRQSEL2 IRQ15 #define LPC_CHAN_COMxIRQ_DISABLE \ 0x00000000 // LCP Channel COMx IRQ Disabled #define LPC_CHAN_COMxIRQ_ENABLE 0x00080000 // LCP Channel COMx IRQ Enabled #define LPC_CHAN_IRQSEL1_NONE 0x00000000 // LPC Channel IRQSEL1 Disabled #define LPC_CHAN_IRQSEL1_IRQ0 0x00040000 // LPC Channel IRQSEL1 IRQ0 #define LPC_CHAN_IRQSEL1_IRQ1 0x01040000 // LPC Channel IRQSEL1 IRQ1 #define LPC_CHAN_IRQSEL1_IRQ2 0x02040000 // LPC Channel IRQSEL1 IRQ2 #define LPC_CHAN_IRQSEL1_IRQ3 0x03040000 // LPC Channel IRQSEL1 IRQ3 #define LPC_CHAN_IRQSEL1_IRQ4 0x04040000 // LPC Channel IRQSEL1 IRQ4 #define LPC_CHAN_IRQSEL1_IRQ5 0x05040000 // LPC Channel IRQSEL1 IRQ5 #define LPC_CHAN_IRQSEL1_IRQ6 0x06040000 // LPC Channel IRQSEL1 IRQ6 #define LPC_CHAN_IRQSEL1_IRQ7 0x07040000 // LPC Channel IRQSEL1 IRQ7 #define LPC_CHAN_IRQSEL1_IRQ8 0x08040000 // LPC Channel IRQSEL1 IRQ8 #define LPC_CHAN_IRQSEL1_IRQ9 0x09040000 // LPC Channel IRQSEL1 IRQ9 #define LPC_CHAN_IRQSEL1_IRQ10 0x0A040000 // LPC Channel IRQSEL1 IRQ10 #define LPC_CHAN_IRQSEL1_IRQ11 0x0B040000 // LPC Channel IRQSEL1 IRQ11 #define LPC_CHAN_IRQSEL1_IRQ12 0x0C040000 // LPC Channel IRQSEL1 IRQ12 #define LPC_CHAN_IRQSEL1_IRQ13 0x0D040000 // LPC Channel IRQSEL1 IRQ13 #define LPC_CHAN_IRQSEL1_IRQ14 0x0E040000 // LPC Channel IRQSEL1 IRQ14 #define LPC_CHAN_IRQSEL1_IRQ15 0x0F040000 // LPC Channel IRQSEL1 IRQ15 #define LPC_CHAN_IRQSEL0_NONE 0x00000000 // LPC Channel IRQSEL0 Disabled #define LPC_CHAN_IRQSEL0_IRQ0 0x00000000 // LPC Channel IRQSEL0 IRQ0 #define LPC_CHAN_IRQSEL0_IRQ1 0x00100000 // LPC Channel IRQSEL0 IRQ1 #define LPC_CHAN_IRQSEL0_IRQ2 0x00200000 // LPC Channel IRQSEL0 IRQ2 #define LPC_CHAN_IRQSEL0_IRQ3 0x00300000 // LPC Channel IRQSEL0 IRQ3 #define LPC_CHAN_IRQSEL0_IRQ4 0x00400000 // LPC Channel IRQSEL0 IRQ4 #define LPC_CHAN_IRQSEL0_IRQ5 0x00500000 // LPC Channel IRQSEL0 IRQ5 #define LPC_CHAN_IRQSEL0_IRQ6 0x00600000 // LPC Channel IRQSEL0 IRQ6 #define LPC_CHAN_IRQSEL0_IRQ7 0x00700000 // LPC Channel IRQSEL0 IRQ7 #define LPC_CHAN_IRQSEL0_IRQ8 0x00800000 // LPC Channel IRQSEL0 IRQ8 #define LPC_CHAN_IRQSEL0_IRQ9 0x00900000 // LPC Channel IRQSEL0 IRQ9 #define LPC_CHAN_IRQSEL0_IRQ10 0x00A00000 // LPC Channel IRQSEL0 IRQ10 #define LPC_CHAN_IRQSEL0_IRQ11 0x00B00000 // LPC Channel IRQSEL0 IRQ11 #define LPC_CHAN_IRQSEL0_IRQ12 0x00C00000 // LPC Channel IRQSEL0 IRQ12 #define LPC_CHAN_IRQSEL0_IRQ13 0x00D00000 // LPC Channel IRQSEL0 IRQ13 #define LPC_CHAN_IRQSEL0_IRQ14 0x00E00000 // LPC Channel IRQSEL0 IRQ14 #define LPC_CHAN_IRQSEL0_IRQ15 0x00F00000 // LPC Channel IRQSEL0 IRQ15 #define LPC_CHAN_IRQEN0_OFF 0x00000000 // LPC Channel IRQEN0 Disabled #define LPC_CHAN_IRQEN0_TRG1 0x00010000 // LPC Channel IRQEN0 Trigger 1 #define LPC_CHAN_IRQEN0_TRG2 0x00020000 // LPC Channel IRQEN0 Trigger 2 #define LPC_CHAN_IRQEN0_TRG3 0x00030000 // LPC Channel IRQEN0 Trigger 3 #define LPC_CHAN_MBARB_ENABLED 0x00000000 // LPC Channel Mailbox Arbritration // enabled. #define LPC_CHAN_MBARB_DISABLED 0x00008000 // LPC Channel Mailbox Arbritration // disabled. #define LPC_CHAN_SIZE_4 0x00000000 // Mailbox IO/Memory Window size // is 4 Bytes. #define LPC_CHAN_SIZE_8 0x00000004 // Mailbox IO/Memory Window size // is 4 Bytes. #define LPC_CHAN_SIZE_16 0x00000008 // Mailbox IO/Memory Window size // is 4 Bytes. #define LPC_CHAN_SIZE_32 0x0000000C // Mailbox IO/Memory Window size // is 4 Bytes. #define LPC_CHAN_SIZE_64 0x00000010 // Mailbox IO/Memory Window size // is 4 Bytes. #define LPC_CHAN_SIZE_128 0x00000014 // Mailbox IO/Memory Window size // is 4 Bytes. #define LPC_CHAN_SIZE_256 0x00000018 // Mailbox IO/Memory Window size // is 4 Bytes. #define LPC_CHAN_SIZE_512 0x0000001C // Mailbox IO/Memory Window size // is 4 Bytes. //***************************************************************************** // // Values that can be passed to LCPChannelConfigCOMxSet as the ulCOMxMode // parameter or returned from LPCChannelConfigGet in the pulCOMxMode // parameter. // //***************************************************************************** #define LPC_COMx_MODE_FRMHNML 0x00000000 // Normal From Host model. #define LPC_COMx_MODE_FRMHIGN 0x00020000 // Ignore From Host data. #define LPC_COMx_MODE_FRMHDMA 0x00040000 // COMx DMA on From Host data to // memory #define LPC_COMx_MODE_UARTDMA 0x00060000 // COMx DMA on From Host data to // UART1 //***************************************************************************** // // Additinal values that can be returned from LPCChannelConfigGet in the // pulCOMxMode parameter. // //***************************************************************************** #define LPC_COMx_ENABLED 0x00010000 // COMx mode enabled. //***************************************************************************** // // Values that can be passed to LPCIntEnable, LPCIntDisable, and LPCIntClear // as the ulIntFlags parameter and returned by LPCIntStatus. // //***************************************************************************** #define LPC_INT_RST 0x80000000 // LPC Bus Enters or Exits // Reset State. #define LPC_INT_SLEEP 0x40000000 // LPC Bus Enters or Exits // Sleep State. #define LPC_INT_COMx 0x20000000 // COMx has read/written // data. #define LPC_INT_SIRQ 0x10000000 // SERIRQ frame has completed #define LPC_INT_CH6_EP_TO_HOST (1 << 24) // To-Host has been read. #define LPC_INT_CH6_EP_FROM_DATA \ (2 << 24) // From-Host has been written as // data. #define LPC_INT_CH6_EP_FROM_CMD (4 << 24) // From-Host has been written as // command. #define LPC_INT_CH6_MB_HOST_WON (1 << 24) // Host Won (HW1ST) #define LPC_INT_CH6_MB_HOST_WRITE \ (2 << 24) // Host Wrote Last Byte. #define LPC_INT_CH6_MB_HOST_READ \ (4 << 24) // Host Read Last Byte #define LPC_INT_CH6_MB_MCU_LOST (8 << 24) // MCU Lost (when host had HW1ST). #define LPC_INT_CH5_EP_TO_HOST (1 << 20) // To-Host has been read. #define LPC_INT_CH5_EP_FROM_DATA \ (2 << 20) // From-Host has been written as // data. #define LPC_INT_CH5_EP_FROM_CMD (4 << 20) // From-Host has been written as // command. #define LPC_INT_CH5_MB_HOST_WON (1 << 20) // Host Won (HW1ST) #define LPC_INT_CH5_MB_HOST_WRITE \ (2 << 20) // Host Wrote Last Byte. #define LPC_INT_CH5_MB_HOST_READ \ (4 << 20) // Host Read Last Byte #define LPC_INT_CH5_MB_MCU_LOST (8 << 20) // MCU Lost (when host had HW1ST). #define LPC_INT_CH4_EP_TO_HOST (1 << 16) // To-Host has been read. #define LPC_INT_CH4_EP_FROM_DATA \ (2 << 16) // From-Host has been written as // data. #define LPC_INT_CH4_EP_FROM_CMD (4 << 16) // From-Host has been written as // command. #define LPC_INT_CH4_MB_HOST_WON (1 << 16) // Host Won (HW1ST) #define LPC_INT_CH4_MB_HOST_WRITE \ (2 << 16) // Host Wrote Last Byte. #define LPC_INT_CH4_MB_HOST_READ \ (4 << 16) // Host Read Last Byte #define LPC_INT_CH4_MB_MCU_LOST (8 << 16) // MCU Lost (when host had HW1ST). #define LPC_INT_CH3_EP_TO_HOST (1 << 12) // To-Host has been read. #define LPC_INT_CH3_EP_FROM_DATA \ (2 << 12) // From-Host has been written as // data. #define LPC_INT_CH3_EP_FROM_CMD (4 << 12) // From-Host has been written as // command. #define LPC_INT_CH3_MB_HOST_WON (1 << 12) // Host Won (HW1ST) #define LPC_INT_CH3_MB_HOST_WRITE \ (2 << 12) // Host Wrote Last Byte. #define LPC_INT_CH3_MB_HOST_READ \ (4 << 12) // Host Read Last Byte #define LPC_INT_CH3_MB_MCU_LOST (8 << 12) // MCU Lost (when host had HW1ST). #define LPC_INT_CH2_EP_TO_HOST (1 << 8) // To-Host has been read. #define LPC_INT_CH2_EP_FROM_DATA \ (2 << 8) // From-Host has been written as // data. #define LPC_INT_CH2_EP_FROM_CMD (4 << 8) // From-Host has been written as // command. #define LPC_INT_CH2_MB_HOST_WON (1 << 8) // Host Won (HW1ST) #define LPC_INT_CH2_MB_HOST_WRITE \ (2 << 8) // Host Wrote Last Byte. #define LPC_INT_CH2_MB_HOST_READ \ (4 << 8) // Host Read Last Byte #define LPC_INT_CH2_MB_MCU_LOST (8 << 8) // MCU Lost (when host had HW1ST). #define LPC_INT_CH1_EP_TO_HOST (1 << 4) // To-Host has been read. #define LPC_INT_CH1_EP_FROM_DATA \ (2 << 4) // From-Host has been written as // data. #define LPC_INT_CH1_EP_FROM_CMD (4 << 4) // From-Host has been written as // command. #define LPC_INT_CH1_MB_HOST_WON (1 << 4) // Host Won (HW1ST) #define LPC_INT_CH1_MB_HOST_WRITE \ (2 << 4) // Host Wrote Last Byte. #define LPC_INT_CH1_MB_HOST_READ \ (4 << 4) // Host Read Last Byte #define LPC_INT_CH1_MB_MCU_LOST (8 << 4) // MCU Lost (when host had HW1ST). #define LPC_INT_CH0_EP_TO_HOST (1 << 0) // To-Host has been read. #define LPC_INT_CH0_EP_FROM_DATA \ (2 << 0) // From-Host has been written as // data. #define LPC_INT_CH0_EP_FROM_CMD (4 << 0) // From-Host has been written as // command. #define LPC_INT_CH0_MB_HOST_WON (1 << 0) // Host Won (HW1ST) #define LPC_INT_CH0_MB_HOST_WRITE \ (2 << 0) // Host Wrote Last Byte. #define LPC_INT_CH0_MB_HOST_READ \ (4 << 0) // Host Read Last Byte #define LPC_INT_CH0_MB_MCU_LOST (8 << 0) // MCU Lost (when host had HW1ST). //***************************************************************************** // // Values that can be passed to LPCCOMxInt... functions as the ulIntFlags // parameter and returned by LPCIntStatus. // //***************************************************************************** #define LPC_COMx_INT_CX 0x02000000 // Raw Event State for COMx #define LPC_COMx_INT_CXTX 0x01000000 // Raw Event State for COMx TX #define LPC_COMx_INT_CXRX 0x00800000 // Raw Event State for COMx RX #define LPC_COMx_MASK_CX 0x00200000 // Event Mask for COMx #define LPC_COMx_MASK_CXTX 0x00100000 // Event Mask for COMx TX #define LPC_COMx_MASK_CXRX 0x00080000 // Event Mask for COMx RX //***************************************************************************** // // Values that can be passed to the LPCChannelDMAConfigSet function as part // of the ulConfig or ulMask parameter, or can be returned from the // LPCChannelConfigGet function. // //***************************************************************************** #define LPC_DMA_CH3_WEN 0x00000080 // Trigger DMA for "To Host" data // buffer is empty. #define LPC_DMA_CH3_REN 0x00000040 // Trigger DMA when "From Host" // data buffer is full. #define LPC_DMA_CH2_WEN 0x00000020 // Trigger DMA for "To Host" data // buffer is empty. #define LPC_DMA_CH2_REN 0x00000010 // Trigger DMA when "From Host" // data buffer is full. #define LPC_DMA_CH1_WEN 0x00000008 // Trigger DMA for "To Host" data // buffer is empty. #define LPC_DMA_CH1_REN 0x00000004 // Trigger DMA when "From Host" // data buffer is full. #define LPC_DMA_CH0_WEN 0x00000002 // Trigger DMA for "To Host" data // buffer is empty. #define LPC_DMA_CH0_REN 0x00000001 // Trigger DMA when "From Host" // data buffer is full. //***************************************************************************** // // Values that can be passed to the LPCChannelStatusSet and // LPCChannelStatusClear function, and returned by the LPCChannelStatusGet // function. // //***************************************************************************** #define LPC_CH_ST_USER0 0x00000100 // User Status Bit 0 #define LPC_CH_ST_USER1 0x00000200 // User Status Bit 1 #define LPC_CH_ST_USER2 0x00000400 // User Status Bit 2 #define LPC_CH_ST_USER3 0x00000800 // User Status Bit 3 #define LPC_CH_ST_USER4 0x00001000 // User Status Bit 4 //***************************************************************************** // // Additinoal values that can be returned by the LPCChannelStatusGet function. // //***************************************************************************** #define LPC_CH_ST_LASTHW 0x00000080 // Last Host Write #define LPC_CH_ST_HW1ST 0x00000040 // First Host Write #define LPC_CH_ST_LASTSW 0x00000020 // Last Slave Write #define LPC_CH_ST_SW1ST 0x00000010 // First Slave Write #define LPC_CH_ST_CMD 0x00000008 // Command or Data #define LPC_CH_ST_FRMH 0x00000002 // From-Host Transaction #define LPC_CH_ST_TOH 0x00000001 // To-Host Transaction //***************************************************************************** // // Prototypes for the APIs. // //***************************************************************************** extern void LPCConfigSet(unsigned long ulBase, unsigned long ulConfig); extern unsigned long LPCConfigGet(unsigned long ulBase); extern unsigned long LPCStatusGet(unsigned long ulBase, unsigned long *pulCount, unsigned long *pulPoolSize); extern void LPCStatusBlockAddressSet(unsigned long ulBase, unsigned long ulAddress, tBoolean bEnabled); extern unsigned LPCStatusBlockAddressGet(unsigned long ulBase); extern void LPCSCIAssert(unsigned long ulBase, unsigned long ulCount); extern void LPCIRQConfig(unsigned long ulBase, tBoolean bIRQPulse, tBoolean bIRQOnChange); extern void LPCIRQSet(unsigned long ulBase, unsigned long ulIRQ); extern void LPCIRQClear(unsigned long ulBase, unsigned long ulIRQ); extern unsigned long LPCIRQGet(unsigned long ulBase); extern void LPCIRQSend(unsigned long ulBase); extern void LPCIntRegister(unsigned long ulBase, void (*pfnHandler)(void)); extern void LPCIntUnregister(unsigned long ulBase); extern void LPCIntEnable(unsigned long ulBase, unsigned long ulIntFlags); extern void LPCIntDisable(unsigned long ulBase, unsigned long ulIntFlags); extern unsigned long LPCIntStatus(unsigned long ulBase, tBoolean bMasked); extern void LPCIntClear(unsigned long ulBase, unsigned long ulIntFlags); extern void LPCChannelEnable(unsigned long ulBase, unsigned long ulChannel); extern void LPCChannelDisable(unsigned long ulBase, unsigned long ulChannel); extern void LPCChannelConfigEPSet(unsigned long ulBase, unsigned long ulChannel, unsigned long ulConfig, unsigned long ulAddress, unsigned long ulOffset); extern void LPCChannelConfigMBSet(unsigned long ulBase, unsigned long ulChannel, unsigned long ulConfig, unsigned long ulAddress, unsigned long ulOffset); extern void LPCChannelConfigCOMxSet(unsigned long ulBase, unsigned long ulChannel, unsigned long ulConfig, unsigned long ulAddress, unsigned long ulOffset, unsigned long ulCOMxMode); extern unsigned long LPCChannelConfigGet(unsigned long ulBase, unsigned long ulChannel, unsigned long *pulAddress, unsigned long *pulOffset, unsigned long *pulCOMxMode); extern unsigned long LPCChannelPoolAddressGet(unsigned long ulBase, unsigned long ulChannel); extern unsigned long LPCChannelStatusGet(unsigned long ulBase, unsigned long ulChannel); extern void LPCChannelStatusSet(unsigned long ulBase, unsigned long ulChannel, unsigned long ulStatus); extern void LPCChannelStatusClear(unsigned long ulBase, unsigned long ulChannel, unsigned long ulStatus); extern void LPCChannelDMAConfigSet(unsigned long ulBase, unsigned long ulConfig, unsigned long ulMask); extern unsigned long LPCChannelDMAConfigGet(unsigned long ulBase); extern unsigned char LPCByteRead(unsigned long ulBase, unsigned long ulOffset); extern void LPCByteWrite(unsigned long ulBase, unsigned long ulOffset, unsigned char ucData); extern unsigned short LPCHalfWordRead(unsigned long ulBase, unsigned long ulOffset); extern void LPCHalfWordWrite(unsigned long ulBase, unsigned long ulOffset, unsigned short usData); extern unsigned long LPCWordRead(unsigned long ulBase, unsigned long ulOffset); extern void LPCWordWrite(unsigned long ulBase, unsigned long ulOffset, unsigned long ulData); extern void LPCCOMxIntEnable(unsigned long ulBase, unsigned long ulIntFlags); extern void LPCCOMxIntDisable(unsigned long ulBase, unsigned long ulIntFlags); extern unsigned long LPCCOMxIntStatus(unsigned long ulBase, tBoolean bMasked); extern void LPCCOMxIntClear(unsigned long ulBase, unsigned long ulIntFlags); //***************************************************************************** // // Mark the end of the C bindings section for C++ compilers. // //***************************************************************************** #ifdef __cplusplus } #endif #endif // __LPC_H__
[ "mbbill@gmail.com" ]
mbbill@gmail.com
ba1e8d10b4304a881878387964db1a02e670c5d3
166fba38e48ca1968348f5a6fd8c435392d619db
/jzz.c
d1576d8fbf128a1060ae1ca5dd4b9ce9d27aea4e
[]
no_license
Yuvpriya/jazz
0925c109f2f2652ed886f4cce0c0c362ff96ba5b
0e81454801892f6fc762f74cb15b363d8640c301
refs/heads/master
2021-01-01T16:53:35.835810
2017-07-21T12:33:36
2017-07-21T12:33:36
97,944,469
0
0
null
null
null
null
UTF-8
C
false
false
295
c
#include<stdio.h> #include<string.h> int main() { char p[20],q[20],r[20],i; scanf("%s",p); scanf("%s",r); scanf("%s",q); for(i=0;i<19;i++) { if((p[i]==q[i])&&(q[i]==r[i])) { printf("%c",p[i]); } else break; } return 0; }
[ "noreply@github.com" ]
noreply@github.com
872d8f0e8f79d8d3cc847d279d797bd59b047c8a
bfb77baec8635ec547dcab598fa537785a03d3fb
/MDK-ARM/Lora.c
f4632170ad1e6ae45ecaa5aa22ab3d9fc338799b
[]
no_license
huynd98/SENSOR1_DATN
6fd4dc6eaae9665b738c86c31dd83b432823d140
6faedbe233ec30f4f1c79f0368cafcbe2a9ff678
refs/heads/main
2023-02-13T04:16:59.856438
2021-01-11T15:20:07
2021-01-11T15:20:07
318,145,813
0
0
null
null
null
null
UTF-8
C
false
false
8,661
c
#include "Lora.h" uint8_t readRegLora_8Bit(uint8_t address){ uint8_t result=0; HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_RESET); HAL_Delay(1); while ( HAL_SPI_Transmit(&hspi2,&address,1,100) != HAL_OK ); while ( HAL_SPI_Receive(&hspi2,&result,1,100) != HAL_OK ); HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_SET); return result; } /*****************************************************************/ void readRegLora(uint8_t address, uint8_t *receiveData, uint8_t length){ HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_RESET); HAL_Delay(1); while ( HAL_SPI_Transmit(&hspi2,&address,1,100) != HAL_OK ); while ( HAL_SPI_Receive(&hspi2,receiveData,length,100) != HAL_OK ); HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_SET); } /*****************************************************************/ void writeRegLora(uint8_t address, uint8_t data){ uint8_t add; add = address | 0x80; HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_RESET); HAL_Delay(1); while ( HAL_SPI_Transmit(&hspi2,&add,1,100) != HAL_OK ); while ( HAL_SPI_Transmit(&hspi2,&data,1,100) != HAL_OK ); HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_SET); } /*****************************************************************/ void writeToFIFO(uint8_t *data, uint8_t length){ uint8_t add= REG_FIFO | 0x80; HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_RESET); HAL_Delay(1); while ( HAL_SPI_Transmit(&hspi2,&add,1,100) != HAL_OK ); while ( HAL_SPI_Transmit(&hspi2,data,length,100) != HAL_OK ); HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_SET); } /*****************************************************************/ void LoraSetFreq(uint32_t frequency){ uint64_t frf = ((uint64_t)frequency << 19) / 32000000; writeRegLora(REG_FRF_MSB, (uint8_t)(frf >> 16)); writeRegLora(REG_FRF_MID, (uint8_t)(frf >> 8)); writeRegLora(REG_FRF_LSB, (uint8_t)(frf >> 0)); } /*****************************************************************/ void LoraSleep(void){ writeRegLora(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_SLEEP); } /*****************************************************************/ void LoraIdle(void){ writeRegLora(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_STDBY); } //********************************************************** uint16_t LoraBegin(void){ //Blink Reset Pin HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8,GPIO_PIN_SET); HAL_Delay(10); HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8,GPIO_PIN_RESET); HAL_Delay(10); HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8,GPIO_PIN_SET); HAL_Delay(10); //Blink Slave Selection HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_RESET); HAL_Delay(10); HAL_GPIO_WritePin(GPIOA, LORA_NSS_Pin, GPIO_PIN_SET); HAL_Delay(10); //Check Version uint8_t version = readRegLora_8Bit(REG_VERSION); if (version != 0x12) return 0; //put in sleep mode LoraSleep(); //Set Frequency LoraSetFreq(FREQUENCY); //Set base address FIFO writeRegLora(REG_FIFO_TX_BASE_ADDR, 0); writeRegLora(REG_FIFO_RX_BASE_ADDR, 0); //set explicitheader mode //writeRegLora(REG_MODEM_CONFIG_1, readRegLora_8Bit(REG_MODEM_CONFIG_1) & 0xfe); LoraExplicitHeaderMode(); // set LNA boost writeRegLora(REG_LNA, readRegLora_8Bit(REG_LNA) | 0x03); // set auto AGC writeRegLora(REG_MODEM_CONFIG_3, 0x04); //ocpTrim writeRegLora(REG_OCP, 0x20 | (0x1F & 0x0B)); //TX power writeRegLora(REG_PA_CONFIG, PA_BOOST | (17 - 2)); //put in standby Mode LoraIdle(); return 1; } //***************************************************** void LoraEnd(void){ LoraSleep(); } //**************************************************** void LoraSetLdoFlag(void){ // Section 4.1.1.5 long symbolDuration = 1000 / ( LoraGetSignalBW() / (1L << LoraGetSpreadingFactor()) ) ; uint8_t config3 = readRegLora_8Bit(REG_MODEM_CONFIG_3); // Section 4.1.1.6 if(symbolDuration > 16) config3 = config3 | 0x08; else config3 = config3 & 0xF7; // bitWrite(config3, 3, ldoOn); writeRegLora(REG_MODEM_CONFIG_3, config3); } //**************************************************** //set Spreading Factor void LoraSetSpreadingFactor(uint8_t sf){ if (sf < 6) { sf = 6; } else if (sf > 12) { sf = 12; } if (sf == 6) { writeRegLora(REG_DETECTION_OPTIMIZE, 0xc5); writeRegLora(REG_DETECTION_THRESHOLD, 0x0c); } else { writeRegLora(REG_DETECTION_OPTIMIZE, 0xc3); writeRegLora(REG_DETECTION_THRESHOLD, 0x0a); } writeRegLora(REG_MODEM_CONFIG_2, (readRegLora_8Bit(REG_MODEM_CONFIG_2) & 0x0f) | ((sf << 4) & 0xf0)); LoraSetLdoFlag(); } //****************************************************** uint16_t LoraGetSpreadingFactor(void){ return readRegLora_8Bit(REG_MODEM_CONFIG_2) >> 4; } //*************************************************** //get Signal Band Width uint32_t LoraGetSignalBW(void){ uint8_t bw = (readRegLora_8Bit(REG_MODEM_CONFIG_1) >> 4); switch (bw) { case 0: return 7800; case 1: return 10400; case 2: return 15600; case 3: return 20800; case 4: return 31250; case 5: return 41700; case 6: return 62500; case 7: return 125000; case 8: return 250000; case 9: return 500000; } return 0; } //***************************************************** //set Signal BandWidth void LoraSetSignalBW(uint32_t bandwidth){ int bw; if (bandwidth <= 7.8E3) { bw = 0; } else if (bandwidth <= 10400) { bw = 1; } else if (bandwidth <= 15600) { bw = 2; } else if (bandwidth <= 20800) { bw = 3; } else if (bandwidth <= 31250) { bw = 4; } else if (bandwidth <= 41700) { bw = 5; } else if (bandwidth <= 62500) { bw = 6; } else if (bandwidth <= 125000) { bw = 7; } else if (bandwidth <= 250000) { bw = 8; } else /*if (bandwidth <= 250E3)*/ { bw = 9; } writeRegLora(REG_MODEM_CONFIG_1, (readRegLora_8Bit(REG_MODEM_CONFIG_1) & 0x0f) | (bw << 4)); LoraSetLdoFlag(); } //******************************************************** //set Coding Rate void LoraSetCodingRate(int denominator){ if (denominator < 5) { denominator = 5; } else if (denominator > 8) { denominator = 8; } int cr = denominator - 4; writeRegLora(REG_MODEM_CONFIG_1, (readRegLora_8Bit(REG_MODEM_CONFIG_1) & 0xf1) | (cr << 1)); } //*********************************************************** //Lora is Transmitting uint8_t LoraIsTransmitting(void){ if ((readRegLora_8Bit(REG_OP_MODE) & MODE_TX) == MODE_TX) { return 1; } if (readRegLora_8Bit(REG_IRQ_FLAGS) & IRQ_TX_DONE_MASK) { // clear IRQ's writeRegLora(REG_IRQ_FLAGS, IRQ_TX_DONE_MASK); } return 0; } //*********************************************************** //Set imlicit Header Mode void LoraImplicitHeaderMode(void){ writeRegLora(REG_MODEM_CONFIG_1, readRegLora_8Bit(REG_MODEM_CONFIG_1) | 0x01); } //*********************************************************** //Set explicit Header Mode void LoraExplicitHeaderMode(void){ writeRegLora(REG_MODEM_CONFIG_1, readRegLora_8Bit(REG_MODEM_CONFIG_1) & 0xFE); } /********************************************************/ // set Lora into Rx mode : Continous or Single void LoraRxMode(uint8_t RxMode){ writeRegLora(REG_OP_MODE, MODE_LONG_RANGE_MODE | RxMode); } /********************************************************/ // set Lora into Rx mode : Continous or Single void LoraTxMode(){ writeRegLora(REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_TX); } /**************************************************************/ void LoraRead(uint8_t *arrayReadData){ uint8_t packetLength = 0; uint8_t i; uint8_t irqFlag = readRegLora_8Bit(REG_IRQ_FLAGS); writeRegLora(REG_IRQ_FLAGS, irqFlag); if((irqFlag & 0x40) != 0){ packetLength = readRegLora_8Bit(REG_RX_NB_BYTES); writeRegLora(REG_FIFO_ADDR_PTR, readRegLora_8Bit(REG_FIFO_RX_CURRENT_ADDR)); for(i = 0; i <packetLength; i++){ arrayReadData[i]=readRegLora_8Bit(REG_FIFO); } //powerReadInt = ( arrayReadData[0]-48)*10 + (arrayReadData[1] -48); //neu doc dc HAL_GPIO_WritePin(GPIOB,GPIO_PIN_8,GPIO_PIN_RESET); HAL_Delay(200); HAL_GPIO_WritePin(GPIOB,GPIO_PIN_8,GPIO_PIN_SET); HAL_Delay(200); } } /**************************************************************/ //Transfer Data have first address = buffer, and length = uint8_t Size //return Size transfered uint8_t LoraTransfer(uint8_t *buffer, uint8_t size){ // reset FIFO address and paload length writeRegLora(REG_FIFO_ADDR_PTR, 0); writeRegLora(REG_PAYLOAD_LENGTH, 0); writeToFIFO(buffer,size); writeRegLora(REG_PAYLOAD_LENGTH, size); // put in TX mode LoraTxMode(); // wait for TX done while ((readRegLora_8Bit(REG_IRQ_FLAGS) & IRQ_TX_DONE_MASK) == 0) {} // clear IRQ's writeRegLora(REG_IRQ_FLAGS, IRQ_TX_DONE_MASK); return 1; } //convert read data to int
[ "nguyendanghuy247@gmail.com" ]
nguyendanghuy247@gmail.com
74155732b9c958f7e75602f9329f9c20146aa7a9
54acb0bc5cfe18341533cf9b451757374e98f9d0
/ProiectRetele/functions.h
95e415efb92f5c944b170864006c8e9debcc06be
[]
no_license
balandan/Proiect-Retele
2a13b6bb3ca917188fa2f41bab159ea47be9ccf2
430503bfc24a963c5577a50a18a3254c3142f217
refs/heads/master
2020-03-12T15:45:09.726537
2018-04-23T13:17:14
2018-04-23T13:17:14
130,698,324
0
0
null
null
null
null
UTF-8
C
false
false
8,566
h
#include <stdio.h> #include "listOfItems.h" int typeOfUser; int searchInServer(int descriptor,char fileName[30]) { DIR *dir; struct dirent *file; dir = opendir ("."); if(dir==NULL) { printf("Fail to open this directory"); exit(1); } while( (file=readdir(dir))!=NULL ) { if( strcmp(file->d_name,fileName)==0) { closedir(dir); return 1; } } closedir(dir); return 0; } int download(char nameOfFile[30],int descriptor) { int ptr_myfile; int counter=0; char buffer[1024]; char mesaj[100]; bzero(mesaj,100); char messageFromClient[50]; ptr_myfile=open(nameOfFile,O_RDONLY); if (ptr_myfile < 0) { strcat(mesaj,"Unable to open file!"); //printf("%s",mesaj); //write(descriptor,"Unable to open file!",30); } else strcat(mesaj,"The file was found!"); //printf("%d\n",bytes); //printf("%d",counter); printf("[server]%s\n",mesaj); write(descriptor,mesaj,35); bzero(messageFromClient,50); read(descriptor,messageFromClient,50); if(strcmp(messageFromClient,"done")==0 && strcmp(mesaj,"The file was found!")==0) { int bytes; while ((bytes=read(ptr_myfile,buffer,1024))>0) { counter+=bytes; //printf("%d\n",bytes); } int n = counter; write(descriptor, &n, sizeof(n)); close(ptr_myfile); write(descriptor,nameOfFile,100); ptr_myfile=open(nameOfFile,O_RDONLY); while (n>0) { bytes=read(ptr_myfile,buffer,1024); n=n-bytes; printf("[server]We sent %d%s%d%s\n",bytes," there are still ", n ," bytes to send"); sleep(0.1); write(descriptor,buffer,bytes); //printf("[server]We sent %d%s"," bytes"); } } bzero(messageFromClient,50); close(ptr_myfile); } void primireComenzi(int descriptor) { char message[100]; char *firstWord; char *secondWord; char path[100]; read(descriptor,message,100); printf("[server]The message recived:%s",message); //primim comanda //printf("%s",firstWord); if(strcmp(message,"ls\n")==0 && (typeOfUser==0 || typeOfUser==1)) //comanda pentru ls { write(descriptor,"start",6); listOfItems(descriptor); primireComenzi(descriptor); } else if (strcmp(message,"exit\n")==0 && (typeOfUser==0 || typeOfUser==1)) { char answer[5]; write(descriptor,"Are you sure?",15); printf ("[server]Message sent:%s\n","Are you sure?\n"); read(descriptor,answer,5); if(strcmp(answer,"yes")==0) { printf("[server]A client has disconnected\n"); close(descriptor); exit(0); } else primireComenzi(descriptor); } firstWord=strtok(message," "); secondWord=strtok(NULL,"\n"); if(strcmp(firstWord,"download")==0 && (typeOfUser==0 || typeOfUser==1)) { printf("[server]The file that the client ask for:%s\n",secondWord); //read(descriptor,path,100); //printf("%s",path); download(secondWord,descriptor); primireComenzi(descriptor); } else if (strcmp(firstWord,"delete")==0 && typeOfUser==1) { //printf("[server]Message recived:delete %s",secondWord); if(remove(secondWord)==0) write(descriptor,"The file was deleted!",30); else write(descriptor,"The file can't be deleted or do not exist",50); primireComenzi(descriptor); } else if (strcmp(firstWord,"delete")==0 && typeOfUser==0) { primireComenzi(descriptor); } else if (strcmp(firstWord,"copy")==0 && typeOfUser==1) { int x=searchInServer(descriptor,secondWord); if (x==1) { char nameForTheNewFile[30]; char buffer[1024]; char file[30];//numele final al fisierului pe care il deschidem char theFileWeOpen[30]; char *extension;//folosim pentru a afla extensia noului fisier char *nume;//folosim pentru a afla denumirea noului fisier int openFile; write(descriptor,"File found!",15); printf("%s\n","[server]File found!"); read(descriptor,nameForTheNewFile,30); bzero(theFileWeOpen,30); strcat(theFileWeOpen,secondWord); extension=strtok(secondWord,"."); extension=strtok(NULL,"\n"); nume=strtok(nameForTheNewFile,"\n"); bzero(file,30); strcat(file,nume); strcat(file,"."); strcat(file,extension); openFile=open(theFileWeOpen,O_RDONLY); if (openFile < 0) { printf("%s\n","[server]Unable to open file!"); } int x; x=open(file,O_WRONLY|O_CREAT); int bytes=0; while ((bytes=read(openFile,buffer,1024))>0) { write(x,buffer,bytes); } close(x); close(openFile); printf("[server]The file was copied!\n"); write(descriptor,"Done",5); primireComenzi(descriptor); } else { write(descriptor,"File not found!",15); printf("%s\n","[server]File not found!"); primireComenzi(descriptor); } } else if (strcmp(firstWord,"copy")==0 && typeOfUser==0) { primireComenzi(descriptor); } else primireComenzi(descriptor); //primireComenzi(descriptor); } int searchInFile(char user[20],char pass[20]) { int nr_linie=0; int nr_linie2=0; char buffer[20]; FILE *a; a=fopen("user.txt","r"); if (a!=NULL) { while(!feof(a)) { fgets(buffer,20,a); nr_linie+=1; if (strcmp(buffer,user)==0) { break; } bzero(buffer,20); } fclose(a); if(nr_linie %2==1) { a=fopen("user.txt","r"); while(!feof(a)) { fgets(buffer,20,a); nr_linie2+=1; if(nr_linie2==nr_linie+1 && strcmp(buffer,pass)==0) return 1; bzero(buffer,20); } } } return 0; } int typeUser (char username[30]) { char buffer[30]; FILE *b; b=fopen("whitelist.txt","r"); if(b!=NULL) { while(!feof(b)) { fgets(buffer,30,b); if(strcmp(buffer,username)==0) return 1; } } fclose(b); b=fopen("blacklist.txt","r"); if(b!=NULL) { while(!feof(b)) { fgets(buffer,30,b); if(strcmp(buffer,username)==0) return 0; } } fclose(b); } void login (int descriptor) { char *username; char *password; char buffer[100]; char msg[100]; //mesajul primit de la client int i=0; int y; char c; char newPassword[50]; int bytes; bytes = read (descriptor, msg, sizeof (buffer)); //Citim datele de autentificare if (bytes < 0) { perror ("Eroare la read() de la client.\n"); close(descriptor); exit(0); } printf ("[server]Message recived:%s\n", msg); username = strtok(msg,"\n"); //Le prelucram password = strtok(NULL,"\n"); while(password[i]!='\0') { y=(int)password[i]; y--; c=y; newPassword[i]=c; i++; } newPassword[i]='\0'; //Am decriptat parola char spatiu[3]="\n"; char nume[20]; bzero(nume,20); strcat(nume,username); strcat(nume,spatiu); int x=searchInFile(nume,newPassword); //cautam in fisierul de logare daca datele primite sunt valide if(x){ bzero(msg,100); strcat(msg,"Connected"); printf ("[server]Message sent:%s\n",msg); typeOfUser=typeUser(nume); //daca sunt valide determinam din ce fisier face parte userul conectat //printf("%d",typeOfUser); } else { bzero(msg,100); strcat(msg,"Try again"); printf ("[server]Message sent:%s\n",msg); } if (bytes && write (descriptor, msg, bytes) < 0) //trimitem mesaj de raspuns { perror ("[server] Eroare la write() catre client.\n"); //return 0; } if (strcmp(msg,"Connected")==0) //daca mesajul trimis este connected apelam functia unde putem primi comenzi { write(descriptor, &typeOfUser, sizeof(typeOfUser));//scriem clientului tipul de user ce tocmai s-a logat //printf("%d",typeOfUser); primireComenzi(descriptor); } else if(strcmp(msg,"Try again")==0) //daca datele sunt gresite se ofera posibilitatea de a incerca de nou { login(descriptor); } close(descriptor); exit(0); }
[ "noreply@github.com" ]
noreply@github.com
0a8e0289152e8c5ddde56fb7659d8c479c4582cf
e4a1f59a825748852406246ad4a0a7e58c0c756b
/code/functs.h
be49b077ece743129c59d76e88d82e6b23007194
[]
no_license
MVour/diseaseAggregator
19d46631f1982a407cc243431392c9f1bdc13094
acb9b05c4d6fe73ccbc063f0d4e9132352c9e97d
refs/heads/master
2023-02-11T03:08:55.542473
2021-01-15T20:48:48
2021-01-15T20:48:48
330,018,961
0
0
null
null
null
null
UTF-8
C
false
false
975
h
// #include "myList.h" #include "myHash.h" #include "heap.h" #include "filesStats.h" ////// FUNCTS void printMenu(); char* act(int, hashTable*, hashTable*, infoNode*, StatsList*, char* buf); // void act_1(hashTable*, char*, char*); char* act_2(hashTable*, char*, char*, char*, char*); char* act_3(StatsList* myStats, int, char*, char*, char*, char*); char* act_4(infoNode*, char*); char* act_5(StatsList*, char*, char*, char*, char*); char* act_6(hashTable* , char*, char*, char*, char*); // void act_3_4(hashTable*, char*, char*, char*, int, int); // void act_5(hashTable*, hashTable*, infoNode*, myPatient*); // void act_6(infoNode*, char*, char*); // void act_7(hashTable*, char*); // void act_8(hashTable* cHash, hashTable* dHash, infoNode* pList); int isDate(char*); void treeToHeap(RBT*, maxHeap*, RBnode*, char*, char*, char*); int statsToHeap(StatsList*, maxHeap*, char* country, char* disease, char*, char*); // int count_keys(RBnode* n, char* date1, char* date2);
[ "m.vourtzoumis@gmail.com" ]
m.vourtzoumis@gmail.com
25021c56cbd311feb2474cce81be4758cf5ee5d8
394c1965d2300d06df1a72868670397d4ac262c5
/Libft/srcs/ft_putchar_fd.c
df6248e83b11873e2ab6dcb3898dc37e6be95fa4
[]
no_license
lterrail/minishell
f0584386ca9f9184ab21f32ad900610ddb75f090
a2221f74445c526eec356b672efee4640fd7aefb
refs/heads/master
2021-07-25T16:39:30.554803
2020-04-30T15:55:05
2020-04-30T15:55:05
158,931,545
0
0
null
null
null
null
UTF-8
C
false
false
970
c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putchar_fd.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: lterrail <lterrail@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2018/04/03 16:24:20 by lterrail #+# #+# */ /* Updated: 2018/04/11 17:00:53 by lterrail ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void ft_putchar_fd(char c, int fd) { write(fd, &c, 1); }
[ "lterrail@e1r10p17.42.fr" ]
lterrail@e1r10p17.42.fr
26f23f68c2d65c91dbf7731ee589f62a41d27d8a
7da6ed1e31f4dd92d923cc867f21b33a74e0ebc1
/src/createregion.c
4743ff3cf0a3b2c59883d6f6f024f8bc1946adb9
[]
no_license
freudshow/practice
2f672a460ea9d61135b6ac26919fdd3d9fab5224
6801ea586c5db2f30a268040f3390e303cf0fb89
refs/heads/master
2021-07-05T00:47:14.143021
2021-06-09T06:03:17
2021-06-09T06:03:17
90,633,429
0
2
null
null
null
null
UTF-8
C
false
false
159
c
#include "shm.h" int rand(void); int rand_r(unsigned int *seedp); void srand(unsigned int seed); int main() { init_sem_set(); init_region(); exit(0); }
[ "s_baoshan@163.com" ]
s_baoshan@163.com
c8bd691314e2dda543aebd10b67df1d55639c9da
598883867c454c3706ef844d5c0505c00142ba61
/LCD/LCD.h
8a928231dcc96aff1080d4fd704910a849aef356
[]
no_license
ahmedelgazwy/Password-Based-Lock
996b245047e1602b175aad5a7b1c04eb3d0e2ff7
337ebc6e545d25e134d972cb5ef637ad986fa650
refs/heads/master
2021-03-02T20:24:19.206032
2020-03-08T19:40:14
2020-03-08T19:40:14
245,902,521
0
0
null
2020-03-08T23:06:35
2020-03-08T23:06:35
null
UTF-8
C
false
false
568
h
#ifndef __LCD__H__ #define __LCD__H__ #include "std_types.h" #include "IO_ports.h" #define LCD_DATA GPIO_PORTC_DATA_R #define LCD_DATA_DIR GPIO_PORTC_DIR_R #define LCD_DATA_DEN GPIO_PORTC_DEN_R #define LCD_DATA_AFSEL GPIO_PORTC_AFSEL_R #define LCD_DATA_AMSEL GPIO_PORTC_AMSEL_R #define LCD_DATA_PCTL GPIO_PORTC_PCTL_R #define LCD_CTRL GPIO_PORTD_DATA_R #define LCD_CTRL_DIR GPIO_PORTD_DIR_R #define LCD_CTRL_DEN GPIO_PORTD_DEN_R #define LCD_CTRL_AFSEL GPIO_PORTD_AFSEL_R #define LCD_CTRL_AMSEL GPIO_PORTD_AMSEL_R #define LCD_CTRL_PCTL GPIO_PORTD_PCTL_R #endif
[ "noreply@github.com" ]
noreply@github.com
04fea91c01ee1587f19ad32ee856fa3859d09f22
ade70089afe2f9bd496985fe67d46c5372042ab0
/nvm/versions/node/v16.14.0/include/node/openssl/opensslv.h
afe0161c9ca2dc78a4eac5c0a5319f30e43aba74
[ "MIT", "LicenseRef-scancode-unknown-license-reference", "CC0-1.0", "LicenseRef-scancode-openssl", "LicenseRef-scancode-unicode", "Artistic-2.0", "BSD-3-Clause", "Zlib", "NAIST-2003", "ISC", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "NTP", "LicenseRef-scancode-public-domain-disclaimer", "ICU" ]
permissive
gn0rt0n/dotfiles
96e37a87cec555cbfd222795466c140eb502c892
35f01242e7ac73a8b21b5e62398f1185102b7ee9
refs/heads/master
2023-02-23T03:02:35.212560
2023-02-19T02:53:00
2023-02-19T02:53:00
299,629,236
0
1
null
2022-10-16T02:07:11
2020-09-29T13:40:38
C
UTF-8
C
false
false
4,110
h
/* * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html */ #ifndef HEADER_OPENSSLV_H # define HEADER_OPENSSLV_H #ifdef __cplusplus extern "C" { #endif /*- * Numeric release version identifier: * MNNFFPPS: major minor fix patch status * The status nibble has one of the values 0 for development, 1 to e for betas * 1 to 14, and f for release. The patch level is exactly that. * For example: * 0.9.3-dev 0x00903000 * 0.9.3-beta1 0x00903001 * 0.9.3-beta2-dev 0x00903002 * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) * 0.9.3 0x0090300f * 0.9.3a 0x0090301f * 0.9.4 0x0090400f * 1.2.3z 0x102031af * * For continuity reasons (because 0.9.5 is already out, and is coded * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level * part is slightly different, by setting the highest bit. This means * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start * with 0x0090600S... * * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ # define OPENSSL_VERSION_NUMBER 0x101010dfL # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1m+quic 14 Dec 2021" /*- * The macros below are to be used for shared library (.so, .dll, ...) * versioning. That kind of versioning works a bit differently between * operating systems. The most usual scheme is to set a major and a minor * number, and have the runtime loader check that the major number is equal * to what it was at application link time, while the minor number has to * be greater or equal to what it was at application link time. With this * scheme, the version number is usually part of the file name, like this: * * libcrypto.so.0.9 * * Some unixen also make a softlink with the major version number only: * * libcrypto.so.0 * * On Tru64 and IRIX 6.x it works a little bit differently. There, the * shared library version is stored in the file, and is actually a series * of versions, separated by colons. The rightmost version present in the * library when linking an application is stored in the application to be * matched at run time. When the application is run, a check is done to * see if the library version stored in the application matches any of the * versions in the version string of the library itself. * This version string can be constructed in any way, depending on what * kind of matching is desired. However, to implement the same scheme as * the one used in the other unixen, all compatible versions, from lowest * to highest, should be part of the string. Consecutive builds would * give the following versions strings: * * 3.0 * 3.0:3.1 * 3.0:3.1:3.2 * 4.0 * 4.0:4.1 * * Notice how version 4 is completely incompatible with version, and * therefore give the breach you can see. * * There may be other schemes as well that I haven't yet discovered. * * So, here's the way it works here: first of all, the library version * number doesn't need at all to match the overall OpenSSL version. * However, it's nice and more understandable if it actually does. * The current library version is stored in the macro SHLIB_VERSION_NUMBER, * which is just a piece of text in the format "M.m.e" (Major, minor, edit). * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, * we need to keep a history of version numbers, which is done in the * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and * should only keep the versions that are binary compatible with the current. */ # define SHLIB_VERSION_HISTORY "" # define SHLIB_VERSION_NUMBER "81.1.1" #ifdef __cplusplus } #endif #endif /* HEADER_OPENSSLV_H */
[ "gary@odindev.com" ]
gary@odindev.com
ae6588ae9020907de235f7dc4c83350dbf925003
60cddbbb30ef7614070f6e1691ab9a3f0ce407e4
/robo2-xsdk/libs/phymod/chip/falcon16/falcon16_diagnostics_dispatch.c
12ba0238027635ff729ee0e14f43ab82c3db76e5
[]
no_license
David-Croose/Broadcom-Compute-Connectivity-Software-robo2-xsdk
f2a1fe9a704e1a1873eac2fba02125ba7cb1570f
25b15c851d6e8a5a70715603e4f8d8a9af8f66fe
refs/heads/master
2022-11-27T00:00:23.553005
2020-08-03T07:36:34
2020-08-03T07:36:34
null
0
0
null
null
null
null
UTF-8
C
false
false
1,555
c
/* * * $Id: phymod.xml,v 1.1.2.5 Broadcom SDK $ * * * This license is set out in https://github.com/Broadcom/Broadcom-Compute-Connectivity-Software-robo2-xsdk/master/Legal/LICENSE file. * * $Copyright: (c) 2020 Broadcom Inc. * Broadcom Proprietary and Confidential. All rights reserved.$ * * * DO NOT EDIT THIS FILE! * */ #include <phymod/phymod.h> #include <phymod/phymod_diagnostics.h> #include <phymod/phymod_diagnostics_dispatch.h> #ifdef PHYMOD_FALCON16_SUPPORT #include <phymod/chip/falcon16_diagnostics.h> __phymod_diagnostics__dispatch__t__ phymod_diagnostics_falcon16_diagnostics_driver = { falcon16_phy_rx_slicer_position_set, falcon16_phy_rx_slicer_position_get, falcon16_phy_rx_slicer_position_max_get, falcon16_phy_prbs_config_set, falcon16_phy_prbs_config_get, falcon16_phy_prbs_enable_set, falcon16_phy_prbs_enable_get, falcon16_phy_prbs_status_get, falcon16_phy_pattern_config_set, falcon16_phy_pattern_config_get, falcon16_phy_pattern_enable_set, falcon16_phy_pattern_enable_get, falcon16_core_diagnostics_get, falcon16_phy_diagnostics_get, falcon16_phy_pmd_info_dump, NULL, /* phymod_phy_pcs_info_dump */ falcon16_phy_eyescan_run, NULL, /* phymod_phy_link_mon_enable_set */ NULL, /* phymod_phy_link_mon_enable_get */ NULL, /* phymod_phy_link_mon_status_get */ NULL, /* phymod_phy_fec_correctable_counter_get */ NULL, /* phymod_phy_fec_uncorrectable_counter_get */ }; #endif /* PHYMOD_FALCON16_SUPPORT */
[ "murali.policharla@broadcom.com" ]
murali.policharla@broadcom.com
4e6ed1901fc0f9319647713b68b5b6b327930a06
3f309b1dd9774ca1eef2c7bb7626447e6c3dbe70
/apps/evsys/evsys_trigger/firmware/src/config/sam_l10_xpro/peripheral/clock/plib_clock.c
e3a6e5298e13415f391dd1c25b0e3d7d7fe6eb46
[ "LicenseRef-scancode-unknown-license-reference", "ISC", "LicenseRef-scancode-public-domain" ]
permissive
Unitek-KL/csp
30892ddf1375f5191173cafdfba5f098245a0ff7
2ac7ba59465f23959e51d2f16a5712b57b79ef5f
refs/heads/master
2020-12-10T13:42:26.878408
2019-10-14T17:55:22
2019-10-14T17:56:20
233,609,402
0
0
NOASSERTION
2020-01-13T14:04:51
2020-01-13T14:04:51
null
UTF-8
C
false
false
4,781
c
/******************************************************************************* CLOCK PLIB Company: Microchip Technology Inc. File Name: plib_clock.c Summary: CLOCK PLIB Implementation File. Description: None *******************************************************************************/ /******************************************************************************* * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your * responsibility to comply with third party license terms applicable to your * use of third party software (including open source software) that may * accompany Microchip software. * * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A * PARTICULAR PURPOSE. * * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. *******************************************************************************/ #include "plib_clock.h" #include "device.h" static void OSCCTRL_Initialize(void) { /**************** OSC16M IniTialization *************/ OSCCTRL_REGS->OSCCTRL_OSC16MCTRL = OSCCTRL_OSC16MCTRL_FSEL(0x0) | OSCCTRL_OSC16MCTRL_ENABLE_Msk; } static void OSC32KCTRL_Initialize(void) { OSC32KCTRL_REGS->OSC32KCTRL_RTCCTRL = OSC32KCTRL_RTCCTRL_RTCSEL(0); } static void FDPLL_Initialize(void) { GCLK_REGS->GCLK_PCHCTRL[0] = GCLK_PCHCTRL_GEN(0x1) | GCLK_PCHCTRL_CHEN_Msk; while ((GCLK_REGS->GCLK_PCHCTRL[0] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) { /* Wait for synchronization */ } /****************** DPLL Initialization *********************************/ /* Configure DPLL */ OSCCTRL_REGS->OSCCTRL_DPLLCTRLB = OSCCTRL_DPLLCTRLB_FILTER(0) | OSCCTRL_DPLLCTRLB_LTIME(0)| OSCCTRL_DPLLCTRLB_REFCLK(2) ; OSCCTRL_REGS->OSCCTRL_DPLLRATIO = OSCCTRL_DPLLRATIO_LDRFRAC(0) | OSCCTRL_DPLLRATIO_LDR(63); while((OSCCTRL_REGS->OSCCTRL_DPLLSYNCBUSY & OSCCTRL_DPLLSYNCBUSY_DPLLRATIO_Msk) == OSCCTRL_DPLLSYNCBUSY_DPLLRATIO_Msk) { /* Waiting for the synchronization */ } /* Selection of the DPLL Enable */ OSCCTRL_REGS->OSCCTRL_DPLLCTRLA = OSCCTRL_DPLLCTRLA_ENABLE_Msk ; while((OSCCTRL_REGS->OSCCTRL_DPLLSYNCBUSY & OSCCTRL_DPLLSYNCBUSY_ENABLE_Msk) == OSCCTRL_DPLLSYNCBUSY_ENABLE_Msk ) { /* Waiting for the DPLL enable synchronization */ } while((OSCCTRL_REGS->OSCCTRL_DPLLSTATUS & (OSCCTRL_DPLLSTATUS_LOCK_Msk | OSCCTRL_DPLLSTATUS_CLKRDY_Msk)) != (OSCCTRL_DPLLSTATUS_LOCK_Msk | OSCCTRL_DPLLSTATUS_CLKRDY_Msk)) { /* Waiting for the Ready state */ } } static void GCLK0_Initialize(void) { GCLK_REGS->GCLK_GENCTRL[0] = GCLK_GENCTRL_DIV(2) | GCLK_GENCTRL_SRC(7) | GCLK_GENCTRL_GENEN_Msk; while((GCLK_REGS->GCLK_SYNCBUSY & GCLK_SYNCBUSY_GENCTRL0_Msk) == GCLK_SYNCBUSY_GENCTRL0_Msk) { /* wait for the Generator 0 synchronization */ } } static void GCLK1_Initialize(void) { GCLK_REGS->GCLK_GENCTRL[1] = GCLK_GENCTRL_DIV(4) | GCLK_GENCTRL_SRC(5) | GCLK_GENCTRL_GENEN_Msk; while((GCLK_REGS->GCLK_SYNCBUSY & GCLK_SYNCBUSY_GENCTRL1_Msk) == GCLK_SYNCBUSY_GENCTRL1_Msk) { /* wait for the Generator 1 synchronization */ } } void CLOCK_Initialize (void) { /* Function to Initialize the Oscillators */ OSCCTRL_Initialize(); /* Function to Initialize the 32KHz Oscillators */ OSC32KCTRL_Initialize(); GCLK1_Initialize(); FDPLL_Initialize(); GCLK0_Initialize(); /* Selection of the Generator and write Lock for EIC */ GCLK_REGS->GCLK_PCHCTRL[3] = GCLK_PCHCTRL_GEN(0x0) | GCLK_PCHCTRL_CHEN_Msk; while ((GCLK_REGS->GCLK_PCHCTRL[3] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) { /* Wait for synchronization */ } /* Selection of the Generator and write Lock for EVSYS_0 */ GCLK_REGS->GCLK_PCHCTRL[6] = GCLK_PCHCTRL_GEN(0x0) | GCLK_PCHCTRL_CHEN_Msk; while ((GCLK_REGS->GCLK_PCHCTRL[6] & GCLK_PCHCTRL_CHEN_Msk) != GCLK_PCHCTRL_CHEN_Msk) { /* Wait for synchronization */ } }
[ "http://support.microchip.com" ]
http://support.microchip.com
140d8434c9645707bed4716235e4ff9dc4315eca
c9eccf85f19371a3843911c1480e761de4773722
/src/lvgl/src/lv_misc/lv_bidi.h
f3f758b43ab14b9f6180db943b44a41d1f39df7d
[ "MIT" ]
permissive
mibus/TTGO_TWatch_Library
7d3c04ca2358b181264ea744a1bcd8338f508d91
bd77e6edba3baf9c5c68de4683a01b81f6b3a8b3
refs/heads/master
2022-11-25T03:04:40.292960
2020-07-25T03:15:55
2020-07-25T03:15:55
275,497,118
0
0
MIT
2020-06-28T03:13:55
2020-06-28T03:13:54
null
UTF-8
C
false
false
4,064
h
/** * @file lv_bifi.h * */ #ifndef LV_BIDI_H #define LV_BIDI_H #ifdef __cplusplus extern "C" { #endif /********************* * INCLUDES *********************/ #include "../lv_conf_internal.h" #include <stdbool.h> #include <stdint.h> /********************* * DEFINES *********************/ /* Special non printable strong characters. * They can be inserted to texts to affect the run's direction*/ #define LV_BIDI_LRO "\xE2\x80\xAD" /*U+202D*/ #define LV_BIDI_RLO "\xE2\x80\xAE" /*U+202E*/ /********************** * TYPEDEFS **********************/ enum { /*The first 4 values are stored in `lv_obj_t` on 2 bits*/ LV_BIDI_DIR_LTR = 0x00, LV_BIDI_DIR_RTL = 0x01, LV_BIDI_DIR_AUTO = 0x02, LV_BIDI_DIR_INHERIT = 0x03, LV_BIDI_DIR_NEUTRAL = 0x20, LV_BIDI_DIR_WEAK = 0x21, }; typedef uint8_t lv_bidi_dir_t; /********************** * GLOBAL PROTOTYPES **********************/ #if LV_USE_BIDI /** * Convert a text to get the characters in the correct visual order according to * Unicode Bidirectional Algorithm * @param str_in the text to process * @param str_out store the result here. Has the be `strlen(str_in)` length * @param base_dir `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL` */ void _lv_bidi_process(const char * str_in, char * str_out, lv_bidi_dir_t base_dir); /** * Auto-detect the direction of a text based on the first strong character * @param txt the text to process * @return `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL` */ lv_bidi_dir_t _lv_bidi_detect_base_dir(const char * txt); /** * Get the logical position of a character in a line * @param str_in the input string. Can be only one line. * @param bidi_txt internally the text is bidi processed which buffer can be get here. * If not required anymore has to freed with `lv_mem_free()` * Can be `NULL` is unused * @param len length of the line in character count * @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL` * @param vicual_pos the visual character position which logical position should be get * @param is_rtl tell the the char at `viasual_pos` is RTL or LTR context * @return the logical character position */ uint16_t _lv_bidi_get_logical_pos(const char * str_in, char ** bidi_txt, uint32_t len, lv_bidi_dir_t base_dir, uint32_t visual_pos, bool * is_rtl); /** * Get the visual position of a character in a line * @param str_in the input string. Can be only one line. * @param bidi_txt internally the text is bidi processed which buffer can be get here. * If not required anymore has to freed with `lv_mem_free()` * Can be `NULL` is unused * @param len length of the line in character count * @param base_dir base direction of the text: `LV_BIDI_DIR_LTR` or `LV_BIDI_DIR_RTL` * @param logical_pos the logical character position which visual position should be get * @param is_rtl tell the the char at `logical_pos` is RTL or LTR context * @return the visual character position */ uint16_t _lv_bidi_get_visual_pos(const char * str_in, char ** bidi_txt, uint16_t len, lv_bidi_dir_t base_dir, uint32_t logical_pos, bool * is_rtl); /** * Bidi process a paragraph of text * @param str_in the string to process * @param str_out store the result here * @param len length of teh text * @param base_dir base dir of the text * @param pos_conv_out an `uint16_t` array to store the related logical position of the character. * Can be `NULL` is unused * @param pos_conv_len length of `pos_conv_out` in element count */ void _lv_bidi_process_paragraph(const char * str_in, char * str_out, uint32_t len, lv_bidi_dir_t base_dir, uint16_t * pos_conv_out, uint16_t pos_conv_len); /********************** * MACROS **********************/ #endif /*LV_USE_BIDI*/ #ifdef __cplusplus } /* extern "C" */ #endif #endif /*LV_BIDI_H*/
[ "lewisxhe@outlook.com" ]
lewisxhe@outlook.com
0ddad1251dcd4016b4c526efeafe716af3f5026e
ef9a2839953f3586e66c1cf824c9de199f52d088
/mcc_generated_files/X2CCode/Library/Math/Controller/inc/Sqrt_FiP16.h
b83fa9c934f92a6452ef0773f0ae3be8fd299024
[]
no_license
MCHP-X2Cdemos/mc_foc_sl_fip_dsPIC33ck_mclv2.x
72f1e06eb18738796d59938474c6d533bd07bb1e
d77e18983439d895b83b6d63fdaad4c8fdb028e7
refs/heads/master
2023-03-20T10:54:54.157111
2021-03-11T22:01:12
2021-03-11T22:01:12
288,478,027
2
0
null
null
null
null
UTF-8
C
false
false
3,510
h
/* * Copyright (c) 2013, Linz Center of Mechatronics GmbH (LCM) http://www.lcm.at/ * All rights reserved. */ /* * This file is licensed according to the BSD 3-clause license as follows: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the "Linz Center of Mechatronics GmbH" and "LCM" nor * the names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL "Linz Center of Mechatronics GmbH" BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This file is part of X2C. http://x2c.lcm.at/ * $LastChangedRevision: 1603 $ */ /* USERCODE-BEGIN:Description */ /** Description: Square Root Computation **/ /** Calculation: **/ /** y = sqrt((abs(u)) **/ /** **/ /* USERCODE-END:Description */ #ifndef SQRT_FIP16_H #define SQRT_FIP16_H #ifdef __cplusplus extern "C" { #endif #include "CommonFcts.h" #if !defined(SQRT_FIP16_ISLINKED) #define SQRT_FIP16_ID ((uint16)4817) typedef struct { uint16 ID; int16 *In; int16 Out; } SQRT_FIP16; #define SQRT_FIP16_FUNCTIONS { \ SQRT_FIP16_ID, \ (void (*)(void*))Sqrt_FiP16_Update, \ (void (*)(void*))Sqrt_FiP16_Init, \ (tLoadImplementationParameter)Common_Load, \ (tSaveImplementationParameter)Common_Save, \ (void* (*)(const void*, uint16))Sqrt_FiP16_GetAddress } /**********************************************************************************************************************/ /** Public prototypes **/ /**********************************************************************************************************************/ void Sqrt_FiP16_Update(SQRT_FIP16 *pTSqrt_FiP16); void Sqrt_FiP16_Init(SQRT_FIP16 *pTSqrt_FiP16); void* Sqrt_FiP16_GetAddress(const SQRT_FIP16 *block, uint16 elementId); #endif #ifdef __cplusplus } #endif #endif
[ "christoph.baumgartner@microchipcom" ]
christoph.baumgartner@microchipcom
00b89f8c82ebde7fba9cca6124b9592cc534c8af
a0d6b2c2dd8bcbe03e5c6fb35f766bd2af9a1d5c
/dynix.3.2.0/src/ucb/tftp/main.c
a7f804e9f48afbb7a6089aad2297032b45976d5f
[]
no_license
legacy-codedigger/Dynix.3.2.Source
593485f234eee4de75c0e23fe689f247471c83f8
2789373c94bc57e4c4a915bcba354f2243e12ca4
refs/heads/master
2022-04-25T22:49:00.493902
2020-04-25T00:49:59
2020-04-25T00:49:59
258,656,640
0
0
null
null
null
null
UTF-8
C
false
false
13,184
c
/* $Copyright: $ * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 * Sequent Computer Systems, Inc. All rights reserved. * * This software is furnished under a license and may be used * only in accordance with the terms of that license and with the * inclusion of the above copyright notice. This software may not * be provided or otherwise made available to, or used by, any * other person. No title to or ownership of the software is * hereby transferred. */ #ifndef lint static char rcsid[] = "$Header: main.c 2.3 90/04/05 $"; #endif /* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, * advertising materials, and other materials related to such * distribution and use acknowledge that the software was developed * by the University of California, Berkeley. The name of the * University may not be used to endorse or promote products derived * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef lint char copyright[] = "@(#) Copyright (c) 1983 Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ #ifndef lint static char sccsid[] = "@(#)main.c 5.7 (Berkeley) 6/29/88"; #endif /* not lint */ /* Many bug fixes are from Jim Guyton <guyton@rand-unix> */ /* * TFTP User Program -- Command Interface. */ #include <sys/types.h> #include <sys/socket.h> #include <sys/file.h> #include <netinet/in.h> #include <signal.h> #include <stdio.h> #include <errno.h> #include <setjmp.h> #include <ctype.h> #include <netdb.h> #define TIMEOUT 5 /* secs between rexmt's */ struct sockaddr_in sin; int f; short port; int trace; int verbose; int connected; char mode[32]; char line[200]; int margc; char *margv[20]; char *prompt = "tftp"; jmp_buf toplevel; int intr(); struct servent *sp; int quit(), help(), setverbose(), settrace(), status(); int get(), put(), setpeer(), modecmd(), setrexmt(), settimeout(); int setbinary(), setascii(); #define HELPINDENT (sizeof("connect")) struct cmd { char *name; char *help; int (*handler)(); }; char vhelp[] = "toggle verbose mode"; char thelp[] = "toggle packet tracing"; char chelp[] = "connect to remote tftp"; char qhelp[] = "exit tftp"; char hhelp[] = "print help information"; char shelp[] = "send file"; char rhelp[] = "receive file"; char mhelp[] = "set file transfer mode"; char sthelp[] = "show current status"; char xhelp[] = "set per-packet retransmission timeout"; char ihelp[] = "set total retransmission timeout"; char ashelp[] = "set mode to netascii"; char bnhelp[] = "set mode to octet"; struct cmd cmdtab[] = { { "connect", chelp, setpeer }, { "mode", mhelp, modecmd }, { "put", shelp, put }, { "get", rhelp, get }, { "quit", qhelp, quit }, { "verbose", vhelp, setverbose }, { "trace", thelp, settrace }, { "status", sthelp, status }, { "binary", bnhelp, setbinary }, { "ascii", ashelp, setascii }, { "rexmt", xhelp, setrexmt }, { "timeout", ihelp, settimeout }, { "?", hhelp, help }, 0 }; struct cmd *getcmd(); char *tail(); char *index(); char *rindex(); main(argc, argv) char *argv[]; { struct sockaddr_in sin; int top; sp = getservbyname("tftp", "udp"); if (sp == 0) { fprintf(stderr, "tftp: udp/tftp: unknown service\n"); exit(1); } f = socket(AF_INET, SOCK_DGRAM, 0); if (f < 0) { perror("tftp: socket"); exit(3); } bzero((char *)&sin, sizeof (sin)); sin.sin_family = AF_INET; if (bind(f, &sin, sizeof (sin)) < 0) { perror("tftp: bind"); exit(1); } strcpy(mode, "netascii"); signal(SIGINT, intr); if (argc > 1) { if (setjmp(toplevel) != 0) exit(0); setpeer(argc, argv); } top = setjmp(toplevel) == 0; for (;;) command(top); } char hostname[100]; setpeer(argc, argv) int argc; char *argv[]; { struct hostent *host; if (argc < 2) { strcpy(line, "Connect "); printf("(to) "); gets(&line[strlen(line)]); makeargv(); argc = margc; argv = margv; } if (argc > 3) { printf("usage: %s host-name [port]\n", argv[0]); return; } host = gethostbyname(argv[1]); if (host) { sin.sin_family = host->h_addrtype; bcopy(host->h_addr, &sin.sin_addr, host->h_length); strcpy(hostname, host->h_name); } else { sin.sin_family = AF_INET; sin.sin_addr.s_addr = inet_addr(argv[1]); if (sin.sin_addr.s_addr == -1) { connected = 0; printf("%s: unknown host\n", argv[1]); return; } strcpy(hostname, argv[1]); } port = sp->s_port; if (argc == 3) { port = atoi(argv[2]); if (port < 0) { printf("%s: bad port number\n", argv[2]); connected = 0; return; } port = htons(port); } connected = 1; } struct modes { char *m_name; char *m_mode; } modes[] = { { "ascii", "netascii" }, { "netascii", "netascii" }, { "binary", "octet" }, { "image", "octet" }, { "octet", "octet" }, /* { "mail", "mail" }, */ { 0, 0 } }; modecmd(argc, argv) char *argv[]; { register struct modes *p; char *sep; if (argc < 2) { printf("Using %s mode to transfer files.\n", mode); return; } if (argc == 2) { for (p = modes; p->m_name; p++) if (strcmp(argv[1], p->m_name) == 0) break; if (p->m_name) { setmode(p->m_mode); return; } printf("%s: unknown mode\n", argv[1]); /* drop through and print usage message */ } printf("usage: %s [", argv[0]); sep = " "; for (p = modes; p->m_name; p++) { printf("%s%s", sep, p->m_name); if (*sep == ' ') sep = " | "; } printf(" ]\n"); return; } setbinary(argc, argv) char *argv[]; { setmode("octet"); } setascii(argc, argv) char *argv[]; { setmode("netascii"); } setmode(newmode) char *newmode; { strcpy(mode, newmode); if (verbose) printf("mode set to %s\n", mode); } /* * Send file(s). */ put(argc, argv) char *argv[]; { int fd; register int n; register char *cp, *targ; if (argc < 2) { strcpy(line, "send "); printf("(file) "); gets(&line[strlen(line)]); makeargv(); argc = margc; argv = margv; } if (argc < 2) { putusage(argv[0]); return; } targ = argv[argc - 1]; if (index(argv[argc - 1], ':')) { char *cp; struct hostent *hp; for (n = 1; n < argc - 1; n++) if (index(argv[n], ':')) { putusage(argv[0]); return; } cp = argv[argc - 1]; targ = index(cp, ':'); *targ++ = 0; hp = gethostbyname(cp); if (hp == 0) { printf("%s: Unknown host.\n", cp); return; } bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length); sin.sin_family = hp->h_addrtype; connected = 1; strcpy(hostname, hp->h_name); port = sp->s_port; } if (!connected) { printf("No target machine specified.\n"); return; } if (argc < 4) { cp = argc == 2 ? tail(targ) : argv[1]; fd = open(cp, O_RDONLY); if (fd < 0) { fprintf(stderr, "tftp: "); perror(cp); return; } if (verbose) printf("putting %s to %s:%s [%s]\n", cp, hostname, targ, mode); sin.sin_port = port; sendfile(fd, targ, mode); return; } /* this assumes the target is a directory */ /* on a remote unix system. hmmmm. */ cp = index(targ, '\0'); *cp++ = '/'; for (n = 1; n < argc - 1; n++) { strcpy(cp, tail(argv[n])); fd = open(argv[n], O_RDONLY); if (fd < 0) { fprintf(stderr, "tftp: "); perror(argv[n]); continue; } if (verbose) printf("putting %s to %s:%s [%s]\n", argv[n], hostname, targ, mode); sin.sin_port = port; sendfile(fd, targ, mode); } } putusage(s) char *s; { printf("usage: %s file ... host:target, or\n", s); printf(" %s file ... target (when already connected)\n", s); } /* * Receive file(s). */ get(argc, argv) char *argv[]; { int fd; register int n; register char *cp; char *src; if (argc < 2) { strcpy(line, "get "); printf("(files) "); gets(&line[strlen(line)]); makeargv(); argc = margc; argv = margv; } if (argc < 2) { getusage(argv[0]); return; } if (!connected) { for (n = 1; n < (argc - 1); n++) if (index(argv[n], ':') == 0) { getusage(argv[0]); return; } } for (n = 1; n < argc ; n++) { src = index(argv[n], ':'); if (src == NULL) src = argv[n]; else { struct hostent *hp; *src++ = 0; hp = gethostbyname(argv[n]); if (hp == 0) { printf("%s: Unknown host.\n", argv[n]); continue; } bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length); sin.sin_family = hp->h_addrtype; connected = 1; strcpy(hostname, hp->h_name); port = sp->s_port; } if (argc < 4) { cp = argc == 3 ? argv[2] : tail(src); fd = creat(cp, 0644); if (fd < 0) { fprintf(stderr, "tftp: "); perror(cp); return; } if (verbose) printf("getting from %s:%s to %s [%s]\n", hostname, src, cp, mode); sin.sin_port = port; recvfile(fd, src, mode); break; } cp = tail(src); /* new .. jdg */ fd = creat(cp, 0644); if (fd < 0) { fprintf(stderr, "tftp: "); perror(cp); continue; } if (verbose) printf("getting from %s:%s to %s [%s]\n", hostname, src, cp, mode); sin.sin_port = port; recvfile(fd, src, mode); } } getusage(s) char * s; { printf("usage: %s host:file host:file ... file, or\n", s); printf(" %s file file ... file if connected\n", s); } int rexmtval = TIMEOUT; setrexmt(argc, argv) char *argv[]; { int t; if (argc < 2) { strcpy(line, "Rexmt-timeout "); printf("(value) "); gets(&line[strlen(line)]); makeargv(); argc = margc; argv = margv; } if (argc != 2) { printf("usage: %s value\n", argv[0]); return; } t = atoi(argv[1]); if (t < 0) printf("%s: bad value\n", t); else rexmtval = t; } int maxtimeout = 5 * TIMEOUT; settimeout(argc, argv) char *argv[]; { int t; if (argc < 2) { strcpy(line, "Maximum-timeout "); printf("(value) "); gets(&line[strlen(line)]); makeargv(); argc = margc; argv = margv; } if (argc != 2) { printf("usage: %s value\n", argv[0]); return; } t = atoi(argv[1]); if (t < 0) printf("%s: bad value\n", t); else maxtimeout = t; } status(argc, argv) char *argv[]; { if (connected) printf("Connected to %s.\n", hostname); else printf("Not connected.\n"); printf("Mode: %s Verbose: %s Tracing: %s\n", mode, verbose ? "on" : "off", trace ? "on" : "off"); printf("Rexmt-interval: %d seconds, Max-timeout: %d seconds\n", rexmtval, maxtimeout); } intr() { signal(SIGALRM, SIG_IGN); alarm(0); longjmp(toplevel, -1); } char * tail(filename) char *filename; { register char *s; while (*filename) { s = rindex(filename, '/'); if (s == NULL) break; if (s[1]) return (s + 1); *s = '\0'; } return (filename); } /* * Command parser. */ command(top) int top; { register struct cmd *c; if (!top) putchar('\n'); for (;;) { printf("%s> ", prompt); if (gets(line) == 0) { if (feof(stdin)) { quit(); } else { continue; } } if (line[0] == 0) continue; makeargv(); c = getcmd(margv[0]); if (c == (struct cmd *)-1) { printf("?Ambiguous command\n"); continue; } if (c == 0) { printf("?Invalid command\n"); continue; } (*c->handler)(margc, margv); } } struct cmd * getcmd(name) register char *name; { register char *p, *q; register struct cmd *c, *found; register int nmatches, longest; longest = 0; nmatches = 0; found = 0; for (c = cmdtab; p = c->name; c++) { for (q = name; *q == *p++; q++) if (*q == 0) /* exact match? */ return (c); if (!*q) { /* the name was a prefix */ if (q - name > longest) { longest = q - name; nmatches = 1; found = c; } else if (q - name == longest) nmatches++; } } if (nmatches > 1) return ((struct cmd *)-1); return (found); } /* * Slice a string up into argc/argv. */ makeargv() { register char *cp; register char **argp = margv; margc = 0; for (cp = line; *cp;) { while (isspace(*cp)) cp++; if (*cp == '\0') break; *argp++ = cp; margc += 1; while (*cp != '\0' && !isspace(*cp)) cp++; if (*cp == '\0') break; *cp++ = '\0'; } *argp++ = 0; } /*VARARGS*/ quit() { exit(0); } /* * Help command. */ help(argc, argv) int argc; char *argv[]; { register struct cmd *c; if (argc == 1) { printf("Commands may be abbreviated. Commands are:\n\n"); for (c = cmdtab; c->name; c++) printf("%-*s\t%s\n", HELPINDENT, c->name, c->help); return; } while (--argc > 0) { register char *arg; arg = *++argv; c = getcmd(arg); if (c == (struct cmd *)-1) printf("?Ambiguous help command %s\n", arg); else if (c == (struct cmd *)0) printf("?Invalid help command %s\n", arg); else printf("%s\n", c->help); } } /*VARARGS*/ settrace() { trace = !trace; printf("Packet tracing %s.\n", trace ? "on" : "off"); } /*VARARGS*/ setverbose() { verbose = !verbose; printf("Verbose mode %s.\n", verbose ? "on" : "off"); }
[ "zahir.meddour@protonmail.com" ]
zahir.meddour@protonmail.com
32004cd6aee41c08905cd5b705ab6f8ff0bb6507
cdf75036c20eed12b54f9110c95588652899fa4c
/Others/atoi_2.c
1845ab7cbe713cde67484b57a0fe4dd8bbf74bd5
[]
no_license
M1c17/C_Programming_Language
6ca585297ab6014a8a5a86ec1e4be8fb58f01e39
15c3074a7876dea9615a3d4a5dd0bb8120abf180
refs/heads/main
2023-03-06T05:41:51.665631
2021-02-07T04:41:49
2021-02-07T04:41:49
323,505,241
0
0
null
null
null
null
UTF-8
C
false
false
862
c
#include <stdio.h> #include <ctype.h> #include <string.h> /* atoi: convert s to integer; version 2 */ int atoi(char line[]); int main(){ int val; char str[10]; strcpy(str, "-93284927"); val = atoi(str); printf("String value = %s, Int value = %d\n", str, val); strcpy(str, "hello"); val = atoi(str); printf("String value = %s, Int value = %d\n", str, val); return 0; } int atoi(char line[]){ //Initialize variables int i, n, sign; //skip white space, if any for (i = 0; isspace(line[i]); ++i){ ; } //get sign, if any sign = (line[i] == '-') ? -1 : 1; //skip sign, if any if (line[i] == '+' || line[i] == '-'){ ++i; } //get integer part and convert it for (n = 0; isdigit(line[i]); ++i){ n = 10 * n + (line[i] - '0'); } return sign * n; }
[ "pictor117@gmail.com" ]
pictor117@gmail.com
f8a07ef6a3923daba641e7ac3c0fd7ad2ecbfc87
1fabbdfd1ca9ea1b6808893e12bd907eb74de414
/xcode/Classes/Native/AssemblyU2DCSharp_SPacket_SocketInstance_GC_SYNC_REACHEDSCENMethodDeclarations.h
cc71e70250fd75fada95620a65e6af4003c60645
[]
no_license
Klanly/TutorialPackageClient
6f889e96c40ab13c97d107708ae8f3c71a484301
b9d61ba2f287c491c9565b432f852980ec3fee28
refs/heads/master
2020-12-03T01:42:35.256114
2016-11-01T02:40:21
2016-11-01T02:40:21
null
0
0
null
null
null
null
UTF-8
C
false
false
743
h
#pragma once #include <stdint.h> #include <assert.h> #include <exception> #include "codegen/il2cpp-codegen.h" // SPacket.SocketInstance.GC_SYNC_REACHEDSCENEHandler struct GC_SYNC_REACHEDSCENEHandler_t2847; // PacketDistributed struct PacketDistributed_t2209; // System.Void SPacket.SocketInstance.GC_SYNC_REACHEDSCENEHandler::.ctor() void GC_SYNC_REACHEDSCENEHandler__ctor_m16033 (GC_SYNC_REACHEDSCENEHandler_t2847 * __this, MethodInfo* method) IL2CPP_METHOD_ATTR; // System.UInt32 SPacket.SocketInstance.GC_SYNC_REACHEDSCENEHandler::Execute(PacketDistributed) uint32_t GC_SYNC_REACHEDSCENEHandler_Execute_m16034 (GC_SYNC_REACHEDSCENEHandler_t2847 * __this, PacketDistributed_t2209 * ___ipacket, MethodInfo* method) IL2CPP_METHOD_ATTR;
[ "bu213200@gmail.com" ]
bu213200@gmail.com
7474d91708e166196a92071abed55e4358790a6c
33a6448e047d43eeeebe36f11cec5863c4d237c9
/FileReadWriteCharacter/main.c
f73b56c824db77ca9043f16bbc2c6f2800163b97
[]
no_license
Qianfinland/C
fca683f4e503a63435f43d1c82d1b5704b954bcf
00f6530d1282149b5d218e4ab4069562c145fd8e
refs/heads/master
2021-01-10T16:08:32.115848
2015-08-16T19:52:21
2015-08-16T19:52:21
36,993,923
0
0
null
null
null
null
UTF-8
C
false
false
1,026
c
#include <stdio.h> int main() { FILE *file = fopen("/home/qxzhou/NetBeansProjects/daydaylearning/FileReadWriteCharacter/read.txt", "r"); if(file == NULL) { printf("Error on open the file !"); return 1; } while(1) { int ch = fgetc(file); if(ch == EOF) break; printf("%c", ch); } FILE *file2 = fopen("/home/qxzhou/NetBeansProjects/daydaylearning/FileReadWriteCharacter/write.txt", "w"); if(file2 == NULL) { printf("Error on open the file !"); return 1; } /*char c[1000]; printf("Enter a sentence to the file!\n"); fgets(c, sizeof(c), stdin); //gets(c);//dangerous to use fprintf(file2, "%s", c);*/ printf("Enter multiple lines of strings and end by ctrl+D\n"); while(1) { char ch; ch = getchar(); //putchar(ch);// if(ch == EOF) break; putc(ch, file2); } fclose(file); fclose(file2); return 0; }
[ "qianfinland@gmail.com" ]
qianfinland@gmail.com
726a722b8c6dcb1d128fb29aeec5b4130d327071
999d0cc68f04af3168b1eb5f766756b5661170f4
/robot/第四组/舵机-STM32/USER/main.c
555d4c36330cc649455c80a1336c946a2637e724
[]
no_license
aestheticisma/2019
e89e24b6fdf5e56d76af3211b97194ea01bab0e1
4286782e714cdcda86f8c477be2fc5a9297f49aa
refs/heads/master
2020-06-19T19:05:32.242306
2019-07-14T13:34:13
2019-07-14T13:34:13
196,836,522
1
0
null
2019-07-14T12:55:50
2019-07-14T12:55:49
null
GB18030
C
false
false
1,104
c
#include "stm32f10x.h" #include "car.h" #include "delay.h" #include "control.h" #include "echo.h" #include "infrared.h" int main(void) { float a=0.0; char len; control_init(); SysTick_Init();//延时初始化 echo_init(); infrared_init(); //Usart1_Init(); while(1) { len='0'; a=(((float)Get_Adc(ADC_Channel_1))/4096)*3.3; if(a>=0.95){ len = '1'; } USART_SendData(USART1,len); while(USART_GetFlagStatus(USART1, USART_FLAG_TC) == RESET); static_pole(); Delay_ms(2000); } } //每次timer之后 void TIM3_IRQHandler(void) { if(TIM_GetITStatus(TIM3,TIM_IT_Update) != RESET) { TIM_ClearITPendingBit(TIM3, TIM_IT_Update); } } void USART1_IRQHandler(void) { int order= 0 ; if(USART_GetITStatus(USART1,USART_IT_RXNE)==SET) { order = USART_ReceiveData(USART1); USART_ClearITPendingBit(USART1,USART_IT_RXNE); USART_ClearFlag(USART1,USART_IT_RXNE); switch(order) { case 0x00000031://前进 up(); break; case 0x00000032://倒车 down(); break; } } }
[ "noreply@github.com" ]
noreply@github.com
e68b09ef487cfbc95b0472becf08661d8f918a67
93f2b5dc75142b5d6f5cb31e1e02f1c5aac130a0
/srcs_lem/get_next_line1.c
9a771719bb18a1137c4edc964beaab2d64290170
[]
no_license
Enshertid/lem-in_school21
d869541fb45c6c6f9d8f96bb047d489aed895b26
3b326ec0c41cefe4af28eb46d76817ad89612a33
refs/heads/master
2022-05-07T23:49:00.736557
2020-03-15T16:34:49
2020-03-15T16:34:49
null
0
0
null
null
null
null
UTF-8
C
false
false
3,150
c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* get_next_line1.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: ymanilow <ymanilow@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/02 14:42:04 by dbendu #+# #+# */ /* Updated: 2020/02/13 21:25:11 by ymanilow ### ########.fr */ /* */ /* ************************************************************************** */ #include "lem_in.h" #define GNL_BUFF 1024 void ft_lstappend(t_list **list, t_list *new) { if (!list || !new) return ; if (!*list) { *list = new; new->end = new; } else { (*list)->end->next = new; (*list)->end = new; } } static void add_in_bufs(t_list **bufs, const char *src, size_t strlen, int fd) { char *str; str = ft_strnew(strlen); ft_memcpy(str, src, strlen); ft_lstappend(bufs, ft_lstnew(str, strlen + 1)); (*bufs)->end->content_size = fd; free(str); } static int check_bufs(t_list **bufs, t_list **buf, int fd) { t_list *iter; char *npos; char *temp; iter = *bufs; while (iter && (int)iter->content_size != fd) iter = iter->next; if (!iter) return (0); npos = (char*)ft_memchr(iter->content, '\n', ft_strlen(iter->content)); ft_lstappend(buf, ft_lstnew(iter->content, npos ? (size_t)(npos - (char*)iter->content) : (size_t)ft_strlen(iter->content))); if (!npos || (npos && !npos[1])) ft_lstdelete(bufs, &iter); else if (npos[1]) { temp = ft_strdup(npos + 1); free(iter->content); iter->content = temp; } return (npos ? 1 : 0); } static char *lst_to_str(const t_list *list) { char *str; char *striter; const t_list *lstiter; size_t len; len = 0; lstiter = list; while (lstiter) { len += lstiter->content_size; lstiter = lstiter->next; } str = ft_strnew(len); if (!str) return (NULL); striter = str; while (list) { ft_memcpy(striter, list->content, list->content_size); striter += list->content_size; list = list->next; } return (str); } int get_next_line(const int fd, char **line) { static t_list *bufs = NULL; t_list *buf; ssize_t ret; char *npos; char str[GNL_BUFF]; if (fd < 0 || !GNL_BUFF || read(fd, str, 0) < 0 || (buf = NULL)) return (-1); if (!check_bufs(&bufs, &buf, fd)) { while ((ret = read(fd, str, GNL_BUFF))) { npos = (char*)ft_memchr(str, '\n', ret); ft_lstappend(&buf, ft_lstnew(str, npos ? npos - str : ret)); if (npos) break ; } if (!ret && !buf) return (0); if (ret && npos && npos - str != ret - 1) add_in_bufs(&bufs, npos + 1, ret - 1 - (npos - str), fd); } *line = lst_to_str(buf); ft_lstpurge(&buf); return (*line ? 1 : -1); }
[ "enshertid@icloud.com" ]
enshertid@icloud.com
26393171c0093670884c0ea4829ff4beaea2848e
fda015cc078e877754e4cd5a48e970f0a1159ada
/src/sources/shared/system_support/os_specifics.h
aee560f47e775860f7a101ac20eaaa04456aeddf
[]
no_license
cran/liquidSVM
886e0487104a434d3854120a774ebe120e1ddeae
35b8af219f5d52df5513789793c1e5cf07d310b8
refs/heads/master
2020-04-06T04:12:26.063387
2019-09-14T17:20:02
2019-09-14T17:20:02
83,014,436
2
0
null
null
null
null
UTF-8
C
false
false
4,395
h
// Copyright 2015, 2016, 2017 Ingo Steinwart // // This file is part of liquidSVM. // // liquidSVM is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // liquidSVM is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // You should have received a copy of the GNU Affero General Public License // along with liquidSVM. If not, see <http://www.gnu.org/licenses/>. #if !defined (OS_SPECIFICS_H) #define OS_SPECIFICS_H #include "sources/shared/system_support/compiler_specifics.h" //********************************************************************************************************************************** // Linux and Mac //********************************************************************************************************************************** #if defined __linux__ || defined __MACH__ #define POSIX_OS__ #define THREADING_IMPLEMENTED #ifdef __SSE2__ #define SSE2__ #endif #ifdef __AVX__ #define AVX__ #endif #ifdef __AVX2__ #define AVX2__ #endif #define sync_add_and_fetch __sync_add_and_fetch #define Tmutex pthread_mutex_t #define Tthread_handle pthread_t #define atomic_unsigned unsigned #define thread__ __thread #define restrict__ __restrict__ #endif //********************************************************************************************************************************** // Windows //********************************************************************************************************************************** #if defined _WIN32 #if !defined (NOMINMAX) #define NOMINMAX #endif #include <malloc.h> // Has to come before windows.h #include <windows.h> // Has to come before emmintrin.h/immintrin.h in simd_basics.h ! #include <iso646.h> #define THREADING_IMPLEMENTED #undef COMPILE_WITH_CUDA__ // The next line repeats the default of MS Visual Studio 2012++ // Basically, it assumes that Windows is not running on a CPU built before 2004 or so. #define SSE2__ #ifdef __AVX__ #define AVX__ #endif #ifdef __AVX2__ #define AVX2__ #endif #define Tmutex HANDLE #define Tthread_handle HANDLE #ifdef __MINGW32__ #define sync_add_and_fetch __sync_add_and_fetch #define atomic_unsigned unsigned #define thread__ __thread #else #define sync_add_and_fetch atomic_fetch_add #if defined(MSVISUAL_LEGACY) #define atomic_unsigned unsigned #else #define atomic_unsigned atomic_uint #endif #define thread__ __declspec(thread) #endif #define restrict__ __restrict #endif //********************************************************************************************************************************** // Other Operating Systems //********************************************************************************************************************************** #if !defined(POSIX_OS__) && !defined(_WIN32) #define UNKNOWN_OS__ #undef THREADING_IMPLEMENTED // The following definitions are meant as safeguards. Depending on the // situtation they may or may not be necessary. #undef SSE2__ #undef AVX__ #undef AVX2__ #undef COMPILE_WITH_CUDA__ #define Tmutex unsigned #define Tthread_handle void* #define atomic_unsigned unsigned #define thread__ #define restrict__ #endif //********************************************************************************************************************************** // More safeguards //********************************************************************************************************************************** // Make sure that simd instructions are only used on systems on which we can // safely alloc aligned memory. Currently, this is true for MS Windows and // systems supporting POSIX with optional posix_memalign commands. #if defined _WIN32 #define SIMD_ACTIVATED #else #include <unistd.h> #if defined(_POSIX_ADVISORY_INFO) && _POSIX_ADVISORY_INFO > 0 #define SIMD_ACTIVATED #else #undef SIMD_ACTIVATED #undef AVX2__ #undef AVX__ #undef SSE2__ #endif #endif #endif
[ "csardi.gabor+cran@gmail.com" ]
csardi.gabor+cran@gmail.com
85535a4d92f8f2666b9a5170975b7e8728e2f10d
bd1fea86d862456a2ec9f56d57f8948456d55ee6
/000/246/087/CWE78_OS_Command_Injection__char_listen_socket_w32_execv_13.c
820a233fd4b7e26bdeed91be32983bf04da283ab
[]
no_license
CU-0xff/juliet-cpp
d62b8485104d8a9160f29213368324c946f38274
d8586a217bc94cbcfeeec5d39b12d02e9c6045a2
refs/heads/master
2021-03-07T15:44:19.446957
2020-03-10T12:45:40
2020-03-10T12:45:40
246,275,244
0
1
null
null
null
null
UTF-8
C
false
false
6,999
c
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__char_listen_socket_w32_execv_13.c Label Definition File: CWE78_OS_Command_Injection.strings.label.xml Template File: sources-sink-13.tmpl.c */ /* * @description * CWE: 78 OS Command Injection * BadSource: listen_socket Read data using a listen socket (server side) * GoodSource: Fixed string * Sink: w32_execv * BadSink : execute command with execv * Flow Variant: 13 Control flow: if(GLOBAL_CONST_FIVE==5) and if(GLOBAL_CONST_FIVE!=5) * * */ #include "std_testcase.h" #include <wchar.h> #ifdef _WIN32 #define COMMAND_INT_PATH "%WINDIR%\\system32\\cmd.exe" #define COMMAND_INT "cmd.exe" #define COMMAND_ARG1 "/c" #define COMMAND_ARG2 "dir " #define COMMAND_ARG3 data #else /* NOT _WIN32 */ #include <unistd.h> #define COMMAND_INT_PATH "/bin/sh" #define COMMAND_INT "sh" #define COMMAND_ARG1 "-c" #define COMMAND_ARG2 "ls " #define COMMAND_ARG3 data #endif #ifdef _WIN32 #include <winsock2.h> #include <windows.h> #include <direct.h> #pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ #define CLOSE_SOCKET closesocket #else #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #define INVALID_SOCKET -1 #define SOCKET_ERROR -1 #define CLOSE_SOCKET close #define SOCKET int #endif #define TCP_PORT 27015 #define LISTEN_BACKLOG 5 #include <process.h> #define EXECV _execv #ifndef OMITBAD void CWE78_OS_Command_Injection__char_listen_socket_w32_execv_13_bad() { char * data; char dataBuffer[100] = COMMAND_ARG2; data = dataBuffer; if(GLOBAL_CONST_FIVE==5) { { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; char *replace; SOCKET listenSocket = INVALID_SOCKET; SOCKET acceptSocket = INVALID_SOCKET; size_t dataLen = strlen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a listen socket */ listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (listenSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = INADDR_ANY; service.sin_port = htons(TCP_PORT); if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR) { break; } acceptSocket = accept(listenSocket, NULL, NULL); if (acceptSocket == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed */ recvResult = recv(acceptSocket, (char *)(data + dataLen), sizeof(char) * (100 - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(char)] = '\0'; /* Eliminate CRLF */ replace = strchr(data, '\r'); if (replace) { *replace = '\0'; } replace = strchr(data, '\n'); if (replace) { *replace = '\0'; } } while (0); if (listenSocket != INVALID_SOCKET) { CLOSE_SOCKET(listenSocket); } if (acceptSocket != INVALID_SOCKET) { CLOSE_SOCKET(acceptSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } } { char *args[] = {COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG3, NULL}; /* execv - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECV(COMMAND_INT_PATH, args); } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B1() - use goodsource and badsink by changing the GLOBAL_CONST_FIVE==5 to GLOBAL_CONST_FIVE!=5 */ static void goodG2B1() { char * data; char dataBuffer[100] = COMMAND_ARG2; data = dataBuffer; if(GLOBAL_CONST_FIVE!=5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Append a fixed string to data (not user / external input) */ strcat(data, "*.*"); } { char *args[] = {COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG3, NULL}; /* execv - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECV(COMMAND_INT_PATH, args); } } /* goodG2B2() - use goodsource and badsink by reversing the blocks in the if statement */ static void goodG2B2() { char * data; char dataBuffer[100] = COMMAND_ARG2; data = dataBuffer; if(GLOBAL_CONST_FIVE==5) { /* FIX: Append a fixed string to data (not user / external input) */ strcat(data, "*.*"); } { char *args[] = {COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG3, NULL}; /* execv - specify the path where the command is located */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECV(COMMAND_INT_PATH, args); } } void CWE78_OS_Command_Injection__char_listen_socket_w32_execv_13_good() { goodG2B1(); goodG2B2(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); CWE78_OS_Command_Injection__char_listen_socket_w32_execv_13_good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); CWE78_OS_Command_Injection__char_listen_socket_w32_execv_13_bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
[ "frank@fischer.com.mt" ]
frank@fischer.com.mt
8b39fe097d9a0ad75f4e8e176acbcd3e9e6ce47c
5c255f911786e984286b1f7a4e6091a68419d049
/code/24fbc88b-b066-449c-ae5b-a5acd378d8ab.c
6c6cfa7dc48bd7868bbeecf6b19c39cd6bf27ae4
[]
no_license
nmharmon8/Deep-Buffer-Overflow-Detection
70fe02c8dc75d12e91f5bc4468cf260e490af1a4
e0c86210c86afb07c8d4abcc957c7f1b252b4eb2
refs/heads/master
2021-09-11T19:09:59.944740
2018-04-06T16:26:34
2018-04-06T16:26:34
125,521,331
0
0
null
null
null
null
UTF-8
C
false
false
217
c
#include <stdio.h> int main() { int i=0; int j=14; int k; int l; k = 53; l = 64; k = i/j; l = i/j; l = l/j; l = k-j*i; printf("vulnerability"); printf("%d%d\n",l,l); return 0; }
[ "nharmon8@gmail.com" ]
nharmon8@gmail.com
ff3959dcfefc32276c08841c6534ca13f08bec63
d24750e5c892c961ebc316484e27de11774db135
/Src/VL53l1X.c
9130b1f3476a4024ec8ee467dd98e7873227adac
[]
no_license
MarcusCorbin1/Number12
3bc4f46a59bfd1f29a3ac61c214409eb43e2cdae
0069173892eb944d12c0b6c9ee8a8dd2b52c481b
refs/heads/master
2022-03-03T14:58:26.731493
2019-06-17T16:33:27
2019-06-17T16:33:27
192,381,912
0
0
null
null
null
null
UTF-8
C
false
false
950
c
#include "stm32l4xx_hal.h" #include "VL53l1X.h" //Start the Data Initializer void VL53L1_DataInit(I2C_HandleTypeDef i2cHandle) { uint8_t buffer[12]; buffer[0] = 0x88; buffer[1] = 0x00; HAL_I2C_Master_Transmit(&i2cHandle, 0x52, buffer, 2, 100); HAL_Delay(20); } //Start the Static Initializer void VL53L1_StaticInit(I2C_HandleTypeDef i2cHandle) { uint8_t buffer[12]; buffer[0] = 0xFF; buffer[1] = 0x01; HAL_I2C_Master_Transmit(&i2cHandle, 0x52, buffer, 2, 100); uint16_t tempword = 0; buffer[0] = 0xFF; buffer[1] = tempword; HAL_I2C_Master_Receive(&i2cHandle, 0x53, buffer, 2, 100); buffer[0] = 0xFF; buffer[1] = 0x00; HAL_I2C_Master_Transmit(&i2cHandle, 0x52, buffer, 2, 100); } // This function will get the measurement ready void VL53L1_StartMeasurement(I2C_HandleTypeDef i2cHandle) { uint8_t buffer[64]; buffer[0] = 0x000; buffer[1] = 0x01; HAL_I2C_Master_Transmit(&i2cHandle, 0x52, buffer, 2, 100); }
[ "marcus.corbin@itron.com" ]
marcus.corbin@itron.com
681714c9a7576083efca3998c82af18ed07b3562
99166976f3e170ad5d9fb2840b1c0ade2182a2c3
/libs/rh4n_ldaparser/src/rh4n_lda_array.c
18cc3aecdc99a46678399d32d905ecce91675310
[]
no_license
audacity363/natAWSWrapper
18acda09518788ae22c78b797e65ec3e3cd0531a
e99ed02d465ba9e6a3234ac30563b00d612d4d46
refs/heads/master
2020-06-15T08:49:09.333579
2019-08-25T17:35:27
2019-08-25T17:35:27
195,252,545
1
0
null
null
null
null
UTF-8
C
false
false
1,119
c
#include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include "rh4n.h" #include "rh4n_ldaparser.h" int rh4nldaGetArrayType(char *line, int *dimensions, int length[3], RH4nProperties *props, char *errorstr) { *dimensions= 0; char *end_var_params = NULL, *comma = NULL, *double_collon = NULL; if((end_var_params = strchr(line, ')')) == NULL) { sprintf(errorstr, "Can not find array parms end"); rh4n_log_error(props->logging, "%s", errorstr); return(RH4N_RET_LDA_PARSE_ERR); } *end_var_params = 0x00; comma = rh4nldastrtok(line, ','); while(comma) { (*dimensions)++; //Check if a lower bound is specified if((double_collon = strchr(comma, ':')) != NULL) { *double_collon = 0x00; double_collon++; length[(*dimensions)-1] = atoi(double_collon); } else { length[(*dimensions)-1] = atoi(comma); } comma = rh4nldastrtok(NULL, ','); } return(RH4N_RET_OK); }
[ "tom@engemann.me" ]
tom@engemann.me
51fbad2bfeb09528ca3cb36ba6098eb1c9816eff
25ba673dae94a65d02989d8b72aa4ebda00b0652
/예제9-6.c
c28ba2aeede8768fa8a3d745203496296575bb28
[]
no_license
mykid7/C
3c72d2414ba4a9ae889d57702468ccbfea19796a
23d1de46d313521a53cb957014f492e3165cff17
refs/heads/master
2020-07-21T16:58:10.378238
2019-11-10T15:20:47
2019-11-10T15:20:47
206,925,648
0
0
null
null
null
null
UHC
C
false
false
380
c
#include <stdio.h> int main(void) { int a = 10; // 변수 선언과 초기화 int *p = &a; // 포인터 선언과 동시에 a를 가리키도록 초기화 double *pd; // double형 변수를 가리키는 포인터 pd = p; // 포인터 p 값을 포인터 pd에 대입 printf("%lf\n", *pd); // pd가 가리키는 변수의 값 출력 return 0; }
[ "noreply@github.com" ]
noreply@github.com
b9311b53de5dc8ddfc8a8845a13274fc158e332a
263589b8c63adc45a5dcecf5ba7178a0f40a8646
/samd21a/include/component/dsu.h
7a51d9b738c4439d7a787fd8ff031b5446822a17
[]
no_license
joaofl/xdense-cortexm1
c6b1f181305726c951e352eccb4b50c0f4a7d994
224e9aae27f39692dd98a5c10057b32b9958792a
refs/heads/main
2023-03-14T21:23:42.979509
2021-02-28T14:58:28
2021-02-28T14:58:28
343,129,986
0
0
null
null
null
null
UTF-8
C
false
false
34,693
h
/** * \file * * \brief Component description for DSU * * Copyright (c) 2016 Atmel Corporation, * a wholly owned subsidiary of Microchip Technology Inc. * * \asf_license_start * * \page License * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Licence at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * \asf_license_stop * */ #ifndef _SAMD21_DSU_COMPONENT_ #define _SAMD21_DSU_COMPONENT_ /* ========================================================================== */ /** SOFTWARE API DEFINITION FOR DSU */ /* ========================================================================== */ /** \addtogroup SAMD21_DSU Device Service Unit */ /*@{*/ #define DSU_U2209 #define REV_DSU 0x200 /* -------- DSU_CTRL : (DSU Offset: 0x0000) ( /W 8) Control -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint8_t SWRST:1; /*!< bit: 0 Software Reset */ uint8_t :1; /*!< bit: 1 Reserved */ uint8_t CRC:1; /*!< bit: 2 32-bit Cyclic Redundancy Check */ uint8_t MBIST:1; /*!< bit: 3 Memory Built-In Self-Test */ uint8_t CE:1; /*!< bit: 4 Chip Erase */ uint8_t :3; /*!< bit: 5.. 7 Reserved */ } bit; /*!< Structure used for bit access */ uint8_t reg; /*!< Type used for register access */ } DSU_CTRL_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_CTRL_OFFSET 0x0000 /**< \brief (DSU_CTRL offset) Control */ #define DSU_CTRL_RESETVALUE _U(0x00) /**< \brief (DSU_CTRL reset_value) Control */ #define DSU_CTRL_SWRST_Pos 0 /**< \brief (DSU_CTRL) Software Reset */ #define DSU_CTRL_SWRST (_U(0x1) << DSU_CTRL_SWRST_Pos) #define DSU_CTRL_CRC_Pos 2 /**< \brief (DSU_CTRL) 32-bit Cyclic Redundancy Check */ #define DSU_CTRL_CRC (_U(0x1) << DSU_CTRL_CRC_Pos) #define DSU_CTRL_MBIST_Pos 3 /**< \brief (DSU_CTRL) Memory Built-In Self-Test */ #define DSU_CTRL_MBIST (_U(0x1) << DSU_CTRL_MBIST_Pos) #define DSU_CTRL_CE_Pos 4 /**< \brief (DSU_CTRL) Chip Erase */ #define DSU_CTRL_CE (_U(0x1) << DSU_CTRL_CE_Pos) #define DSU_CTRL_MASK _U(0x1D) /**< \brief (DSU_CTRL) MASK Register */ /* -------- DSU_STATUSA : (DSU Offset: 0x0001) (R/W 8) Status A -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint8_t DONE:1; /*!< bit: 0 Done */ uint8_t CRSTEXT:1; /*!< bit: 1 CPU Reset Phase Extension */ uint8_t BERR:1; /*!< bit: 2 Bus Error */ uint8_t FAIL:1; /*!< bit: 3 Failure */ uint8_t PERR:1; /*!< bit: 4 Protection Error */ uint8_t :3; /*!< bit: 5.. 7 Reserved */ } bit; /*!< Structure used for bit access */ uint8_t reg; /*!< Type used for register access */ } DSU_STATUSA_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_STATUSA_OFFSET 0x0001 /**< \brief (DSU_STATUSA offset) Status A */ #define DSU_STATUSA_RESETVALUE _U(0x00) /**< \brief (DSU_STATUSA reset_value) Status A */ #define DSU_STATUSA_DONE_Pos 0 /**< \brief (DSU_STATUSA) Done */ #define DSU_STATUSA_DONE (_U(0x1) << DSU_STATUSA_DONE_Pos) #define DSU_STATUSA_CRSTEXT_Pos 1 /**< \brief (DSU_STATUSA) CPU Reset Phase Extension */ #define DSU_STATUSA_CRSTEXT (_U(0x1) << DSU_STATUSA_CRSTEXT_Pos) #define DSU_STATUSA_BERR_Pos 2 /**< \brief (DSU_STATUSA) Bus Error */ #define DSU_STATUSA_BERR (_U(0x1) << DSU_STATUSA_BERR_Pos) #define DSU_STATUSA_FAIL_Pos 3 /**< \brief (DSU_STATUSA) Failure */ #define DSU_STATUSA_FAIL (_U(0x1) << DSU_STATUSA_FAIL_Pos) #define DSU_STATUSA_PERR_Pos 4 /**< \brief (DSU_STATUSA) Protection Error */ #define DSU_STATUSA_PERR (_U(0x1) << DSU_STATUSA_PERR_Pos) #define DSU_STATUSA_MASK _U(0x1F) /**< \brief (DSU_STATUSA) MASK Register */ /* -------- DSU_STATUSB : (DSU Offset: 0x0002) (R/ 8) Status B -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint8_t PROT:1; /*!< bit: 0 Protected */ uint8_t DBGPRES:1; /*!< bit: 1 Debugger Present */ uint8_t DCCD0:1; /*!< bit: 2 Debug Communication Channel 0 Dirty */ uint8_t DCCD1:1; /*!< bit: 3 Debug Communication Channel 1 Dirty */ uint8_t HPE:1; /*!< bit: 4 Hot-Plugging Enable */ uint8_t :3; /*!< bit: 5.. 7 Reserved */ } bit; /*!< Structure used for bit access */ struct { uint8_t :2; /*!< bit: 0.. 1 Reserved */ uint8_t DCCD:2; /*!< bit: 2.. 3 Debug Communication Channel x Dirty */ uint8_t :4; /*!< bit: 4.. 7 Reserved */ } vec; /*!< Structure used for vec access */ uint8_t reg; /*!< Type used for register access */ } DSU_STATUSB_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_STATUSB_OFFSET 0x0002 /**< \brief (DSU_STATUSB offset) Status B */ #define DSU_STATUSB_RESETVALUE _U(0x10) /**< \brief (DSU_STATUSB reset_value) Status B */ #define DSU_STATUSB_PROT_Pos 0 /**< \brief (DSU_STATUSB) Protected */ #define DSU_STATUSB_PROT (_U(0x1) << DSU_STATUSB_PROT_Pos) #define DSU_STATUSB_DBGPRES_Pos 1 /**< \brief (DSU_STATUSB) Debugger Present */ #define DSU_STATUSB_DBGPRES (_U(0x1) << DSU_STATUSB_DBGPRES_Pos) #define DSU_STATUSB_DCCD0_Pos 2 /**< \brief (DSU_STATUSB) Debug Communication Channel 0 Dirty */ #define DSU_STATUSB_DCCD0 (1 << DSU_STATUSB_DCCD0_Pos) #define DSU_STATUSB_DCCD1_Pos 3 /**< \brief (DSU_STATUSB) Debug Communication Channel 1 Dirty */ #define DSU_STATUSB_DCCD1 (1 << DSU_STATUSB_DCCD1_Pos) #define DSU_STATUSB_DCCD_Pos 2 /**< \brief (DSU_STATUSB) Debug Communication Channel x Dirty */ #define DSU_STATUSB_DCCD_Msk (_U(0x3) << DSU_STATUSB_DCCD_Pos) #define DSU_STATUSB_DCCD(value) (DSU_STATUSB_DCCD_Msk & ((value) << DSU_STATUSB_DCCD_Pos)) #define DSU_STATUSB_HPE_Pos 4 /**< \brief (DSU_STATUSB) Hot-Plugging Enable */ #define DSU_STATUSB_HPE (_U(0x1) << DSU_STATUSB_HPE_Pos) #define DSU_STATUSB_MASK _U(0x1F) /**< \brief (DSU_STATUSB) MASK Register */ /* -------- DSU_ADDR : (DSU Offset: 0x0004) (R/W 32) Address -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t :2; /*!< bit: 0.. 1 Reserved */ uint32_t ADDR:30; /*!< bit: 2..31 Address */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_ADDR_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_ADDR_OFFSET 0x0004 /**< \brief (DSU_ADDR offset) Address */ #define DSU_ADDR_RESETVALUE _U(0x00000000) /**< \brief (DSU_ADDR reset_value) Address */ #define DSU_ADDR_ADDR_Pos 2 /**< \brief (DSU_ADDR) Address */ #define DSU_ADDR_ADDR_Msk (_U(0x3FFFFFFF) << DSU_ADDR_ADDR_Pos) #define DSU_ADDR_ADDR(value) (DSU_ADDR_ADDR_Msk & ((value) << DSU_ADDR_ADDR_Pos)) #define DSU_ADDR_MASK _U(0xFFFFFFFC) /**< \brief (DSU_ADDR) MASK Register */ /* -------- DSU_LENGTH : (DSU Offset: 0x0008) (R/W 32) Length -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t :2; /*!< bit: 0.. 1 Reserved */ uint32_t LENGTH:30; /*!< bit: 2..31 Length */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_LENGTH_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_LENGTH_OFFSET 0x0008 /**< \brief (DSU_LENGTH offset) Length */ #define DSU_LENGTH_RESETVALUE _U(0x00000000) /**< \brief (DSU_LENGTH reset_value) Length */ #define DSU_LENGTH_LENGTH_Pos 2 /**< \brief (DSU_LENGTH) Length */ #define DSU_LENGTH_LENGTH_Msk (_U(0x3FFFFFFF) << DSU_LENGTH_LENGTH_Pos) #define DSU_LENGTH_LENGTH(value) (DSU_LENGTH_LENGTH_Msk & ((value) << DSU_LENGTH_LENGTH_Pos)) #define DSU_LENGTH_MASK _U(0xFFFFFFFC) /**< \brief (DSU_LENGTH) MASK Register */ /* -------- DSU_DATA : (DSU Offset: 0x000C) (R/W 32) Data -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t DATA:32; /*!< bit: 0..31 Data */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_DATA_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_DATA_OFFSET 0x000C /**< \brief (DSU_DATA offset) Data */ #define DSU_DATA_RESETVALUE _U(0x00000000) /**< \brief (DSU_DATA reset_value) Data */ #define DSU_DATA_DATA_Pos 0 /**< \brief (DSU_DATA) Data */ #define DSU_DATA_DATA_Msk (_U(0xFFFFFFFF) << DSU_DATA_DATA_Pos) #define DSU_DATA_DATA(value) (DSU_DATA_DATA_Msk & ((value) << DSU_DATA_DATA_Pos)) #define DSU_DATA_MASK _U(0xFFFFFFFF) /**< \brief (DSU_DATA) MASK Register */ /* -------- DSU_DCC : (DSU Offset: 0x0010) (R/W 32) Debug Communication Channel n -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t DATA:32; /*!< bit: 0..31 Data */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_DCC_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_DCC_OFFSET 0x0010 /**< \brief (DSU_DCC offset) Debug Communication Channel n */ #define DSU_DCC_RESETVALUE _U(0x00000000) /**< \brief (DSU_DCC reset_value) Debug Communication Channel n */ #define DSU_DCC_DATA_Pos 0 /**< \brief (DSU_DCC) Data */ #define DSU_DCC_DATA_Msk (_U(0xFFFFFFFF) << DSU_DCC_DATA_Pos) #define DSU_DCC_DATA(value) (DSU_DCC_DATA_Msk & ((value) << DSU_DCC_DATA_Pos)) #define DSU_DCC_MASK _U(0xFFFFFFFF) /**< \brief (DSU_DCC) MASK Register */ /* -------- DSU_DID : (DSU Offset: 0x0018) (R/ 32) Device Identification -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t DEVSEL:8; /*!< bit: 0.. 7 Device Select */ uint32_t REVISION:4; /*!< bit: 8..11 Revision */ uint32_t DIE:4; /*!< bit: 12..15 Die Identification */ uint32_t SERIES:6; /*!< bit: 16..21 Product Series */ uint32_t :1; /*!< bit: 22 Reserved */ uint32_t FAMILY:5; /*!< bit: 23..27 Product Family */ uint32_t PROCESSOR:4; /*!< bit: 28..31 Processor */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_DID_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_DID_OFFSET 0x0018 /**< \brief (DSU_DID offset) Device Identification */ #define DSU_DID_DEVSEL_Pos 0 /**< \brief (DSU_DID) Device Select */ #define DSU_DID_DEVSEL_Msk (_U(0xFF) << DSU_DID_DEVSEL_Pos) #define DSU_DID_DEVSEL(value) (DSU_DID_DEVSEL_Msk & ((value) << DSU_DID_DEVSEL_Pos)) #define DSU_DID_REVISION_Pos 8 /**< \brief (DSU_DID) Revision */ #define DSU_DID_REVISION_Msk (_U(0xF) << DSU_DID_REVISION_Pos) #define DSU_DID_REVISION(value) (DSU_DID_REVISION_Msk & ((value) << DSU_DID_REVISION_Pos)) #define DSU_DID_DIE_Pos 12 /**< \brief (DSU_DID) Die Identification */ #define DSU_DID_DIE_Msk (_U(0xF) << DSU_DID_DIE_Pos) #define DSU_DID_DIE(value) (DSU_DID_DIE_Msk & ((value) << DSU_DID_DIE_Pos)) #define DSU_DID_SERIES_Pos 16 /**< \brief (DSU_DID) Product Series */ #define DSU_DID_SERIES_Msk (_U(0x3F) << DSU_DID_SERIES_Pos) #define DSU_DID_SERIES(value) (DSU_DID_SERIES_Msk & ((value) << DSU_DID_SERIES_Pos)) #define DSU_DID_FAMILY_Pos 23 /**< \brief (DSU_DID) Product Family */ #define DSU_DID_FAMILY_Msk (_U(0x1F) << DSU_DID_FAMILY_Pos) #define DSU_DID_FAMILY(value) (DSU_DID_FAMILY_Msk & ((value) << DSU_DID_FAMILY_Pos)) #define DSU_DID_PROCESSOR_Pos 28 /**< \brief (DSU_DID) Processor */ #define DSU_DID_PROCESSOR_Msk (_U(0xF) << DSU_DID_PROCESSOR_Pos) #define DSU_DID_PROCESSOR(value) (DSU_DID_PROCESSOR_Msk & ((value) << DSU_DID_PROCESSOR_Pos)) #define DSU_DID_MASK _U(0xFFBFFFFF) /**< \brief (DSU_DID) MASK Register */ /* -------- DSU_ENTRY : (DSU Offset: 0x1000) (R/ 32) Coresight ROM Table Entry n -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t EPRES:1; /*!< bit: 0 Entry Present */ uint32_t FMT:1; /*!< bit: 1 Format */ uint32_t :10; /*!< bit: 2..11 Reserved */ uint32_t ADDOFF:20; /*!< bit: 12..31 Address Offset */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_ENTRY_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_ENTRY_OFFSET 0x1000 /**< \brief (DSU_ENTRY offset) Coresight ROM Table Entry n */ #define DSU_ENTRY_RESETVALUE _U(0x00000002) /**< \brief (DSU_ENTRY reset_value) Coresight ROM Table Entry n */ #define DSU_ENTRY_EPRES_Pos 0 /**< \brief (DSU_ENTRY) Entry Present */ #define DSU_ENTRY_EPRES (_U(0x1) << DSU_ENTRY_EPRES_Pos) #define DSU_ENTRY_FMT_Pos 1 /**< \brief (DSU_ENTRY) Format */ #define DSU_ENTRY_FMT (_U(0x1) << DSU_ENTRY_FMT_Pos) #define DSU_ENTRY_ADDOFF_Pos 12 /**< \brief (DSU_ENTRY) Address Offset */ #define DSU_ENTRY_ADDOFF_Msk (_U(0xFFFFF) << DSU_ENTRY_ADDOFF_Pos) #define DSU_ENTRY_ADDOFF(value) (DSU_ENTRY_ADDOFF_Msk & ((value) << DSU_ENTRY_ADDOFF_Pos)) #define DSU_ENTRY_MASK _U(0xFFFFF003) /**< \brief (DSU_ENTRY) MASK Register */ /* -------- DSU_END : (DSU Offset: 0x1008) (R/ 32) Coresight ROM Table End -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t END:32; /*!< bit: 0..31 End Marker */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_END_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_END_OFFSET 0x1008 /**< \brief (DSU_END offset) Coresight ROM Table End */ #define DSU_END_RESETVALUE _U(0x00000000) /**< \brief (DSU_END reset_value) Coresight ROM Table End */ #define DSU_END_END_Pos 0 /**< \brief (DSU_END) End Marker */ #define DSU_END_END_Msk (_U(0xFFFFFFFF) << DSU_END_END_Pos) #define DSU_END_END(value) (DSU_END_END_Msk & ((value) << DSU_END_END_Pos)) #define DSU_END_MASK _U(0xFFFFFFFF) /**< \brief (DSU_END) MASK Register */ /* -------- DSU_MEMTYPE : (DSU Offset: 0x1FCC) (R/ 32) Coresight ROM Table Memory Type -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t SMEMP:1; /*!< bit: 0 System Memory Present */ uint32_t :31; /*!< bit: 1..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_MEMTYPE_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_MEMTYPE_OFFSET 0x1FCC /**< \brief (DSU_MEMTYPE offset) Coresight ROM Table Memory Type */ #define DSU_MEMTYPE_RESETVALUE _U(0x00000000) /**< \brief (DSU_MEMTYPE reset_value) Coresight ROM Table Memory Type */ #define DSU_MEMTYPE_SMEMP_Pos 0 /**< \brief (DSU_MEMTYPE) System Memory Present */ #define DSU_MEMTYPE_SMEMP (_U(0x1) << DSU_MEMTYPE_SMEMP_Pos) #define DSU_MEMTYPE_MASK _U(0x00000001) /**< \brief (DSU_MEMTYPE) MASK Register */ /* -------- DSU_PID4 : (DSU Offset: 0x1FD0) (R/ 32) Peripheral Identification 4 -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t JEPCC:4; /*!< bit: 0.. 3 JEP-106 Continuation Code */ uint32_t FKBC:4; /*!< bit: 4.. 7 4KB Count */ uint32_t :24; /*!< bit: 8..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_PID4_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_PID4_OFFSET 0x1FD0 /**< \brief (DSU_PID4 offset) Peripheral Identification 4 */ #define DSU_PID4_RESETVALUE _U(0x00000000) /**< \brief (DSU_PID4 reset_value) Peripheral Identification 4 */ #define DSU_PID4_JEPCC_Pos 0 /**< \brief (DSU_PID4) JEP-106 Continuation Code */ #define DSU_PID4_JEPCC_Msk (_U(0xF) << DSU_PID4_JEPCC_Pos) #define DSU_PID4_JEPCC(value) (DSU_PID4_JEPCC_Msk & ((value) << DSU_PID4_JEPCC_Pos)) #define DSU_PID4_FKBC_Pos 4 /**< \brief (DSU_PID4) 4KB Count */ #define DSU_PID4_FKBC_Msk (_U(0xF) << DSU_PID4_FKBC_Pos) #define DSU_PID4_FKBC(value) (DSU_PID4_FKBC_Msk & ((value) << DSU_PID4_FKBC_Pos)) #define DSU_PID4_MASK _U(0x000000FF) /**< \brief (DSU_PID4) MASK Register */ /* -------- DSU_PID0 : (DSU Offset: 0x1FE0) (R/ 32) Peripheral Identification 0 -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t PARTNBL:8; /*!< bit: 0.. 7 Part Number Low */ uint32_t :24; /*!< bit: 8..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_PID0_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_PID0_OFFSET 0x1FE0 /**< \brief (DSU_PID0 offset) Peripheral Identification 0 */ #define DSU_PID0_RESETVALUE _U(0x000000D0) /**< \brief (DSU_PID0 reset_value) Peripheral Identification 0 */ #define DSU_PID0_PARTNBL_Pos 0 /**< \brief (DSU_PID0) Part Number Low */ #define DSU_PID0_PARTNBL_Msk (_U(0xFF) << DSU_PID0_PARTNBL_Pos) #define DSU_PID0_PARTNBL(value) (DSU_PID0_PARTNBL_Msk & ((value) << DSU_PID0_PARTNBL_Pos)) #define DSU_PID0_MASK _U(0x000000FF) /**< \brief (DSU_PID0) MASK Register */ /* -------- DSU_PID1 : (DSU Offset: 0x1FE4) (R/ 32) Peripheral Identification 1 -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t PARTNBH:4; /*!< bit: 0.. 3 Part Number High */ uint32_t JEPIDCL:4; /*!< bit: 4.. 7 Low part of the JEP-106 Identity Code */ uint32_t :24; /*!< bit: 8..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_PID1_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_PID1_OFFSET 0x1FE4 /**< \brief (DSU_PID1 offset) Peripheral Identification 1 */ #define DSU_PID1_RESETVALUE _U(0x000000FC) /**< \brief (DSU_PID1 reset_value) Peripheral Identification 1 */ #define DSU_PID1_PARTNBH_Pos 0 /**< \brief (DSU_PID1) Part Number High */ #define DSU_PID1_PARTNBH_Msk (_U(0xF) << DSU_PID1_PARTNBH_Pos) #define DSU_PID1_PARTNBH(value) (DSU_PID1_PARTNBH_Msk & ((value) << DSU_PID1_PARTNBH_Pos)) #define DSU_PID1_JEPIDCL_Pos 4 /**< \brief (DSU_PID1) Low part of the JEP-106 Identity Code */ #define DSU_PID1_JEPIDCL_Msk (_U(0xF) << DSU_PID1_JEPIDCL_Pos) #define DSU_PID1_JEPIDCL(value) (DSU_PID1_JEPIDCL_Msk & ((value) << DSU_PID1_JEPIDCL_Pos)) #define DSU_PID1_MASK _U(0x000000FF) /**< \brief (DSU_PID1) MASK Register */ /* -------- DSU_PID2 : (DSU Offset: 0x1FE8) (R/ 32) Peripheral Identification 2 -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t JEPIDCH:3; /*!< bit: 0.. 2 JEP-106 Identity Code High */ uint32_t JEPU:1; /*!< bit: 3 JEP-106 Identity Code is used */ uint32_t REVISION:4; /*!< bit: 4.. 7 Revision Number */ uint32_t :24; /*!< bit: 8..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_PID2_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_PID2_OFFSET 0x1FE8 /**< \brief (DSU_PID2 offset) Peripheral Identification 2 */ #define DSU_PID2_RESETVALUE _U(0x00000009) /**< \brief (DSU_PID2 reset_value) Peripheral Identification 2 */ #define DSU_PID2_JEPIDCH_Pos 0 /**< \brief (DSU_PID2) JEP-106 Identity Code High */ #define DSU_PID2_JEPIDCH_Msk (_U(0x7) << DSU_PID2_JEPIDCH_Pos) #define DSU_PID2_JEPIDCH(value) (DSU_PID2_JEPIDCH_Msk & ((value) << DSU_PID2_JEPIDCH_Pos)) #define DSU_PID2_JEPU_Pos 3 /**< \brief (DSU_PID2) JEP-106 Identity Code is used */ #define DSU_PID2_JEPU (_U(0x1) << DSU_PID2_JEPU_Pos) #define DSU_PID2_REVISION_Pos 4 /**< \brief (DSU_PID2) Revision Number */ #define DSU_PID2_REVISION_Msk (_U(0xF) << DSU_PID2_REVISION_Pos) #define DSU_PID2_REVISION(value) (DSU_PID2_REVISION_Msk & ((value) << DSU_PID2_REVISION_Pos)) #define DSU_PID2_MASK _U(0x000000FF) /**< \brief (DSU_PID2) MASK Register */ /* -------- DSU_PID3 : (DSU Offset: 0x1FEC) (R/ 32) Peripheral Identification 3 -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t CUSMOD:4; /*!< bit: 0.. 3 ARM CUSMOD */ uint32_t REVAND:4; /*!< bit: 4.. 7 Revision Number */ uint32_t :24; /*!< bit: 8..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_PID3_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_PID3_OFFSET 0x1FEC /**< \brief (DSU_PID3 offset) Peripheral Identification 3 */ #define DSU_PID3_RESETVALUE _U(0x00000000) /**< \brief (DSU_PID3 reset_value) Peripheral Identification 3 */ #define DSU_PID3_CUSMOD_Pos 0 /**< \brief (DSU_PID3) ARM CUSMOD */ #define DSU_PID3_CUSMOD_Msk (_U(0xF) << DSU_PID3_CUSMOD_Pos) #define DSU_PID3_CUSMOD(value) (DSU_PID3_CUSMOD_Msk & ((value) << DSU_PID3_CUSMOD_Pos)) #define DSU_PID3_REVAND_Pos 4 /**< \brief (DSU_PID3) Revision Number */ #define DSU_PID3_REVAND_Msk (_U(0xF) << DSU_PID3_REVAND_Pos) #define DSU_PID3_REVAND(value) (DSU_PID3_REVAND_Msk & ((value) << DSU_PID3_REVAND_Pos)) #define DSU_PID3_MASK _U(0x000000FF) /**< \brief (DSU_PID3) MASK Register */ /* -------- DSU_CID0 : (DSU Offset: 0x1FF0) (R/ 32) Component Identification 0 -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t PREAMBLEB0:8; /*!< bit: 0.. 7 Preamble Byte 0 */ uint32_t :24; /*!< bit: 8..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_CID0_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_CID0_OFFSET 0x1FF0 /**< \brief (DSU_CID0 offset) Component Identification 0 */ #define DSU_CID0_RESETVALUE _U(0x0000000D) /**< \brief (DSU_CID0 reset_value) Component Identification 0 */ #define DSU_CID0_PREAMBLEB0_Pos 0 /**< \brief (DSU_CID0) Preamble Byte 0 */ #define DSU_CID0_PREAMBLEB0_Msk (_U(0xFF) << DSU_CID0_PREAMBLEB0_Pos) #define DSU_CID0_PREAMBLEB0(value) (DSU_CID0_PREAMBLEB0_Msk & ((value) << DSU_CID0_PREAMBLEB0_Pos)) #define DSU_CID0_MASK _U(0x000000FF) /**< \brief (DSU_CID0) MASK Register */ /* -------- DSU_CID1 : (DSU Offset: 0x1FF4) (R/ 32) Component Identification 1 -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t PREAMBLE:4; /*!< bit: 0.. 3 Preamble */ uint32_t CCLASS:4; /*!< bit: 4.. 7 Component Class */ uint32_t :24; /*!< bit: 8..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_CID1_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_CID1_OFFSET 0x1FF4 /**< \brief (DSU_CID1 offset) Component Identification 1 */ #define DSU_CID1_RESETVALUE _U(0x00000010) /**< \brief (DSU_CID1 reset_value) Component Identification 1 */ #define DSU_CID1_PREAMBLE_Pos 0 /**< \brief (DSU_CID1) Preamble */ #define DSU_CID1_PREAMBLE_Msk (_U(0xF) << DSU_CID1_PREAMBLE_Pos) #define DSU_CID1_PREAMBLE(value) (DSU_CID1_PREAMBLE_Msk & ((value) << DSU_CID1_PREAMBLE_Pos)) #define DSU_CID1_CCLASS_Pos 4 /**< \brief (DSU_CID1) Component Class */ #define DSU_CID1_CCLASS_Msk (_U(0xF) << DSU_CID1_CCLASS_Pos) #define DSU_CID1_CCLASS(value) (DSU_CID1_CCLASS_Msk & ((value) << DSU_CID1_CCLASS_Pos)) #define DSU_CID1_MASK _U(0x000000FF) /**< \brief (DSU_CID1) MASK Register */ /* -------- DSU_CID2 : (DSU Offset: 0x1FF8) (R/ 32) Component Identification 2 -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t PREAMBLEB2:8; /*!< bit: 0.. 7 Preamble Byte 2 */ uint32_t :24; /*!< bit: 8..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_CID2_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_CID2_OFFSET 0x1FF8 /**< \brief (DSU_CID2 offset) Component Identification 2 */ #define DSU_CID2_RESETVALUE _U(0x00000005) /**< \brief (DSU_CID2 reset_value) Component Identification 2 */ #define DSU_CID2_PREAMBLEB2_Pos 0 /**< \brief (DSU_CID2) Preamble Byte 2 */ #define DSU_CID2_PREAMBLEB2_Msk (_U(0xFF) << DSU_CID2_PREAMBLEB2_Pos) #define DSU_CID2_PREAMBLEB2(value) (DSU_CID2_PREAMBLEB2_Msk & ((value) << DSU_CID2_PREAMBLEB2_Pos)) #define DSU_CID2_MASK _U(0x000000FF) /**< \brief (DSU_CID2) MASK Register */ /* -------- DSU_CID3 : (DSU Offset: 0x1FFC) (R/ 32) Component Identification 3 -------- */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef union { struct { uint32_t PREAMBLEB3:8; /*!< bit: 0.. 7 Preamble Byte 3 */ uint32_t :24; /*!< bit: 8..31 Reserved */ } bit; /*!< Structure used for bit access */ uint32_t reg; /*!< Type used for register access */ } DSU_CID3_Type; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ #define DSU_CID3_OFFSET 0x1FFC /**< \brief (DSU_CID3 offset) Component Identification 3 */ #define DSU_CID3_RESETVALUE _U(0x000000B1) /**< \brief (DSU_CID3 reset_value) Component Identification 3 */ #define DSU_CID3_PREAMBLEB3_Pos 0 /**< \brief (DSU_CID3) Preamble Byte 3 */ #define DSU_CID3_PREAMBLEB3_Msk (_U(0xFF) << DSU_CID3_PREAMBLEB3_Pos) #define DSU_CID3_PREAMBLEB3(value) (DSU_CID3_PREAMBLEB3_Msk & ((value) << DSU_CID3_PREAMBLEB3_Pos)) #define DSU_CID3_MASK _U(0x000000FF) /**< \brief (DSU_CID3) MASK Register */ /** \brief DSU hardware registers */ #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) typedef struct { __O DSU_CTRL_Type CTRL; /**< \brief Offset: 0x0000 ( /W 8) Control */ __IO DSU_STATUSA_Type STATUSA; /**< \brief Offset: 0x0001 (R/W 8) Status A */ __I DSU_STATUSB_Type STATUSB; /**< \brief Offset: 0x0002 (R/ 8) Status B */ RoReg8 Reserved1[0x1]; __IO DSU_ADDR_Type ADDR; /**< \brief Offset: 0x0004 (R/W 32) Address */ __IO DSU_LENGTH_Type LENGTH; /**< \brief Offset: 0x0008 (R/W 32) Length */ __IO DSU_DATA_Type DATA; /**< \brief Offset: 0x000C (R/W 32) Data */ __IO DSU_DCC_Type DCC[2]; /**< \brief Offset: 0x0010 (R/W 32) Debug Communication Channel n */ __I DSU_DID_Type DID; /**< \brief Offset: 0x0018 (R/ 32) Device Identification */ RoReg8 Reserved2[0xFE4]; __I DSU_ENTRY_Type ENTRY[2]; /**< \brief Offset: 0x1000 (R/ 32) Coresight ROM Table Entry n */ __I DSU_END_Type END; /**< \brief Offset: 0x1008 (R/ 32) Coresight ROM Table End */ RoReg8 Reserved3[0xFC0]; __I DSU_MEMTYPE_Type MEMTYPE; /**< \brief Offset: 0x1FCC (R/ 32) Coresight ROM Table Memory Type */ __I DSU_PID4_Type PID4; /**< \brief Offset: 0x1FD0 (R/ 32) Peripheral Identification 4 */ RoReg8 Reserved4[0xC]; __I DSU_PID0_Type PID0; /**< \brief Offset: 0x1FE0 (R/ 32) Peripheral Identification 0 */ __I DSU_PID1_Type PID1; /**< \brief Offset: 0x1FE4 (R/ 32) Peripheral Identification 1 */ __I DSU_PID2_Type PID2; /**< \brief Offset: 0x1FE8 (R/ 32) Peripheral Identification 2 */ __I DSU_PID3_Type PID3; /**< \brief Offset: 0x1FEC (R/ 32) Peripheral Identification 3 */ __I DSU_CID0_Type CID0; /**< \brief Offset: 0x1FF0 (R/ 32) Component Identification 0 */ __I DSU_CID1_Type CID1; /**< \brief Offset: 0x1FF4 (R/ 32) Component Identification 1 */ __I DSU_CID2_Type CID2; /**< \brief Offset: 0x1FF8 (R/ 32) Component Identification 2 */ __I DSU_CID3_Type CID3; /**< \brief Offset: 0x1FFC (R/ 32) Component Identification 3 */ } Dsu; #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ /*@}*/ #endif /* _SAMD21_DSU_COMPONENT_ */
[ "joaofl@gmail.com" ]
joaofl@gmail.com
dfa01ea86a2bce6ee9052f2c25dae843b063fff3
f99fe5e7d6b160cef405cba7775899a81ed2a5e5
/src/cmptr3.c
f8f7532066b3e512f34a811e1517283e6b79cdc7
[]
no_license
rajdipnayek/cslatec
83122616f72769b36fa7b6d00b3ec988bbb35fe3
c2a4301febfe44e2d1e0c0fa3a73ca49e44780db
refs/heads/master
2021-01-06T16:47:40.152730
2015-05-01T20:03:32
2015-05-01T20:17:48
null
0
0
null
null
null
null
UTF-8
C
false
false
8,360
c
/* cmptr3.f -- translated by f2c (version 12.02.01). You must link the resulting object file with libf2c: on Microsoft Windows system, link with libf2c.lib; on Linux or Unix systems, link with .../path/to/libf2c.a -lm or, if you install libf2c.a in a standard place, with -lf2c -lm -- in that order, at the end of the command line, as in cc *.o -lf2c -lm Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., http://www.netlib.org/f2c/libf2c.zip */ #include <stdlib.h> /* For exit() */ #include <f2c.h> /* Table of constant values */ static complex c_b10 = {1.f,0.f}; /* DECK CMPTR3 */ /* Subroutine */ int cmptr3_(integer *m, complex *a, complex *b, complex *c__, integer *k, complex *y1, complex *y2, complex *y3, complex *tcos, complex *d__, complex *w1, complex *w2, complex *w3) { /* System generated locals */ integer i__1, i__2, i__3, i__4, i__5, i__6; complex q__1, q__2, q__3, q__4; /* Local variables */ static integer i__, n; static complex x, z__; static integer k1, k2, k3, k4, l1, l2, l3, ip; static complex xx; static integer mm1, k1p1, k2p1, k3p1, k4p1, k2k3k4, kint1, lint1, lint2, lint3, kint2, kint3; /* ***BEGIN PROLOGUE CMPTR3 */ /* ***SUBSIDIARY */ /* ***PURPOSE Subsidiary to CMGNBN */ /* ***LIBRARY SLATEC */ /* ***TYPE COMPLEX (TRI3-S, CMPTR3-C) */ /* ***AUTHOR (UNKNOWN) */ /* ***DESCRIPTION */ /* Subroutine to solve tridiagonal systems. */ /* ***SEE ALSO CMGNBN */ /* ***ROUTINES CALLED (NONE) */ /* ***REVISION HISTORY (YYMMDD) */ /* 801001 DATE WRITTEN */ /* 890206 REVISION DATE from Version 3.2 */ /* 891214 Prologue converted to Version 4.0 format. (BAB) */ /* 900402 Added TYPE section. (WRB) */ /* ***END PROLOGUE CMPTR3 */ /* ***FIRST EXECUTABLE STATEMENT CMPTR3 */ /* Parameter adjustments */ --w3; --w2; --w1; --d__; --tcos; --y3; --y2; --y1; --k; --c__; --b; --a; /* Function Body */ mm1 = *m - 1; k1 = k[1]; k2 = k[2]; k3 = k[3]; k4 = k[4]; k1p1 = k1 + 1; k2p1 = k2 + 1; k3p1 = k3 + 1; k4p1 = k4 + 1; k2k3k4 = k2 + k3 + k4; if (k2k3k4 == 0) { goto L101; } l1 = k1p1 / k2p1; l2 = k1p1 / k3p1; l3 = k1p1 / k4p1; lint1 = 1; lint2 = 1; lint3 = 1; kint1 = k1; kint2 = kint1 + k2; kint3 = kint2 + k3; L101: i__1 = k1; for (n = 1; n <= i__1; ++n) { i__2 = n; x.r = tcos[i__2].r, x.i = tcos[i__2].i; if (k2k3k4 == 0) { goto L107; } if (n != l1) { goto L103; } i__2 = *m; for (i__ = 1; i__ <= i__2; ++i__) { i__3 = i__; i__4 = i__; w1[i__3].r = y1[i__4].r, w1[i__3].i = y1[i__4].i; /* L102: */ } L103: if (n != l2) { goto L105; } i__2 = *m; for (i__ = 1; i__ <= i__2; ++i__) { i__3 = i__; i__4 = i__; w2[i__3].r = y2[i__4].r, w2[i__3].i = y2[i__4].i; /* L104: */ } L105: if (n != l3) { goto L107; } i__2 = *m; for (i__ = 1; i__ <= i__2; ++i__) { i__3 = i__; i__4 = i__; w3[i__3].r = y3[i__4].r, w3[i__3].i = y3[i__4].i; /* L106: */ } L107: q__2.r = b[1].r - x.r, q__2.i = b[1].i - x.i; c_div(&q__1, &c_b10, &q__2); z__.r = q__1.r, z__.i = q__1.i; q__1.r = c__[1].r * z__.r - c__[1].i * z__.i, q__1.i = c__[1].r * z__.i + c__[1].i * z__.r; d__[1].r = q__1.r, d__[1].i = q__1.i; q__1.r = y1[1].r * z__.r - y1[1].i * z__.i, q__1.i = y1[1].r * z__.i + y1[1].i * z__.r; y1[1].r = q__1.r, y1[1].i = q__1.i; q__1.r = y2[1].r * z__.r - y2[1].i * z__.i, q__1.i = y2[1].r * z__.i + y2[1].i * z__.r; y2[1].r = q__1.r, y2[1].i = q__1.i; q__1.r = y3[1].r * z__.r - y3[1].i * z__.i, q__1.i = y3[1].r * z__.i + y3[1].i * z__.r; y3[1].r = q__1.r, y3[1].i = q__1.i; i__2 = *m; for (i__ = 2; i__ <= i__2; ++i__) { i__3 = i__; q__3.r = b[i__3].r - x.r, q__3.i = b[i__3].i - x.i; i__4 = i__; i__5 = i__ - 1; q__4.r = a[i__4].r * d__[i__5].r - a[i__4].i * d__[i__5].i, q__4.i = a[i__4].r * d__[i__5].i + a[i__4].i * d__[i__5] .r; q__2.r = q__3.r - q__4.r, q__2.i = q__3.i - q__4.i; c_div(&q__1, &c_b10, &q__2); z__.r = q__1.r, z__.i = q__1.i; i__3 = i__; i__4 = i__; q__1.r = c__[i__4].r * z__.r - c__[i__4].i * z__.i, q__1.i = c__[ i__4].r * z__.i + c__[i__4].i * z__.r; d__[i__3].r = q__1.r, d__[i__3].i = q__1.i; i__3 = i__; i__4 = i__; i__5 = i__; i__6 = i__ - 1; q__3.r = a[i__5].r * y1[i__6].r - a[i__5].i * y1[i__6].i, q__3.i = a[i__5].r * y1[i__6].i + a[i__5].i * y1[i__6].r; q__2.r = y1[i__4].r - q__3.r, q__2.i = y1[i__4].i - q__3.i; q__1.r = q__2.r * z__.r - q__2.i * z__.i, q__1.i = q__2.r * z__.i + q__2.i * z__.r; y1[i__3].r = q__1.r, y1[i__3].i = q__1.i; i__3 = i__; i__4 = i__; i__5 = i__; i__6 = i__ - 1; q__3.r = a[i__5].r * y2[i__6].r - a[i__5].i * y2[i__6].i, q__3.i = a[i__5].r * y2[i__6].i + a[i__5].i * y2[i__6].r; q__2.r = y2[i__4].r - q__3.r, q__2.i = y2[i__4].i - q__3.i; q__1.r = q__2.r * z__.r - q__2.i * z__.i, q__1.i = q__2.r * z__.i + q__2.i * z__.r; y2[i__3].r = q__1.r, y2[i__3].i = q__1.i; i__3 = i__; i__4 = i__; i__5 = i__; i__6 = i__ - 1; q__3.r = a[i__5].r * y3[i__6].r - a[i__5].i * y3[i__6].i, q__3.i = a[i__5].r * y3[i__6].i + a[i__5].i * y3[i__6].r; q__2.r = y3[i__4].r - q__3.r, q__2.i = y3[i__4].i - q__3.i; q__1.r = q__2.r * z__.r - q__2.i * z__.i, q__1.i = q__2.r * z__.i + q__2.i * z__.r; y3[i__3].r = q__1.r, y3[i__3].i = q__1.i; /* L108: */ } i__2 = mm1; for (ip = 1; ip <= i__2; ++ip) { i__ = *m - ip; i__3 = i__; i__4 = i__; i__5 = i__; i__6 = i__ + 1; q__2.r = d__[i__5].r * y1[i__6].r - d__[i__5].i * y1[i__6].i, q__2.i = d__[i__5].r * y1[i__6].i + d__[i__5].i * y1[i__6] .r; q__1.r = y1[i__4].r - q__2.r, q__1.i = y1[i__4].i - q__2.i; y1[i__3].r = q__1.r, y1[i__3].i = q__1.i; i__3 = i__; i__4 = i__; i__5 = i__; i__6 = i__ + 1; q__2.r = d__[i__5].r * y2[i__6].r - d__[i__5].i * y2[i__6].i, q__2.i = d__[i__5].r * y2[i__6].i + d__[i__5].i * y2[i__6] .r; q__1.r = y2[i__4].r - q__2.r, q__1.i = y2[i__4].i - q__2.i; y2[i__3].r = q__1.r, y2[i__3].i = q__1.i; i__3 = i__; i__4 = i__; i__5 = i__; i__6 = i__ + 1; q__2.r = d__[i__5].r * y3[i__6].r - d__[i__5].i * y3[i__6].i, q__2.i = d__[i__5].r * y3[i__6].i + d__[i__5].i * y3[i__6] .r; q__1.r = y3[i__4].r - q__2.r, q__1.i = y3[i__4].i - q__2.i; y3[i__3].r = q__1.r, y3[i__3].i = q__1.i; /* L109: */ } if (k2k3k4 == 0) { goto L115; } if (n != l1) { goto L111; } i__ = lint1 + kint1; i__2 = i__; q__1.r = x.r - tcos[i__2].r, q__1.i = x.i - tcos[i__2].i; xx.r = q__1.r, xx.i = q__1.i; i__2 = *m; for (i__ = 1; i__ <= i__2; ++i__) { i__3 = i__; i__4 = i__; q__2.r = xx.r * y1[i__4].r - xx.i * y1[i__4].i, q__2.i = xx.r * y1[i__4].i + xx.i * y1[i__4].r; i__5 = i__; q__1.r = q__2.r + w1[i__5].r, q__1.i = q__2.i + w1[i__5].i; y1[i__3].r = q__1.r, y1[i__3].i = q__1.i; /* L110: */ } ++lint1; l1 = lint1 * k1p1 / k2p1; L111: if (n != l2) { goto L113; } i__ = lint2 + kint2; i__2 = i__; q__1.r = x.r - tcos[i__2].r, q__1.i = x.i - tcos[i__2].i; xx.r = q__1.r, xx.i = q__1.i; i__2 = *m; for (i__ = 1; i__ <= i__2; ++i__) { i__3 = i__; i__4 = i__; q__2.r = xx.r * y2[i__4].r - xx.i * y2[i__4].i, q__2.i = xx.r * y2[i__4].i + xx.i * y2[i__4].r; i__5 = i__; q__1.r = q__2.r + w2[i__5].r, q__1.i = q__2.i + w2[i__5].i; y2[i__3].r = q__1.r, y2[i__3].i = q__1.i; /* L112: */ } ++lint2; l2 = lint2 * k1p1 / k3p1; L113: if (n != l3) { goto L115; } i__ = lint3 + kint3; i__2 = i__; q__1.r = x.r - tcos[i__2].r, q__1.i = x.i - tcos[i__2].i; xx.r = q__1.r, xx.i = q__1.i; i__2 = *m; for (i__ = 1; i__ <= i__2; ++i__) { i__3 = i__; i__4 = i__; q__2.r = xx.r * y3[i__4].r - xx.i * y3[i__4].i, q__2.i = xx.r * y3[i__4].i + xx.i * y3[i__4].r; i__5 = i__; q__1.r = q__2.r + w3[i__5].r, q__1.i = q__2.i + w3[i__5].i; y3[i__3].r = q__1.r, y3[i__3].i = q__1.i; /* L114: */ } ++lint3; l3 = lint3 * k1p1 / k4p1; L115: ; } return 0; } /* cmptr3_ */
[ "rf@rufflewind.com" ]
rf@rufflewind.com
c1b8130916ad3188a3fee34f100a534319c4aebe
5dcae792e2f7fc47aec0b03943a07505c8fd44f7
/Go/5in1row/Menu.h
d82d958b79954a718595c6bda276bcfb025ad414
[ "MIT" ]
permissive
Sean-sheep/c2019
35ad7ddd56ba426ff609dfaacec96390a5066746
ff8031280bfa9ef12121dc576a969fff0295ec5b
refs/heads/master
2020-04-25T20:04:24.882542
2019-06-14T05:32:04
2019-06-14T05:32:04
173,042,337
0
0
null
2019-02-28T04:43:16
2019-02-28T04:43:16
null
UTF-8
C
false
false
554
h
#if !defined(_Menu_H) #define Menu_H #include "AI.h" #include "Win.h" // #include "Test.h" #include "Const.h" #include "Cover.h" #include "PrintAndChange.h" #include <time.h> #include <conio.h> #include <windows.h> boolean TwoPlayer(unsigned char board[][_Length], int turn, boolean win, struct Location loc, unsigned char cover[][_Length][10], COORD coord, HANDLE handle_out); boolean SinglePlayer(unsigned char board[][_Length], int turn, boolean win, struct Location loc, unsigned char cover[][_Length][10], COORD coord, HANDLE handle_out); #endif
[ "1296997118@qq.com" ]
1296997118@qq.com
893decf8ba48e6305f30481b764a81a7f50abb3d
97aa398e9b1d7c70c25a350e8fbaf12e22fb44c8
/hw3-scheduling-simulation-bba753951/resource.c
800a9dd21d9018f7a5da56ce5ec363337718be85
[]
no_license
bba753951/OS_HW
7510d7d9d561231d563ca453c3d020bee067175c
e55d70c8d90c36d0b4d1543fa8a5189e36280262
refs/heads/master
2022-04-15T09:59:16.979744
2020-04-16T14:13:32
2020-04-16T14:13:32
256,234,495
0
0
null
null
null
null
UTF-8
C
false
false
5,142
c
#include "resource.h" #include <stdio.h> #include <stdlib.h> // #include "scheduling_simulator.h" #include "priorityq.h" #include <ucontext.h> #include "config.h" #include "task_set.h" #include "task.h" task_priority_type cur[TASKS_COUNT]= {0}; // int btn[TASKS_COUNT]={0}; task_const_type val1= { TASK_idle_task, idle_task, 0, }; task_const_type val2= { TASK_idle_task, idle_task, 0, }; status_type get_resource(resource_type id) { status_type result = STATUS_OK; task_type t=0; t=priority_q_front(q); for (int i = 0; i < RESOURCES_COUNT ; i++) { // printf("-----get resource: %u t:%u\n",resource_state[i],t); if(resources_id[i] == id) { if(resource_state[i]!=0) { result = STATUS_ERROR; break; } resource_state[i]=t; // printf("-----get resource2: %u t:%u\n",resource_state[i],t); cur[i]=((task_const_type *)(q->elements + sizeof(task_const_type)))->static_priority; if(cur[i] < resources_priority[i]) { ((task_const_type *)(q->elements + sizeof(task_const_type)))->static_priority=resources_priority[i]; } }; } return result; } status_type release_resource(resource_type id) { status_type result = STATUS_OK; task_type t=0,t1=0,t2=0; task_priority_type tp1=0; int j=0; t=priority_q_front(q); // printf("resource remain:%u\n",q->cur_nr); // printf("********************\n"); int max_index=-1; // if(q->cur_nr>4){ // t=priority_q_Nth(q,1); // printf("1:%u\n",t); // t=priority_q_Nth(q,2); // printf("2:%u\n",t); // t=priority_q_Nth(q,3); // printf("3:%u\n",t); // t=priority_q_Nth(q,4); // printf("4:%u\n",t); // exit(1); // } // int a = q->cur_nr; // for (int j = 0; j < a ; j++){ // printf("remain:%d\n",q->cur_nr); // priority_q_del_min(q, &val1); // printf("terminate id:%u\n",val1.id); // } // printf("---------------------resource1 ---------------------\n"); // for(int i=0;i<TASKS_COUNT;i++){ // printf("task state:%u\n",task_state[i]); // } for (int i = 0; i < RESOURCES_COUNT ; i++) { // printf("-------***--------\n"); // printf("resource state: %u t:%u\n",resource_state[i],t); if(resources_id[i] == id) { if(resource_state[i]!=t) { // printf("release error\n"); return STATUS_ERROR; } resource_state[i]=0; for (int k = 0; k < RESOURCES_COUNT ; k++) { if(resource_state[k]==t && k > max_index) { max_index=k; } } // printf("max_index:%d\n",max_index); if(max_index==-1) { for(j=0; j<TASKS_COUNT; j++) { if(task_const[j].id==t) { break; } } ((task_const_type *)(q->elements + sizeof(task_const_type)))->static_priority=o_priority[j]; } else { ((task_const_type *)(q->elements + sizeof(task_const_type)))->static_priority=resources_priority[max_index]; } // printf("rel p:%u\n",((task_const_type *)(q->elements + sizeof(task_const_type)))->static_priority); // release後可能被preempt priority_q_del_min(q, &val1); t2=val1.id; priority_q_insert(q, &val1); t1=priority_q_front(q); tp1=priority_q_front_priority(q); // printf("---------val1.id:%u\n",val1.id); // printf("---------t1:%u\n",t1); for(j=0; j<TASKS_COUNT; j++) { if(task_const[j].id==val1.id) { break; } } // printf("---------j:%u\n",j); while(t2!=t1) { if(tp1 == val1.static_priority) { priority_q_del_min(q, &val2); priority_q_insert(q, &val2); t1=priority_q_front(q); tp1=priority_q_front_priority(q); } else { task_state[j]=READY; // printf("cur:%u next:%u\n",cur[i],t1); activate_task(t1); t1=priority_q_front(q); } } // printf("---------j:%u\n",j); // printf("---------------------resource2 ---------------------\n"); // for(int i=0;i<TASKS_COUNT;i++){ // printf("task state:%u\n",task_state[i]); // } task_state[j]=RUNNING; }; } // printf("---------------------resource3 ---------------------\n"); // for(int i=0;i<TASKS_COUNT;i++){ // printf("task state:%u\n",task_state[i]); // } return result; }
[ "bba753951@gmail.com" ]
bba753951@gmail.com
d305f8e3495d17acdb8e910a22552b1d76159128
948f4e13af6b3014582909cc6d762606f2a43365
/testcases/juliet_test_suite/testcases/CWE590_Free_Memory_Not_on_Heap/s04/CWE590_Free_Memory_Not_on_Heap__free_char_static_68b.c
f9b7cb5453042e0b67db1519f0341e5cae74e82a
[]
no_license
junxzm1990/ASAN--
0056a341b8537142e10373c8417f27d7825ad89b
ca96e46422407a55bed4aa551a6ad28ec1eeef4e
refs/heads/master
2022-08-02T15:38:56.286555
2022-06-16T22:19:54
2022-06-16T22:19:54
408,238,453
74
13
null
2022-06-16T22:19:55
2021-09-19T21:14:59
null
UTF-8
C
false
false
1,575
c
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE590_Free_Memory_Not_on_Heap__free_char_static_68b.c Label Definition File: CWE590_Free_Memory_Not_on_Heap__free.label.xml Template File: sources-sink-68b.tmpl.c */ /* * @description * CWE: 590 Free Memory Not on Heap * BadSource: static Data buffer is declared static on the stack * GoodSource: Allocate memory on the heap * Sink: * BadSink : Print then free data * Flow Variant: 68 Data flow: data passed as a global variable from one function to another in different source files * * */ #include "std_testcase.h" #include <wchar.h> extern char * CWE590_Free_Memory_Not_on_Heap__free_char_static_68_badData; extern char * CWE590_Free_Memory_Not_on_Heap__free_char_static_68_goodG2BData; /* all the sinks are the same, we just want to know where the hit originated if a tool flags one */ #ifndef OMITBAD void CWE590_Free_Memory_Not_on_Heap__free_char_static_68b_badSink() { char * data = CWE590_Free_Memory_Not_on_Heap__free_char_static_68_badData; printLine(data); /* POTENTIAL FLAW: Possibly deallocating memory allocated on the stack */ free(data); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void CWE590_Free_Memory_Not_on_Heap__free_char_static_68b_goodG2BSink() { char * data = CWE590_Free_Memory_Not_on_Heap__free_char_static_68_goodG2BData; printLine(data); /* POTENTIAL FLAW: Possibly deallocating memory allocated on the stack */ free(data); } #endif /* OMITGOOD */
[ "yzhang0701@gmail.com" ]
yzhang0701@gmail.com
a1b8d8d5a8d534f5036d1317146a33be2f883120
6c81d3c09d881042ddf8efa1eedf3a218c8ebd0e
/hw2/cread_alt.c
d0a5e87d1a5b6b7c765141b99807b7be064cb899
[]
no_license
elihan27/CS-33-2
99d3a1225c699e35dfe5ba4a48e753af9d04b3b5
3742d399707c24f829c078b70b37a4fe33fa6895
refs/heads/master
2020-04-04T01:13:08.347058
2018-11-01T06:41:57
2018-11-01T06:41:57
155,673,084
0
0
null
null
null
null
UTF-8
C
false
false
403
c
// // main.c // hw2test // Elizabeth Han 004815046 #include <stdio.h> //compiled using -O1 long cread(long *xp) { long zero = 0; long* ZERO = &zero; return *(xp ? xp : ZERO); } /*int main(void) { long x = 3; long *y = &x; long z = cread(y); printf("%li \n", z); long *a; z= cread(a); printf("%li \n", z); return 0; } */
[ "ehan2016@gmail.com" ]
ehan2016@gmail.com
bee3fbe40b500248a0d3776f479bccca9dcf948f
1906c0d69e73d40a450005869e3ac2205381f864
/DUMP/PRO_PlayerCharacter_classes.h
6376c3c39dcb406b7c0ec1d0ae38ca950ef2d954
[]
no_license
xkp95175333/Prospect-Win64-Shipping
cad4b698cb50e48093285e1bf9eedef31ca69918
b3d14230402186be14254a0fdae9ac2fae056fb1
refs/heads/main
2023-09-02T20:23:54.236050
2021-10-26T17:22:34
2021-10-26T17:22:34
421,519,697
0
0
null
null
null
null
UTF-8
C
false
false
13,266
h
// BlueprintGeneratedClass PRO_PlayerCharacter.PRO_PlayerCharacter_C // Size: 0x8bc (Inherited: 0x6e0) struct APRO_PlayerCharacter_C : AYPlayerCharacter { struct FPointerToUberGraphFrame UberGraphFrame; // 0x6e0(0x08) struct UPlayerDBNOComponent_BP_C* PlayerDBNOComponent_BP; // 0x6e8(0x08) struct UPlayer_InventoryAudioComponent_BP_C* Player_InventoryAudioComponent_BP; // 0x6f0(0x08) struct UTakeDamageBloodDecalComponent_BP_C* TakeDamageBloodDecalComponent_BP; // 0x6f8(0x08) struct UWeaponScopeComponent_BP_C* WeaponScopeComponent_BP; // 0x700(0x08) struct UFlinchesComponent_BP_C* FlinchesComponent_BP; // 0x708(0x08) struct UYPlayerCharacterEffortsComponent_BP_C* YPlayerCharacterEffortsComponent_BP; // 0x710(0x08) struct UHelmetGoggleComponent_BP_C* HelmetGoggleComponent_BP; // 0x718(0x08) struct UTacticalFlashLightComponent_BP_C* TacticalFlashLightComponent_BP; // 0x720(0x08) struct UPlayer_MeleeAttackComponent_BP_C* Player_MeleeAttackComponent_BP; // 0x728(0x08) struct UPlayerCarryingComponent_BP_C* PlayerCarryingComponent_BP; // 0x730(0x08) struct UInteractionAnimComponent_BP_C* InteractionAnimComponent_BP; // 0x738(0x08) struct UYCharacterScopeGlintComponent_BP_C* ScopeGlintComponent_BP; // 0x740(0x08) struct UAudioComponent* SFX_PlayerEfforts_Stamina; // 0x748(0x08) struct UYPlayerTriggerAISenseComponent_BP_C* YPlayerTriggerAISenseComponent_BP; // 0x750(0x08) struct UYPlayerConsumableComponent_BP_C* YPlayerConsumableComponent_BP; // 0x758(0x08) struct UParticleSystemComponent* FX_PlayedEvacuateCharging_PS; // 0x760(0x08) struct UYPingableComponent* YPingable; // 0x768(0x08) struct UPlayerCharacterOutlineComponent_C* PlayerCharacterOutlineComponent; // 0x770(0x08) struct UYPlayerRenderTargetVfxMovementComponent_BP_C* YPlayerRenderTargetVfxMovementComponent_BP; // 0x778(0x08) struct UYPlayerSFXComponent_BP_C* YPlayerSFXComponent_BP; // 0x780(0x08) struct UPlayerCharacterCombatAwarenessComponent_BP_C* PlayerCharacterCombatAwarenessComponent_BP; // 0x788(0x08) struct UYPlayerVFXComponent_BP_C* PRO_PlayerCharacter_VFXComponent; // 0x790(0x08) struct USkeletalMeshComponent* DBNO_FoamMesh_SK; // 0x798(0x08) struct UYPlayerEscapeComponent_BP_C* YPlayerEscapeComponent_BP; // 0x7a0(0x08) struct UYPlayerAnimEvalComponent_BP_C* YPlayerAnimEvalComponent_BP; // 0x7a8(0x08) struct UYAIPerceptionStimuliSourceComp* YAIPerceptionStimuliSourceComp; // 0x7b0(0x08) struct UParticleSystemComponent* Trail; // 0x7b8(0x08) struct UPostProcessComponent* PostProcess; // 0x7c0(0x08) float STE_ChargeVFX_TL_NewTrack_0_E03AF13C4D6D893B0E8DC58C085F8278; // 0x7c8(0x04) enum class ETimelineDirection STE_ChargeVFX_TL__Direction_E03AF13C4D6D893B0E8DC58C085F8278; // 0x7cc(0x01) char pad_7CD[0x3]; // 0x7cd(0x03) struct UTimelineComponent* STE_ChargeVFX_TL; // 0x7d0(0x08) bool IsTagged; // 0x7d8(0x01) char pad_7D9[0x3]; // 0x7d9(0x03) float SlowdownResetTime; // 0x7dc(0x04) float SlowdownMaxSpeed; // 0x7e0(0x04) float SlowdownDuration; // 0x7e4(0x04) float SlowdownImmunityThreshold; // 0x7e8(0x04) bool IsSlowdown; // 0x7ec(0x01) char pad_7ED[0x3]; // 0x7ed(0x03) struct FGuid AddedSlowdown; // 0x7f0(0x10) struct FGuid AttributeModifierMovement; // 0x800(0x10) bool IsHOT; // 0x810(0x01) char pad_811[0x3]; // 0x811(0x03) struct FGuid AddedHOT; // 0x814(0x10) char pad_824[0x4]; // 0x824(0x04) struct AYPlayerController* YPlayerCtrl; // 0x828(0x08) struct UParticleSystemComponent* DamageOverTime_PS; // 0x830(0x08) struct UTextRenderComponent* BugReportingTextComponent; // 0x838(0x08) bool IsCharacterNinja; // 0x840(0x01) bool IsSlowdownImmune; // 0x841(0x01) char pad_842[0x2]; // 0x842(0x02) float SlowdownBuildUp; // 0x844(0x04) float LastDamageTaken; // 0x848(0x04) char pad_84C[0x4]; // 0x84c(0x04) struct FTimerHandle TimerHandleClearSlowdown; // 0x850(0x08) struct UMaterialInstanceDynamic* EoM_Post_MID; // 0x858(0x08) struct AMapAreaLocation_BP_C* LocationConditionChallengeDBNO; // 0x860(0x08) float PvPTargetResetTime; // 0x868(0x04) char pad_86C[0x4]; // 0x86c(0x04) struct AActor* DamageCauser; // 0x870(0x08) int32_t MaxCreditsToDropOnDeathOrRecall; // 0x878(0x04) char pad_87C[0x4]; // 0x87c(0x04) struct FDataTableRowHandle VO_RecallChargeLost; // 0x880(0x10) struct FDataTableRowHandle LeanRowHandle; // 0x890(0x10) struct FVector LastDamageDirection; // 0x8a0(0x0c) struct FVector LastDamageHitLocation; // 0x8ac(0x0c) float PawnCleanUpDelay; // 0x8b8(0x04) struct FYImpactEffectReceiverData GetCustomImpactEffectData(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.GetCustomImpactEffectData // (Event|Public|HasOutParms|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void GetWeaponFirstPersonMesh(struct UYSkeletalMeshComponentFOV* m_weaponMesh); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.GetWeaponFirstPersonMesh // (Public|HasOutParms|BlueprintCallable|BlueprintEvent|BlueprintPure) // @ game+0x1e02480 void OnLeanDirectionChanged(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnLeanDirectionChanged // (Public|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void PlayCameraShakeOnOwningPlayer(struct UCameraShakeBase* Shake); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.PlayCameraShakeOnOwningPlayer // (Public|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnRep_IsHOT(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnRep_IsHOT // (HasDefaults|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnRep_IsSlowdown(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnRep_IsSlowdown // (HasDefaults|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnRep_IsTagged(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnRep_IsTagged // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnRep_IsCloaked(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnRep_IsCloaked // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void GetAnimBlueprint(struct UAnimInstance* AnimInstance); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.GetAnimBlueprint // (Public|HasOutParms|BlueprintCallable|BlueprintEvent|BlueprintPure) // @ game+0x1e02480 void SwitchToThirdPerson(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.SwitchToThirdPerson // (Public|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void STE_ChargeVFX_TL__FinishedFunc(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.STE_ChargeVFX_TL__FinishedFunc // (BlueprintEvent) // @ game+0x1e02480 void STE_ChargeVFX_TL__UpdateFunc(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.STE_ChargeVFX_TL__UpdateFunc // (BlueprintEvent) // @ game+0x1e02480 void InpActEvt_ToggleNightVision_K2Node_InputActionEvent_2(struct FKey Key); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.InpActEvt_ToggleNightVision_K2Node_InputActionEvent_2 // (BlueprintEvent) // @ game+0x1e02480 void InpActEvt_ToggleLight_K2Node_InputActionEvent_1(struct FKey Key); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.InpActEvt_ToggleLight_K2Node_InputActionEvent_1 // (BlueprintEvent) // @ game+0x1e02480 void ReceiveBeginPlay(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.ReceiveBeginPlay // (Event|Protected|BlueprintEvent) // @ game+0x1e02480 void Server_EH_Trail(float Duration); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.Server_EH_Trail // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void Server_EH_Slowdown(bool IsSticky); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.Server_EH_Slowdown // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void Server_EH_HOT(bool IsInRange); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.Server_EH_HOT // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void CloakStateChanged(bool cloakState); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.CloakStateChanged // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnEmptyHealth(struct UYHealthComponent* healthComponent, struct AActor* Instigator); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnEmptyHealth // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnEndProne(float HalfHeightAdjust, float ScaledHalfHeightAdjust); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnEndProne // (Event|Public|BlueprintEvent) // @ game+0x1e02480 void OnStartProne(float HalfHeightAdjust, float ScaledHalfHeightAdjust); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnStartProne // (Event|Public|BlueprintEvent) // @ game+0x1e02480 void UpdatePhysMaterials(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.UpdatePhysMaterials // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void BndEvt__m_deathComponent_K2Node_ComponentBoundEvent_5_OnDeathDelegate__DelegateSignature(struct UYCharacterDeathComponent* deathComponent); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.BndEvt__m_deathComponent_K2Node_ComponentBoundEvent_5_OnDeathDelegate__DelegateSignature // (BlueprintEvent) // @ game+0x1e02480 void OnPerkAdded(struct FYPerk perk); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnPerkAdded // (HasOutParms|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void HookUpReportingBugVisualization(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.HookUpReportingBugVisualization // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnPerkDeactivated(struct FYPerk perk); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnPerkDeactivated // (HasOutParms|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void BndEvt__m_damageComponent_K2Node_ComponentBoundEvent_1_YTakeDamageEvent__DelegateSignature(struct FYDealtDamageData Data); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.BndEvt__m_damageComponent_K2Node_ComponentBoundEvent_1_YTakeDamageEvent__DelegateSignature // (HasOutParms|BlueprintEvent) // @ game+0x1e02480 void OnFinishedDamage(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnFinishedDamage // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnVehicleEnter(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnVehicleEnter // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnVehicleExit(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnVehicleExit // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void BndEvt__m_stateComponent_K2Node_ComponentBoundEvent_8_YAnyStateChanged__DelegateSignature(enum class EYStateChangeType stateChangeType); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.BndEvt__m_stateComponent_K2Node_ComponentBoundEvent_8_YAnyStateChanged__DelegateSignature // (BlueprintEvent) // @ game+0x1e02480 void DBNO_Activate_Server(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.DBNO_Activate_Server // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void DBNO_Deactivate_Server(bool interupted); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.DBNO_Deactivate_Server // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void UpdateControllerYawRotation(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.UpdateControllerYawRotation // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void StarTrekEvac_FX_Start(float Duration); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.StarTrekEvac_FX_Start // (Net|NetMulticast|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void StarTrekEvac_FX_Stop(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.StarTrekEvac_FX_Stop // (Net|NetMulticast|BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void OnDeath_Implemented(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.OnDeath_Implemented // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void BndEvt__m_interactionComponent_K2Node_ComponentBoundEvent_3_OnPlayerInteractionStarted__DelegateSignature(enum class EYInteractionType interactionType, struct AYPlayerController_Match* interactingPlayer); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.BndEvt__m_interactionComponent_K2Node_ComponentBoundEvent_3_OnPlayerInteractionStarted__DelegateSignature // (BlueprintEvent) // @ game+0x1e02480 void BndEvt__m_characterCustomizationComponent_K2Node_ComponentBoundEvent_4_YOnMeshInitialized__DelegateSignature(); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.BndEvt__m_characterCustomizationComponent_K2Node_ComponentBoundEvent_4_YOnMeshInitialized__DelegateSignature // (BlueprintEvent) // @ game+0x1e02480 void BndEvt__m_armorComponent_K2Node_ComponentBoundEvent_2_YArmorComponentUpdatedSignature__DelegateSignature(struct UYArmorComponent* armorComponent); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.BndEvt__m_armorComponent_K2Node_ComponentBoundEvent_2_YArmorComponentUpdatedSignature__DelegateSignature // (BlueprintEvent) // @ game+0x1e02480 void BP_OnDeath_Event_1(struct UYCharacterDeathComponent* deathComponent); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.BP_OnDeath_Event_1 // (BlueprintCallable|BlueprintEvent) // @ game+0x1e02480 void ExecuteUbergraph_PRO_PlayerCharacter(int32_t EntryPoint); // Function PRO_PlayerCharacter.PRO_PlayerCharacter_C.ExecuteUbergraph_PRO_PlayerCharacter // (Final|UbergraphFunction|HasDefaults) // @ game+0x1e02480 };
[ "68745798+xkp95175333@users.noreply.github.com" ]
68745798+xkp95175333@users.noreply.github.com
d982dd43d5b4af36c08a4f37e4b1553183be2623
65969eb320c536e360abed38cfb15c34d4b2e586
/lee.c
80cd25a6825242bcf6ff21022062ad706cc3e1f3
[ "MIT" ]
permissive
essele/roLua
39a593d19a4f520bac72dfbde18821ef095e2c5b
b492912789cac58f4a25e053773e7fc24cb26c21
refs/heads/main
2023-03-20T09:44:06.246069
2021-03-10T17:47:55
2021-03-10T17:47:55
343,067,872
1
0
null
null
null
null
UTF-8
C
false
false
2,999
c
#include <lua.h> #include <lualib.h> #include <lauxlib.h> #include <lapi.h> #include <lstate.h> #include <lobject.h> #include <lgc.h> #include <stdlib.h> #include <string.h> #include <malloc/malloc.h> #include <lstring.h> static void *lee_alloc (void *ud, void *ptr, size_t osize, size_t nsize) { static size_t running_total = 0; (void)ud; (void)osize; /* not used */ if (nsize == 0) { size_t sz = malloc_size(ptr); running_total -= sz; fprintf(stderr, "freel called on %p (size=%zu) tot=%zu\n", ptr, sz, running_total); free(ptr); return NULL; } else { size_t sz = 0; if (ptr != 0) { sz = malloc_size(ptr); running_total -= sz; } running_total += nsize; fprintf(stderr, "realloc called on %p (%zu -> %zu) tot=%zu\n", ptr, sz, nsize, running_total); return realloc(ptr, nsize); } } int main(int argc, char ** argv) { lua_State *L = lua_newstate(lee_alloc, NULL); fprintf(stderr, " ---- AFTER NEWSTATE ------\n"); TString *s = luaS_new(L, "goto"); uint8_t *p = (uint8_t *)s; fprintf(stderr, "DUMP(%p) ", p); for (int i=0; i < sizeof(TString)+4; i++) { fprintf(stderr, "%02x ", *(p+i)); } fprintf(stderr, "\n"); fprintf(stderr, "%08x\n", s->hash); // exit(0); luaL_openlibs(L); fprintf(stderr, " ---- AFTER OPENLIBS ------\n"); // Push the pointer to function // lua_pushcfunction(L, multiplication); // Get the value on top of the stack // and set as a global, in this case is the function // lua_setglobal(L, "mul"); // Our Lua code, it simply prints a Hello, World message char * code = // "print(collectgarbage('count'));" // "collectgarbage('collect');" // "print(collectgarbage('count'));" // "x=mul(7,8);print(x);f={};f.a=1;f.b=2;print(f.a); print(x.joe);" // "f={};f.a=1;f.b=2;" // "print(f.a);" "for i=1,10 do print('hello') end;" "print(math.pi);" "print(math.floor(4.567));" // "x=nil; f=nil;" // "collectgarbage('collect');" // "print(collectgarbage('count'));" "collectgarbage('collect');" "print(collectgarbage('count'));" "print(math.huge);" "print(math.maxinteger);" "print(string);" "print(string.upper);" "print(string.upper('Lee Essen'));" "print(_VERSION);" "print(_G);" ; // Here we load the string and use lua_pcall for run the code fprintf(stderr, " ---- BEFORE LOADSTRING ------\n"); if (luaL_loadstring(L, code) == LUA_OK) { fprintf(stderr, " ---- AFTER LOADSTRING ------\n"); if (lua_pcall(L, 0, 1, 0) == LUA_OK) { // If it was executed successfuly we // remove the code from the stack lua_pop(L, lua_gettop(L)); } } lua_close(L); return 0; }
[ "lee.essen@nowonline.co.uk" ]
lee.essen@nowonline.co.uk
8287a754ebf817ff095a5f39f9d02ec7ff6d239c
c21f66903f03b92c7de9afb75064cb8d42e4c8c5
/Computer Networks Lab: CS15206/Pattern/client.c
371f2a53cbbb37361d69eb0391e5e687d5b4d8c2
[]
no_license
vivek2188/Study
fa1f001eb9fffc6591310d2c6c801ea4e214f1c8
eae76f8046d59baba68783b3bf3ae276ac6ee412
refs/heads/master
2022-12-15T10:10:57.604309
2019-07-05T23:12:33
2019-07-05T23:12:33
130,736,284
0
1
null
2022-12-07T23:29:54
2018-04-23T18:00:03
Jupyter Notebook
UTF-8
C
false
false
1,100
c
// Client side code #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> int main(void){ int csock; unsigned int len; struct sockaddr_in client; csock = socket(AF_INET,SOCK_STREAM,0); if(csock==-1){ perror("Socket not created\n"); return 1; } client.sin_family = AF_INET; client.sin_port = htons(10000); client.sin_addr.s_addr = INADDR_ANY; bzero(&client.sin_zero,0); len = sizeof(struct sockaddr_in); if(connect(csock,(struct sockaddr *)&client,len)==-1){ perror("Connection failed\n"); return 1; } int k; // Input variables int ch = 1; while(1){ printf("Enter number: "); scanf("%d",&k); send(csock,&k,sizeof(k),0); int n = k * (2*k-1); char ptr[n]; recv(csock,ptr,sizeof(char)*n,0); for(int i=0;i<k;i++){ for(int j=0;j<2*k-1-i;j++) printf("%c",ptr[i*(2*k-1)+j]);; printf("\n"); } printf("Continue? "); scanf("%d",&ch); if(ch!=1){ close(csock); return 0; } } close(csock); return 0; }
[ "tiwarivivekraj17@gmail.com" ]
tiwarivivekraj17@gmail.com
d72ff3d4ec3ada9988c95d4136098e7c4acf8f6a
3d18a6d10c097db154f96107079e025170442541
/FinalProject/Sources/led_thread.c
a7b4ec20bc74f7eea8f9dc84a9734599a6c33641
[]
no_license
Snazzythat/ecse69_final_project
cc0a7cb9e23fb28c7c837048382b3a597e931815
807a0c53c570a916ca75215b5f166f9009b7c596
refs/heads/master
2020-06-19T17:17:46.620430
2016-12-01T04:47:32
2016-12-01T04:47:32
74,845,506
0
1
null
null
null
null
UTF-8
C
false
false
1,113
c
//////////////////////////////////////////////////////////////////////////////// // File Name : led_thread.c // Description : program entry // Author : Team 12 // Date : Nov 1st, 2016 //////////////////////////////////////////////////////////////////////////////// // Includes #include "main.h" // Globals osThreadId led_thread_ID; osThreadDef(led_thread, osPriorityNormal, 1,0); /* ** Brief: Starts the LED thread in the OS (from Inactive into the Lifecycle) ** Params: A void pointer to initial arguments, NULL if unused ** Return: None */ void led_thread_init(void *args) { led_thread_ID = osThreadCreate(osThread(led_thread), args); } /* ** Brief: The LED thread function in the OS ** Waits for a signal from the TIM interrupt handler and then ** toggles the on board LEDs ** Params: A void pointer to initial arguments, NULL if unused ** Return: None */ void led_thread(void const *args) { while(1) { osSignalWait(0x00000001, osWaitForever); HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15); } }
[ "yinghan307@gmail.com" ]
yinghan307@gmail.com
3794c2c92e553b27a530f0276dbe213eb9ec7733
0fedaa9e1fd650888f12dd49ef34ead7785ea643
/SRC/applications/BSP_Init.c
8bf3b4e126ea2b81761313a7f54d184b409fa5af
[]
no_license
leomoons/FC_ANO
e6f0ce30289981f7af30ed101d79159bbba7d1de
5207dd2d8eaabe96b9a4cb1be7944ed2a5fdf8cc
refs/heads/main
2023-04-01T04:13:02.185196
2021-04-07T06:02:50
2021-04-07T06:02:50
324,680,992
0
0
null
null
null
null
UTF-8
C
false
false
3,252
c
/******************** (C) COPYRIGHT 2017 ANO Tech ******************************** * 作者 :匿名科创 * 官网 :www.anotc.com * 淘宝 :anotc.taobao.com * 技术Q群 :190169595 * 描述 :飞控初始化 **********************************************************************************/ #include "include.h" #include "Drv_pwm_out.h" #include "Drv_led.h" #include "Drv_spi.h" #include "Drv_icm20602.h" #include "drv_ak8975.h" #include "drv_spl06.h" #include "Drv_w25qxx.h" #include "Drv_i2c_soft.h" #include "Drv_laser.h" #include "Ano_FlightCtrl.h" #include "Drv_adc.h" #include "Drv_heating.h" #include "Ano_RC.h" #include "Ano_Sensor_Basic.h" #include "Drv_UP_Flow.h" #include "param.h" #include "controller.h" #include "motor.h" #include "Ano_DTv7.h" u8 of_init_type; u8 All_Init() { NVIC_PriorityGroupConfig(NVIC_GROUP); //中断优先级组别设置 SysTick_Configuration(); //滴答时钟 Delay_ms(100); //延时 Drv_LED_Init(); //LED功能初始化 Flash_Init(); //板载FLASH芯片驱动初始化 Para_Data_Init(); //参数数据初始化 ParamInit(); // 控制器和扰估计参数初始化 Remote_Control_Init(); PWM_Out_Init(); //初始化电调输出功能 Delay_ms(100); //延时 Drv_SPI2_init(); //spi_2初始化,用于读取飞控板上所有传感器,都用SPI读取 Drv_Icm20602CSPin_Init(); //spi片选初始化 Drv_AK8975CSPin_Init(); //spi片选初始化 Drv_SPL06CSPin_Init(); //spi片选初始化 sens_hd_check.gyro_ok = sens_hd_check.acc_ok = Drv_Icm20602Reg_Init(); //icm陀螺仪加速度计初始化,若初始化成功,则将陀螺仪和加速度的初始化成功标志位赋值 sens_hd_check.mag_ok = 1; //标记罗盘OK sens_hd_check.baro_ok = Drv_Spl0601_Init(); //气压计初始化 Usb_Hid_Init(); //飞控usb接口的hid初始化 Delay_ms(100); //延时 ANO_DT_Init(); Usart2_Init(115200); //串口2初始化,函数参数为波特率 Delay_ms(10); //延时 // Uart4_Init(115200); //首先判断是否连接的是激光模块 // if(!Drv_Laser_Init()) //激光没有有效连接,则配置为光流模式 // Uart4_Init(500000); // Delay_ms(10); //延时 Usart3_Init(115200); //用于和ros端通信 // Delay_ms(10); //延时 // Uart4_Init(19200); //接优像光流 Uart5_Init(115200);//接大功率激光 // MyDelayMs(200); //优像光流初始化 of_init_type = (Drv_OFInit()==0)?0:2; if(of_init_type==2)//优像光流初始化成功 { //大功率激光初始化 Drv_Laser_Init(); } else if(of_init_type==0)//优像光流初始化失败 { Uart4_Init(500000); //接匿名光流 } // Drv_AdcInit(); Delay_ms(100); //延时 All_PID_Init(); //PID初始化 //////////// Drv_GpsPin_Init(); //GPS初始化 串口1 Delay_ms(50); //延时 Drv_HeatingInit(); // Drv_HeatingSet(5); // Sensor_Basic_Init(); // 主控制器初始化 ControllerInit(); // 电调PWM输出初始化 MotorInit(); // ANO_DT_SendString("SYS init OK!"); return (1); } /******************* (C) COPYRIGHT 2014 ANO TECH *****END OF FILE************/
[ "liyuanhao@zju.edu.cn" ]
liyuanhao@zju.edu.cn
c6c3bdfecdb996c5a631181b252045ec0128fe41
d317c415b8eda9b2f3d2723e52a669daabc4bb7c
/test/bi_test1.c
9b80d601d8f5a5fadb4187d23c6c5b366869c4d4
[]
no_license
liuguangxi/pe
73fcf8c3ed0d0af2bc6a2555ed7a7561d91565d6
0a1ff3535dbef5856fda3f916011eb3c720c9b2a
refs/heads/master
2022-12-17T07:49:49.424409
2020-09-23T18:23:22
2020-09-23T18:23:22
298,725,253
1
0
null
2020-09-26T02:55:36
2020-09-26T02:55:35
null
UTF-8
C
false
false
4,305
c
#include "pe_test.h" namespace bi_test { SL void bi_test_small() { for (int i = -100; i <= 100; ++i) for (int j = -100; j <= 100; ++j) { bi a(i), b(j); assert(i + j == a + b); assert(i - j == a - b); assert(i * j == a * b); if (j != 0) { assert(i / j == a / b); assert(i % j == a % b); } if (i >= 0 && j >= 0) { assert((i & j) == (a & b)); assert((i ^ j) == (a ^ b)); assert((i | j) == (a | b)); } assert((i > j) == (bool)(a > b)); assert((i < j) == (bool)(a < b)); assert((i == j) == (bool)(a == b)); assert((i >= j) == (bool)(a >= b)); assert((i <= j) == (bool)(a <= b)); } } PE_REGISTER_TEST(&bi_test_small, "bi_test_small", SMALL); #if ENABLE_GMP SL void bi_mul_test_impl(int x, int y) { for (int s1 = -1; s1 <= 1; ++s1) for (int s2 = -1; s2 <= 1; ++s2) for (int id = 0; id < x; ++id) { std::vector<int> A, B; for (int i = 0; i < y; ++i) { A.push_back(rand()); B.push_back(rand()); } string expectedResult; { mpz_class a = s1; mpz_class b = s2; for (auto& iter : A) a *= iter; for (auto& iter : B) b *= iter; mpz_class c = a * b; stringstream ss; ss << c; ss >> expectedResult; } string myResult; { bi a = s1; bi b = s2; for (auto& iter : A) a *= iter; for (auto& iter : B) b *= iter; bi c = a * b; stringstream ss; ss << c; ss >> myResult; } assert(expectedResult == myResult); } } SL void bi_mul_test_medium() { bi_mul_test_impl(1000, 500); } PE_REGISTER_TEST(&bi_mul_test_medium, "bi_mul_test_medium", MEDIUM); SL void bi_mul_test_big() { bi_mul_test_impl(10, 10000); } #if !defined(CONTINUOUS_INTEGRATION_TEST) PE_REGISTER_TEST(&bi_mul_test_big, "bi_mul_test_big", BIG); #endif SL void bi_div_test_medium_impl(int x, int y) { for (int strategy = 0; strategy < 2; ++strategy) for (int s1 = -1; s1 <= 1; ++s1) for (int s2 = -1; s2 <= 1; ++s2) if (s2 != 0) for (int id = 0; id < x; ++id) { std::vector<int> A, B; if (strategy == 0) { for (int i = 0; i < y; ++i) { int t = rand() + 1; A.push_back(t); if (i & 1) { B.push_back(t); } } } else { for (int i = 0; i < y; ++i) { A.push_back(rand() + 1); if (i & 1) { B.push_back(rand() + 1); } } } string expectedResult1; string expectedResult2; { mpz_class a = s1; mpz_class b = s2; for (auto& iter : A) a *= iter; for (auto& iter : B) b *= iter; mpz_class c = a / b; mpz_class d = a % b; stringstream ss; ss << c; ss >> expectedResult1; ss << d; ss >> expectedResult2; } string myResult1; string myResult2; { bi a = s1; bi b = s2; for (auto& iter : A) a *= iter; for (auto& iter : B) b *= iter; bi c, d; tie(c, d) = div(a, b); stringstream ss; ss << c; ss >> myResult1; ss << d; ss >> myResult2; } assert(expectedResult1 == myResult1); assert(expectedResult2 == myResult2); } } SL void bi_div_test_medium() { bi_div_test_medium_impl(100, 500); } #if !defined(CONTINUOUS_INTEGRATION_TEST) PE_REGISTER_TEST(&bi_div_test_medium, "bi_div_test_medium", MEDIUM); #endif SL void bi_div_test_big() { bi_div_test_medium_impl(10, 2000); } #if !defined(CONTINUOUS_INTEGRATION_TEST) PE_REGISTER_TEST(&bi_div_test_big, "bi_div_test_big", BIG); #endif #endif } // namespace bi_test
[ "bailiangsky@gmail.com" ]
bailiangsky@gmail.com
add120d8f2e1eda49b0065e6f0ff8ce705bae703
0e69e11163419b8ab50c60a9e4156034ed377365
/Graphs/bfs.c
11058ad1f139fc3501d377d3d03532e9c81d4694
[]
no_license
CodHeK/BaseCodes
c8ad9ab27a7f3cdf7bdecc169c6e5bea9bbc7cf3
db9087f6b8190b6b3542962791917d61ca8a79eb
refs/heads/master
2021-01-01T13:35:46.522868
2018-06-08T07:29:01
2018-06-08T07:29:01
97,582,587
0
0
null
null
null
null
UTF-8
C
false
false
273
c
void bfs(int v) { insert(v); state[v] = waiting while(!not_empty()) { delete(v); print(v); state[v] = visited; for(j=0;j<n;j++) { if(state[j] == initial && graph[v][j] == 1) { insert(j); state[j] = waiting; } } } }
[ "gaganganapathyas@yahoo.in" ]
gaganganapathyas@yahoo.in
db61a73a94750946a32fa8812887d06c1a30a7e4
75859787b3eb1fc054b5df82c26bc261421d47e0
/3rdparty/genFiles/RSRP-RangeSL-r12.c
1037dd467dcedec3ad2ad30aa7e7b0c275e4af33
[]
no_license
aa7133/RRC
e118b3d769abff4b0b42d7511530f7b1cc29d09e
955c1ceadebf97d21306f3c083b5f38a24838da4
refs/heads/master
2020-12-10T10:45:56.892861
2020-01-26T13:02:20
2020-01-26T13:02:20
233,563,734
0
1
null
null
null
null
UTF-8
C
false
false
1,767
c
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "EUTRA-RRC-Definitions" * found in "../asnFiles/36331-f60-ASNfunctions.asn" * `asn1c -fcompound-names -findirect-choice -fincludes-quoted -fno-include-deps -gen-PER -no-gen-OER -D.` */ #include "RSRP-RangeSL-r12.h" int RSRP_RangeSL_r12_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 13)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ asn_per_constraints_t asn_PER_type_RSRP_RangeSL_r12_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 4, 4, 0, 13 } /* (0..13) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_RSRP_RangeSL_r12_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_RSRP_RangeSL_r12 = { "RSRP-RangeSL-r12", "RSRP-RangeSL-r12", &asn_OP_NativeInteger, asn_DEF_RSRP_RangeSL_r12_tags_1, sizeof(asn_DEF_RSRP_RangeSL_r12_tags_1) /sizeof(asn_DEF_RSRP_RangeSL_r12_tags_1[0]), /* 1 */ asn_DEF_RSRP_RangeSL_r12_tags_1, /* Same as above */ sizeof(asn_DEF_RSRP_RangeSL_r12_tags_1) /sizeof(asn_DEF_RSRP_RangeSL_r12_tags_1[0]), /* 1 */ { 0, &asn_PER_type_RSRP_RangeSL_r12_constr_1, RSRP_RangeSL_r12_constraint }, 0, 0, /* No members */ 0 /* No specifics */ };
[ "aa7133@att.com" ]
aa7133@att.com
9f2645903d93c6b9e39fbc1e9b4094496f66a432
acd52f69773265a8e46f1c07f5868cdb29b49fdd
/C/15-04/10.h
ab55daa8624b6038666f300686e00f2f0bbab40d
[ "Unlicense" ]
permissive
Numb4r/LPCI
0ebac7d2586c6e55f267aafc9da1b8499285a862
2959863bba81ae67b90c1067f73d039f5fc89e68
refs/heads/master
2020-04-27T18:00:45.747735
2019-08-24T02:53:50
2019-08-24T02:53:50
null
0
0
null
null
null
null
UTF-8
C
false
false
140
h
int perimetro_retangulo(int lado1,int lado2){ return(2*lado1+2*lado2); } int area_retangulo(int lado1,int lado2){ return lado1*lado2; }
[ "yuri.d.d.faria@gmail.com" ]
yuri.d.d.faria@gmail.com
5615d1cc69744580b5bcb0019a2a5f34931c71ba
17c87e23e01e074c684619ff0e56706b407f0b23
/omi-1.0.8/pal/sem.h
37bac3318770a130e9e15e9e1786f23beaf6769d
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
HuaweiSwitch/OMI
8856be28d0dbe22650dc70635e2749a908802c7d
bca42b3388f0e97d21fd1e872a949fa4032adbff
refs/heads/master
2021-01-10T17:51:50.818745
2016-03-31T09:15:47
2016-03-31T09:16:07
55,116,218
2
1
null
null
null
null
UTF-8
C
false
false
4,975
h
/* **============================================================================== ** ** Open Management Infrastructure (OMI) ** ** Copyright (c) Microsoft Corporation ** ** Licensed under the Apache License, Version 2.0 (the "License"); you may not ** use this file except in compliance with the License. You may obtain a copy ** of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED ** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, ** MERCHANTABLITY OR NON-INFRINGEMENT. ** ** See the Apache 2 License for the specific language governing permissions ** and limitations under the License. ** **============================================================================== */ #ifndef _pal_sem_h #define _pal_sem_h #include <nits/base/nits.h> #if defined(PAL_HAVE_POSIX) # include <fcntl.h> # include <sys/stat.h> # include <semaphore.h> # include <time.h> #endif PAL_BEGIN_EXTERNC /* **============================================================================== ** ** Sem - semaphore ** **============================================================================== */ typedef struct _Sem { #if defined(_MSC_VER) HANDLE handle; #else sem_t* sem; #endif } Sem; typedef enum _SemUserAccess { SEM_USER_ACCESS_DEFAULT = 1, SEM_USER_ACCESS_ALLOW_ALL = 2 } SemUserAccess; _Success_(return == 0) int Sem_Init_Injected( _Out_ Sem* self, SemUserAccess userAccess, unsigned int count, NitsCallSite cs); #define Sem_Init(self, userAccess, count) Sem_Init_Injected(self, userAccess, count, NitsHere()) PAL_INLINE void Sem_Destroy( _Inout_ Sem* self) { #if defined(_MSC_VER) CloseHandle(self->handle); #else if (self->sem) { sem_close(self->sem); PAL_Free(self->sem); self->sem = NULL; } #endif } PAL_INLINE int Sem_Wait( _Inout_ Sem* self) { #if defined(_MSC_VER) return WaitForSingleObject(self->handle, INFINITE) == WAIT_OBJECT_0 ? 0 : -1; #else return sem_wait(self->sem) == 0 ? 0 : -1; #endif } #if !defined(CONFIG_HAVE_SEM_TIMEDWAIT) #include <errno.h> #include <pal/sleep.h> int __TimedWaitHelper(sem_t* sem, int milliseconds); #endif PAL_INLINE int Sem_TimedWait( _Inout_ Sem* self, int milliseconds) { #if defined(_MSC_VER) return WaitForSingleObject(self->handle, milliseconds) == WAIT_OBJECT_0 ? 0 : -1; #elif defined(CONFIG_HAVE_SEM_TIMEDWAIT) struct timespec temp = { time(0) + milliseconds / 1000, milliseconds % 1000 * 1000000 }; return sem_timedwait(self->sem, &temp) == 0 ? 0 : -1; #else return __TimedWaitHelper(self->sem, milliseconds); #endif } int Sem_Post( _Inout_ Sem* self, unsigned int count); /* **============================================================================== ** ** NamedSem - named semaphore ** **============================================================================== */ #define NAMEDSEM_FLAG_CREATE 1 #define NAMEDSEM_FLAG_EXCLUSIVE 2 typedef struct _NamedSem { #if defined(_MSC_VER) HANDLE handle; #else sem_t* sem; char semname[PAL_MAX_PATH_SIZE]; #endif } NamedSem; _Return_type_success_(return == 0) int NamedSem_Open_Injected( _Out_ NamedSem* self, SemUserAccess userAccess, unsigned int count, _In_z_ const PAL_Char *name, unsigned long flags, NitsCallSite cs); #define NamedSem_Open(self, userAccess, count, name, flags) NamedSem_Open_Injected(self, userAccess, count, name, flags, NitsHere()) void NamedSem_Close( _Inout_ NamedSem* self); PAL_INLINE int NamedSem_Wait( _Inout_ NamedSem* self) { #if defined(_MSC_VER) return WaitForSingleObject(self->handle, INFINITE) == WAIT_OBJECT_0 ? 0 : -1; #else return sem_wait(self->sem) == 0 ? 0 : -1; #endif } /* * To be called when the semaphore is no longer needed by any user of the semaphore */ PAL_INLINE void NamedSem_Destroy( _Inout_ NamedSem* self) { #if defined(_MSC_VER) #else sem_unlink(self->semname); #endif } PAL_INLINE int NamedSem_TimedWait( _Inout_ NamedSem* self, int milliseconds) { #if defined(_MSC_VER) return WaitForSingleObject(self->handle, milliseconds) == WAIT_OBJECT_0 ? 0 : -1; #elif defined(CONFIG_HAVE_SEM_TIMEDWAIT) struct timespec temp = { time(0) + milliseconds / 1000, milliseconds % 1000 * 1000000 }; return sem_timedwait(self->sem, &temp) == 0 ? 0 : -1; #else return __TimedWaitHelper(self->sem, milliseconds); #endif } int NamedSem_Post( _Inout_ NamedSem* self, unsigned int count); PAL_INLINE int NamedSem_GetValue( _Inout_ NamedSem* self, _Out_ int *value) { #if defined(_MSC_VER) *value = 0; return 0; #else return sem_getvalue(self->sem, value) == 0 ? 0 : -1; #endif } PAL_END_EXTERNC #endif /* _pal_sem_h */
[ "mao58398297" ]
mao58398297
1894214a6f22b1cba984c233f2199ca1cbab8f7d
ab9d533323fedd5f2207f37799361c8f898f4801
/SourceCode/C/day081.c
d61e4f0f8b381e396615471f15e9959e43a80720
[]
no_license
siralomarahmed/100DaysOfCode
f5165de3ca8dceed971af49d27fb148a24b247b8
052976baf7851ba561901064c43a0477bbcce642
refs/heads/master
2020-07-27T13:16:29.719583
2020-06-09T12:39:43
2020-06-09T12:39:43
209,101,987
0
4
null
null
null
null
UTF-8
C
false
false
635
c
/* Author: Ahmed A. M. ALOMAR Date: March 21 - 2020 Description: This program is an example of a program that is going to display value and addresses of pointer. */ #include <stdio.h> #include <stdlib.h> #include <stddef.h> int main(void) { int variable_name = 150; int *pointer_name = NULL; pointer_name = &variable_name; printf("The variable name address is: %p \n", &variable_name); printf("The address of the pointer name is: %p \n", &pointer_name); printf("The value of the pointer name is: %p \n", pointer_name); printf("The value of what pointer name is pointing to is: %d \n", *pointer_name); return 0; }
[ "ahmedamalomar@hotmail.com" ]
ahmedamalomar@hotmail.com
cb5d342c2720de427b01970d97981f1231b257a8
f27e3cb90a6bb97c48b92b626fcc2825871d91a7
/0000_base_learn/linux-sys.zh.pdf_learn/process/013_init_daemon/test.c
fe90b4dacf113cdd3e4f2b17e291a59585db4280
[]
no_license
flxshujie799056897/jiuyinzhenjing
0ecf161f9a7f6df86c78a69a60f5c9b8f5134798
caedf00ba6c80cb38996da2bae72d60597e0c202
refs/heads/master
2022-01-12T06:50:27.759963
2019-05-27T13:55:10
2019-05-27T13:55:10
null
0
0
null
null
null
null
UTF-8
C
false
false
1,209
c
#include<stdio.h> #include<stdlib.h> #include<pthread.h> int init_daemon(void){ pid_t pid; umask(0);//4 /* clear file mode creation mask */ /* parent exits , child continues */ if((pid = fork()) < 0){//1 printf("error fork()"); return -1; } else if(pid != 0){ printf("error != 0");//正确的分支 exit(0); } setsid();//2 /* become session leader */ /* if(chdir("/")<0){ //3 exit(1); } */ close(1);//5 //close(0); return 0; } int main(){ printf("begin\n"); if(init_daemon() == -1){ exit(0); } while(1){ sleep(1); } printf("end\n"); return 0; } /* 1. 创建子进程,父进程退出 所有工作在子进程中进行 形式上脱离了控制终端 2. 在子进程中创建新会话 setsid()函数 使子进程完全独立出来,脱离控制 3. 改变当前目录为根目录 chdir()函数 防止占用可卸载的文件系统 也可以换成其它路径 4. 重设文件权限掩码 umask()函数 防止继承的文件创建屏蔽字拒绝某些权限 增加守护进程灵活性 5. 关闭文件描述符 继承的打开文件不会用到,浪费系统资源,无法卸载 6. 开始执行守护进程核心工作 7. 守护进程退出处理 */
[ "847479962@qq.com" ]
847479962@qq.com
6492c0a493cd5dac7cdc841ccd7b36ea2bd73af5
58dec800343af173deaa707a858526bbf4cc2570
/src/create_dir_wrappers.c
a72fa363b1e11c9cd4c28ed2a015837c360ecc3a
[]
no_license
JustusAdam/idris-posix
ed9f36bdecd0e010b5b20976d90ce07b3bd58e88
d4d8e917b5feb7c23a877e404343df7d72b714bc
refs/heads/master
2021-08-14T20:13:14.334384
2017-11-16T17:32:29
2017-11-16T17:35:26
110,988,221
0
0
null
2017-11-16T15:27:13
2017-11-16T15:27:12
null
UTF-8
C
false
false
242
c
#include <sys/stat.h> int idris_create_dir(const char* filename) { // For now we simply assign all the permissions // More fine grained control may be subject of future work return mkdir(filename, S_IRWXO | S_IRWXG | S_IRWXU); }
[ "dev@justus.science" ]
dev@justus.science
ad3b0e0a14086f960cb07c404e3e2d1b215a5e61
253dc4e0b1ee631e248021b8c80386add36d4128
/src/microkernel/src/mbedtls/bn_mul.h
d5cf1c4f2dbb11e83d8e57c78435f74b4a7bb3b6
[]
no_license
wesley-hk/EZIOT-SDK
440265b41247b4d95060a4e84ba30f9edf009ea6
f1dbabd3fa522e556945559e08afcb32dcbd2b0a
refs/heads/master
2023-08-27T20:43:08.378170
2021-11-08T10:55:06
2021-11-08T10:55:06
null
0
0
null
null
null
null
UTF-8
C
false
false
35,286
h
/** * \file bn_mul.h * * \brief Multi-precision integer library * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ /* * Multiply source vector [s] with b, add result * to destination vector [d] and set carry c. * * Currently supports: * * . IA-32 (386+) . AMD64 / EM64T * . IA-32 (SSE2) . Motorola 68000 * . PowerPC, 32-bit . MicroBlaze * . PowerPC, 64-bit . TriCore * . SPARC v8 . ARM v3+ * . Alpha . MIPS32 * . C, longlong . C, generic */ #ifndef BSCOMPTLS_BN_MUL_H #define BSCOMPTLS_BN_MUL_H #include "bignum.h" #if defined(BSCOMPTLS_HAVE_ASM) #ifndef asm #define asm __asm #endif /* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */ #if defined(__GNUC__) && \ ( !defined(__ARMCC_VERSION) || __ARMCC_VERSION >= 6000000 ) #if defined(__i386__) #define MULADDC_INIT \ asm( \ "movl %%ebx, %0 \n\t" \ "movl %5, %%esi \n\t" \ "movl %6, %%edi \n\t" \ "movl %7, %%ecx \n\t" \ "movl %8, %%ebx \n\t" #define MULADDC_CORE \ "lodsl \n\t" \ "mull %%ebx \n\t" \ "addl %%ecx, %%eax \n\t" \ "adcl $0, %%edx \n\t" \ "addl (%%edi), %%eax \n\t" \ "adcl $0, %%edx \n\t" \ "movl %%edx, %%ecx \n\t" \ "stosl \n\t" #if defined(BSCOMPTLS_HAVE_SSE2) #define MULADDC_HUIT \ "movd %%ecx, %%mm1 \n\t" \ "movd %%ebx, %%mm0 \n\t" \ "movd (%%edi), %%mm3 \n\t" \ "paddq %%mm3, %%mm1 \n\t" \ "movd (%%esi), %%mm2 \n\t" \ "pmuludq %%mm0, %%mm2 \n\t" \ "movd 4(%%esi), %%mm4 \n\t" \ "pmuludq %%mm0, %%mm4 \n\t" \ "movd 8(%%esi), %%mm6 \n\t" \ "pmuludq %%mm0, %%mm6 \n\t" \ "movd 12(%%esi), %%mm7 \n\t" \ "pmuludq %%mm0, %%mm7 \n\t" \ "paddq %%mm2, %%mm1 \n\t" \ "movd 4(%%edi), %%mm3 \n\t" \ "paddq %%mm4, %%mm3 \n\t" \ "movd 8(%%edi), %%mm5 \n\t" \ "paddq %%mm6, %%mm5 \n\t" \ "movd 12(%%edi), %%mm4 \n\t" \ "paddq %%mm4, %%mm7 \n\t" \ "movd %%mm1, (%%edi) \n\t" \ "movd 16(%%esi), %%mm2 \n\t" \ "pmuludq %%mm0, %%mm2 \n\t" \ "psrlq $32, %%mm1 \n\t" \ "movd 20(%%esi), %%mm4 \n\t" \ "pmuludq %%mm0, %%mm4 \n\t" \ "paddq %%mm3, %%mm1 \n\t" \ "movd 24(%%esi), %%mm6 \n\t" \ "pmuludq %%mm0, %%mm6 \n\t" \ "movd %%mm1, 4(%%edi) \n\t" \ "psrlq $32, %%mm1 \n\t" \ "movd 28(%%esi), %%mm3 \n\t" \ "pmuludq %%mm0, %%mm3 \n\t" \ "paddq %%mm5, %%mm1 \n\t" \ "movd 16(%%edi), %%mm5 \n\t" \ "paddq %%mm5, %%mm2 \n\t" \ "movd %%mm1, 8(%%edi) \n\t" \ "psrlq $32, %%mm1 \n\t" \ "paddq %%mm7, %%mm1 \n\t" \ "movd 20(%%edi), %%mm5 \n\t" \ "paddq %%mm5, %%mm4 \n\t" \ "movd %%mm1, 12(%%edi) \n\t" \ "psrlq $32, %%mm1 \n\t" \ "paddq %%mm2, %%mm1 \n\t" \ "movd 24(%%edi), %%mm5 \n\t" \ "paddq %%mm5, %%mm6 \n\t" \ "movd %%mm1, 16(%%edi) \n\t" \ "psrlq $32, %%mm1 \n\t" \ "paddq %%mm4, %%mm1 \n\t" \ "movd 28(%%edi), %%mm5 \n\t" \ "paddq %%mm5, %%mm3 \n\t" \ "movd %%mm1, 20(%%edi) \n\t" \ "psrlq $32, %%mm1 \n\t" \ "paddq %%mm6, %%mm1 \n\t" \ "movd %%mm1, 24(%%edi) \n\t" \ "psrlq $32, %%mm1 \n\t" \ "paddq %%mm3, %%mm1 \n\t" \ "movd %%mm1, 28(%%edi) \n\t" \ "addl $32, %%edi \n\t" \ "addl $32, %%esi \n\t" \ "psrlq $32, %%mm1 \n\t" \ "movd %%mm1, %%ecx \n\t" #define MULADDC_STOP \ "emms \n\t" \ "movl %4, %%ebx \n\t" \ "movl %%ecx, %1 \n\t" \ "movl %%edi, %2 \n\t" \ "movl %%esi, %3 \n\t" \ : "=m" (t), "=m" (c), "=m" (d), "=m" (s) \ : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b) \ : "eax", "ecx", "edx", "esi", "edi" \ ); #else #define MULADDC_STOP \ "movl %4, %%ebx \n\t" \ "movl %%ecx, %1 \n\t" \ "movl %%edi, %2 \n\t" \ "movl %%esi, %3 \n\t" \ : "=m" (t), "=m" (c), "=m" (d), "=m" (s) \ : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b) \ : "eax", "ecx", "edx", "esi", "edi" \ ); #endif /* SSE2 */ #endif /* i386 */ #if defined(__amd64__) || defined (__x86_64__) #define MULADDC_INIT \ asm( \ "xorq %%r8, %%r8 \n\t" #define MULADDC_CORE \ "movq (%%rsi), %%rax \n\t" \ "mulq %%rbx \n\t" \ "addq $8, %%rsi \n\t" \ "addq %%rcx, %%rax \n\t" \ "movq %%r8, %%rcx \n\t" \ "adcq $0, %%rdx \n\t" \ "nop \n\t" \ "addq %%rax, (%%rdi) \n\t" \ "adcq %%rdx, %%rcx \n\t" \ "addq $8, %%rdi \n\t" #define MULADDC_STOP \ : "+c" (c), "+D" (d), "+S" (s) \ : "b" (b) \ : "rax", "rdx", "r8" \ ); #endif /* AMD64 */ #if defined(__mc68020__) || defined(__mcpu32__) #define MULADDC_INIT \ asm( \ "movl %3, %%a2 \n\t" \ "movl %4, %%a3 \n\t" \ "movl %5, %%d3 \n\t" \ "movl %6, %%d2 \n\t" \ "moveq #0, %%d0 \n\t" #define MULADDC_CORE \ "movel %%a2@+, %%d1 \n\t" \ "mulul %%d2, %%d4:%%d1 \n\t" \ "addl %%d3, %%d1 \n\t" \ "addxl %%d0, %%d4 \n\t" \ "moveq #0, %%d3 \n\t" \ "addl %%d1, %%a3@+ \n\t" \ "addxl %%d4, %%d3 \n\t" #define MULADDC_STOP \ "movl %%d3, %0 \n\t" \ "movl %%a3, %1 \n\t" \ "movl %%a2, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "d0", "d1", "d2", "d3", "d4", "a2", "a3" \ ); #define MULADDC_HUIT \ "movel %%a2@+, %%d1 \n\t" \ "mulul %%d2, %%d4:%%d1 \n\t" \ "addxl %%d3, %%d1 \n\t" \ "addxl %%d0, %%d4 \n\t" \ "addl %%d1, %%a3@+ \n\t" \ "movel %%a2@+, %%d1 \n\t" \ "mulul %%d2, %%d3:%%d1 \n\t" \ "addxl %%d4, %%d1 \n\t" \ "addxl %%d0, %%d3 \n\t" \ "addl %%d1, %%a3@+ \n\t" \ "movel %%a2@+, %%d1 \n\t" \ "mulul %%d2, %%d4:%%d1 \n\t" \ "addxl %%d3, %%d1 \n\t" \ "addxl %%d0, %%d4 \n\t" \ "addl %%d1, %%a3@+ \n\t" \ "movel %%a2@+, %%d1 \n\t" \ "mulul %%d2, %%d3:%%d1 \n\t" \ "addxl %%d4, %%d1 \n\t" \ "addxl %%d0, %%d3 \n\t" \ "addl %%d1, %%a3@+ \n\t" \ "movel %%a2@+, %%d1 \n\t" \ "mulul %%d2, %%d4:%%d1 \n\t" \ "addxl %%d3, %%d1 \n\t" \ "addxl %%d0, %%d4 \n\t" \ "addl %%d1, %%a3@+ \n\t" \ "movel %%a2@+, %%d1 \n\t" \ "mulul %%d2, %%d3:%%d1 \n\t" \ "addxl %%d4, %%d1 \n\t" \ "addxl %%d0, %%d3 \n\t" \ "addl %%d1, %%a3@+ \n\t" \ "movel %%a2@+, %%d1 \n\t" \ "mulul %%d2, %%d4:%%d1 \n\t" \ "addxl %%d3, %%d1 \n\t" \ "addxl %%d0, %%d4 \n\t" \ "addl %%d1, %%a3@+ \n\t" \ "movel %%a2@+, %%d1 \n\t" \ "mulul %%d2, %%d3:%%d1 \n\t" \ "addxl %%d4, %%d1 \n\t" \ "addxl %%d0, %%d3 \n\t" \ "addl %%d1, %%a3@+ \n\t" \ "addxl %%d0, %%d3 \n\t" #endif /* MC68000 */ #if defined(__powerpc64__) || defined(__ppc64__) #if defined(__MACH__) && defined(__APPLE__) #define MULADDC_INIT \ asm( \ "ld r3, %3 \n\t" \ "ld r4, %4 \n\t" \ "ld r5, %5 \n\t" \ "ld r6, %6 \n\t" \ "addi r3, r3, -8 \n\t" \ "addi r4, r4, -8 \n\t" \ "addic r5, r5, 0 \n\t" #define MULADDC_CORE \ "ldu r7, 8(r3) \n\t" \ "mulld r8, r7, r6 \n\t" \ "mulhdu r9, r7, r6 \n\t" \ "adde r8, r8, r5 \n\t" \ "ld r7, 8(r4) \n\t" \ "addze r5, r9 \n\t" \ "addc r8, r8, r7 \n\t" \ "stdu r8, 8(r4) \n\t" #define MULADDC_STOP \ "addze r5, r5 \n\t" \ "addi r4, r4, 8 \n\t" \ "addi r3, r3, 8 \n\t" \ "std r5, %0 \n\t" \ "std r4, %1 \n\t" \ "std r3, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ ); #else /* __MACH__ && __APPLE__ */ #define MULADDC_INIT \ asm( \ "ld %%r3, %3 \n\t" \ "ld %%r4, %4 \n\t" \ "ld %%r5, %5 \n\t" \ "ld %%r6, %6 \n\t" \ "addi %%r3, %%r3, -8 \n\t" \ "addi %%r4, %%r4, -8 \n\t" \ "addic %%r5, %%r5, 0 \n\t" #define MULADDC_CORE \ "ldu %%r7, 8(%%r3) \n\t" \ "mulld %%r8, %%r7, %%r6 \n\t" \ "mulhdu %%r9, %%r7, %%r6 \n\t" \ "adde %%r8, %%r8, %%r5 \n\t" \ "ld %%r7, 8(%%r4) \n\t" \ "addze %%r5, %%r9 \n\t" \ "addc %%r8, %%r8, %%r7 \n\t" \ "stdu %%r8, 8(%%r4) \n\t" #define MULADDC_STOP \ "addze %%r5, %%r5 \n\t" \ "addi %%r4, %%r4, 8 \n\t" \ "addi %%r3, %%r3, 8 \n\t" \ "std %%r5, %0 \n\t" \ "std %%r4, %1 \n\t" \ "std %%r3, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ ); #endif /* __MACH__ && __APPLE__ */ #elif defined(__powerpc__) || defined(__ppc__) /* end PPC64/begin PPC32 */ #if defined(__MACH__) && defined(__APPLE__) #define MULADDC_INIT \ asm( \ "lwz r3, %3 \n\t" \ "lwz r4, %4 \n\t" \ "lwz r5, %5 \n\t" \ "lwz r6, %6 \n\t" \ "addi r3, r3, -4 \n\t" \ "addi r4, r4, -4 \n\t" \ "addic r5, r5, 0 \n\t" #define MULADDC_CORE \ "lwzu r7, 4(r3) \n\t" \ "mullw r8, r7, r6 \n\t" \ "mulhwu r9, r7, r6 \n\t" \ "adde r8, r8, r5 \n\t" \ "lwz r7, 4(r4) \n\t" \ "addze r5, r9 \n\t" \ "addc r8, r8, r7 \n\t" \ "stwu r8, 4(r4) \n\t" #define MULADDC_STOP \ "addze r5, r5 \n\t" \ "addi r4, r4, 4 \n\t" \ "addi r3, r3, 4 \n\t" \ "stw r5, %0 \n\t" \ "stw r4, %1 \n\t" \ "stw r3, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ ); #else /* __MACH__ && __APPLE__ */ #define MULADDC_INIT \ asm( \ "lwz %%r3, %3 \n\t" \ "lwz %%r4, %4 \n\t" \ "lwz %%r5, %5 \n\t" \ "lwz %%r6, %6 \n\t" \ "addi %%r3, %%r3, -4 \n\t" \ "addi %%r4, %%r4, -4 \n\t" \ "addic %%r5, %%r5, 0 \n\t" #define MULADDC_CORE \ "lwzu %%r7, 4(%%r3) \n\t" \ "mullw %%r8, %%r7, %%r6 \n\t" \ "mulhwu %%r9, %%r7, %%r6 \n\t" \ "adde %%r8, %%r8, %%r5 \n\t" \ "lwz %%r7, 4(%%r4) \n\t" \ "addze %%r5, %%r9 \n\t" \ "addc %%r8, %%r8, %%r7 \n\t" \ "stwu %%r8, 4(%%r4) \n\t" #define MULADDC_STOP \ "addze %%r5, %%r5 \n\t" \ "addi %%r4, %%r4, 4 \n\t" \ "addi %%r3, %%r3, 4 \n\t" \ "stw %%r5, %0 \n\t" \ "stw %%r4, %1 \n\t" \ "stw %%r3, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ ); #endif /* __MACH__ && __APPLE__ */ #endif /* PPC32 */ /* * The Sparc(64) assembly is reported to be broken. * Disable it for now, until we're able to fix it. */ #if 0 && defined(__sparc__) #if defined(__sparc64__) #define MULADDC_INIT \ asm( \ "ldx %3, %%o0 \n\t" \ "ldx %4, %%o1 \n\t" \ "ld %5, %%o2 \n\t" \ "ld %6, %%o3 \n\t" #define MULADDC_CORE \ "ld [%%o0], %%o4 \n\t" \ "inc 4, %%o0 \n\t" \ "ld [%%o1], %%o5 \n\t" \ "umul %%o3, %%o4, %%o4 \n\t" \ "addcc %%o4, %%o2, %%o4 \n\t" \ "rd %%y, %%g1 \n\t" \ "addx %%g1, 0, %%g1 \n\t" \ "addcc %%o4, %%o5, %%o4 \n\t" \ "st %%o4, [%%o1] \n\t" \ "addx %%g1, 0, %%o2 \n\t" \ "inc 4, %%o1 \n\t" #define MULADDC_STOP \ "st %%o2, %0 \n\t" \ "stx %%o1, %1 \n\t" \ "stx %%o0, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "g1", "o0", "o1", "o2", "o3", "o4", \ "o5" \ ); #else /* __sparc64__ */ #define MULADDC_INIT \ asm( \ "ld %3, %%o0 \n\t" \ "ld %4, %%o1 \n\t" \ "ld %5, %%o2 \n\t" \ "ld %6, %%o3 \n\t" #define MULADDC_CORE \ "ld [%%o0], %%o4 \n\t" \ "inc 4, %%o0 \n\t" \ "ld [%%o1], %%o5 \n\t" \ "umul %%o3, %%o4, %%o4 \n\t" \ "addcc %%o4, %%o2, %%o4 \n\t" \ "rd %%y, %%g1 \n\t" \ "addx %%g1, 0, %%g1 \n\t" \ "addcc %%o4, %%o5, %%o4 \n\t" \ "st %%o4, [%%o1] \n\t" \ "addx %%g1, 0, %%o2 \n\t" \ "inc 4, %%o1 \n\t" #define MULADDC_STOP \ "st %%o2, %0 \n\t" \ "st %%o1, %1 \n\t" \ "st %%o0, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "g1", "o0", "o1", "o2", "o3", "o4", \ "o5" \ ); #endif /* __sparc64__ */ #endif /* __sparc__ */ #if defined(__microblaze__) || defined(microblaze) #define MULADDC_INIT \ asm( \ "lwi r3, %3 \n\t" \ "lwi r4, %4 \n\t" \ "lwi r5, %5 \n\t" \ "lwi r6, %6 \n\t" \ "andi r7, r6, 0xffff \n\t" \ "bsrli r6, r6, 16 \n\t" #define MULADDC_CORE \ "lhui r8, r3, 0 \n\t" \ "addi r3, r3, 2 \n\t" \ "lhui r9, r3, 0 \n\t" \ "addi r3, r3, 2 \n\t" \ "mul r10, r9, r6 \n\t" \ "mul r11, r8, r7 \n\t" \ "mul r12, r9, r7 \n\t" \ "mul r13, r8, r6 \n\t" \ "bsrli r8, r10, 16 \n\t" \ "bsrli r9, r11, 16 \n\t" \ "add r13, r13, r8 \n\t" \ "add r13, r13, r9 \n\t" \ "bslli r10, r10, 16 \n\t" \ "bslli r11, r11, 16 \n\t" \ "add r12, r12, r10 \n\t" \ "addc r13, r13, r0 \n\t" \ "add r12, r12, r11 \n\t" \ "addc r13, r13, r0 \n\t" \ "lwi r10, r4, 0 \n\t" \ "add r12, r12, r10 \n\t" \ "addc r13, r13, r0 \n\t" \ "add r12, r12, r5 \n\t" \ "addc r5, r13, r0 \n\t" \ "swi r12, r4, 0 \n\t" \ "addi r4, r4, 4 \n\t" #define MULADDC_STOP \ "swi r5, %0 \n\t" \ "swi r4, %1 \n\t" \ "swi r3, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "r3", "r4" "r5", "r6", "r7", "r8", \ "r9", "r10", "r11", "r12", "r13" \ ); #endif /* MicroBlaze */ #if defined(__tricore__) #define MULADDC_INIT \ asm( \ "ld.a %%a2, %3 \n\t" \ "ld.a %%a3, %4 \n\t" \ "ld.w %%d4, %5 \n\t" \ "ld.w %%d1, %6 \n\t" \ "xor %%d5, %%d5 \n\t" #define MULADDC_CORE \ "ld.w %%d0, [%%a2+] \n\t" \ "madd.u %%e2, %%e4, %%d0, %%d1 \n\t" \ "ld.w %%d0, [%%a3] \n\t" \ "addx %%d2, %%d2, %%d0 \n\t" \ "addc %%d3, %%d3, 0 \n\t" \ "mov %%d4, %%d3 \n\t" \ "st.w [%%a3+], %%d2 \n\t" #define MULADDC_STOP \ "st.w %0, %%d4 \n\t" \ "st.a %1, %%a3 \n\t" \ "st.a %2, %%a2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "d0", "d1", "e2", "d4", "a2", "a3" \ ); #endif /* TriCore */ /* * gcc -O0 by default uses r7 for the frame pointer, so it complains about our * use of r7 below, unless -fomit-frame-pointer is passed. Unfortunately, * passing that option is not easy when building with yotta. * * On the other hand, -fomit-frame-pointer is implied by any -Ox options with * x !=0, which we can detect using __OPTIMIZE__ (which is also defined by * clang and armcc5 under the same conditions). * * So, only use the optimized assembly below for optimized build, which avoids * the build error and is pretty reasonable anyway. */ #if defined(__GNUC__) && !defined(__OPTIMIZE__) #define MULADDC_CANNOT_USE_R7 #endif #if defined(__arm__) && !defined(MULADDC_CANNOT_USE_R7) #if defined(__thumb__) && !defined(__thumb2__) #define MULADDC_INIT \ asm( \ "ldr r0, %3 \n\t" \ "ldr r1, %4 \n\t" \ "ldr r2, %5 \n\t" \ "ldr r3, %6 \n\t" \ "lsr r7, r3, #16 \n\t" \ "mov r9, r7 \n\t" \ "lsl r7, r3, #16 \n\t" \ "lsr r7, r7, #16 \n\t" \ "mov r8, r7 \n\t" #define MULADDC_CORE \ "ldmia r0!, {r6} \n\t" \ "lsr r7, r6, #16 \n\t" \ "lsl r6, r6, #16 \n\t" \ "lsr r6, r6, #16 \n\t" \ "mov r4, r8 \n\t" \ "mul r4, r6 \n\t" \ "mov r3, r9 \n\t" \ "mul r6, r3 \n\t" \ "mov r5, r9 \n\t" \ "mul r5, r7 \n\t" \ "mov r3, r8 \n\t" \ "mul r7, r3 \n\t" \ "lsr r3, r6, #16 \n\t" \ "add r5, r5, r3 \n\t" \ "lsr r3, r7, #16 \n\t" \ "add r5, r5, r3 \n\t" \ "add r4, r4, r2 \n\t" \ "mov r2, #0 \n\t" \ "adc r5, r2 \n\t" \ "lsl r3, r6, #16 \n\t" \ "add r4, r4, r3 \n\t" \ "adc r5, r2 \n\t" \ "lsl r3, r7, #16 \n\t" \ "add r4, r4, r3 \n\t" \ "adc r5, r2 \n\t" \ "ldr r3, [r1] \n\t" \ "add r4, r4, r3 \n\t" \ "adc r2, r5 \n\t" \ "stmia r1!, {r4} \n\t" #define MULADDC_STOP \ "str r2, %0 \n\t" \ "str r1, %1 \n\t" \ "str r0, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "r0", "r1", "r2", "r3", "r4", "r5", \ "r6", "r7", "r8", "r9", "cc" \ ); #else #define MULADDC_INIT \ asm( \ "ldr r0, %3 \n\t" \ "ldr r1, %4 \n\t" \ "ldr r2, %5 \n\t" \ "ldr r3, %6 \n\t" #define MULADDC_CORE \ "ldr r4, [r0], #4 \n\t" \ "mov r5, #0 \n\t" \ "ldr r6, [r1] \n\t" \ "umlal r2, r5, r3, r4 \n\t" \ "adds r7, r6, r2 \n\t" \ "adc r2, r5, #0 \n\t" \ "str r7, [r1], #4 \n\t" #define MULADDC_STOP \ "str r2, %0 \n\t" \ "str r1, %1 \n\t" \ "str r0, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "r0", "r1", "r2", "r3", "r4", "r5", \ "r6", "r7", "cc" \ ); #endif /* Thumb */ #endif /* ARMv3 */ #if defined(__alpha__) #define MULADDC_INIT \ asm( \ "ldq $1, %3 \n\t" \ "ldq $2, %4 \n\t" \ "ldq $3, %5 \n\t" \ "ldq $4, %6 \n\t" #define MULADDC_CORE \ "ldq $6, 0($1) \n\t" \ "addq $1, 8, $1 \n\t" \ "mulq $6, $4, $7 \n\t" \ "umulh $6, $4, $6 \n\t" \ "addq $7, $3, $7 \n\t" \ "cmpult $7, $3, $3 \n\t" \ "ldq $5, 0($2) \n\t" \ "addq $7, $5, $7 \n\t" \ "cmpult $7, $5, $5 \n\t" \ "stq $7, 0($2) \n\t" \ "addq $2, 8, $2 \n\t" \ "addq $6, $3, $3 \n\t" \ "addq $5, $3, $3 \n\t" #define MULADDC_STOP \ "stq $3, %0 \n\t" \ "stq $2, %1 \n\t" \ "stq $1, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "$1", "$2", "$3", "$4", "$5", "$6", "$7" \ ); #endif /* Alpha */ #if defined(__mips__) && !defined(__mips64) #define MULADDC_INIT \ asm( \ "lw $10, %3 \n\t" \ "lw $11, %4 \n\t" \ "lw $12, %5 \n\t" \ "lw $13, %6 \n\t" #define MULADDC_CORE \ "lw $14, 0($10) \n\t" \ "multu $13, $14 \n\t" \ "addi $10, $10, 4 \n\t" \ "mflo $14 \n\t" \ "mfhi $9 \n\t" \ "addu $14, $12, $14 \n\t" \ "lw $15, 0($11) \n\t" \ "sltu $12, $14, $12 \n\t" \ "addu $15, $14, $15 \n\t" \ "sltu $14, $15, $14 \n\t" \ "addu $12, $12, $9 \n\t" \ "sw $15, 0($11) \n\t" \ "addu $12, $12, $14 \n\t" \ "addi $11, $11, 4 \n\t" #define MULADDC_STOP \ "sw $12, %0 \n\t" \ "sw $11, %1 \n\t" \ "sw $10, %2 \n\t" \ : "=m" (c), "=m" (d), "=m" (s) \ : "m" (s), "m" (d), "m" (c), "m" (b) \ : "$9", "$10", "$11", "$12", "$13", "$14", "$15" \ ); #endif /* MIPS */ #endif /* GNUC */ #if (defined(_MSC_VER) && defined(_M_IX86)) || defined(__WATCOMC__) #define MULADDC_INIT \ __asm mov esi, s \ __asm mov edi, d \ __asm mov ecx, c \ __asm mov ebx, b #define MULADDC_CORE \ __asm lodsd \ __asm mul ebx \ __asm add eax, ecx \ __asm adc edx, 0 \ __asm add eax, [edi] \ __asm adc edx, 0 \ __asm mov ecx, edx \ __asm stosd #if defined(BSCOMPTLS_HAVE_SSE2) #define EMIT __asm _emit #define MULADDC_HUIT \ EMIT 0x0F EMIT 0x6E EMIT 0xC9 \ EMIT 0x0F EMIT 0x6E EMIT 0xC3 \ EMIT 0x0F EMIT 0x6E EMIT 0x1F \ EMIT 0x0F EMIT 0xD4 EMIT 0xCB \ EMIT 0x0F EMIT 0x6E EMIT 0x16 \ EMIT 0x0F EMIT 0xF4 EMIT 0xD0 \ EMIT 0x0F EMIT 0x6E EMIT 0x66 EMIT 0x04 \ EMIT 0x0F EMIT 0xF4 EMIT 0xE0 \ EMIT 0x0F EMIT 0x6E EMIT 0x76 EMIT 0x08 \ EMIT 0x0F EMIT 0xF4 EMIT 0xF0 \ EMIT 0x0F EMIT 0x6E EMIT 0x7E EMIT 0x0C \ EMIT 0x0F EMIT 0xF4 EMIT 0xF8 \ EMIT 0x0F EMIT 0xD4 EMIT 0xCA \ EMIT 0x0F EMIT 0x6E EMIT 0x5F EMIT 0x04 \ EMIT 0x0F EMIT 0xD4 EMIT 0xDC \ EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x08 \ EMIT 0x0F EMIT 0xD4 EMIT 0xEE \ EMIT 0x0F EMIT 0x6E EMIT 0x67 EMIT 0x0C \ EMIT 0x0F EMIT 0xD4 EMIT 0xFC \ EMIT 0x0F EMIT 0x7E EMIT 0x0F \ EMIT 0x0F EMIT 0x6E EMIT 0x56 EMIT 0x10 \ EMIT 0x0F EMIT 0xF4 EMIT 0xD0 \ EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ EMIT 0x0F EMIT 0x6E EMIT 0x66 EMIT 0x14 \ EMIT 0x0F EMIT 0xF4 EMIT 0xE0 \ EMIT 0x0F EMIT 0xD4 EMIT 0xCB \ EMIT 0x0F EMIT 0x6E EMIT 0x76 EMIT 0x18 \ EMIT 0x0F EMIT 0xF4 EMIT 0xF0 \ EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x04 \ EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ EMIT 0x0F EMIT 0x6E EMIT 0x5E EMIT 0x1C \ EMIT 0x0F EMIT 0xF4 EMIT 0xD8 \ EMIT 0x0F EMIT 0xD4 EMIT 0xCD \ EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x10 \ EMIT 0x0F EMIT 0xD4 EMIT 0xD5 \ EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x08 \ EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ EMIT 0x0F EMIT 0xD4 EMIT 0xCF \ EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x14 \ EMIT 0x0F EMIT 0xD4 EMIT 0xE5 \ EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x0C \ EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ EMIT 0x0F EMIT 0xD4 EMIT 0xCA \ EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x18 \ EMIT 0x0F EMIT 0xD4 EMIT 0xF5 \ EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x10 \ EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ EMIT 0x0F EMIT 0xD4 EMIT 0xCC \ EMIT 0x0F EMIT 0x6E EMIT 0x6F EMIT 0x1C \ EMIT 0x0F EMIT 0xD4 EMIT 0xDD \ EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x14 \ EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ EMIT 0x0F EMIT 0xD4 EMIT 0xCE \ EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x18 \ EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ EMIT 0x0F EMIT 0xD4 EMIT 0xCB \ EMIT 0x0F EMIT 0x7E EMIT 0x4F EMIT 0x1C \ EMIT 0x83 EMIT 0xC7 EMIT 0x20 \ EMIT 0x83 EMIT 0xC6 EMIT 0x20 \ EMIT 0x0F EMIT 0x73 EMIT 0xD1 EMIT 0x20 \ EMIT 0x0F EMIT 0x7E EMIT 0xC9 #define MULADDC_STOP \ EMIT 0x0F EMIT 0x77 \ __asm mov c, ecx \ __asm mov d, edi \ __asm mov s, esi \ #else #define MULADDC_STOP \ __asm mov c, ecx \ __asm mov d, edi \ __asm mov s, esi \ #endif /* SSE2 */ #endif /* MSVC */ #endif /* BSCOMPTLS_HAVE_ASM */ #if !defined(MULADDC_CORE) #if defined(BSCOMPTLS_HAVE_UDBL) #define MULADDC_INIT \ { \ bscomptls_t_udbl r; \ bscomptls_mpi_uint r0, r1; #define MULADDC_CORE \ r = *(s++) * (bscomptls_t_udbl) b; \ r0 = (bscomptls_mpi_uint) r; \ r1 = (bscomptls_mpi_uint)( r >> biL ); \ r0 += c; r1 += (r0 < c); \ r0 += *d; r1 += (r0 < *d); \ c = r1; *(d++) = r0; #define MULADDC_STOP \ } #else #define MULADDC_INIT \ { \ bscomptls_mpi_uint s0, s1, b0, b1; \ bscomptls_mpi_uint r0, r1, rx, ry; \ b0 = ( b << biH ) >> biH; \ b1 = ( b >> biH ); #define MULADDC_CORE \ s0 = ( *s << biH ) >> biH; \ s1 = ( *s >> biH ); s++; \ rx = s0 * b1; r0 = s0 * b0; \ ry = s1 * b0; r1 = s1 * b1; \ r1 += ( rx >> biH ); \ r1 += ( ry >> biH ); \ rx <<= biH; ry <<= biH; \ r0 += rx; r1 += (r0 < rx); \ r0 += ry; r1 += (r0 < ry); \ r0 += c; r1 += (r0 < c); \ r0 += *d; r1 += (r0 < *d); \ c = r1; *(d++) = r0; #define MULADDC_STOP \ } #endif /* C (generic) */ #endif /* C (longlong) */ #endif /* bn_mul.h */
[ "zhangdi29@ezvizlife.com" ]
zhangdi29@ezvizlife.com
cabba92ee5f892439dace63414b4d8fc09133bc1
c40a385d7ede8cb17667ae3e3d4b8b48bab49601
/Core/Src/gpio.c
3710d570953287c85dd33c482aa0678282fd8be0
[]
no_license
kubot080301/stm32_test
17c537b6404fcd3f747308ddf550b831c945d0ee
1241187af2e24cf3716f4df4aed3be01c551f6a5
refs/heads/HAL_LED
2023-03-09T19:46:19.683430
2021-02-20T03:22:25
2021-02-20T03:22:25
340,530,766
0
0
null
2021-02-20T06:27:15
2021-02-20T01:19:18
Makefile
UTF-8
C
false
false
2,002
c
/** ****************************************************************************** * @file gpio.c * @brief This file provides code for the configuration * of all used GPIO pins. ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under BSD 3-Clause license, * the "License"; You may not use this file except in compliance with the * License. You may obtain a copy of the License at: * opensource.org/licenses/BSD-3-Clause * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "gpio.h" /* USER CODE BEGIN 0 */ /* USER CODE END 0 */ /*----------------------------------------------------------------------------*/ /* Configure GPIO */ /*----------------------------------------------------------------------------*/ /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /** Configure pins as * Analog * Input * Output * EVENT_OUT * EXTI */ void MX_GPIO_Init(void) { GPIO_InitTypeDef GPIO_InitStruct = {0}; /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOH_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOG_CLK_ENABLE(); /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOG, LED1_Pin|LED2_Pin, GPIO_PIN_SET); /*Configure GPIO pins : PGPin PGPin */ GPIO_InitStruct.Pin = LED1_Pin|LED2_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); } /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
[ "70013856+kubot080301@users.noreply.github.com" ]
70013856+kubot080301@users.noreply.github.com
326c8aca73d729ed1466243b8b049e01d6d375c6
5bc04daeef5284871264a7446aadf7552ec0d195
/lib/percy/cryptominisat/src/sql_tablestructure.h
43bee8b2e5e0a707451d4e35dae57ac2c593563b
[ "MIT", "GPL-1.0-or-later", "GPL-2.0-only" ]
permissive
Ace-Ma/LSOracle
a8fd7efe8927f8154ea37407bac727e409098ed5
6e940906303ef6c2c6b96352f44206567fdd50d3
refs/heads/master
2020-07-23T15:36:18.224385
2019-08-16T15:58:33
2019-08-16T15:58:33
207,612,130
0
0
MIT
2019-09-10T16:42:43
2019-09-10T16:42:43
null
UTF-8
C
false
false
1,436
h
/************************************************************* MiniSat --- Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson CryptoMiniSat --- Copyright (c) 2014, Mate Soos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ***************************************************************/ #ifndef __SQL_TABLESTRUCTURE_H__ #define __SQL_TABLESTRUCTURE_H__ extern char cmsat_tablestructure_sql[]; extern unsigned int cmsat_tablestructure_sql_len; #endif
[ "u1219556@lnissrv4.eng.utah.edu" ]
u1219556@lnissrv4.eng.utah.edu
61a880f4c33d12d813d8f2407ff0039d09d25584
a65ebc49769ef9cb0f670a0e233349dd37b8f75d
/ADC.h
4af4c109d8b62d5ebb12339c2923cdb70303d92c
[]
no_license
willisoa/Sound_Visualizer
a984ada2d74608f22dcafd3bf21ef2dd591d1bbc
e4a4403ae7a8222823ee9548b535327b431faba7
refs/heads/master
2020-03-21T06:20:19.835033
2018-07-05T21:48:21
2018-07-05T21:48:21
138,213,216
0
0
null
null
null
null
UTF-8
C
false
false
211
h
/* * ADC.h * * Created on: Jun 21, 2018 * Author: willi */ #ifndef ADC_H_ #define ADC_H_ void ADC_Init(void); int ADC_ResultReady(); void ADC_ResultRead(); int ADC_GetResult(); #endif /* ADC_H_ */
[ "willisoa@mail.gvsu.edu" ]
willisoa@mail.gvsu.edu
db78316e94c58b7370f94241359ef1b2feb55a55
63b4a698bc22fd54857c8fa097b1331f79c39e5a
/src/uclibc/uClibc-0.9.33.2/test/stat/stat.c
4980cdd78b33640d2c2c7de15afd9cea13884d15
[ "LGPL-2.1-only", "LGPL-2.1-or-later", "LicenseRef-scancode-other-permissive", "Apache-2.0" ]
permissive
MinimSecure/unum-sdk
67e04e2b230f9afb3ae328501a16afa4b94cdac6
30c63f0eccddba39a760671a831be3602842f3f4
refs/heads/master
2023-07-13T07:33:43.078672
2023-07-07T13:52:05
2023-07-07T13:52:05
143,209,329
33
22
Apache-2.0
2021-03-05T22:56:59
2018-08-01T21:13:43
C
UTF-8
C
false
false
1,786
c
#include <stdio.h> #include <string.h> #include <fcntl.h> #include <sys/stat.h> #include <unistd.h> #include <stdlib.h> static void print_struct_stat(char *msg, struct stat *s) { printf("%s\n", msg); /* The casts are because glibc thinks it's cool */ printf("device : 0x%llx\n",(long long)s->st_dev); printf("inode : %lld\n", (long long)s->st_ino); printf("mode : 0x%llx\n",(long long)s->st_mode); printf("nlink : %lld\n", (long long)s->st_nlink); printf("uid : %lld\n", (long long)s->st_uid); printf("gid : %lld\n", (long long)s->st_gid); printf("rdev : 0x%llx\n",(long long)s->st_rdev); printf("size : %lld\n", (long long)s->st_size); printf("blksize : %lld\n", (long long)s->st_blksize); printf("blocks : %lld\n", (long long)s->st_blocks); printf("atime : %lld\n", (long long)s->st_atime); printf("mtime : %lld\n", (long long)s->st_mtime); printf("ctime : %lld\n", (long long)s->st_ctime); } int main(int argc,char **argv) { int fd, ret; char *file; struct stat s; if (argc < 2) { fprintf(stderr, "Usage: stat FILE\n"); exit(1); } file = argv[1]; memset(&s, 0, sizeof(struct stat)); ret = stat(file, &s); if(ret<0){ perror("stat"); exit(1); } print_struct_stat("\nTesting stat:", &s); memset(&s, 0, sizeof(struct stat)); ret = lstat(file, &s); if(ret<0){ perror("lstat"); exit(1); } print_struct_stat("\nTesting lstat:", &s); fd = open(file, O_RDONLY); if(fd<0){ perror("open"); exit(1); } memset(&s, 0, sizeof(struct stat)); ret = fstat(fd,&s); if(ret<0){ perror("fstat"); exit(1); } print_struct_stat("\nTesting fstat:", &s); exit(0); }
[ "denis.bakin@minim.co" ]
denis.bakin@minim.co
65f77212d5e067076dfaccd169a3fafdd1fc7751
b2a07c363daa20974a7822cf04ed8aa2499cf5f7
/I2S—录音与回放/User/i2c/i2c.c
36e64b6a5b861c26efb27782fae85890bb45e754
[]
no_license
capsper1/ebf_stm32h743_tiaozhanzhe_code
5e77be0bb726936a3b71a740177cd91735d5bfa8
a1d644ff1be4601571fb60f4fb33480c59013ff4
refs/heads/master
2022-09-27T01:35:49.281049
2020-06-06T03:53:51
2020-06-06T03:53:51
null
0
0
null
null
null
null
GB18030
C
false
false
5,144
c
/** ****************************************************************************** * @file i2c.c * @author fire * @version V1.0 * @date 2015-xx-xx * @brief i2c 总线驱动,方便与各种I2C传感器通讯。 ****************************************************************************** * @attention * * 实验平台:秉火 STM32 F767 开发板 * 论坛 :http://www.firebbs.cn * 淘宝 :http://firestm32.taobao.com * ****************************************************************************** */ #include "./i2c/i2c.h" #include "./delay/core_delay.h" I2C_HandleTypeDef I2C_Handle; /******************************* Function ************************************/ /** * @brief 初始化I2C总线,使用I2C前需要调用 * @param 无 * @retval 无 */ void I2cMaster_Init(void) { GPIO_InitTypeDef GPIO_InitStructure; /* 使能I2Cx时钟 */ SENSORS_I2C_RCC_CLK_ENABLE(); /* 使能I2C GPIO 时钟 */ SENSORS_I2C_SCL_GPIO_CLK_ENABLE(); SENSORS_I2C_SDA_GPIO_CLK_ENABLE(); /* 配置I2Cx引脚: SCL ----------------------------------------*/ GPIO_InitStructure.Pin = SENSORS_I2C_SCL_GPIO_PIN; GPIO_InitStructure.Mode = GPIO_MODE_AF_OD; GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStructure.Pull= GPIO_NOPULL; GPIO_InitStructure.Alternate=SENSORS_I2C_AF; HAL_GPIO_Init(SENSORS_I2C_SCL_GPIO_PORT, &GPIO_InitStructure); /* 配置I2Cx引脚: SDA ----------------------------------------*/ GPIO_InitStructure.Pin = SENSORS_I2C_SDA_GPIO_PIN; HAL_GPIO_Init(SENSORS_I2C_SDA_GPIO_PORT, &GPIO_InitStructure); if(HAL_I2C_GetState(&I2C_Handle) == HAL_I2C_STATE_RESET) { /* 强制复位I2C外设时钟 */ SENSORS_I2C_FORCE_RESET(); /* 释放I2C外设时钟复位 */ SENSORS_I2C_RELEASE_RESET(); /* I2C 配置 */ I2C_Handle.Instance = SENSORS_I2C; I2C_Handle.Init.Timing = 0x40604E73;//100KHz I2C_Handle.Init.OwnAddress1 = 0; I2C_Handle.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; I2C_Handle.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; I2C_Handle.Init.OwnAddress2 = 0; I2C_Handle.Init.OwnAddress2Masks = I2C_OA2_NOMASK; I2C_Handle.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; I2C_Handle.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; /* 初始化I2C */ HAL_I2C_Init(&I2C_Handle); /* 使能模拟滤波器 */ HAL_I2CEx_AnalogFilter_Config(&I2C_Handle, I2C_ANALOGFILTER_ENABLE); } } /** * @brief Manages error callback by re-initializing I2C. * @param Addr: I2C Address * @retval None */ static void I2Cx_Error(uint8_t Addr) { /* 恢复I2C寄存器为默认值 */ HAL_I2C_DeInit(&I2C_Handle); /* 重新初始化I2C外设 */ I2cMaster_Init(); } /** * @brief 写寄存器,这是提供给上层的接口 * @param slave_addr: 从机地址 * @param reg_addr:寄存器地址 * @param len:写入的长度 * @param data_ptr:指向要写入的数据 * @retval 正常为0,不正常为非0 */ int Sensors_I2C_WriteRegister(unsigned char slave_addr, unsigned char reg_addr, unsigned short len, unsigned char *data_ptr) { HAL_StatusTypeDef status = HAL_OK; status = HAL_I2C_Mem_Write(&I2C_Handle, slave_addr, reg_addr, I2C_MEMADD_SIZE_8BIT,data_ptr, len,I2Cx_FLAG_TIMEOUT); /* 检查通讯状态 */ if(status != HAL_OK) { /* 总线出错处理 */ I2Cx_Error(slave_addr); } while (HAL_I2C_GetState(&I2C_Handle) != HAL_I2C_STATE_READY) { } /* 检查SENSOR是否就绪进行下一次读写操作 */ while (HAL_I2C_IsDeviceReady(&I2C_Handle, slave_addr, I2Cx_FLAG_TIMEOUT, I2Cx_FLAG_TIMEOUT) == HAL_TIMEOUT); /* 等待传输结束 */ while (HAL_I2C_GetState(&I2C_Handle) != HAL_I2C_STATE_READY) { } return status; } /** * @brief 读寄存器,这是提供给上层的接口 * @param slave_addr: 从机地址 * @param reg_addr:寄存器地址 * @param len:要读取的长度 * @param data_ptr:指向要存储数据的指针 * @retval 正常为0,不正常为非0 */ int Sensors_I2C_ReadRegister(unsigned char slave_addr, unsigned char reg_addr, unsigned short len, unsigned char *data_ptr) { HAL_StatusTypeDef status = HAL_OK; status =HAL_I2C_Mem_Read(&I2C_Handle,slave_addr,reg_addr,I2C_MEMADD_SIZE_8BIT,data_ptr,len,I2Cx_FLAG_TIMEOUT); /* 检查通讯状态 */ if(status != HAL_OK) { /* 总线出错处理 */ I2Cx_Error(slave_addr); } while (HAL_I2C_GetState(&I2C_Handle) != HAL_I2C_STATE_READY) { } /* 检查SENSOR是否就绪进行下一次读写操作 */ while (HAL_I2C_IsDeviceReady(&I2C_Handle, slave_addr, I2Cx_FLAG_TIMEOUT, I2Cx_FLAG_TIMEOUT) == HAL_TIMEOUT); /* 等待传输结束 */ while (HAL_I2C_GetState(&I2C_Handle) != HAL_I2C_STATE_READY) { } return status; }
[ "18575131670@163.com" ]
18575131670@163.com
1415cd4451df6fa9dadff59056ffdf148cfc4b74
8b0b44281662be6f0b4b8d2c952f2bf56382bc27
/05-structures/02-arrays-of-structures/main.c
d912107c8a18cd784b5e6161abb2d946aa0d4f6b
[]
no_license
Misael1998/learning-c
42f4530fb9482600427448947fd040b817cec809
134b407d2b633013d26f4653f79e93b600ebb860
refs/heads/main
2023-03-24T06:45:58.133279
2021-03-22T22:15:26
2021-03-22T22:15:26
332,300,803
0
0
null
null
null
null
UTF-8
C
false
false
1,225
c
#include <stdio.h> #include <ctype.h> #include <string.h> #define MAXWORD 100 struct key { char *word; int count; } keytab[] = { "auto", 0, "break", 0, "case", 0, "char", 0, "const", 0, "continue", 0, "default", 0, /* ... */ "unsigned", 0, "void", 0, "volatile", 0, "while", 0 }; /* NKEYS: elements in keytab counted by the computer at compile time */ #define NKEYS (sizeof(keytab)/sizeof(struct key)) int getword(char *, int); int binsearch(char *, struct key *, int); /* count C keywords */ int main() { int n; char word[MAXWORD]; while (getword(word, MAXWORD) != EOF) if (isalpha(word[0])) if ((n = binsearch(word, keytab, NKEYS)) >= 0) keytab[n].count++; for (n = 0; n < NKEYS; n++) if (keytab[n].count > 0) printf("%4d %s\n", keytab[n].count, keytab[n].word); return 0; } /* binsearch: find word in tab[0]...tab[n-1] */ int binsearch(char *word, struct key tab[], int n) { int cond; int low, high, mid; low = 0; high = n - 1; while (low <= high) { mid = (low+high)/2; if ((cond = strcmp(word, tab[mid].word)) < 0) high = mid - 1; else if (cond > 0) low = mid + 1; else return mid; } return -1; }
[ "misalande@gmail.com" ]
misalande@gmail.com
5a9a6abf3f12aac6293cecd1950d52e4a9480edd
d8cec3d9496ed5b108e2b354abbf9601ed5f0b2a
/binary_search.c
4c7956d70b8410403e00c3db928bd0bb0b474ed8
[]
no_license
yehyun3459/algorithm
214282f4d42d9199917598ab46569437e93d0a3a
838135877f8df0ab04d9db4621a7734fbea8da7a
refs/heads/master
2021-08-07T02:07:04.960216
2020-05-14T11:10:02
2020-05-14T11:10:02
175,613,922
0
0
null
null
null
null
UHC
C
false
false
739
c
#include <stdio.h> #define ARR_LEN 10 int binarySearch(int *arr,int key) { int r_index = -99; int start = 0, end = ARR_LEN - 1; while(1) { int mid = (start + end) / 2; if (arr[mid] == key) return mid; else if (arr[mid] > key)end = mid; else start = mid + 1; if (start == end&&arr[start] != key)break; } return r_index; } void main() { int _arr[] = { 14,17,20,22,26,48,50,90,95,100 }; int key; while (EOF) { printf("찾고자 하는 수를 입력하세요\n[14,17,20,22,26,48,50,90,95,100]중에서*^^*\n"); scanf("%d", &key); int index = binarySearch(_arr, key); if(index!=-99) printf("%d is stored in %dth index in arr\n", key, index + 1); else printf("없는 값을 입력하셨네요 ^////^"); } }
[ "yehyun3459@naver.com" ]
yehyun3459@naver.com
de4c9d43cf9459e3ef357bb267e96e8ab8c74b44
b945b2fac11f237a49de33af1b8fa02ba3ed1814
/bspmath/include/prototypes/bsfilendpar.h
af9ba4c157d97d4973faadd972018bf62ae46187
[]
no_license
ahundiak/isdp
b94f56f7a7b02b806209ff06da8e22497f6e1386
07572eb18f07cbf762505ef34e471fa47c102df4
refs/heads/master
2021-03-12T20:02:34.067237
2011-12-16T20:03:20
2011-12-16T20:03:20
37,136,442
0
0
null
null
null
null
UTF-8
C
false
false
148
h
/* /usr3/bs/src.em/bsfilendpar.c */ extern void BSfilendpar(IGRint, IGRdouble, IGRdouble, IGRdouble, IGRint, IGRint, BSpair *, IGRint [2], BSrc *);
[ "ahundiak@e9faf64c-7e38-11de-a453-d5a50d962d30" ]
ahundiak@e9faf64c-7e38-11de-a453-d5a50d962d30
756494c91046b7f91a149beca515f3a98db926e5
3ed978164e91956cb360f9916070ada31bf80e27
/srcs/glob/glob_tablejoin.c
0875e35e4219eebadd0a35d58a9da7420b49d654
[]
no_license
jguyet/42sh
54613a115d2b2afb96a1bb8355bdb069635ccd7b
4339fb44fa4cbad9789ddc7e6361ea70302c9cd6
refs/heads/master
2021-06-14T03:53:14.067107
2017-02-16T04:23:57
2017-02-16T04:23:57
null
0
0
null
null
null
null
UTF-8
C
false
false
1,393
c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* glob_tablejoin.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: mblet <mblet@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/04/29 18:22:01 by mblet #+# #+# */ /* Updated: 2016/05/19 01:51:37 by mblet ### ########.fr */ /* */ /* ************************************************************************** */ #include "glob.h" char **sh_glob_tablejoind(char **table1, char **table2) { char **ret; size_t i; size_t j; ret = (char **)malloc((ft_strtable_size(table1) \ + ft_strtable_size(table2) + 1) * sizeof(char *)); if (ret == NULL) return (NULL); i = 0; j = 0; while (table1 && table1[j]) ret[i++] = ft_strdup(table1[j++]); j = 0; while (table2 && table2[j]) ret[i++] = ft_strdup(table2[j++]); ret[i] = NULL; ft_strtable_clear(&table1); ft_strtable_clear(&table2); return (ret); }
[ "jguyet@e3r1p12.42.fr" ]
jguyet@e3r1p12.42.fr
1edfe833fd0bfe1b868357e8047416fde0d34d03
02e2f32edb8df4013061776c12c50292e85e8a6e
/src/nucleus/ft_cut_copy.c
386fcdde3a453c2771f7d552f6553dba1468a029
[]
no_license
pankratdodo/21sh
1de930ab2257999b214784ec3832c1c87d7df8bd
a61d1910b36f8589d06f73390b1abf844a6e4a79
refs/heads/master
2022-11-09T13:41:58.292914
2020-06-23T13:11:28
2020-06-23T13:11:28
224,352,247
2
0
null
null
null
null
UTF-8
C
false
false
1,510
c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_cut_copy.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: qmartina <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/27 17:49:33 by qmartina #+# #+# */ /* Updated: 2020/01/27 17:49:34 by qmartina ### ########.fr */ /* */ /* ************************************************************************** */ #include "../../inc/fshell.h" void ft_cut_copy(t_readline *p) { char *tmp; if (p->sum_read == 25) ft_putcut(p); else if (p->sum_read == 23) { free(g_cp); g_cp = ft_strndup(p->buff, p->index); tmp = p->buff; p->buff = ft_strndup(&tmp[p->index], (p->len - p->index)); free(tmp); ft_cleanstr(p->index + p->len_hint, p); p->index = 0; p->len = ft_strlen(p->buff); p->buff_size = p->len; p->len_hint = ft_printf_helper(p->mod); write(2, p->buff, p->len); ft_setcursor(0, p->len); } else if (p->sum_read == 21) ft_cut(p); else if (p->sum_read == 127 && p->index > 0) ft_do_delch(p); }
[ "plettie@mi-q5.21-school.ru" ]
plettie@mi-q5.21-school.ru
9f6d231ad84008b479ecfd7312376ec07fe56433
be3167504c0e32d7708e7d13725c2dbc9232f2cb
/mame/src/mame/video/hyprduel.c
b76ea0787ef0284ca2f66abcf3b42fcc7c27a322
[]
no_license
sysfce2/MAME-Plus-Plus-Kaillera
83b52085dda65045d9f5e8a0b6f3977d75179e78
9692743849af5a808e217470abc46e813c9068a5
refs/heads/master
2023-08-10T06:12:47.451039
2016-08-01T09:44:21
2016-08-01T09:44:21
null
0
0
null
null
null
null
UTF-8
C
false
false
24,329
c
/* based on driver from video/metro.c by Luca Elia */ /* modified by Hau */ /*************************************************************************** -= Metro Games =- driver by Luca Elia (l.elia@tin.it) Note: if MAME_DEBUG is defined, pressing Z with: Q Shows Layer 0 W Shows Layer 1 E Shows Layer 2 A Shows Sprites Keys can be used together! [ 3 Scrolling Layers ] There is memory for a huge layer, but the actual tilemap is a smaller window (of fixed size) carved from anywhere inside that layer. Tile Size: 8 x 8 x 4 (later games can switch to 8 x 8 x 8, 16 x 16 x 4/8 at run time) Big Layer Size: 2048 x 2048 (8x8 tiles) or 4096 x 4096 (16x16 tiles) Tilemap Window Size: 512 x 256 (8x8 tiles) or 1024 x 512 (16x16 tiles) The tile codes in memory do not map directly to tiles. They are indexes into a table (with 0x200 entries) that defines a virtual set of tiles for the 3 layers. Each entry in that table adds 16 tiles to the set of available tiles, and decides their color code. Tile code with their msbit set are different as they mean: draw a tile filled with a single color (0-1ff) [ 512 Zooming Sprites ] The sprites are NOT tile based: the "tile" size can vary from 8 to 64 (independently for width and height) with an 8 pixel granularity. The "tile" address is a multiple of 8x8 pixels. Each sprite can be shrinked to ~1/4 or enlarged to ~32x following an exponential curve of sizes (with one zoom value for both width and height) ***************************************************************************/ #include "emu.h" #include "includes/hyprduel.h" /*************************************************************************** Palette GGGGGRRRRRBBBBBx ***************************************************************************/ WRITE16_MEMBER(hyprduel_state::hyprduel_paletteram_w) { data = COMBINE_DATA(&m_paletteram[offset]); palette_set_color_rgb(machine(), offset, pal5bit(data >> 6), pal5bit(data >> 11), pal5bit(data >> 1)); } /*************************************************************************** Tilemaps: Tiles Set & Window Each entry in the Tiles Set RAM uses 2 words to specify a starting tile code and a color code. This adds 16 consecutive tiles with that color code to the set of available tiles. Offset: Bits: Value: 0.w fedc ---- ---- ---- ---- ba98 7654 ---- Color Code ---- ---- ---- 3210 Code High Bits 2.w Code Low Bits ***************************************************************************/ /*************************************************************************** Tilemaps: Rendering ***************************************************************************/ /* A 2048 x 2048 virtual tilemap */ #define BIG_NX (0x100) #define BIG_NY (0x100) /* A smaller 512 x 256 window defines the actual tilemap */ #define WIN_NX (0x40) #define WIN_NY (0x20) //#define WIN_NX (0x40+1) //#define WIN_NY (0x20+1) /* 8x8x4 tiles only */ INLINE void get_tile_info( running_machine &machine, tile_data &tileinfo, int tile_index, int layer, UINT16 *vram) { hyprduel_state *state = machine.driver_data<hyprduel_state>(); UINT16 code; int table_index; UINT32 tile; /* The actual tile index depends on the window */ tile_index = ((tile_index / WIN_NX + state->m_window[layer * 2 + 0] / 8) % BIG_NY) * BIG_NX + ((tile_index % WIN_NX + state->m_window[layer * 2 + 1] / 8) % BIG_NX); /* Fetch the code */ code = vram[tile_index]; /* Use it as an index into the tiles set table */ table_index = ((code & 0x1ff0) >> 4 ) * 2; tile = (state->m_tiletable[table_index + 0] << 16) + state->m_tiletable[table_index + 1]; if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */ { int _code = code & 0x000f; tileinfo.pen_data = state->m_empty_tiles + _code * 16 * 16; tileinfo.palette_base = ((code & 0x0ff0)) + 0x1000; tileinfo.flags = 0; tileinfo.group = 0; } else { tileinfo.group = 0; SET_TILE_INFO( 0, (tile & 0xfffff) + (code & 0xf), (((tile & 0x0ff00000) >> 20)) + 0x100, TILE_FLIPXY((code & 0x6000) >> 13)); } } /* 8x8x4 or 8x8x8 tiles. It's the tile's color that decides: if its low 4 bits are high ($f,$1f,$2f etc) the tile is 8bpp, otherwise it's 4bpp */ INLINE void get_tile_info_8bit( running_machine &machine, tile_data &tileinfo, int tile_index, int layer, UINT16 *vram ) { hyprduel_state *state = machine.driver_data<hyprduel_state>(); UINT16 code; int table_index; UINT32 tile; /* The actual tile index depends on the window */ tile_index = ((tile_index / WIN_NX + state->m_window[layer * 2 + 0] / 8) % BIG_NY) * BIG_NX + ((tile_index % WIN_NX + state->m_window[layer * 2 + 1] / 8) % BIG_NX); /* Fetch the code */ code = vram[tile_index]; /* Use it as an index into the tiles set table */ table_index = ((code & 0x1ff0) >> 4) * 2; tile = (state->m_tiletable[table_index + 0] << 16) + state->m_tiletable[table_index + 1]; if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */ { int _code = code & 0x000f; tileinfo.pen_data = state->m_empty_tiles + _code * 16 * 16; tileinfo.palette_base = ((code & 0x0ff0)) + 0x1000; tileinfo.flags = 0; tileinfo.group = 0; } else if ((tile & 0x00f00000) == 0x00f00000) /* draw tile as 8bpp */ { tileinfo.group = 1; SET_TILE_INFO( 1, (tile & 0xfffff) + 2*(code & 0xf), ((tile & 0x0f000000) >> 24) + 0x10, TILE_FLIPXY((code & 0x6000) >> 13)); } else { tileinfo.group = 0; SET_TILE_INFO( 0, (tile & 0xfffff) + (code & 0xf), (((tile & 0x0ff00000) >> 20)) + 0x100, TILE_FLIPXY((code & 0x6000) >> 13)); } } /* 16x16x4 or 16x16x8 tiles. It's the tile's color that decides: if its low 4 bits are high ($f,$1f,$2f etc) the tile is 8bpp, otherwise it's 4bpp */ INLINE void get_tile_info_16x16_8bit( running_machine &machine, tile_data &tileinfo, int tile_index, int layer, UINT16 *vram ) { hyprduel_state *state = machine.driver_data<hyprduel_state>(); UINT16 code; int table_index; UINT32 tile; /* The actual tile index depends on the window */ tile_index = ((tile_index / WIN_NX + state->m_window[layer * 2 + 0] / 8) % BIG_NY) * BIG_NX + ((tile_index % WIN_NX + state->m_window[layer * 2 + 1] / 8) % BIG_NX); /* Fetch the code */ code = vram[tile_index]; /* Use it as an index into the tiles set table */ table_index = ((code & 0x1ff0) >> 4) * 2; tile = (state->m_tiletable[table_index + 0] << 16) + state->m_tiletable[table_index + 1]; if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */ { int _code = code & 0x000f; tileinfo.pen_data = state->m_empty_tiles + _code * 16 * 16; tileinfo.palette_base = ((code & 0x0ff0)) + 0x1000; tileinfo.flags = 0; tileinfo.group = 0; } else if ((tile & 0x00f00000) == 0x00f00000) /* draw tile as 8bpp */ { tileinfo.group = 1; SET_TILE_INFO( 3, (tile & 0xfffff) + 8*(code & 0xf), ((tile & 0x0f000000) >> 24) + 0x10, TILE_FLIPXY((code & 0x6000) >> 13)); } else { tileinfo.group = 0; SET_TILE_INFO( 2, (tile & 0xfffff) + 4*(code & 0xf), (((tile & 0x0ff00000) >> 20)) + 0x100, TILE_FLIPXY((code & 0x6000) >> 13)); } } INLINE void hyprduel_vram_w( running_machine &machine, offs_t offset, UINT16 data, UINT16 mem_mask, int layer, UINT16 *vram ) { hyprduel_state *state = machine.driver_data<hyprduel_state>(); COMBINE_DATA(&vram[offset]); { /* Account for the window */ int col = (offset % BIG_NX) - ((state->m_window[layer * 2 + 1] / 8) % BIG_NX); int row = (offset / BIG_NX) - ((state->m_window[layer * 2 + 0] / 8) % BIG_NY); if (col < -(BIG_NX-WIN_NX)) col += (BIG_NX-WIN_NX) + WIN_NX; if (row < -(BIG_NY-WIN_NY)) row += (BIG_NY-WIN_NY) + WIN_NY; if ((col >= 0) && (col < WIN_NX) && (row >= 0) && (row < WIN_NY)) state->m_bg_tilemap[layer]->mark_tile_dirty(row * WIN_NX + col); } } TILE_GET_INFO_MEMBER(hyprduel_state::get_tile_info_0_8bit) { get_tile_info_8bit(machine(), tileinfo, tile_index, 0, m_vram_0); } TILE_GET_INFO_MEMBER(hyprduel_state::get_tile_info_1_8bit) { get_tile_info_8bit(machine(), tileinfo, tile_index, 1, m_vram_1); } TILE_GET_INFO_MEMBER(hyprduel_state::get_tile_info_2_8bit) { get_tile_info_8bit(machine(), tileinfo, tile_index, 2, m_vram_2); } WRITE16_MEMBER(hyprduel_state::hyprduel_vram_0_w) { hyprduel_vram_w(machine(), offset, data, mem_mask, 0, m_vram_0); } WRITE16_MEMBER(hyprduel_state::hyprduel_vram_1_w) { hyprduel_vram_w(machine(), offset, data, mem_mask, 1, m_vram_1); } WRITE16_MEMBER(hyprduel_state::hyprduel_vram_2_w) { hyprduel_vram_w(machine(), offset, data, mem_mask, 2, m_vram_2); } /* Dirty the relevant tilemap when its window changes */ WRITE16_MEMBER(hyprduel_state::hyprduel_window_w) { UINT16 olddata = m_window[offset]; UINT16 newdata = COMBINE_DATA(&m_window[offset]); if (newdata != olddata) { offset /= 2; m_bg_tilemap[offset]->mark_all_dirty(); } } /*************************************************************************** Video Init Routines ***************************************************************************/ /* Sprites are not tile based, so we decode their graphics at runtime. We can't do it at startup because drawgfx requires the tiles to be pre-rotated to support vertical games, and that, in turn, requires the tile's sizes to be known at startup - which we don't! */ static void alloc_empty_tiles( running_machine &machine ) { hyprduel_state *state = machine.driver_data<hyprduel_state>(); int code,i; state->m_empty_tiles = auto_alloc_array(machine, UINT8, 16*16*16); state->save_pointer(NAME(state->m_empty_tiles), 16*16*16); for (code = 0; code < 0x10; code++) for (i = 0; i < 16 * 16; i++) state->m_empty_tiles[16 * 16 * code + i] = code; } static void hyprduel_postload(running_machine &machine) { hyprduel_state *state = machine.driver_data<hyprduel_state>(); int i; for (i = 0; i < 3; i++) { UINT16 wx = state->m_window[i * 2 + 1]; UINT16 wy = state->m_window[i * 2 + 0]; state->m_bg_tilemap[i]->set_scrollx(0, state->m_scroll[i * 2 + 1] - wx - (wx & 7)); state->m_bg_tilemap[i]->set_scrolly(0, state->m_scroll[i * 2 + 0] - wy - (wy & 7)); state->m_bg_tilemap[i]->mark_all_dirty(); } } static void expand_gfx1(hyprduel_state &state) { UINT8 *base_gfx = state.machine().root_device().memregion("gfx1")->base(); UINT32 length = 2 * state.machine().root_device().memregion("gfx1")->bytes(); state.m_expanded_gfx1 = auto_alloc_array(state.machine(), UINT8, length); for (int i = 0; i < length; i += 2) { UINT8 src = base_gfx[i / 2]; state.m_expanded_gfx1[i+0] = src & 15; state.m_expanded_gfx1[i+1] = src >> 4; } } VIDEO_START_MEMBER(hyprduel_state,common_14220) { expand_gfx1(*this); alloc_empty_tiles(machine()); m_tiletable_old = auto_alloc_array(machine(), UINT16, m_tiletable.bytes() / 2); m_dirtyindex = auto_alloc_array(machine(), UINT8, m_tiletable.bytes() / 4); save_pointer(NAME(m_tiletable_old), m_tiletable.bytes() / 2); save_pointer(NAME(m_dirtyindex), m_tiletable.bytes() / 4); m_bg_tilemap[0] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(hyprduel_state::get_tile_info_0_8bit),this), TILEMAP_SCAN_ROWS, 8, 8, WIN_NX, WIN_NY); m_bg_tilemap[1] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(hyprduel_state::get_tile_info_1_8bit),this), TILEMAP_SCAN_ROWS, 8, 8, WIN_NX, WIN_NY); m_bg_tilemap[2] = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(hyprduel_state::get_tile_info_2_8bit),this), TILEMAP_SCAN_ROWS, 8, 8, WIN_NX, WIN_NY); m_bg_tilemap[0]->map_pen_to_layer(0, 15, TILEMAP_PIXEL_TRANSPARENT); m_bg_tilemap[0]->map_pen_to_layer(1, 255, TILEMAP_PIXEL_TRANSPARENT); m_bg_tilemap[1]->map_pen_to_layer(0, 15, TILEMAP_PIXEL_TRANSPARENT); m_bg_tilemap[1]->map_pen_to_layer(1, 255, TILEMAP_PIXEL_TRANSPARENT); m_bg_tilemap[2]->map_pen_to_layer(0, 15, TILEMAP_PIXEL_TRANSPARENT); m_bg_tilemap[2]->map_pen_to_layer(1, 255, TILEMAP_PIXEL_TRANSPARENT); m_bg_tilemap[0]->set_scrolldx(0, 0); m_bg_tilemap[1]->set_scrolldx(0, 0); m_bg_tilemap[2]->set_scrolldx(0, 0); /* Set up save state */ save_item(NAME(m_sprite_xoffs)); save_item(NAME(m_sprite_yoffs)); machine().save().register_postload(save_prepost_delegate(FUNC(hyprduel_postload), &machine())); } VIDEO_START_MEMBER(hyprduel_state,hyprduel_14220) { m_sprite_yoffs_sub = 2; VIDEO_START_CALL_MEMBER(common_14220); } VIDEO_START_MEMBER(hyprduel_state,magerror_14220) { m_sprite_yoffs_sub = 0; VIDEO_START_CALL_MEMBER(common_14220); } /*************************************************************************** Video Registers Offset: Bits: Value: 0.w Number Of Sprites To Draw 2.w f--- ---- ---- ---- Disabled Sprites Layer Priority -edc ---- ---- ---- ---- ba-- ---- ---- Sprites Masked Layer ---- --98 ---- ---- Sprites Priority ---- ---- 765- ---- ---- ---- ---4 3210 Sprites Masked Number 4.w Sprites Y Offset 6.w Sprites X Offset 8.w Sprites Color Codes Start - 10.w fedc ba98 76-- ---- ---- ---- --54 ---- Layer 2 Priority (3 backmost, 0 frontmost) ---- ---- ---- 32-- Layer 1 Priority ---- ---- ---- --10 Layer 0 Priority 12.w Backround Color ***************************************************************************/ /*************************************************************************** Sprites Drawing Offset: Bits: Value: 0.w fedc b--- ---- ---- Priority (0 = Max) ---- -a98 7654 3210 X 2.w fedc ba-- ---- ---- Zoom (Both X & Y) ---- --98 7654 3210 Y 4.w f--- ---- ---- ---- Flip X -e-- ---- ---- ---- Flip Y --dc b--- ---- ---- Size X * ---- -a98 ---- ---- Size Y * ---- ---- 7654 ---- Color ---- ---- ---- 3210 Code High Bits ** 6.w Code Low Bits ** * 8 pixel increments ** 8x8 pixel increments ***************************************************************************/ /* Draw sprites */ static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect ) { hyprduel_state *state = machine.driver_data<hyprduel_state>(); UINT8 *base_gfx4 = state->m_expanded_gfx1; UINT8 *base_gfx8 = state->memregion("gfx1")->base(); UINT32 gfx_size = state->memregion("gfx1")->bytes(); int max_x = machine.primary_screen->width(); int max_y = machine.primary_screen->height(); int max_sprites = state->m_spriteram.bytes() / 8; int sprites = state->m_videoregs[0x00 / 2] % max_sprites; int color_start = ((state->m_videoregs[0x08 / 2] & 0xf) << 4) + 0x100; int i, j, pri; static const int primask[4] = { 0x0000, 0xff00, 0xff00|0xf0f0, 0xff00|0xf0f0|0xcccc }; UINT16 *src; int inc; if (sprites == 0) return; for (i = 0; i < 0x20; i++) { if (!(state->m_videoregs[0x02 / 2] & 0x8000)) { src = state->m_spriteram + (sprites - 1) * (8 / 2); inc = -(8 / 2); } else { src = state->m_spriteram; inc = (8 / 2); } for (j = 0; j < sprites; j++) { int x, y, attr, code, color, flipx, flipy, zoom, curr_pri, width, height; /* Exponential zoom table extracted from daitoride */ static const int zoomtable[0x40] = { 0xAAC,0x800,0x668,0x554,0x494,0x400,0x390,0x334, 0x2E8,0x2AC,0x278,0x248,0x224,0x200,0x1E0,0x1C8, 0x1B0,0x198,0x188,0x174,0x164,0x154,0x148,0x13C, 0x130,0x124,0x11C,0x110,0x108,0x100,0x0F8,0x0F0, 0x0EC,0x0E4,0x0DC,0x0D8,0x0D4,0x0CC,0x0C8,0x0C4, 0x0C0,0x0BC,0x0B8,0x0B4,0x0B0,0x0AC,0x0A8,0x0A4, 0x0A0,0x09C,0x098,0x094,0x090,0x08C,0x088,0x080, 0x078,0x070,0x068,0x060,0x058,0x050,0x048,0x040 }; x = src[0]; curr_pri = (x & 0xf800) >> 11; if ((curr_pri == 0x1f) || (curr_pri != i)) { src += inc; continue; } pri = (state->m_videoregs[0x02 / 2] & 0x0300) >> 8; if (!(state->m_videoregs[0x02 / 2] & 0x8000)) { if (curr_pri > (state->m_videoregs[0x02 / 2] & 0x1f)) pri = (state->m_videoregs[0x02 / 2] & 0x0c00) >> 10; } y = src[1]; attr = src[2]; code = src[3]; flipx = attr & 0x8000; flipy = attr & 0x4000; color = (attr & 0xf0) >> 4; zoom = zoomtable[(y & 0xfc00) >> 10] << (16 - 8); x = (x & 0x07ff) - state->m_sprite_xoffs; y = (y & 0x03ff) - state->m_sprite_yoffs; width = (((attr >> 11) & 0x7) + 1) * 8; height = (((attr >> 8) & 0x7) + 1) * 8; UINT32 gfxstart = (8 * 8 * 4 / 8) * (((attr & 0x000f) << 16) + code); if (state->flip_screen()) { flipx = !flipx; x = max_x - x - width; flipy = !flipy; y = max_y - y - height; } if (color == 0xf) /* 8bpp */ { /* Bounds checking */ if ((gfxstart + width * height - 1) >= gfx_size) continue; gfx_element gfx(machine, base_gfx8 + gfxstart, width, height, width, 0, 256); pdrawgfxzoom_transpen(bitmap,cliprect, &gfx, 0, color_start >> 4, flipx, flipy, x, y, zoom, zoom, machine.priority_bitmap,primask[pri], 255); } else { /* Bounds checking */ if ((gfxstart + width / 2 * height - 1) >= gfx_size) continue; gfx_element gfx(machine, base_gfx4 + 2 * gfxstart, width, height, width, 0, 16); pdrawgfxzoom_transpen(bitmap,cliprect, &gfx, 0, color + color_start, flipx, flipy, x, y, zoom, zoom, machine.priority_bitmap,primask[pri], 15); } #if 0 { /* Display priority + zoom on each sprite */ char buf[80]; sprintf(buf, "%02X %02X",((src[ 0 ] & 0xf800) >> 11)^0x1f,((src[ 1 ] & 0xfc00) >> 10) ); ui_draw_text(buf, x, y); } #endif src += inc; } } } /*************************************************************************** Screen Drawing ***************************************************************************/ WRITE16_MEMBER(hyprduel_state::hyprduel_scrollreg_w) { UINT16 window = m_window[offset]; COMBINE_DATA(&m_scroll[offset]); if (offset & 0x01) m_bg_tilemap[offset / 2]->set_scrollx(0, m_scroll[offset] - window - (window & 7)); else m_bg_tilemap[offset / 2]->set_scrolly(0, m_scroll[offset] - window - (window & 7)); } WRITE16_MEMBER(hyprduel_state::hyprduel_scrollreg_init_w) { int i; for (i = 0; i < 3; i++) { UINT16 wx = m_window[i * 2 + 1]; UINT16 wy = m_window[i * 2 + 0]; m_scroll[i * 2 + 1] = data; m_scroll[i * 2 + 0] = data; m_bg_tilemap[i]->set_scrollx(0, data - wx - (wx & 7)); m_bg_tilemap[i]->set_scrolly(0, data - wy - (wy & 7)); } } static void draw_layers( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int layers_ctrl ) { hyprduel_state *state = machine.driver_data<hyprduel_state>(); UINT16 layers_pri = state->m_videoregs[0x10/2]; int layer; /* Draw all the layers with priority == pri */ for (layer = 2; layer >= 0; layer--) // tilemap[2] below? { if ( pri == ((layers_pri >> (layer*2)) & 3) ) { if (layers_ctrl & (1 << layer)) // for debug state->m_bg_tilemap[layer]->draw(bitmap, cliprect, 0, 1 << (3 - pri)); } } } /* Dirty tilemaps when the tiles set changes */ static void dirty_tiles( running_machine &machine, int layer, UINT16 *vram ) { hyprduel_state *state = machine.driver_data<hyprduel_state>(); int col, row; for (row = 0; row < WIN_NY; row++) { for (col = 0; col < WIN_NX; col++) { int offset = (col + state->m_window[layer * 2 + 1] / 8) % BIG_NX + ((row + state->m_window[layer * 2 + 0] / 8) % BIG_NY) * BIG_NX; UINT16 code = vram[offset]; if (!(code & 0x8000) && state->m_dirtyindex[(code & 0x1ff0) >> 4]) state->m_bg_tilemap[layer]->mark_tile_dirty(row * WIN_NX + col); } } } SCREEN_UPDATE_IND16( hyprduel ) { hyprduel_state *state = screen.machine().driver_data<hyprduel_state>(); int i, pri, layers_ctrl = -1; UINT16 screenctrl = *state->m_screenctrl; { int dirty = 0; memset(state->m_dirtyindex, 0, state->m_tiletable.bytes() / 4); for (i = 0; i < state->m_tiletable.bytes() / 4; i++) { UINT32 tile_new = (state->m_tiletable[2 * i + 0] << 16 ) + state->m_tiletable[2 * i + 1]; UINT32 tile_old = (state->m_tiletable_old[2 * i + 0] << 16 ) + state->m_tiletable_old[2 * i + 1]; if ((tile_new ^ tile_old) & 0x0fffffff) { state->m_dirtyindex[i] = 1; dirty = 1; } } memcpy(state->m_tiletable_old, state->m_tiletable, state->m_tiletable.bytes()); if (dirty) { dirty_tiles(screen.machine(), 0, state->m_vram_0); dirty_tiles(screen.machine(), 1, state->m_vram_1); dirty_tiles(screen.machine(), 2, state->m_vram_2); } } state->m_sprite_xoffs = state->m_videoregs[0x06 / 2] - screen.width() / 2; state->m_sprite_yoffs = state->m_videoregs[0x04 / 2] - screen.height() / 2 - state->m_sprite_yoffs_sub; /* The background color is selected by a register */ screen.machine().priority_bitmap.fill(0, cliprect); bitmap.fill((state->m_videoregs[0x12 / 2] & 0x0fff) + 0x1000, cliprect); /* Screen Control Register: f--- ---- ---- ---- ? -edc b--- ---- ---- ---- -a98 ---- ---- ? Leds ---- ---- 7--- ---- 16x16 Tiles (Layer 2) ---- ---- -6-- ---- 16x16 Tiles (Layer 1) ---- ---- --5- ---- 16x16 Tiles (Layer 0) ---- ---- ---4 32-- ---- ---- ---- --1- ? Blank Screen ---- ---- ---- ---0 Flip Screen */ if (screenctrl & 2) return 0; state->flip_screen_set(screenctrl & 1); #if 0 if (screen.machine().input().code_pressed(KEYCODE_Z)) { int msk = 0; if (screen.machine().input().code_pressed(KEYCODE_Q)) msk |= 0x01; if (screen.machine().input().code_pressed(KEYCODE_W)) msk |= 0x02; if (screen.machine().input().code_pressed(KEYCODE_E)) msk |= 0x04; if (screen.machine().input().code_pressed(KEYCODE_A)) msk |= 0x08; if (msk != 0) { bitmap.fill(0, cliprect); layers_ctrl &= msk; } popmessage("%x-%x-%x:%04x %04x %04x", state->m_videoregs[0x10/2]&3,(state->m_videoregs[0x10/2] & 0xc) >> 2, (state->m_videoregs[0x10/2] & 0x30) >> 4, state->m_videoregs[0x02/2], state->m_videoregs[0x08/2], *state->m_screenctrl); } #endif for (pri = 3; pri >= 0; pri--) draw_layers(screen.machine(), bitmap, cliprect, pri, layers_ctrl); if (layers_ctrl & 0x08) draw_sprites(screen.machine(), bitmap, cliprect); return 0; }
[ "mameppk@199a702f-54f1-4ac0-8451-560dfe28270b" ]
mameppk@199a702f-54f1-4ac0-8451-560dfe28270b
422ad3573de9a5cfe1d70016e2b6da72fc0382d3
e37c46a141827d831c6868b9677bba95de1e34bb
/bareMetal/dijk15x15/dijkstra_155.c
75d1d99d3e7a2de37b4f68662e23f490d1957f70
[]
no_license
guimadalozzo/OVP-MPSoC-NoC
0eb24342c18b6513ac920c8c44deb15d6be11443
8842cf92068ef64165efe1061e263a6c2e846f52
refs/heads/master
2020-04-01T18:48:49.032309
2018-10-31T19:41:03
2018-10-31T19:41:03
153,516,330
0
2
null
2018-12-05T19:04:22
2018-10-17T20:02:29
C
UTF-8
C
false
false
3,979
c
#include <stdlib.h> #include <stdio.h> #include "MPIe.h" #include "tasks_comm.h" #define NONE 9999 //Maximum #define MAXPROCESSORS 64 //The amount of processor #define NUM_NODES 16 //16 for small input; 160 for large input; 30 for medium input; int rank = 155; struct _NODE{ int iDist; int iPrev; int iCatched; }; typedef struct _NODE NODE; struct _UVERTEX{ int iPID; int iNID; int iDist; }; typedef struct _UVERTEX UVERTEX; UVERTEX uVertex[MAXPROCESSORS]; NODE rgnNodes[MAXPROCESSORS][NUM_NODES]; int g_qCount[MAXPROCESSORS]; int paths; int resultSend[33]; int tasks[MAXPROCESSORS][2]; int nodes_tasks[NUM_NODES*(NUM_NODES-1)/2][2]; int AdjMatrix[NUM_NODES][NUM_NODES]; int globalMiniCost[MAXPROCESSORS]; int qtdEnvios = 0; int qcount (int myID){ return(g_qCount[myID]); } void sendPath(NODE *rgnNodes, int chNode){ if ((rgnNodes+chNode)->iPrev != NONE){ sendPath(rgnNodes, (rgnNodes+chNode)->iPrev); } resultSend[paths] = chNode+1; paths++; } void sendResult(int myID,int chStart, int chEnd){ paths = 3; int k; for(k=0; k<33; k++) resultSend[k] = 0; resultSend[0] = chStart; resultSend[1] = chEnd; resultSend[2] = rgnNodes[myID][chEnd].iDist; sendPath(rgnNodes[myID], chEnd); Message msg; msg.length = 33; msg.msg[0] = -1; for(k=0; k<33; k++) msg.msg[k] = resultSend[k]; Send(msg, divider); } void dijkstra(int myID) { int x,i,v; int chStart, chEnd; int u =-1; for(x=tasks[myID][0]; x<tasks[myID][1]; x++){ chStart = nodes_tasks[x][0]; //Start node chEnd = nodes_tasks[x][1]; //End node u=-1; //Initialize and clear uVertex[myID].iDist=NONE; uVertex[myID].iPID=myID; uVertex[myID].iNID=NONE; g_qCount[myID] = 0; u=-1; for (v=0; v<NUM_NODES; v++) { rgnNodes[myID][v].iDist = AdjMatrix[chStart][v]; rgnNodes[myID][v].iPrev = NONE; rgnNodes[myID][v].iCatched = 0; } //Start working while (qcount(myID) < NUM_NODES-1){ for (i=0; i<NUM_NODES; i++) { if(rgnNodes[myID][i].iCatched==0 && rgnNodes[myID][i].iDist<uVertex[myID].iDist && rgnNodes[myID][i].iDist!=0){ uVertex[myID].iDist=rgnNodes[myID][i].iDist; uVertex[myID].iNID=i; } } globalMiniCost[myID]=NONE; if(globalMiniCost[myID]>uVertex[myID].iDist){ globalMiniCost[myID] = uVertex[myID].iDist; u=uVertex[myID].iNID; g_qCount[myID]++; } for (v=0; v<NUM_NODES; v++) { if(v==u){ rgnNodes[myID][v].iCatched = 1; continue; } if((rgnNodes[myID][v].iCatched==0 && rgnNodes[myID][v].iDist>(rgnNodes[myID][u].iDist+AdjMatrix[u][v]))){ rgnNodes[myID][v].iDist=rgnNodes[myID][u].iDist+AdjMatrix[u][v]; rgnNodes[myID][v].iPrev = u; } } uVertex[myID].iDist = NONE; //Reset } sendResult(myID,chStart,chEnd); qtdEnvios++; } Message msg; msg.length = 33; msg.msg[0] = -1; Send(msg, divider); //MADA ECHO("finaliza\n"); } int main(int argc, char *argv[]) { MemoryWrite(INITIALIZE_ROUTER, 156); int i, j; Message msg; msg.length = NUM_NODES*(NUM_NODES-1)/2; msg = Receive(); //MADAmsg, divider); for (i=0; i<(NUM_NODES*(NUM_NODES-1)/2); i++) nodes_tasks[i][0] = msg.msg[i]; msg = Receive(); //MADAmsg, divider); for (i=0; i<(NUM_NODES*(NUM_NODES-1)/2); i++) nodes_tasks[i][1] = msg.msg[i]; msg.length = MAXPROCESSORS; msg = Receive(); //MADAmsg, divider); for (i=0; i<MAXPROCESSORS; i++) { tasks[i][0] = msg.msg[i]; } msg = Receive(); //MADAmsg, divider); for (i=0; i<MAXPROCESSORS; i++) { tasks[i][1] = msg.msg[i]; } msg.length = NUM_NODES; for (i=0; i<NUM_NODES; i++) { msg = Receive(); //MADAmsg, divider); for (j=0; j<NUM_NODES; j++) AdjMatrix[j][i] = msg.msg[j]; } for(i=0; i<NUM_NODES; i++) { //MADA ECHO(" D1: "); for(j=0; j<NUM_NODES; j++) { //MADA ECHO(itoa(AdjMatrix[i][j])); //MADA ECHO(" "); } //MADA ECHO("\n"); } dijkstra(rank); //MADA ECHO(itoa(GetTick())); printf("Dijkstra_155 finished."); MemoryWrite(END_SIM, 156); return 0; }
[ "guimadalozzo@gmail.com" ]
guimadalozzo@gmail.com
ef97a41500a17f4ce43d67ba9e7f8dd2f8a1ecea
9d305211900776052b21bd203d7f94c815f3d19d
/proc.c
fe7914b839816112a787cbec60f1d2d233fb0886
[ "MIT" ]
permissive
iDarkknight/COL331_XV6
c5b6ed69ceea0887cc30e5fafad47c24e7ba6959
ab041fb7fa40653e300e02404f7bf894b43e3990
refs/heads/master
2021-04-29T23:09:22.588734
2018-02-14T19:02:42
2018-02-14T19:02:42
121,548,849
0
0
null
null
null
null
UTF-8
C
false
false
12,026
c
#include "types.h" #include "defs.h" #include "param.h" #include "memlayout.h" #include "mmu.h" #include "x86.h" #include "proc.h" #include "spinlock.h" struct { struct spinlock lock; struct proc proc[NPROC]; } ptable; static struct proc *initproc; int nextpid = 1; extern void forkret(void); extern void trapret(void); static void wakeup1(void *chan); void pinit(void) { initlock(&ptable.lock, "ptable"); } // Must be called with interrupts disabled int cpuid() { return mycpu()-cpus; } // Must be called with interrupts disabled to avoid the caller being // rescheduled between reading lapicid and running through the loop. struct cpu* mycpu(void) { int apicid, i; if(readeflags()&FL_IF) panic("mycpu called with interrupts enabled\n"); apicid = lapicid(); // APIC IDs are not guaranteed to be contiguous. Maybe we should have // a reverse map, or reserve a register to store &cpus[i]. for (i = 0; i < ncpu; ++i) { if (cpus[i].apicid == apicid) return &cpus[i]; } panic("unknown apicid\n"); } // Disable interrupts so that we are not rescheduled // while reading proc from the cpu structure struct proc* myproc(void) { struct cpu *c; struct proc *p; pushcli(); c = mycpu(); p = c->proc; popcli(); return p; } //PAGEBREAK: 32 // Look in the process table for an UNUSED proc. // If found, change state to EMBRYO and initialize // state required to run in the kernel. // Otherwise return 0. static struct proc* allocproc(void) { struct proc *p; char *sp; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) if(p->state == UNUSED) goto found; release(&ptable.lock); return 0; found: p->state = EMBRYO; p->pid = nextpid++; release(&ptable.lock); // Allocate kernel stack. if((p->kstack = kalloc()) == 0){ p->state = UNUSED; return 0; } sp = p->kstack + KSTACKSIZE; // Leave room for trap frame. sp -= sizeof *p->tf; p->tf = (struct trapframe*)sp; // Set up new context to start executing at forkret, // which returns to trapret. sp -= 4; *(uint*)sp = (uint)trapret; sp -= sizeof *p->context; p->context = (struct context*)sp; memset(p->context, 0, sizeof *p->context); p->context->eip = (uint)forkret; return p; } //PAGEBREAK: 32 // Set up first user process. void userinit(void) { struct proc *p; extern char _binary_initcode_start[], _binary_initcode_size[]; p = allocproc(); initproc = p; if((p->pgdir = setupkvm()) == 0) panic("userinit: out of memory?"); inituvm(p->pgdir, _binary_initcode_start, (int)_binary_initcode_size); p->sz = PGSIZE; memset(p->tf, 0, sizeof(*p->tf)); p->tf->cs = (SEG_UCODE << 3) | DPL_USER; p->tf->ds = (SEG_UDATA << 3) | DPL_USER; p->tf->es = p->tf->ds; p->tf->ss = p->tf->ds; p->tf->eflags = FL_IF; p->tf->esp = PGSIZE; p->tf->eip = 0; // beginning of initcode.S safestrcpy(p->name, "initcode", sizeof(p->name)); p->cwd = namei("/"); // this assignment to p->state lets other cores // run this process. the acquire forces the above // writes to be visible, and the lock is also needed // because the assignment might not be atomic. acquire(&ptable.lock); p->state = RUNNABLE; release(&ptable.lock); } // Grow current process's memory by n bytes. // Return 0 on success, -1 on failure. int growproc(int n) { uint sz; struct proc *curproc = myproc(); sz = curproc->sz; if(n > 0){ if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0) return -1; } else if(n < 0){ if((sz = deallocuvm(curproc->pgdir, sz, sz + n)) == 0) return -1; } curproc->sz = sz; switchuvm(curproc); return 0; } // Create a new process copying p as the parent. // Sets up stack to return as if from system call. // Caller must set state of returned proc to RUNNABLE. int fork(void) { int i, pid; struct proc *np; struct proc *curproc = myproc(); // Allocate process. if((np = allocproc()) == 0){ return -1; } // Copy process state from proc. if((np->pgdir = copyuvm(curproc->pgdir, curproc->sz)) == 0){ kfree(np->kstack); np->kstack = 0; np->state = UNUSED; return -1; } np->sz = curproc->sz; np->parent = curproc; *np->tf = *curproc->tf; // Clear %eax so that fork returns 0 in the child. np->tf->eax = 0; for(i = 0; i < NOFILE; i++) if(curproc->ofile[i]) np->ofile[i] = filedup(curproc->ofile[i]); np->cwd = idup(curproc->cwd); safestrcpy(np->name, curproc->name, sizeof(curproc->name)); pid = np->pid; acquire(&ptable.lock); np->state = RUNNABLE; release(&ptable.lock); return pid; } // Exit the current process. Does not return. // An exited process remains in the zombie state // until its parent calls wait() to find out it exited. void exit(void) { struct proc *curproc = myproc(); struct proc *p; int fd; if(curproc == initproc) panic("init exiting"); // Close all open files. for(fd = 0; fd < NOFILE; fd++){ if(curproc->ofile[fd]){ fileclose(curproc->ofile[fd]); curproc->ofile[fd] = 0; } } begin_op(); iput(curproc->cwd); end_op(); curproc->cwd = 0; acquire(&ptable.lock); // Parent might be sleeping in wait(). wakeup1(curproc->parent); // Pass abandoned children to init. for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->parent == curproc){ p->parent = initproc; if(p->state == ZOMBIE) wakeup1(initproc); } } // Jump into the scheduler, never to return. curproc->state = ZOMBIE; sched(); panic("zombie exit"); } // Wait for a child process to exit and return its pid. // Return -1 if this process has no children. int wait(void) { struct proc *p; int havekids, pid; struct proc *curproc = myproc(); acquire(&ptable.lock); for(;;){ // Scan through table looking for exited children. havekids = 0; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->parent != curproc) continue; havekids = 1; if(p->state == ZOMBIE){ // Found one. pid = p->pid; kfree(p->kstack); p->kstack = 0; freevm(p->pgdir); p->pid = 0; p->parent = 0; p->name[0] = 0; p->killed = 0; p->state = UNUSED; release(&ptable.lock); return pid; } } // No point waiting if we don't have any children. if(!havekids || curproc->killed){ release(&ptable.lock); return -1; } // Wait for children to exit. (See wakeup1 call in proc_exit.) sleep(curproc, &ptable.lock); //DOC: wait-sleep } } //PAGEBREAK: 42 // Per-CPU process scheduler. // Each CPU calls scheduler() after setting itself up. // Scheduler never returns. It loops, doing: // - choose a process to run // - swtch to start running that process // - eventually that process transfers control // via swtch back to the scheduler. void scheduler(void) { struct proc *p; struct cpu *c = mycpu(); c->proc = 0; for(;;){ // Enable interrupts on this processor. sti(); // Loop over process table looking for process to run. acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->state != RUNNABLE) continue; // Switch to chosen process. It is the process's job // to release ptable.lock and then reacquire it // before jumping back to us. c->proc = p; switchuvm(p); p->state = RUNNING; swtch(&(c->scheduler), p->context); switchkvm(); // Process is done running for now. // It should have changed its p->state before coming back. c->proc = 0; } release(&ptable.lock); } } // Enter scheduler. Must hold only ptable.lock // and have changed proc->state. Saves and restores // intena because intena is a property of this // kernel thread, not this CPU. It should // be proc->intena and proc->ncli, but that would // break in the few places where a lock is held but // there's no process. void sched(void) { int intena; struct proc *p = myproc(); if(!holding(&ptable.lock)) panic("sched ptable.lock"); if(mycpu()->ncli != 1) panic("sched locks"); if(p->state == RUNNING) panic("sched running"); if(readeflags()&FL_IF) panic("sched interruptible"); intena = mycpu()->intena; swtch(&p->context, mycpu()->scheduler); mycpu()->intena = intena; } // Give up the CPU for one scheduling round. void yield(void) { acquire(&ptable.lock); //DOC: yieldlock myproc()->state = RUNNABLE; sched(); release(&ptable.lock); } // A fork child's very first scheduling by scheduler() // will swtch here. "Return" to user space. void forkret(void) { static int first = 1; // Still holding ptable.lock from scheduler. release(&ptable.lock); if (first) { // Some initialization functions must be run in the context // of a regular process (e.g., they call sleep), and thus cannot // be run from main(). first = 0; iinit(ROOTDEV); initlog(ROOTDEV); } // Return to "caller", actually trapret (see allocproc). } // Atomically release lock and sleep on chan. // Reacquires lock when awakened. void sleep(void *chan, struct spinlock *lk) { struct proc *p = myproc(); if(p == 0) panic("sleep"); if(lk == 0) panic("sleep without lk"); // Must acquire ptable.lock in order to // change p->state and then call sched. // Once we hold ptable.lock, we can be // guaranteed that we won't miss any wakeup // (wakeup runs with ptable.lock locked), // so it's okay to release lk. if(lk != &ptable.lock){ //DOC: sleeplock0 acquire(&ptable.lock); //DOC: sleeplock1 release(lk); } // Go to sleep. p->chan = chan; p->state = SLEEPING; sched(); // Tidy up. p->chan = 0; // Reacquire original lock. if(lk != &ptable.lock){ //DOC: sleeplock2 release(&ptable.lock); acquire(lk); } } //PAGEBREAK! // Wake up all processes sleeping on chan. // The ptable lock must be held. static void wakeup1(void *chan) { struct proc *p; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++) if(p->state == SLEEPING && p->chan == chan) p->state = RUNNABLE; } // Wake up all processes sleeping on chan. void wakeup(void *chan) { acquire(&ptable.lock); wakeup1(chan); release(&ptable.lock); } // Kill the process with the given pid. // Process won't exit until it returns // to user space (see trap in trap.c). int kill(int pid) { struct proc *p; acquire(&ptable.lock); for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->pid == pid){ p->killed = 1; // Wake process from sleep if necessary. if(p->state == SLEEPING) p->state = RUNNABLE; release(&ptable.lock); return 0; } } release(&ptable.lock); return -1; } //PAGEBREAK: 36 // Print a process listing to console. For debugging. // Runs when user types ^P on console. // No lock to avoid wedging a stuck machine further. void procdump(void) { static char *states[] = { [UNUSED] "unused", [EMBRYO] "embryo", [SLEEPING] "sleep ", [RUNNABLE] "runble", [RUNNING] "run ", [ZOMBIE] "zombie" }; int i; struct proc *p; char *state; uint pc[10]; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->state == UNUSED) continue; if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) state = states[p->state]; else state = "???"; cprintf("%d %s %s", p->pid, state, p->name); if(p->state == SLEEPING){ getcallerpcs((uint*)p->context->ebp+2, pc); for(i=0; i<10 && pc[i] != 0; i++) cprintf(" %p", pc[i]); } cprintf("\n"); } } //My EDIT 1 /*My Procdump*/ void myprocdump(void) { struct proc *p; for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->state == UNUSED ||p->state == EMBRYO || p->state == ZOMBIE ) continue; cprintf("pid:%d name:%s", p->pid, p->name); cprintf("\n"); } } //My EDIT 1
[ "sourabh.basuthkar@gmail.com" ]
sourabh.basuthkar@gmail.com
41419c1ec6e2bf9e72e330cf9f9eb35229ab7287
16caae4586ae492d6e5f1e0a2abd3bcbc9fcbd18
/ChattingServer_v1.1/StressServer/Packet.h
496c31f51403c14cff82775b80fb1f4d4a9194d6
[]
no_license
mingdyuo/TCP-socket-chatting-server
98e5e074fa655230b541d4955ed03dbf1d571ddf
98c40617bdf6d14a7cad24e6ccee4c700bd9ddee
refs/heads/main
2023-05-05T02:24:52.586361
2021-05-30T09:10:14
2021-05-30T09:10:14
350,212,412
1
1
null
2021-03-25T08:59:24
2021-03-22T04:59:35
C++
UTF-8
C
false
false
1,634
h
#pragma once #include <windows.h> #ifndef _STRUCT_PACKET #define _STRUCT_PACKET enum eAction : UINT16 { UNINITIALIZED = 0, SERVER_ENTER = 11, SERVER_EXIT = 12, ROOM_ENTER = 21, ROOM_EXIT = 22, CHAT_BROADCAST = 31, CHAT_MULTICAST = 32, CHAT_UNICAST = 33, LIST_CURRENT_ROOM = 41, LIST_ALL_ROOM = 42, LIST_LOBBY = 43, SERVER_MESSAGE = 51, }; enum eMessage : UINT32 { NICKNAME_ALREADY_EXIST = 1, NICKNAME_CREATED, NICKNAME_NOT_FOUND, }; #pragma pack(push, 1) struct PACKET_HEADER { UINT16 Length; UINT16 Type; }; const UINT32 PACKET_HEADER_LENGTH = sizeof(PACKET_HEADER); const int MAX_NICKNAME_LEN = 32; const int MAX_CONTENT_LEN = 900; typedef struct SYSTEM_PACKET : public PACKET_HEADER { char Sender[MAX_NICKNAME_LEN]; }ROOM_EXIT_PACKET, SERVER_ENTER_PACKET, SERVER_EXIT_PACKET; struct ROOM_ENTER_PACKET : public SYSTEM_PACKET { int RoomNo; }; const int ROOM_ENTER_PACKET_LENGTH = sizeof(ROOM_ENTER_PACKET); typedef struct CHAT_PACKET : public PACKET_HEADER { char Sender[MAX_NICKNAME_LEN]; char Content[MAX_CONTENT_LEN]; }MULTICAST_PACKET, BROADCAST_PACKET; const int CHAT_PACKET_LENGTH = sizeof(CHAT_PACKET); struct UNICAST_PACKET : public PACKET_HEADER { char Recver[MAX_NICKNAME_LEN]; char Sender[MAX_NICKNAME_LEN]; char Content[MAX_CONTENT_LEN]; }; const int UNICAST_BASE_LENGTH = MAX_NICKNAME_LEN * 2 + PACKET_HEADER_LENGTH; struct SERVER_MESSAGE_PACKET : public PACKET_HEADER { UINT32 Message; }; const int SERVER_MESSAGE_PACKET_LENGTH = sizeof(SERVER_MESSAGE_PACKET); #pragma pack(pop) #endif
[ "phera5432@naver.com" ]
phera5432@naver.com
df2572158eaf64e3e635be18d04e26bcf6d5306c
9ef7736ef3efb7c801208fc9d5de8c3b74e75362
/src/ds1963s-emulator-yaml.c
f5b847f4d6cf2968745062bde3bc685505c9e1fb
[]
no_license
rhuizer/ds1963s-utils
dc7567811bfc92dabcf5b55dedbb86fa4a860dc5
29eaff8a9b6390139427253c9203cf7cd960a93f
refs/heads/master
2022-11-24T10:31:57.741170
2022-11-15T10:13:29
2022-11-15T10:13:29
5,484,318
7
1
null
null
null
null
UTF-8
C
false
false
15,688
c
/* ds1963s-emulator-yaml.c * * Parse a yaml configuration defining the ds1963s ibutton to emulate. * * Dedicated to Yuzuyu Arielle Huizer. * * Not a fan of libyaml in C, this code is a horribly convoluted state machine. * Either I've gotten the use wrong, or the design of libyaml is bad. Instead * of saving time and work it wasted and created it, which is the opposite of * what a good library is supposed to do. * * Copyright (C) 2016-2019 Ronald Huizer <rhuizer@hexpedition.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ #include <ctype.h> #include <yaml.h> #include "ds1963s-common.h" #include "ds1963s-device.h" #define STATE_INIT 0 #define STATE_DOCUMENT 1 #define STATE_GLOBAL_MAP 2 #define STATE_KEY 3 #define STATE_FAMILY 4 #define STATE_SERIAL 5 #define STATE_CRC8 6 #define STATE_PRNG_COUNTER 7 #define STATE_WRITE_CYCLE_MAP 8 #define STATE_WRITE_CYCLE_KEY 9 #define STATE_WRITE_CYCLE_VALUE 10 #define STATE_NVRAM_MAP 11 #define STATE_NVRAM_KEY 12 #define STATE_NVRAM_VALUE 13 #define STATE_SECRET_MAP 14 #define STATE_SECRET_KEY 15 #define STATE_SECRET_VALUE 16 #define STATE_DOCUMENT_END 17 #define STATE_STREAM_END 18 #define SEEN_FAMILY 1 #define SEEN_SERIAL 2 #define SEEN_CRC8 4 #define SEEN_PRNG_COUNTER 8 #define SEEN_SECRET 16 #define SEEN_WRITE_CYCLE 32 #define SEEN_NVRAM 64 #define SEEN_ALL 127 struct parser_context { yaml_parser_t parser; yaml_event_t event; int state; uint16_t key_seen; uint8_t family; uint8_t serial[6]; uint32_t prng_counter; uint32_t * wcp; uint16_t wc_seen; uint32_t data_wc[8]; uint32_t secret_wc[8]; uint8_t * nvp; uint16_t nvram_seen; uint8_t nvram[512]; uint8_t * sp; uint8_t secret_seen; uint8_t secret[64]; }; static void __parser_init(struct parser_context *ctx, FILE *fp) { memset(ctx, 0, sizeof *ctx); yaml_parser_initialize(&ctx->parser); yaml_parser_set_input_file(&ctx->parser, fp); ctx->state = STATE_INIT; } static void __parser_error(struct parser_context *ctx) { assert(ctx != NULL); fprintf(stderr, "Parse error %d: %s\n", ctx->parser.error, ctx->parser.problem); yaml_parser_delete(&ctx->parser); exit(EXIT_FAILURE); } static void __parser_parse(struct parser_context *ctx) { if (yaml_parser_parse(&ctx->parser, &ctx->event) == -1) __parser_error(ctx); } static void __yaml_key_error(yaml_parser_t *parser, const char *key) { fprintf(stderr, "Parse error: unknown key `%s'.\n", key); yaml_parser_delete(parser); exit(EXIT_FAILURE); } static unsigned int __parse_int(yaml_parser_t *parser, const char *s) { char *endptr; int ret; if (*s == 0) { fprintf(stderr, "Parse error: empty value.\n"); yaml_parser_delete(parser); exit(EXIT_FAILURE); } ret = strtoul(s, &endptr, 16); if (*endptr != 0) { fprintf(stderr, "Parse error: invalid integer: `%s'\n", endptr); yaml_parser_delete(parser); exit(EXIT_FAILURE); } return ret; } static void __is_hex_string(yaml_parser_t *parser, const char *s) { for (; *s != 0; s++) { if (!isxdigit(*s)) { fprintf(stderr, "Parse error: invalid hex string: `%s'\n", s); yaml_parser_delete(parser); exit(EXIT_FAILURE); } } } static void __is_length(yaml_parser_t *parser, const char *s, size_t size) { if (strlen(s) != size) { fprintf(stderr, "Parse error: invalid length: `%s'. " "Expected %zu.\n", s, size); yaml_parser_delete(parser); exit(EXIT_FAILURE); } } static void __handle_init(struct parser_context *ctx) { assert(ctx != NULL); assert(ctx->state == STATE_INIT); if (ctx->event.type != YAML_STREAM_START_EVENT) { fprintf(stderr, "Expected start event.\n"); exit(EXIT_FAILURE); } ctx->state = STATE_DOCUMENT; } static void __handle_stream_end(struct parser_context *ctx) { assert(ctx != NULL); assert(ctx->state == STATE_STREAM_END); if (ctx->event.type != YAML_STREAM_END_EVENT) { fprintf(stderr, "Expected stream end event.\n"); exit(EXIT_FAILURE); } } static void __handle_global_map(struct parser_context *ctx) { assert(ctx != NULL); assert(ctx->state == STATE_GLOBAL_MAP); if (ctx->event.type != YAML_MAPPING_START_EVENT) { fprintf(stderr, "Expected map start event.\n"); exit(EXIT_FAILURE); } ctx->state = STATE_KEY; } static void __handle_global_key(struct parser_context *ctx) { const char *str; if (ctx->event.type == YAML_MAPPING_END_EVENT) { if (ctx->key_seen != SEEN_ALL) { fprintf(stderr, "Warning: not all keys have been " "defined.\n"); } ctx->state = STATE_DOCUMENT_END; return; } if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } str = (char *)ctx->event.data.scalar.value; if (strcmp(str, "family") == 0) ctx->state = STATE_FAMILY; else if (strcmp(str, "serial") == 0) ctx->state = STATE_SERIAL; else if (strcmp(str, "crc8") == 0) ctx->state = STATE_CRC8; else if (strcmp(str, "write_cycle_counters") == 0) ctx->state = STATE_WRITE_CYCLE_MAP; else if (strcmp(str, "nvram") == 0) ctx->state = STATE_NVRAM_MAP; else if (strcmp(str, "prng_counter") == 0) ctx->state = STATE_PRNG_COUNTER; else if (strcmp(str, "secrets") == 0) ctx->state = STATE_SECRET_MAP; else __yaml_key_error(&ctx->parser, str); } static void __handle_family(struct parser_context *ctx) { const char *str; if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } str = (char *)ctx->event.data.scalar.value; ctx->family = __parse_int(&ctx->parser, str); ctx->state = STATE_KEY; ctx->key_seen |= SEEN_FAMILY; } static void __handle_serial(struct parser_context *ctx) { const char *str; if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } str = (char *)ctx->event.data.scalar.value; __is_hex_string(&ctx->parser, str); __is_length(&ctx->parser, str, sizeof(ctx->serial) * 2); hex_decode(ctx->serial, str, sizeof ctx->serial); ctx->state = STATE_KEY; ctx->key_seen |= SEEN_SERIAL; } static void __handle_prng(struct parser_context *ctx) { const char *str; if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } str = (char *)ctx->event.data.scalar.value; ctx->prng_counter = __parse_int(&ctx->parser, str); ctx->state = STATE_KEY; ctx->key_seen |= SEEN_PRNG_COUNTER; } static void __handle_document(struct parser_context *ctx) { assert(ctx != NULL); assert(ctx->state == STATE_DOCUMENT); if (ctx->event.type != YAML_DOCUMENT_START_EVENT) { fprintf(stderr, "Expected start event.\n"); exit(EXIT_FAILURE); } ctx->state = STATE_GLOBAL_MAP; } static void __handle_document_end(struct parser_context *ctx) { assert(ctx != NULL); assert(ctx->state == STATE_DOCUMENT_END); if (ctx->event.type != YAML_DOCUMENT_END_EVENT) { fprintf(stderr, "Expected document end event.\n"); exit(EXIT_FAILURE); } ctx->state = STATE_STREAM_END; } static void __handle_write_cycle_map(struct parser_context *ctx) { assert(ctx != NULL); assert(ctx->state == STATE_WRITE_CYCLE_MAP); if (ctx->event.type != YAML_MAPPING_START_EVENT) { fprintf(stderr, "Expected start event.\n"); exit(EXIT_FAILURE); } ctx->state = STATE_WRITE_CYCLE_KEY; } static void __handle_write_cycle_key(struct parser_context *ctx) { unsigned int i; const char *s; char *endptr; assert(ctx != NULL); assert(ctx->state == STATE_WRITE_CYCLE_KEY); if (ctx->event.type == YAML_MAPPING_END_EVENT) { if (ctx->wc_seen != 0xFFFF) { fprintf(stderr, "Warning: not all write cycle " "counters have been defined.\n"); } ctx->state = STATE_KEY; return; } if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } s = (char *)ctx->event.data.scalar.value; if (!strncmp(s, "data_page_", 10) && s[10] != 0) { i = strtoul(&s[10], &endptr, 10); if (*endptr != 0 || i < 8 || i > 15) goto error; if (ctx->wc_seen & (i << i)) { fprintf(stderr, "Warning: redefined write cycle " "counter `%s'.\n", s); } ctx->wc_seen |= 1 << i; ctx->wcp = &ctx->data_wc[i - 8]; ctx->state = STATE_WRITE_CYCLE_VALUE; return; } if (!strncmp(s, "secret_", 7) && s[7] != 0) { i = strtoul(&s[7], &endptr, 10); if (*endptr != 0 || i > 7) goto error; ctx->wc_seen |= 1 << i; ctx->wcp = &ctx->secret_wc[i]; ctx->state = STATE_WRITE_CYCLE_VALUE; return; } error: fprintf(stderr, "Parse error: unknown write-cycle key `%s'.\n", s); yaml_parser_delete(&ctx->parser); exit(EXIT_FAILURE); } static void __handle_write_cycle_value(struct parser_context *ctx) { const char *str; assert(ctx != NULL); assert(ctx->state == STATE_WRITE_CYCLE_VALUE); if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } str = (char *)ctx->event.data.scalar.value; *ctx->wcp = __parse_int(&ctx->parser, str); ctx->state = STATE_WRITE_CYCLE_KEY; } static void __handle_nvram_map(struct parser_context *ctx) { assert(ctx != NULL); assert(ctx->state == STATE_NVRAM_MAP); if (ctx->event.type != YAML_MAPPING_START_EVENT) { fprintf(stderr, "Expected start event.\n"); exit(EXIT_FAILURE); } ctx->state = STATE_NVRAM_KEY; } static void __handle_nvram_key(struct parser_context *ctx) { unsigned int i; const char *s; char *endptr; assert(ctx != NULL); assert(ctx->state == STATE_NVRAM_KEY); if (ctx->event.type == YAML_MAPPING_END_EVENT) { if (ctx->nvram_seen != 0xFFFF) { fprintf(stderr, "Warning: not all nvram pages " "have been defined.\n"); } ctx->state = STATE_KEY; return; } if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } s = (char *)ctx->event.data.scalar.value; if (!strncmp(s, "page_", 5) && s[5] != 0) { i = strtoul(&s[5], &endptr, 10); if (*endptr != 0 || i > 15) goto error; if (ctx->nvram_seen & (i << i)) { fprintf(stderr, "Warning: redefined nvram " "page `%s'.\n", s); } ctx->nvram_seen |= 1 << i; ctx->nvp = &ctx->nvram[i * 32]; ctx->state = STATE_NVRAM_VALUE; return; } error: fprintf(stderr, "Parse error: unknown nvram key `%s'.\n", s); yaml_parser_delete(&ctx->parser); exit(EXIT_FAILURE); } static void __handle_nvram_value(struct parser_context *ctx) { const char *str; assert(ctx != NULL); assert(ctx->state == STATE_NVRAM_VALUE); if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } str = (char *)ctx->event.data.scalar.value; __is_hex_string(&ctx->parser, str); __is_length(&ctx->parser, str, 64); hex_decode(ctx->nvp, str, 32); ctx->state = STATE_NVRAM_KEY; } static void __handle_secret_map(struct parser_context *ctx) { assert(ctx != NULL); assert(ctx->state == STATE_SECRET_MAP); if (ctx->event.type != YAML_MAPPING_START_EVENT) { fprintf(stderr, "Expected start event.\n"); exit(EXIT_FAILURE); } ctx->state = STATE_SECRET_KEY; } static void __handle_secret_key(struct parser_context *ctx) { unsigned int i; const char *s; char *endptr; assert(ctx != NULL); assert(ctx->state == STATE_SECRET_KEY); if (ctx->event.type == YAML_MAPPING_END_EVENT) { if (ctx->secret_seen != 0xFF) { fprintf(stderr, "Warning: not all secrets " "have been defined.\n"); } ctx->state = STATE_KEY; return; } if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } s = (char *)ctx->event.data.scalar.value; if (!strncmp(s, "secret_", 7) && s[7] != 0) { i = strtoul(&s[7], &endptr, 10); if (*endptr != 0 || i > 7) goto error; if (ctx->secret_seen & (i << i)) { fprintf(stderr, "Warning: redefined secret " "`%s'.\n", s); } ctx->secret_seen |= 1 << i; ctx->sp = &ctx->secret[i * 8]; ctx->state = STATE_SECRET_VALUE; return; } error: fprintf(stderr, "Parse error: unknown nvram key `%s'.\n", s); yaml_parser_delete(&ctx->parser); exit(EXIT_FAILURE); } static void __handle_secret_value(struct parser_context *ctx) { const char *str; assert(ctx != NULL); assert(ctx->state == STATE_SECRET_VALUE); if (ctx->event.type != YAML_SCALAR_EVENT) { fprintf(stderr, "Expected scalar event.\n"); exit(EXIT_FAILURE); } str = (char *)ctx->event.data.scalar.value; __is_hex_string(&ctx->parser, str); __is_length(&ctx->parser, str, 16); hex_decode(ctx->sp, str, 8); ctx->state = STATE_SECRET_KEY; } int ds1963s_emulator_yaml_load(struct ds1963s_device *dev, const char *pathname) { struct parser_context ctx; FILE *fp; if ( (fp = fopen(pathname, "r")) == NULL) { perror("fopen()"); exit(EXIT_FAILURE); } __parser_init(&ctx, fp); do { __parser_parse(&ctx); switch (ctx.state) { case STATE_INIT: __handle_init(&ctx); break; case STATE_DOCUMENT: __handle_document(&ctx); break; case STATE_GLOBAL_MAP: __handle_global_map(&ctx); break; case STATE_KEY: __handle_global_key(&ctx); break; case STATE_FAMILY: __handle_family(&ctx); break; case STATE_SERIAL: __handle_serial(&ctx); break; case STATE_CRC8: /* XXX: ignore for now; we calculate it. */ ctx.state = STATE_KEY; ctx.key_seen |= SEEN_CRC8; break; case STATE_PRNG_COUNTER: __handle_prng(&ctx); break; case STATE_WRITE_CYCLE_MAP: __handle_write_cycle_map(&ctx); ctx.key_seen |= SEEN_WRITE_CYCLE; break; case STATE_WRITE_CYCLE_KEY: __handle_write_cycle_key(&ctx); break; case STATE_WRITE_CYCLE_VALUE: __handle_write_cycle_value(&ctx); break; case STATE_NVRAM_MAP: __handle_nvram_map(&ctx); ctx.key_seen |= SEEN_NVRAM; break; case STATE_NVRAM_KEY: __handle_nvram_key(&ctx); break; case STATE_NVRAM_VALUE: __handle_nvram_value(&ctx); break; case STATE_SECRET_MAP: __handle_secret_map(&ctx); ctx.key_seen |= SEEN_SECRET; break; case STATE_SECRET_KEY: __handle_secret_key(&ctx); break; case STATE_SECRET_VALUE: __handle_secret_value(&ctx); break; case STATE_DOCUMENT_END: __handle_document_end(&ctx); break; case STATE_STREAM_END: __handle_stream_end(&ctx); break; default: fprintf(stderr, "unknown state: %d\n", ctx.state); abort(); } } while (ctx.event.type != YAML_STREAM_END_EVENT); fclose(fp); dev->family = ctx.family; dev->prng_counter = ctx.prng_counter; memcpy(dev->data_wc, ctx.data_wc, sizeof dev->data_wc); memcpy(dev->secret_wc, ctx.secret_wc, sizeof dev->secret_wc); memcpy(dev->data_memory, ctx.nvram, sizeof dev->data_memory); memcpy(dev->secret_memory, ctx.secret, sizeof dev->secret_memory); /* Serial is a special case, as it is stored LSB first. For * presentation it has been reversed, so do this here too. */ for (int i = 0; i < sizeof dev->serial; i++) dev->serial[i] = ctx.serial[sizeof(ctx.serial) - 1 - i]; return 0; }
[ "rhuizer@hexpedition.com" ]
rhuizer@hexpedition.com
68a2a4953c14e165cff31300dc8cb149db9e7772
5a47737f5cc00543cb01f5bbb3e2f41e5f13b7ce
/teensyMAMEClassic1/_unused/drivers/driver_sonson.c
32c30e599b74eb14f1528f2e8961bdc041b4f0a1
[]
no_license
Jean-MarcHarvengt/teensyMAME
0556df1a514e94e00706988f44e2e05b99f6971a
c4210da674aa72dd5e60be88a858812648e03fe9
refs/heads/master
2020-07-26T12:26:23.591912
2019-09-28T15:29:00
2019-09-28T15:29:00
208,643,063
15
0
null
null
null
null
UTF-8
C
false
false
11,971
c
/*************************************************************************** Son Son memory map (preliminary) MAIN CPU: 0000-0fff RAM 1000-13ff Video RAM 1400-17ff Color RAM 2020-207f Sprites 4000-ffff ROM read: 3002 IN0 3003 IN1 3004 IN2 3005 DSW0 3006 DSW1 see the input_ports definition below for details on the input bits write: 3000 horizontal scroll 3008 ? one of these two should be 3018 ? the watchdog reset 3010 command for the audio CPU 3019 trigger FIRQ on audio CPU SOUND CPU: 0000-07ff RAM e000-ffff ROM read: a000 command from the main CPU write: 2000 8910 #1 control 2001 8910 #1 write 4000 8910 #2 control 4001 8910 #2 write ***************************************************************************/ #include "driver.h" #include "vidhrdw/generic.h" #include "M6809/M6809.h" extern unsigned char *sonson_scrollx; void sonson_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom); void sonson_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh); void sonson_init_machine(void) { /* Set optimization flags for M6809 */ m6809_Flags = M6809_FAST_S | M6809_FAST_U; } void sonson_sh_irqtrigger_w(int offset,int data) { static int last; if (last == 0 && data == 1) { /* setting bit 0 low then high triggers IRQ on the sound CPU */ cpu_cause_interrupt(1,M6809_INT_FIRQ); } last = data; } static struct MemoryReadAddress readmem[] = { { 0x0000, 0x17ff, MRA_RAM }, { 0x4000, 0xffff, MRA_ROM }, { 0x3002, 0x3002, input_port_0_r }, /* IN0 */ { 0x3003, 0x3003, input_port_1_r }, /* IN1 */ { 0x3004, 0x3004, input_port_2_r }, /* IN2 */ { 0x3005, 0x3005, input_port_3_r }, /* DSW0 */ { 0x3006, 0x3006, input_port_4_r }, /* DSW1 */ { -1 } /* end of table */ }; static struct MemoryWriteAddress writemem[] = { { 0x0000, 0x0fff, MWA_RAM }, { 0x1000, 0x13ff, videoram_w, &videoram, &videoram_size }, { 0x1400, 0x17ff, colorram_w, &colorram }, { 0x2020, 0x207f, MWA_RAM, &spriteram, &spriteram_size }, { 0x3000, 0x3000, MWA_RAM, &sonson_scrollx }, { 0x3008, 0x3008, MWA_NOP }, { 0x3010, 0x3010, soundlatch_w }, { 0x3018, 0x3018, MWA_NOP }, { 0x3019, 0x3019, sonson_sh_irqtrigger_w }, { 0x4000, 0xffff, MWA_ROM }, { -1 } /* end of table */ }; static struct MemoryReadAddress sound_readmem[] = { { 0x0000, 0x07ff, MRA_RAM }, { 0xa000, 0xa000, soundlatch_r }, { 0xe000, 0xffff, MRA_ROM }, { -1 } /* end of table */ }; static struct MemoryWriteAddress sound_writemem[] = { { 0x0000, 0x07ff, MWA_RAM }, { 0x2000, 0x2000, AY8910_control_port_0_w }, { 0x2001, 0x2001, AY8910_write_port_0_w }, { 0x4000, 0x4000, AY8910_control_port_1_w }, { 0x4001, 0x4001, AY8910_write_port_1_w }, { 0xe000, 0xffff, MWA_ROM }, { -1 } /* end of table */ }; INPUT_PORTS_START( input_ports ) PORT_START /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_START /* IN1 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_START /* IN2 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */ PORT_START /* DSW0 */ PORT_DIPNAME( 0x0f, 0x0f, "Coinage", IP_KEY_NONE ) PORT_DIPSETTING( 0x02, "4 Coins/1 Credit" ) PORT_DIPSETTING( 0x05, "3 Coins/1 Credit" ) PORT_DIPSETTING( 0x08, "2 Coins/1 Credit" ) PORT_DIPSETTING( 0x04, "3 Coins/2 Credits" ) PORT_DIPSETTING( 0x01, "4 Coins/3 Credits" ) PORT_DIPSETTING( 0x0f, "1 Coin/1 Credit" ) PORT_DIPSETTING( 0x03, "3 Coins/4 Credits" ) PORT_DIPSETTING( 0x07, "2 Coins/3 Credits" ) PORT_DIPSETTING( 0x0e, "1 Coin/2 Credits" ) PORT_DIPSETTING( 0x06, "2 Coins/5 Credits" ) PORT_DIPSETTING( 0x0d, "1 Coin/3 Credits" ) PORT_DIPSETTING( 0x0c, "1 Coin/4 Credits" ) PORT_DIPSETTING( 0x0b, "1 Coin/5 Credits" ) PORT_DIPSETTING( 0x0a, "1 Coin/6 Credits" ) PORT_DIPSETTING( 0x09, "1 Coin/7 Credits" ) PORT_DIPSETTING( 0x00, "Free Play" ) PORT_DIPNAME( 0x10, 0x10, "Coinage affects", IP_KEY_NONE ) PORT_DIPSETTING( 0x10, "Coin A" ) PORT_DIPSETTING( 0x00, "Coin B" ) PORT_DIPNAME( 0x20, 0x00, "Demo Sounds", IP_KEY_NONE ) PORT_DIPSETTING( 0x20, "Off" ) PORT_DIPSETTING( 0x00, "On" ) PORT_BITX( 0x40, 0x40, IPT_DIPSWITCH_NAME | IPF_TOGGLE, "Service Mode", OSD_KEY_F2, IP_JOY_NONE, 0 ) PORT_DIPSETTING( 0x40, "Off" ) PORT_DIPSETTING( 0x00, "On" ) PORT_DIPNAME( 0x80, 0x80, "unknown", IP_KEY_NONE ) /* maybe flip screen */ PORT_DIPSETTING( 0x80, "Off" ) PORT_DIPSETTING( 0x00, "On" ) PORT_START /* DSW1 */ PORT_DIPNAME( 0x03, 0x03, "Lives", IP_KEY_NONE ) PORT_DIPSETTING( 0x03, "3" ) PORT_DIPSETTING( 0x02, "4" ) PORT_DIPSETTING( 0x01, "5" ) PORT_DIPSETTING( 0x00, "7" ) PORT_DIPNAME( 0x04, 0x00, "2 Players Game", IP_KEY_NONE ) PORT_DIPSETTING( 0x04, "1 Credit" ) PORT_DIPSETTING( 0x00, "2 Credits" ) PORT_DIPNAME( 0x18, 0x08, "Bonus Life", IP_KEY_NONE ) PORT_DIPSETTING( 0x08, "20000 80000 100000" ) PORT_DIPSETTING( 0x00, "30000 90000 120000" ) PORT_DIPSETTING( 0x18, "20000" ) PORT_DIPSETTING( 0x10, "30000" ) PORT_DIPNAME( 0x60, 0x60, "Difficulty", IP_KEY_NONE ) PORT_DIPSETTING( 0x60, "Easy" ) PORT_DIPSETTING( 0x40, "Medium" ) PORT_DIPSETTING( 0x20, "Hard" ) PORT_DIPSETTING( 0x00, "Hardest" ) PORT_DIPNAME( 0x80, 0x80, "Freeze", IP_KEY_NONE ) PORT_DIPSETTING( 0x80, "Off" ) PORT_DIPSETTING( 0x00, "On" ) INPUT_PORTS_END static struct GfxLayout charlayout = { 8,8, /* 8*8 characters */ 1024, /* 1024 characters */ 2, /* 2 bits per pixel */ { 1024*8*8, 0 }, /* the two bitplanes are separated */ { 0, 1, 2, 3, 4, 5, 6, 7 }, /* pretty straightforward layout */ { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, 8*8 /* every char takes 8 consecutive bytes */ }; static struct GfxLayout spritelayout = { 16,16, /* 16*16 sprites */ 512, /* 512 sprites */ 3, /* 3 bits per pixel */ { 2*2048*8*8, 2048*8*8, 0 }, /* the two bitplanes are separated */ { 8*16+7, 8*16+6, 8*16+5, 8*16+4, 8*16+3, 8*16+2, 8*16+1, 8*16+0, /* pretty straightforward layout */ 7, 6, 5, 4, 3, 2, 1, 0 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, 32*8 /* every sprite takes 32 consecutive bytes */ }; static struct GfxDecodeInfo gfxdecodeinfo[] = { { 1, 0x00000, &charlayout, 0, 64 }, { 1, 0x04000, &spritelayout, 64*4, 32 }, { -1 } /* end of array */ }; static struct AY8910interface ay8910_interface = { 2, /* 2 chips */ 1500000, /* 1.5 MHz ? */ { 0x10ff, 255 }, { 0 }, { 0 }, { 0 }, { 0 } }; static struct MachineDriver machine_driver = { /* basic machine hardware */ { { CPU_M6809, 2000000, /* 2 Mhz (?) */ 0, readmem,writemem,0,0, interrupt,1 }, { CPU_M6809 | CPU_AUDIO_CPU, 2000000, /* 2 Mhz (?) */ 3, sound_readmem,sound_writemem,0,0, interrupt,4 /* FIRQs are triggered by the main CPU */ }, }, 60, DEFAULT_60HZ_VBLANK_DURATION, /* frames per second, vblank duration */ 1, /* 1 CPU slice per frame - interleaving is forced when a sound command is written */ sonson_init_machine, /* video hardware */ 32*8, 32*8, { 1*8, 31*8-1, 1*8, 31*8-1 }, gfxdecodeinfo, 32,64*4+32*8, sonson_vh_convert_color_prom, VIDEO_TYPE_RASTER, 0, generic_vh_start, generic_vh_stop, sonson_vh_screenrefresh, /* sound hardware */ 0,0,0,0, { { SOUND_AY8910, &ay8910_interface } } }; /*************************************************************************** Game driver(s) ***************************************************************************/ ROM_START( sonson_rom ) ROM_REGION(0x10000) /* 64k for code + 3*16k for the banked ROMs images */ ROM_LOAD( "ss.01e", 0x4000, 0x4000, 0xcd40cc54 ) ROM_LOAD( "ss.02e", 0x8000, 0x4000, 0xc3476527 ) ROM_LOAD( "ss.03e", 0xc000, 0x4000, 0x1fd0e729 ) ROM_REGION_DISPOSE(0x10000) /* temporary space for graphics (disposed after conversion) */ ROM_LOAD( "ss5.v12", 0x00000, 0x2000, 0x990890b1 ) /* characters */ ROM_LOAD( "ss6.v12", 0x02000, 0x2000, 0x9388ff82 ) ROM_LOAD( "ss7.v12", 0x04000, 0x4000, 0x32b14b8e ) /* sprites */ ROM_LOAD( "ss8.v12", 0x08000, 0x4000, 0x9f59014e ) ROM_LOAD( "ss9.v12", 0x0c000, 0x4000, 0xe240345a ) ROM_REGION(0x0240) /* color PROMs */ ROM_LOAD( "ss12.bin", 0x0000, 0x0020, 0xc8eaf234 ) /* red/green component */ ROM_LOAD( "ss13.bin", 0x0020, 0x0020, 0x0e434add ) /* blue component */ ROM_LOAD( "ssb2.bin", 0x0040, 0x0100, 0x6ce8ac39 ) /* character lookup table */ ROM_LOAD( "ssb.bin", 0x0140, 0x0100, 0xd4f7bfb5 ) /* sprite lookup table */ ROM_REGION(0x10000) /* 64k for the audio CPU */ ROM_LOAD( "ss3.v12", 0xe000, 0x2000, 0x1135c48a ) ROM_END static int hiload(void) { unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region]; /* check if the hi score table has already been initialized */ if (memcmp(&RAM[0x0300],"\x00\x01\x00\x00",4) == 0 && memcmp(&RAM[0x0320],"\x00\x01\x00\x00",4) == 0 && memcmp(&RAM[0x00d8],"\x00\x01\x00\x00",4) == 0 && /* high score */ memcmp(&RAM[0x0328],"\x00\x02\x00\x00",4) == 0 && memcmp(&RAM[0x0358],"\x00\x02\x00\x00",4) == 0) { void *f; if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,0)) != 0) { osd_fread(f,&RAM[0x0300],8*5+12*5); RAM[0x00d8] = RAM[0x0300]; RAM[0x00d9] = RAM[0x0301]; RAM[0x00da] = RAM[0x0302]; RAM[0x00db] = RAM[0x0303]; osd_fclose(f); } return 1; } else return 0; /* we can't load the hi scores yet */ } static void hisave(void) { void *f; unsigned char *RAM = Machine->memory_region[Machine->drv->cpu[0].memory_region]; if ((f = osd_fopen(Machine->gamedrv->name,0,OSD_FILETYPE_HIGHSCORE,1)) != 0) { osd_fwrite(f,&RAM[0x0300],8*5+12*5); osd_fclose(f); } } struct GameDriver sonson_driver = { __FILE__, 0, "sonson", "Son Son", "1984", "Capcom", "Mirko Buffoni (MAME driver)\nNicola Salmoria (MAME driver)\nGary Walton (color info)\nSimon Walls (color info=", 0, &machine_driver, 0, sonson_rom, 0, 0, 0, 0, /* sound_prom */ input_ports, PROM_MEMORY_REGION(2), 0, 0, ORIENTATION_DEFAULT, hiload, hisave };
[ "harvengtjeanmarc@gmail.com" ]
harvengtjeanmarc@gmail.com
be5467014fae4ef0c2d789cb8e5a9af419f723b5
07189bc64844260bc71268d29689b0b8d01f803d
/Appnote/W5200E01-M3_SMTP_with_DHCP/Work/App/source/APPs/dhcp.c
d530f368fc3786dc3418770b0981fc6309e404bf
[]
no_license
KISSMonX/W7200
dd03400f615e05f53d9f61c1ea917bf519ef561b
61e1f8b782400a59c508b70571abe86113d6fa62
refs/heads/master
2020-12-25T17:59:11.840111
2013-11-18T08:20:47
2013-11-18T08:20:47
14,481,025
1
0
null
null
null
null
UTF-8
C
false
false
23,969
c
/** * @file dhcp.c * @brief functions relative to dhcp */ #include <stdio.h> #include <string.h> #include "stm32f10x.h" #include "config.h" #include "W5200\w5200.h" #include "W5200\socket.h" #include "util.h" #include "sockutil.h" #include "Apps\DHCP.h" //#define DHCP_DEBUG #define HOST_NAME "WIZnet" /**< Host Name */ //#define __DEF_CHECK_LEASEDIP__ u_char SRC_MAC_ADDR[6]; /**< Local MAC address */ u_char GET_SN_MASK[4]; /**< Subnet mask received from the DHCP server */ u_char GET_GW_IP[4]; /**< Gateway ip address received from the DHCP server */ u_char GET_DNS_IP[4] = "\x00\x00\x00\x00"; /**< DNS server ip address received from the DHCP server */ u_char GET_SIP[4] = {0,}; /**< Local ip address received from the DHCP server */ extern uint8 txsize[MAX_SOCK_NUM]; extern uint8 rxsize[MAX_SOCK_NUM]; static u_char DHCP_SIP[4] = {0,}; /**< DNS server ip address is discovered */ static u_char DHCP_REAL_SIP[4] = {0,}; /**< For extract my DHCP server in a few DHCP servers */ static u_char OLD_SIP[4]; /**< Previous local ip address received from DHCP server */ static char dhcp_state; /**< DHCP client status */ static char retry_count; /**< retry count */ static u_char DHCP_timeout; /**< DHCP Timeout flag */ static un_l2cval lease_time; /**< Leased time */ static u_long dhcp_time, next_dhcp_time; /**< DHCP Timer tick count */ static u_long DHCP_XID; static SOCKET DHCPC_SOCK; /**< Socket for the DHCP client */ static RIP_MSG* pRIPMSG; /**< Pointer for the DHCP message */ void (*dhcp_ip_update)(void) = 0; /**< handler to be called when the IP address from DHCP server is updated */ void (*dhcp_ip_conflict)(void) = 0; /**< handler to be called when the IP address from DHCP server is conflict */ static void send_DHCP_DISCOVER(SOCKET s); /* Send the discovery message to the DHCP server */ static void send_DHCP_REQUEST(SOCKET s); /* Send the request message to the DHCP server */ #ifdef __DEF_CHECK_LEASEDIP__ static void send_DHCP_RELEASE_DECLINE(SOCKET s,char msgtype); /**< send the release message to the DHCP server */ #endif static char parseDHCPMSG(SOCKET s, u_int length); /* Receive the message from DHCP server and parse it. */ static void reset_DHCP_time(void); /* Initialize DHCP Timer */ //static void DHCP_timer_handler(void); /* DHCP Timer handler */ #ifdef __DEF_CHECK_LEASEDIP__ static char check_leasedIP(void); /* Check the leased IP address */ #endif static void check_DHCP_Timeout(void); /* Check DHCP Timeout */ static void set_DHCP_network(void); /* Apply the leased IP address to LP-NetCAM II */ static void proc_ip_conflict(void); /* called when the leased IP address is conflict */ /** * @brief reset timeout value and retry count */ static void reset_DHCP_time(void) { dhcp_time = 0; next_dhcp_time = dhcp_time + DHCP_WAIT_TIME; retry_count = 0; } /** * @brief This function sends DHCP DISCOVER message to DHCP server. */ static void send_DHCP_DISCOVER( SOCKET s /**< a socket number. */ ) { u_char ip[4]; u_int i=0; pRIPMSG = (RIP_MSG*)TX_BUF; *((u_long*)DHCP_SIP)=0; *((u_long*)DHCP_REAL_SIP)=0; memset((void*)pRIPMSG,0,sizeof(RIP_MSG)); pRIPMSG->op = DHCP_BOOTREQUEST; pRIPMSG->htype = DHCP_HTYPE10MB; pRIPMSG->hlen = DHCP_HLENETHERNET; pRIPMSG->hops = DHCP_HOPS; pRIPMSG->xid = htonl(DHCP_XID); pRIPMSG->secs = htons(DHCP_SECS); pRIPMSG->flags = htons(DHCP_FLAGSBROADCAST); pRIPMSG->chaddr[0] = SRC_MAC_ADDR[0]; pRIPMSG->chaddr[1] = SRC_MAC_ADDR[1]; pRIPMSG->chaddr[2] = SRC_MAC_ADDR[2]; pRIPMSG->chaddr[3] = SRC_MAC_ADDR[3]; pRIPMSG->chaddr[4] = SRC_MAC_ADDR[4]; pRIPMSG->chaddr[5] = SRC_MAC_ADDR[5]; /* MAGIC_COOKIE */ pRIPMSG->OPT[i++] = (char)((MAGIC_COOKIE >> 24)& 0xFF); pRIPMSG->OPT[i++] = (char)((MAGIC_COOKIE >> 16)& 0xFF); pRIPMSG->OPT[i++] = (char)((MAGIC_COOKIE >> 8)& 0xFF); pRIPMSG->OPT[i++] = (char)(MAGIC_COOKIE& 0xFF); /* Option Request Param. */ pRIPMSG->OPT[i++] = dhcpMessageType; pRIPMSG->OPT[i++] = 0x01; pRIPMSG->OPT[i++] = DHCP_DISCOVER; // Client identifier pRIPMSG->OPT[i++] = dhcpClientIdentifier; pRIPMSG->OPT[i++] = 0x07; pRIPMSG->OPT[i++] = 0x01; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[0]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[1]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[2]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[3]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[4]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[5]; // host name pRIPMSG->OPT[i++] = hostName; pRIPMSG->OPT[i++] = strlen(HOST_NAME)+3; // length of hostname + 3 strcpy((char *)&(pRIPMSG->OPT[i]),HOST_NAME); i+=strlen(HOST_NAME); pRIPMSG->OPT[i++] = SRC_MAC_ADDR[3]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[4]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[5]; pRIPMSG->OPT[i++] = dhcpParamRequest; pRIPMSG->OPT[i++] = 0x06; pRIPMSG->OPT[i++] = subnetMask; pRIPMSG->OPT[i++] = routersOnSubnet; pRIPMSG->OPT[i++] = dns; pRIPMSG->OPT[i++] = domainName; pRIPMSG->OPT[i++] = dhcpT1value; pRIPMSG->OPT[i++] = dhcpT2value; pRIPMSG->OPT[i++] = endOption; /* send broadcasting packet */ ip[0] = 255; ip[1] = 255; ip[2] = 255; ip[3] = 255; // tmp start uint16 tmp_send_length; tmp_send_length = UDPSend(s, (u_char *)pRIPMSG, sizeof(RIP_MSG), ip, DHCP_SERVER_PORT); if(0 == tmp_send_length) // tmp end //if(0 == sendto(s, (u_char *)pRIPMSG, sizeof(RIP_MSG), ip, DHCP_SERVER_PORT)) { printf("DHCP : Fatal Error(0).\r\n"); if ( dhcp_ip_conflict != 0 ) (*dhcp_ip_conflict)(); } printf("sent DHCP_DISCOVER\r\n"); } /** * @brief This function sends DHCP REQUEST message to DHCP server. */ static void send_DHCP_REQUEST( SOCKET s /**< socket number */ ) { u_char ip[4]; u_int i = 0; pRIPMSG = (RIP_MSG*)TX_BUF; memset((void*)pRIPMSG,0,sizeof(RIP_MSG)); pRIPMSG->op = DHCP_BOOTREQUEST; pRIPMSG->htype = DHCP_HTYPE10MB; pRIPMSG->hlen = DHCP_HLENETHERNET; pRIPMSG->hops = DHCP_HOPS; pRIPMSG->xid = htonl(DHCP_XID); pRIPMSG->secs = htons(DHCP_SECS); if(dhcp_state < STATE_DHCP_LEASED) pRIPMSG->flags = htons(DHCP_FLAGSBROADCAST); else { pRIPMSG->flags = 0; // For Unicast pRIPMSG->ciaddr[0] = GET_SIP[0]; pRIPMSG->ciaddr[1] = GET_SIP[1]; pRIPMSG->ciaddr[2] = GET_SIP[2]; pRIPMSG->ciaddr[3] = GET_SIP[3]; } pRIPMSG->chaddr[0] = SRC_MAC_ADDR[0]; pRIPMSG->chaddr[1] = SRC_MAC_ADDR[1]; pRIPMSG->chaddr[2] = SRC_MAC_ADDR[2]; pRIPMSG->chaddr[3] = SRC_MAC_ADDR[3]; pRIPMSG->chaddr[4] = SRC_MAC_ADDR[4]; pRIPMSG->chaddr[5] = SRC_MAC_ADDR[5]; /* MAGIC_COOKIE */ pRIPMSG->OPT[i++] = (u_char)((MAGIC_COOKIE >> 24) & 0xFF); pRIPMSG->OPT[i++] = (u_char)((MAGIC_COOKIE >> 16) & 0xFF); pRIPMSG->OPT[i++] = (u_char)((MAGIC_COOKIE >> 8) & 0xFF); pRIPMSG->OPT[i++] = (u_char)(MAGIC_COOKIE & 0xFF); /* Option Request Param. */ pRIPMSG->OPT[i++] = dhcpMessageType; pRIPMSG->OPT[i++] = 0x01; pRIPMSG->OPT[i++] = DHCP_REQUEST; pRIPMSG->OPT[i++] = dhcpClientIdentifier; pRIPMSG->OPT[i++] = 0x07; pRIPMSG->OPT[i++] = 0x01; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[0]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[1]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[2]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[3]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[4]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[5]; if(dhcp_state < STATE_DHCP_LEASED) { pRIPMSG->OPT[i++] = dhcpRequestedIPaddr; pRIPMSG->OPT[i++] = 0x04; pRIPMSG->OPT[i++] = GET_SIP[0]; pRIPMSG->OPT[i++] = GET_SIP[1]; pRIPMSG->OPT[i++] = GET_SIP[2]; pRIPMSG->OPT[i++] = GET_SIP[3]; pRIPMSG->OPT[i++] = dhcpServerIdentifier; pRIPMSG->OPT[i++] = 0x04; pRIPMSG->OPT[i++] = DHCP_SIP[0]; pRIPMSG->OPT[i++] = DHCP_SIP[1]; pRIPMSG->OPT[i++] = DHCP_SIP[2]; pRIPMSG->OPT[i++] = DHCP_SIP[3]; } // host name pRIPMSG->OPT[i++] = hostName; pRIPMSG->OPT[i++] = strlen(HOST_NAME)+3; // length of hostname + 3 strcpy((char *)&(pRIPMSG->OPT[i]),HOST_NAME); i+=strlen(HOST_NAME); pRIPMSG->OPT[i++] = SRC_MAC_ADDR[3]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[4]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[5]; pRIPMSG->OPT[i++] = dhcpParamRequest; pRIPMSG->OPT[i++] = 0x08; pRIPMSG->OPT[i++] = subnetMask; pRIPMSG->OPT[i++] = routersOnSubnet; pRIPMSG->OPT[i++] = dns; pRIPMSG->OPT[i++] = domainName; pRIPMSG->OPT[i++] = dhcpT1value; pRIPMSG->OPT[i++] = dhcpT2value; pRIPMSG->OPT[i++] = performRouterDiscovery; pRIPMSG->OPT[i++] = staticRoute; pRIPMSG->OPT[i++] = endOption; /* send broadcasting packet */ if(dhcp_state < STATE_DHCP_LEASED) { ip[0] = 255; ip[1] = 255; ip[2] = 255; ip[3] = 255; } else { ip[0] = DHCP_SIP[0]; ip[1] = DHCP_SIP[1]; ip[2] = DHCP_SIP[2]; ip[3] = DHCP_SIP[3]; } if(0 == UDPSend(s, (u_char*)pRIPMSG, sizeof(RIP_MSG), ip, DHCP_SERVER_PORT)) { printf("DHCP : Fatal Error(1).\r\n"); if ( dhcp_ip_conflict != 0 ) (*dhcp_ip_conflict)(); } printf("sent DHCP_REQUEST\r\n"); } #ifdef __DEF_CHECK_LEASEDIP__ /** * @brief This function sends DHCP RELEASE message to DHCP server. */ static void send_DHCP_RELEASE_DECLINE( SOCKET s, /**< socket number */ char msgtype /**< 0 : RELEASE, Not Zero : DECLINE */ ) { u_int i =0; u_char ip[4]; pRIPMSG = (RIP_MSG*)TX_BUF; memset((void*)pRIPMSG,0,sizeof(RIP_MSG)); pRIPMSG->op = DHCP_BOOTREQUEST; pRIPMSG->htype = DHCP_HTYPE10MB; pRIPMSG->hlen = DHCP_HLENETHERNET; pRIPMSG->hops = DHCP_HOPS; pRIPMSG->xid = htonl(DHCP_XID); pRIPMSG->secs = htons(DHCP_SECS); pRIPMSG->flags = 0; //DHCP_FLAGSBROADCAST; pRIPMSG->chaddr[0] = SRC_MAC_ADDR[0]; pRIPMSG->chaddr[1] = SRC_MAC_ADDR[1]; pRIPMSG->chaddr[2] = SRC_MAC_ADDR[2]; pRIPMSG->chaddr[3] = SRC_MAC_ADDR[3]; pRIPMSG->chaddr[4] = SRC_MAC_ADDR[4]; pRIPMSG->chaddr[5] = SRC_MAC_ADDR[5]; /* MAGIC_COOKIE */ pRIPMSG->OPT[i++] = (u_char)((MAGIC_COOKIE >> 24) & 0xFF); pRIPMSG->OPT[i++] = (u_char)((MAGIC_COOKIE >> 16) & 0xFF); pRIPMSG->OPT[i++] = (u_char)((MAGIC_COOKIE >> 8) & 0xFF); pRIPMSG->OPT[i++] = (u_char)(MAGIC_COOKIE & 0xFF); /* Option Request Param. */ pRIPMSG->OPT[i++] = dhcpMessageType; pRIPMSG->OPT[i++] = 0x01; pRIPMSG->OPT[i++] = ((!msgtype) ? DHCP_RELEASE : DHCP_DECLINE); pRIPMSG->OPT[i++] = dhcpClientIdentifier; pRIPMSG->OPT[i++] = 0x07; pRIPMSG->OPT[i++] = 0x01; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[0]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[1]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[2]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[3]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[4]; pRIPMSG->OPT[i++] = SRC_MAC_ADDR[5]; pRIPMSG->OPT[i++] = dhcpServerIdentifier; pRIPMSG->OPT[i++] = 0x04; pRIPMSG->OPT[i++] = DHCP_SIP[0]; pRIPMSG->OPT[i++] = DHCP_SIP[1]; pRIPMSG->OPT[i++] = DHCP_SIP[2]; pRIPMSG->OPT[i++] = DHCP_SIP[3]; if(msgtype) { pRIPMSG->OPT[i++] = dhcpRequestedIPaddr; pRIPMSG->OPT[i++] = 0x04; pRIPMSG->OPT[i++] = GET_SIP[0]; pRIPMSG->OPT[i++] = GET_SIP[1]; pRIPMSG->OPT[i++] = GET_SIP[2]; pRIPMSG->OPT[i++] = GET_SIP[3]; pRIPMSG->OPT[i++] = endOption; printf("sent DHCP_DECLINE\r\n"); } else { pRIPMSG->OPT[i++] = endOption; printf("sent DHCP_RELEASE\r\n"); } if(!msgtype) { ip[0] = DHCP_SIP[0]; ip[1] = DHCP_SIP[1]; ip[2] = DHCP_SIP[2]; ip[3] = DHCP_SIP[3]; } else { ip[0] = 255; ip[1] = 255; ip[2] = 255; ip[3] = 255; } if(0 == sendto(s, (u_char *)pRIPMSG, sizeof(RIP_MSG), ip, DHCP_SERVER_PORT)) { printf("DHCP : Fatal Error(2).\r\n"); if ( dhcp_ip_conflict != 0 ) (*dhcp_ip_conflict)(); } } #endif /** * @brief This function parses the reply message from DHCP server. * @return success - return type, fail - 0 */ static char parseDHCPMSG( SOCKET s, /**< socket number */ u_int length /**< a size data to receive. */ ) { u_char svr_addr[6]; u_int svr_port; pRIPMSG = (RIP_MSG*)RX_BUF; u_int len; u_char * p; u_char * e; u_char type, opt_len; len = UDPRecv(s, (u_char *)pRIPMSG, length, svr_addr, &svr_port); #ifdef DHCP_DUBUG printf("DHCP_SIP:%d.%d.%d.%d\r\n",DHCP_SIP[0],DHCP_SIP[1],DHCP_SIP[2],DHCP_SIP[3]); printf("DHCP_RIP:%d.%d.%d.%d\r\n",DHCP_REAL_SIP[0],DHCP_REAL_SIP[1],DHCP_REAL_SIP[2],DHCP_REAL_SIP[3]); printf("svr_addr:%d.%d.%d.%d\r\n",svr_addr[0],svr_addr[1],svr_addr[2],svr_addr[3]); #endif if(pRIPMSG->op != DHCP_BOOTREPLY) { printf("DHCP : NO DHCP MSG\r\n"); } else { if (svr_port == DHCP_SERVER_PORT) { if(memcmp(pRIPMSG->chaddr,SRC_MAC_ADDR,6) != 0 || pRIPMSG->xid != htonl(DHCP_XID)) { printf("No My DHCP Message. This message is ignored.\r\n"); #ifdef DCHP_DEBUG printf("\tSRC_MAC_ADDR(%02X.%02X.%02X.",SRC_MAC_ADDR[0],SRC_MAC_ADDR[1],SRC_MAC_ADDR[2]); printf("%02X.%02X.%02X)",SRC_MAC_ADDR[3],SRC_MAC_ADDR[4],SRC_MAC_ADDR[5]); printf(", pRIPMSG->chaddr(%02X.%02X.%02X.",pRIPMSG->chaddr[0],pRIPMSG->chaddr[1],pRIPMSG->chaddr[2]); printf("%02X.%02X.%02X)",pRIPMSG->chaddr[3],pRIPMSG->chaddr[4],pRIPMSG->chaddr[5]); printf("\tpRIPMSG->xid(%08lX), DHCP_XID(%08lX)",pRIPMSG->xid,htonl(DHCP_XID)); printf("\tpRIMPMSG->yiaddr:%d.%d.%d.%d\r\n",pRIPMSG->yiaddr[0],pRIPMSG->yiaddr[1],pRIPMSG->yiaddr[2],pRIPMSG->yiaddr[3]); #endif return 0; } if( *((u_long*)DHCP_SIP) != 0x00000000 ) { if( *((u_long*)DHCP_REAL_SIP) != *((u_long*)svr_addr) && *((u_long*)DHCP_SIP) != *((u_long*)svr_addr) ) { #ifdef DHCP_DEBUG printf("Another DHCP sever send a response message. This is ignored.\r\n"); printf("IP:%d.%d.%d.%d\r\n",svr_addr[0],svr_addr[1],svr_addr[2],svr_addr[3]); #endif return 0; } } memcpy(GET_SIP,pRIPMSG->yiaddr,4); printf("DHCP MSG received..\r\n"); printf("yiaddr : %d.%d.%d.%d\r\n",GET_SIP[0],GET_SIP[1],GET_SIP[2],GET_SIP[3]); type = 0; p = (u_char *)(&pRIPMSG->op); p = p + 240; e = p + (len - 240); //printf("p : 0x%08X e : 0x%08X len : %d\r\n", p, e, len); while ( p < e ) { switch ( *p++ ) { case endOption : return type; //break; case padOption : break; case dhcpMessageType : opt_len = *p++; type = *p; #ifdef DHCP_DUBUG printf("dhcpMessageType : %x\r\n", type); #endif break; case subnetMask : opt_len =* p++; memcpy(GET_SN_MASK,p,4); #ifdef DHCP_DUBUG printf("subnetMask : "); printf("%d.%d.%d.%d\r\n",GET_SN_MASK[0],GET_SN_MASK[1],GET_SN_MASK[2],GET_SN_MASK[3]); #endif break; case routersOnSubnet : opt_len = *p++; memcpy(GET_GW_IP,p,4); #ifdef DHCP_DUBUG printf("routersOnSubnet : "); printf("%d.%d.%d.%d\r\n",GET_GW_IP[0],GET_GW_IP[1],GET_GW_IP[2],GET_GW_IP[3]); #endif break; case dns : opt_len = *p++; memcpy(GET_DNS_IP,p,4); break; case dhcpIPaddrLeaseTime : opt_len = *p++; lease_time.lVal = ntohl(*((u_long*)p)); #ifdef DHCP_DUBUG printf("dhcpIPaddrLeaseTime : %08lX\r\n", lease_time.lVal); #endif break; case dhcpServerIdentifier : opt_len = *p++; #ifdef DHCP_DUBUG printf("DHCP_SIP : %d.%d.%d.%d\r\n", DHCP_SIP[0], DHCP_SIP[1], DHCP_SIP[2], DHCP_SIP[3]); #endif if( *((u_long*)DHCP_SIP) == 0 || *((u_long*)DHCP_REAL_SIP) == *((u_long*)svr_addr) || *((u_long*)DHCP_SIP) == *((u_long*)svr_addr) ) { memcpy(DHCP_SIP,p,4); memcpy(DHCP_REAL_SIP,svr_addr,4); // Copy the real ip address of my DHCP server #ifdef DHCP_DEBUG printf("My dhcpServerIdentifier : "); printf("%d.%d.%d.%d\r\n", DHCP_SIP[0], DHCP_SIP[1], DHCP_SIP[2], DHCP_SIP[3]); printf("My DHCP server real IP address : "); printf("%d.%d.%d.%d\r\n", DHCP_REAL_SIP[0], DHCP_REAL_SIP[1], DHCP_REAL_SIP[2], DHCP_REAL_SIP[3]); #endif } else { printf("Another dhcpServerIdentifier : "); printf("MY(%d.%d.%d.%d)\r\n ", DHCP_SIP[0], DHCP_SIP[1], DHCP_SIP[2], DHCP_SIP[3]); printf("Another(%d.%d.%d.%d)\r\n", svr_addr[0], svr_addr[1], svr_addr[2], svr_addr[3]); } break; default : opt_len = *p++; #ifdef DHCP_DUBUG printf("opt_len : %d\r\n", opt_len); #endif break; } // switch p+=opt_len; } // while } // if } return 0; } /** * @brief This function checks the state of DHCP. */ void check_DHCP_state( SOCKET s /**< socket number */ ) { u_int len; u_char type; type = 0; if( s < MAX_SOCK_NUM && getSn_SR(s)!=SOCK_CLOSED) { if ((len = getSn_RX_RSR(s)) > 0) { type = parseDHCPMSG(s, len); } } else if(!UDPOpen(s, DHCP_CLIENT_PORT)) { printf("Fail to create the DHCPC_SOCK(%d)\r\n",s); } switch ( dhcp_state ) { case STATE_DHCP_DISCOVER : if (type == DHCP_OFFER) { reset_DHCP_time(); send_DHCP_REQUEST(s); dhcp_state = STATE_DHCP_REQUEST; printf("state : STATE_DHCP_REQUEST\r\n"); } else check_DHCP_Timeout(); break; case STATE_DHCP_REQUEST : if (type == DHCP_ACK) { reset_DHCP_time(); #ifdef __DEF_CHECK_LEASEDIP__ if (check_leasedIP()) { set_DHCP_network(); dhcp_state = STATE_DHCP_LEASED; printf("state : STATE_DHCP_LEASED\r\n"); } else { dhcp_state = STATE_DHCP_DISCOVER; printf("state : STATE_DHCP_DISCOVER\r\n"); } #else dhcp_state = STATE_DHCP_LEASED; printf("state : STATE_DHCP_LEASED\r\n"); #endif } else if (type == DHCP_NAK) { reset_DHCP_time(); dhcp_state = STATE_DHCP_DISCOVER; printf("state : STATE_DHCP_DISCOVER\r\n"); } else check_DHCP_Timeout(); break; case STATE_DHCP_LEASED : if ((lease_time.lVal != 0xffffffff) && ((lease_time.lVal/2) < dhcp_time)) { type = 0; memcpy(OLD_SIP,GET_SIP,4); DHCP_XID++; send_DHCP_REQUEST(s); dhcp_state = STATE_DHCP_REREQUEST; printf("state : STATE_DHCP_REREQUEST\r\n"); reset_DHCP_time(); } break; case STATE_DHCP_REREQUEST : if (type == DHCP_ACK) { if(memcmp(OLD_SIP,GET_SIP,4)!=0) { printf("OLD_SIP=%s, GET_SIP=%s\r\n",inet_ntoa(ntohl(*((u_long*)OLD_SIP))), inet_ntoa(ntohl(*((u_long*)GET_SIP)))); if ( dhcp_ip_update != 0 ) (*dhcp_ip_update)(); printf("The IP address from the DHCP server is updated.\r\n"); } else { printf("state : STATE_DHCP_LEASED : same IP\r\n"); } reset_DHCP_time(); dhcp_state = STATE_DHCP_LEASED; } else if (type == DHCP_NAK) { reset_DHCP_time(); dhcp_state = STATE_DHCP_DISCOVER; printf("state : STATE_DHCP_DISCOVER\r\n"); } else check_DHCP_Timeout(); break; case STATE_DHCP_RELEASE : break; default : break; } } /** * @brief This function checks the timeout of DHCP in each state. */ static void check_DHCP_Timeout(void) { if (retry_count < MAX_DHCP_RETRY) { if (next_dhcp_time < dhcp_time) { dhcp_time = 0; next_dhcp_time = dhcp_time + DHCP_WAIT_TIME; retry_count++; switch ( dhcp_state ) { case STATE_DHCP_DISCOVER : printf("<<timeout>> state : STATE_DHCP_DISCOVER\r\n"); send_DHCP_DISCOVER(DHCPC_SOCK); break; case STATE_DHCP_REQUEST : printf("<<timeout>> state : STATE_DHCP_REQUEST\r\n"); send_DHCP_REQUEST(DHCPC_SOCK); break; case STATE_DHCP_REREQUEST : printf("<<timeout>> state : STATE_DHCP_REREQUEST\r\n"); send_DHCP_REQUEST(DHCPC_SOCK); break; default : break; } } } else { reset_DHCP_time(); DHCP_timeout = 1; send_DHCP_DISCOVER(DHCPC_SOCK); dhcp_state = STATE_DHCP_DISCOVER; printf("timeout\r\nstate : STATE_DHCP_DISCOVER\r\n"); } } /** * @brief This function loads network info. to iinChip */ static void set_DHCP_network(void) { IINCHIP_WRITE((GAR0 + 0),GET_GW_IP[0]); IINCHIP_WRITE((GAR0 + 1),GET_GW_IP[1]); IINCHIP_WRITE((GAR0 + 2),GET_GW_IP[2]); IINCHIP_WRITE((GAR0 + 3),GET_GW_IP[3]); IINCHIP_WRITE((SUBR0 + 0),GET_SN_MASK[0]); IINCHIP_WRITE((SUBR0 + 1),GET_SN_MASK[1]); IINCHIP_WRITE((SUBR0 + 2),GET_SN_MASK[2]); IINCHIP_WRITE((SUBR0 + 3),GET_SN_MASK[3]); IINCHIP_WRITE((SIPR0 + 0),GET_SIP[0]); IINCHIP_WRITE((SIPR0 + 1),GET_SIP[1]); IINCHIP_WRITE((SIPR0 + 2),GET_SIP[2]); IINCHIP_WRITE((SIPR0 + 3),GET_SIP[3]); #ifdef __DEF_IINCHIP_INT__ setIMR(0xEF); #endif printf("DHCP Set IP OK. %d.%d.%d.%d\r\n", GET_SIP[0], GET_SIP[1], GET_SIP[2], GET_SIP[3]); } #ifdef __DEF_CHECK_LEASEDIP__ /** * @brief check if a leased IP is valid * @return 0 : conflict, 1 : no conflict */ static char check_leasedIP(void) { u_int a; printf("<Check the IP Conflict : "); // sendto is complete. that means there is a node which has a same IP. a = sendto(DHCPC_SOCK, "CHECK_IP_CONFLICT", 17, GET_SIP, 5000); //a = 0; if ( a> 0) { printf(" Conflict>\r\n"); send_DHCP_RELEASE_DECLINE(DHCPC_SOCK,1); if ( dhcp_ip_conflict != 0 ) (*dhcp_ip_conflict)(); return 0; } printf(" No Conflict>\r\n"); return 1; } #endif /** * @brief Get an IP from the DHCP server. * @return 0 : timeout, 1 : get dhcp ip */ u_int getIP_DHCPS() { printf("DHCP SetIP..\r\n"); send_DHCP_DISCOVER(DHCPC_SOCK); dhcp_state = STATE_DHCP_DISCOVER; reset_DHCP_time(); //set_timer(DHCP_CHECK_TIMER2, DHCP_timer_handler); DHCP_timeout = 0; while (dhcp_state != STATE_DHCP_LEASED) { if (DHCP_timeout == 1) { //kill_timer(DHCP_CHECK_TIMER2); return 0; } check_DHCP_state(DHCPC_SOCK); } return 1; } #if 0 /** * @brief DHCP timer interrupt handler(For checking dhcp lease time). * * Increase 'my_time' each one second. */ static void DHCP_timer_handler(void) { dhcp_time++; } #endif /** * @brief Get an IP from the DHCP server. */ void init_dhcp_client( SOCKET s, /**< Socket number for the DHCP client */ void(*ip_update)(void), /**< handler called when the leased IP address is updated */ void(*ip_conflict)(void) /**< handler called when the leased IP address is conflict */ ) { if(!ip_update) dhcp_ip_update = set_DHCP_network; else dhcp_ip_update = ip_update; if(!ip_conflict) dhcp_ip_conflict = proc_ip_conflict; else dhcp_ip_conflict = ip_conflict; init_dhcpc_ch(s); } /** * @brief Get an IP from the DHCP server. */ static void proc_ip_conflict(void) { printf( "The IP Address from DHCP server is CONFLICT!!!\r\n" "Retry to get a IP address from DHCP server\r\n"); } /** * @brief Initialize the socket for DHCP client */ u_int init_dhcpc_ch(SOCKET s) { u_int ret; DHCP_XID = 0x12345678; memset(GET_SIP,0,4); memset(GET_GW_IP,0,4); memset(GET_SN_MASK,0,4); IINCHIP_WRITE((SIPR0 + 0),GET_SIP[0]); IINCHIP_WRITE((SIPR0 + 1),GET_SIP[1]); IINCHIP_WRITE((SIPR0 + 2),GET_SIP[2]); IINCHIP_WRITE((SIPR0 + 3),GET_SIP[3]); IINCHIP_WRITE((SHAR0 + 0),SRC_MAC_ADDR[0]); IINCHIP_WRITE((SHAR0 + 1),SRC_MAC_ADDR[1]); IINCHIP_WRITE((SHAR0 + 2),SRC_MAC_ADDR[2]); IINCHIP_WRITE((SHAR0 + 3),SRC_MAC_ADDR[3]); IINCHIP_WRITE((SHAR0 + 4),SRC_MAC_ADDR[4]); IINCHIP_WRITE((SHAR0 + 5),SRC_MAC_ADDR[5]); #ifdef __DEF_IINCHIP_INT__ setIMR(0xFF); #endif #ifndef __DEF_IINCHIP_DBG__ { u_int i; printf("MAC : "); for (i = 0; i < 5; i++) printf("0x%02X.", SRC_MAC_ADDR[i]); printf("0x%02X\r\n",SRC_MAC_ADDR[5]); } #endif printf("DHCP socket %d \t",s); if(!UDPOpen(s, DHCP_CLIENT_PORT)) { printf("fail..\r\n"); ret = 0; } else { printf("ok..\r\n"); ret = 1; } DHCPC_SOCK = s; return ret; }
[ "jinbuhm.kim@gmail.com" ]
jinbuhm.kim@gmail.com
69929be2a63e01a7445d4fae1ca3d68479b1d901
9431604c4083387e75fbf1678d70b6901ca9d8fa
/src/main/src/ControlMap.h
c4d365fa0951c5b9cdae2e51cda90f936db6e4dd
[]
no_license
somethingsbruin4550/CppRobot2020
eb0bac724c6b313b3ac7e7d5e40bb8441bf42059
c088a8525d568e7e48156d6f93cf2763d350c4aa
refs/heads/master
2021-01-01T09:23:49.445516
2020-06-16T19:15:31
2020-06-16T19:15:31
239,217,408
0
0
null
null
null
null
UTF-8
C
false
false
632
h
#pragma once // Joystick Axises #define L_JOYSTICK_HORIZONTAL = 0; #define L_JOYSTICK_VERTICAL = 1; #define LT = 2; #define RT = 3; #define R_JOYSTICK_HORIZONTAL = 4; #define R_JOYSTICK_VERTICAL = 5; // Controller Buttons #define A_BUTTON = 1; #define B_BUTTON = 2; #define X_BUTTON = 3; #define Y_BUTTON = 4; #define LB_BUTTON = 5; #define RB_BUTTON = 6; #define BACK_BUTTON = 7; #define START_BUTTON = 8; // These buttons are when you push down the left and right circle pad #define L_JOYSTICK_BUTTON = 9; #define R_JOYSTICK_BUTTON = 10; // Controller Zeroes #define LEFT_Y_ZERO = -0.0078125; #define RIGHT_Y_ZERO = -0.0078125;
[ "ethanstacy02@gmail.com" ]
ethanstacy02@gmail.com
20166b6e322f465b3473471ceaf9d9ad165b3f66
e25c8b65c0115053b14f8ecffaea94a964eefa1f
/ds/u/k/kakasi/eq/mask.c
b31cbc94b270aa530a16608def683a412d7fb2fb
[]
no_license
zwshen/mudos-game-ds
c985b4b64c586bdc7347bd95d97ab12e78a2f20f
07ea84ebdff5ee49cb482a520bdf1aaeda886cd0
refs/heads/master
2022-03-01T14:55:10.537294
2022-02-15T15:41:26
2022-02-15T15:41:26
244,925,365
4
1
null
2022-02-15T15:41:27
2020-03-04T14:44:49
C
BIG5
C
false
false
635
c
#include <ansi.h> #include <armor.h> inherit MASK; void create() { set_name(RED"寫輪"HIW"ソ"HIY"眼"NOR,({"sha-lon mask","mask",}) ); set("long",@LONG 旗木卡卡西的貼身護具之一。 LONG ); set_weight(291); if( clonep() ) set_default_object(__FILE__); else { set("limit_int",15); set("unit", "個"); set("value",3100); set("volume", 2); set("material", "gold"); } set("armor_prop/armor",5); set("armor_prop/int",2); set("armor_prop/dex",2); setup(); }
[ "zwshen0603@gmail.com" ]
zwshen0603@gmail.com
fee1c68f2e08a73c2017443c5c186d5dda913fdc
c8cd04999cc0d98a2c790d4b08bfd26f00f10d8e
/src/cbase/error.c
1a512f562303e7e3f0a85d6b273c350e5ae01945
[]
no_license
jbrubake/smpsim
ec6faa4a0034ae0c1e942f8ee3c82c411c5881a7
d4a1435122e762f0c94294756491506cb45b0d23
refs/heads/master
2023-07-18T13:18:17.618360
2021-08-27T04:09:56
2021-08-27T04:09:56
null
0
0
null
null
null
null
UTF-8
C
false
false
3,760
c
/*-------------------------------------------------------------------------\ | error.c | | | | This file is part of libcbase | | | | libcbase is free software; you can redistribute it and/or modify | | it under the terms of the GNU General Public License as published by | | the Free Software Foundation; either version 2 of the License, or | | (at your option) any later version. | | | | libcbase is distributed in the hope that it will be usedful, | | but WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | GNU General Public License for more details. | | | | You should have received a copy of the GNU General Public License | | along with libcbase; if not, write to the Free Software | | Foundation, Inc ., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |--------------------------------------------------------------------------- | error.c Documentation | \-------------------------------------------------------------------------*/ #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <stdio.h> #include <stdarg.h> #include <string.h> #include <stdlib.h> #include "cbase/error.h" /* This is defined in GNU libc */ extern char *program_invocation_name; #define program_name program_invocation_name void error_ (int status, int errnum, const char *format, ...) { va_list ap; /* Use static buffers so we don't run the risk of ENOMEM (this is an error handler after all) */ static char buf[1024]; static char message[1024]; /* Create user part of error message */ va_start (ap, format); vsprintf (message, format, ap); va_end (ap); /* Prepend program name */ sprintf (buf, "%s: %s", program_name, message); /* Append system error message if requested */ if (errnum) sprintf (buf, "%s: %s", buf, strerror (errnum)); /* Call client handler with error message */ error_handler (buf); error_message_count++; if (status) exit (status); } void error_at_line (int status, int errnum, const char *file_name, unsigned int line_number, const char *format, ...) { va_list ap; /* Use static buffers so we don't run the risk of ENOMEM (this is an error handler after all) */ static char buf[1024]; static char message[1024]; /* If the user only wants one error per line, see if we still need to print this error */ if (error_one_per_line) { static const char *old_file_name; static unsigned int old_line_number; if (old_line_number == line_number && (file_name == old_file_name || strcmp (old_file_name, file_name) == 0)) /* Simply return and print nothing */ return; } /* Create user part of error message */ va_start (ap, format); vsprintf (message, format, ap); va_end (ap); /* Prepend program name, filename and line number*/ sprintf (buf, "%s:%s:%d: %s", program_name, file_name, line_number, message); /* Append system error message if requested */ if (errnum) sprintf (buf, "%s: %s", buf, strerror (errnum)); /* Call client handler with error message */ error_handler (buf); error_message_count++; if (status) exit (status); }
[ "jbru362@gmail.com" ]
jbru362@gmail.com
0dfd3320294559b4017e9812d1845e4c07f01377
53cec7c4ca4bef433c649c46d7cf208db4fb55e4
/u/stey/u/ziye/weapon_new/standard/body.c
32ebf9f953c578d5039879cae367cf868853fe38
[]
no_license
androids7/sjsh
c57b2f0f94932e228641a166efda8b7e19eefcc1
1c0391f6b8236f2c6e0c62a2bf904f47e3d5ca26
refs/heads/master
2021-01-09T15:35:19.076098
2016-02-21T11:27:48
2016-02-21T11:27:48
null
0
0
null
null
null
null
WINDOWS-1252
C
false
false
554
c
// tiejia.c #include <armor.h> inherit ARMOR; void create() { set_name("Ìú¼×", ({"tie jia","tiejia","jia","armor","body",})); set_weight(40000); if( clonep() ) set_default_object(__FILE__); else { set("unit", "¼þ"); set("long", "Ò»¼þ³ÁµéµéµÄÌú¼×¡£\n"); set("value", 5000); set("material", "steel"); set("armor_prop/armor", 40); set("armor_prop/dodge", -10); } setup(); }
[ "liming.xie@gmail.com" ]
liming.xie@gmail.com
f7f8e7dfd789e8ae223042325a40175a1b5920f2
48138de07966053e6aae6eeda42acf37037e23da
/All_Sprints/sprint08/t03/mx_hex_to_nbr.c
82e5a2236b118a22c57f34735a27def5a4cac935
[]
no_license
JustXAH/Ucode_MarathonC
23f425320c3671753292d5089b8ce54205dfa3c1
22ebf06f2cf2c5c62746bbb53e5397511ad5cae8
refs/heads/master
2022-12-07T16:23:47.164830
2020-09-01T12:57:24
2020-09-01T12:57:24
291,010,240
0
2
null
null
null
null
UTF-8
C
false
false
619
c
#include "hex_to_nbr.h" unsigned long mx_hex_to_nbr(const char *hex) { unsigned long nbr = 0; int n = 0; unsigned long dec = 1; if (!hex) return 0; for ( ;hex[n + 1]; n++) dec *= 16; for (int i = 0; hex[i]; i++) { if (mx_isdigit(hex[i])) nbr += (hex[i] - 48) * dec; else if (mx_isalpha(hex[i])) { if (mx_isupper(hex[i]) && hex[i] <= 'F') nbr += (hex[i] - 55) * dec; else if (mx_islower(hex[i]) && hex[i] <= 'f') nbr += (hex[i] - 87) * dec; } dec /= 16; } return nbr; }
[ "ikhanenko@student.ucode.world" ]
ikhanenko@student.ucode.world
6f7ce927611fe4a889cb5a5e5b58eaef88188035
40de3da30239862f11a946166b50438174c2fd4e
/lib/wizards/nalle/_lasttells.c
f79127590c13f9bc08ee0ed3311e9f3dae2b6505
[ "MIT" ]
permissive
vlehtola/questmud
f53b7205351f30e846110300d60b639d52d113f8
8bc3099b5ad00a9e0261faeb6637c76b521b6dbe
refs/heads/master
2020-12-23T19:59:44.886028
2020-01-30T15:52:16
2020-01-30T15:52:16
237,240,459
0
0
null
null
null
null
UTF-8
C
false
false
529
c
cmd_lasttells(str) { object ob; if (!str) { write("Need argument.\n"); return 1; } ob = find_player(lower_case(str)); if (!ob) { write("No such a player.\n"); return 1; } last_tell(ob->query_last_tells()); if (ob->query_level()>this_player()->query_level() && this_player()->query_name()!="Nalle") { tell_object(ob,"[Last tells checked by "+this_player()->query_name()+"]\n"); } return 1; } status last_tell(string *arr) { int x; for(x=0;x<sizeof(arr);x++) { write(arr[x]); } return 1; }
[ "ville.lehtola@iki.fi" ]
ville.lehtola@iki.fi
069c70124b3efca58105d360bb0eabacbb1e8b96
976f5e0b583c3f3a87a142187b9a2b2a5ae9cf6f
/source/linux/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/extr_hw.c__rtl88ee_set_media_status.c
38289adb71752c25e0bb4df3df115326339b5b58
[]
no_license
isabella232/AnghaBench
7ba90823cf8c0dd25a803d1688500eec91d1cf4e
9a5f60cdc907a0475090eef45e5be43392c25132
refs/heads/master
2023-04-20T09:05:33.024569
2021-05-07T18:36:26
2021-05-07T18:36:26
null
0
0
null
null
null
null
UTF-8
C
false
false
4,071
c
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ typedef struct TYPE_6__ TYPE_3__ ; typedef struct TYPE_5__ TYPE_2__ ; typedef struct TYPE_4__ TYPE_1__ ; /* Type definitions */ typedef int u8 ; struct TYPE_4__ {scalar_t__ link_state; } ; struct rtl_priv {TYPE_3__* cfg; TYPE_1__ mac80211; } ; struct ieee80211_hw {int dummy; } ; typedef enum nl80211_iftype { ____Placeholder_nl80211_iftype } nl80211_iftype ; typedef enum led_ctl_mode { ____Placeholder_led_ctl_mode } led_ctl_mode ; struct TYPE_6__ {TYPE_2__* ops; } ; struct TYPE_5__ {int /*<<< orphan*/ (* led_control ) (struct ieee80211_hw*,int) ;} ; /* Variables and functions */ int /*<<< orphan*/ COMP_ERR ; int /*<<< orphan*/ COMP_INIT ; int /*<<< orphan*/ DBG_TRACE ; int /*<<< orphan*/ DBG_WARNING ; int LED_CTL_LINK ; int LED_CTL_NO_LINK ; scalar_t__ MAC80211_LINKED ; scalar_t__ MSR ; int MSR_ADHOC ; int MSR_AP ; int MSR_INFRA ; int MSR_NOLINK ; #define NL80211_IFTYPE_ADHOC 132 #define NL80211_IFTYPE_AP 131 #define NL80211_IFTYPE_MESH_POINT 130 #define NL80211_IFTYPE_STATION 129 #define NL80211_IFTYPE_UNSPECIFIED 128 scalar_t__ REG_BCNTCFG ; int /*<<< orphan*/ RT_TRACE (struct rtl_priv*,int /*<<< orphan*/ ,int /*<<< orphan*/ ,char*,...) ; int /*<<< orphan*/ _rtl88ee_disable_bcn_sub_func (struct ieee80211_hw*) ; int /*<<< orphan*/ _rtl88ee_enable_bcn_sub_func (struct ieee80211_hw*) ; int /*<<< orphan*/ _rtl88ee_resume_tx_beacon (struct ieee80211_hw*) ; int /*<<< orphan*/ _rtl88ee_stop_tx_beacon (struct ieee80211_hw*) ; int /*<<< orphan*/ pr_err (char*,int) ; struct rtl_priv* rtl_priv (struct ieee80211_hw*) ; int rtl_read_byte (struct rtl_priv*,scalar_t__) ; int /*<<< orphan*/ rtl_write_byte (struct rtl_priv*,scalar_t__,int) ; int /*<<< orphan*/ stub1 (struct ieee80211_hw*,int) ; __attribute__((used)) static int _rtl88ee_set_media_status(struct ieee80211_hw *hw, enum nl80211_iftype type) { struct rtl_priv *rtlpriv = rtl_priv(hw); u8 bt_msr = rtl_read_byte(rtlpriv, MSR) & 0xfc; enum led_ctl_mode ledaction = LED_CTL_NO_LINK; u8 mode = MSR_NOLINK; switch (type) { case NL80211_IFTYPE_UNSPECIFIED: mode = MSR_NOLINK; RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Set Network type to NO LINK!\n"); break; case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_MESH_POINT: mode = MSR_ADHOC; RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Set Network type to Ad Hoc!\n"); break; case NL80211_IFTYPE_STATION: mode = MSR_INFRA; ledaction = LED_CTL_LINK; RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Set Network type to STA!\n"); break; case NL80211_IFTYPE_AP: mode = MSR_AP; ledaction = LED_CTL_LINK; RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Set Network type to AP!\n"); break; default: pr_err("Network type %d not support!\n", type); return 1; break; } /* MSR_INFRA == Link in infrastructure network; * MSR_ADHOC == Link in ad hoc network; * Therefore, check link state is necessary. * * MSR_AP == AP mode; link state is not cared here. */ if (mode != MSR_AP && rtlpriv->mac80211.link_state < MAC80211_LINKED) { mode = MSR_NOLINK; ledaction = LED_CTL_NO_LINK; } if (mode == MSR_NOLINK || mode == MSR_INFRA) { _rtl88ee_stop_tx_beacon(hw); _rtl88ee_enable_bcn_sub_func(hw); } else if (mode == MSR_ADHOC || mode == MSR_AP) { _rtl88ee_resume_tx_beacon(hw); _rtl88ee_disable_bcn_sub_func(hw); } else { RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, "Set HW_VAR_MEDIA_STATUS: No such media status(%x).\n", mode); } rtl_write_byte(rtlpriv, MSR, bt_msr | mode); rtlpriv->cfg->ops->led_control(hw, ledaction); if (mode == MSR_AP) rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00); else rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66); return 0; }
[ "brenocfg@gmail.com" ]
brenocfg@gmail.com
e418c13f6ed8184256e55213d63af207f2a4a6d6
fe692881320e10c55962cebd165d478c1434c359
/skill/64/64039.c
9f4e4f409feaabfc8dee4302dc8eeda31eeb2275
[]
no_license
anho9339/chienquoc
130602c90c43053bbc99dfbfbc877de0b2d81dd7
cb5157d5eabcb4bb2ff71c292cfbdd5dc5fbb221
refs/heads/master
2021-07-04T07:51:49.408023
2021-02-01T15:15:58
2021-02-01T15:15:58
222,929,950
1
0
null
null
null
null
UTF-8
C
false
false
567
c
#include <ansi.h> #include <skill.h> #include <effect.h> #include <equip.h> #include <item.h> inherit "/inh/std/vitaskill"; void create() { set_skill(640); set_skill_type(2); set_number(39); set_name("Bích Long Đầu Cân Chế Tác"); set_skill_level(34); set_tool(510); set_tili(1); set_final("/item/final/65/2030"); set_skill_temp(0); set_master("0"); set_skill_color(0); set_base_rate(75); set_product( ([ "48" : 2, "236" : 1, "35" : 1, // 无 : 0, // 无 : 0, // 无 : 0, ])); set_count(1); }
[ "hothienan1993@gmail.com" ]
hothienan1993@gmail.com
0773347eee3c6872054e2a22a3d09b2a0bc0d8f9
0be7bb63022754d44b5d272309109f63d7862727
/m/rls/rlb/ricas.c
1b37ad47b88478ce898094ad1cfbc6a5408bccfd
[]
no_license
rust11/rust
dbb3f68d2b8eea6a5de064f644e203fa2cacd8b2
8d347f1415da38b679cbafe2eb0ae0332c0ff0ee
refs/heads/master
2023-03-10T06:35:41.453764
2023-03-08T18:26:00
2023-03-08T18:26:00
32,439,492
13
2
null
2022-08-12T04:10:56
2015-03-18T05:18:25
R
UTF-8
C
false
false
1,777
c
/* file - ricas - case statements */ #include "m:\rid\ridef.h" #include "m:\rid\ridat.h" #include "m:\rid\chdef.h" #include "m:\rid\imdef.h" #include "m:\rid\eddef.h" #include "m:\rid\stdef.h" #define riKcas 32 int riVcas = 0; int riAcas [riKcas]= {0}; /* code - ri_orf - or/of preprocessor */ void ri_orf( int brk ) { char Alab [128]; register char *lab = &Alab[0]; char *dot = edPdot; *lab = 0; if ( ! riAcas[riVcas]) { if ( riVfil != 0) { im_rep ("W-of/or not in case in (%s)", riAseg); } riAcas[++riVcas] = 2; } if (( brk) &&(riAcas[riVcas] != 1)) { st_app (" break; ", lab); } ++riAcas[riVcas]; ed_del (" "); if ( ed_del ("other")) { st_app ("default: ", lab); ri_idn (-1); ri_prt (lab); return; } dot = ut_tok (dot, (st_app ("case ", lab))); st_app (":", lab); ri_idn (-1); ri_prt (lab); st_mov (dot, edPdot); ed_del (" "); } /* code - kw_cas - case statement */ void kw_cas() { ed_pre ("switch ("); ed_app (")"); ri_beg (); riAcas[++riVcas] = 1; } /* code - kw_eca - end-case statement */ void kw_eca() { ri_end (); if ( ! riVcas) { im_rep ("W-end_case not in case in (%s)", riAseg); } else { --riVcas; } } /* code - kw_or - handle of ... to ... */ void kw_or() { char Alab [128]; register char *lab = &Alab[0]; register char *dot = edPdot; register char cha ; char ter ; int cnt ; cha = dot[1]; ter = dot[8]; dot[1] = 'a'; dot[8] = 'a'; if ( (st_cmp (dot, "'a' to 'a'"))) { dot[1] = cha; dot[8] = ter; } st_mov ("case 'a': ", lab); cnt = 8; while ( cha != ter) { if ( --cnt == 0) { cnt = 8; ri_new (); } lab[6] = cha; ri_dis (lab); if ( ter > cha) { ++cha; } else { --cha; } } ri_new (); ++riVsup; }
[ "rust11@users.noreply.github.com" ]
rust11@users.noreply.github.com
1220aa7be10913bcb58d4ec2ab151107ed629ce5
34d4b9e87627b76ea09fe5c397446659c9fb62c6
/Digital_Music_Manager/DMM/main.c
7fc3766ff9e37ab64776337dd8b2756049ca6031
[]
no_license
ryan-neisess/code-samples
d0f0a36a9e37fabaa5d4a5623ac3a9eafad4dca4
ae8ffdca33238f6bd91cbb80309fb92d6fc40af9
refs/heads/master
2020-03-29T21:40:26.910898
2019-10-18T08:40:09
2019-10-18T08:40:09
150,380,065
0
0
null
null
null
null
UTF-8
C
false
false
616
c
/* Programmer: Ryan Neisess Course: CptS 122, Section 6, Spring 2016 Instructor: Andy O'Fallon, TA: Peter Qafoku Title: PA2, Digital Music Manager Date completed: Mar 12th, 2016 Description: The program is a basic, text-based digital music manager that allows users to load in music records from a text file, store records in a text file, add records, delete records, edit records, and edit specifically the ratings in a record. The digital music manager (DMM) utilizes a circular doubly linked list for implementation. */ #include "digitalMusicManager.h" int main(void) { openMenu(); return 0; }
[ "ryan.neisess@wsu.edu" ]
ryan.neisess@wsu.edu
12a78efb3fca6bdabcd8167fb6d11bdd635c34ce
de83bac98c6351add062d890000bc364ea68972b
/Lab3/SudokuValidator.c
0ac0da49e7100c643f1d5b24acc9f235266b0388
[]
no_license
KristenBrandt/Sistemas-Operativos
f044423f37078dcb573f329efce54b39ee0c2611
1c357f9f8b1243c30d0f982e99922324a1119fcc
refs/heads/main
2023-04-21T07:45:07.742394
2021-04-27T03:52:21
2021-04-27T03:52:21
337,278,232
0
0
null
null
null
null
UTF-8
C
false
false
2,371
c
#include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <stdlib.h> #include <stdbool.h> int tablero[9][9]; int revisado_rows; int revisado_cols; int revisado_squares; /*validacion de rows */ void *validarRows( void *param){ int j,k; for (j = 0;j<9;j++){ int revisar_nums[] = {1,2,3,4,5,6,7,8,9}; for (k = 0;k<9;k++){ if (tablero[j][k] > 9 || revisar_nums[tablero[j][k]-1] != tablero[j][k]){ revisado_squares = 0; } } revisar_nums[tablero[j][k]-1] = 0; } } /*validacion de cols */ void *validarCols (void * param){ int j,k; for (j=0;j<9;j++){ int revisar_nums[] = {1,2,3,4,5,6,7,8,9}; for (k=0;k<9;k++){ if (tablero[j][k] >9 || revisar_nums[tablero[j][k]-1] != tablero[j][k]){ revisado_cols = 0; } } } } /*validacion por squares*/ void *validarSquares (){ int j,k,m; int counter = 0; do{ int algo = 0; do{ int revisar[9]= {0}; int index = 0; for (j = 0 ; j<3 ; j++){ for (k = 0 ; k<3 ;k++){ tablero[j + counter][k + algo]; printf("Tablero: %d", tablero[j + counter][k + algo]); revisar[index] = tablero[j+counter][k+algo]; index++; } } /*if (revisar_valores(revisar)){ revisado_squares = 0; } */ algo += 3; }while(algo<9); counter += 3; }while(counter<9); } void revisar_valores(){ bool uno = false; bool dos = false; bool tres = false; bool cuatro = false; bool cinco = false; bool seis = false; bool siete = false; bool ocho = false; bool nueve = false; /*if (uno && dos && tres && cuatro && cinco && seis && siete && ocho && nueve){ } else: */ } int main(int argc, char* argv[]){ if (argc < 2){ printf("Numero de parametros incorrecto.\n"); } /* Abrir el file */ FILE *file; file = fopen(argv[1],"r"); char numero [81]; /*numero de elementos del sudoku */ int numeros [81]; char ch; int i,j,k,w, counter,counter2; /*revisar si el archivo esta vacio */ if (file == NULL){ printf("Archivo Vacio\n"); } /* obtener cada caracter */ while ((ch = fgetc(file))!= EOF){ numeros[counter] = ch - '0'; counter++; } /*Meter digitos a 2d array */ for (j = 0; j<9; j++){ for(k = 0; k<9; k++){ tablero[j][k] = numeros[counter2]; /*printf("%d\n", tablero[j][k]);*/ counter2++; } } validarSquares(); fclose(file); return 0; }
[ "kabrandtf@gmail.com" ]
kabrandtf@gmail.com
82c98a8b84dc7b2652ac0f7c3e5e3f30b641cf7c
a7075fce559886acfc7ab683dd5aa67323ff5f88
/sensorSO.c
9651874e1c610d601fea02755f45e815584461ee
[]
no_license
edaniel09/proyecto2pSO
ef263b8de6a0da0e80618ee58084c2384deca4c3
3481b15db32a3869d03251d7b6a556b94d6be79f
refs/heads/master
2020-04-19T20:00:13.785892
2019-01-30T19:36:39
2019-01-30T19:36:39
168,403,241
0
0
null
null
null
null
UTF-8
C
false
false
3,404
c
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * main.c * Copyright (C) Daniel Ochoa Donoso 2010 <dochoa@fiec.espol.edu.ec> * * main.c is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * main.c is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <unistd.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <time.h> #define SHMSZ 27 #define MAX_SAMPLES 100 #define MAX_SAMPLES_THETA 50 #define DIST 10 #define PI 3.14159265 /* ranf() is uniform in 0..1 */ float box_muller(float m, float s); /* normal random variate generator */ int main(int argc, char *argv[]) { char c; int shmidd,shmidt; key_t keyd,keyt; char *shmd, *shmt; int i,j; float distances[MAX_SAMPLES]; float angles[MAX_SAMPLES_THETA]; float anglesD[MAX_SAMPLES]; float mu,sigma,delta_theta; struct timespec tim, tim2; tim.tv_sec = 1; tim.tv_nsec = 0; //keyd = 1234; keyd = (atoi)(argv[1]); if ((shmidd = shmget(keyd, SHMSZ, IPC_CREAT | 0666)) < 0) { perror("shmget"); return(1); } if ((shmd = shmat(shmidd, NULL, 0)) == (char *) -1) { perror("shmat"); return(1); } //keyt = 5678; keyt = (atoi)(argv[2]); if ((shmidt = shmget(keyt, SHMSZ, IPC_CREAT | 0666)) < 0) { perror("shmget"); return(1); } if ((shmt = shmat(shmidt, NULL, 0)) == (char *) -1) { perror("shmat"); return(1); } mu=0; sigma=25; sleep(3); for(i=0;i<MAX_SAMPLES_THETA;i++) { angles[i]=box_muller(mu,sigma); } j=-1; for(i=0;i<MAX_SAMPLES_THETA-1;i++) { if (j++<MAX_SAMPLES) anglesD[j]=angles[i]; if (j++<MAX_SAMPLES){ delta_theta=abs(angles[i+1]-angles[i])/2; if (angles[i+1]>angles[i]) anglesD[j]= angles[i]+delta_theta; else anglesD[j]= angles[i]-delta_theta; } } for(i=0;i<j;i++){ distances[i]=DIST/cos(anglesD[i]/180*PI); } for(i=0;i<j;i++){ if(nanosleep(&tim , &tim2) < 0 ) { printf("Nano sleep failed \n"); return -1; } sprintf(shmd,"%f",distances[i]); if (i%2==0){ sprintf(shmt,"%f",anglesD[i]); }else{ strcpy(shmt,"--"); } } return(0); } float box_muller(float m, float s) /* normal random variate generator */ { /* mean m, standard deviation s */ float x1, x2, w, y1; static float y2; static int use_last = 0; if (use_last) /* use value from previous call */ { y1 = y2; use_last = 0; } else { do { x1 = 2.0 * ((double)(rand())/RAND_MAX)- 1.0; x2 = 2.0 * ((double)(rand())/RAND_MAX) - 1.0; w = x1 * x1 + x2 * x2; } while ( w >= 1.0 ); w = sqrt( (-2.0 * log( w ) ) / w ); y1 = x1 * w; y2 = x2 * w; use_last = 1; } return( m + y1 * s ); }
[ "edmoreira0193@gmail.com" ]
edmoreira0193@gmail.com
21be6a582b8e63d1914e9e99236ffbc6d085fe75
8c04df9a515c339793a270b6230259805b00262c
/pwmMCC.X/mcc_generated_files/pin_manager.h
808e320aa8cde920284761b7a49e805427ac84aa
[ "MIT" ]
permissive
yogee1707/myPicProjects
4b0bc1231a7fcf6a32bfe4bd633f3e73b1fc008e
8f7445629e09dc51340a93089eff62d06a5c4ff6
refs/heads/master
2020-05-14T20:13:46.156189
2019-04-17T22:07:05
2019-04-17T22:07:05
181,941,141
0
0
null
null
null
null
UTF-8
C
false
false
2,496
h
/** @Generated Pin Manager Header File @Company: Microchip Technology Inc. @File Name: pin_manager.h @Summary: This is the Pin Manager file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs @Description This header file provides APIs for driver for . Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.76 Device : PIC18F45K22 Driver Version : 2.11 The generated drivers are tested against the following: Compiler : XC8 2.00 MPLAB : MPLAB X 5.10 */ /* (c) 2018 Microchip Technology Inc. and its subsidiaries. Subject to your compliance with these terms, you may use Microchip software and any derivatives exclusively with Microchip products. It is your responsibility to comply with third party license terms applicable to your use of third party software (including open source software) that may accompany Microchip software. THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. */ #ifndef PIN_MANAGER_H #define PIN_MANAGER_H /** Section: Included Files */ #include <xc.h> #define INPUT 1 #define OUTPUT 0 #define HIGH 1 #define LOW 0 #define ANALOG 1 #define DIGITAL 0 #define PULL_UP_ENABLED 1 #define PULL_UP_DISABLED 0 /** @Param none @Returns none @Description GPIO and peripheral I/O initialization @Example PIN_MANAGER_Initialize(); */ void PIN_MANAGER_Initialize (void); /** * @Param none * @Returns none * @Description Interrupt on Change Handling routine * @Example PIN_MANAGER_IOC(); */ void PIN_MANAGER_IOC(void); #endif // PIN_MANAGER_H /** End of File */
[ "yotamhane@gmail.com" ]
yotamhane@gmail.com
64486a0bde81d5f04a3ae1a4f00aa5c1e5cb8030
7e61bcdf368941c26381e7772eddec5522341c22
/6/spin/pan.c
96352474c05d4501e1062be2a1c2860b7bf70d22
[]
no_license
luciacortes/isel2018
8db9783a392ee012d95295a0cd0cf2c391869901
365fd4fe1765cf0005b425f4e45a4c1582d6b601
refs/heads/master
2021-04-30T07:43:08.442138
2018-06-03T21:11:49
2018-06-03T21:11:49
121,355,421
1
0
null
null
null
null
UTF-8
C
false
false
330,890
c
/*** Generated by Spin Version 6.4.7 -- 19 August 2017 ***/ /*** From source: alarma.pml ***/ #ifdef SC #define _FILE_OFFSET_BITS 64 #endif #include <stdio.h> #include <signal.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <ctype.h> #include <errno.h> #if defined(WIN32) || defined(WIN64) #include <time.h> #else #include <unistd.h> #include <sys/times.h> #endif #include <sys/types.h> #include <sys/stat.h> #include <limits.h> #include <fcntl.h> #define Offsetof(X, Y) ((ulong)(&(((X *)0)->Y))) #ifndef max #define max(a,b) (((a)<(b)) ? (b) : (a)) #endif #ifndef PRINTF int Printf(const char *fmt, ...); /* prototype only */ #endif #include "pan.h" char *TrailFile = PanSource; /* default */ char *trailfilename; #ifdef LOOPSTATE double cnt_loops; #endif State A_Root; /* seed-state for cycles */ State now; /* the full state-vector */ #if NQS > 0 short q_flds[NQS+1]; short q_max[NQS+1]; #endif #undef C_States #if defined(C_States) && (HAS_TRACK==1) void c_update(uchar *p_t_r) { #ifdef VERBOSE printf("c_update %p\n", p_t_r); #endif } void c_revert(uchar *p_t_r) { #ifdef VERBOSE printf("c_revert %p\n", p_t_r); #endif } #endif void globinit(void) { } #if VECTORSZ>32000 extern int #else extern short #endif *proc_offset, *q_offset; void locinit2(int h) { } void locinit1(int h) { } void locinit0(int h) { } #ifdef RANDOMIZE #define T_RAND RANDOMIZE #endif #ifdef CNTRSTACK #define onstack_now() (LL[trpt->j6] && LL[trpt->j7]) #define onstack_put() LL[trpt->j6]++; LL[trpt->j7]++ #define onstack_zap() LL[trpt->j6]--; LL[trpt->j7]-- #endif #if !defined(SAFETY) && !defined(NOCOMP) #define V_A (((now._a_t&1)?2:1) << (now._a_t&2)) #define A_V (((now._a_t&1)?1:2) << (now._a_t&2)) int S_A = 0; #else #define V_A 0 #define A_V 0 #define S_A 0 #endif #ifdef MA #undef onstack_now #undef onstack_put #undef onstack_zap #define onstack_put() ; #define onstack_zap() g_store((char *) &now, vsize, 4) #else #if defined(FULLSTACK) && !defined(BITSTATE) #define onstack_put() trpt->ostate = Lstate #define onstack_zap() { \ if (trpt->ostate) \ trpt->ostate->tagged = \ (S_A)? (trpt->ostate->tagged&~V_A) : 0; \ } #endif #endif H_el **H_tab, **S_Tab; /* #ifndef BFS_PAR */ H_el *Lstate; /* #endif */ Trail *trail, *trpt; FILE *efd; uchar *this; long maxdepth=10000; long omaxdepth=10000; #ifdef BCS /* bitflags in trpt->bcs */ #define B_PHASE1 1 #define B_PHASE2 2 #define B_FORCED 4 int sched_max = 0; #endif double quota; /* time limit */ #if NCORE>1 long z_handoff = -1; #endif #ifdef SC char *stackfile; #endif uchar *SS, *LL; uchar reversing = 0; uchar HASH_NR = 0; double memcnt = (double) 0; double memlim = (double) (1<<30); /* 1 GB */ #if NCORE>1 double mem_reserved = (double) 0; #endif /* for emalloc: */ static char *have; static long left = 0L; static double fragment = (double) 0; static ulong grow; unsigned int HASH_CONST[] = { /* generated by hashgen 421 -- assumes 4 bytes per int */ 0x100d4e63, 0x0fc22f87, 0xa7155c77, 0x78f2c3b9, 0xde32d207, 0xc27d305b, 0x1bb3fb2b, 0x2798c7a5, 0x9c675ffd, 0x777d9081, 0x07aef2f1, 0xae08922f, 0x5bd365b7, 0xed51c47b, 0x9b5aeea1, 0xbcc9d431, 0x396d8fff, 0xa2fd1367, 0x08616521, 0x5e84991f, 0x87495bc5, 0x2930039b, 0xceb6a593, 0xfe522d63, 0x7ff60baf, 0xf89b1fbf, 0x74c01755, 0xe0c559bf, 0x3669fc47, 0x8756d3bf, 0x14f78445, 0x24c41779, 0x0af7b129, 0xde22368d, 0x3e1c01e3, 0xaf773e49, 0x5b762459, 0x86d12911, 0x0953a3af, 0xb66dc23d, 0x96b3bd4f, 0x19b1dd51, 0xd886fbc3, 0xa7f3a025, 0xccb48e63, 0x87d8f027, 0x2bea270d, 0xdb0e9379, 0x78c09f21, 0x0cbbfe07, 0xea4bc7c3, 0x5bfbc3c9, 0x3c6e53fd, 0xab320cdd, 0x31041409, 0x416e7485, 0xe41d75fd, 0xc3c5060f, 0x201a9dc1, 0x93dee72b, 0x6461305f, 0xc571dec5, 0xa1fd21c5, 0xfb421ce1, 0x7f024b05, 0xfa518819, 0x6c9777fb, 0x0d4d9351, 0x08b33861, 0xccb9d0f3, 0x34112791, 0xe962d7c9, 0x8d742211, 0xcd9c47a1, 0x64437b69, 0x5fe40feb, 0x806113cb, 0x10e1d593, 0x821851b3, 0x057a1ff3, 0x8ededc0b, 0x90dd5b31, 0x635ff359, 0x68dbcd35, 0x1050ff4f, 0xdbb07257, 0x486336db, 0x83af1e75, 0x432f1799, 0xc1d0e7e7, 0x21f4eb5b, 0x881ec2c1, 0x23f3b539, 0x6cdfb80d, 0x71d474cf, 0x97d5d4a9, 0xf721d2e5, 0xb5ff3711, 0x3f2e58cd, 0x4e06e3d9, 0x7d711739, 0x927887df, 0x7d57ad71, 0x232eb767, 0xe3f5cc51, 0x6576b443, 0xed17bf1f, 0x8828b637, 0xc940f6ab, 0xc7b830ef, 0x11ed8a13, 0xaff20949, 0xf28a8465, 0x0da10cf9, 0xb512497d, 0x44accae1, 0x95e0929f, 0xe08c8901, 0xfd22d6c9, 0xb6a5c029, 0xaadb428d, 0x6e8a453d, 0x3d5c0195, 0x8bf4ae39, 0xbf83ab19, 0x3e9dac33, 0xc4df075d, 0x39472d71, 0xb8647725, 0x1a6d4887, 0x78a03577, 0xafd76ef7, 0xc1a1d6b3, 0x1afb33c5, 0x87896299, 0x5cc992ef, 0x7f805d0d, 0x089a039b, 0xa353cc27, 0x57b296b3, 0x52badec9, 0xc916e431, 0x09171957, 0x14996d51, 0xe87e32c7, 0xb4fdbb5d, 0xdd216a03, 0x4ddd3fff, 0x767d5c57, 0x79c97509, 0xab70543b, 0xc5feca4f, 0x8eb37b89, 0x20a2cefd, 0xf4b00b91, 0xf166593d, 0x7bf50f65, 0x753e6c8b, 0xfb5b81dd, 0xf2d45ef5, 0x9741c04f, 0x300da48d, 0x01dc4121, 0xa112cd47, 0x0223b24b, 0xa89fbce7, 0x681e1f7b, 0xe7c6aedf, 0x1fd3d523, 0x561ba723, 0xf54042fb, 0x1a516751, 0xcd085bd5, 0xe74246d5, 0x8b170b5d, 0x249985e9, 0x5b4d9cf7, 0xe9912323, 0x5fc0f339, 0x41f8f051, 0x8a296fb1, 0x62909f51, 0x2c05d695, 0x095efccb, 0xa91574f1, 0x0f5cc6c3, 0x23a2ca2b, 0xc6053ec1, 0xeb19e081, 0x3d1b3997, 0xb0c5f3cd, 0xe5d85b35, 0x1cb1bdf1, 0x0c8f278f, 0x518249c3, 0x9f61b68d, 0xade0919d, 0x779e29c3, 0xdbac9485, 0x2ce149a9, 0x254c2409, 0x205b34fb, 0xc8ab1a89, 0x6b4a2585, 0x2303d94b, 0x8fa186b9, 0x49826da5, 0xd23a37ad, 0x680b18c9, 0xa46fbd7f, 0xe42c2cf9, 0xf7cfcb5f, 0xb4842b8b, 0xe483780d, 0x66cf756b, 0x3eb73781, 0x41ca17a5, 0x59f91b0f, 0x92fb67d9, 0x0a5c330f, 0x46013fdb, 0x3b0634af, 0x9024f533, 0x96a001a7, 0x15bcd793, 0x3a311fb1, 0x78913b8b, 0x9d4a5ddf, 0x33189b31, 0xa99e8283, 0xf7cb29e9, 0x12d64a27, 0xeda770ff, 0xa7320297, 0xbd3c14a5, 0x96d0156f, 0x0115db95, 0x7f79f52b, 0xa6d52521, 0xa063d4bd, 0x9cb5e039, 0x42cf8195, 0xcb716835, 0x1bc21273, 0x5a67ad27, 0x4b3b0545, 0x162cda67, 0x0489166b, 0x85fd06a9, 0x562b037d, 0x995bc1f3, 0xe144e78b, 0x1e749f69, 0xa36df057, 0xcfee1667, 0x8c4116b7, 0x94647fe3, 0xe6899df7, 0x6d218981, 0xf1069079, 0xd1851a33, 0xf424fc83, 0x24467005, 0xad8caf59, 0x1ae5da13, 0x497612f9, 0x10f6d1ef, 0xeaf4ff05, 0x405f030b, 0x693b041d, 0x2065a645, 0x9fec71b3, 0xc3bd1b0f, 0xf29217a3, 0x0f25e15d, 0xd48c2b97, 0xce8acf2d, 0x0629489b, 0x1a5b0e01, 0x32d0c059, 0x2d3664bf, 0xc45f3833, 0xd57f551b, 0xbdd991c5, 0x9f97da9f, 0xa029c2a9, 0x5dd0cbdf, 0xe237ba41, 0x62bb0b59, 0x93e7d037, 0x7e495619, 0x51b8282f, 0x853e8ef3, 0x9b8abbeb, 0x055f66f9, 0x2736f7e5, 0x8d7e6353, 0x143abb65, 0x4e2bb5b3, 0x872e1adf, 0x8fcac853, 0xb7cf6e57, 0x12177f3d, 0x1d2da641, 0x07856425, 0xc0ed53dd, 0x252271d9, 0x79874843, 0x0aa8c9b5, 0x7e804f93, 0x2d080e09, 0x3929ddfd, 0x36433dbd, 0xd6568c17, 0xe624e939, 0xb33189ef, 0x29e68bff, 0x8aae2433, 0xe6335499, 0xc5facd9d, 0xbd5afc65, 0x7a584fa7, 0xab191435, 0x64bbdeef, 0x9f5cd8e1, 0xb3a1be05, 0xbd0c1753, 0xb00e2c7f, 0x6a96e315, 0x96a31589, 0x660af5af, 0xc0438d43, 0x17637373, 0x6460e8df, 0x7d458de9, 0xd76b923f, 0x316f045f, 0x3ccbd035, 0x63f64d81, 0xd990d969, 0x7c860a93, 0x99269ff7, 0x6fbcac8f, 0xd8cc562b, 0x67141071, 0x09f85ea3, 0x1298f2dd, 0x41fa86e5, 0xce1d7cf5, 0x6b232c9d, 0x8f093d4b, 0x3203ad4b, 0x07d70d5f, 0x38c44c75, 0x0887c9ef, 0x1833acf5, 0xa3607f85, 0x7d367573, 0x0ea4ffc3, 0xad2d09c1, 0x7a1e664f, 0xef41dff5, 0x03563491, 0x67f30a1f, 0x5ce5f9ef, 0xa2487a27, 0xe5077957, 0x9beb36fd, 0x16e41251, 0x216799ef, 0x07181f8d, 0xc191c3cf, 0xba21cab5, 0x73944eb7, 0xdf9eb69d, 0x5fef6cfd, 0xd750a6f5, 0x04f3fa43, 0x7cb2d063, 0xd3bdb369, 0x35f35981, 0x9f294633, 0x5e293517, 0x70e51d05, 0xf8db618d, 0x66ee05db, 0x835eaa77, 0x166a02c3, 0xb516f283, 0x94102293, 0x1ace50a5, 0x64072651, 0x66df7b75, 0x02e1b261, 0x8e6a73b9, 0x19dddfe7, 0xd551cf39, 0x391c17cb, 0xf4304de5, 0xcd67b8d1, 0x25873e8d, 0x115b4c71, 0x36e062f3, 0xaec0c7c9, 0xd929f79d, 0x935a661b, 0xda762b47, 0x170bd76b, 0x1a955cb5, 0x341fb0ef, 0x7f366cef, 0xc98f60c7, 0xa4181af3, 0xa94a8837, 0x5fa3bc43, 0x11c638c1, 0x4e66fabb, 0x30ab85cf, 0x250704ef, 0x8bf3bc07, 0x6d2cd5ab, 0x613ef9c3, 0xb8e62149, 0x0404fd91, 0xa04fd9b1, 0xa5e389eb, 0x9543bd23, 0xad6ca1f9, 0x210c49ab, 0xf8e9532b, 0x854fba89, 0xdc7fc6bb, 0x48a051a7, 0x6b2f383b, 0x61a4b433, 0xd3af231b, 0xc5023fc7, 0xa5aa85df, 0xa0cd1157, 0x4206f64d, 0x3fea31c3, 0x62d510a1, 0x13988957, 0x6a11a033, 0x46f2a3b7, 0x2784ef85, 0x229eb9eb, 0x9c0c3053, 0x5b7ead39, 0x82ae9afb, 0xf99e9fb3, 0x914b6459, 0xaf05edd7, 0xc82710dd, 0x8fc1ea1f, 0x7e0d7a8d, 0x7c7592e9, 0x65321017, 0xea57553f, 0x4aeb49ff, 0x5239ae4d, 0x4b4b4585, 0x94091c21, 0x7eaaf4cb, 0x6b489d6f, 0xecb9c0c3, 0x29a7af63, 0xaf117a0d, 0x969ea6cd, 0x7658a34d, 0x5fc0bba9, 0x26e99b7f, 0x7a6f260f, 0xe37c34f1, 0x1a1569bb, 0xc3bc7371, 0x8567543d, 0xad0c46a9, 0xa1264fd9, 0x16f10b29, 0x5e00dd3b, 0xf85b6bcd, 0xa2d32d8b, 0x4a3c8d43, 0x6b33b959, 0x4fd1e6c9, 0x7938b8a9, 0x1ec795c7, 0xe2ef3409, 0x83c16b9d, 0x0d3fd9eb, 0xeb461ad7, 0xb09c831d, 0xaf052001, 0x7911164d, 0x1a9dc191, 0xb52a0815, 0x0f732157, 0xc68c4831, 0x12cf3cbb }; #if NCORE>1 extern int core_id; #endif long mreached=0; int done=0, errors=0, Nrun=1; int c_init_done=0; char *c_stack_start = (char *) 0; double nstates=0, nlinks=0, truncs=0, truncs2=0; double nlost=0, nShadow=0, hcmp=0, ngrabs=0; #ifdef BFS_PAR extern ulong bfs_punt; #endif #ifdef PUTPID char *progname; #endif #if defined(ZAPH) && defined(BITSTATE) double zstates = 0; #endif /* int c_init_run; */ #ifdef REVERSE #define P_REVERSE #endif #ifdef T_REVERSE int t_reverse = 1; #else int t_reverse = 0; #endif #ifdef BFS double midrv=0, failedrv=0, revrv=0; #endif ulong nr_states=0; /* nodes in DFA */ long Fa=0, Fh=0, Zh=0, Zn=0; long PUT=0, PROBE=0, ZAPS=0; long Ccheck=0, Cholds=0; int a_cycles=0, upto=1, strict=0, verbose = 0, signoff = 0; #ifdef HAS_CODE int gui = 0, coltrace = 0, readtrail = 0; int whichtrail = 0, whichclaim = -1, onlyproc = -1, silent = 0; char *claimname; #endif int state_tables=0, fairness=0, no_rck=0, Nr_Trails=0, dodot=0; char simvals[256]; #ifndef INLINE int TstOnly=0; #endif ulong mask, nmask; #ifdef BITSTATE int ssize=27; /* 16 Mb */ #else int ssize=24; /* 16M slots */ #endif int hmax=0, svmax=0, smax=0; int Maxbody=0, XX; uchar *noptr, *noqptr; /* used by Pptr(x) and Qptr(x) */ #ifdef VAR_RANGES void logval(char *, int); void dumpranges(void); #endif #ifdef MA #define INLINE_REV extern void dfa_init(unsigned short); extern int dfa_member(ulong); extern int dfa_store(uchar *); unsigned int maxgs = 0; #endif #ifdef ALIGNED State comp_now __attribute__ ((aligned (8))); /* gcc 64-bit aligned for Itanium2 systems */ /* MAJOR runtime penalty if not used on those systems */ #else State comp_now; /* compressed state vector */ #endif #ifndef HC #ifdef BFS_PAR State tmp_msk; #endif State comp_msk; uchar *Mask = (uchar *) &comp_msk; #endif #ifdef COLLAPSE State comp_tmp; static char *scratch = (char *) &comp_tmp; #endif _Stack *stack; /* for queues, processes */ Svtack *svtack; /* for old state vectors */ #ifdef BITSTATE static unsigned int hfns = 3; /* new default */ #endif static ulong j1_spin, j2_spin; /* 5.2.1: avoid nameclash with math.h */ static ulong j3_spin, j4_spin; ulong K1, K2; #ifdef BITSTATE long udmem; #endif #ifndef BFS_PAR static long A_depth = 0; #endif long depth = 0; long depthfound = -1; /* loop detection */ #if NCORE>1 long nr_handoffs = 0; #endif uchar warned = 0, iterative = 0, exclusive = 0, like_java = 0, every_error = 0; uchar noasserts = 0, noends = 0, bounded = 0; uint s_rand = 12345; /* default seed */ #if SYNC>0 && ASYNC==0 void set_recvs(void); int no_recvs(int); #endif #if SYNC #define IfNotBlocked if (boq != -1) continue; #define UnBlock boq = -1 #else #define IfNotBlocked /* cannot block */ #define UnBlock /* don't bother */ #endif #ifdef BITSTATE int (*b_store)(char *, int); int bstore_reg(char *, int); int bstore_mod(char *, int); #endif void dfs_uerror(char *); void dfs_Uerror(char *); #ifdef BFS_PAR void bfs_uerror(char *); void bfs_Uerror(char *); #endif void (*uerror)(char *); void (*Uerror)(char *); void (*hasher)(uchar *, int); void (*o_hash)(uchar *, int, int); void d_hash(uchar *, int); void m_hash(uchar *, int); void d_sfh(uchar *, int); void o_hash32(uchar *, int, int); void o_hash64(uchar *, int, int); void active_procs(void); void cleanup(void); void do_the_search(void); void find_shorter(int); void iniglobals(int); void stopped(int); void wrapup(void); int *grab_ints(int); void ungrab_ints(int *, int); #ifdef COLLAPSE #if (NCORE>1 && !defined(SEP_STATE)) || defined(BFS_PAR) volatile ulong *ncomps; /* in shared memory */ #else ulong ncomps[256+2]; #endif #endif Trans ***trans; /* 1 ptr per state per proctype */ #if VECTORSZ>32000 int P_o[MAXPROC], P_o_tmp[MAXPROC+1]; int Q_o[MAXQ], Q_o_tmp[MAXPROC+1]; int *proc_offset = (int *) P_o; int *q_offset = (int *) Q_o; #else short P_o[MAXPROC], P_o_tmp[MAXPROC+1]; short Q_o[MAXQ], Q_o_tmp[MAXPROC+1]; short *proc_offset = (short *) P_o; short *q_offset = (short *) Q_o; #endif uchar P_s[MAXPROC+1], P_s_tmp[MAXPROC+1]; uchar Q_s[MAXQ+1], Q_s_tmp[MAXQ+1]; uchar *proc_skip = (uchar *) P_s; uchar *q_skip = (uchar *) Q_s; #ifdef TRIX TRIX_v6 *freebodies; TRIX_v6 *processes[MAXPROC+1]; TRIX_v6 *channels[MAXQ+1]; long _p_count[MAXPROC]; long _c_count[MAXPROC]; #endif ulong vsize; /* vector size in bytes */ #ifdef SVDUMP int vprefix=0, svfd; /* runtime option -pN */ #endif char *tprefix = "trail"; /* runtime option -tsuffix */ short boq = -1; /* blocked_on_queue status */ int _; /* predefined write-only variable */ #ifdef PEG long peg[NTRANS]; #endif #ifndef NOBOUNDCHECK #define Index(x, y) Boundcheck(x, y, II, tt, t) #else #define Index(x, y) x #endif short src_ln2 [] = { 0, 3, 3, 4, 4, 5, 5, 6, 6, 2, 8, 2, 10, 10, 9, 12, 9, 14, 14, 13, 16, 13, 18, 18, 17, 20, 17, 20, 0, }; S_F_MAP src_file2 [] = { { "-", 0, 0 }, { "_spin_nvr.tmp", 1, 27 }, { "-", 28, 29 } }; short *src_claim; uchar reached2 [] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, }; uchar *loopstate2; short src_ln1 [] = { 0, 33, 34, 35, 36, 32, 38, 32, 38, 0, }; S_F_MAP src_file1 [] = { { "-", 0, 0 }, { "alarma.pml", 1, 8 }, { "-", 9, 10 } }; uchar reached1 [] = { 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, }; uchar *loopstate1; short src_ln0 [] = { 0, 10, 12, 14, 14, 14, 13, 16, 12, 17, 19, 19, 19, 20, 20, 20, 18, 22, 17, 23, 25, 25, 25, 24, 27, 23, 11, 29, 11, 29, 0, }; S_F_MAP src_file0 [] = { { "-", 0, 0 }, { "alarma.pml", 1, 29 }, { "-", 30, 31 } }; uchar reached0 [] = { 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, }; uchar *loopstate0; uchar reached3[3]; /* np_ */ uchar *loopstate3; /* np_ */ struct { int tp; short *src; } src_all[] = { { 2, &src_ln2[0] }, { 1, &src_ln1[0] }, { 0, &src_ln0[0] }, { 0, (short *) 0 } }; S_F_MAP *flref[] = { src_file2, src_file1, src_file0 }; struct { char *c; char *t; } code_lookup[] = { { (char *) 0, "" } }; short Air[] = { (short) Air0, (short) Air1, (short) Air2, (short) Air3 }; char *procname[] = { "lampara_fsm", "entorno", "spec", ":np_:", 0 }; enum btypes { NONE=0, N_CLAIM=1, I_PROC=2, A_PROC=3, P_PROC=4, E_TRACE=5, N_TRACE=6 }; int Btypes[] = { 3, /* lampara_fsm */ 3, /* entorno */ 1, /* spec */ 0 /* :np_: */ }; uchar spin_c_typ[NCLAIMS]; /* claim-types */ uchar *accpstate[4]; uchar *progstate[4]; uchar *loopstate[4]; uchar *reached[4]; uchar *stopstate[4]; uchar *visstate[4]; short *mapstate[4]; #ifdef HAS_CODE int NrStates[4]; #endif #ifdef TRIX int what_p_size(int); int what_q_size(int); void re_mark_all(int whichway) { int j; #ifdef V_TRIX printf("%d: re_mark_all channels %d\n", depth, whichway); #endif #ifndef BFS for (j = 0; j < now._nr_qs; j++) channels[j]->modified = 1; /* channel index moved */ #endif #ifndef TRIX_ORIG if (whichway > 0) { for (j = now._nr_pr + now._nr_qs - 1; j >= now._nr_pr; j--) now._ids_[j] = now._ids_[j-1]; } else { for (j = now._nr_pr; j < now._nr_pr + now._nr_qs; j++) now._ids_[j] = now._ids_[j+1]; } #endif } #endif #ifdef BFS_PAR inline void bfs_prepmask(int caller) { #if !defined(NOCOMP) && !defined(HC) memcpy((char *) &tmp_msk, (const char *) Mask, sizeof(State)); Mask = (uchar *) &tmp_msk; #endif switch (caller) { case 1: /* addproc */ #if VECTORSZ>32000 memcpy((char *) P_o_tmp, (const char *) proc_offset, MAXPROC*sizeof(int)); #else memcpy((char *) P_o_tmp, (const char *) proc_offset, MAXPROC*sizeof(short)); #endif memcpy((char *) P_s_tmp, (const char *) proc_skip, MAXPROC*sizeof(uchar)); proc_offset = P_o_tmp; proc_skip = (uchar *) &P_s_tmp[0]; break; case 2: /* addqueue */ #if VECTORSZ>32000 memcpy((char *) Q_o_tmp, (const char *) q_offset, MAXQ*sizeof(int)); #else memcpy((char *) Q_o_tmp, (const char *) q_offset, MAXQ*sizeof(short)); #endif memcpy((char *) Q_s_tmp, (const char *) q_skip, MAXQ*sizeof(uchar)); q_offset = Q_o_tmp; q_skip = (uchar *) &Q_s_tmp[0]; break; case 3: /* no nothing */ break; default: /* cannot happen */ Uerror("no good"); break; } } typedef struct BFS_saves BFS_saves; struct BFS_saves { char *m; BFS_saves *nxt; } *bfs_save_po, *bfs_save_ps, #if !defined(NOCOMP) && !defined(HC) *bfs_save_mask, #endif *bfs_save_qo, *bfs_save_qs; extern volatile uchar *sh_malloc(ulong); static int bfs_runs; /* 0 before local heaps are initialized */ void bfs_swoosh(BFS_saves **where, char **what, int howmuch) { BFS_saves *m; for (m = *where; m; m = m->nxt) { if (memcmp(m->m, *what, howmuch) == 0) { *what = m->m; return; } } m = (BFS_saves *) emalloc(sizeof(BFS_saves)); if (bfs_runs) { m->m = (char *) sh_malloc(howmuch); } else { m->m = (char *) sh_pre_malloc(howmuch); } memcpy(m->m, *what, howmuch); m->nxt = *where; *where = m; *what = m->m; } void bfs_fixmask(int caller) { #if !defined(NOCOMP) && !defined(HC) bfs_swoosh(&bfs_save_mask, (char **) &Mask, sizeof(State)); #endif #ifndef TRIX switch (caller) { case 1: /* addproc */ #if VECTORSZ>32000 bfs_swoosh(&bfs_save_po, (char **) &proc_offset, MAXPROC*sizeof(int)); #else bfs_swoosh(&bfs_save_po, (char **) &proc_offset, MAXPROC*sizeof(short)); #endif bfs_swoosh(&bfs_save_ps, (char **) &proc_skip, MAXPROC*sizeof(uchar)); break; case 2: /* addqueue */ #if VECTORSZ>32000 bfs_swoosh(&bfs_save_qo, (char **) &q_offset, MAXQ*sizeof(int)); #else bfs_swoosh(&bfs_save_qo, (char **) &q_offset, MAXQ*sizeof(short)); #endif bfs_swoosh(&bfs_save_qs, (char **) &q_skip, MAXQ*sizeof(uchar)); break; case 3: /* do nothing */ break; default: Uerror("double plus ungood"); break; } #endif } #endif int addproc(int calling_pid, int priority, int n) { int j, h = now._nr_pr; #ifndef NOCOMP int k; #endif uchar *o_this = this; #ifndef INLINE if (TstOnly) return (h < MAXPROC); #endif #ifndef NOBOUNDCHECK /* redefine Index only within this procedure */ #undef Index #define Index(x, y) Boundcheck(x, y, 0, 0, 0) #endif if (h >= MAXPROC) Uerror("too many processes"); #ifdef V_TRIX printf("%4d: add process %d\n", depth, h); #endif switch (n) { case 0: j = sizeof(P0); break; case 1: j = sizeof(P1); break; case 2: j = sizeof(P2); break; case 3: j = sizeof(P3); break; default: Uerror("bad proc - addproc"); } #ifdef BFS_PAR bfs_prepmask(1); /* addproc */ #endif #ifdef TRIX vsize += sizeof(H_el *); #else if (vsize%WS) proc_skip[h] = WS-(vsize%WS); else proc_skip[h] = 0; #if !defined(NOCOMP) && !defined(HC) for (k = vsize + (int) proc_skip[h]; k > vsize; k--) Mask[k-1] = 1; /* align */ #endif vsize += (int) proc_skip[h]; proc_offset[h] = vsize; vsize += j; #if defined(SVDUMP) && defined(VERBOSE) if (vprefix > 0) { int dummy = 0; write(svfd, (uchar *) &dummy, sizeof(int)); /* mark */ write(svfd, (uchar *) &h, sizeof(int)); write(svfd, (uchar *) &n, sizeof(int)); #if VECTORSZ>32000 write(svfd, (uchar *) &proc_offset[h], sizeof(int)); write(svfd, (uchar *) &now, vprefix-4*sizeof(int)); /* padd */ #else write(svfd, (uchar *) &proc_offset[h], sizeof(short)); write(svfd, (uchar *) &now, vprefix-3*sizeof(int)-sizeof(short)); /* padd */ #endif } #endif #endif now._nr_pr += 1; #if defined(BCS) && defined(CONSERVATIVE) if (now._nr_pr >= CONSERVATIVE*8) { printf("pan: error: too many processes -- recompile with "); printf("-DCONSERVATIVE=%d\n", CONSERVATIVE+1); pan_exit(1); } #endif if (fairness && ((int) now._nr_pr + 1 >= (8*NFAIR)/2)) { printf("pan: error: too many processes -- current"); printf(" max is %d procs (-DNFAIR=%d)\n", (8*NFAIR)/2 - 2, NFAIR); printf("\trecompile with -DNFAIR=%d\n", NFAIR+1); pan_exit(1); } #ifndef NOVSZ now._vsz = vsize; #endif hmax = max(hmax, vsize); #ifdef TRIX #ifndef BFS if (freebodies) { processes[h] = freebodies; freebodies = freebodies->nxt; } else { processes[h] = (TRIX_v6 *) emalloc(sizeof(TRIX_v6)); processes[h]->body = (uchar *) emalloc(Maxbody * sizeof(char)); } processes[h]->modified = 1; /* addproc */ #endif processes[h]->psize = j; processes[h]->parent_pid = calling_pid; processes[h]->nxt = (TRIX_v6 *) 0; #else #if !defined(NOCOMP) && !defined(HC) for (k = 1; k <= Air[n]; k++) Mask[vsize - k] = 1; /* pad */ Mask[vsize-j] = 1; /* _pid */ #endif #ifdef BFS_PAR bfs_fixmask(1); /* addproc */ #endif if (vsize >= VECTORSZ) { printf("pan: error, VECTORSZ too small, recompile pan.c"); printf(" with -DVECTORSZ=N with N>%d\n", (int) vsize); Uerror("aborting"); } #endif memset((char *)pptr(h), 0, j); this = pptr(h); if (BASE > 0 && h > 0) { ((P0 *)this)->_pid = h-BASE; } else { ((P0 *)this)->_pid = h; } switch (n) { case 3: /* np_ */ ((P3 *)pptr(h))->_t = 3; ((P3 *)pptr(h))->_p = 0; #ifdef HAS_PRIORITY ((P3 *)pptr(h))->_priority = priority; #endif reached3[0] = 1; accpstate[3][1] = 1; break; case 2: /* spec */ ((P2 *)pptr(h))->_t = 2; ((P2 *)pptr(h))->_p = 9; #ifdef HAS_PRIORITY ((P2 *)pptr(h))->_priority = priority; /* was: 1 */ #endif reached2[9]=1; src_claim = src_ln2; /* params: */ /* locals: */ #ifdef VAR_RANGES #endif #ifdef HAS_CODE locinit2(h); #endif break; case 1: /* entorno */ ((P1 *)pptr(h))->_t = 1; ((P1 *)pptr(h))->_p = 5; #ifdef HAS_PRIORITY ((P1 *)pptr(h))->_priority = priority; /* was: 1 */ #endif reached1[5]=1; /* params: */ /* locals: */ #ifdef VAR_RANGES #endif #ifdef HAS_CODE locinit1(h); #endif break; case 0: /* lampara_fsm */ ((P0 *)pptr(h))->_t = 0; ((P0 *)pptr(h))->_p = 1; #ifdef HAS_PRIORITY ((P0 *)pptr(h))->_priority = priority; /* was: 1 */ #endif reached0[1]=1; /* params: */ /* locals: */ #ifdef VAR_RANGES #endif #ifdef HAS_CODE locinit0(h); #endif break; } this = o_this; #ifdef TRIX re_mark_all(1); /* addproc */ #endif return h-BASE; #ifndef NOBOUNDCHECK #undef Index #define Index(x, y) Boundcheck(x, y, II, tt, t) #endif } #if defined(BITSTATE) && defined(COLLAPSE) /* just to allow compilation, to generate the error */ long col_p(int i, char *z) { return 0; } long col_q(int i, char *z) { return 0; } #endif #ifndef BITSTATE #ifdef COLLAPSE long col_p(int i, char *z) { int j, k; ulong ordinal(char *, long, short); char *x, *y; P0 *ptr = (P0 *) pptr(i); switch (ptr->_t) { case 0: j = sizeof(P0); break; case 1: j = sizeof(P1); break; case 2: j = sizeof(P2); break; case 3: j = sizeof(P3); break; default: Uerror("bad proctype - collapse"); } if (z) x = z; else x = scratch; y = (char *) ptr; k = proc_offset[i]; #if !defined(NOCOMP) && !defined(HC) for ( ; j > 0; j--, y++) if (!Mask[k++]) *x++ = *y; #else memcpy(x, y, j); x += j; #endif for (j = 0; j < WS-1; j++) *x++ = 0; x -= j; if (z) return (long) (x - z); return ordinal(scratch, x-scratch, (short) (2+ptr->_t)); } #endif #endif void run(void) { /* int i; */ memset((char *)&now, 0, sizeof(State)); vsize = (ulong) (sizeof(State) - VECTORSZ); #ifndef NOVSZ now._vsz = vsize; #endif #ifdef TRIX if (VECTORSZ != sizeof(now._ids_)) { printf("VECTORSZ is %d, but should be %d in this mode\n", VECTORSZ, (int) sizeof(now._ids_)); Uerror("VECTORSZ set incorrectly, recompile Spin (not pan.c)"); } #endif /* optional provisioning statements, e.g. to */ /* set hidden variables, used as constants */ #ifdef PROV #include PROV #endif settable(); Maxbody = max(Maxbody, ((int) sizeof(P0))); Maxbody = max(Maxbody, ((int) sizeof(P1))); Maxbody = max(Maxbody, ((int) sizeof(P2))); Maxbody = max(Maxbody, ((int) sizeof(P3))); reached[0] = reached0; reached[1] = reached1; reached[2] = reached2; reached[3] = reached3; accpstate[0] = (uchar *) emalloc(_nstates0); accpstate[1] = (uchar *) emalloc(_nstates1); accpstate[2] = (uchar *) emalloc(_nstates2); accpstate[3] = (uchar *) emalloc(_nstates3); progstate[0] = (uchar *) emalloc(_nstates0); progstate[1] = (uchar *) emalloc(_nstates1); progstate[2] = (uchar *) emalloc(_nstates2); progstate[3] = (uchar *) emalloc(_nstates3); loopstate0 = loopstate[0] = (uchar *) emalloc(_nstates0); loopstate1 = loopstate[1] = (uchar *) emalloc(_nstates1); loopstate2 = loopstate[2] = (uchar *) emalloc(_nstates2); loopstate3 = loopstate[3] = (uchar *) emalloc(_nstates3); stopstate[0] = (uchar *) emalloc(_nstates0); stopstate[1] = (uchar *) emalloc(_nstates1); stopstate[2] = (uchar *) emalloc(_nstates2); stopstate[3] = (uchar *) emalloc(_nstates3); visstate[0] = (uchar *) emalloc(_nstates0); visstate[1] = (uchar *) emalloc(_nstates1); visstate[2] = (uchar *) emalloc(_nstates2); visstate[3] = (uchar *) emalloc(_nstates3); mapstate[0] = (short *) emalloc(_nstates0 * sizeof(short)); mapstate[1] = (short *) emalloc(_nstates1 * sizeof(short)); mapstate[2] = (short *) emalloc(_nstates2 * sizeof(short)); mapstate[3] = (short *) emalloc(_nstates3 * sizeof(short)); stopstate[0][_endstate0] = 1; stopstate[1][_endstate1] = 1; stopstate[2][_endstate2] = 1; stopstate[3][_endstate3] = 1; #ifdef HAS_CODE NrStates[0] = _nstates0; NrStates[1] = _nstates1; NrStates[2] = _nstates2; NrStates[3] = _nstates3; #endif Maxbody = max(Maxbody, sizeof(State)-VECTORSZ); if ((Maxbody % WS) != 0) Maxbody += WS - (Maxbody % WS); accpstate[2][24] = 1; accpstate[2][19] = 1; accpstate[2][14] = 1; retrans(0, _nstates0, _start0, src_ln0, reached0, loopstate0); retrans(1, _nstates1, _start1, src_ln1, reached1, loopstate1); retrans(2, _nstates2, _start2, src_ln2, reached2, loopstate2); if (state_tables) { if (dodot) exit(0); printf("\nTransition Type: "); printf("A=atomic; D=d_step; L=local; G=global\n"); printf("Source-State Labels: "); printf("p=progress; e=end; a=accept;\n"); #ifdef MERGED printf("Note: statement merging was used. Only the first\n"); printf(" stmnt executed in each merge sequence is shown\n"); printf(" (use spin -a -o3 to disable statement merging)\n"); #endif pan_exit(0); } #if defined(BFS) && defined(TRIX) { int i; for (i = 0; i < MAXPROC+1; i++) { processes[i] = (TRIX_v6 *) emalloc(sizeof(TRIX_v6)); processes[i]->body = (uchar *) emalloc(Maxbody * sizeof(char)); } for (i = 0; i < MAXQ+1; i++) { channels[i] = (TRIX_v6 *) emalloc(sizeof(TRIX_v6)); channels[i]->body = (uchar *) emalloc(Maxbody * sizeof(char)); } } #endif #ifdef BFS_PAR bfs_setup_mem(); #ifdef COLLAPSE /* this must be the very first allocation from the shared heap */ #ifdef BFS_SEP_HASH ncomps = (ulong *) emalloc((ulong)((256+2) * sizeof(ulong))); #else ncomps = (ulong *) sh_pre_malloc((ulong)((256+2) * sizeof(ulong))); #endif #endif #endif iniglobals(258); /* arg outside range of pids */ #if defined(VERI) && !defined(NOREDUCE) && !defined(NP) && !defined(BFS) && !defined(HAS_LTL) if (!state_tables #ifdef HAS_CODE && !readtrail #endif #if NCORE>1 && core_id == 0 #endif ) { printf("warning: for p.o. reduction to be valid "); printf("the never claim must be stutter-invariant\n"); printf("(never claims generated from LTL "); printf("formulae are stutter-invariant)\n"); } #endif UnBlock; /* disable rendez-vous */ #ifdef BITSTATE sinit(); #else hinit(); #endif #if defined(FULLSTACK) && defined(BITSTATE) onstack_init(); #endif #if defined(CNTRSTACK) && !defined(BFS) LL = (uchar *) emalloc(ONE_L<<(ssize-3)); #endif stack = (_Stack *) emalloc(sizeof(_Stack)); svtack = (Svtack *) emalloc(sizeof(Svtack)); /* a place to point for Pptr of non-running procs: */ noqptr = noptr = (uchar *) emalloc(Maxbody * sizeof(char)); #if defined(SVDUMP) && defined(VERBOSE) if (vprefix > 0) (void) write(svfd, (uchar *) &vprefix, sizeof(int)); #endif #ifdef VERI Addproc(VERI,1); /* pid = 0, priority 1 */ #if NCLAIMS>1 if (claimname != NULL) { whichclaim = find_claim(claimname); select_claim(whichclaim); } #endif #endif active_procs(); /* started after never */ #ifdef EVENT_TRACE now._event = start_event; reached[EVENT_TRACE][start_event] = 1; #endif #ifdef HAS_CODE globinit(); #endif #ifdef BITSTATE go_again: #endif do_the_search(); #ifdef BITSTATE if (--Nrun > 0 && HASH_CONST[++HASH_NR]) { printf("Run %d:\n", HASH_NR); wrap_stats(); printf("\n"); if (udmem) /* Dillinger 3/2/09 */ { memset(SS, 0, udmem); } else { memset(SS, 0, ONE_L<<(ssize-3)); } #ifdef CNTRSTACK memset(LL, 0, ONE_L<<(ssize-3)); #endif #ifdef FULLSTACK memset((uchar *) S_Tab, 0, maxdepth*sizeof(H_el *)); #endif nstates=nlinks=truncs=truncs2=ngrabs = 0; nlost=nShadow=hcmp = 0; Fa=Fh=Zh=Zn = 0; PUT=PROBE=ZAPS=Ccheck=Cholds = 0; goto go_again; } #endif } #ifdef HAS_PRIORITY extern int highest_priority(int, short, Trans *); extern int get_priority(int); extern int set_priority(int, int); #endif #ifdef SPIN_HEAP void * spin_malloc(int n) /* reserved for use by Modex generated models */ { char *spin_heap_ptr = &(now.spin_heap[now.spin_heap_n]); if (now.spin_heap_n + n >= sizeof(now.spin_heap)) { Uerror("spin_heap limit reached"); } now.spin_heap_n += n; return spin_heap_ptr; } void spin_free(void *unused) { unused; /* ignore */ } #endif int spin_join(int p, void **unused) { /* fprintf(stderr, "join %d when %d\n ", p, now._nr_pr); */ return (now._nr_pr <= p); /* process *p has stopped */ } int spin_mutex_free(int *m) { return (*m == 0); } int spin_mutex_lock(int *m) { *m = 1; return 1; } void spin_mutex_destroy(int *m) { *m = 0; } void spin_mutex_unlock(int *m) { *m = 0; } void spin_mutex_init(int *m, void *val) { if (!val) { *m = 0; } else { Uerror("pthread_mutex_init: unsupported non-default init"); } } int spin_cond_wait(int *cond, int *lck) { /* this version does not scale very far alas */ if (((P0 *)this)->_pid + 1 >= WS*8) { Uerror("pid exceeds range supported by pthread_cond_wait"); } if (((*cond)&1) == 0) { spin_mutex_unlock(lck); *cond |= (1<<(((P0 *)this)->_pid + 1)); return 0; } else { /* if other processes are already waiting */ /* while our wait flag is 0, then they should go first */ if (((*cond)&(~(1 | (1<<(((P0 *)this)->_pid + 1))))) != 0) { spin_mutex_unlock(lck); return 0; } *cond &= ~1; *cond &= ~(1<<(((P0 *)this)->_pid + 1)); return 1; } } void spin_cond_signal(int *cond) { if ( ((*cond)&(~1)) != 0 ) { *cond |= 1; } } #ifdef HAS_PROVIDED int provided(int, uchar, int, Trans *); #endif #ifdef BFS_PAR extern void bfs_shutdown(const char *); #endif #if NCORE>1 #define GLOBAL_LOCK (0) #ifndef CS_N #define CS_N (256*NCORE) #endif #ifdef NGQ #define NR_QS (NCORE) #define CS_NR (CS_N+1) /* 2^N + 1, nr critical sections */ #define GQ_RD GLOBAL_LOCK #define GQ_WR GLOBAL_LOCK #define CS_ID (1 + (int) (j1_spin & (CS_N-1))) /* mask: 2^N - 1, zero reserved */ #define QLOCK(n) (1+n) #else #define NR_QS (NCORE+1) #define CS_NR (CS_N+3) #define GQ_RD (1) #define GQ_WR (2) #define CS_ID (3 + (int) (j1_spin & (CS_N-1))) #define QLOCK(n) (3+n) #endif #ifndef SEP_STATE #define enter_critical(w) e_critical(w) #define leave_critical(w) x_critical(w) #else #ifdef NGQ #define enter_critical(w) { if (w < 1+NCORE) e_critical(w); } #define leave_critical(w) { if (w < 1+NCORE) x_critical(w); } #else #define enter_critical(w) { if (w < 3+NCORE) e_critical(w); } #define leave_critical(w) { if (w < 3+NCORE) x_critical(w); } #endif #endif int cpu_printf(const char *fmt, ...) { va_list args; enter_critical(GLOBAL_LOCK); /* printing */ printf("cpu%d: ", core_id); fflush(stdout); va_start(args, fmt); vprintf(fmt, args); va_end(args); fflush(stdout); leave_critical(GLOBAL_LOCK); return 1; } #else #define enter_critical(w) /* none */ #define leave_critical(w) /* none */ int cpu_printf(const char *fmt, ...) { va_list args; va_start(args, fmt); vprintf(fmt, args); va_end(args); return 1; } #endif int Printf(const char *fmt, ...) { /* Make sure the args to Printf * are always evaluated (e.g., they * could contain a run stmnt) * but do not generate the output * during verification runs * unless explicitly wanted * If this fails on your system * compile SPIN itself -DPRINTF * and this code is not generated */ #ifdef HAS_CODE if (readtrail) { va_list args; va_start(args, fmt); vprintf(fmt, args); va_end(args); return 1; } #endif #ifdef PRINTF va_list args; va_start(args, fmt); vprintf(fmt, args); va_end(args); #endif return 1; } extern void printm(int); #ifndef SC #define getframe(i) &trail[i]; #else static long HHH, DDD, hiwater; static long CNT1, CNT2; static int stackwrite; static int stackread; static Trail frameptr; Trail * getframe(long d) { if (CNT1 == CNT2) return &trail[d]; if (d >= (CNT1-CNT2)*DDD) return &trail[d - (CNT1-CNT2)*DDD]; if (!stackread && (stackread = open(stackfile, 0)) < 0) { printf("getframe: cannot open %s\n", stackfile); wrapup(); } if (lseek(stackread, d* (off_t) sizeof(Trail), SEEK_SET) == -1 || read(stackread, &frameptr, sizeof(Trail)) != sizeof(Trail)) { printf("getframe: frame read error\n"); wrapup(); } return &frameptr; } #endif #if NCORE>1 extern void cleanup_shm(int); volatile uint *search_terminated; /* to signal early termination */ #endif void pan_exit(int val) { void stop_timer(int); #ifdef BFS_PAR extern void bfs_mark_done(int); extern void bfs_drop_shared_memory(void); #endif if (signoff) { printf("--end of output--\n"); } #if NCORE>1 if (search_terminated != NULL) { *search_terminated |= 1; /* pan_exit */ } #ifdef USE_DISK { void dsk_stats(void); dsk_stats(); } #endif if (!state_tables && !readtrail) { cleanup_shm(1); } #endif #ifdef BFS_PAR if (who_am_i != 0) { bfs_mark_done(3); /* stopped */ } bfs_drop_shared_memory(); #endif if (val == 2) { val = 0; } #ifdef BFS_PAR if (who_am_i == 0) #endif stop_timer(1); #ifdef C_EXIT C_EXIT; /* trust that it defines a fct */ #endif exit(val); } #ifdef HAS_CODE static char tbuf[2][2048]; char * transmognify(char *s) { char *v, *w; int i, toggle = 0; if (!s || strlen(s) > 2047) return s; memset(tbuf[0], 0, 2048); memset(tbuf[1], 0, 2048); strcpy(tbuf[toggle], s); while ((v = strstr(tbuf[toggle], "{c_code"))) { *v = '\0'; v++; strcpy(tbuf[1-toggle], tbuf[toggle]); for (w = v; *w != '}' && *w != '\0'; w++) /* skip */; if (*w != '}') return s; *w = '\0'; w++; for (i = 0; code_lookup[i].c; i++) if (strcmp(v, code_lookup[i].c) == 0 && strlen(v) == strlen(code_lookup[i].c)) { if (strlen(tbuf[1-toggle]) + strlen(code_lookup[i].t) + strlen(w) > 2047) return s; strcat(tbuf[1-toggle], code_lookup[i].t); break; } strcat(tbuf[1-toggle], w); toggle = 1 - toggle; } tbuf[toggle][2047] = '\0'; return tbuf[toggle]; } #else char * transmognify(char *s) { return s; } #endif #ifdef HAS_CODE void add_src_txt(int ot, int tt) { Trans *t; char *q; for (t = trans[ot][tt]; t; t = t->nxt) { printf("\t\t"); q = transmognify(t->tp); for ( ; q && *q; q++) if (*q == '\n') printf("\\n"); else putchar(*q); printf("\n"); } } char * find_source(int tp, int s) { if (s >= flref[tp]->from && s <= flref[tp]->upto) { return flref[tp]->fnm; } return PanSource; /* i.e., don't know */ } void wrap_trail(void) { static int wrap_in_progress = 0; int i; short II; P0 *z; if (wrap_in_progress++) return; printf("spin: trail ends after %ld steps\n", depth); if (onlyproc >= 0) { if (onlyproc >= now._nr_pr) { pan_exit(0); } II = onlyproc; z = (P0 *)pptr(II); printf("%3ld: proc %d (%s) ", depth, II, procname[z->_t]); for (i = 0; src_all[i].src; i++) if (src_all[i].tp == (int) z->_t) { printf(" %s:%d", find_source((int) z->_t, (int) z->_p), src_all[i].src[z->_p]); break; } printf(" (state %2d)", z->_p); if (!stopstate[z->_t][z->_p]) printf(" (invalid end state)"); printf("\n"); add_src_txt(z->_t, z->_p); pan_exit(0); } printf("#processes %d:\n", now._nr_pr); if (depth < 0) depth = 0; for (II = 0; II < now._nr_pr; II++) { z = (P0 *)pptr(II); printf("%3ld: proc %d (%s) ", depth, II, procname[z->_t]); for (i = 0; src_all[i].src; i++) if (src_all[i].tp == (int) z->_t) { printf(" %s:%d", find_source((int) z->_t, (int) z->_p), src_all[i].src[z->_p]); break; } printf(" (state %2d)", z->_p); if (!stopstate[z->_t][z->_p]) printf(" (invalid end state)"); printf("\n"); add_src_txt(z->_t, z->_p); } c_globals(); for (II = 0; II < now._nr_pr; II++) { z = (P0 *)pptr(II); c_locals(II, z->_t); } #ifdef ON_EXIT ON_EXIT; #endif pan_exit(0); } FILE * findtrail(void) { FILE *fd; char fnm[512], *q; char MyFile[512]; char MySuffix[16]; int try_core; int candidate_files; if (trailfilename != NULL) { fd = fopen(trailfilename, "r"); if (fd == NULL) { printf("pan: cannot find %s\n", trailfilename); pan_exit(1); } /* else */ goto success; } talk: try_core = 1; candidate_files = 0; tprefix = "trail"; strcpy(MyFile, TrailFile); do { /* see if there's more than one possible trailfile */ if (whichtrail) { sprintf(fnm, "%s%d.%s", MyFile, whichtrail, tprefix); fd = fopen(fnm, "r"); if (fd != NULL) { candidate_files++; if (verbose==100) printf("trail%d: %s\n", candidate_files, fnm); fclose(fd); } if ((q = strchr(MyFile, '.')) != NULL) { *q = '\0'; sprintf(fnm, "%s%d.%s", MyFile, whichtrail, tprefix); *q = '.'; fd = fopen(fnm, "r"); if (fd != NULL) { candidate_files++; if (verbose==100) printf("trail%d: %s\n", candidate_files, fnm); fclose(fd); } } } else { sprintf(fnm, "%s.%s", MyFile, tprefix); fd = fopen(fnm, "r"); if (fd != NULL) { candidate_files++; if (verbose==100) printf("trail%d: %s\n", candidate_files, fnm); fclose(fd); } if ((q = strchr(MyFile, '.')) != NULL) { *q = '\0'; sprintf(fnm, "%s.%s", MyFile, tprefix); *q = '.'; fd = fopen(fnm, "r"); if (fd != NULL) { candidate_files++; if (verbose==100) printf("trail%d: %s\n", candidate_files, fnm); fclose(fd); } } } tprefix = MySuffix; sprintf(tprefix, "cpu%d_trail", try_core++); } while (try_core <= NCORE); if (candidate_files != 1) { if (verbose != 100) { printf("error: there are %d trail files:\n", candidate_files); verbose = 100; goto talk; } else { printf("pan: rm or mv all except one\n"); exit(1); } } try_core = 1; strcpy(MyFile, TrailFile); /* restore */ tprefix = "trail"; try_again: if (whichtrail) { sprintf(fnm, "%s%d.%s", MyFile, whichtrail, tprefix); fd = fopen(fnm, "r"); if (fd == NULL && (q = strchr(MyFile, '.'))) { *q = '\0'; sprintf(fnm, "%s%d.%s", MyFile, whichtrail, tprefix); *q = '.'; fd = fopen(fnm, "r"); } } else { sprintf(fnm, "%s.%s", MyFile, tprefix); fd = fopen(fnm, "r"); if (fd == NULL && (q = strchr(MyFile, '.'))) { *q = '\0'; sprintf(fnm, "%s.%s", MyFile, tprefix); *q = '.'; fd = fopen(fnm, "r"); } } if (fd == NULL) { if (try_core < NCORE) { tprefix = MySuffix; sprintf(tprefix, "cpu%d_trail", try_core++); goto try_again; } printf("pan: cannot find trailfile %s\n", fnm); pan_exit(1); } success: #if NCORE>1 && defined(SEP_STATE) { void set_root(void); /* for partial traces from local root */ set_root(); } #endif return fd; } uchar do_transit(Trans *, short); #ifdef PERMUTED void set_permuted(int); void set_reversed(int); void set_rotated(int); void set_randrot(int); void (*p_reorder)(int) = set_permuted; short p_rotate; #endif void getrail(void) { FILE *fd; char *q, *pnm; int i, t_id, lastnever = -1; short II; Trans *t; P0 *z; #ifdef PERMUTED char sbuf[128]; memset(sbuf, 0, sizeof(sbuf)); #endif fd = findtrail(); /* exits if unsuccessful */ while (fscanf(fd, "%ld:%d:%d\n", &depth, &i, &t_id) == 3) { if (depth == -1) { printf("<<<<<START OF CYCLE>>>>>\n"); } #ifdef PERMUTED if (depth < 0) { switch (depth) { case -5: if (i && !t_reverse) { strcat(sbuf, "-t_reverse "); } break; case -6: if (i && p_reorder != set_permuted) { strcat(sbuf, "-p_permute "); } else if (t_id && p_reorder != set_reversed) { strcat(sbuf, "-p_reverse "); } break; case -7: if (i && (p_reorder != set_rotated || p_rotate != t_id)) { char tmp[32]; sprintf(tmp, "-p_rotate%d ", t_id); strcat(sbuf, tmp); } break; case -8: if (i && p_reorder != set_randrot) { strcat(sbuf, "-p_randrot "); } if (s_rand != ++t_id) { char tmp[32]; sprintf(tmp, "-RS%u ", (uint) t_id-1); strcat(sbuf, tmp); } break; default: continue; } } #endif if (depth < 0) { continue; } #ifdef PERMUTED if (strlen(sbuf) > 0) { fprintf(efd, "add: %s\n", sbuf); exit(1); } #endif if (i > now._nr_pr) { printf("pan: Error, proc %d invalid pid ", i); printf("transition %d\n", t_id); break; } II = i; z = (P0 *)pptr(II); for (t = trans[z->_t][z->_p]; t; t = t->nxt) if (t->t_id == (T_ID) t_id) break; if (!t) { for (i = 0; i < NrStates[z->_t]; i++) { t = trans[z->_t][i]; if (t && t->t_id == (T_ID) t_id) { printf("\tRecovered at state %d\n", i); z->_p = i; goto recovered; } } printf("pan: Error, proc %d type %d state %d: ", II, z->_t, z->_p); printf("transition %d not found\n", t_id); printf("pan: list of possible transitions in this process:\n"); if (z->_t >= 0 && z->_t <= _NP_) for (t = trans[z->_t][z->_p]; t; t = t->nxt) printf(" t_id %d -- case %d, [%s]\n", t->t_id, t->forw, t->tp); break; /* pan_exit(1); */ } recovered: q = transmognify(t->tp); if (gui) simvals[0] = '\0'; pnm = procname[z->_t]; this = pptr(II); trpt->tau |= 1; if (!do_transit(t, II)) { if (onlyproc >= 0 && II != onlyproc) goto moveon; if (!verbose) break; printf("pan: error, next transition UNEXECUTABLE on replay\n"); printf(" most likely causes: missing c_track statements\n"); printf(" or illegal side-effects in c_expr statements\n"); } if (onlyproc >= 0 && II != onlyproc) goto moveon; if (verbose) { printf("%3ld: proc %2d (%s) ", depth, II, pnm); for (i = 0; src_all[i].src; i++) if (src_all[i].tp == (int) z->_t) { printf(" %s:%d ", find_source((int) z->_t, (int) z->_p), src_all[i].src[z->_p]); break; } printf("(state %d) trans {%d,%d} [%s]\n", z->_p, t_id, t->forw, q?q:""); c_globals(); for (i = 0; i < now._nr_pr; i++) { c_locals(i, ((P0 *)pptr(i))->_t); } } else if (Btypes[z->_t] == N_CLAIM) { if (lastnever != (int) z->_p) { for (i = 0; src_all[i].src; i++) if (src_all[i].tp == (int) z->_t) { printf("MSC: ~G %d\n", src_all[i].src[z->_p]); break; } if (!src_all[i].src) printf("MSC: ~R %d\n", z->_p); } lastnever = z->_p; goto sameas; } else if (Btypes[z->_t] != 0) /* not :np_: */ { sameas: if (no_rck) goto moveon; if (coltrace) { printf("%ld: ", depth); for (i = 0; i < II; i++) printf("\t\t"); printf("%s(%d):", pnm, II); printf("[%s]\n", q?q:""); } else if (!silent) { if (strlen(simvals) > 0) { printf("%3ld: proc %2d (%s)", depth, II, pnm); for (i = 0; src_all[i].src; i++) if (src_all[i].tp == (int) z->_t) { printf(" %s:%d ", find_source((int) z->_t, (int) z->_p), src_all[i].src[z->_p]); break; } printf("(state %d) [values: %s]\n", z->_p, simvals); } printf("%3ld: proc %2d (%s)", depth, II, pnm); for (i = 0; src_all[i].src; i++) if (src_all[i].tp == (int) z->_t) { printf(" %s:%d ", find_source((int) z->_t, (int) z->_p), src_all[i].src[z->_p]); break; } printf("(state %d) [%s]\n", z->_p, q?q:""); /* printf("\n"); */ } } moveon: z->_p = t->st; } wrap_trail(); } #endif int f_pid(int pt) { int i; P0 *z; for (i = 0; i < now._nr_pr; i++) { z = (P0 *)pptr(i); if (z->_t == (unsigned) pt) return BASE+z->_pid; } return -1; } #if NCORE>1 && !defined(GLOB_HEAP) #define SEP_HEAP /* version 5.1.2 */ #endif #ifdef BITSTATE int bstore_mod(char *v, int n) /* hasharray size not a power of two */ { ulong x, y; uint i = 1; #if defined(MURMUR) && (WS==8) m_hash((uchar *) v, n); /* bstore_mod - sets j3_spin, j4_spin, K1, K2 */ #else d_hash((uchar *) v, n); /* bstore_mod - sets j3_spin, j4_spin, K1, K2 */ #endif x = K1; y = j3_spin; for (;;) { if (!(SS[x%udmem]&(1<<y))) break; if (i == hfns) { #ifdef DEBUG printf("Old bitstate\n"); #endif return 1; } x = (x + K2 + i); y = (y + j4_spin) & 7; i++; } #ifdef RANDSTOR if (rand()%100 > RANDSTOR) return 0; #endif for (;;) { SS[x%udmem] |= (1<<y); if (i == hfns) break; x = (x + K2 + i); y = (y + j4_spin) & 7; i++; } #ifdef DEBUG printf("New bitstate\n"); #endif if (now._a_t&1) { nShadow++; } return 0; } int bstore_reg(char *v, int n) /* extended hashing, Peter Dillinger, 2004 */ { ulong x, y; uint i = 1; #if defined(MURMUR) && (WS==8) m_hash((uchar *) v, n); /* bstore_reg - sets j1_spin-j4_spin */ #else d_hash((uchar *) v, n); /* bstore_reg - sets j1_spin-j4_spin */ #endif x = j2_spin; y = j3_spin; for (;;) { if (!(SS[x]&(1<<y))) break; if (i == hfns) { #ifdef DEBUG printf("Old bitstate\n"); #endif return 1; } x = (x + j1_spin + i) & nmask; y = (y + j4_spin) & 7; i++; } #ifdef RANDSTOR if (rand()%100 > RANDSTOR) return 0; #endif for (;;) { SS[x] |= (1<<y); if (i == hfns) break; x = (x + j1_spin + i) & nmask; y = (y + j4_spin) & 7; i++; } #ifdef DEBUG printf("New bitstate\n"); #endif if (now._a_t&1) { nShadow++; } return 0; } #endif ulong TMODE = 0666; /* file permission bits for trail files */ int trcnt=1; char snap[64], fnm[512]; int make_trail(void) { int fd; char *q; char MyFile[512]; int w_flags = O_CREAT|O_WRONLY|O_TRUNC; if (exclusive == 1 && iterative == 0) { w_flags |= O_EXCL; } q = strrchr(TrailFile, '/'); if (q == NULL) q = TrailFile; else q++; strcpy(MyFile, q); /* TrailFile is not a writable string */ if (iterative == 0 && Nr_Trails++ > 0) { #ifdef PUTPID sprintf(fnm, "%s_%s_%d_%d.%s", MyFile, progname, getpid(), Nr_Trails-1, tprefix); #else sprintf(fnm, "%s%d.%s", MyFile, Nr_Trails-1, tprefix); #endif } else { #ifdef PUTPID sprintf(fnm, "%s_%s_%d.%s", MyFile, progname, getpid(), tprefix); #else sprintf(fnm, "%s.%s", MyFile, tprefix); #endif } if ((fd = open(fnm, w_flags, TMODE)) < 0) { if ((q = strchr(MyFile, '.'))) { *q = '\0'; if (iterative == 0 && Nr_Trails-1 > 0) sprintf(fnm, "%s%d.%s", MyFile, Nr_Trails-1, tprefix); else sprintf(fnm, "%s.%s", MyFile, tprefix); *q = '.'; fd = open(fnm, w_flags, TMODE); } } if (fd < 0) { printf("pan: cannot create %s\n", fnm); perror("cause"); } else { #if NCORE>1 && (defined(SEP_STATE) || !defined(FULL_TRAIL)) void write_root(void); write_root(); #else printf("pan: wrote %s\n", fnm); #endif } return fd; } #ifndef FREQ #define FREQ (1000000) #endif double freq = (double) FREQ; #ifdef TRIX void sv_populate(void); void re_populate(void) /* restore procs and chans from now._ids_ */ { int i, cnt = 0; char *b; #ifdef V_TRIX printf("%4d: re_populate\n", depth); #endif for (i = 0; i < now._nr_pr; i++, cnt++) { b = now._ids_[cnt]; processes[i]->psize = what_p_size( ((P0 *)b)->_t ); memcpy(processes[i]->body, b, processes[i]->psize); #ifdef TRIX_RIX ((P0 *)pptr(i))->_pid = i; if (BASE > 0 && h > 0) { ((P0 *)pptr(i))->_pid -= BASE; } #endif #ifndef BFS processes[i]->modified = 1; /* re-populate */ #endif } for (i = 0; i < now._nr_qs; i++, cnt++) { b = now._ids_[cnt]; channels[i]->psize = what_q_size( ((Q0 *)b)->_t ); memcpy(channels[i]->body, b, channels[i]->psize); #ifndef BFS channels[i]->modified = 1; /* re-populate */ #endif } } #endif #ifdef BFS #ifndef BFS_PAR BFS_State *bfs_trail, *bfs_bot, *bfs_free; SV_Hold *svfree; #else static ulong bfs_pre_allocated; #endif #ifdef BFS_DISK #ifndef BFS_LIMIT #define BFS_LIMIT 100000 #endif #ifndef BFS_DSK_LIMIT #define BFS_DSK_LIMIT 1000000 #endif #if defined(WIN32) || defined(WIN64) #define RFLAGS (O_RDONLY|O_BINARY) #define WFLAGS (O_CREAT|O_WRONLY|O_TRUNC|O_BINARY) #define RWFLAGS (O_RDWR|O_BINARY) #else #define RFLAGS (O_RDONLY) #define WFLAGS (O_CREAT|O_WRONLY|O_TRUNC) #define RWFLAGS (O_RDWR) #endif long bfs_size_limit; int bfs_dsk_write = -1; int bfs_dsk_read = -1; long bfs_dsk_writes, bfs_dsk_reads; int bfs_dsk_seqno_w, bfs_dsk_seqno_r; #endif uchar do_reverse(Trans *, short, uchar); void snapshot(void); #if 0 void select_claim(int x) /* ignored in BFS mode */ { if (verbose) { printf("select %d (ignored)\n", x); } } #endif Trail *ntrpt; #ifndef BFS_PAR SV_Hold * getsv(int n) { SV_Hold *h; if (svfree && n <= svfree->sz) { h = svfree; svfree = h->nxt; h->nxt = (SV_Hold *) 0; } else { h = (SV_Hold *) emalloc(sizeof(SV_Hold)); h->sz = n; #ifdef BFS_DISK if (bfs_size_limit >= BFS_LIMIT) { h->sv = (State *) 0; /* means: read disk */ bfs_dsk_writes++; /* count */ if (bfs_dsk_write < 0 /* file descriptor */ || bfs_dsk_writes%BFS_DSK_LIMIT == 0) { char dsk_nm[32]; if (bfs_dsk_write >= 0) { (void) close(bfs_dsk_write); } sprintf(dsk_nm, "pan_bfs_%d.tmp", bfs_dsk_seqno_w++); bfs_dsk_write = open(dsk_nm, WFLAGS, 0644); if (bfs_dsk_write < 0) { Uerror("could not create tmp disk file"); } printf("pan: created disk file %s\n", dsk_nm); } if (write(bfs_dsk_write, (char *) &now, n) != n) { Uerror("aborting -- disk write failed (disk full?)"); } return h; /* no memcpy */ } bfs_size_limit++; #endif h->sv = (State *) emalloc(sizeof(State) - VECTORSZ + n); } memcpy((char *)h->sv, (char *)&now, n); return h; } EV_Hold * getsv_mask(int n) { EV_Hold *h; static EV_Hold *kept = (EV_Hold *) 0; for (h = kept; h; h = h->nxt) if (n == h->sz #if !defined(NOCOMP) && !defined(HC) && (memcmp((char *) Mask, (char *) h->sv, n) == 0) #endif && (now._nr_pr == h->nrpr) && (now._nr_qs == h->nrqs) #ifdef TRIX ) #else #if VECTORSZ>32000 && (memcmp((char *) proc_offset, (char *) h->po, now._nr_pr * sizeof(int)) == 0) && (memcmp((char *) q_offset, (char *) h->qo, now._nr_qs * sizeof(int)) == 0) #else && (memcmp((char *) proc_offset, (char *) h->po, now._nr_pr * sizeof(short)) == 0) && (memcmp((char *) q_offset, (char *) h->qo, now._nr_qs * sizeof(short)) == 0) #endif && (memcmp((char *) proc_skip, (char *) h->ps, now._nr_pr * sizeof(uchar)) == 0) && (memcmp((char *) q_skip, (char *) h->qs, now._nr_qs * sizeof(uchar)) == 0)) #endif break; if (!h) { h = (EV_Hold *) emalloc(sizeof(EV_Hold)); h->sz = n; h->nrpr = now._nr_pr; h->nrqs = now._nr_qs; h->sv = (char *) emalloc(n * sizeof(char)); #if !defined(NOCOMP) && !defined(HC) memcpy((char *) h->sv, (char *) Mask, n); #endif #ifndef TRIX if (now._nr_pr > 0) { h->ps = (char *) emalloc(now._nr_pr * sizeof(int)); memcpy((char *) h->ps, (char *) proc_skip, now._nr_pr * sizeof(uchar)); #if VECTORSZ>32000 h->po = (char *) emalloc(now._nr_pr * sizeof(int)); memcpy((char *) h->po, (char *) proc_offset, now._nr_pr * sizeof(int)); #else h->po = (char *) emalloc(now._nr_pr * sizeof(short)); memcpy((char *) h->po, (char *) proc_offset, now._nr_pr * sizeof(short)); #endif } if (now._nr_qs > 0) { h->qs = (char *) emalloc(now._nr_qs * sizeof(int)); memcpy((char *) h->qs, (char *) q_skip, now._nr_qs * sizeof(uchar)); #if VECTORSZ>32000 h->qo = (char *) emalloc(now._nr_qs * sizeof(int)); memcpy((char *) h->qo, (char *) q_offset, now._nr_qs * sizeof(int)); #else h->qo = (char *) emalloc(now._nr_qs * sizeof(short)); memcpy((char *) h->qo, (char *) q_offset, now._nr_qs * sizeof(short)); #endif } #endif h->nxt = kept; kept = h; } return h; } void freesv(SV_Hold *p) { SV_Hold *h, *oh; oh = (SV_Hold *) 0; for (h = svfree; h; oh = h, h = h->nxt) { if (p->sz >= h->sz) break; } if (!oh) { p->nxt = svfree; svfree = p; } else { p->nxt = h; oh->nxt = p; } } BFS_State * get_bfs_frame(void) { BFS_State *t; if (bfs_free) { t = bfs_free; bfs_free = bfs_free->nxt; t->nxt = (BFS_State *) 0; } else { t = (BFS_State *) emalloc(sizeof(BFS_State)); } t->frame = (Trail *) emalloc(sizeof(Trail)); /* new because we keep a ptr to the frame of parent states */ /* used for reconstructing path and recovering failed rvs etc */ return t; } void push_bfs(Trail *f, int d) { BFS_State *t; t = get_bfs_frame(); memcpy((char *)t->frame, (char *)f, sizeof(Trail)); t->frame->o_tt = d; /* depth */ t->boq = boq; #ifdef TRIX sv_populate(); #endif t->onow = getsv(vsize); t->omask = getsv_mask(vsize); #if defined(FULLSTACK) && defined(Q_PROVISO) t->lstate = Lstate; /* bfs */ #endif if (!bfs_bot) { bfs_bot = bfs_trail = t; } else { bfs_bot->nxt = t; bfs_bot = t; } #ifdef VERBOSE t->nr = nstates; #endif #ifdef CHECK #ifdef VERBOSE printf("PUSH %lu (depth %d, nr %lu)\n", (ulong) t->frame, d, t->nr); #else printf("PUSH %lu (depth %d)\n", (ulong) t->frame, d); #endif #endif } Trail * pop_bfs(void) { BFS_State *t; if (!bfs_trail) { return (Trail *) 0; } t = bfs_trail; bfs_trail = t->nxt; if (!bfs_trail) { bfs_bot = (BFS_State *) 0; } #if defined(Q_PROVISO) && !defined(BITSTATE) && !defined(NOREDUCE) if (t->lstate) /* bfs */ { t->lstate->tagged = 0; /* bfs */ } #endif t->nxt = bfs_free; bfs_free = t; vsize = t->onow->sz; boq = t->boq; #ifdef BFS_DISK if (t->onow->sv == (State *) 0) { char dsk_nm[32]; bfs_dsk_reads++; /* count */ if (bfs_dsk_read >= 0 /* file descriptor */ && bfs_dsk_reads%BFS_DSK_LIMIT == 0) { (void) close(bfs_dsk_read); sprintf(dsk_nm, "pan_bfs_%d.tmp", bfs_dsk_seqno_r-1); (void) unlink(dsk_nm); bfs_dsk_read = -1; } if (bfs_dsk_read < 0) { sprintf(dsk_nm, "pan_bfs_%d.tmp", bfs_dsk_seqno_r++); bfs_dsk_read = open(dsk_nm, RFLAGS); if (bfs_dsk_read < 0) { Uerror("could not open temp disk file"); } } if (read(bfs_dsk_read, (char *) &now, vsize) != vsize) { Uerror("bad bfs disk file read"); } #ifndef NOVSZ if (now._vsz != vsize) { Uerror("disk read vsz mismatch"); } #endif } else #endif { memcpy((uchar *) &now, (uchar *) t->onow->sv, vsize); #ifndef NOVSZ vsize = now._vsz; #endif } #if !defined(NOCOMP) && !defined(HC) memcpy((uchar *) Mask, (uchar *) t->omask->sv, vsize); #endif #ifdef TRIX re_populate(); #else if (now._nr_pr > 0) #if VECTORSZ>32000 { memcpy((char *)proc_offset, (char *)t->omask->po, now._nr_pr * sizeof(int)); #else { memcpy((char *)proc_offset, (char *)t->omask->po, now._nr_pr * sizeof(short)); #endif memcpy((char *)proc_skip, (char *)t->omask->ps, now._nr_pr * sizeof(uchar)); } if (now._nr_qs > 0) #if VECTORSZ>32000 { memcpy((uchar *)q_offset, (uchar *)t->omask->qo, now._nr_qs * sizeof(int)); #else { memcpy((uchar *)q_offset, (uchar *)t->omask->qo, now._nr_qs * sizeof(short)); #endif memcpy((uchar *)q_skip, (uchar *)t->omask->qs, now._nr_qs * sizeof(uchar)); } #endif #ifdef BFS_DISK if (t->onow->sv != (State *) 0) #endif { freesv(t->onow); /* omask not freed */ } #ifdef CHECK #ifdef VERBOSE printf("POP %lu (depth %d, nr %lu)\n", (ulong) t->frame, t->frame->o_tt, t->nr); #else printf("POP %lu (depth %d)\n", (ulong) t->frame, t->frame->o_tt); #endif #endif return t->frame; } void store_state(Trail *ntrpt, int shortcut, short oboq) { #ifdef VERI Trans *t2 = (Trans *) 0; uchar ot; int tt, E_state; uchar o_opm = trpt->o_pm, *othis = this; if (shortcut) { #ifdef VERBOSE printf("claim: shortcut\n"); #endif goto store_it; /* no claim move */ } this = pptr(0); /* 0 = never claim */ trpt->o_pm = 0; tt = (int) ((P0 *)this)->_p; ot = (uchar) ((P0 *)this)->_t; #ifdef HAS_UNLESS E_state = 0; #endif for (t2 = trans[ot][tt]; t2; t2 = t2?t2->nxt:(Trans *)0) { #ifdef HAS_UNLESS if (E_state > 0 && E_state != t2->e_trans) { break; } #endif if (do_transit(t2, 0)) { #ifdef VERBOSE if (!reached[ot][t2->st]) printf("depth: %d -- claim move from %d -> %d\n", trpt->o_tt, ((P0 *)this)->_p, t2->st); #endif #ifdef HAS_UNLESS E_state = t2->e_trans; #endif if (t2->st > 0) { ((P0 *)this)->_p = t2->st; reached[ot][t2->st] = 1; #ifndef NOCLAIM if (stopstate[ot][t2->st]) { uerror("end state in claim reached"); } #endif } if (now._nr_pr == 0) /* claim terminated */ uerror("end state in claim reached"); #ifdef PEG peg[t2->forw]++; #endif trpt->o_pm |= 1; if (t2->atom&2) { Uerror("atomic in claim not supported in BFS"); } store_it: #endif #if defined(BITSTATE) if (!b_store((char *)&now, vsize)) #elif defined(MA) if (!g_store((char *)&now, vsize, 0)) #else if (!h_store((char *)&now, vsize)) #endif { static long sdone = (long) 0; long ndone; nstates++; #ifndef NOREDUCE trpt->tau |= 64; #endif ndone = (ulong) (nstates/(freq)); if (ndone != sdone && mreached%10 != 0) { snapshot(); sdone = ndone; #if defined(AUTO_RESIZE) && !defined(BITSTATE) && !defined(MA) if (nstates > ((double)(1<<(ssize+1)))) { void resize_hashtable(void); resize_hashtable(); } #endif } #if SYNC if (boq != -1) midrv++; else if (oboq != -1) { Trail *x; x = (Trail *) trpt->ostate; /* pre-rv state */ if (x) x->o_pm |= 4; /* mark success */ } #endif push_bfs(ntrpt, trpt->o_tt+1); } else { truncs++; #if defined(Q_PROVISO) && !defined(NOREDUCE) && defined(FULLSTACK) #if !defined(BITSTATE) if (Lstate && Lstate->tagged) { trpt->tau |= 64; } #else if (trpt->tau&32) { BFS_State *tprov; for (tprov = bfs_trail; tprov; tprov = tprov->nxt) if (tprov->onow->sv != (State *) 0 && memcmp((uchar *)&now, (uchar *)tprov->onow->sv, vsize) == 0) { trpt->tau |= 64; break; /* state is in queue */ } } #endif #endif } #ifdef VERI ((P0 *)this)->_p = tt; /* reset claim */ if (t2) do_reverse(t2, 0, 0); else break; } } this = othis; trpt->o_pm = o_opm; #endif } void bfs(void) { Trans *t; Trail *otrpt, *x; uchar _n, _m, ot, nps = 0; int tt, E_state; short II, From = (short) (now._nr_pr-1), To = BASE; short oboq = boq; ntrpt = (Trail *) emalloc(sizeof(Trail)); trpt->ostate = (H_el *) 0; trpt->tau = 0; trpt->o_tt = -1; store_state(ntrpt, 0, oboq); /* initial state */ while ((otrpt = pop_bfs())) /* also restores now */ { memcpy((char *) trpt, (char *) otrpt, sizeof(Trail)); #if defined(C_States) && (HAS_TRACK==1) c_revert((uchar *) &(now.c_state[0])); #endif if (trpt->o_pm & 4) { #ifdef VERBOSE printf("Revisit of atomic not needed (%d)\n", trpt->o_pm); #endif continue; } #ifndef NOREDUCE nps = 0; #endif if (trpt->o_pm == 8) { revrv++; if (trpt->tau&8) { #ifdef VERBOSE printf("Break atomic (pm:%d,tau:%d)\n", trpt->o_pm, trpt->tau); #endif trpt->tau &= ~8; } #ifndef NOREDUCE else if (trpt->tau&32) { #ifdef VERBOSE printf("Void preselection (pm:%d,tau:%d)\n", trpt->o_pm, trpt->tau); #endif trpt->tau &= ~32; nps = 1; /* no preselection in repeat */ } #endif } trpt->o_pm &= ~(4|8); if (trpt->o_tt > mreached) { mreached = trpt->o_tt; if (mreached%10 == 0) { snapshot(); } } depth = trpt->o_tt; if (depth >= maxdepth) { #if SYNC Trail *x; if (boq != -1) { x = (Trail *) trpt->ostate; if (x) x->o_pm |= 4; /* not failing */ } #endif truncs++; if (!warned) { warned = 1; printf("error: max search depth too small\n"); } if (bounded) { uerror("depth limit reached"); } continue; } #ifndef NOREDUCE if (boq == -1 && !(trpt->tau&8) && nps == 0) for (II = now._nr_pr-1; II >= BASE; II -= 1) { Pickup: this = pptr(II); tt = (int) ((P0 *)this)->_p; ot = (uchar) ((P0 *)this)->_t; if (trans[ot][tt]->atom & 8) { t = trans[ot][tt]; if (t->qu[0] != 0) { Ccheck++; if (!q_cond(II, t)) continue; Cholds++; } From = To = II; trpt->tau |= 32; /* preselect marker */ #ifdef DEBUG printf("%3ld: proc %d PreSelected (tau=%d)\n", depth, II, trpt->tau); #endif goto MainLoop; } } trpt->tau &= ~32; #endif Repeat: if (trpt->tau&8) /* atomic */ { From = To = (short ) trpt->pr; nlinks++; } else { From = now._nr_pr-1; To = BASE; } MainLoop: _n = _m = 0; for (II = From; II >= To; II -= 1) { this = pptr(II); tt = (int) ((P0 *)this)->_p; ot = (uchar) ((P0 *)this)->_t; #if SYNC /* no rendezvous with same proc */ if (boq != -1 && trpt->pr == II) { continue; } #endif ntrpt->pr = (uchar) II; ntrpt->st = tt; trpt->o_pm &= ~1; /* no move yet */ #ifdef EVENT_TRACE trpt->o_event = now._event; #endif #ifdef HAS_PRIORITY if (!highest_priority(((P0 *)this)->_pid, II, t)) { continue; } #else #ifdef HAS_PROVIDED if (!provided(II, ot, tt, t)) { continue; } #endif #endif #ifdef HAS_UNLESS E_state = 0; #endif for (t = trans[ot][tt]; t; t = t->nxt) { #ifdef HAS_UNLESS if (E_state > 0 && E_state != t->e_trans) break; #endif ntrpt->o_t = t; oboq = boq; if (!(_m = do_transit(t, II))) continue; trpt->o_pm |= 1; /* we moved */ (trpt+1)->o_m = _m; /* for unsend */ #ifdef PEG peg[t->forw]++; #endif #ifdef CHECK printf("%3ld: proc %d exec %d, ", depth, II, t->forw); printf("%d to %d, %s %s %s", tt, t->st, t->tp, (t->atom&2)?"atomic":"", (boq != -1)?"rendez-vous":""); #ifdef HAS_UNLESS if (t->e_trans) printf(" (escapes to state %d)", t->st); #endif printf(" %saccepting [tau=%d]\n", (trpt->o_pm&2)?"":"non-", trpt->tau); #endif #ifdef HAS_UNLESS E_state = t->e_trans; #if SYNC>0 if (t->e_trans > 0 && (boq != -1 /* || oboq != -1 */)) { fprintf(efd, "error: a rendezvous stmnt in the escape clause\n"); fprintf(efd, " of an unless stmnt is not compatible with -DBFS\n"); pan_exit(1); } #endif #endif if (t->st > 0) { ((P0 *)this)->_p = t->st; } /* ptr to pred: */ ntrpt->ostate = (H_el *) otrpt; ntrpt->st = tt; if (boq == -1 && (t->atom&2)) /* atomic */ ntrpt->tau = 8; /* record for next move */ else ntrpt->tau = 0; store_state(ntrpt, (boq != -1 || (t->atom&2)), oboq); #ifdef EVENT_TRACE now._event = trpt->o_event; #endif /* undo move and continue */ trpt++; /* this is where ovals and ipt are set */ do_reverse(t, II, _m); /* restore now. */ trpt--; #ifdef CHECK enter_critical(GLOBAL_LOCK); /* verbose mode */ #if NCORE>1 printf("cpu%d: ", core_id); #endif printf("%3lu: proc %d ", depth, II); printf("reverses %d, %d to %d,", t->forw, tt, t->st); printf(" %s [abit=%d,adepth=%ld,", t->tp, now._a_t, A_depth); printf("tau=%d,%d]\n", trpt->tau, (trpt-1)->tau); leave_critical(GLOBAL_LOCK); #endif reached[ot][t->st] = 1; reached[ot][tt] = 1; ((P0 *)this)->_p = tt; _n |= _m; } } #ifndef NOREDUCE /* preselected - no succ definitely outside stack */ if ((trpt->tau&32) && !(trpt->tau&64)) { From = now._nr_pr-1; To = BASE; #ifdef DEBUG cpu_printf("%3ld: proc %d UnSelected (_n=%d, tau=%d)\n", depth, II+1, (int) _n, trpt->tau); #endif _n = 0; trpt->tau &= ~32; if (II >= BASE) { goto Pickup; } goto MainLoop; } trpt->tau &= ~(32|64); #endif if (_n != 0) { continue; } #ifdef DEBUG printf("%3ld: no move [II=%d, tau=%d, boq=%d, _nr_pr=%d]\n", depth, II, trpt->tau, boq, now._nr_pr); #endif if (boq != -1) { failedrv++; x = (Trail *) trpt->ostate; /* pre-rv state */ if (!x) { continue; /* root state */ } if ((x->tau&8) || (x->tau&32)) /* break atomic or preselect at parent */ { x->o_pm |= 8; /* mark failure */ this = pptr(otrpt->pr); #ifdef VERBOSE printf("\treset state of %d from %d to %d\n", otrpt->pr, ((P0 *)this)->_p, otrpt->st); #endif ((P0 *)this)->_p = otrpt->st; unsend(boq); /* retract rv offer */ boq = -1; push_bfs(x, x->o_tt); #ifdef VERBOSE printf("failed rv, repush with %d\n", x->o_pm); #endif } #ifdef VERBOSE else { printf("failed rv, tau at parent: %d\n", x->tau); } #endif } else if (now._nr_pr > 0) { if ((trpt->tau&8)) /* atomic */ { trpt->tau &= ~(1|8); /* 1=timeout, 8=atomic */ #ifdef DEBUG printf("%3ld: atomic step proc %d blocks\n", depth, II+1); #endif goto Repeat; } if (!(trpt->tau&1)) /* didn't try timeout yet */ { trpt->tau |= 1; #ifdef DEBUG printf("%ld: timeout\n", depth); #endif goto MainLoop; } #ifndef VERI if (!noends && !a_cycles && !endstate()) { uerror("invalid end state"); } #endif } } } #endif void putter(Trail *trpt, int fd) { long j; if (!trpt) return; if (trpt != (Trail *) trpt->ostate) putter((Trail *) trpt->ostate, fd); if (trpt->o_t) { sprintf(snap, "%d:%d:%d\n", trcnt++, trpt->pr, trpt->o_t->t_id); j = strlen(snap); if (write(fd, snap, j) != j) { printf("pan: error writing %s\n", fnm); pan_exit(1); } } } void n_ewrite(int fd, char *s, int n) { if (write(fd, s, strlen(s)) != strlen(s)) { printf("pan: error writing %s\n", fnm); pan_exit(1); } } void nuerror(void) { int fd = make_trail(); int j; if (fd < 0) return; #ifdef VERI sprintf(snap, "-2:%d:-2\n", (uchar) ((P0 *)pptr(0))->_t); n_ewrite(fd, snap, strlen(snap)); #endif #ifdef MERGED sprintf(snap, "-4:-4:-4\n"); n_ewrite(fd, snap, strlen(snap)); #endif trcnt = 1; putter(trpt, fd); if (ntrpt->o_t) { sprintf(snap, "%d:%d:%d\n", trcnt++, ntrpt->pr, ntrpt->o_t->t_id); j = strlen(snap); n_ewrite(fd, snap, j); } close(fd); if (errors >= upto && upto != 0) { wrapup(); } } #endif #if (NCORE>1 || defined(BFS_PAR)) && !defined(WIN32) && !defined(WIN64) /* Test and Set assembly code */ #if defined(i386) || defined(__i386__) || defined(__x86_64__) int tas(volatile int *s) /* tested */ { int r; __asm__ __volatile__( "xchgl %0, %1 \n\t" : "=r"(r), "=m"(*s) : "0"(1), "m"(*s) : "memory"); return r; } #elif defined(__arm__) int tas(volatile int *s) /* not tested */ { int r = 1; __asm__ __volatile__( "swpb %0, %0, [%3] \n" : "=r"(r), "=m"(*s) : "0"(r), "r"(s)); return r; } #elif defined(sparc) || defined(__sparc__) int tas(volatile int *s) /* not tested */ { int r = 1; __asm__ __volatile__( " ldstub [%2], %0 \n" : "=r"(r), "=m"(*s) : "r"(s)); return r; } #elif defined(ia64) || defined(__ia64__) /* Intel Itanium */ int tas(volatile int *s) /* tested */ { long int r; __asm__ __volatile__( " xchg4 %0=%1,%2 \n" : "=r"(r), "+m"(*s) : "r"(1) : "memory"); return (int) r; } #elif defined(__powerpc64__) int tas(volatile int *s) /* courtesy srirajpaul */ { int r; #if 1 r = __sync_lock_test_and_set(); #else /* xlc compiler only */ r = __fetch_and_or(s, 1); __isync(); #endif return r; } #else #error missing definition of test and set operation for this platform #endif #ifndef NO_CAS #define cas(a,b,c) __sync_bool_compare_and_swap(a,b,c) #else int cas(volatile uint32_t *a, uint32_t b, uint32_t c) { static volatile int cas_lock; while (tas(&cas_lock) != 0) { ; } if (*a == b) { *a = c; cas_lock = 0; return 1; } cas_lock = 0; return 0; } #endif #endif #if NCORE>1 #if defined(WIN32) || defined(WIN64) #ifndef _CONSOLE #define _CONSOLE #endif #ifdef WIN64 #undef long #endif #include <windows.h> /* #ifdef WIN64 #define long long long #endif */ #else #include <sys/ipc.h> #include <sys/sem.h> #include <sys/shm.h> #endif /* code common to cygwin/linux and win32/win64: */ #ifdef VERBOSE #define VVERBOSE (1) #else #define VVERBOSE (0) #endif /* the following values must be larger than 256 and must fit in an int */ #define QUIT 1024 /* terminate now command */ #define QUERY 512 /* termination status query message */ #define QUERY_F 513 /* query failed, cannot quit */ #define GN_FRAMES (int) (GWQ_SIZE / (double) sizeof(SM_frame)) #define LN_FRAMES (int) (LWQ_SIZE / (double) sizeof(SM_frame)) #ifndef VMAX #define VMAX VECTORSZ #endif #ifndef PMAX #define PMAX 64 #endif #ifndef QMAX #define QMAX 64 #endif #if VECTORSZ>32000 #define OFFT int #else #define OFFT short #endif #ifdef SET_SEG_SIZE /* no longer useful -- being recomputed for local heap size anyway */ double SEG_SIZE = (((double) SET_SEG_SIZE) * 1048576.); #else double SEG_SIZE = (1048576.*1024.); /* 1GB default shared memory pool segments */ #endif double LWQ_SIZE = 0.; /* initialized in main */ #ifdef SET_WQ_SIZE #ifdef NGQ #warning SET_WQ_SIZE applies to global queue -- ignored double GWQ_SIZE = 0.; #else double GWQ_SIZE = (((double) SET_WQ_SIZE) * 1048576.); /* must match the value in pan_proxy.c, if used */ #endif #else #ifdef NGQ double GWQ_SIZE = 0.; #else double GWQ_SIZE = (128.*1048576.); /* 128 MB default queue sizes */ #endif #endif /* Crash Detection Parameters */ #ifndef ONESECOND #define ONESECOND (1<<25) #endif #ifndef SHORT_T #define SHORT_T (0.1) #endif #ifndef LONG_T #define LONG_T (600) #endif double OneSecond = (double) (ONESECOND); /* waiting for a free slot -- checks crash */ double TenSeconds = 10. * (ONESECOND); /* waiting for a lock -- check for a crash */ /* Termination Detection Params -- waiting for new state input in Get_Full_Frame */ double Delay = ((double) SHORT_T) * (ONESECOND); /* termination detection trigger */ double OneHour = ((double) LONG_T) * (ONESECOND); /* timeout termination detection */ typedef struct SM_frame SM_frame; typedef struct SM_results SM_results; typedef struct sh_Allocater sh_Allocater; struct SM_frame { /* about 6K per slot */ volatile int m_vsize; /* 0 means free slot */ volatile int m_boq; /* >500 is a control message */ #ifdef FULL_TRAIL volatile struct Stack_Tree *m_stack; /* ptr to previous state */ #endif volatile uchar m_tau; volatile uchar m_o_pm; volatile int nr_handoffs; /* to compute real_depth */ volatile char m_now [VMAX]; #if !defined(NOCOMP) && !defined(HC) volatile char m_mask [(VMAX + 7)/8]; #endif volatile OFFT m_p_offset[PMAX]; volatile OFFT m_q_offset[QMAX]; volatile uchar m_p_skip [PMAX]; volatile uchar m_q_skip [QMAX]; #if defined(C_States) && (HAS_TRACK==1) && (HAS_STACK==1) volatile uchar m_c_stack [StackSize]; #endif }; int proxy_pid; /* id of proxy if nonzero -- receive half */ int store_proxy_pid; short remote_party; int proxy_pid_snd; /* id of proxy if nonzero -- send half */ char o_cmdline[512]; /* to pass options to children */ int iamin[CS_NR+NCORE]; /* non-shared */ #if defined(WIN32) || defined(WIN64) int tas(volatile LONG *); HANDLE proxy_handle_snd; /* for Windows Create and Terminate */ struct sh_Allocater { /* shared memory for states */ volatile char *dc_arena; /* to allocate states from */ volatile long pattern; /* to detect overruns */ volatile long dc_size; /* nr of bytes left */ volatile void *dc_start; /* where memory segment starts */ volatile void *dc_id; /* to attach, detach, remove shared memory segments */ volatile sh_Allocater *nxt; /* linked list of pools */ }; DWORD worker_pids[NCORE]; /* root mem of pids of all workers created */ HANDLE worker_handles[NCORE]; /* for windows Create and Terminate */ void * shmid [NR_QS]; /* return value from CreateFileMapping */ void * shmid_M; /* shared mem for state allocation in hashtable */ #ifdef SEP_STATE void *shmid_X; #else void *shmid_S; /* shared bitstate arena or hashtable */ #endif #else int tas(volatile int *); struct sh_Allocater { /* shared memory for states */ volatile char *dc_arena; /* to allocate states from */ volatile long pattern; /* to detect overruns */ volatile long dc_size; /* nr of bytes left */ volatile char *dc_start; /* where memory segment starts */ volatile int dc_id; /* to attach, detach, remove shared memory segments */ volatile sh_Allocater *nxt; /* linked list of pools */ }; int worker_pids[NCORE]; /* root mem of pids of all workers created */ int shmid [NR_QS]; /* return value from shmget */ int nibis = 0; /* set after shared mem has been released */ int shmid_M; /* shared mem for state allocation in hashtable */ #ifdef SEP_STATE long shmid_X; #else int shmid_S; /* shared bitstate arena or hashtable */ volatile sh_Allocater *first_pool; /* of shared state memory */ volatile sh_Allocater *last_pool; #endif #endif struct SM_results { /* for shuttling back final stats */ volatile int m_vsize; /* avoid conflicts with frames */ volatile int m_boq; /* these 2 fields are not written in record_info */ /* probably not all fields really need to be volatile */ volatile double m_memcnt; volatile double m_nstates; volatile double m_truncs; volatile double m_truncs2; volatile double m_nShadow; volatile double m_nlinks; volatile double m_ngrabs; volatile double m_nlost; volatile double m_hcmp; volatile double m_frame_wait; volatile int m_hmax; volatile int m_svmax; volatile int m_smax; volatile int m_mreached; volatile int m_errors; volatile int m_VMAX; volatile short m_PMAX; volatile short m_QMAX; volatile uchar m_R; /* reached info for all proctypes */ }; int core_id = 0; /* internal process nr, to know which q to use */ unsigned long nstates_put = 0; /* statistics */ unsigned long nstates_get = 0; int query_in_progress = 0; /* termination detection */ double free_wait = 0.; /* waiting for a free frame */ double frame_wait = 0.; /* waiting for a full frame */ double lock_wait = 0.; /* waiting for access to cs */ double glock_wait[3]; /* waiting for access to global lock */ char *sprefix = "rst"; uchar was_interrupted, issued_kill, writing_trail; static SM_frame cur_Root; /* current root, to be safe with error trails */ SM_frame *m_workq [NR_QS]; /* per cpu work queues + global q */ char *shared_mem[NR_QS]; /* return value from shmat */ #ifdef SEP_HEAP char *my_heap; long my_size; #endif volatile sh_Allocater *dc_shared; /* assigned at initialization */ static int vmax_seen, pmax_seen, qmax_seen; static double gq_tries, gq_hasroom, gq_hasnoroom; volatile int *prfree; volatile int *prfull; volatile int *prcnt; volatile int *prmax; volatile int *sh_lock; /* mutual exclusion locks - in shared memory */ volatile double *is_alive; /* to detect when processes crash */ volatile int *grfree, *grfull, *grcnt, *grmax; /* access to shared global q */ volatile double *gr_readmiss, *gr_writemiss; static int lrfree; /* used for temporary recording of slot */ static int dfs_phase2; void mem_put(int); /* handoff state to other cpu */ void mem_put_acc(void); /* liveness mode */ void mem_get(void); /* get state from work queue */ void sudden_stop(char *); void record_info(SM_results *r) { int i; uchar *ptr; #ifdef SEP_STATE if (0) { cpu_printf("nstates %g nshadow %g -- memory %-6.3f Mb\n", nstates, nShadow, memcnt/(1048576.)); } r->m_memcnt = 0; #else #ifdef BITSTATE r->m_memcnt = 0; /* it's shared */ #endif r->m_memcnt = memcnt; #endif if (a_cycles && core_id == 1) { r->m_nstates = nstates; r->m_nShadow = nstates; } else { r->m_nstates = nstates; r->m_nShadow = nShadow; } r->m_truncs = truncs; r->m_truncs2 = truncs2; r->m_nlinks = nlinks; r->m_ngrabs = ngrabs; r->m_nlost = nlost; r->m_hcmp = hcmp; r->m_frame_wait = frame_wait; r->m_hmax = hmax; r->m_svmax = svmax; r->m_smax = smax; r->m_mreached = mreached; r->m_errors = errors; r->m_VMAX = vmax_seen; r->m_PMAX = (short) pmax_seen; r->m_QMAX = (short) qmax_seen; ptr = (uchar *) &(r->m_R); for (i = 0; i <= _NP_; i++) /* all proctypes */ { memcpy(ptr, reached[i], NrStates[i]*sizeof(uchar)); ptr += NrStates[i]*sizeof(uchar); } if (verbose>1) { cpu_printf("Put Results nstates %g (sz %d)\n", nstates, ptr - &(r->m_R)); } } void snapshot(void); void retrieve_info(SM_results *r) { int i, j; volatile uchar *ptr; snapshot(); /* for a final report */ enter_critical(GLOBAL_LOCK); #ifdef SEP_HEAP if (verbose) { printf("cpu%d: local heap-left %ld KB (%d MB)\n", core_id, (long) (my_size/1024), (int) (my_size/1048576)); } #endif if (verbose && core_id == 0) { printf("qmax: "); for (i = 0; i < NCORE; i++) { printf("%d ", prmax[i]); } #ifndef NGQ printf("G: %d", *grmax); #endif printf("\n"); } leave_critical(GLOBAL_LOCK); memcnt += r->m_memcnt; nstates += r->m_nstates; nShadow += r->m_nShadow; truncs += r->m_truncs; truncs2 += r->m_truncs2; nlinks += r->m_nlinks; ngrabs += r->m_ngrabs; nlost += r->m_nlost; hcmp += r->m_hcmp; /* frame_wait += r->m_frame_wait; */ errors += r->m_errors; if (hmax < r->m_hmax) hmax = r->m_hmax; if (svmax < r->m_svmax) svmax = r->m_svmax; if (smax < r->m_smax) smax = r->m_smax; if (mreached < r->m_mreached) mreached = r->m_mreached; if (vmax_seen < r->m_VMAX) vmax_seen = r->m_VMAX; if (pmax_seen < (int) r->m_PMAX) pmax_seen = (int) r->m_PMAX; if (qmax_seen < (int) r->m_QMAX) qmax_seen = (int) r->m_QMAX; ptr = &(r->m_R); for (i = 0; i <= _NP_; i++) /* all proctypes */ { for (j = 0; j < NrStates[i]; j++) { if (*(ptr + j) != 0) { reached[i][j] = 1; } } ptr += NrStates[i]*sizeof(uchar); } if (verbose>1) { cpu_printf("Got Results (%d)\n", (int) (ptr - &(r->m_R))); snapshot(); } } #if !defined(WIN32) && !defined(WIN64) static void rm_shared_segments(void) { int m; volatile sh_Allocater *nxt_pool; /* * mark all shared memory segments for removal * the actual removes wont happen intil last process dies or detaches * the shmctl calls can return -1 if not all procs have detached yet */ for (m = 0; m < NR_QS; m++) /* +1 for global q */ { if (shmid[m] != -1) { (void) shmctl(shmid[m], IPC_RMID, NULL); } } #ifdef SEP_STATE if (shmid_M != -1) { (void) shmctl(shmid_M, IPC_RMID, NULL); } #else if (shmid_S != -1) { (void) shmctl(shmid_S, IPC_RMID, NULL); } for (last_pool = first_pool; last_pool != NULL; last_pool = nxt_pool) { shmid_M = (int) (last_pool->dc_id); nxt_pool = last_pool->nxt; /* as a pre-caution only */ if (shmid_M != -1) { (void) shmctl(shmid_M, IPC_RMID, NULL); } } #endif } #endif void sudden_stop(char *s) { char b[64]; int i; printf("cpu%d: stop - %s\n", core_id, s); #if !defined(WIN32) && !defined(WIN64) if (proxy_pid != 0) { rm_shared_segments(); } #endif if (search_terminated != NULL) { if (*search_terminated != 0) { if (verbose) { printf("cpu%d: termination initiated (%d)\n", core_id, (int) *search_terminated); } } else { if (verbose) { printf("cpu%d: initiated termination\n", core_id); } *search_terminated |= 8; /* sudden_stop */ } if (core_id == 0) { if (((*search_terminated) & 4) /* uerror in one of the cpus */ && !((*search_terminated) & (8|32|128|256))) /* abnormal stop */ { if (errors == 0) errors++; /* we know there is at least 1 */ } wrapup(); /* incomplete stats, but at least something */ } return; } /* else: should rarely happen, take more drastic measures */ if (core_id == 0) /* local root process */ { for (i = 1; i < NCORE; i++) /* not for 0 of course */ { int ignore; #if defined(WIN32) || defined(WIN64) DWORD dwExitCode = 0; GetExitCodeProcess(worker_handles[i], &dwExitCode); if (dwExitCode == STILL_ACTIVE) { TerminateProcess(worker_handles[i], 0); } printf("cpu0: terminate %d %d\n", (int) worker_pids[i], (dwExitCode == STILL_ACTIVE)); #else sprintf(b, "kill -%d %d", (int) SIGKILL, (int) worker_pids[i]); ignore = system(b); /* if this is a proxy: receive half */ printf("cpu0: %s\n", b); #endif } issued_kill++; } else { /* on WIN32/WIN64 -- these merely kills the root process... */ if (was_interrupted == 0) { int ignore; sprintf(b, "kill -%d %d", (int) SIGINT, (int) worker_pids[0]); ignore = system(b); /* warn the root process */ printf("cpu%d: %s\n", core_id, b); issued_kill++; } } } #define iam_alive() is_alive[core_id]++ extern int crash_test(double); extern void crash_reset(void); int someone_crashed(int wait_type) { static double last_value = 0.0; static int count = 0; if (search_terminated == NULL || *search_terminated != 0) { if (!(*search_terminated & (8|32|128|256))) { if (count++ < 100*NCORE) { return 0; } } return 1; } /* check left neighbor only */ if (last_value == is_alive[(core_id + NCORE - 1) % NCORE]) { if (count++ >= 100) /* to avoid unnecessary checks */ { return 1; } return 0; } last_value = is_alive[(core_id + NCORE - 1) % NCORE]; count = 0; crash_reset(); return 0; } void sleep_report(void) { enter_critical(GLOBAL_LOCK); if (verbose) { #ifdef NGQ printf("cpu%d: locks: global %g\tother %g\t", core_id, glock_wait[0], lock_wait - glock_wait[0]); #else printf("cpu%d: locks: GL %g, RQ %g, WQ %g, HT %g\t", core_id, glock_wait[0], glock_wait[1], glock_wait[2], lock_wait - glock_wait[0] - glock_wait[1] - glock_wait[2]); #endif printf("waits: states %g slots %g\n", frame_wait, free_wait); #ifndef NGQ printf("cpu%d: gq [tries %g, room %g, noroom %g]\n", core_id, gq_tries, gq_hasroom, gq_hasnoroom); if (core_id == 0 && (*gr_readmiss >= 1.0 || *gr_readmiss >= 1.0 || *grcnt != 0)) printf("cpu0: gq [readmiss: %g, writemiss: %g cnt %d]\n", *gr_readmiss, *gr_writemiss, *grcnt); #endif } if (free_wait > 1000000.) #ifndef NGQ if (!a_cycles) { printf("hint: this search may be faster with a larger work-queue\n"); printf(" (-DSET_WQ_SIZE=N with N>%g), and/or with -DUSE_DISK\n", GWQ_SIZE/sizeof(SM_frame)); printf(" or with a larger value for -zN (N>%ld)\n", z_handoff); #else { printf("hint: this search may be faster if compiled without -DNGQ, with -DUSE_DISK, "); printf("or with a larger -zN (N>%d)\n", z_handoff); #endif } leave_critical(GLOBAL_LOCK); } #ifndef MAX_DSK_FILE #define MAX_DSK_FILE 1000000 /* default is max 1M states per file */ #endif void multi_usage(FILE *fd) { static int warned = 0; if (warned > 0) { return; } else { warned++; } fprintf(fd, "\n"); fprintf(fd, "Defining multi-core mode:\n\n"); fprintf(fd, " -DDUAL_CORE --> same as -DNCORE=2\n"); fprintf(fd, " -DQUAD_CORE --> same as -DNCORE=4\n"); fprintf(fd, " -DNCORE=N --> enables multi_core verification if N>1\n"); fprintf(fd, "\n"); fprintf(fd, "Additional directives supported in multi-core mode:\n\n"); fprintf(fd, " -DSEP_STATE --> forces separate statespaces instead of a single shared state space\n"); fprintf(fd, " -DNUSE_DISK --> use disk for storing states when a work queue overflows\n"); fprintf(fd, " -DMAX_DSK_FILE --> max nr of states per diskfile (%d)\n", MAX_DSK_FILE); fprintf(fd, " -DFULL_TRAIL --> support full error trails (increases memory use)\n"); fprintf(fd, "\n"); fprintf(fd, "More advanced use (should rarely need changing):\n\n"); fprintf(fd, " To change the nr of states that can be stored in the global queue\n"); fprintf(fd, " (lower numbers allow for more states to be stored, prefer multiples of 8):\n"); fprintf(fd, " -DVMAX=N --> upperbound on statevector for handoffs (N=%d)\n", VMAX); fprintf(fd, " -DPMAX=N --> upperbound on nr of procs (default: N=%d)\n", PMAX); fprintf(fd, " -DQMAX=N --> upperbound on nr of channels (default: N=%d)\n", QMAX); fprintf(fd, "\n"); fprintf(fd, " To set the total amount of memory reserved for the global workqueue:\n"); fprintf(fd, " -DSET_WQ_SIZE=N --> default: N=128 (defined in MBytes)\n\n"); fprintf(fd, " To force the use of a single global heap, instead of separate heaps:\n"); fprintf(fd, " -DGLOB_HEAP\n"); fprintf(fd, "\n"); fprintf(fd, " To define a fct to initialize data before spawning processes (use quotes):\n"); fprintf(fd, " \"-DC_INIT=fct()\"\n"); fprintf(fd, "\n"); fprintf(fd, " Timer settings for termination and crash detection:\n"); fprintf(fd, " -DSHORT_T=N --> timeout for termination detection trigger (N=%g)\n", (double) SHORT_T); fprintf(fd, " -DLONG_T=N --> timeout for giving up on termination detection (N=%g)\n", (double) LONG_T); fprintf(fd, " -DONESECOND --> (1<<29) --> timeout waiting for a free slot -- to check for crash\n"); fprintf(fd, " -DT_ALERT --> collect stats on crash alert timeouts\n\n"); fprintf(fd, "Help with Linux/Windows/Cygwin configuration for multi-core:\n"); fprintf(fd, " http://spinroot.com/spin/multicore/V5_Readme.html\n"); fprintf(fd, "\n"); } #if NCORE>1 && defined(FULL_TRAIL) typedef struct Stack_Tree { uchar pr; /* process that made transition */ T_ID t_id; /* id of transition */ volatile struct Stack_Tree *prv; /* backward link towards root */ } Stack_Tree; H_el *grab_shared(int); volatile Stack_Tree **stack_last; /* in shared memory */ char *stack_cache = NULL; /* local */ int nr_cached = 0; /* local */ #ifndef CACHE_NR #define CACHE_NR 1024 #endif volatile Stack_Tree * stack_prefetch(void) { volatile Stack_Tree *st; if (nr_cached == 0) { stack_cache = (char *) grab_shared(CACHE_NR * sizeof(Stack_Tree)); nr_cached = CACHE_NR; } st = (volatile Stack_Tree *) stack_cache; stack_cache += sizeof(Stack_Tree); nr_cached--; return st; } void Push_Stack_Tree(short II, T_ID t_id) { volatile Stack_Tree *st; st = (volatile Stack_Tree *) stack_prefetch(); st->pr = II; st->t_id = t_id; st->prv = (Stack_Tree *) stack_last[core_id]; stack_last[core_id] = st; } void Pop_Stack_Tree(void) { volatile Stack_Tree *cf = stack_last[core_id]; if (cf) { stack_last[core_id] = cf->prv; } else if (nr_handoffs * z_handoff + depth > 0) { printf("cpu%d: error pop_stack_tree (depth %ld)\n", core_id, depth); } } #endif void e_critical(int which) { double cnt_start; if (readtrail || iamin[which] > 0) { if (!readtrail && verbose) { printf("cpu%d: Double Lock on %d (now %d)\n", core_id, which, iamin[which]+1); fflush(stdout); } iamin[which]++; /* local variable */ return; } cnt_start = lock_wait; while (sh_lock != NULL) /* as long as we have shared memory */ { int r = tas(&sh_lock[which]); if (r == 0) { iamin[which] = 1; return; /* locked */ } lock_wait++; #ifndef NGQ if (which < 3) { glock_wait[which]++; } #else if (which == 0) { glock_wait[which]++; } #endif iam_alive(); if (lock_wait - cnt_start > TenSeconds) { printf("cpu%d: lock timeout on %d\n", core_id, which); cnt_start = lock_wait; if (someone_crashed(1)) { sudden_stop("lock timeout"); pan_exit(1); } } } } void x_critical(int which) { if (iamin[which] != 1) { if (iamin[which] > 1) { iamin[which]--; /* this is thread-local - no races on this one */ if (!readtrail && verbose) { printf("cpu%d: Partial Unlock on %d (%d more needed)\n", core_id, which, iamin[which]); fflush(stdout); } return; } else /* iamin[which] <= 0 */ { if (!readtrail) { printf("cpu%d: Invalid Unlock iamin[%d] = %d\n", core_id, which, iamin[which]); fflush(stdout); } return; } } if (sh_lock != NULL) { iamin[which] = 0; #if defined(__powerpc64__) #if 1 __sync_synchronize(); /* srirajpaul */ #else __lwsync(); /* xlc compiler only */ #endif #endif sh_lock[which] = 0; /* unlock */ } } void #if defined(WIN32) || defined(WIN64) start_proxy(char *s, DWORD r_pid) #else start_proxy(char *s, int r_pid) #endif { char Q_arg[16], Z_arg[16], Y_arg[16]; char *args[32], *ptr; int argcnt = 0; sprintf(Q_arg, "-Q%d", getpid()); sprintf(Y_arg, "-Y%d", r_pid); sprintf(Z_arg, "-Z%d", proxy_pid /* core_id */); args[argcnt++] = "proxy"; args[argcnt++] = s; /* -r or -s */ args[argcnt++] = Q_arg; args[argcnt++] = Z_arg; args[argcnt++] = Y_arg; if (strlen(o_cmdline) > 0) { ptr = o_cmdline; /* assume args separated by spaces */ do { args[argcnt++] = ptr++; if ((ptr = strchr(ptr, ' ')) != NULL) { while (*ptr == ' ') { *ptr++ = '\0'; } } else { break; } } while (argcnt < 31); } args[argcnt] = NULL; #if defined(WIN32) || defined(WIN64) execvp("pan_proxy", args); /* no return */ #else execvp("./pan_proxy", args); /* no return */ #endif Uerror("pan_proxy exec failed"); } /*** end of common code fragment ***/ #if !defined(WIN32) && !defined(WIN64) void init_shm(void) /* initialize shared work-queues - linux/cygwin */ { key_t key[NR_QS]; int n, m; int must_exit = 0; if (core_id == 0 && verbose) { printf("cpu0: step 3: allocate shared workqueues %g MB\n", ((double) NCORE * LWQ_SIZE + GWQ_SIZE) / (1048576.) ); } for (m = 0; m < NR_QS; m++) /* last q is the global q */ { double qsize = (m == NCORE) ? GWQ_SIZE : LWQ_SIZE; key[m] = ftok(PanSource, m+1); if (key[m] == -1) { perror("ftok shared queues"); must_exit = 1; break; } if (core_id == 0) /* root creates */ { /* check for stale copy */ shmid[m] = shmget(key[m], (size_t) qsize, 0600); if (shmid[m] != -1) /* yes there is one; remove it */ { printf("cpu0: removing stale q%d, status: %d\n", m, shmctl(shmid[m], IPC_RMID, NULL)); } shmid[m] = shmget(key[m], (size_t) qsize, 0600|IPC_CREAT|IPC_EXCL); memcnt += qsize; } else /* workers attach */ { shmid[m] = shmget(key[m], (size_t) qsize, 0600); /* never called, since we create shm *before* we fork */ } if (shmid[m] == -1) { perror("shmget shared queues"); must_exit = 1; break; } shared_mem[m] = (char *) shmat(shmid[m], (void *) 0, 0); /* attach */ if (shared_mem[m] == (char *) -1) { fprintf(stderr, "error: cannot attach shared wq %d (%d Mb)\n", m+1, (int) (qsize/(1048576.))); perror("shmat shared queues"); must_exit = 1; break; } m_workq[m] = (SM_frame *) shared_mem[m]; if (core_id == 0) { int nframes = (m == NCORE) ? GN_FRAMES : LN_FRAMES; for (n = 0; n < nframes; n++) { m_workq[m][n].m_vsize = 0; m_workq[m][n].m_boq = 0; } } } if (must_exit) { rm_shared_segments(); fprintf(stderr, "pan: check './pan --' for usage details\n"); pan_exit(1); /* calls cleanup_shm */ } } static uchar * prep_shmid_S(size_t n) /* either sets SS or H_tab, linux/cygwin */ { char *rval; #ifndef SEP_STATE key_t key; if (verbose && core_id == 0) { #ifdef BITSTATE printf("cpu0: step 1: allocate shared bitstate %g Mb\n", (double) n / (1048576.)); #else printf("cpu0: step 1: allocate shared hastable %g Mb\n", (double) n / (1048576.)); #endif } #ifdef MEMLIM if (memcnt + (double) n > memlim) { printf("cpu0: S %8g + %d Kb exceeds memory limit of %8g Mb\n", memcnt/1024., (int) (n/1024), memlim/(1048576.)); printf("cpu0: insufficient memory -- aborting\n"); exit(1); } #endif key = ftok(PanSource, NCORE+2); /* different from queues */ if (key == -1) { perror("ftok shared bitstate or hashtable"); fprintf(stderr, "pan: check './pan --' for usage details\n"); pan_exit(1); } if (core_id == 0) /* root */ { shmid_S = shmget(key, n, 0600); if (shmid_S != -1) { printf("cpu0: removing stale segment, status: %d\n", (int) shmctl(shmid_S, IPC_RMID, NULL)); } shmid_S = shmget(key, n, 0600 | IPC_CREAT | IPC_EXCL); memcnt += (double) n; } else /* worker */ { shmid_S = shmget(key, n, 0600); } if (shmid_S == -1) { perror("shmget shared bitstate or hashtable too large?"); fprintf(stderr, "pan: check './pan --' for usage details\n"); pan_exit(1); } rval = (char *) shmat(shmid_S, (void *) 0, 0); /* attach */ if ((char *) rval == (char *) -1) { perror("shmat shared bitstate or hashtable"); fprintf(stderr, "pan: check './pan --' for usage details\n"); pan_exit(1); } #else rval = (char *) emalloc(n); #endif return (uchar *) rval; } #define TRY_AGAIN 1 #define NOT_AGAIN 0 static char shm_prep_result; static uchar * prep_state_mem(size_t n) /* sets memory arena for states linux/cygwin */ { char *rval; key_t key; static int cnt = 3; /* start larger than earlier ftok calls */ shm_prep_result = NOT_AGAIN; /* default */ if (verbose && core_id == 0) { printf("cpu0: step 2+: pre-allocate memory arena %d of %6.2g Mb\n", cnt-3, (double) n / (1048576.)); } #ifdef MEMLIM if (memcnt + (double) n > memlim) { printf("cpu0: error: M %.0f + %.0f Kb exceeds memory limit of %.0f Mb\n", memcnt/1024.0, (double) n/1024.0, memlim/(1048576.)); return NULL; } #endif key = ftok(PanSource, NCORE+cnt); cnt++; if (key == -1) { perror("ftok T"); printf("pan: check './pan --' for usage details\n"); pan_exit(1); } if (core_id == 0) { shmid_M = shmget(key, n, 0600); if (shmid_M != -1) { printf("cpu0: removing stale memory segment %d, status: %d\n", cnt-3, shmctl(shmid_M, IPC_RMID, NULL)); } shmid_M = shmget(key, n, 0600 | IPC_CREAT | IPC_EXCL); /* memcnt += (double) n; -- only amount actually used is counted */ } else { shmid_M = shmget(key, n, 0600); } if (shmid_M == -1) { if (verbose) { printf("error: failed to get pool of shared memory %d of %.0f Mb\n", cnt-3, ((double)n)/(1048576.)); perror("state mem"); printf("pan: check './pan --' for usage details\n"); } shm_prep_result = TRY_AGAIN; return NULL; } rval = (char *) shmat(shmid_M, (void *) 0, 0); /* attach */ if ((char *) rval == (char *) -1) { printf("cpu%d error: failed to attach pool of shared memory %d of %.0f Mb\n", core_id, cnt-3, ((double)n)/(1048576.)); perror("state mem"); return NULL; } return (uchar *) rval; } void init_HT(unsigned long n) /* cygwin/linux version */ { volatile char *x; double get_mem; #ifndef SEP_STATE volatile char *dc_mem_start; double need_mem, got_mem = 0.; #endif #ifdef SEP_STATE #ifndef MEMLIM if (verbose) { printf("cpu0: steps 0,1: no -DMEMLIM set\n"); } #else if (verbose) { printf("cpu0: steps 0,1: -DMEMLIM=%d Mb - (hashtable %g Mb + workqueues %g Mb)\n", MEMLIM, ((double)n/(1048576.)), (((double) NCORE * LWQ_SIZE) + GWQ_SIZE) /(1048576.) ); } #endif get_mem = NCORE * sizeof(double) + (1 + CS_NR) * sizeof(void *) + 4*sizeof(void *) + 2*sizeof(double); /* NCORE * is_alive + search_terminated + CS_NR * sh_lock + 6 gr vars */ get_mem += 4 * NCORE * sizeof(void *); /* prfree, prfull, prcnt, prmax */ #ifdef FULL_TRAIL get_mem += (NCORE) * sizeof(Stack_Tree *); /* NCORE * stack_last */ #endif x = (volatile char *) prep_state_mem((size_t) get_mem); /* work queues and basic structs */ shmid_X = (long) x; if (x == NULL) { printf("cpu0: could not allocate shared memory, see ./pan --\n"); exit(1); } search_terminated = (volatile unsigned int *) x; /* comes first */ x += sizeof(void *); /* maintain alignment */ is_alive = (volatile double *) x; x += NCORE * sizeof(double); sh_lock = (volatile int *) x; x += CS_NR * sizeof(void *); grfree = (volatile int *) x; x += sizeof(void *); grfull = (volatile int *) x; x += sizeof(void *); grcnt = (volatile int *) x; x += sizeof(void *); grmax = (volatile int *) x; x += sizeof(void *); prfree = (volatile int *) x; x += NCORE * sizeof(void *); prfull = (volatile int *) x; x += NCORE * sizeof(void *); prcnt = (volatile int *) x; x += NCORE * sizeof(void *); prmax = (volatile int *) x; x += NCORE * sizeof(void *); gr_readmiss = (volatile double *) x; x += sizeof(double); gr_writemiss = (volatile double *) x; x += sizeof(double); #ifdef FULL_TRAIL stack_last = (volatile Stack_Tree **) x; x += NCORE * sizeof(Stack_Tree *); #endif #ifndef BITSTATE H_tab = (H_el **) emalloc(n); #endif #else #ifndef MEMLIM #warning MEMLIM not set #define MEMLIM (2048) #endif if (core_id == 0 && verbose) { printf("cpu0: step 0: -DMEMLIM=%d Mb minus hashtable+workqs (%g + %g Mb) leaves %g Mb\n", MEMLIM, ((double)n/(1048576.)), (NCORE * LWQ_SIZE + GWQ_SIZE)/(1048576.), (memlim - memcnt - (double) n - (NCORE * LWQ_SIZE + GWQ_SIZE))/(1048576.)); } #ifndef BITSTATE H_tab = (H_el **) prep_shmid_S((size_t) n); /* hash_table */ #endif need_mem = memlim - memcnt - ((double) NCORE * LWQ_SIZE) - GWQ_SIZE; if (need_mem <= 0.) { Uerror("internal error -- shared state memory"); } if (core_id == 0 && verbose) { printf("cpu0: step 2: pre-allocate shared state memory %g Mb\n", need_mem/(1048576.)); } #ifdef SEP_HEAP SEG_SIZE = need_mem / NCORE; if (verbose && core_id == 0) { printf("cpu0: setting segsize to %6g MB\n", SEG_SIZE/(1048576.)); } #if defined(CYGWIN) || defined(__CYGWIN__) if (SEG_SIZE > 512.*1024.*1024.) { printf("warning: reducing SEG_SIZE of %g MB to 512MB (exceeds max for Cygwin)\n", SEG_SIZE/(1024.*1024.)); SEG_SIZE = 512.*1024.*1024.; } #endif #endif mem_reserved = need_mem; while (need_mem > 1024.) { get_mem = need_mem; shm_more: if (get_mem > (double) SEG_SIZE) { get_mem = (double) SEG_SIZE; } if (get_mem <= 0.0) break; /* for allocating states: */ x = dc_mem_start = (volatile char *) prep_state_mem((size_t) get_mem); if (x == NULL) { if (shm_prep_result == NOT_AGAIN || first_pool != NULL || SEG_SIZE < (16. * 1048576.)) { break; } SEG_SIZE /= 2.; if (verbose) { printf("pan: lowered segsize to %f\n", SEG_SIZE); } if (SEG_SIZE >= 1024.) { goto shm_more; } break; } need_mem -= get_mem; got_mem += get_mem; if (first_pool == NULL) { search_terminated = (volatile unsigned int *) x; /* comes first */ x += sizeof(void *); /* maintain alignment */ is_alive = (volatile double *) x; x += NCORE * sizeof(double); sh_lock = (volatile int *) x; x += CS_NR * sizeof(void *); grfree = (volatile int *) x; x += sizeof(void *); grfull = (volatile int *) x; x += sizeof(void *); grcnt = (volatile int *) x; x += sizeof(void *); grmax = (volatile int *) x; x += sizeof(void *); prfree = (volatile int *) x; x += NCORE * sizeof(void *); prfull = (volatile int *) x; x += NCORE * sizeof(void *); prcnt = (volatile int *) x; x += NCORE * sizeof(void *); prmax = (volatile int *) x; x += NCORE * sizeof(void *); gr_readmiss = (volatile double *) x; x += sizeof(double); gr_writemiss = (volatile double *) x; x += sizeof(double); #ifdef FULL_TRAIL stack_last = (volatile Stack_Tree **) x; x += NCORE * sizeof(Stack_Tree *); #endif if (((long)x)&(sizeof(void *)-1)) /* 64-bit word alignment */ { x += sizeof(void *)-(((long)x)&(sizeof(void *)-1)); } #ifdef COLLAPSE ncomps = (unsigned long *) x; x += (256+2) * sizeof(unsigned long); #endif } dc_shared = (sh_Allocater *) x; /* must be in shared memory */ x += sizeof(sh_Allocater); if (core_id == 0) /* root only */ { dc_shared->dc_id = shmid_M; dc_shared->dc_start = dc_mem_start; dc_shared->dc_arena = x; dc_shared->pattern = 1234567; /* protection */ dc_shared->dc_size = (long) get_mem - (long) (x - dc_mem_start); dc_shared->nxt = (long) 0; if (last_pool == NULL) { first_pool = last_pool = dc_shared; } else { last_pool->nxt = dc_shared; last_pool = dc_shared; } } else if (first_pool == NULL) { first_pool = dc_shared; } } if (need_mem > 1024.) { printf("cpu0: could allocate only %g Mb of shared memory (wanted %g more)\n", got_mem/(1048576.), need_mem/(1048576.)); } if (!first_pool) { printf("cpu0: insufficient memory -- aborting.\n"); exit(1); } /* we are still single-threaded at this point, with core_id 0 */ dc_shared = first_pool; #endif } void cleanup_shm(int val) { volatile sh_Allocater *nxt_pool; unsigned long cnt = 0; int m; if (nibis != 0) { printf("cpu%d: Redundant call to cleanup_shm(%d)\n", core_id, val); return; } else { nibis = 1; } if (search_terminated != NULL) { *search_terminated |= 16; /* cleanup_shm */ } for (m = 0; m < NR_QS; m++) { if (shmdt((void *) shared_mem[m]) > 0) { perror("shmdt detaching from shared queues"); } } #ifdef SEP_STATE if (shmdt((void *) shmid_X) != 0) { perror("shmdt detaching from shared state memory"); } #else #ifdef BITSTATE if (SS > 0 && shmdt((void *) SS) != 0) { if (verbose) { perror("shmdt detaching from shared bitstate arena"); } } #else if (core_id == 0) { /* before detaching: */ for (nxt_pool = dc_shared; nxt_pool != NULL; nxt_pool = nxt_pool->nxt) { cnt += nxt_pool->dc_size; } if (verbose) { printf("cpu0: done, %ld Mb of shared state memory left\n", cnt / (long)(1048576)); } } if (shmdt((void *) H_tab) != 0) { perror("shmdt detaching from shared hashtable"); } for (last_pool = first_pool; last_pool != NULL; last_pool = nxt_pool) { nxt_pool = last_pool->nxt; if (shmdt((void *) last_pool->dc_start) != 0) { perror("shmdt detaching from shared state memory"); } } first_pool = last_pool = NULL; /* precaution */ #endif #endif /* detached from shared memory - so cannot use cpu_printf */ if (verbose) { printf("cpu%d: done -- got %ld states from queue\n", core_id, nstates_get); } } extern void give_up(int); extern void Read_Queue(int); void mem_get(void) { SM_frame *f; int is_parent; #if defined(MA) && !defined(SEP_STATE) #error MA without SEP_STATE is not supported with multi-core #endif #ifdef BFS #error instead of -DNCORE -DBFS use -DBFS_PAR #endif #ifdef SC #error SC is not supported with multi-core #endif init_shm(); /* we are single threaded when this starts */ if (core_id == 0 && verbose) { printf("cpu0: step 4: calling fork()\n"); } fflush(stdout); /* if NCORE > 1 the child or the parent should fork N-1 more times * the parent is the only process with core_id == 0 and is_parent > 0 * the workers have is_parent = 0 and core_id = 1..NCORE-1 */ if (core_id == 0) { worker_pids[0] = getpid(); /* for completeness */ while (++core_id < NCORE) /* first worker sees core_id = 1 */ { is_parent = fork(); if (is_parent == -1) { Uerror("fork failed"); } if (is_parent == 0) /* this is a worker process */ { if (proxy_pid == core_id) /* always non-zero */ { start_proxy("-r", 0); /* no return */ } goto adapt; /* root process continues spawning */ } worker_pids[core_id] = is_parent; } /* note that core_id is now NCORE */ if (proxy_pid > 0 && proxy_pid < NCORE) { proxy_pid_snd = fork(); if (proxy_pid_snd == -1) { Uerror("proxy fork failed"); } if (proxy_pid_snd == 0) { start_proxy("-s", worker_pids[proxy_pid]); /* no return */ } } /* else continue */ if (is_parent > 0) { core_id = 0; /* reset core_id for root process */ } } else /* worker */ { static char db0[16]; /* good for up to 10^6 cores */ static char db1[16]; adapt: tprefix = db0; sprefix = db1; sprintf(tprefix, "cpu%d_trail", core_id); sprintf(sprefix, "cpu%d_rst", core_id); memcnt = 0; /* count only additionally allocated memory */ } signal(SIGINT, give_up); if (proxy_pid == 0) /* not in a cluster setup, pan_proxy must attach */ { rm_shared_segments(); /* mark all shared segments for removal on exit */ } if (verbose) { cpu_printf("starting core_id %d -- pid %d\n", core_id, getpid()); } #if defined(SEP_HEAP) && !defined(SEP_STATE) { int i; volatile sh_Allocater *ptr; ptr = first_pool; for (i = 0; i < NCORE && ptr != NULL; i++) { if (i == core_id) { my_heap = (char *) ptr->dc_arena; my_size = (long) ptr->dc_size; if (verbose) cpu_printf("local heap %ld MB\n", my_size/(1048576)); break; } ptr = ptr->nxt; /* local */ } if (my_heap == NULL) { printf("cpu%d: no local heap\n", core_id); pan_exit(1); } /* else */ #if defined(CYGWIN) || defined(__CYGWIN__) ptr = first_pool; for (i = 0; i < NCORE && ptr != NULL; i++) { ptr = ptr->nxt; /* local */ } dc_shared = ptr; /* any remainder */ #else dc_shared = NULL; /* used all mem for local heaps */ #endif } #endif if (core_id == 0 && !remote_party) { new_state(); /* cpu0 explores root */ if (verbose) cpu_printf("done with 1st dfs, nstates %g (put %d states), read q\n", nstates, nstates_put); dfs_phase2 = 1; } Read_Queue(core_id); /* all cores */ if (verbose) { cpu_printf("put %6d states into queue -- got %6d\n", nstates_put, nstates_get); } if (proxy_pid != 0) { rm_shared_segments(); } done = 1; wrapup(); exit(0); } #else int unpack_state(SM_frame *, int); #endif H_el * grab_shared(int n) { #ifndef SEP_STATE char *rval = (char *) 0; if (n == 0) { printf("cpu%d: grab shared zero\n", core_id); fflush(stdout); return (H_el *) rval; } else if (n&(sizeof(void *)-1)) { n += sizeof(void *)-(n&(sizeof(void *)-1)); /* alignment */ } #ifdef SEP_HEAP /* no locking */ if (my_heap != NULL && my_size > n) { rval = my_heap; my_heap += n; my_size -= n; goto done; } #endif if (!dc_shared) { sudden_stop("pan: out of memory"); } /* another lock is always already in effect when this is called */ /* but not always the same lock -- i.e., on different parts of the hashtable */ enter_critical(GLOBAL_LOCK); /* this must be independently mutex */ #if defined(SEP_HEAP) && !defined(WIN32) && !defined(WIN64) { static int noted = 0; if (!noted) { noted = 1; printf("cpu%d: global heap has %ld bytes left, needed %d\n", core_id, dc_shared?dc_shared->dc_size:0, n); } } #endif #if 0 if (dc_shared->pattern != 1234567) { leave_critical(GLOBAL_LOCK); Uerror("overrun -- memory corruption"); } #endif if (dc_shared->dc_size < n) { if (verbose) { printf("Next Pool %g Mb + %d\n", memcnt/(1048576.), n); } if (dc_shared->nxt == NULL || dc_shared->nxt->dc_arena == NULL || dc_shared->nxt->dc_size < n) { printf("cpu%d: memcnt %g Mb + wanted %d bytes more\n", core_id, memcnt / (1048576.), n); leave_critical(GLOBAL_LOCK); sudden_stop("out of memory -- aborting"); wrapup(); /* exits */ } else { dc_shared = (sh_Allocater *) dc_shared->nxt; } } rval = (char *) dc_shared->dc_arena; dc_shared->dc_arena += n; dc_shared->dc_size -= (long) n; #if 0 if (VVERBOSE) printf("cpu%d grab shared (%d bytes) -- %ld left\n", core_id, n, dc_shared->dc_size); #endif leave_critical(GLOBAL_LOCK); done: memset(rval, 0, n); memcnt += (double) n; return (H_el *) rval; #else return (H_el *) emalloc(n); #endif } SM_frame * Get_Full_Frame(int n) { SM_frame *f; double cnt_start = frame_wait; f = &m_workq[n][prfull[n]]; while (f->m_vsize == 0) /* await full slot LOCK : full frame */ { iam_alive(); #ifndef NGQ #ifndef SAFETY if (!a_cycles || core_id != 0) #endif if (*grcnt > 0) /* accessed outside lock, but safe even if wrong */ { enter_critical(GQ_RD); /* gq - read access */ if (*grcnt > 0) /* could have changed */ { f = &m_workq[NCORE][*grfull]; /* global q */ if (f->m_vsize == 0) { /* writer is still filling the slot */ *gr_writemiss++; f = &m_workq[n][prfull[n]]; /* reset */ } else { *grfull = (*grfull+1) % (GN_FRAMES); enter_critical(GQ_WR); *grcnt = *grcnt - 1; leave_critical(GQ_WR); leave_critical(GQ_RD); return f; } } leave_critical(GQ_RD); } #endif if (frame_wait++ - cnt_start > Delay) { if (0) { cpu_printf("timeout on q%d -- %u -- query %d\n", n, f, query_in_progress); } return (SM_frame *) 0; /* timeout */ } } iam_alive(); if (VVERBOSE) cpu_printf("got frame from q%d\n", n); prfull[n] = (prfull[n] + 1) % (LN_FRAMES); enter_critical(QLOCK(n)); prcnt[n]--; /* lock out increments */ leave_critical(QLOCK(n)); return f; } SM_frame * Get_Free_Frame(int n) { SM_frame *f; double cnt_start = free_wait; if (VVERBOSE) { cpu_printf("get free frame from q%d\n", n); } if (n == NCORE) /* global q */ { f = &(m_workq[n][lrfree]); } else { f = &(m_workq[n][prfree[n]]); } while (f->m_vsize != 0) /* await free slot LOCK : free slot */ { iam_alive(); if (free_wait++ - cnt_start > OneSecond) { if (verbose) { cpu_printf("timeout waiting for free slot q%d\n", n); } cnt_start = free_wait; if (someone_crashed(1)) { printf("cpu%d: search terminated\n", core_id); sudden_stop("get free frame"); pan_exit(1); } } } if (n != NCORE) { prfree[n] = (prfree[n] + 1) % (LN_FRAMES); enter_critical(QLOCK(n)); prcnt[n]++; /* lock out decrements */ if (prmax[n] < prcnt[n]) { prmax[n] = prcnt[n]; } leave_critical(QLOCK(n)); } return f; } #ifndef NGQ int GlobalQ_HasRoom(void) { int rval = 0; gq_tries++; if (*grcnt < GN_FRAMES) /* there seems to be room */ { enter_critical(GQ_WR); /* gq write access */ if (*grcnt < GN_FRAMES) { if (m_workq[NCORE][*grfree].m_vsize != 0) { /* can happen if reader is slow emptying slot */ *gr_readmiss++; goto out; /* dont wait: release lock and return */ } lrfree = *grfree; /* Get_Free_Frame use lrfree in this mode */ *grfree = (*grfree + 1) % GN_FRAMES; *grcnt = *grcnt + 1; /* count nr of slots filled -- no additional lock needed */ if (*grmax < *grcnt) *grmax = *grcnt; leave_critical(GQ_WR); /* for short lock duration */ gq_hasroom++; mem_put(NCORE); /* copy state into reserved slot */ rval = 1; /* successfull handoff */ } else { gq_hasnoroom++; out: leave_critical(GQ_WR); } } return rval; } #endif int unpack_state(SM_frame *f, int from_q) { int i, j; static H_el D_State; if (f->m_vsize > 0) { boq = f->m_boq; if (boq > 256) { cpu_printf("saw control %d, expected state\n", boq); return 0; } vsize = f->m_vsize; correct: memcpy((uchar *) &now, (uchar *) f->m_now, vsize); #if !defined(NOCOMP) && !defined(HC) for (i = j = 0; i < VMAX; i++, j = (j+1)%8) { Mask[i] = (f->m_mask[i/8] & (1<<j)) ? 1 : 0; } #endif if (now._nr_pr > 0) { memcpy((uchar *) proc_offset, (uchar *) f->m_p_offset, now._nr_pr * sizeof(OFFT)); memcpy((uchar *) proc_skip, (uchar *) f->m_p_skip, now._nr_pr * sizeof(uchar)); } if (now._nr_qs > 0) { memcpy((uchar *) q_offset, (uchar *) f->m_q_offset, now._nr_qs * sizeof(OFFT)); memcpy((uchar *) q_skip, (uchar *) f->m_q_skip, now._nr_qs * sizeof(uchar)); } #ifndef NOVSZ if (vsize != now._vsz) { cpu_printf("vsize %d != now._vsz %d (type %d) %d\n", vsize, now._vsz, f->m_boq, f->m_vsize); vsize = now._vsz; goto correct; /* rare event: a race */ } #endif hmax = max(hmax, vsize); if (f != &cur_Root) { memcpy((uchar *) &cur_Root, (uchar *) f, sizeof(SM_frame)); } if (((now._a_t) & 1) == 1) /* i.e., when starting nested DFS */ { A_depth = depthfound = 0; memcpy((uchar *)&A_Root, (uchar *)&now, vsize); } nr_handoffs = f->nr_handoffs; } else { cpu_printf("pan: state empty\n"); } depth = 0; trpt = &trail[1]; trpt->tau = f->m_tau; trpt->o_pm = f->m_o_pm; (trpt-1)->ostate = &D_State; /* stub */ trpt->ostate = &D_State; #ifdef FULL_TRAIL if (upto > 0) { stack_last[core_id] = (Stack_Tree *) f->m_stack; } #if defined(VERBOSE) if (stack_last[core_id]) { cpu_printf("%d: UNPACK -- SET m_stack %u (%d,%d)\n", depth, stack_last[core_id], stack_last[core_id]->pr, stack_last[core_id]->t_id); } #endif #endif if (!trpt->o_t) { static Trans D_Trans; trpt->o_t = &D_Trans; } #ifdef VERI if ((trpt->tau & 4) != 4) { trpt->tau |= 4; /* the claim moves first */ cpu_printf("warning: trpt was not up to date\n"); } #endif for (i = 0; i < (int) now._nr_pr; i++) { P0 *ptr = (P0 *) pptr(i); #ifndef NP if (accpstate[ptr->_t][ptr->_p]) { trpt->o_pm |= 2; } #else if (progstate[ptr->_t][ptr->_p]) { trpt->o_pm |= 4; } #endif } #ifdef EVENT_TRACE #ifndef NP if (accpstate[EVENT_TRACE][now._event]) { trpt->o_pm |= 2; } #else if (progstate[EVENT_TRACE][now._event]) { trpt->o_pm |= 4; } #endif #endif #if defined(C_States) && (HAS_TRACK==1) /* restore state of tracked C objects */ c_revert((uchar *) &(now.c_state[0])); #if (HAS_STACK==1) c_unstack((uchar *) f->m_c_stack); /* unmatched tracked data */ #endif #endif return 1; } void write_root(void) /* for trail file */ { int fd; if (iterative == 0 && Nr_Trails > 1) sprintf(fnm, "%s%d.%s", TrailFile, Nr_Trails-1, sprefix); else sprintf(fnm, "%s.%s", TrailFile, sprefix); if (cur_Root.m_vsize == 0) { (void) unlink(fnm); /* remove possible old copy */ return; /* its the default initial state */ } if ((fd = creat(fnm, TMODE)) < 0) { char *q; if ((q = strchr(TrailFile, '.'))) { *q = '\0'; /* strip .pml */ if (iterative == 0 && Nr_Trails-1 > 0) sprintf(fnm, "%s%d.%s", TrailFile, Nr_Trails-1, sprefix); else sprintf(fnm, "%s.%s", TrailFile, sprefix); *q = '.'; fd = creat(fnm, TMODE); } if (fd < 0) { cpu_printf("pan: cannot create %s\n", fnm); perror("cause"); return; } } if (write(fd, &cur_Root, sizeof(SM_frame)) != sizeof(SM_frame)) { cpu_printf("pan: error writing %s\n", fnm); } else { cpu_printf("pan: wrote %s\n", fnm); } close(fd); } void set_root(void) { int fd; char *q; char MyFile[512]; char MySuffix[16]; char *ssuffix = "rst"; int try_core = 1; strcpy(MyFile, TrailFile); try_again: if (whichtrail > 0) { sprintf(fnm, "%s%d.%s", MyFile, whichtrail, ssuffix); fd = open(fnm, O_RDONLY, 0); if (fd < 0 && (q = strchr(MyFile, '.'))) { *q = '\0'; /* strip .pml */ sprintf(fnm, "%s%d.%s", MyFile, whichtrail, ssuffix); *q = '.'; fd = open(fnm, O_RDONLY, 0); } } else { sprintf(fnm, "%s.%s", MyFile, ssuffix); fd = open(fnm, O_RDONLY, 0); if (fd < 0 && (q = strchr(MyFile, '.'))) { *q = '\0'; /* strip .pml */ sprintf(fnm, "%s.%s", MyFile, ssuffix); *q = '.'; fd = open(fnm, O_RDONLY, 0); } } if (fd < 0) { if (try_core < NCORE) { ssuffix = MySuffix; sprintf(ssuffix, "cpu%d_rst", try_core++); goto try_again; } cpu_printf("no file '%s.rst' or '%s' (not an error)\n", MyFile, fnm); } else { if (read(fd, &cur_Root, sizeof(SM_frame)) != sizeof(SM_frame)) { cpu_printf("read error %s\n", fnm); close(fd); pan_exit(1); } close(fd); (void) unpack_state(&cur_Root, -2); #ifdef SEP_STATE cpu_printf("partial trail -- last few steps only\n"); #endif cpu_printf("restored root from '%s'\n", fnm); printf("=====State:=====\n"); { int i, j; P0 *z; for (i = 0; i < now._nr_pr; i++) { z = (P0 *)pptr(i); printf("proc %2d (%s) ", i, procname[z->_t]); for (j = 0; src_all[j].src; j++) if (src_all[j].tp == (int) z->_t) { printf(" %s:%d ", PanSource, src_all[j].src[z->_p]); break; } printf("(state %d)\n", z->_p); c_locals(i, z->_t); } c_globals(); } printf("================\n"); } } #ifdef USE_DISK unsigned long dsk_written, dsk_drained; void mem_drain(void); #endif void m_clear_frame(SM_frame *f) { int i, clr_sz = sizeof(SM_results); for (i = 0; i <= _NP_; i++) /* all proctypes */ { clr_sz += NrStates[i]*sizeof(uchar); } memset(f, 0, clr_sz); /* caution if sizeof(SM_results) > sizeof(SM_frame) */ } #define TargetQ_Full(n) (m_workq[n][prfree[n]].m_vsize != 0) #define TargetQ_NotFull(n) (m_workq[n][prfree[n]].m_vsize == 0) int AllQueuesEmpty(void) { int q; #ifndef NGQ if (*grcnt != 0) { return 0; } #endif for (q = 0; q < NCORE; q++) { if (prcnt[q] != 0) { return 0; } } return 1; } void Read_Queue(int q) { SM_frame *f, *of; int remember, target_q; SM_results *r; double patience = 0.0; target_q = (q + 1) % NCORE; for (;;) { f = Get_Full_Frame(q); if (!f) /* 1 second timeout -- and trigger for Query */ { if (someone_crashed(2)) { printf("cpu%d: search terminated [code %d]\n", core_id, search_terminated?*search_terminated:-1); sudden_stop(""); pan_exit(1); } #ifdef TESTING /* to profile with cc -pg and gprof pan.exe -- set handoff depth beyond maxdepth */ exit(0); #endif remember = *grfree; if (core_id == 0 /* root can initiate termination */ && remote_party == 0 /* and only the original root */ && query_in_progress == 0 /* unless its already in progress */ && AllQueuesEmpty()) { f = Get_Free_Frame(target_q); query_in_progress = 1; /* only root process can do this */ if (!f) { Uerror("Fatal1: no free slot"); } f->m_boq = QUERY; /* initiate Query */ if (verbose) { cpu_printf("snd QUERY to q%d (%d) into slot %d\n", target_q, nstates_get + 1, prfree[target_q]-1); } f->m_vsize = remember + 1; /* number will not change unless we receive more states */ } else if (patience++ > OneHour) /* one hour watchdog timer */ { cpu_printf("timeout -- giving up\n"); sudden_stop("queue timeout"); pan_exit(1); } if (0) cpu_printf("timed out -- try again\n"); continue; } patience = 0.0; /* reset watchdog */ if (f->m_boq == QUERY) { if (verbose) { cpu_printf("got QUERY on q%d (%d <> %d) from slot %d\n", q, f->m_vsize, nstates_put + 1, prfull[q]-1); snapshot(); } remember = f->m_vsize; f->m_vsize = 0; /* release slot */ if (core_id == 0 && remote_party == 0) /* original root cpu0 */ { if (query_in_progress == 1 /* didn't send more states in the interim */ && *grfree + 1 == remember) /* no action on global queue meanwhile */ { if (verbose) cpu_printf("Termination detected\n"); if (TargetQ_Full(target_q)) { if (verbose) cpu_printf("warning: target q is full\n"); } f = Get_Free_Frame(target_q); if (!f) { Uerror("Fatal2: no free slot"); } m_clear_frame(f); f->m_boq = QUIT; /* send final Quit, collect stats */ f->m_vsize = 111; /* anything non-zero will do */ if (verbose) cpu_printf("put QUIT on q%d\n", target_q); } else { if (verbose) cpu_printf("Stale Query\n"); #ifdef USE_DISK mem_drain(); #endif } query_in_progress = 0; } else { if (TargetQ_Full(target_q)) { if (verbose) cpu_printf("warning: forward query - target q full\n"); } f = Get_Free_Frame(target_q); if (verbose) cpu_printf("snd QUERY response to q%d (%d <> %d) in slot %d\n", target_q, remember, *grfree + 1, prfree[target_q]-1); if (!f) { Uerror("Fatal4: no free slot"); } if (*grfree + 1 == remember) /* no action on global queue */ { f->m_boq = QUERY; /* forward query, to root */ f->m_vsize = remember; } else { f->m_boq = QUERY_F; /* no match -- busy */ f->m_vsize = 112; /* anything non-zero */ #ifdef USE_DISK if (dsk_written != dsk_drained) { mem_drain(); } #endif } } continue; } if (f->m_boq == QUERY_F) { if (verbose) { cpu_printf("got QUERY_F on q%d from slot %d\n", q, prfull[q]-1); } f->m_vsize = 0; /* release slot */ if (core_id == 0 && remote_party == 0) /* original root cpu0 */ { if (verbose) cpu_printf("No Match on Query\n"); query_in_progress = 0; } else { if (TargetQ_Full(target_q)) { if (verbose) cpu_printf("warning: forwarding query_f, target queue full\n"); } f = Get_Free_Frame(target_q); if (verbose) cpu_printf("forward QUERY_F to q%d into slot %d\n", target_q, prfree[target_q]-1); if (!f) { Uerror("Fatal5: no free slot"); } f->m_boq = QUERY_F; /* cannot terminate yet */ f->m_vsize = 113; /* anything non-zero */ } #ifdef USE_DISK if (dsk_written != dsk_drained) { mem_drain(); } #endif continue; } if (f->m_boq == QUIT) { if (0) cpu_printf("done -- local memcnt %g Mb\n", memcnt/(1048576.)); retrieve_info((SM_results *) f); /* collect and combine stats */ if (verbose) { cpu_printf("received Quit\n"); snapshot(); } f->m_vsize = 0; /* release incoming slot */ if (core_id != 0) { f = Get_Free_Frame(target_q); /* new outgoing slot */ if (!f) { Uerror("Fatal6: no free slot"); } m_clear_frame(f); /* start with zeroed stats */ record_info((SM_results *) f); f->m_boq = QUIT; /* forward combined results */ f->m_vsize = 114; /* anything non-zero */ if (verbose>1) cpu_printf("fwd Results to q%d\n", target_q); } break; /* successful termination */ } /* else: 0<= boq <= 255, means STATE transfer */ if (unpack_state(f, q) != 0) { nstates_get++; f->m_vsize = 0; /* release slot */ if (VVERBOSE) cpu_printf("Got state\n"); if (search_terminated != NULL && *search_terminated == 0) { new_state(); /* explore successors */ memset((uchar *) &cur_Root, 0, sizeof(SM_frame)); /* avoid confusion */ } else { pan_exit(0); } } else { pan_exit(0); } } if (verbose) cpu_printf("done got %d put %d\n", nstates_get, nstates_put); sleep_report(); } void give_up(int unused_x) { if (search_terminated != NULL) { *search_terminated |= 32; /* give_up */ } if (!writing_trail) { was_interrupted = 1; snapshot(); cpu_printf("Give Up\n"); sleep_report(); pan_exit(1); } else /* we are already terminating */ { cpu_printf("SIGINT\n"); } } void check_overkill(void) { vmax_seen = (vmax_seen + 7)/ 8; vmax_seen *= 8; /* round up to a multiple of 8 */ if (core_id == 0 && !remote_party && nstates_put > 0 && VMAX - vmax_seen > 8) { #ifdef BITSTATE printf("cpu0: max VMAX value seen in this run: "); #else printf("cpu0: recommend recompiling with "); #endif printf("-DVMAX=%d\n", vmax_seen); } } void mem_put(int q) /* handoff state to other cpu, workq q */ { SM_frame *f; int i, j; if (vsize > VMAX) { vsize = (vsize + 7)/8; vsize *= 8; /* round up */ printf("pan: recompile with -DVMAX=N with N >= %d\n", (int) vsize); Uerror("aborting"); } if (now._nr_pr > PMAX) { printf("pan: recompile with -DPMAX=N with N >= %d\n", now._nr_pr); Uerror("aborting"); } if (now._nr_qs > QMAX) { printf("pan: recompile with -DQMAX=N with N >= %d\n", now._nr_qs); Uerror("aborting"); } if (vsize > vmax_seen) vmax_seen = vsize; if (now._nr_pr > pmax_seen) pmax_seen = now._nr_pr; if (now._nr_qs > qmax_seen) qmax_seen = now._nr_qs; f = Get_Free_Frame(q); /* not called in likely deadlock states */ if (!f) { Uerror("Fatal3: no free slot"); } if (VVERBOSE) cpu_printf("putting state into q%d\n", q); memcpy((uchar *) f->m_now, (uchar *) &now, vsize); #if !defined(NOCOMP) && !defined(HC) memset((uchar *) f->m_mask, 0, (VMAX+7)/8 * sizeof(char)); for (i = j = 0; i < VMAX; i++, j = (j+1)%8) { if (Mask[i]) { f->m_mask[i/8] |= (1<<j); } } #endif if (now._nr_pr > 0) { memcpy((uchar *) f->m_p_offset, (uchar *) proc_offset, now._nr_pr * sizeof(OFFT)); memcpy((uchar *) f->m_p_skip, (uchar *) proc_skip, now._nr_pr * sizeof(uchar)); } if (now._nr_qs > 0) { memcpy((uchar *) f->m_q_offset, (uchar *) q_offset, now._nr_qs * sizeof(OFFT)); memcpy((uchar *) f->m_q_skip, (uchar *) q_skip, now._nr_qs * sizeof(uchar)); } #if defined(C_States) && (HAS_TRACK==1) && (HAS_STACK==1) c_stack((uchar *) f->m_c_stack); /* save unmatched tracked data */ #endif #ifdef FULL_TRAIL f->m_stack = stack_last[core_id]; #endif f->nr_handoffs = nr_handoffs+1; f->m_tau = trpt->tau; f->m_o_pm = trpt->o_pm; f->m_boq = boq; f->m_vsize = vsize; /* must come last - now the other cpu can see it */ if (query_in_progress == 1) query_in_progress = 2; /* make sure we know, if a query makes the rounds */ nstates_put++; } #ifdef USE_DISK int Dsk_W_Nr, Dsk_R_Nr; int dsk_file = -1, dsk_read = -1; unsigned long dsk_written, dsk_drained; char dsk_name[512]; #ifndef BFS_DISK #if defined(WIN32) || defined(WIN64) #define RFLAGS (O_RDONLY|O_BINARY) #define WFLAGS (O_CREAT|O_WRONLY|O_TRUNC|O_BINARY) #else #define RFLAGS (O_RDONLY) #define WFLAGS (O_CREAT|O_WRONLY|O_TRUNC) #endif #endif void dsk_stats(void) { int i; if (dsk_written > 0) { cpu_printf("dsk_written %d states in %d files\ncpu%d: dsk_drained %6d states\n", dsk_written, Dsk_W_Nr, core_id, dsk_drained); close(dsk_read); close(dsk_file); for (i = 0; i < Dsk_W_Nr; i++) { sprintf(dsk_name, "Q%.3d_%.3d.tmp", i, core_id); unlink(dsk_name); } } } void mem_drain(void) { SM_frame *f, g; int q = (core_id + 1) % NCORE; /* target q */ int sz; if (dsk_read < 0 || dsk_written <= dsk_drained) { return; } while (dsk_written > dsk_drained && TargetQ_NotFull(q)) { f = Get_Free_Frame(q); if (!f) { Uerror("Fatal: unhandled condition"); } if ((dsk_drained+1)%MAX_DSK_FILE == 0) /* 100K states max per file */ { (void) close(dsk_read); /* close current read handle */ sprintf(dsk_name, "Q%.3d_%.3d.tmp", Dsk_R_Nr++, core_id); (void) unlink(dsk_name); /* remove current file */ sprintf(dsk_name, "Q%.3d_%.3d.tmp", Dsk_R_Nr, core_id); cpu_printf("reading %s\n", dsk_name); dsk_read = open(dsk_name, RFLAGS); /* open next file */ if (dsk_read < 0) { Uerror("could not open dsk file"); } } if (read(dsk_read, &g, sizeof(SM_frame)) != sizeof(SM_frame)) { Uerror("bad dsk file read"); } sz = g.m_vsize; g.m_vsize = 0; memcpy(f, &g, sizeof(SM_frame)); f->m_vsize = sz; /* last */ dsk_drained++; } } void mem_file(void) { SM_frame f; int i, j, q = (core_id + 1) % NCORE; /* target q */ if (vsize > VMAX) { printf("pan: recompile with -DVMAX=N with N >= %d\n", vsize); Uerror("aborting"); } if (now._nr_pr > PMAX) { printf("pan: recompile with -DPMAX=N with N >= %d\n", now._nr_pr); Uerror("aborting"); } if (now._nr_qs > QMAX) { printf("pan: recompile with -DQMAX=N with N >= %d\n", now._nr_qs); Uerror("aborting"); } if (VVERBOSE) cpu_printf("filing state for q%d\n", q); memcpy((uchar *) f.m_now, (uchar *) &now, vsize); #if !defined(NOCOMP) && !defined(HC) memset((uchar *) f.m_mask, 0, (VMAX+7)/8 * sizeof(char)); for (i = j = 0; i < VMAX; i++, j = (j+1)%8) { if (Mask[i]) { f.m_mask[i/8] |= (1<<j); } } #endif if (now._nr_pr > 0) { memcpy((uchar *)f.m_p_offset, (uchar *)proc_offset, now._nr_pr*sizeof(OFFT)); memcpy((uchar *)f.m_p_skip, (uchar *)proc_skip, now._nr_pr*sizeof(uchar)); } if (now._nr_qs > 0) { memcpy((uchar *) f.m_q_offset, (uchar *) q_offset, now._nr_qs*sizeof(OFFT)); memcpy((uchar *) f.m_q_skip, (uchar *) q_skip, now._nr_qs*sizeof(uchar)); } #if defined(C_States) && (HAS_TRACK==1) && (HAS_STACK==1) c_stack((uchar *) f.m_c_stack); /* save unmatched tracked data */ #endif #ifdef FULL_TRAIL f.m_stack = stack_last[core_id]; #endif f.nr_handoffs = nr_handoffs+1; f.m_tau = trpt->tau; f.m_o_pm = trpt->o_pm; f.m_boq = boq; f.m_vsize = vsize; if (query_in_progress == 1) { query_in_progress = 2; } if (dsk_file < 0) { sprintf(dsk_name, "Q%.3d_%.3d.tmp", Dsk_W_Nr, core_id); dsk_file = open(dsk_name, WFLAGS, 0644); dsk_read = open(dsk_name, RFLAGS); if (dsk_file < 0 || dsk_read < 0) { cpu_printf("File: <%s>\n", dsk_name); Uerror("cannot open diskfile"); } Dsk_W_Nr++; /* nr of next file to open */ cpu_printf("created temporary diskfile %s\n", dsk_name); } else if ((dsk_written+1)%MAX_DSK_FILE == 0) { close(dsk_file); /* close write handle */ sprintf(dsk_name, "Q%.3d_%.3d.tmp", Dsk_W_Nr++, core_id); dsk_file = open(dsk_name, WFLAGS, 0644); if (dsk_file < 0) { cpu_printf("File: <%s>\n", dsk_name); Uerror("aborting: cannot open new diskfile"); } cpu_printf("created temporary diskfile %s\n", dsk_name); } if (write(dsk_file, &f, sizeof(SM_frame)) != sizeof(SM_frame)) { Uerror("aborting -- disk write failed (disk full?)"); } nstates_put++; dsk_written++; } #endif int mem_hand_off(void) { if (search_terminated == NULL || *search_terminated != 0) /* not a full crash check */ { pan_exit(0); } iam_alive(); /* on every transition of Down */ #ifdef USE_DISK mem_drain(); /* maybe call this also on every Up */ #endif if (depth > z_handoff /* above handoff limit */ #ifndef SAFETY && !a_cycles /* not in liveness mode */ #endif #if SYNC && boq == -1 /* not mid-rv */ #endif #ifdef VERI && (trpt->tau&4) /* claim moves first */ && !((trpt-1)->tau&128) /* not a stutter move */ #endif && !(trpt->tau&8)) /* not an atomic move */ { int q = (core_id + 1) % NCORE; /* circular handoff */ #ifdef GENEROUS if (prcnt[q] < LN_FRAMES) #else if (TargetQ_NotFull(q) && (dfs_phase2 == 0 || prcnt[core_id] > 0)) #endif { mem_put(q); return 1; } { int rval; #ifndef NGQ rval = GlobalQ_HasRoom(); #else rval = 0; #endif #ifdef USE_DISK if (rval == 0) { void mem_file(void); mem_file(); rval = 1; } #endif return rval; } } return 0; /* i.e., no handoff */ } void mem_put_acc(void) /* liveness mode */ { int q = (core_id + 1) % NCORE; if (search_terminated == NULL || *search_terminated != 0) { pan_exit(0); } #ifdef USE_DISK mem_drain(); #endif /* some tortured use of preprocessing: */ #if !defined(NGQ) || defined(USE_DISK) if (TargetQ_Full(q)) { #endif #ifndef NGQ if (GlobalQ_HasRoom()) { return; } #endif #ifdef USE_DISK mem_file(); } else #else #if !defined(NGQ) || defined(USE_DISK) } #endif #endif { mem_put(q); } } #if defined(WIN32) || defined(WIN64) void init_shm(void) /* initialize shared work-queues */ { char key[512]; int n, m; int must_exit = 0; if (core_id == 0 && verbose) { printf("cpu0: step 3: allocate shared work-queues %g Mb\n", ((double) NCORE * LWQ_SIZE + GWQ_SIZE) / (1048576.)); } for (m = 0; m < NR_QS; m++) /* last q is global 1 */ { double qsize = (m == NCORE) ? GWQ_SIZE : LWQ_SIZE; sprintf(key, "Global\\pan_%s_%.3d", PanSource, m); if (core_id == 0) { shmid[m] = CreateFileMapping( INVALID_HANDLE_VALUE, /* use paging file */ NULL, /* default security */ PAGE_READWRITE, /* access permissions */ 0, /* high-order 4 bytes */ qsize, /* low-order bytes, size in bytes */ key); /* name */ } else /* worker nodes just open these segments */ { shmid[m] = OpenFileMapping( FILE_MAP_ALL_ACCESS, /* read/write access */ FALSE, /* children do not inherit handle */ key); } if (shmid[m] == NULL) { fprintf(stderr, "cpu%d: could not create or open shared queues\n", core_id); must_exit = 1; break; } /* attach: */ shared_mem[m] = (char *) MapViewOfFile(shmid[m], FILE_MAP_ALL_ACCESS, 0, 0, 0); if (shared_mem[m] == NULL) { fprintf(stderr, "cpu%d: cannot attach shared q%d (%d Mb)\n", core_id, m+1, (int) (qsize/(1048576.))); must_exit = 1; break; } memcnt += qsize; m_workq[m] = (SM_frame *) shared_mem[m]; if (core_id == 0) { int nframes = (m == NCORE) ? GN_FRAMES : LN_FRAMES; for (n = 0; n < nframes; n++) { m_workq[m][n].m_vsize = 0; m_workq[m][n].m_boq = 0; } } } if (must_exit) { fprintf(stderr, "pan: check './pan --' for usage details\n"); pan_exit(1); /* calls cleanup_shm */ } } static uchar * prep_shmid_S(size_t n) /* either sets SS or H_tab, WIN32/WIN64 */ { char *rval; #ifndef SEP_STATE char key[512]; if (verbose && core_id == 0) { #ifdef BITSTATE printf("cpu0: step 1: allocate shared bitstate %g Mb\n", (double) n / (1048576.)); #else printf("cpu0: step 1: allocate shared hastable %g Mb\n", (double) n / (1048576.)); #endif } #ifdef MEMLIM if (memcnt + (double) n > memlim) { printf("cpu%d: S %8g + %d Kb exceeds memory limit of %8g Mb\n", core_id, memcnt/1024., n/1024, memlim/(1048576.)); printf("cpu%d: insufficient memory -- aborting\n", core_id); exit(1); } #endif /* make key different from queues: */ sprintf(key, "Global\\pan_%s_%.3d", PanSource, NCORE+2); /* different from qs */ if (core_id == 0) /* root */ { shmid_S = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, #ifdef WIN64 PAGE_READWRITE, (n>>32), (n & 0xffffffff), key); #else PAGE_READWRITE, 0, n, key); #endif memcnt += (double) n; } else /* worker */ { shmid_S = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, key); } if (shmid_S == NULL) { #ifdef BITSTATE fprintf(stderr, "cpu%d: cannot %s shared bitstate", core_id, core_id?"open":"create"); #else fprintf(stderr, "cpu%d: cannot %s shared hashtable", core_id, core_id?"open":"create"); #endif fprintf(stderr, "pan: check './pan --' for usage details\n"); pan_exit(1); } rval = (char *) MapViewOfFile(shmid_S, FILE_MAP_ALL_ACCESS, 0, 0, 0); /* attach */ if ((char *) rval == NULL) { fprintf(stderr, "cpu%d: cannot attach shared bitstate or hashtable\n", core_id); fprintf(stderr, "pan: check './pan --' for usage details\n"); pan_exit(1); } #else rval = (char *) emalloc(n); #endif return (uchar *) rval; } static uchar * prep_state_mem(size_t n) /* WIN32/WIN64 sets memory arena for states */ { char *rval; char key[512]; static int cnt = 3; /* start larger than earlier ftok calls */ if (verbose && core_id == 0) { printf("cpu0: step 2+: pre-allocate memory arena %d of %g Mb\n", cnt-3, (double) n / (1048576.)); } #ifdef MEMLIM if (memcnt + (double) n > memlim) { printf("cpu%d: error: M %.0f + %.0f exceeds memory limit of %.0f Kb\n", core_id, memcnt/1024.0, (double) n/1024.0, memlim/1024.0); return NULL; } #endif sprintf(key, "Global\\pan_%s_%.3d", PanSource, NCORE+cnt); cnt++; if (core_id == 0) { shmid_M = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, #ifdef WIN64 PAGE_READWRITE, (n>>32), (n & 0xffffffff), key); #else PAGE_READWRITE, 0, n, key); #endif } else { shmid_M = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, key); } if (shmid_M == NULL) { printf("cpu%d: failed to get pool of shared memory nr %d of size %d\n", core_id, cnt-3, n); printf("pan: check './pan --' for usage details\n"); return NULL; } rval = (char *) MapViewOfFile(shmid_M, FILE_MAP_ALL_ACCESS, 0, 0, 0); /* attach */ if (rval == NULL) { printf("cpu%d: failed to attach pool of shared memory nr %d of size %d\n", core_id, cnt-3, n); return NULL; } return (uchar *) rval; } void init_HT(unsigned long n) /* WIN32/WIN64 version */ { volatile char *x; double get_mem; #ifndef SEP_STATE char *dc_mem_start; #endif if (verbose) printf("cpu%d: initialization for Windows\n", core_id); #ifdef SEP_STATE #ifndef MEMLIM if (verbose) { printf("cpu0: steps 0,1: no -DMEMLIM set\n"); } #else if (verbose) printf("cpu0: steps 0,1: -DMEMLIM=%d Mb - (hashtable %g Mb + workqueues %g Mb)\n", MEMLIM, ((double)n/(1048576.)), ((double) NCORE * LWQ_SIZE + GWQ_SIZE)/(1048576.)); #endif get_mem = NCORE * sizeof(double) + (1 + CS_NR) * sizeof(void *)+ 4*sizeof(void *) + 2*sizeof(double); /* NCORE * is_alive + search_terminated + CS_NR * sh_lock + 6 gr vars */ get_mem += 4 * NCORE * sizeof(void *); #ifdef FULL_TRAIL get_mem += (NCORE) * sizeof(Stack_Tree *); /* NCORE * stack_last */ #endif x = (volatile char *) prep_state_mem((size_t) get_mem); shmid_X = (void *) x; if (x == NULL) { printf("cpu0: could not allocate shared memory, see ./pan --\n"); exit(1); } search_terminated = (volatile unsigned int *) x; /* comes first */ x += sizeof(void *); /* maintain alignment */ is_alive = (volatile double *) x; x += NCORE * sizeof(double); sh_lock = (volatile int *) x; x += CS_NR * sizeof(void *); /* allow 1 word per entry */ grfree = (volatile int *) x; x += sizeof(void *); grfull = (volatile int *) x; x += sizeof(void *); grcnt = (volatile int *) x; x += sizeof(void *); grmax = (volatile int *) x; x += sizeof(void *); prfree = (volatile int *) x; x += NCORE * sizeof(void *); prfull = (volatile int *) x; x += NCORE * sizeof(void *); prcnt = (volatile int *) x; x += NCORE * sizeof(void *); prmax = (volatile int *) x; x += NCORE * sizeof(void *); gr_readmiss = (volatile double *) x; x += sizeof(double); gr_writemiss = (volatile double *) x; x += sizeof(double); #ifdef FULL_TRAIL stack_last = (volatile Stack_Tree **) x; x += NCORE * sizeof(Stack_Tree *); #endif #ifndef BITSTATE H_tab = (H_el **) emalloc(n); #endif #else #ifndef MEMLIM #warning MEMLIM not set #define MEMLIM (2048) #endif if (core_id == 0 && verbose) printf("cpu0: step 0: -DMEMLIM=%d Mb - (hashtable %g Mb + workqueues %g Mb) = %g Mb for state storage\n", MEMLIM, ((double)n/(1048576.)), ((double) NCORE * LWQ_SIZE + GWQ_SIZE)/(1048576.), (memlim - memcnt - (double) n - ((double) NCORE * LWQ_SIZE + GWQ_SIZE))/(1048576.)); #ifndef BITSTATE H_tab = (H_el **) prep_shmid_S((size_t) n); /* hash_table */ #endif get_mem = memlim - memcnt - ((double) NCORE) * LWQ_SIZE - GWQ_SIZE; if (get_mem <= 0) { Uerror("internal error -- shared state memory"); } if (core_id == 0 && verbose) { printf("cpu0: step 2: shared state memory %g Mb\n", get_mem/(1048576.)); } x = dc_mem_start = (char *) prep_state_mem((size_t) get_mem); /* for states */ if (x == NULL) { printf("cpu%d: insufficient memory -- aborting\n", core_id); exit(1); } search_terminated = (volatile unsigned int *) x; /* comes first */ x += sizeof(void *); /* maintain alignment */ is_alive = (volatile double *) x; x += NCORE * sizeof(double); sh_lock = (volatile int *) x; x += CS_NR * sizeof(int); grfree = (volatile int *) x; x += sizeof(void *); grfull = (volatile int *) x; x += sizeof(void *); grcnt = (volatile int *) x; x += sizeof(void *); grmax = (volatile int *) x; x += sizeof(void *); prfree = (volatile int *) x; x += NCORE * sizeof(void *); prfull = (volatile int *) x; x += NCORE * sizeof(void *); prcnt = (volatile int *) x; x += NCORE * sizeof(void *); prmax = (volatile int *) x; x += NCORE * sizeof(void *); gr_readmiss = (volatile double *) x; x += sizeof(double); gr_writemiss = (volatile double *) x; x += sizeof(double); #ifdef FULL_TRAIL stack_last = (volatile Stack_Tree **) x; x += NCORE * sizeof(Stack_Tree *); #endif if (((long)x)&(sizeof(void *)-1)) /* word alignment */ { x += sizeof(void *)-(((long)x)&(sizeof(void *)-1)); /* 64-bit align */ } #ifdef COLLAPSE ncomps = (unsigned long *) x; x += (256+2) * sizeof(unsigned long); #endif dc_shared = (sh_Allocater *) x; /* in shared memory */ x += sizeof(sh_Allocater); if (core_id == 0) /* root only */ { dc_shared->dc_id = shmid_M; dc_shared->dc_start = (void *) dc_mem_start; dc_shared->dc_arena = x; dc_shared->pattern = 1234567; dc_shared->dc_size = (long) get_mem - (long) (x - dc_mem_start); dc_shared->nxt = NULL; } #endif } #if defined(WIN32) || defined(WIN64) || defined(__i386__) || defined(__x86_64__) extern BOOLEAN InterlockedBitTestAndSet(LONG volatile* Base, LONG Bit); int tas(volatile LONG *s) { return InterlockedBitTestAndSet(s, 1); } #else #error missing definition of test and set operation for this platform #endif void cleanup_shm(int val) { int m; static int nibis = 0; if (nibis != 0) { printf("cpu%d: Redundant call to cleanup_shm(%d)\n", core_id, val); return; } else { nibis = 1; } if (search_terminated != NULL) { *search_terminated |= 16; /* cleanup_shm */ } for (m = 0; m < NR_QS; m++) { if (shmid[m] != NULL) { UnmapViewOfFile((char *) shared_mem[m]); CloseHandle(shmid[m]); } } #ifdef SEP_STATE UnmapViewOfFile((void *) shmid_X); CloseHandle((void *) shmid_M); #else #ifdef BITSTATE if (shmid_S != NULL) { UnmapViewOfFile(SS); CloseHandle(shmid_S); } #else if (core_id == 0 && verbose) { printf("cpu0: done, %ld Mb of shared state memory left\n", dc_shared->dc_size / (long)(1048576)); } if (shmid_S != NULL) { UnmapViewOfFile(H_tab); CloseHandle(shmid_S); } shmid_M = (void *) (dc_shared->dc_id); UnmapViewOfFile((char *) dc_shared->dc_start); CloseHandle(shmid_M); #endif #endif /* detached from shared memory - so cannot use cpu_printf */ if (verbose) { printf("cpu%d: done -- got %d states from queue\n", core_id, nstates_get); } } void mem_get(void) { SM_frame *f; int is_parent; #if defined(MA) && !defined(SEP_STATE) #error MA requires SEP_STATE in multi-core mode #endif #ifdef BFS #error instead of -DNCORE -DBFS use -DBFS_PAR #endif #ifdef SC #error SC is not supported in multi-core mode #endif init_shm(); /* we are single threaded when this starts */ signal(SIGINT, give_up); /* windows control-c interrupt */ if (core_id == 0 && verbose) { printf("cpu0: step 4: creating additional workers (proxy %d)\n", proxy_pid); } #if 0 if NCORE > 1 the child or the parent should fork N-1 more times the parent is the only process with core_id == 0 and is_parent > 0 the others (workers) have is_parent = 0 and core_id = 1..NCORE-1 #endif if (core_id == 0) /* root starts up the workers */ { worker_pids[0] = (DWORD) getpid(); /* for completeness */ while (++core_id < NCORE) /* first worker sees core_id = 1 */ { char cmdline[64]; STARTUPINFO si = { sizeof(si) }; PROCESS_INFORMATION pi; if (proxy_pid == core_id) /* always non-zero */ { sprintf(cmdline, "pan_proxy.exe -r %s-Q%d -Z%d", o_cmdline, getpid(), core_id); } else { sprintf(cmdline, "pan.exe %s-Q%d -Z%d", o_cmdline, getpid(), core_id); } if (verbose) printf("cpu%d: spawn %s\n", core_id, cmdline); is_parent = CreateProcess(0, cmdline, 0, 0, FALSE, 0, 0, 0, &si, &pi); if (is_parent == 0) { Uerror("fork failed"); } worker_pids[core_id] = pi.dwProcessId; worker_handles[core_id] = pi.hProcess; if (verbose) { cpu_printf("created core %d, pid %d\n", core_id, pi.dwProcessId); } if (proxy_pid == core_id) /* we just created the receive half */ { /* add proxy send, store pid in proxy_pid_snd */ sprintf(cmdline, "pan_proxy.exe -s %s-Q%d -Z%d -Y%d", o_cmdline, getpid(), core_id, worker_pids[proxy_pid]); if (verbose) printf("cpu%d: spawn %s\n", core_id, cmdline); is_parent = CreateProcess(0, cmdline, 0,0, FALSE, 0,0,0, &si, &pi); if (is_parent == 0) { Uerror("fork failed"); } proxy_pid_snd = pi.dwProcessId; proxy_handle_snd = pi.hProcess; if (verbose) { cpu_printf("created core %d, pid %d (send proxy)\n", core_id, pi.dwProcessId); } } } core_id = 0; /* reset core_id for root process */ } else /* worker */ { static char db0[16]; /* good for up to 10^6 cores */ static char db1[16]; tprefix = db0; sprefix = db1; sprintf(tprefix, "cpu%d_trail", core_id); /* avoid conflicts on file access */ sprintf(sprefix, "cpu%d_rst", core_id); memcnt = 0; /* count only additionally allocated memory */ } if (verbose) { cpu_printf("starting core_id %d -- pid %d\n", core_id, getpid()); } if (core_id == 0 && !remote_party) { new_state(); /* root starts the search */ if (verbose) cpu_printf("done with 1st dfs, nstates %g (put %d states), start reading q\n", nstates, nstates_put); dfs_phase2 = 1; } Read_Queue(core_id); /* all cores */ if (verbose) { cpu_printf("put %6d states into queue -- got %6d\n", nstates_put, nstates_get); } done = 1; wrapup(); exit(0); } #endif #ifdef BITSTATE void init_SS(unsigned long n) { SS = (uchar *) prep_shmid_S((size_t) n); init_HT(0L); } #endif #endif clock_t start_time; #if NCORE>1 clock_t crash_stamp; #endif #if !defined(WIN32) && !defined(WIN64) struct tms start_tm; #endif #if SYNC extern int q_zero(int); extern int not_RV(int); #endif void start_timer(void) { #if defined(WIN32) || defined(WIN64) start_time = clock(); #else start_time = times(&start_tm); #endif } double delta_time; void report_time(void) { printf("\npan: elapsed time %.3g seconds\n", delta_time); if (delta_time > 0.01) { printf("pan: rate %9.8g states/second\n", nstates/delta_time); if (verbose) { printf("pan: avg transition delay %.5g usec\n", delta_time/(nstates+truncs)); } } } void stop_timer(int report) { clock_t stop_time; #if !defined(WIN32) && !defined(WIN64) struct tms stop_tm; stop_time = times(&stop_tm); delta_time = ((double) (stop_time - start_time)) / ((double) sysconf(_SC_CLK_TCK)); #else stop_time = clock(); delta_time = ((double) (stop_time - start_time)) / ((double) CLOCKS_PER_SEC); #endif if (readtrail || delta_time < 0.00) return; #if NCORE>1 if (core_id == 0 && nstates > (double) 0) { printf("\ncpu%d: elapsed time %.3g seconds (%g states visited)\n", core_id, delta_time, nstates); if (delta_time > 0.01) { printf("cpu%d: rate %g states/second\n", core_id, nstates/delta_time); } { void check_overkill(void); check_overkill(); } } #else if (report) { report_time(); } #endif } #if NCORE>1 #ifdef T_ALERT double t_alerts[17]; void crash_report(void) { int i; printf("crash alert intervals:\n"); for (i = 0; i < 17; i++) { printf("%d\t%g\n", i, t_alerts[i]); } } #endif void crash_reset(void) { /* false alarm */ if (crash_stamp != (clock_t) 0) { #ifdef T_ALERT double delta_time; int i; #if defined(WIN32) || defined(WIN64) delta_time = ((double) (clock() - crash_stamp)) / ((double) CLOCKS_PER_SEC); #else delta_time = ((double) (times(&start_tm) - crash_stamp)) / ((double) sysconf(_SC_CLK_TCK)); #endif for (i = 0; i < 16; i++) { if (delta_time <= (i*30)) { t_alerts[i] = delta_time; break; } } if (i == 16) t_alerts[i] = delta_time; #endif if (verbose) printf("cpu%d: crash alert off\n", core_id); } crash_stamp = (clock_t) 0; } int crash_test(double maxtime) { double delta_time; if (crash_stamp == (clock_t) 0) { /* start timing */ #if defined(WIN32) || defined(WIN64) crash_stamp = clock(); #else crash_stamp = times(&start_tm); #endif if (verbose) { printf("cpu%d: crash detection\n", core_id); } return 0; } #if defined(WIN32) || defined(WIN64) delta_time = ((double) (clock() - crash_stamp)) / ((double) CLOCKS_PER_SEC); #else delta_time = ((double) (times(&start_tm) - crash_stamp)) / ((double) sysconf(_SC_CLK_TCK)); #endif return (delta_time >= maxtime); } #endif #ifdef BFS_PAR int ncores = 0; #endif void do_the_search(void) { int i; depth = mreached = 0; trpt = &trail[0]; #ifdef VERI trpt->tau |= 4; /* the claim moves first */ #endif for (i = 0; i < (int) now._nr_pr; i++) { P0 *ptr = (P0 *) pptr(i); #ifndef NP if (!(trpt->o_pm&2) && accpstate[ptr->_t][ptr->_p]) { trpt->o_pm |= 2; break; } #else if (!(trpt->o_pm&4) && progstate[ptr->_t][ptr->_p]) { trpt->o_pm |= 4; break; } #endif } #ifdef EVENT_TRACE #ifndef NP if (accpstate[EVENT_TRACE][now._event]) { trpt->o_pm |= 2; } #else if (progstate[EVENT_TRACE][now._event]) { trpt->o_pm |= 4; } #endif #endif #if !defined(NOCOMP) && !defined(HC) Mask[0] = Mask[1] = 1; /* _nr_pr, _nr_qs */ if (!a_cycles) { i = &(now._a_t) - (uchar *) &now; Mask[i] = 1; /* _a_t */ } #ifndef NOFAIR if (!fairness) { int j = 0; i = &(now._cnt[0]) - (uchar *) &now; while (j++ < NFAIR) Mask[i++] = 1; /* _cnt[] */ } #endif #endif #ifndef NOFAIR if (fairness && (a_cycles && (trpt->o_pm&2))) { now._a_t = 2; /* set the A-bit */ now._cnt[0] = now._nr_pr + 1; #ifdef VERBOSE printf("%3ld: fairness Rule 1, cnt=%d, _a_t=%d\n", depth, now._cnt[now._a_t&1], now._a_t); #endif } #endif c_stack_start = (char *) &i; /* meant to be read-only */ #if defined(HAS_CODE) && defined (C_INIT) C_INIT; /* initialization of data that must precede fork() */ c_init_done++; #endif #if defined(C_States) && (HAS_TRACK==1) /* capture initial state of tracked C objects */ c_update((uchar *) &(now.c_state[0])); #endif #ifdef HAS_CODE if (readtrail) getrail(); /* no return */ #endif #ifndef BFS_PAR start_timer(); #endif #ifdef BFS #ifdef BFS_PAR bfs_main(ncores,0); #else bfs(); #endif #else #if defined(C_States) && defined(HAS_STACK) && (HAS_TRACK==1) /* initial state of tracked & unmatched objects */ c_stack((uchar *) &(svtack->c_stack[0])); #endif #if defined(P_RAND) || defined(T_RAND) srand(s_rand+HASH_NR); #endif #if NCORE>1 mem_get(); #else new_state(); /* start 1st DFS */ #endif #endif } #ifdef INLINE_REV uchar do_reverse(Trans *t, short II, uchar M) { uchar _m = M; int tt = (int) ((P0 *)this)->_p; #include BACKWARD_MOVES R999: return _m; } #endif #ifndef INLINE #ifdef EVENT_TRACE static char _tp = 'n'; static int _qid = 0; #endif uchar do_transit(Trans *t, short II) { uchar _m = 0; int tt = (int) ((P0 *)this)->_p; #ifdef M_LOSS uchar delta_m = 0; #endif #ifdef EVENT_TRACE short oboq = boq; uchar ot = (uchar) ((P0 *)this)->_t; if (II == -EVENT_TRACE) boq = -1; #define continue { boq = oboq; return 0; } #else #define continue return 0 #ifdef SEPARATE uchar ot = (uchar) ((P0 *)this)->_t; #endif #endif #include FORWARD_MOVES P999: #ifdef EVENT_TRACE if (II == -EVENT_TRACE) boq = oboq; #endif return _m; #undef continue } #ifdef EVENT_TRACE void require(char tp, int qid) { Trans *t; _tp = tp; _qid = qid; if (now._event != endevent) for (t = trans[EVENT_TRACE][now._event]; t; t = t->nxt) { if (do_transit(t, -EVENT_TRACE)) { now._event = t->st; reached[EVENT_TRACE][t->st] = 1; #ifdef VERBOSE printf(" event_trace move to -> %d\n", t->st); #endif #ifndef BFS #ifndef NP if (accpstate[EVENT_TRACE][now._event]) (trpt+1)->o_pm |= 2; #else if (progstate[EVENT_TRACE][now._event]) (trpt+1)->o_pm |= 4; #endif #endif #ifdef NEGATED_TRACE if (now._event == endevent) { #ifndef BFS depth++; trpt++; #endif uerror("event_trace error (all events matched)"); #ifndef BFS trpt--; depth--; #endif break; } #endif for (t = t->nxt; t; t = t->nxt) { if (do_transit(t, -EVENT_TRACE)) Uerror("non-determinism in event-trace"); } return; } #ifdef VERBOSE else printf(" event_trace miss '%c' -- %d, %d, %d\n", tp, qid, now._event, t->forw); #endif } #ifdef NEGATED_TRACE now._event = endevent; /* only 1st try will count -- fixed 4.2.6 */ #else #ifndef BFS depth++; trpt++; #endif uerror("event_trace error (no matching event)"); #ifndef BFS trpt--; depth--; #endif #endif } #endif int enabled(int iam, int pid) { Trans *t; uchar *othis = this; int res = 0; int tt; uchar ot; pid += BASE; if (pid == iam) Uerror("used: enabled(pid=thisproc)"); if (pid < 0 || pid >= (int) now._nr_pr) return 0; this = pptr(pid); TstOnly = 1; tt = (int) ((P0 *)this)->_p; ot = (uchar) ((P0 *)this)->_t; for (t = trans[ot][tt]; t; t = t->nxt) if (do_transit(t, (short) pid)) { res = 1; break; } TstOnly = 0; this = othis; return res; } #endif #ifdef HAS_PRIORITY int highest_priority(int pid, short nII, Trans *t) { int i = pid; uchar *othis = this; #ifdef VERI if (nII == 0) { return 1; } #endif #ifdef HAS_PROVIDED i = pid+BASE; #endif if (i < 0 || i >= (int) now._nr_pr #ifdef HAS_PROVIDED || !provided(i, (uchar) ((P0 *)this)->_t, (int) ((P0 *)this)->_p, t) #endif ) { return 0; } for (i = BASE; i < now._nr_pr; i++) { this = pptr(i); if (i != pid+BASE && ((P0 *)this)->_priority > ((P0 *)pptr(pid+BASE))->_priority #ifdef HAS_PROVIDED && provided(i, (uchar) ((P0 *)this)->_t, (int) ((P0 *)this)->_p, 0) #endif && enabled(i+1, i-BASE)) { this = othis; return 0; } } this = othis; return 1; } int get_priority(int pid) { pid += BASE; /* 6.2.7 */ if (pid < 0 || pid >= (int) now._nr_pr) return 0; return ((P0 *)pptr(pid))->_priority; } int set_priority(int pid, int pr) { pid += BASE; /* 6.2.7 */ if (pid < 0 || pid >= (int) now._nr_pr) { #ifdef VERBOSE printf("warning: bad pid %d, no such process (set_priority)\n", pid); #endif return 1; } if (pr < 1 || pr > 255) { Uerror("priority is out of range"); } if (!TstOnly) { (trpt+1)->o_priority = (((P0 *)pptr(pid))->_priority & 255) | (pid << 8); ((P0 *)pptr(pid))->_priority = pr; } return 1; } #endif void snap_time(void) { clock_t stop_time; double delta_time; #if !defined(WIN32) && !defined(WIN64) struct tms stop_tm; stop_time = times(&stop_tm); delta_time = ((double) (stop_time - start_time)) / ((double) sysconf(_SC_CLK_TCK)); #else stop_time = clock(); delta_time = ((double) (stop_time - start_time)) / ((double) CLOCKS_PER_SEC); #endif if (delta_time > 0.01) { printf("t= %8.3g ", delta_time); printf("R= %7.0g", nstates/delta_time); } printf("\n"); if (quota > 0.1 && delta_time > quota) { printf("Time limit of %6.3g minutes exceeded\n", quota/60.0); #if NCORE>1 fflush(stdout); leave_critical(GLOBAL_LOCK); sudden_stop("time-limit"); exit(1); #endif wrapup(); } } void snapshot(void) { #ifdef BFS_PAR e_critical(BFS_GLOB); /* bfs_par / snapshot */ printf("cpu%d: ", who_am_i); #endif #if NCORE>1 enter_critical(GLOBAL_LOCK); /* ncore / snapshot */ printf("cpu%d: ", core_id); #endif printf("Depth= %7ld States= %8.3g ", #if NCORE>1 (long) (nr_handoffs * z_handoff) + #endif mreached, nstates); printf("Transitions= %8.3g ", nstates+truncs); #ifdef MA printf("Nodes= %7lu ", nr_states); #endif printf("Memory= %9.3f\t", memcnt/1048576.); snap_time(); fflush(stdout); #if NCORE>1 leave_critical(GLOBAL_LOCK); #endif #ifdef BFS_PAR x_critical(BFS_GLOB); #endif } #ifdef SC void stack2disk(void) { if (!stackwrite && (stackwrite = creat(stackfile, TMODE)) < 0) Uerror("cannot create stackfile"); if (write(stackwrite, trail, DDD*sizeof(Trail)) != DDD*sizeof(Trail)) Uerror("stackfile write error -- disk is full?"); memmove(trail, &trail[DDD], (HHH-DDD+2)*sizeof(Trail)); memset(&trail[HHH-DDD+2], 0, (omaxdepth - HHH + DDD - 2)*sizeof(Trail)); CNT1++; } void disk2stack(void) { long have; CNT2++; memmove(&trail[DDD], trail, (HHH-DDD+2)*sizeof(Trail)); if (!stackwrite || lseek(stackwrite, -DDD* (off_t) sizeof(Trail), SEEK_CUR) == -1) Uerror("disk2stack lseek error"); if (!stackread && (stackread = open(stackfile, 0)) < 0) Uerror("cannot open stackfile"); if (lseek(stackread, (CNT1-CNT2)*DDD* (off_t) sizeof(Trail), SEEK_SET) == -1) Uerror("disk2stack lseek error"); have = read(stackread, trail, DDD*sizeof(Trail)); if (have != DDD*sizeof(Trail)) Uerror("stackfile read error"); } #endif uchar * Pptr(int x) { if (x < 0 || x >= MAXPROC #ifdef TRIX || !processes[x]) #else || !proc_offset[x]) #endif return noptr; else return (uchar *) pptr(x); } uchar * Qptr(int x) { if (x < 0 || x >= MAXQ #ifdef TRIX || !channels[x]) #else || !q_offset[x]) #endif return noqptr; else return (uchar *) qptr(x); } #if NCLAIMS>1 void select_claim(int n) { int m, i; if (n < 0 || n >= NCLAIMS) { uerror("non-existing claim"); } else { m = ((Pclaim *)pptr(0))->_n; if (verbose) { printf("%d: Claim %s (%d), from state %d\n", (int) depth, procname[spin_c_typ[n]], n, ((Pclaim *)pptr(0))->c_cur[n]); } else { printf("pan: ltl formula %s\n", procname[spin_c_typ[n]]); } ((Pclaim *)pptr(0))->c_cur[m] = ((Pclaim *)pptr(0))->_p; ((Pclaim *)pptr(0))->_t = spin_c_typ[n]; ((Pclaim *)pptr(0))->_p = ((Pclaim *)pptr(0))->c_cur[n]; ((Pclaim *)pptr(0))->_n = n; for (i = 0; src_all[i].src != (short *) 0; i++) { if (src_all[i].tp == spin_c_typ[n]) { src_claim = src_all[i].src; break; } } if (src_all[i].src == (short *) 0) { uerror("cannot happen: src_ln ref"); } } } #else void select_claim(int n) { if (n != 0) uerror("non-existing claim"); } #endif int qs_empty(void); #if !defined(BFS) && (!defined(BITSTATE) || !defined(MA)) #ifdef NSUCC int N_succ[512]; void tally_succ(int cnt) { if (cnt < 512) N_succ[cnt]++; else printf("tally_succ: cnt %d exceeds range\n", cnt); } void dump_succ(void) { int i; double sum = 0.0; double w_avg = 0.0; printf("Successor counts:\n"); for (i = 0; i < 512; i++) { sum += (double) N_succ[i]; } for (i = 0; i < 512; i++) { if (N_succ[i] > 0) { printf("%3d %10d (%.4g %% of total)\n", i, N_succ[i], (100.0 * (double) N_succ[i])/sum); w_avg += (double) i * (double) N_succ[i]; } } if (sum > N_succ[0]) printf("mean %.4g (without 0: %.4g)\n", w_avg / sum, w_avg / (sum - (double) N_succ[0])); } #endif #ifdef P_REVERSE #define FROM_P (BASE) #define UPTO_P (now._nr_pr-1) #define MORE_P (II <= To) #define INI_P (From-1) #define CNT_P (1 + (To - From)) #define NDONE_P (From <= To) #define ALL_P (II = From; II <= To; II++) #else #define FROM_P (now._nr_pr-1) #define UPTO_P (BASE) #define MORE_P (II >= BASE) #define INI_P (From+1) #define CNT_P (1 + (From - To)) #define NDONE_P (From >= To) #define ALL_P (II = From; II >= To; II--) #endif #ifdef PERMUTED #define CONTINUE0 { if (reversing&2) { II = oII; } continue; } #define CONTINUE { if (reversing&2) { p_reorder(seed); II = oII; } continue; } #else #define CONTINUE0 { continue; } #define CONTINUE { continue; } #endif #ifdef PERMUTED uchar _permutation_[256]; void set_reversed(int unused) { int i, n = now._nr_pr; #ifdef VERBOSE printf("%ld: Set_reversed\n", depth); #endif #if defined(VERI) && !defined(NOCLAIM) for (i = 1; i < n; i++) { _permutation_[i] = n-i; } #else for (i = 0; i < n; i++) { _permutation_[i] = n-1-i; } #endif } void set_rotated(int unused) { int i, n = now._nr_pr; #ifdef VERBOSE printf("%ld: Set_rotated %d\n", depth, p_rotate); #endif #if defined(VERI) && !defined(NOCLAIM) for (i = 1; i < n; i++) { _permutation_[i] = 1+(i-1+p_rotate)%(n-1); } #else for (i = 0; i < n; i++) { _permutation_[i] = (i+p_rotate)%n; } #endif } void set_randrot(int unused) { if (now._nr_pr > 1) { p_rotate = 1+rand()%(now._nr_pr-1); } else { p_rotate = 0; } set_rotated(0); } void set_permuted(int T) { /* permute nrs 1..n-1, leave 0 in place */ int i, j, k, n = now._nr_pr; char tmp, *in = &(_permutation_[0]); #ifdef VERBOSE printf("%ld: Set_permuted %d\n", depth, T); #endif srand(T); for (i = 0; i < n; i++) { in[i] = i; } if (n > 1) { for (i = 0; i < n; i++) { #if defined(VERI) && !defined(NOCLAIM) j = 1 + rand()%(n-1); k = 1 + rand()%(n-1); #else j = rand()%(n); k = rand()%(n); #endif tmp = in[j]; in[j] = in[k]; in[k] = tmp; } } } #ifdef VERBOSE short get_permuted(int x) { printf("%ld: Get_permuted %d -> %d\n", depth, x, _permutation_[x]); return (short) _permutation_[x]; } #else #define get_permuted(x) (short) _permutation_[x] #endif #endif /* * new_state() is the main DFS search routine in the verifier * it has a lot of code ifdef-ed together to support * different search modes, which makes it quite unreadable. * if you are studying the code, use the C preprocessor * to generate a specific version from the pan.c source, * e.g. by saying: * gcc -E -DNOREDUCE -DBITSTATE pan.c > ppan.c * and then study the resulting file, instead of this version */ void new_state(void) { Trans *t; uchar _n, _m, ot; #ifdef T_RAND short ooi, eoi; #endif #ifdef PERMUTED short oII; uint seed; #endif #ifdef M_LOSS uchar delta_m = 0; #endif short II, JJ = 0, kk; int tt; short From = FROM_P, To = UPTO_P; #ifdef BCS trpt->sched_limit = 0; /* at depth=0 only */ #endif Down: #ifdef CHECK cpu_printf("%d: Down - %s %saccepting [pids %d-%d]\n", depth, (trpt->tau&4)?"claim":"program", (trpt->o_pm&2)?"":"non-", From, To); #endif #ifdef P_RAND trpt->p_skip = -1; #endif #ifdef SC if (depth > hiwater) { stack2disk(); maxdepth += DDD; hiwater += DDD; trpt -= DDD; if(verbose) printf("zap %ld: %ld (maxdepth now %ld)\n", CNT1, hiwater, maxdepth); } #endif trpt->tau &= ~(16|32|64); /* make sure these are off */ #if defined(FULLSTACK) && defined(MA) trpt->proviso = 0; #endif #ifdef NSUCC trpt->n_succ = 0; #endif #if NCORE>1 if (mem_hand_off()) { #if SYNC (trpt+1)->o_n = 1; /* not a deadlock: as below */ #endif #ifndef LOOPSTATE (trpt-1)->tau |= 16; /* worstcase guess: as below */ #endif #if NCORE>1 && defined(FULL_TRAIL) if (upto > 0) { Pop_Stack_Tree(); } #endif goto Up; } #endif if (depth >= maxdepth) { if (!warned) { warned = 1; printf("error: max search depth too small\n"); } if (bounded) { uerror("depth limit reached"); } truncs++; #if SYNC (trpt+1)->o_n = 1; /* not a deadlock */ #endif #ifndef LOOPSTATE (trpt-1)->tau |= 16; /* worstcase guess */ #endif #if NCORE>1 && defined(FULL_TRAIL) if (upto > 0) { Pop_Stack_Tree(); } #endif goto Up; } AllOver: #if (defined(FULLSTACK) && !defined(MA)) || NCORE>1 /* if atomic or rv move, carry forward previous state */ trpt->ostate = (trpt-1)->ostate; #endif #ifdef VERI if ((trpt->tau&4) || ((trpt-1)->tau&128)) #endif if (boq == -1) { /* if not mid-rv */ #ifndef SAFETY if ((now._a_t&1) && depth > A_depth) { int delta = S_A + 2; if (!memcmp((char *)&A_Root + delta, (char *)&now + delta, vsize - delta)) { #ifndef NOFAIR if (fairness && now._cnt[1] != 1) /* was > 1 */ { #ifdef CHECK printf(" fairness count non-zero\n"); #endif /* treat as new state */ } else #endif { depthfound = A_depth; #ifdef CHECK printf("matches seed\n"); #endif #ifdef NP uerror("non-progress cycle"); #else uerror("acceptance cycle"); #endif #if NCORE>1 && defined(FULL_TRAIL) if (upto > 0) { Pop_Stack_Tree(); } #endif goto Up; } } #ifdef CHECK else { printf("not seed\n"); } #endif } #endif if (!(trpt->tau&8)) /* if no atomic move */ { #if defined(BCS) && defined(NO_LAST) && defined(HAS_LAST) uchar was_last = now._last; now._last = 0; /* value not stored */ #endif #ifdef BITSTATE #ifdef CNTRSTACK #if defined(BCS) && defined(STORE_CTX) { int xj; for (xj = trpt->sched_limit; xj <= sched_max; xj++) { now._ctx = xj; II = b_store((char *)&now, vsize); trpt->j6 = j1_spin; trpt->j7 = j2_spin; JJ = LL[j1_spin] && LL[j2_spin]; if (II != 0) { break; } } now._ctx = 0; /* just in case */ } #else II = b_store((char *)&now, vsize); trpt->j6 = j1_spin; trpt->j7 = j2_spin; JJ = LL[j1_spin] && LL[j2_spin]; #endif #else #ifdef FULLSTACK #if defined(BCS) && defined(STORE_CTX) { int xj; now._ctx = 0; JJ = onstack_now(); for (xj = trpt->sched_limit; xj <= sched_max; xj++) { now._ctx = xj; II = b_store((char *)&now, vsize); if (II != 0) { break; } } now._ctx = 0; } #else JJ = onstack_now(); II = b_store((char *)&now, vsize); #endif #else #if defined(BCS) && defined(STORE_CTX) { int xj; for (xj = trpt->sched_limit; xj <= sched_max; xj++) { now._ctx = xj; II = b_store((char *)&now, vsize); JJ = II; /* worstcase guess for p.o. - order corrected in 5.2.1 */ if (II != 0) { break; } } now._ctx = 0; } #else II = b_store((char *)&now, vsize); JJ = II; /* worstcase guess for p.o. - order corrected in 5.2.1 */ #endif #endif #endif #else #ifdef MA II = g_store((char *)&now, vsize, 0); #ifndef FULLSTACK JJ = II; #else JJ = (II == 2)?1:0; #endif #else II = h_store((char *)&now, vsize); /* @hash j1_spin II */ #ifdef FULLSTACK JJ = (II == 2)?1:0; #endif #endif #endif kk = (II == 1 || II == 2); #if defined(BCS) && defined(NO_LAST) && defined(HAS_LAST) now._last = was_last; /* restore value */ #endif #ifndef SAFETY #if !defined(HC) && (NCORE==1 || defined (SEP_STATE)) if (II == 2 && ((trpt->o_pm&2) || ((trpt-1)->o_pm&2))) #ifndef NOFAIR if (a_cycles && !fairness) /* 5.1.6 -- example by Hirofumi Watanabe */ #endif if (depth > A_depth) /* forum example by adl */ { II = 3; /* Schwoon & Esparza 2005, Gastin&Moro 2004 */ #ifdef VERBOSE printf("state match on dfs stack\n"); #endif goto same_case; } #endif #if defined(FULLSTACK) && defined(BITSTATE) if (!JJ && (now._a_t&1) && depth > A_depth) { int oj1 = j1_spin; uchar o_a_t = now._a_t; now._a_t &= ~(1|16|32); if (onstack_now()) { II = 3; #ifdef VERBOSE printf("state match on 1st dfs stack\n"); #endif } now._a_t = o_a_t; j1_spin = oj1; } #endif if (II == 3 && a_cycles && (now._a_t&1)) { #ifndef NOFAIR if (fairness && now._cnt[1] != 1) /* was > 1 */ { #ifdef CHECK printf(" fairness count non-zero\n"); #endif II = 0; } else #endif { #ifndef BITSTATE nShadow--; #endif same_case: if (Lstate) depthfound = Lstate->D; #ifdef NP uerror("non-progress cycle"); #else uerror("acceptance cycle"); #endif #if NCORE>1 && defined(FULL_TRAIL) if (upto > 0) { Pop_Stack_Tree(); } #endif goto Up; } } #endif #ifndef NOREDUCE #ifndef SAFETY #if NCORE>1 && !defined(SEP_STATE) && defined(V_PROVISO) if (II != 0 && (!Lstate || Lstate->cpu_id < core_id)) { (trpt-1)->tau |= 16; } #endif if ((II && JJ) || (II == 3)) { /* marker for liveness proviso */ #ifndef LOOPSTATE (trpt-1)->tau |= 16; #endif truncs2++; } #else #if NCORE>1 && !defined(SEP_STATE) && defined(V_PROVISO) if (!(II != 0 && (!Lstate || Lstate->cpu_id < core_id))) { /* treat as stack state */ (trpt-1)->tau |= 16; } else { /* treat as non-stack state */ (trpt-1)->tau |= 64; } #endif if (!II || !JJ) { /* successor outside stack */ (trpt-1)->tau |= 64; } #endif #endif #if defined(BCS) && (defined(NOREDUCE) || !defined(SAFETY)) if (!II || !JJ) { (trpt-1)->tau |= 64; } #endif if (II) { truncs++; #if NCORE>1 && defined(FULL_TRAIL) if (upto > 0) { Pop_Stack_Tree(); if (depth == 0) { return; } } #endif goto Up; } if (!kk) { static long sdone = (long) 0; long ndone; nstates++; #if defined(ZAPH) && defined(BITSTATE) zstates += (double) hfns; #endif ndone = (ulong) (nstates/(freq)); if (ndone != sdone) { snapshot(); sdone = ndone; #if defined(AUTO_RESIZE) && !defined(BITSTATE) && !defined(MA) if (nstates > ((double)(ONE_L<<(ssize+1)))) { void resize_hashtable(void); resize_hashtable(); } #endif #if defined(ZAPH) && defined(BITSTATE) if (zstates > ((double)(ONE_L<<(ssize-2)))) { /* more than half the bits set */ void zap_hashtable(void); zap_hashtable(); zstates = 0; } #endif } #ifdef SVDUMP if (vprefix > 0) #ifdef SHO /* always use the same hashfunction, for consistency across runs */ if (HASH_NR != 0) { int oh = HASH_NR; HASH_NR = 0; d_hash((uchar *) &now, vsize); /* SHO - set K1 */ HASH_NR = oh; } if (write(svfd, (uchar *) &K1, sizeof(ulong)) != sizeof(ulong)) #else if (write(svfd, (uchar *) &now, vprefix) != vprefix) #endif { fprintf(efd, "writing %s.svd failed\n", PanSource); wrapup(); } #endif #if defined(MA) && defined(W_XPT) if ((ulong) nstates%W_XPT == 0) { void w_xpoint(void); w_xpoint(); } #endif } #if defined(FULLSTACK) || defined(CNTRSTACK) onstack_put(); #ifdef DEBUG2 #if defined(FULLSTACK) && !defined(MA) printf("%d: putting %u (%d)\n", depth, trpt->ostate, (trpt->ostate)?trpt->ostate->tagged:0); #else printf("%d: putting\n", depth); #endif #endif #else #if NCORE>1 trpt->ostate = Lstate; #endif #endif } } if (depth > mreached) mreached = depth; #ifdef VERI if (trpt->tau&4) #endif trpt->tau &= ~(1|2); /* timeout and -request off */ _n = 0; #if SYNC (trpt+1)->o_n = 0; #endif #ifdef VERI if (now._nr_pr == 0) /* claim terminated */ { uerror("end state in claim reached"); } if (stopstate[((Pclaim *)pptr(0))->_t][((Pclaim *)pptr(0))->_p]) { uerror("end state in claim reached"); } Stutter: if (trpt->tau&4) /* must make a claimmove */ { #ifndef NOFAIR if ((now._a_t&2) /* A-bit set */ && now._cnt[now._a_t&1] == 1) { now._a_t &= ~2; now._cnt[now._a_t&1] = 0; trpt->o_pm |= 16; #ifdef DEBUG printf("%3d: fairness Rule 3.: _a_t = %d\n", (int) depth, now._a_t); #endif } #endif II = 0; /* never */ goto Veri0; } #endif #ifdef PERMUTED if (reversing&2) { seed = rand(); p_reorder(seed); } #endif #ifndef NOREDUCE /* Look for a process with only safe transitions */ /* (special rules apply in the 2nd dfs) */ if (boq == -1 && From != To #ifdef SAFETY #if NCORE>1 && (depth < z_handoff) #endif ) #else #if NCORE>1 && ((a_cycles) || (!a_cycles && depth < z_handoff)) #endif #ifdef BCS && (sched_max > 0 || depth > BASE) #endif && (!(now._a_t&1) || (a_cycles && #ifndef BITSTATE #ifdef MA #ifdef VERI !((trpt-1)->proviso)) #else !(trpt->proviso)) #endif #else #ifdef VERI (trpt-1)->ostate && !(((char *)&((trpt-1)->ostate->state))[0] & 128)) #else !(((char *)&(trpt->ostate->state))[0] & 128)) #endif #endif #else #ifdef VERI (trpt-1)->ostate && (trpt-1)->ostate->proviso == 0) #else trpt->ostate->proviso == 0) #endif #endif )) #endif /* attempt Partial Order Reduction as preselect moves */ #ifdef BCS if (trpt->sched_limit < sched_max) #endif { for ALL_P { Resume: /* pick up here if preselect fails */ this = pptr(II); tt = (int) ((P0 *)this)->_p; ot = (uchar) ((P0 *)this)->_t; if (trans[ot][tt]->atom & 8) { t = trans[ot][tt]; if (t->qu[0] != 0) { Ccheck++; if (!q_cond(II, t)) { continue; } Cholds++; } From = To = II; /* preselect process */ #ifdef NIBIS t->om = 0; #endif trpt->tau |= 32; /* preselect marker */ #ifdef DEBUG printf("%3ld: proc %d PreSelected (tau=%d)\n", depth, II, trpt->tau); #endif goto Again; } else { continue; } } } trpt->tau &= ~32; #endif #if !defined(NOREDUCE) || (defined(ETIM) && !defined(VERI)) Again: #endif trpt->o_pm &= ~(8|16|32|64); /* clear fairness-marks */ #ifndef NOFAIR if (fairness && boq == -1 #ifdef VERI && (!(trpt->tau&4) && !((trpt-1)->tau&128)) #endif && !(trpt->tau&8)) { /* A_bit = 1; Cnt = N in acc states with A_bit 0 */ if (!(now._a_t&2)) { if (a_cycles && (trpt->o_pm&2)) { /* Accepting state */ now._a_t |= 2; now._cnt[now._a_t&1] = now._nr_pr + 1; trpt->o_pm |= 8; #ifdef DEBUG printf("%3ld: fairness Rule 1: cnt=%d, _a_t=%d\n", depth, now._cnt[now._a_t&1], now._a_t); #endif } } else { /* A_bit = 0 when Cnt 0 */ if (now._cnt[now._a_t&1] == 1) { now._a_t &= ~2; now._cnt[now._a_t&1] = 0; trpt->o_pm |= 16; #ifdef DEBUG printf("%3ld: fairness Rule 3: _a_t = %d\n", depth, now._a_t); #endif } } } #endif #ifdef BCS trpt->bcs = trpt->b_pno = 0; /* initial */ if (From != To /* not a PO or atomic move */ && depth > BASE) /* there is a prior move */ { trpt->b_pno = now._last + BASE; trpt->bcs = B_PHASE1; #ifdef VERBOSE printf("%3ld: BCS phase 1 proc %d limit %d\n", depth, trpt->b_pno, trpt->sched_limit); #endif /* allow only process b_pno to move in this phase */ } c_switch: /* jumps here with bcs == B_PHASE2 with or wo B_FORCED added */ #ifdef VERBOSE printf("%3ld: BCS c_switch phase=%d pno=%d [forced %d]\n", depth, trpt->bcs, trpt->b_pno, (trpt->bcs&B_FORCED)?1:0); #endif #endif #ifdef P_RAND trpt->p_left = CNT_P; if (trpt->p_left > 1) { trpt->p_skip = rand() % (trpt->p_left); } else { trpt->p_skip = -1; } r_switch: #ifdef VERBOSE printf("%3ld: P_RAND r_switch p_skip=%d p_left=%d\n", depth, trpt->p_skip, trpt->p_left); #endif #endif for ALL_P { #ifdef PERMUTED if (reversing&2) { oII = II; if (From != To) { II = get_permuted(II); } } #endif #ifdef P_RAND if (trpt->p_skip >= 0) { trpt->p_skip--; /* skip random nr of procs */ #ifdef VERBOSE printf("%3ld: P_RAND skipping %d [new p_skip=%d p_left=%d]\n", depth, II, trpt->p_skip, trpt->p_left); #endif CONTINUE0; } if (trpt->p_left == 0) { #ifdef VERBOSE printf("%3ld: P_RAND done at %d\n", depth, II); #endif break; /* done */ } #ifdef VERBOSE printf("%3ld: P_RAND explore %d [p_left=%d]\n", depth, II, trpt->p_left); #endif trpt->p_left--; #endif #if SYNC /* no rendezvous with same proc */ if (boq != -1 && trpt->pr == II) { CONTINUE0; } #endif #ifdef BCS if ((trpt->bcs & B_PHASE1) && trpt->b_pno != II) { #ifdef VERBOSE printf("%3ld: BCS NotPre II=%d bcs=%d pno=%d [forced %d]\n", depth, II, trpt->bcs, trpt->b_pno, (trpt->bcs&B_FORCED)?1:0); #endif CONTINUE0; } #ifdef VERBOSE else if ((trpt->bcs & B_PHASE1) && trpt->b_pno == II) printf("%3ld: BCS IsPre II=%d bcs=%d pno=%d [forced %d]\n", depth, II, trpt->bcs, trpt->b_pno, (trpt->bcs&B_FORCED)?1:0); #endif if (trpt->bcs & B_PHASE2) /* 2nd phase */ { if (trpt->b_pno == II) /* was already done in phase 1 */ { #ifdef VERBOSE printf("%3ld: BCS NoRepeat II=%d bcs=%d pno=%d [forced %d]\n", depth, II, trpt->bcs, trpt->b_pno, (trpt->bcs&B_FORCED)?1:0); #endif CONTINUE0; } if (!(trpt->bcs & B_FORCED) /* unless forced */ && trpt->sched_limit >= sched_max) { #ifdef VERBOSE printf("%3ld: BCS Bound II=%d bcs=%d pno=%d [forced %d]\n", depth, II, trpt->bcs, trpt->b_pno, (trpt->bcs&B_FORCED)?1:0); #endif CONTINUE0; /* enforce bound */ } } #endif #ifdef VERI Veri0: #endif this = pptr(II); tt = (int) ((P0 *)this)->_p; ot = (uchar) ((P0 *)this)->_t; #ifdef NIBIS /* don't repeat a previous preselected expansion */ /* could hit this if reduction proviso was false */ t = trans[ot][tt]; if (!(trpt->tau&4) && !(trpt->tau&1) && !(trpt->tau&32) && (t->atom & 8) && boq == -1 && From != To) { if (t->qu[0] == 0 || q_cond(II, t)) { _m = t->om; if (_m>_n||(_n>3&&_m!=0)) { _n=_m; } CONTINUE0; /* did it before */ } } #endif trpt->o_pm &= ~1; /* no move in this pid yet */ #ifdef EVENT_TRACE (trpt+1)->o_event = now._event; #endif /* Fairness: Cnt++ when Cnt == II */ #ifndef NOFAIR trpt->o_pm &= ~64; /* didn't apply rule 2 */ if (fairness && boq == -1 && !(trpt->o_pm&32) && (now._a_t&2) && now._cnt[now._a_t&1] == II+2) { now._cnt[now._a_t&1] -= 1; #ifdef VERI /* claim need not participate */ if (II == 1) now._cnt[now._a_t&1] = 1; #endif #ifdef DEBUG printf("%3ld: proc %d fairness ", depth, II); printf("Rule 2: --cnt to %d (%d)\n", now._cnt[now._a_t&1], now._a_t); #endif trpt->o_pm |= (32|64); } #endif #ifdef HAS_PRIORITY if (!highest_priority(((P0 *)this)->_pid, II, t)) { CONTINUE0; } #else #ifdef HAS_PROVIDED if (!provided(II, ot, tt, t)) { CONTINUE0; } #endif #endif /* check all trans of proc II - escapes first */ #ifdef HAS_UNLESS trpt->e_state = 0; #endif (trpt+1)->pr = (uchar) II; (trpt+1)->st = tt; #ifdef T_RAND for (ooi = eoi = 0, t = trans[ot][tt]; t; t = t->nxt, ooi++) { if (strcmp(t->tp, "else") == 0 #ifdef HAS_UNLESS || t->e_trans != 0 #endif ) { eoi++; } } if (eoi > 0) { t = trans[ot][tt]; #ifdef VERBOSE printf("randomizer: suppressed, saw else or escape\n"); #endif } else if (ooi > 0) { eoi = rand()%ooi; #ifdef VERBOSE printf("randomizer: skip %d in %d\n", eoi, ooi); #endif for (t = trans[ot][tt]; t; t = t->nxt) if (eoi-- <= 0) break; } domore: for ( ; t && ooi > 0; t = t->nxt, ooi--) #else for (t = trans[ot][tt]; t; t = t->nxt) #endif { #ifdef HAS_UNLESS /* exploring all transitions from * a single escape state suffices */ if (trpt->e_state > 0 && trpt->e_state != t->e_trans) { #ifdef DEBUG printf("skip 2nd escape %d (did %d before)\n", t->e_trans, trpt->e_state); #endif break; } #endif #if defined(TRIX) && !defined(TRIX_ORIG) && !defined(BFS) (trpt+1)->p_bup = now._ids_[II]; #endif (trpt+1)->o_t = t; #ifdef INLINE #include FORWARD_MOVES P999: /* jumps here when move succeeds */ #else if (!(_m = do_transit(t, II))) { continue; } #endif #ifdef BCS if (depth > BASE && II >= BASE && From != To #ifndef BCS_NOFIX /* added 5.2.5: prior move was not po */ && !((trpt-(BASE+1))->tau & 32) #endif && boq == -1 && (trpt->bcs & B_PHASE2) && trpt->b_pno != II /* context switch */ && !(trpt->bcs & B_FORCED)) /* unless forced */ { (trpt+1)->sched_limit = 1 + trpt->sched_limit; #ifdef VERBOSE printf("%3ld: up sched count to %d\n", depth, (trpt+1)->sched_limit); #endif } else { (trpt+1)->sched_limit = trpt->sched_limit; #ifdef VERBOSE printf("%3ld: keep sched count at %d\n", depth, (trpt+1)->sched_limit); #endif } #endif if (boq == -1) #ifdef CTL /* for branching-time, can accept reduction only if */ /* the persistent set contains just 1 transition */ { if ((trpt->tau&32) && (trpt->o_pm&1)) trpt->tau |= 16; trpt->o_pm |= 1; /* we moved */ } #else trpt->o_pm |= 1; /* we moved */ #endif #ifdef LOOPSTATE if (loopstate[ot][tt]) { #ifdef VERBOSE printf("exiting from loopstate:\n"); #endif trpt->tau |= 16; cnt_loops++; } #endif #ifdef PEG peg[t->forw]++; #endif #if defined(VERBOSE) || defined(CHECK) #if defined(SVDUMP) cpu_printf("%3ld: proc %d exec %d \n", depth, II, t->t_id); #else cpu_printf("%3ld: proc %d exec %d, %d to %d, %s %s %s %saccepting [tau=%d]\n", depth, II, t->forw, tt, t->st, t->tp, (t->atom&2)?"atomic":"", (boq != -1)?"rendez-vous":"", (trpt->o_pm&2)?"":"non-", trpt->tau); #ifdef HAS_UNLESS if (t->e_trans) cpu_printf("\t(escape to state %d)\n", t->st); #endif #endif #ifdef T_RAND cpu_printf("\t(randomizer %d)\n", ooi); #endif #endif #ifdef HAS_LAST #ifdef VERI if (II != 0) #endif now._last = II - BASE; #endif #ifdef HAS_UNLESS trpt->e_state = t->e_trans; #endif depth++; trpt++; trpt->pr = (uchar) II; trpt->st = tt; trpt->o_pm &= ~(2|4); if (t->st > 0) { ((P0 *)this)->_p = t->st; /* moved down reached[ot][t->st] = 1; */ } #ifndef SAFETY if (a_cycles) { #if (ACCEPT_LAB>0 && !defined(NP)) || (PROG_LAB>0 && defined(HAS_NP)) int ii; #endif #define P__Q ((P0 *)pptr(ii)) #if ACCEPT_LAB>0 #ifdef NP /* state 1 of np_ claim is accepting */ if (((P0 *)pptr(0))->_p == 1) trpt->o_pm |= 2; #else for (ii = 0; ii < (int) now._nr_pr; ii++) { if (accpstate[P__Q->_t][P__Q->_p]) { trpt->o_pm |= 2; break; } } #endif #endif #if defined(HAS_NP) && PROG_LAB>0 for (ii = 0; ii < (int) now._nr_pr; ii++) { if (progstate[P__Q->_t][P__Q->_p]) { trpt->o_pm |= 4; break; } } #endif #undef P__Q } #endif trpt->o_t = t; trpt->o_n = _n; trpt->o_ot = ot; trpt->o_tt = tt; trpt->o_To = To; trpt->o_m = _m; trpt->tau = 0; #ifdef PERMUTED if (reversing&2) { trpt->seed = seed; trpt->oII = oII; } #endif #if defined(T_RAND) && !defined(BFS) trpt->oo_i = ooi; #endif if (boq != -1 || (t->atom&2)) { trpt->tau |= 8; #ifdef VERI /* atomic sequence in claim */ if((trpt-1)->tau&4) trpt->tau |= 4; else trpt->tau &= ~4; } else { if ((trpt-1)->tau&4) trpt->tau &= ~4; else trpt->tau |= 4; } /* if claim allowed timeout, so */ /* does the next program-step: */ if (((trpt-1)->tau&1) && !(trpt->tau&4)) trpt->tau |= 1; #else } else trpt->tau &= ~8; #endif if (boq == -1 && (t->atom&2)) { From = To = II; nlinks++; } else { From = FROM_P; To = UPTO_P; } #if NCORE>1 && defined(FULL_TRAIL) if (upto > 0) { Push_Stack_Tree(II, t->t_id); } #endif #ifdef TRIX if (processes[II]) { processes[II]->modified = 1; /* transition in II */ #ifdef V_TRIX printf("%4d: process %d modified\n", depth, II); } else { printf("%4d: process %d modified but gone (%p)\n", depth, II, trpt); #endif } #endif goto Down; /* pseudo-recursion */ Up: #ifdef TRIX #ifndef TRIX_ORIG #ifndef BFS now._ids_[trpt->pr] = trpt->p_bup; #endif #else if (processes[trpt->pr]) { processes[trpt->pr]->modified = 1; /* reverse move */ #ifdef V_TRIX printf("%4d: unmodify pr %d (%p)\n", depth, trpt->pr, trpt); } else { printf("%4d: unmodify pr %d (gone) (%p)\n", depth, trpt->pr, trpt); #endif } #endif #endif #ifdef CHECK cpu_printf("%d: Up - %s\n", depth, (trpt->tau&4)?"claim":"program"); #endif #if NCORE>1 iam_alive(); #ifdef USE_DISK mem_drain(); #endif #endif #if defined(MA) || NCORE>1 if (depth <= 0) return; /* e.g., if first state is old, after a restart */ #endif #ifdef SC if (CNT1 > CNT2 && depth < hiwater - (HHH-DDD) - 2) { trpt += DDD; disk2stack(); maxdepth -= DDD; hiwater -= DDD; if(verbose) printf("unzap %ld: %ld\n", CNT2, hiwater); } #endif #ifndef SAFETY if ((now._a_t&1) && depth <= A_depth) return; /* to checkcycles() */ #endif #ifndef NOFAIR if (trpt->o_pm&128) /* fairness alg */ { now._cnt[now._a_t&1] = trpt->bup.oval; _n = 1; trpt->o_pm &= ~128; depth--; trpt--; #if defined(VERBOSE) || defined(CHECK) printf("%3ld: reversed fairness default move\n", depth); #endif goto Q999; } #endif #ifdef HAS_LAST #ifdef VERI { long d; Trail *trl; now._last = 0; for (d = 1; d < depth; d++) { trl = getframe(depth-d); /* was (trpt-d) */ if (trl->pr != 0) { now._last = trl->pr - BASE; break; } } } #else now._last = (depth<1)?0:(trpt-1)->pr; #endif #endif #ifdef EVENT_TRACE now._event = trpt->o_event; #endif t = trpt->o_t; _n = trpt->o_n; ot = trpt->o_ot; II = trpt->pr; tt = trpt->o_tt; this = Pptr(II); To = trpt->o_To; _m = trpt->o_m; #ifdef PERMUTED if (reversing&2) { seed = trpt->seed; oII = trpt->oII; } #endif #if defined(T_RAND) && !defined(BFS) ooi = trpt->oo_i; #endif #ifdef INLINE_REV _m = do_reverse(t, II, _m); #else #include BACKWARD_MOVES R999: /* jumps here when done */ #endif #ifdef VERBOSE cpu_printf("%3ld: proc %d reverses %d, %d to %d\n", depth, II, t->forw, tt, t->st); cpu_printf("\t%s [abit=%d,adepth=%ld,tau=%d,%d]\n", t->tp, now._a_t, A_depth, trpt->tau, (trpt-1)->tau); #endif #ifndef NOREDUCE /* pass the proviso tags */ if ((trpt->tau&8) /* rv or atomic */ && (trpt->tau&16)) (trpt-1)->tau |= 16; #ifdef SAFETY if ((trpt->tau&8) /* rv or atomic */ && (trpt->tau&64)) (trpt-1)->tau |= 64; #endif #endif #if defined(BCS) && (defined(NOREDUCE) || !defined(SAFETY)) if ((trpt->tau&8) && (trpt->tau&64)) (trpt-1)->tau |= 64; #endif depth--; trpt--; #ifdef NSUCC trpt->n_succ++; #endif #ifdef NIBIS (trans[ot][tt])->om = _m; /* head of list */ #endif /* i.e., not set if rv fails */ if (_m) { reached[ot][t->st] = 1; reached[ot][tt] = 1; } #ifdef HAS_UNLESS else trpt->e_state = 0; /* undo */ #endif if (_m>_n||(_n>3&&_m!=0)) _n=_m; ((P0 *)this)->_p = tt; } /* all options */ #ifdef T_RAND if (!t && ooi > 0) { t = trans[ot][tt]; #ifdef VERBOSE printf("randomizer: continue for %d more\n", ooi); #endif goto domore; } #ifdef VERBOSE else printf("randomizer: done\n"); #endif #endif #ifndef NOFAIR /* Fairness: undo Rule 2 */ if ((trpt->o_pm&32) && (trpt->o_pm&64)) { if (trpt->o_pm&1) { #ifdef VERI if (now._cnt[now._a_t&1] == 1) now._cnt[now._a_t&1] = 2; #endif now._cnt[now._a_t&1] += 1; #ifdef VERBOSE printf("%3ld: proc %d fairness ", depth, II); printf("undo Rule 2, cnt=%d, _a_t=%d\n", now._cnt[now._a_t&1], now._a_t); #endif trpt->o_pm &= ~(32|64); } else { if (_n > 0) { trpt->o_pm &= ~64; II = INI_P; } } } #endif #ifdef VERI if (II == 0) { break; /* never claim */ } #endif CONTINUE; } /* ALL_P */ #ifdef NSUCC tally_succ(trpt->n_succ); #endif #ifdef P_RAND if (trpt->p_left > 0 && NDONE_P) { trpt->p_skip = -1; /* probably rendundant */ #ifdef VERBOSE printf("%3ld: P_RAND -- explore remainder\n", depth); #endif goto r_switch; /* explore the remaining procs */ } else { #ifdef VERBOSE printf("%3ld: P_RAND -- none left\n", depth); #endif } #endif #ifdef BCS if (trpt->bcs & B_PHASE1) { trpt->bcs = B_PHASE2; /* start 2nd phase */ if (_n == 0 || !(trpt->tau&64)) /* pre-move unexecutable or led to stackstate */ { trpt->bcs |= B_FORCED; /* forced switch */ } #ifdef VERBOSE printf("%3ld: BCS move to phase 2, _n=%d %s\n", depth, _n, (trpt->bcs & B_FORCED)?"forced":"free"); #endif From = FROM_P; To = UPTO_P; goto c_switch; } if (_n == 0 /* no process could move */ && II >= BASE /* not the never claim */ && trpt->sched_limit >= sched_max) { _n = 1; #ifdef VERBOSE printf("%3ld: BCS not a deadlock\n", depth); #endif } #endif #ifndef NOFAIR /* Fairness: undo Rule 2 */ if (trpt->o_pm&32) /* remains if proc blocked */ { #ifdef VERI if (now._cnt[now._a_t&1] == 1) now._cnt[now._a_t&1] = 2; #endif now._cnt[now._a_t&1] += 1; #ifdef VERBOSE printf("%3ld: proc -- fairness ", depth); printf("undo Rule 2, cnt=%d, _a_t=%d\n", now._cnt[now._a_t&1], now._a_t); #endif trpt->o_pm &= ~32; } #ifndef NP if (fairness && _n == 0 /* nobody moved */ #ifdef VERI && !(trpt->tau&4) /* in program move */ #endif && !(trpt->tau&8) /* not an atomic one */ #ifdef ETIM && (trpt->tau&1) /* already tried timeout */ #endif #ifndef NOREDUCE /* see below */ && !((trpt->tau&32) && (_n == 0 || (trpt->tau&16))) #endif && now._cnt[now._a_t&1] > 0) /* needed more procs */ { depth++; trpt++; trpt->o_pm |= 128 | ((trpt-1)->o_pm&(2|4)); trpt->bup.oval = now._cnt[now._a_t&1]; now._cnt[now._a_t&1] = 1; #ifdef VERI trpt->tau = 4; #else trpt->tau = 0; #endif From = FROM_P; To = UPTO_P; #if defined(VERBOSE) || defined(CHECK) printf("%3ld: fairness default move ", depth); printf("(all procs block)\n"); #endif goto Down; } #endif Q999: /* returns here with _n>0 when done */; if (trpt->o_pm&8) { now._a_t &= ~2; now._cnt[now._a_t&1] = 0; trpt->o_pm &= ~8; #ifdef VERBOSE printf("%3ld: fairness undo Rule 1, _a_t=%d\n", depth, now._a_t); #endif } if (trpt->o_pm&16) { now._a_t |= 2; now._cnt[now._a_t&1] = 1; trpt->o_pm &= ~16; #ifdef VERBOSE printf("%3ld: fairness undo Rule 3, _a_t=%d\n", depth, now._a_t); #endif } #endif #ifndef NOREDUCE #ifdef SAFETY #ifdef LOOPSTATE /* at least one move that was preselected at this */ /* level, blocked or was a loop control flow point */ if ((trpt->tau&32) && (_n == 0 || (trpt->tau&16))) #else /* preselected move - no successors outside stack */ if ((trpt->tau&32) && !(trpt->tau&64)) #endif { From = FROM_P; To = UPTO_P; /* undo From == To */ #ifdef DEBUG printf("%3ld: proc %d UnSelected (_n=%d, tau=%d)\n", depth, II+1, _n, trpt->tau); #endif _n = 0; trpt->tau &= ~(16|32|64); if (MORE_P) /* II already restored and updated */ { goto Resume; } else { goto Again; } } #else /* at least one move that was preselected at this */ /* level, blocked or truncated at the next level */ if ((trpt->tau&32) && (_n == 0 || (trpt->tau&16))) { #ifdef DEBUG printf("%3ld: proc %d UnSelected (_n=%d, tau=%d)\n", depth, II+1, (int) _n, trpt->tau); #endif if (a_cycles && (trpt->tau&16)) { if (!(now._a_t&1)) { #ifdef DEBUG printf("%3ld: setting proviso bit\n", depth); #endif #ifndef BITSTATE #ifdef MA #ifdef VERI (trpt-1)->proviso = 1; #else trpt->proviso = 1; #endif #else #ifdef VERI if ((trpt-1)->ostate) ((char *)&((trpt-1)->ostate->state))[0] |= 128; #else ((char *)&(trpt->ostate->state))[0] |= 128; #endif #endif #else #ifdef VERI if ((trpt-1)->ostate) (trpt-1)->ostate->proviso = 1; #else trpt->ostate->proviso = 1; #endif #endif From = FROM_P; To = UPTO_P; _n = 0; trpt->tau &= ~(16|32|64); goto Again; /* do full search */ } /* else accept reduction */ } else { From = FROM_P; To = UPTO_P; _n = 0; trpt->tau &= ~(16|32|64); if (MORE_P) /* II already updated */ { goto Resume; } else { goto Again; } } } #endif #endif if (_n == 0 || ((trpt->tau&4) && (trpt->tau&2))) { #ifdef DEBUG cpu_printf("%3ld: no move [II=%d, tau=%d, boq=%d]\n", depth, II, trpt->tau, boq); #endif #if SYNC /* ok if a rendez-vous fails: */ if (boq != -1) goto Done; #endif /* ok if no procs or we're at maxdepth */ if ((now._nr_pr == 0 && (!strict || qs_empty())) || depth >= maxdepth-1) goto Done; /* undo change from 5.2.3 */ if ((trpt->tau&8) && !(trpt->tau&4)) { trpt->tau &= ~(1|8); /* 1=timeout, 8=atomic */ From = FROM_P; To = UPTO_P; #ifdef DEBUG cpu_printf("%3ld: atomic step proc %d unexecutable\n", depth, II+1); #endif #ifdef VERI trpt->tau |= 4; /* switch to claim */ #endif goto AllOver; } #ifdef ETIM if (!(trpt->tau&1)) /* didn't try timeout yet */ { #ifdef VERI if (trpt->tau&4) { #ifndef NTIM if (trpt->tau&2) /* requested */ #endif { trpt->tau |= 1; trpt->tau &= ~2; #ifdef DEBUG cpu_printf("%d: timeout\n", depth); #endif goto Stutter; } } else { /* only claim can enable timeout */ if ((trpt->tau&8) && !((trpt-1)->tau&4)) /* blocks inside an atomic */ goto BreakOut; #ifdef DEBUG cpu_printf("%d: req timeout\n", depth); #endif (trpt-1)->tau |= 2; /* request */ #if NCORE>1 && defined(FULL_TRAIL) if (upto > 0) { Pop_Stack_Tree(); } #endif goto Up; } #else #ifdef DEBUG cpu_printf("%d: timeout\n", depth); #endif trpt->tau |= 1; goto Again; #endif } #endif #ifdef VERI BreakOut: #ifndef NOSTUTTER if (!(trpt->tau&4)) { trpt->tau |= 4; /* claim stuttering */ trpt->tau |= 128; /* stutter mark */ #ifdef DEBUG cpu_printf("%d: claim stutter\n", depth); #endif goto Stutter; } #else ; #endif #else if (!noends && !a_cycles && !endstate()) { depth--; trpt--; /* new 4.2.3 */ uerror("invalid end state"); depth++; trpt++; } #ifndef NOSTUTTER else if (a_cycles && (trpt->o_pm&2)) /* new 4.2.4 */ { depth--; trpt--; uerror("accept stutter"); depth++; trpt++; } #endif #endif } Done: if (!(trpt->tau&8)) /* not in atomic seqs */ { #ifndef MA #if defined(FULLSTACK) || defined(CNTRSTACK) #ifdef VERI if (boq == -1 && (((trpt->tau&4) && !(trpt->tau&128)) || ( (trpt-1)->tau&128))) #else if (boq == -1) #endif { #ifdef DEBUG2 #if defined(FULLSTACK) printf("%ld: zapping %u (%d)\n", depth, trpt->ostate, (trpt->ostate)?trpt->ostate->tagged:0); #endif #endif onstack_zap(); } #endif #else #ifdef VERI if (boq == -1 && (((trpt->tau&4) && !(trpt->tau&128)) || ( (trpt-1)->tau&128))) #else if (boq == -1) #endif { #ifdef DEBUG printf("%ld: zapping\n", depth); #endif onstack_zap(); #ifndef NOREDUCE if (trpt->proviso) g_store((char *) &now, vsize, 1); #endif } #endif #ifndef SAFETY if (_n != 0 #ifdef VERI /* --after-- a program-step, i.e., */ /* after backtracking a claim-step */ && (trpt->tau&4) /* with at least one running process */ /* unless in a stuttered accept state */ && ((now._nr_pr > 1) || (trpt->o_pm&2)) #endif && !(now._a_t&1)) { #ifndef NOFAIR if (fairness) { #ifdef VERBOSE cpu_printf("Consider check %d %d...\n", now._a_t, now._cnt[0]); #endif if ((now._a_t&2) /* A-bit */ && (now._cnt[0] == 1)) checkcycles(); } else #endif if (a_cycles && (trpt->o_pm&2)) checkcycles(); } #endif } if (depth > 0) { #if NCORE>1 && defined(FULL_TRAIL) if (upto > 0) { Pop_Stack_Tree(); } #endif goto Up; } } #else void new_state(void) { /* place holder */ } #endif void spin_assert(int a, char *s, int ii, int tt, Trans *t) { if (!a && !noasserts) { char bad[1024]; strcpy(bad, "assertion violated "); if (strlen(s) > 1000) { strncpy(&bad[19], (const char *) s, 1000); bad[1019] = '\0'; } else strcpy(&bad[19], s); uerror(bad); } } #ifndef NOBOUNDCHECK int Boundcheck(int x, int y, int a1, int a2, Trans *a3) { spin_assert((x >= 0 && x < y), "- invalid array index", a1, a2, a3); return x; } #endif int do_hashgen = 0; void wrap_stats(void) { if (nShadow>0) printf("%9.8g states, stored (%g visited)\n", nstates - nShadow, nstates); else printf("%9.8g states, stored\n", nstates); #ifdef BFS_PAR if (bfs_punt > 0) printf("%9.8g states lost (lack of queue memory)\n", (double) bfs_punt); #endif #ifdef BFS #if SYNC printf(" %8g nominal states (- rv and atomic)\n", nstates-midrv-nlinks+revrv); printf(" %8g rvs succeeded\n", midrv-failedrv); #else printf(" %8g nominal states (stored-atomic)\n", nstates-nlinks); #endif #ifdef DEBUG printf(" %8g midrv\n", midrv); printf(" %8g failedrv\n", failedrv); printf(" %8g revrv\n", revrv); #endif #endif printf("%9.8g states, matched\n", truncs); #ifdef CHECK printf("%9.8g matches within stack\n",truncs2); #endif if (nShadow>0) printf("%9.8g transitions (= visited+matched)\n", nstates+truncs); else printf("%9.8g transitions (= stored+matched)\n", nstates+truncs); printf("%9.8g atomic steps\n", nlinks); if (nlost) printf("%g lost messages\n", (double) nlost); #ifndef BITSTATE #ifndef MA printf("hash conflicts: %9.8g (resolved)\n", hcmp); #if !defined(AUTO_RESIZE) && !defined(BFS_PAR) if (hcmp > (double) (1<<ssize)) { printf("hint: increase hashtable-size (-w) to reduce runtime\n"); } #endif #if defined(BFS_PAR) && defined(HC) { double fp = (100. * (double) nstates)/((double) ((ulong) (1<<ssize))); int fi = 0; printf("the hash table is %3.3g %% filled", fp); if (fp > 1.0) { fp = 100. / fp; while (fp > 2.) { fi++; fp /= 2.; } if (fi > 0) { printf(" (hint: rerun with -w%d to reduce runtime)", ssize-fi); } } printf("\n"); } #endif #endif #else #ifdef CHECK printf("%8g states allocated for dfs stack\n", ngrabs); #endif if (udmem) printf("\nhash factor: %4g (best if > 100.)\n\n", (double)(((double) udmem) * 8.0) / (double) nstates); else printf("\nhash factor: %4g (best if > 100.)\n\n", ((double)(((ulong)1)<<(ssize-10)) / (double) nstates) * 1024.0); printf("bits set per state: %u (-k%u)\n", hfns, hfns); if (do_hashgen) printf("hash polynomial used: 0x%.8x\n", HASH_CONST[HASH_NR]); if (s_rand != 12345) printf("random seed used: %u\n", (uint) (s_rand-1)); #endif #if defined(BFS_DISK) && !defined(BFS_PAR) printf("bfs disk reads: %ld writes %ld -- diff %ld\n", bfs_dsk_reads, bfs_dsk_writes, bfs_dsk_writes-bfs_dsk_reads); if (bfs_dsk_read >= 0) (void) close(bfs_dsk_read); if (bfs_dsk_write >= 0) (void) close(bfs_dsk_write); (void) unlink("pan_bfs_dsk.tmp"); #endif } void wrapup(void) { double nr1, nr2, nr3 = 0.0, nr4, nr5 = 0.0; #ifdef BFS_PAR if (who_am_i != 0) { pan_exit(0); } #endif #if NCORE>1 if (verbose) cpu_printf("wrapup -- %d error(s)\n", errors); if (core_id != 0) { #ifdef USE_DISK void dsk_stats(void); dsk_stats(); #endif if (search_terminated != NULL) { *search_terminated |= 2; /* wrapup */ } exit(0); /* normal termination, not an error */ } #endif #if !defined(WIN32) && !defined(WIN64) signal(SIGINT, SIG_DFL); #endif printf("\n(%s)\n", SpinVersion); if (!done) printf("Warning: Search not completed\n"); #if defined(BFS_PAR) && !defined(BITSTATE) if (bfs_punt > 0) printf("Warning: Search incomplete\n"); #endif #ifdef SC (void) unlink((const char *)stackfile); #endif #ifdef BFS_PAR printf(" + Multi-Core (using %d cores)\n", Cores); #ifdef BFS_SEP_HASH printf(" + Separate Hash Tables\n"); #endif #ifdef BFS_DISK printf(" + Disk storage\n"); #endif #endif #if NCORE>1 if (a_cycles) { printf(" + Multi-Core (NCORE=%d)\n", NCORE); } else { printf(" + Multi-Core (NCORE=%d -z%ld)\n", NCORE, z_handoff); } #endif #ifdef BFS printf(" + Breadth-First Search\n"); #endif #ifndef NOREDUCE printf(" + Partial Order Reduction\n"); #endif #ifdef PERMUTED printf(" + Process Scheduling Permutation\n"); #endif #ifdef P_REVERSE printf(" + Reverse Depth-First Search Order\n"); #endif if (t_reverse) printf(" + Reverse Transition Ordering\n"); #ifdef T_RAND printf(" + Randomized Transition Ordering\n"); #endif #ifdef P_RAND printf(" + Randomized Process Ordering\n"); #endif #ifdef BCS printf(" + Scheduling Restriction (-L%d)\n", sched_max); #endif #ifdef TRIX printf(" + Tree Index Compression\n"); #endif #ifdef COLLAPSE printf(" + Compression\n"); #endif #ifdef MA printf(" + Graph Encoding (-DMA=%d)\n", MA); #ifdef R_XPT printf(" Restarted from checkpoint %s.xpt\n", PanSource); #endif #endif #ifdef CHECK #ifdef FULLSTACK printf(" + FullStack Matching\n"); #endif #ifdef CNTRSTACK printf(" + CntrStack Matching\n"); #endif #endif #ifdef PERMUTED if (reversing & 2) { if (p_reorder == set_permuted) { printf(" + Permuted\n"); } if (p_reorder == set_reversed) { printf(" + Reversed\n"); } if (p_reorder == set_rotated) { printf(" + Rotated %d\n", p_rotate); } if (p_reorder == set_randrot) { printf(" + RandRotated\n"); } } #endif #ifdef BITSTATE printf("\nBit statespace search for:\n"); #else #ifdef HC printf("\nHash-Compact %d search for:\n", HC); #else printf("\nFull statespace search for:\n"); #endif #endif #ifdef EVENT_TRACE #ifdef NEGATED_TRACE printf(" notrace assertion +\n"); #else printf(" trace assertion +\n"); #endif #endif #ifdef VERI printf(" never claim +"); printf(" (%s)\n", procname[((Pclaim *)pptr(0))->_t]); printf(" assertion violations "); if (noasserts) printf("- (disabled by -A flag)\n"); else printf("+ (if within scope of claim)\n"); #else #ifdef NOCLAIM printf(" never claim - (not selected)\n"); #else printf(" never claim - (none specified)\n"); #endif printf(" assertion violations "); if (noasserts) printf("- (disabled by -A flag)\n"); else printf("+\n"); #endif #ifndef SAFETY #ifdef NP printf(" non-progress cycles "); #else printf(" acceptance cycles "); #endif if (a_cycles) printf("+ (fairness %sabled)\n", fairness?"en":"dis"); else printf("- (not selected)\n"); #else #if !defined(BFS_PAR) || !defined(L_BOUND) printf(" cycle checks - (disabled by -DSAFETY)\n"); #else printf(" cycle checks + (bound %d)\n", L_bound); #endif #endif #ifdef VERI printf(" invalid end states - "); printf("(disabled by "); if (noends) printf("-E flag)\n\n"); else printf("never claim)\n\n"); #else printf(" invalid end states "); if (noends) printf("- (disabled by -E flag)\n\n"); else printf("+\n\n"); #endif printf("State-vector %d byte, depth reached %ld", hmax, #if NCORE>1 (nr_handoffs * z_handoff) + #endif mreached); printf(", errors: %d\n", errors); fflush(stdout); #ifdef MA if (done) { extern void dfa_stats(void); if (maxgs+a_cycles+2 < MA) printf("MA stats: -DMA=%d is sufficient\n", maxgs+a_cycles+2); dfa_stats(); } #endif wrap_stats(); #ifdef CHECK printf("stackframes: %d/%d\n\n", smax, svmax); printf("stats: fa %ld, fh %ld, zh %ld, zn %ld - ", Fa, Fh, Zh, Zn); printf("check %ld holds %ld\n", Ccheck, Cholds); printf("stack stats: puts %ld, probes %ld, zaps %ld\n", PUT, PROBE, ZAPS); #else printf("\n"); #endif #if !defined(BITSTATE) && defined(NOCOMP) if (!verbose) { goto jump_here; } #endif #if 1 nr1 = (nstates-nShadow)* (double)(hmax+sizeof(H_el)-sizeof(unsigned)); #ifdef BFS nr2 = 0.0; #else nr2 = (double) ((maxdepth+3)*sizeof(Trail)); #endif #ifndef BITSTATE #if !defined(MA) || defined(COLLAPSE) nr3 = (double) (ONE_L<<ssize)*sizeof(H_el *); #endif #else if (udmem) nr3 = (double) (udmem); else nr3 = (double) (ONE_L<<(ssize-3)); #ifdef CNTRSTACK nr5 = (double) (ONE_L<<(ssize-3)); #endif #ifdef FULLSTACK nr5 = (double) (maxdepth*sizeof(H_el *)); #endif #endif nr4 = (double) (svmax * (sizeof(Svtack) + hmax)) + (double) (smax * (sizeof(_Stack) + Maxbody * sizeof(char))); #ifndef MA if (1 /* verbose || memcnt < nr1+nr2+nr3+nr4+nr5 */) #endif { double remainder = memcnt; double tmp_nr = memcnt-nr3-nr4-(nr2-fragment)-nr5; #if NCORE>1 && !defined(SEP_STATE) tmp_nr -= ((double) NCORE * LWQ_SIZE) + GWQ_SIZE; #endif if (tmp_nr < 0.0) tmp_nr = 0.; printf("Stats on memory usage (in Megabytes):\n"); printf("%9.3f equivalent memory usage for states", nr1/1048576.); /* 1024*1024=1048576 */ printf(" (stored*(State-vector + overhead))\n"); #if NCORE>1 && !defined(WIN32) && !defined(WIN64) printf("%9.3f shared memory reserved for state storage\n", mem_reserved/1048576.); #ifdef SEP_HEAP printf(" in %d local heaps of %7.3f MB each\n", NCORE, mem_reserved/(NCORE*1048576.)); #endif printf("\n"); #endif #ifdef BITSTATE if (udmem) printf("%9.3f memory used for hash array (-M%ld)\n", nr3/1048576., udmem/(1024L*1024L)); else printf("%9.3f memory used for hash array (-w%d)\n", nr3/1048576., ssize); if (nr5 > 0.0) printf("%9.3f memory used for bit stack\n", nr5/1048576.); remainder = remainder - nr3 - nr5; #else #ifndef USE_TDH printf("%9.3f actual memory usage for states", tmp_nr/1048576.); remainder -= tmp_nr; if (tmp_nr > 0.) { if (tmp_nr < nr1) { printf(" (compression: %.2f%%)\n", (100.0*tmp_nr)/nr1); } else { printf("\n"); } } else { printf(" (less than 1k)\n"); } #ifndef MA if (tmp_nr > 0. && tmp_nr < nr1) { printf(" state-vector as stored = %.0f byte", (tmp_nr)/(nstates-nShadow) - (double) (sizeof(H_el) - sizeof(unsigned))); printf(" + %ld byte overhead\n", (long int) sizeof(H_el)-sizeof(unsigned)); } #endif #endif #if !defined(MA) || defined(COLLAPSE) #ifdef BFS_PAR printf("%9.3f shared memory used for hash table (-w%d)\n", ((double) bfs_pre_allocated)/1048576., ssize); #else printf("%9.3f memory used for hash table (-w%d)\n", nr3/1048576., ssize); remainder -= nr3; #endif #endif #endif #ifndef BFS printf("%9.3f memory used for DFS stack (-m%ld)\n", nr2/1048576., maxdepth); remainder -= nr2; #endif #if NCORE>1 remainder -= ((double) NCORE * LWQ_SIZE) + GWQ_SIZE; printf("%9.3f shared memory used for work-queues\n", (GWQ_SIZE + (double) NCORE * LWQ_SIZE) /1048576.); printf(" in %d queues of %7.3f MB each", NCORE, (double) LWQ_SIZE /1048576.); #ifndef NGQ printf(" + a global q of %7.3f MB\n", (double) GWQ_SIZE / 1048576.); #else printf("\n"); #endif #endif if (remainder - fragment > 1048576.) { printf("%9.3f other (proc and chan stacks)\n", (remainder-fragment)/1048576.); } if (fragment > 1048576.) { printf("%9.3f memory lost to fragmentation\n", fragment/1048576.); } #ifdef BFS_PAR printf("%9.3f total non-shared memory usage\n\n", memcnt/1048576.); #else printf("%9.3f total actual memory usage\n\n", memcnt/1048576.); #endif } #ifndef MA else #endif #endif #if !defined(BITSTATE) && defined(NOCOMP) jump_here: #endif #ifndef MA printf("%9.3f memory usage (Mbyte)\n", memcnt/1048576.); #endif #ifdef BFS_PAR bfs_report_mem(); #else printf("\n"); #endif #ifdef COLLAPSE printf("nr of templates: [ 0:globals 1:chans 2:procs ]\n"); printf("collapse counts: [ "); { int i; for (i = 0; i < 256+2; i++) if (ncomps[i] != 0) printf("%d:%lu ", i, ncomps[i]); printf("]\n"); } #endif #ifdef TRIX if (verbose) { int i; printf("TRIX counts:\n"); printf(" processes: "); for (i = 0; i < MAXPROC; i++) if (_p_count[i] != 0) { printf("%3d:%ld ", i, _p_count[i]); } printf("\n channels : "); for (i = 0; i < MAXQ; i++) if (_c_count[i] != 0) { printf("%3d:%ld ", i, _c_count[i]); } printf("\n\n"); } #endif if ((done || verbose) && !no_rck) do_reach(); #ifdef PEG { int i; printf("\nPeg Counts (transitions executed):\n"); for (i = 1; i < NTRANS; i++) { if (peg[i]) putpeg(i, peg[i]); } } #endif #ifdef VAR_RANGES dumpranges(); #endif #ifdef SVDUMP if (vprefix > 0) close(svfd); #endif #ifdef LOOPSTATE printf("%g loopstates hit\n", cnt_loops); #endif #ifdef NSUCC dump_succ(); #endif #if NCORE>1 && defined(T_ALERT) crash_report(); #endif #ifndef BFS_PAR pan_exit(0); #endif } void stopped(int arg) { #ifdef BFS_PAR bfs_shutdown("interrupted"); #endif printf("Interrupted\n"); #if NCORE>1 was_interrupted = 1; #endif wrapup(); pan_exit(0); } /* * super fast hash, based on Paul Hsieh's function * http://www.azillionmonkeys.com/qed/hash.html */ #include <stdint.h> #undef get16bits #if defined(__GNUC__) && defined(__i386__) #define get16bits(d) (*((const uint16_t *) (d))) #else #define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\ +(uint32_t)(((const uint8_t *)(d))[0]) ) #endif void d_sfh(uchar *s, int len) { uint32_t h = len, tmp; int rem; rem = len & 3; len >>= 2; for ( ; len > 0; len--) { h += get16bits(s); tmp = (get16bits(s+2) << 11) ^ h; h = (h << 16) ^ tmp; s += 2*sizeof(uint16_t); h += h >> 11; } switch (rem) { case 3: h += get16bits(s); h ^= h << 16; h ^= s[sizeof(uint16_t)] << 18; h += h >> 11; break; case 2: h += get16bits(s); h ^= h << 11; h += h >> 17; break; case 1: h += *s; h ^= h << 10; h += h >> 1; break; } h ^= h << 3; h += h >> 5; h ^= h << 4; h += h >> 17; h ^= h << 25; h += h >> 6; K1 = h; } #if WS>4 /* 64-bit Jenkins hash, 1997 * http://burtleburtle.net/bob/c/lookup8.c */ #define mix(a,b,c) \ { a -= b; a -= c; a ^= (c>>43); \ b -= c; b -= a; b ^= (a<<9); \ c -= a; c -= b; c ^= (b>>8); \ a -= b; a -= c; a ^= (c>>38); \ b -= c; b -= a; b ^= (a<<23); \ c -= a; c -= b; c ^= (b>>5); \ a -= b; a -= c; a ^= (c>>35); \ b -= c; b -= a; b ^= (a<<49); \ c -= a; c -= b; c ^= (b>>11); \ a -= b; a -= c; a ^= (c>>12); \ b -= c; b -= a; b ^= (a<<18); \ c -= a; c -= b; c ^= (b>>22); \ } #else /* 32-bit Jenkins hash, 2006 * http://burtleburtle.net/bob/c/lookup3.c */ #define rot(x,k) (((x)<<(k))|((x)>>(32-(k)))) #define mix(a,b,c) \ { a -= c; a ^= rot(c, 4); c += b; \ b -= a; b ^= rot(a, 6); a += c; \ c -= b; c ^= rot(b, 8); b += a; \ a -= c; a ^= rot(c,16); c += b; \ b -= a; b ^= rot(a,19); a += c; \ c -= b; c ^= rot(b, 4); b += a; \ } #define final(a,b,c) \ { c ^= b; c -= rot(b,14); \ a ^= c; a -= rot(c,11); \ b ^= a; b -= rot(a,25); \ c ^= b; c -= rot(b,16); \ a ^= c; a -= rot(c,4); \ b ^= a; b -= rot(a,14); \ c ^= b; c -= rot(b,24); \ } #endif void d_hash(uchar *kb, int nbytes) { uint8_t *bp; #if WS>4 uint64_t a = 0, b, c, n; const uint64_t *k = (uint64_t *) kb; #else uint32_t a = 0, b, c, n; const uint32_t *k = (uint32_t *) kb; #endif n = nbytes/WS; /* nr of words */ /* extend to multiple of words, if needed */ a = WS - (nbytes % WS); if (a > 0 && a < WS) { n++; bp = kb + nbytes; switch (a) { #if WS>4 case 7: *bp++ = 0; /* fall thru */ case 6: *bp++ = 0; /* fall thru */ case 5: *bp++ = 0; /* fall thru */ case 4: *bp++ = 0; /* fall thru */ #endif case 3: *bp++ = 0; /* fall thru */ case 2: *bp++ = 0; /* fall thru */ case 1: *bp = 0; case 0: break; } } #if WS>4 b = HASH_CONST[HASH_NR]; c = 0x9e3779b97f4a7c13LL; /* arbitrary value */ while (n >= 3) { a += k[0]; b += k[1]; c += k[2]; mix(a,b,c); n -= 3; k += 3; } c += (((uint64_t) nbytes)<<3); switch (n) { case 2: b += k[1]; case 1: a += k[0]; case 0: break; } mix(a,b,c); #else a = c = 0xdeadbeef + (n<<2); b = HASH_CONST[HASH_NR]; while (n > 3) { a += k[0]; b += k[1]; c += k[2]; mix(a,b,c); n -= 3; k += 3; } switch (n) { case 3: c += k[2]; case 2: b += k[1]; case 1: a += k[0]; final(a,b,c); case 0: break; } #endif j1_spin = c&nmask; j3_spin = a&7; /* 1st bit */ j2_spin = b&nmask; j4_spin = (a>>3)&7; /* 2nd bit */ K1 = c; K2 = b; } #if defined(MURMUR) && (WS==8) /* public-domain, 64-bit MurmurHash3, by Austin Appleby */ /* https://code.google.com/p/smhasher/wiki/MurmurHash3 */ void m_hash(uchar *v, int len) { uint8_t *bp, *data = (uint8_t*) v; int i, nblocks = len / 16; uint64_t h1 = HASH_CONST[HASH_NR]; uint64_t h2 = 0x9e3779b97f4a7c13LL; uint64_t c1 = 0x87c37b91114253d5; uint64_t c2 = 0x4cf5ad432745937f; uint64_t *blocks = (uint64_t *)(data); /* guarantee a multiple of 16 bytes */ i = 16 - (len % 16); if (i > 0 && i < 16) { nblocks++; bp = v + len; switch (i) { case 15: *bp++ = 0; /* fall thru */ case 14: *bp++ = 0; case 13: *bp++ = 0; case 12: *bp++ = 0; case 11: *bp++ = 0; case 10: *bp++ = 0; case 9: *bp++ = 0; case 8: *bp++ = 0; case 7: *bp++ = 0; case 6: *bp++ = 0; case 5: *bp++ = 0; case 4: *bp++ = 0; case 3: *bp++ = 0; case 2: *bp++ = 0; case 1: *bp = 0; case 0: break; } } for (i = 0; i < nblocks; i++) { uint64_t k1 = blocks[i*2]; uint64_t k2 = blocks[i*2+1]; k1 *= c1; k1 = (k1 << 31) | (k1 >> 33); k1 *= c2; h1 ^= k1; h1 = (h1 << 27) | (h1 >> 37); h1 += h2; h1 = h1 * 5 + 0x52dce729; k2 *= c2; k2 = (k2 << 33) | (k2 >> 31); k2 *= c1; h2 ^= k2; h2 = (h2 << 31) | (h2 >> 33); h2 += h1; h2 = h2 * 5 + 0x38495ab5; } uint8_t *tail = (uint8_t*)(data + (nblocks * 16)); uint64_t k1 = 0; uint64_t k2 = 0; switch(len & 15) { case 15: k2 ^= ((uint64_t) tail[14]) << 48; break; case 14: k2 ^= ((uint64_t) tail[13]) << 40; break; case 13: k2 ^= ((uint64_t) tail[12]) << 32; break; case 12: k2 ^= ((uint64_t) tail[11]) << 24; break; case 11: k2 ^= ((uint64_t) tail[10]) << 16; break; case 10: k2 ^= ((uint64_t) tail[ 9]) << 8; break; case 9: k2 ^= ((uint64_t) tail[ 8]) << 0; break; k2 *= c2; k2 = (k2 << 33) | (k2 >> 31); k2 *= c1; h2 ^= k2; break; case 8: k1 ^= ((uint64_t) tail[7]) << 56; break; case 7: k1 ^= ((uint64_t) tail[6]) << 48; break; case 6: k1 ^= ((uint64_t) tail[5]) << 40; break; case 5: k1 ^= ((uint64_t) tail[4]) << 32; break; case 4: k1 ^= ((uint64_t) tail[3]) << 24; break; case 3: k1 ^= ((uint64_t) tail[2]) << 16; break; case 2: k1 ^= ((uint64_t) tail[1]) << 8; break; case 1: k1 ^= ((uint64_t) tail[0]) << 0; break; k1 *= c1; k1 = (k1 << 31) | (k1 >> 33); k1 *= c2; h1 ^= k1; }; h1 ^= len; h2 ^= len; h1 += h2; h2 += h1; h1 ^= h1 >> 33; h1 *= 0xff51afd7ed558ccd; h1 ^= h1 >> 33; h1 *= 0xc4ceb9fe1a85ec53; h1 ^= h1 >> 33; h2 ^= h2 >> 33; h2 *= 0xff51afd7ed558ccd; h2 ^= h2 >> 33; h2 *= 0xc4ceb9fe1a85ec53; h2 ^= h2 >> 33; h1 += h2; h2 += h1; j1_spin = h1&nmask; j3_spin = (h1>>48)&7; j2_spin = h2&nmask; j4_spin = (h2>>48)&7; K1 = h1; K2 = h2; } #endif void s_hash(uchar *cp, int om) { hasher(cp, om); /* sets K1 */ #ifdef BITSTATE if (S_Tab == H_tab) j1_spin = K1 % omaxdepth; else #endif if (ssize < 8*WS) j1_spin = K1&mask; else j1_spin = K1; } #ifndef RANDSTOR int *prerand; void inirand(void) { int i; srand(s_rand+HASH_NR); prerand = (int *) emalloc((omaxdepth+3)*sizeof(int)); for (i = 0; i < omaxdepth+3; i++) { prerand[i] = rand(); } } int pan_rand(void) { if (!prerand) inirand(); return prerand[depth]; } #endif void set_masks(void) { if (WS == 4 && ssize >= 32) { mask = 0xffffffff; #ifdef BITSTATE switch (ssize) { case 34: nmask = (mask>>1); break; case 33: nmask = (mask>>2); break; default: nmask = (mask>>3); break; } #else nmask = mask; #endif } else if (WS == 8) { mask = ((ONE_L<<ssize)-1); /* hash init */ #ifdef BITSTATE nmask = mask>>3; #else nmask = mask; #endif } else if (WS != 4) { fprintf(stderr, "pan: wordsize %ld not supported\n", (long int) WS); exit(1); } else /* WS == 4 and ssize < 32 */ { mask = ((ONE_L<<ssize)-1); /* hash init */ nmask = (mask>>3); } } #if defined(AUTO_RESIZE) && !defined(BITSTATE) && !defined(MA) #if NCORE>1 #error cannot combine AUTO_RESIZE with NCORE>1 #endif static long reclaim_size; static char *reclaim_mem; static H_el **N_tab; void reverse_capture(H_el *p) { if (!p) return; reverse_capture(p->nxt); /* last element of list moves first */ /* to preserve list-order */ j2_spin = p->m_K1; if (ssize < 8*WS) /* probably always true */ { j2_spin &= mask; } p->nxt = N_tab[j2_spin]; N_tab[j2_spin] = p; } void resize_hashtable(void) { #ifndef BFS_PAR if (WS == 4 && ssize >= 27 - 1) #endif { return; /* cannot increase further */ } ssize += 2; /* 4x size @htable ssize */ printf("pan: resizing hashtable to -w%d.. ", ssize); N_tab = (H_el **) emalloc((ONE_L<<ssize)*sizeof(H_el *)); set_masks(); /* they changed */ for (j1_spin = 0; j1_spin < (ONE_L << (ssize - 2)); j1_spin++) { reverse_capture(H_tab[j1_spin]); } reclaim_mem = (char *) H_tab; reclaim_size = (ONE_L << (ssize - 2)); H_tab = N_tab; printf(" done\n"); } #endif #if defined(ZAPH) && defined(BITSTATE) void zap_hashtable(void) { cpu_printf("pan: resetting hashtable\n"); if (udmem) { memset(SS, 0, udmem); } else { memset(SS, 0, ONE_L<<(ssize-3)); } } #endif #if NCLAIMS>1 int find_claim(char *s) { int i, j; for (i = 0; strncmp(procname[i], ":np_:", 5) != 0; i++) { if (strcmp(s, procname[i]) == 0) { for (j = 0; j < NCLAIMS; j++) { if (spin_c_typ[j] == i) { return j; } } break; } } printf("pan: error: cannot find claim '%s'\n", s); exit(1); return -1; /* unreachable */ } #endif #if defined(BFS_PAR) && defined(BFS_SEP_HASH) int /* to avoid having to include <math.h> and compile with -lm */ blog2(int n) /* n >= 1 */ { int m=1, r=2; if (n == 1) { return 0; } if (n == 2) { return 1; } while (n > r) { m++; r *= 2; } return m; } #endif uint pp[33]; uint mul(uint a, uint b, uint p) { int c = 0; while (a) { if (a&1) { a ^= 1; c ^= b; } a = (a>>1); if (b & 0x80000000) { b += b; b ^= p; } else { b += b; } } return c; } uint ppow(int n, uint p) { uint t = 1; int i; for (i = 0; i < 32; i++) { if (n & (1<<i)) { t = mul(t, pp[i], p); } } return t; } void hashgen(void) /* courtesy Jim Reeds, 1995 */ { uint x, y, p; int i, cnt; int ff[5] = { 3, 5, 17, 257, 65537 }; int nn[5]; srand(s_rand); /* was: srandom(s_rand) */ nn[0] = ff[1]*ff[2]*ff[3]*ff[4]; nn[1] = ff[0]*ff[2]*ff[3]*ff[4]; nn[2] = ff[0]*ff[1]*ff[3]*ff[4]; nn[3] = ff[0]*ff[1]*ff[2]*ff[4]; nn[4] = ff[0]*ff[1]*ff[2]*ff[3]; for (cnt = 0; cnt < 5000; cnt++) { x = 2; p = ((rand()<<13)^rand()) | 1; /* used random() before */ pp[0] = x; for (i = 0; i < 32; i++) { pp[i+1] = mul(pp[i], pp[i], p); } if (pp[32] == x) { for (i = 0; i < 5; i++) { y = ppow(nn[i], p); if (y == 1) { break; } } if (y != 1) { HASH_CONST[0] = p; if (verbose) { printf("polynomial: 0x%.8x (%d tries)\n", p, cnt); } return; } } } fprintf(efd, "pan: could not find a polynomial in %d tries\n", cnt); fprintf(efd, "pan: try a different seed with -RSn\n"); exit(1); } int main(int argc, char *argv[]) { void to_compile(void); efd = stderr; /* default */ #if defined(BFS_PAR) && defined(BFS_SEP_HASH) uchar used_w = 0; #endif if (G_long != sizeof(long) || G_int != sizeof(int)) { printf("spin: error, the version of spin "); printf("that generated this pan.c assumed a different "); printf("wordsize (%d iso %d)\n", G_long, (int) sizeof(long)); exit(1); } #if defined(T_RAND) && (T_RAND>0) s_rand = T_RAND; #elif defined(P_RAND) && (P_RAND>0) s_rand = P_RAND; #endif #ifdef PUTPID { char *ptr = strrchr(argv[0], '/'); if (ptr == NULL) { ptr = argv[0]; } else { ptr++; } progname = emalloc(strlen(ptr)); strcpy(progname, ptr); /* printf("progname: %s\n", progname); */ } #endif #ifdef BITSTATE b_store = bstore_reg; /* default */ #endif #if NCORE>1 { int i, j; strcpy(o_cmdline, ""); for (j = 1; j < argc; j++) { strcat(o_cmdline, argv[j]); strcat(o_cmdline, " "); } /* printf("Command Line: %s\n", o_cmdline); */ if (strlen(o_cmdline) >= sizeof(o_cmdline)) { Uerror("option list too long"); } } #endif while (argc > 1 && argv[1][0] == '-') { switch (argv[1][1]) { #ifndef SAFETY #ifdef NP case 'a': fprintf(efd, "warning: -a is disabled by -DNP, ignored"); break; #else case 'a': a_cycles = 1; break; #endif #else #if defined(BFS_PAR) && defined(L_BOUND) case 'a': if (isdigit(argv[1][2])) { L_bound = atoi(&argv[1][2]); if (L_bound < 1 || L_bound > 255) { printf("usage: -aN with 0<N<256\n"); exit(1); } } break; #endif #endif case 'A': noasserts = 1; break; case 'b': bounded = 1; break; #ifdef HAS_CODE #if HAS_CODE>0 case 'C': coltrace = 1; goto samething; #endif #endif case 'c': upto = atoi(&argv[1][2]); break; case 'D': dodot++; state_tables++; break; case 'd': state_tables++; break; case 'e': every_error = 1; upto = 0; Nr_Trails = 1; break; case 'E': noends = 1; break; #ifdef SC case 'F': if (strlen(argv[1]) > 2) stackfile = &argv[1][2]; break; #endif #if !defined(SAFETY) && !defined(NOFAIR) case 'f': fairness = 1; break; #endif #ifdef HAS_CODE #if HAS_CODE>0 case 'g': gui = 1; goto samething; #endif #endif case 'h': if (strncmp(&argv[1][1], "hash", strlen("hash")) == 0) { do_hashgen = 1; break; } if (!argv[1][2] || !isdigit((int) argv[1][2])) { usage(efd); /* exits */ } HASH_NR = atoi(&argv[1][2])%(sizeof(HASH_CONST)/sizeof(uint)); break; case 'I': iterative = 2; every_error = 1; break; case 'i': if (strncmp(&argv[1][1], "i_reverse", strlen("i_reverse")) == 0) { reversing |= 1; } else { iterative = 1; every_error = 1; } break; case 'J': like_java = 1; break; /* Klaus Havelund */ #ifdef BITSTATE case 'k': hfns = atoi(&argv[1][2]); break; #endif #ifdef BCS case 'L': sched_max = atoi(&argv[1][2]); if (sched_max > 255) /* stored as one byte */ { fprintf(efd, "warning: using max bound (255)\n"); sched_max = 255; } #ifndef NOREDUCE if (sched_max == 0) { fprintf(efd, "warning: with (default) bound -L0, "); fprintf(efd, "using -DNOREDUCE performs better\n"); } #endif break; #endif #ifndef SAFETY #ifdef NP case 'l': a_cycles = 1; break; #else case 'l': fprintf(efd, "error: -l not available (compile with -DNP)"); usage(efd); break; #endif #endif #ifdef BITSTATE case 'M': udmem = atoi(&argv[1][2]); break; case 'G': udmem = atoi(&argv[1][2]); udmem *= 1024; break; #else case 'M': case 'G': fprintf(stderr, "-M and -G affect only -DBITSTATE\n"); break; #endif case 'm': maxdepth = atoi(&argv[1][2]); break; #ifndef NOCLAIM case 'N': #if NCLAIMS>1 if (isdigit((int)argv[1][2])) { whichclaim = atoi(&argv[1][2]); } else if (isalpha((int)argv[1][2])) { claimname = &argv[1][2]; } else if (argc > 2 && argv[2][0] != '-') /* check next arg */ { claimname = argv[2]; argc--; argv++; /* skip next arg */ } #else #if NCLAIMS==1 fprintf(stderr, "warning: only one claim defined, -N ignored\n"); #else fprintf(stderr, "warning: no claims defined, -N ignored\n"); #endif if (!isdigit((int)argv[1][2]) && argc > 2 && argv[2][0] != '-') { argc--; argv++; } #endif #endif break; case 'n': no_rck = 1; break; case 'P': if (!readtrail && isdigit((int) argv[1][2])) { int x = atoi(&argv[1][2]); if (x != 0 && x != 1) { fprintf(efd, "pan: bad option -P[01], ignored\n"); } if (x == 0) { reversing &= ~1; break; } if (x == 1) { reversing |= 1; break; } if (verbose) fprintf(efd, "pan: reversed *active* process creation %s\n", reversing&1?"on":"off"); break; } /* else */ #ifdef HAS_CODE #if HAS_CODE>0 readtrail = 1; onlyproc = atoi(&argv[1][2]); if (argc > 2 && argv[2][0] != '-') /* check next arg */ { trailfilename = argv[2]; argc--; argv++; /* skip next arg */ } #else fprintf(efd, "pan: option -P not recognized, ignored\n"); #endif #else fprintf(efd, "pan: option -P not recognized, ignored\n"); #endif break; case 'p': #if !defined(BFS) && !defined(BFS_PAR) #ifdef PERMUTED if (strncmp(&argv[1][1], "p_normal", strlen("p_normal")) == 0) { reversing &= ~2; break; } reversing |=2; if (strncmp(&argv[1][1], "p_permute", strlen("p_permute")) == 0) { p_reorder = set_permuted; break; } if (strncmp(&argv[1][1], "p_rotate", strlen("p_rotate")) == 0) { p_reorder = set_rotated; if (isdigit((int) argv[1][9])) { p_rotate = atoi(&argv[1][9]); } else { p_rotate = 1; } break; } if (strncmp(&argv[1][1], "p_randrot", strlen("p_randrot")) == 0) { p_reorder = set_randrot; break; } if (strncmp(&argv[1][1], "p_reverse", strlen("p_reverse")) == 0) { p_reorder = set_reversed; break; } #else if (strncmp(&argv[1][1], "p_permute", strlen("p_permute")) == 0 || strncmp(&argv[1][1], "p_rotate", strlen("p_rotate")) == 0 || strncmp(&argv[1][1], "p_randrot", strlen("p_randrot")) == 0 || strncmp(&argv[1][1], "p_reverse", strlen("p_reverse")) == 0) { fprintf(efd, "option %s required compilation with -DPERMUTED\n", argv[1]); exit(1); } #endif #endif #ifdef SVDUMP vprefix = atoi(&argv[1][2]); #else fprintf(efd, "invalid option '%s' -- ignored\n", argv[1]); #endif break; #if NCORE==1 case 'Q': quota = (double) 60.0 * (double) atoi(&argv[1][2]); #ifndef FREQ freq /= 10.; /* for better resolution */ #endif break; #endif case 'q': strict = 1; break; case 'R': if (argv[1][2] == 'S') /* e.g., -RS76842 */ { s_rand = atoi(&argv[1][3]); break; } #ifdef BITSTATE Nrun = atoi(&argv[1][2]); if (Nrun > 100) { Nrun = 100; } else if (Nrun < 1) { Nrun = 1; } #else usage(efd); break; #endif case 'r': if (strncmp(&argv[1][1], "rhash", strlen("rhash")) == 0) { if (s_rand == 12345) /* default seed */ { #if defined(WIN32) || defined(WIN64) s_rand = (uint) clock(); #else struct tms dummy_tm; s_rand = (uint) times(&dummy_tm); #endif } srand(s_rand++); #ifdef PERMUTED do_hashgen = 1; switch (rand()%5) { case 0: p_reorder = set_permuted; reversing |=2; break; case 1: p_reorder = set_reversed; reversing |=2; break; /* fully randomize p_rotate: */ case 2: p_reorder = set_randrot; reversing |=2; break; /* choose once, then keep p_rotate fixed: */ case 3: p_reorder = set_rotated; p_rotate = rand()%3; reversing |=2; break; default: /* standard search */ break; } if (rand()%2 == 0) { t_reverse = 1; } break; #else fprintf(efd, "option -rhash requires compilation with -DPERMUTED\n"); exit(1); #endif } #if defined(HAS_CODE) && HAS_CODE>0 samething: readtrail = 1; if (isdigit((int)argv[1][2])) whichtrail = atoi(&argv[1][2]); else if (argc > 2 && argv[2][0] != '-') /* check next arg */ { trailfilename = argv[2]; argc--; argv++; /* skip next arg */ } break; case 'S': silent = 1; goto samething; #else fprintf(efd, "options -r is for models with embedded C code\n"); break; #endif case 'T': if (isdigit((int) argv[1][2])) { t_reverse = atoi(&argv[1][2]); if (verbose) printf("pan: reverse transition ordering %s\n", t_reverse?"on":"off"); break; } TMODE = 0444; break; case 't': if (strncmp(&argv[1][1], "t_reverse", strlen("t_reverse")) == 0) { t_reverse = 1; break; } if (argv[1][2]) { tprefix = &argv[1][2]; } break; case 'u': #ifdef BFS_PAR ncores = atoi(&argv[1][2]); #endif break; case 'V': start_timer(); printf("Generated by %s\n", SpinVersion); to_compile(); pan_exit(2); break; case 'v': verbose++; break; case 'w': ssize = atoi(&argv[1][2]); #if defined(BFS_PAR) && defined(BFS_SEP_HASH) used_w = 1; #endif break; case 'Y': signoff = 1; break; case 'X': efd = stdout; break; case 'x': exclusive = 1; break; #if NCORE>1 /* -B ip is passthru to proxy of remote ip address: */ case 'B': argc--; argv++; break; case 'Q': worker_pids[0] = atoi(&argv[1][2]); break; /* -Un means that the nth worker should be instantiated as a proxy */ case 'U': proxy_pid = atoi(&argv[1][2]); break; /* -W means this copy is started by a cluster-server as a remote */ /* this flag is passed to ./pan_proxy, which interprets it */ case 'W': remote_party++; break; case 'Z': core_id = atoi(&argv[1][2]); if (verbose) { printf("cpu%d: pid %d parent %d\n", core_id, getpid(), worker_pids[0]); } break; case 'z': z_handoff = atoi(&argv[1][2]); break; #else case 'z': break; /* ignored for single-core */ #endif default : fprintf(efd, "saw option -%c\n", argv[1][1]); usage(efd); break; } argc--; argv++; } #if defined(BFS_PAR) && defined(BFS_SEP_HASH) if (used_w == 0) { if (ncores == 0) /* all cores used, by default */ { ssize -= blog2(BFS_MAXPROCS - 1); } else { ssize -= blog2(ncores); } } #endif if (do_hashgen) { hashgen(); } #ifndef SAFETY if (fairness && !a_cycles) { fprintf(efd, "error: -f requires the use of -a or -l\n"); usage(efd); } #if ACCEPT_LAB==0 if (a_cycles) { fprintf(efd, "warning: no accept labels are defined, "); fprintf(efd, "so option -a has no effect (ignored)\n"); a_cycles = 0; } #endif #endif #ifdef BFS_PAR uerror = bfs_uerror; Uerror = bfs_Uerror; #else uerror = dfs_uerror; Uerror = dfs_Uerror; #endif if (ssize <= 32) /* 6.2.0 */ { hasher = d_sfh; #if !defined(BITSTATE) && defined(USE_TDH) o_hash = o_hash32; #endif } else { hasher = d_hash; #if !defined(BITSTATE) && defined(USE_TDH) o_hash = o_hash64; #endif } if (iterative && TMODE != 0666) { TMODE = 0666; fprintf(efd, "warning: -T ignored when -i or -I is used\n"); } #if defined(WIN32) || defined(WIN64) #ifndef _S_IWRITE #define S_IWRITE 0000200 /* write permission, owner */ #endif #ifndef _S_IREAD #define S_IREAD 0000400 /* read permission, owner */ #endif if (TMODE == 0666) TMODE = S_IWRITE | S_IREAD; else TMODE = S_IREAD; #endif #if NCORE>1 store_proxy_pid = proxy_pid; /* for checks in mem_file() and someone_crashed() */ if (core_id != 0) { proxy_pid = 0; } #ifndef SEP_STATE if (core_id == 0 && a_cycles) { fprintf(efd, "hint: this search may be more efficient "); fprintf(efd, "if pan.c is compiled -DSEP_STATE\n"); } #endif if (z_handoff < 0) { z_handoff = 20; /* conservative default - for non-liveness checks */ } #if defined(NGQ) || defined(LWQ_FIXED) LWQ_SIZE = (double) (128.*1048576.); #else LWQ_SIZE = (double) ( z_handoff + 2.) * (double) sizeof(SM_frame); #endif #if NCORE>2 if (a_cycles) { fprintf(efd, "warning: the intended nr of cores to be used in liveness mode is 2\n"); #ifndef SEP_STATE fprintf(efd, "warning: without -DSEP_STATE there is no guarantee that all liveness violations are found\n"); #endif } #endif #ifdef HAS_HIDDEN #error cannot use hidden variables when compiling multi-core #endif #endif #if defined(T_RAND) && defined(ELSE_IN_GUARD) #error cannot hide 'else' as guard in d_step, when using -DT_RAND #endif #ifdef BITSTATE if (hfns <= 0) { hfns = 1; fprintf(efd, "warning: using -k%d as minimal usable value\n", hfns); } #endif omaxdepth = maxdepth; #ifdef BITSTATE if (WS == 4 && ssize > 34) { ssize = 34; fprintf(efd, "warning: using -w%d as max usable value\n", ssize); /* * -w35 would not work: 35-3 = 32 but 1^31 is the largest * power of 2 that can be represented in an ulong */ } #else if (WS == 4 && ssize > 27) { ssize = 27; fprintf(efd, "warning: using -w%d as max usable value\n", ssize); /* * for emalloc, the lookup table size multiplies by 4 for the pointers * the largest power of 2 that can be represented in a ulong is 1^31 * hence the largest number of lookup table slots is 31-4 = 27 */ } #endif #ifdef SC hiwater = HHH = maxdepth-10; DDD = HHH/2; if (!stackfile) { stackfile = (char *) emalloc(strlen(PanSource)+4+1); sprintf(stackfile, "%s._s_", PanSource); } if (iterative) { fprintf(efd, "error: cannot use -i or -I with -DSC\n"); pan_exit(1); } #endif #if (defined(R_XPT) || defined(W_XPT)) && !defined(MA) #warning -DR_XPT and -DW_XPT assume -DMA (ignored) #endif if (iterative && a_cycles) fprintf(efd, "warning: -i or -I work for safety properties only\n"); #ifdef BFS #ifdef SC #error -DBFS not compatible with -DSC #endif #ifdef HAS_LAST #error -DBFS not compatible with _last #endif #ifdef HAS_STACK #error cannot use c_track UnMatched with BFS #endif #ifdef BCS #error -DBFS not compatible with -DBCS #endif #ifdef REACH #warning -DREACH is redundant when -DBFS is used #endif #endif #ifdef TRIX #ifdef BITSTATE #error cannot combine -DTRIX and -DBITSTATE #endif #ifdef COLLAPSE #error cannot combine -DTRIX and -DCOLLAPSE #endif #ifdef MA #error cannot combine -DTRIX and -DMA #endif #if defined(BFS_PAR) && defined(BFS_SEP_HEAP) #error cannot combined -DBFS_SEP_HEAP with -DTRIX #endif #endif #ifdef BFS_PAR #ifdef NP #error cannot combine -DBFS_PAR and -DNP #undef NP #endif #endif #ifdef NOCLAIM #ifdef NP #warning using -DNP overrides -DNOCLAIM #undef NOCLAIM #endif #endif #ifdef BCS #ifdef P_RAND #error cannot combine -DBCS and -DP_RAND #endif #ifdef BFS #error cannot combine -DBCS and -DBFS #endif #endif #if defined(MERGED) && defined(PEG) #error to use -DPEG use: spin -o3 -a #endif #if defined(HC) && !defined(BFS_PAR) #ifdef NOCOMP #error cannot combine -DHC and -DNOCOMP #endif #ifdef BITSTATE #error cannot combine -DHC and -DBITSTATE #endif #endif #if defined(SAFETY) && defined(NP) #error cannot combine -DNP and -DBFS or -DSAFETY #endif #ifdef MA #ifdef BITSTATE #error cannot combine -DMA and -DBITSTATE #endif #if MA <= 0 #error usage: -DMA=N with N > 0 and N < VECTORSZ #endif #endif #ifdef COLLAPSE #ifdef BITSTATE #error cannot combine -DBITSTATE and -DCOLLAPSE #endif #ifdef NOCOMP #error cannot combine -DCOLLAPSE and -DNOCOMP #endif #endif if (maxdepth <= 0 || ssize <= 1) usage(efd); #if SYNC>0 && !defined(NOREDUCE) if (a_cycles && fairness) { fprintf(efd, "error: p.o. reduction not compatible with "); fprintf(efd, "fairness (-f) in models\n"); fprintf(efd, " with rendezvous operations: "); fprintf(efd, "recompile with -DNOREDUCE\n"); pan_exit(1); } #endif #if defined(REM_VARS) && !defined(NOREDUCE) #warning p.o. reduction not compatible with remote varrefs (use -DNOREDUCE) #endif #if defined(NOCOMP) && !defined(BITSTATE) if (a_cycles) { fprintf(efd, "error: use of -DNOCOMP voids -l and -a\n"); pan_exit(1); } #endif #ifdef MEMLIM memlim = ((double) MEMLIM) * (double) (1<<20); /* size in Mbyte */ #endif #if SYNC>0 #ifdef HAS_PRIORITY #error use of priorities cannot be combined with rendezvous #elif HAS_ENABLED #error use of enabled() cannot be combined with rendezvous #endif #endif #ifndef NOREDUCE #ifdef HAS_PRIORITY #warning use of priorities requires -DNOREDUCE #elif HAS_ENABLED #error use of enabled() requires -DNOREDUCE #endif #ifdef HAS_PCVALUE #error use of pcvalue() requires -DNOREDUCE #endif #ifdef HAS_BADELSE #error use of 'else' combined with i/o stmnts requires -DNOREDUCE #endif #if defined(HAS_LAST) && !defined(BCS) #error use of _last requires -DNOREDUCE #endif #endif #if SYNC>0 && !defined(NOREDUCE) #ifdef HAS_UNLESS fprintf(efd, "warning: use of a rendezvous stmnts in the escape\n"); fprintf(efd, " of an unless clause, if present, could make p.o. reduction\n"); fprintf(efd, " invalid (use -DNOREDUCE to avoid this)\n"); #ifdef BFS fprintf(efd, " (this type of rv is also not compatible with -DBFS)\n"); #endif #endif #endif #if SYNC>0 && defined(BFS) if (!noends) fprintf(efd, "warning: use of rendezvous with BFS does not preserve all invalid endstates\n"); #endif #if !defined(REACH) && !defined(BITSTATE) if (iterative != 0 && a_cycles == 0) { fprintf(efd, "warning: -i and -I need -DREACH to work accurately\n"); } #endif #if defined(BITSTATE) && defined(REACH) #warning -DREACH is voided by -DBITSTATE #endif #if defined(MA) && defined(REACH) #warning -DREACH is voided by -DMA #endif #if defined(FULLSTACK) && defined(CNTRSTACK) #error cannot combine -DFULLSTACK and -DCNTRSTACK #endif #if defined(VERI) #if ACCEPT_LAB>0 #ifndef BFS if (!a_cycles #ifdef HAS_CODE && !readtrail #endif #if NCORE>1 && core_id == 0 #endif && !state_tables) { fprintf(efd, "warning: never claim + accept labels "); fprintf(efd, "requires -a flag to fully verify\n"); } #else if (verbose && !state_tables #ifdef HAS_CODE && !readtrail #endif ) { fprintf(efd, "warning: verification in BFS mode "); fprintf(efd, "is restricted to safety properties\n"); } #endif #endif #endif #ifndef SAFETY #if 0 if (!a_cycles #ifdef HAS_CODE && !readtrail #endif #if NCORE>1 && core_id == 0 #endif && !state_tables) { fprintf(efd, "hint: this search is more efficient "); fprintf(efd, "if pan.c is compiled -DSAFETY\n"); } #endif #ifndef NOCOMP if (!a_cycles) { S_A = 0; } else { if (!fairness) { S_A = 1; /* _a_t */ #ifndef NOFAIR } else /* _a_t and _cnt[NFAIR] */ { S_A = (&(now._cnt[0]) - (uchar *) &now) + NFAIR - 2; /* -2 because first two uchars in now are masked */ #endif } } #endif #endif signal(SIGINT, stopped); set_masks(); #if defined(BFS) || defined(BFS_PAR) trail = (Trail *) emalloc(6*sizeof(Trail)); trail += 3; #else trail = (Trail *) emalloc((maxdepth+3)*sizeof(Trail)); trail++; /* protect trpt-1 refs at depth 0 */ #endif trpt = &trail[0]; /* precaution -- in case uerror is called early */ #ifdef BFS ntrpt = trpt; #endif #ifdef SVDUMP if (vprefix > 0) { char nm[64]; sprintf(nm, "%s.svd", PanSource); if ((svfd = creat(nm, TMODE)) < 0) { fprintf(efd, "couldn't create %s\n", nm); vprefix = 0; } } #endif #ifdef RANDSTOR srand(s_rand+HASH_NR); #endif #if SYNC>0 && ASYNC==0 set_recvs(); #endif run(); done = 1; wrapup(); return 0; } void usage(FILE *fd) { fprintf(fd, "%s\n", SpinVersion); fprintf(fd, "Valid Options are:\n"); #ifndef SAFETY #ifdef NP fprintf(fd, " -a -> is disabled by -DNP "); fprintf(fd, "(-DNP compiles for -l only)\n"); #else fprintf(fd, " -a find acceptance cycles\n"); #endif #else fprintf(fd, " -a,-l,-f -> are disabled by -DSAFETY\n"); #endif fprintf(fd, " -A ignore assert() violations\n"); fprintf(fd, " -b consider it an error to exceed the depth-limit\n"); fprintf(fd, " -cN stop at Nth error "); fprintf(fd, "(defaults to -c1)\n"); fprintf(fd, " -D print state tables in dot-format and stop\n"); fprintf(fd, " -d print state tables and stop\n"); fprintf(fd, " -e create trails for all errors\n"); fprintf(fd, " -E ignore invalid end states\n"); #ifdef SC fprintf(fd, " -Ffile use 'file' to store disk-stack\n"); #endif #ifndef NOFAIR fprintf(fd, " -f add weak fairness (to -a or -l)\n"); #endif fprintf(fd, " -hN use different hash-seed N:0..499 (defaults to -h0)\n"); fprintf(fd, " -hash generate a random hash-polynomial for -h0 (see also -rhash)\n"); fprintf(fd, " using a seed set with -RSn (default %u)\n", s_rand); fprintf(fd, " -i search for shortest path to error\n"); fprintf(fd, " -I like -i, but approximate and faster\n"); fprintf(fd, " -J reverse eval order of nested unlesses\n"); #ifdef BITSTATE fprintf(fd, " -kN set N bits per state (defaults to 3)\n"); #endif #ifdef BCS fprintf(fd, " -LN set scheduling restriction to N (default 0)\n"); #endif #ifndef SAFETY #ifdef NP fprintf(fd, " -l find non-progress cycles\n"); #else fprintf(fd, " -l find non-progress cycles -> "); fprintf(fd, "disabled, requires "); fprintf(fd, "compilation with -DNP\n"); #endif #endif #ifdef BITSTATE fprintf(fd, " -MN use N Megabytes for bitstate hash array\n"); fprintf(fd, " -GN use N Gigabytes for bitstate hash array\n"); #endif fprintf(fd, " -mN max depth N steps (default=10k)\n"); #if NCLAIMS>1 fprintf(fd, " -N cn -- use the claim named cn\n"); fprintf(fd, " -Nn -- use claim number n\n"); #endif fprintf(fd, " -n no listing of unreached states\n"); #ifdef PERMUTED fprintf(fd, " -p_permute randomize order in which processes are scheduled (see also -rhash)\n"); fprintf(fd, " -p_reverse reverse order in which processes are scheduled (see also -rhash)\n"); fprintf(fd, " -p_rotateN rotate by N the process scheduling order (see also -rhash)\n"); #endif #ifdef SVDUMP fprintf(fd, " -pN create svfile (save N bytes per state)\n"); #endif fprintf(fd, " -QN set time-limit on execution of N minutes\n"); fprintf(fd, " -q require empty chans in valid end states\n"); #ifdef HAS_CODE fprintf(fd, " -r read and execute trail - can add -v,-n,-PN,-g,-C\n"); fprintf(fd, " -r trailfilename read and execute trail in file\n"); fprintf(fd, " -rN read and execute N-th error trail\n"); fprintf(fd, " -C read and execute trail - columnated output (can add -v,-n)\n"); fprintf(fd, " -r -PN read and execute trail - restrict trail output to proc N\n"); fprintf(fd, " -g read and execute trail + msc gui support\n"); fprintf(fd, " -S silent replay: only user defined printfs show\n"); #endif fprintf(fd, " -RSn use randomization seed n\n"); fprintf(fd, " -rhash use random hash-polynomial and randomly choose -p_rotateN, -p_permute, or p_reverse\n"); #ifdef BITSTATE fprintf(fd, " -Rn run n times n: [1..100] using n "); fprintf(fd, " different hash functions\n"); #endif fprintf(fd, " -T create trail files in read-only mode\n"); fprintf(fd, " -t_reverse reverse order in which transitions are explored\n"); fprintf(fd, " -tsuf replace .trail with .suf on trailfiles\n"); fprintf(fd, " -V print SPIN version number\n"); fprintf(fd, " -v verbose -- filenames in unreached state listing\n"); fprintf(fd, " -wN hashtable of 2^N entries "); fprintf(fd, "(defaults to -w%d)\n", ssize); fprintf(fd, " -x do not overwrite an existing trail file\n"); #if NCORE>1 fprintf(fd, " -zN handoff states below depth N to 2nd cpu (multi_core)\n"); #endif #ifdef HAS_CODE fprintf(fd, "\n options -r, -C, -PN, -g, and -S can optionally be followed by\n"); fprintf(fd, " a filename argument, as in '-r filename', naming the trailfile\n"); #endif #if NCORE>1 multi_usage(fd); #endif exit(1); } char * Malloc(ulong n) { char *tmp; #ifdef MEMLIM if (memcnt + (double) n > memlim) { printf("pan: reached -DMEMLIM bound\n"); goto err; } #endif tmp = (char *) malloc(n); if (!tmp) { #ifdef BFS_PAR Uerror("out of non-shared memory"); #endif printf("pan: out of memory\n"); #ifdef MEMLIM err: printf(" %g bytes used\n", memcnt); printf(" %g bytes more needed\n", (double) n); printf(" %g bytes limit\n", memlim); #endif #ifdef COLLAPSE printf("hint: to reduce memory, recompile with\n"); #ifndef MA printf(" -DMA=%d # better/slower compression, or\n", hmax); #endif printf(" -DBITSTATE # supertrace, approximation\n"); #else #ifndef BITSTATE printf("hint: to reduce memory, recompile with\n"); #ifndef HC printf(" -DCOLLAPSE # good, fast compression, or\n"); #ifndef MA printf(" -DMA=%d # better/slower compression, or\n", hmax); #endif printf(" -DHC # hash-compaction, approximation\n"); #endif printf(" -DBITSTATE # supertrace, approximation\n"); #endif #endif #if NCORE>1 #ifdef FULL_TRAIL printf(" omit -DFULL_TRAIL or use pan -c0 to reduce memory\n"); #endif #ifdef SEP_STATE printf("hint: to reduce memory, recompile without\n"); printf(" -DSEP_STATE # may be faster, but uses more memory\n"); #endif #endif wrapup(); } memcnt += (double) n; return tmp; } #define CHUNK (100*VECTORSZ) char * emalloc(ulong n) /* never released or reallocated */ { char *tmp; if (n == 0) return (char *) NULL; if (n&(sizeof(void *)-1)) /* for proper alignment */ n += sizeof(void *)-(n&(sizeof(void *)-1)); if ((ulong) left < n) { grow = (n < CHUNK) ? CHUNK : n; have = Malloc(grow); fragment += (double) left; left = grow; } tmp = have; have += (long) n; left -= (long) n; memset(tmp, 0, n); return tmp; } void dfs_Uerror(char *str) { /* always fatal */ uerror(str); #if NCORE>1 sudden_stop("Uerror"); #endif #ifdef BFS_PAR bfs_shutdown("Uerror"); #endif wrapup(); } #if defined(MA) && !defined(SAFETY) int Unwind(void) { Trans *t; uchar ot, _m; int tt; short II; #ifdef VERBOSE int i; #endif uchar oat = now._a_t; now._a_t &= ~(1|16|32); memcpy((char *) &comp_now, (char *) &now, vsize); now._a_t = oat; Up: #ifdef SC trpt = getframe(depth); #endif #ifdef VERBOSE printf("%ld State: ", depth); #if !defined(NOCOMP) && !defined(HC) for (i = 0; i < vsize; i++) printf("%d%s,", ((char *)&now)[i], Mask[i]?"*":""); #else for (i = 0; i < vsize; i++) printf("%d,", ((char *)&now)[i]); #endif printf("\n"); #endif #ifndef NOFAIR if (trpt->o_pm&128) /* fairness alg */ { now._cnt[now._a_t&1] = trpt->bup.oval; depth--; #ifdef SC trpt = getframe(depth); #else trpt--; #endif goto Q999; } #endif #ifdef HAS_LAST #ifdef VERI { long d; Trail *trl; now._last = 0; for (d = 1; d < depth; d++) { trl = getframe(depth-d); /* was trl = (trpt-d); */ if (trl->pr != 0) { now._last = trl->pr - BASE; break; } } } #else now._last = (depth<1)?0:(trpt-1)->pr; #endif #endif #ifdef EVENT_TRACE now._event = trpt->o_event; #endif if ((now._a_t&1) && depth <= A_depth) { now._a_t &= ~(1|16|32); if (fairness) now._a_t |= 2; /* ? */ A_depth = 0; goto CameFromHere; /* checkcycles() */ } t = trpt->o_t; ot = trpt->o_ot; II = trpt->pr; tt = trpt->o_tt; this = pptr(II); _m = do_reverse(t, II, trpt->o_m); #ifdef VERBOSE printf("%3ld: proc %d ", depth, II); printf("reverses %d, %d to %d,", t->forw, tt, t->st); printf(" %s [abit=%d,adepth=%ld,", t->tp, now._a_t, A_depth); printf("tau=%d,%d] <unwind>\n", trpt->tau, (trpt-1)->tau); #endif depth--; #ifdef SC trpt = getframe(depth); #else trpt--; #endif /* reached[ot][t->st] = 1; 3.4.13 */ ((P0 *)this)->_p = tt; #ifndef NOFAIR if ((trpt->o_pm&32)) { #ifdef VERI if (now._cnt[now._a_t&1] == 0) now._cnt[now._a_t&1] = 1; #endif now._cnt[now._a_t&1] += 1; } Q999: if (trpt->o_pm&8) { now._a_t &= ~2; now._cnt[now._a_t&1] = 0; } if (trpt->o_pm&16) now._a_t |= 2; #endif CameFromHere: if (memcmp((char *) &now, (char *) &comp_now, vsize) == 0) return depth; if (depth > 0) goto Up; return 0; } #endif static char unwinding; void dfs_uerror(char *str) { static char laststr[256]; int is_cycle; if (unwinding) return; /* 1.4.2 */ if (strncmp(str, laststr, 254)) #if NCORE>1 cpu_printf("pan:%d: %s (at depth %ld)\n", errors+1, str, #else printf("pan:%d: %s (at depth %ld)\n", errors+1, str, #endif #if NCORE>1 (nr_handoffs * z_handoff) + #endif ((depthfound == -1)?depth:depthfound)); strncpy(laststr, str, 254); errors++; #ifdef HAS_CODE if (readtrail) { wrap_trail(); return; } #endif is_cycle = (strstr(str, " cycle") != (char *) 0); if (!is_cycle) { depth++; trpt++; } if ((every_error != 0) || errors == upto) { #if defined(MA) && !defined(SAFETY) if (is_cycle) { int od = depth; unwinding = 1; depthfound = Unwind(); unwinding = 0; depth = od; } #endif #if NCORE>1 writing_trail = 1; #endif #ifdef BFS if (depth > 1) trpt--; nuerror(); if (depth > 1) trpt++; #else putrail(); #endif #if defined(MA) && !defined(SAFETY) if (strstr(str, " cycle")) { if (every_error) printf("sorry: MA writes 1 trail max\n"); wrapup(); /* no recovery from unwind */ } #endif #if NCORE>1 if (search_terminated != NULL) { *search_terminated |= 4; /* uerror */ } writing_trail = 0; #endif } if (!is_cycle) { depth--; trpt--; /* undo */ } #ifndef BFS if (iterative != 0 && maxdepth > 0) { if (maxdepth > depth) { maxdepth = (iterative == 1)?(depth+1):(depth/2); } warned = 1; printf("pan: reducing search depth to %ld\n", maxdepth); } else #endif if (errors >= upto && upto != 0) { #ifdef BFS_PAR bfs_shutdown("uerror"); /* no return */ #endif #if NCORE>1 sudden_stop("uerror"); #endif wrapup(); } depthfound = -1; } int xrefsrc(int lno, S_F_MAP *mp, int M, int i) { Trans *T; int j, retval=1; for (T = trans[M][i]; T; T = T->nxt) if (T && T->tp) { if (strcmp(T->tp, ".(goto)") == 0 || strncmp(T->tp, "goto :", 6) == 0) return 1; /* not reported */ for (j = 0; j < sizeof(mp); j++) if (i >= mp[j].from && i <= mp[j].upto) { printf("\t%s:%d", mp[j].fnm, lno); break; } if (j >= sizeof(mp)) /* fnm not found in list */ { printf("\t%s:%d", PanSource, lno); /* use default */ } printf(", state %d", i); if (strcmp(T->tp, "") != 0) { char *q; q = transmognify(T->tp); printf(", \"%s\"", q?q:""); } else if (stopstate[M][i]) printf(", -end state-"); printf("\n"); retval = 0; /* reported */ } return retval; } void r_ck(uchar *which, int N, int M, short *src, S_F_MAP *mp) { int i, m=0; if ((enum btypes) Btypes[M] == N_CLAIM && claimname != NULL && strcmp(claimname, procname[M]) != 0) { return; } switch ((enum btypes) Btypes[M]) { case P_PROC: case A_PROC: printf("unreached in proctype %s\n", procname[M]); break; case I_PROC: printf("unreached in init\n"); break; case E_TRACE: case N_TRACE: case N_CLAIM: default: printf("unreached in claim %s\n", procname[M]); break; } for (i = 1; i < N; i++) { if (which[i] == 0 && (mapstate[M][i] == 0 || which[mapstate[M][i]] == 0)) { m += xrefsrc((int) src[i], mp, M, i); } else { m++; } } printf(" (%d of %d states)\n", N-1-m, N-1); } #if NCORE>1 && !defined(SEP_STATE) static long rev_trail_cnt; #ifdef FULL_TRAIL void rev_trail(int fd, volatile Stack_Tree *st_tr) { long j; char snap[64]; if (!st_tr) { return; } rev_trail(fd, st_tr->prv); #ifdef VERBOSE printf("%d (%d) LRT [%d,%d] -- %9u (root %9u)\n", depth, rev_trail_cnt, st_tr->pr, st_tr->t_id, st_tr, stack_last[core_id]); #endif if (st_tr->pr != 255) { sprintf(snap, "%ld:%d:%d\n", rev_trail_cnt++, st_tr->pr, st_tr->t_id); j = strlen(snap); if (write(fd, snap, j) != j) { printf("pan: error writing trailfile\n"); close(fd); wrapup(); return; } } else /* handoff point */ { if (a_cycles) { (void) write(fd, "-1:-1:-1\n", 9); } } } #endif #endif void putrail(void) { int fd; #if defined VERI || defined(MERGED) char snap[64]; #endif #if NCORE==1 || defined(SEP_STATE) || !defined(FULL_TRAIL) long i, j; Trail *trl; #endif fd = make_trail(); if (fd < 0) return; #ifdef VERI sprintf(snap, "-2:%d:-2\n", (uchar) ((P0 *)pptr(0))->_t); if (write(fd, snap, strlen(snap)) < 0) return; #endif #ifdef MERGED sprintf(snap, "-4:-4:-4\n"); if (write(fd, snap, strlen(snap)) < 0) return; #endif #ifdef PERMUTED sprintf(snap, "-5:%d:%d\n", t_reverse, reversing&2); if (write(fd, snap, strlen(snap)) < 0) return; sprintf(snap, "-6:%d:%d\n", p_reorder==set_permuted, p_reorder==set_reversed); if (write(fd, snap, strlen(snap)) < 0) return; sprintf(snap, "-7:%d:%d\n", p_reorder==set_rotated, p_rotate); if (write(fd, snap, strlen(snap)) < 0) return; sprintf(snap, "-8:%d:%d\n", p_reorder==set_randrot, --s_rand); if (write(fd, snap, strlen(snap)) < 0) return; #endif #if NCORE>1 && !defined(SEP_STATE) && defined(FULL_TRAIL) rev_trail_cnt = 1; enter_critical(GLOBAL_LOCK); rev_trail(fd, stack_last[core_id]); leave_critical(GLOBAL_LOCK); #else i = 1; /* trail starts at position 1 */ #if NCORE>1 && defined(SEP_STATE) if (cur_Root.m_vsize > 0) { i++; depth++; } #endif for ( ; i <= depth; i++) { if (i == depthfound+1) { if (write(fd, "-1:-1:-1\n", 9) != 9) { goto notgood; } } trl = getframe(i); if (!trl->o_t) continue; if (trl->o_pm&128) continue; sprintf(snap, "%ld:%d:%d\n", i, trl->pr, trl->o_t->t_id); j = strlen(snap); if (write(fd, snap, j) != j) { notgood: printf("pan: error writing trailfile\n"); close(fd); wrapup(); } } #endif close(fd); #if NCORE>1 cpu_printf("pan: wrote trailfile\n"); #endif } void sv_save(void) /* push state vector onto save stack */ { if (!svtack->nxt) { svtack->nxt = (Svtack *) emalloc(sizeof(Svtack)); svtack->nxt->body = emalloc(vsize*sizeof(char)); svtack->nxt->lst = svtack; svtack->nxt->m_delta = vsize; svmax++; } else if (vsize > svtack->nxt->m_delta) { svtack->nxt->body = emalloc(vsize*sizeof(char)); svtack->nxt->lst = svtack; svtack->nxt->m_delta = vsize; svmax++; } svtack = svtack->nxt; #if SYNC svtack->o_boq = boq; #endif #ifdef TRIX sv_populate(); #endif svtack->o_delta = vsize; /* don't compress */ memcpy((char *)(svtack->body), (char *) &now, vsize); #if defined(C_States) && defined(HAS_STACK) && (HAS_TRACK==1) c_stack((uchar *) &(svtack->c_stack[0])); #endif #ifdef DEBUG cpu_printf("%d: sv_save\n", depth); #endif } void sv_restor(void) /* pop state vector from save stack */ { memcpy((char *)&now, svtack->body, svtack->o_delta); #if SYNC boq = svtack->o_boq; #endif #ifdef TRIX re_populate(); #endif #if defined(C_States) && (HAS_TRACK==1) #ifdef HAS_STACK c_unstack((uchar *) &(svtack->c_stack[0])); #endif c_revert((uchar *) &(now.c_state[0])); #endif if (vsize != svtack->o_delta) Uerror("sv_restor"); if (!svtack->lst) Uerror("error: sv_restor"); svtack = svtack->lst; #ifdef DEBUG cpu_printf(" sv_restor\n"); #endif } void p_restor(int h) { int i; char *z = (char *) &now; #ifdef BFS_PAR bfs_prepmask(1); /* p_restor */ #endif #ifndef TRIX proc_offset[h] = stack->o_offset; proc_skip[h] = (uchar) stack->o_skip; #else char *oi; #ifdef V_TRIX printf("%4d: p_restor %d\n", depth, h); #endif #endif #ifndef XUSAFE p_name[h] = stack->o_name; #endif #ifdef TRIX vsize += sizeof(char *); #ifndef BFS if (processes[h] != NULL || freebodies == NULL) { Uerror("processes error"); } processes[h] = freebodies; freebodies = freebodies->nxt; processes[h]->nxt = (TRIX_v6 *) 0; processes[h]->modified = 1; /* p_restor */ #endif processes[h]->parent_pid = stack->parent; processes[h]->psize = stack->o_delta; memcpy((char *)pptr(h), stack->b_ptr, stack->o_delta); oi = stack->b_ptr; #else #if !defined(NOCOMP) && !defined(HC) for (i = vsize + stack->o_skip; i > vsize; i--) Mask[i-1] = 1; /* align */ #endif vsize += stack->o_skip; memcpy(z+vsize, stack->body, stack->o_delta); vsize += stack->o_delta; #if !defined(NOCOMP) && !defined(HC) for (i = 1; i <= Air[((P0 *)pptr(h))->_t]; i++) Mask[vsize - i] = 1; /* pad */ Mask[proc_offset[h]] = 1; /* _pid */ #endif if (BASE > 0 && h > 0) ((P0 *)pptr(h))->_pid = h-BASE; else ((P0 *)pptr(h))->_pid = h; #ifdef BFS_PAR bfs_fixmask(1); /* p_restor */ #endif #endif now._nr_pr += 1; #ifndef NOVSZ now._vsz = vsize; #endif i = stack->o_delqs; if (!stack->lst) Uerror("error: p_restor"); stack = stack->lst; this = pptr(h); while (i-- > 0) q_restor(); #ifdef TRIX re_mark_all(1); /* p_restor - all chans move up in _ids_ */ now._ids_[h] = oi; /* restor the original contents */ #endif } void q_restor(void) { int h = now._nr_qs; #ifdef TRIX #ifdef V_TRIX printf("%4d: q_restor %d\n", depth, h); #endif vsize += sizeof(char *); #ifndef BFS if (channels[h] != NULL || freebodies == NULL) { Uerror("channels error"); } channels[h] = freebodies; freebodies = freebodies->nxt; channels[h]->nxt = (TRIX_v6 *) 0; channels[h]->modified = 1; /* q_restor */ #endif channels[h]->parent_pid = stack->parent; channels[h]->psize = stack->o_delta; memcpy((char *)qptr(h), stack->b_ptr, stack->o_delta); now._ids_[now._nr_pr + h] = stack->b_ptr; #else char *z = (char *) &now; #ifndef NOCOMP int k, k_end; #endif #ifdef BFS_PAR bfs_prepmask(2); /* q_restor */ #endif q_offset[h] = stack->o_offset; q_skip[h] = (uchar) stack->o_skip; vsize += stack->o_skip; memcpy(z+vsize, stack->body, stack->o_delta); vsize += stack->o_delta; #endif #ifndef XUSAFE q_name[h] = stack->o_name; #endif #ifndef NOVSZ now._vsz = vsize; #endif now._nr_qs += 1; #ifndef TRIX #if !defined(NOCOMP) && !defined(HC) k_end = stack->o_offset; k = k_end - stack->o_skip; #if SYNC #ifndef BFS if (q_zero(now._nr_qs)) k_end += stack->o_delta; #endif #endif for ( ; k < k_end; k++) Mask[k] = 1; #endif #ifdef BFS_PAR bfs_fixmask(2); /* q_restor */ #endif #endif if (!stack->lst) Uerror("error: q_restor"); stack = stack->lst; } typedef struct IntChunks { int *ptr; struct IntChunks *nxt; } IntChunks; IntChunks *filled_chunks[512]; IntChunks *empty_chunks[512]; int * grab_ints(int nr) { IntChunks *z; if (nr >= 512) Uerror("cannot happen grab_int"); if (filled_chunks[nr]) { z = filled_chunks[nr]; filled_chunks[nr] = filled_chunks[nr]->nxt; } else { z = (IntChunks *) emalloc(sizeof(IntChunks)); z->ptr = (int *) emalloc(nr * sizeof(int)); } z->nxt = empty_chunks[nr]; empty_chunks[nr] = z; return z->ptr; } void ungrab_ints(int *p, int nr) { IntChunks *z; if (!empty_chunks[nr]) Uerror("cannot happen ungrab_int"); z = empty_chunks[nr]; empty_chunks[nr] = empty_chunks[nr]->nxt; z->ptr = p; z->nxt = filled_chunks[nr]; filled_chunks[nr] = z; } int delproc(int sav, int h) { int d, i=0; #ifndef NOCOMP int o_vsize = vsize; #endif if (h+1 != (int) now._nr_pr) { return 0; } #ifdef TRIX #ifdef V_TRIX printf("%4d: delproc %d -- parent %d\n", depth, h, processes[h]->parent_pid); if (now._nr_qs > 0) printf(" top channel: %d -- parent %d\n", now._nr_qs-1, channels[now._nr_qs-1]->parent_pid); #endif while (now._nr_qs > 0 && channels[now._nr_qs-1]->parent_pid == processes[h]->parent_pid) { delq(sav); i++; } d = processes[h]->psize; if (sav) { if (!stack->nxt) { stack->nxt = (_Stack *) emalloc(sizeof(_Stack)); stack->nxt->lst = stack; smax++; } stack = stack->nxt; #ifndef XUSAFE stack->o_name = p_name[h]; #endif stack->parent = processes[h]->parent_pid; stack->o_delta = d; stack->o_delqs = i; stack->b_ptr = now._ids_[h]; } memset((char *)pptr(h), 0, d); #ifndef BFS processes[h]->nxt = freebodies; freebodies = processes[h]; processes[h] = (TRIX_v6 *) 0; #endif vsize -= sizeof(char *); now._nr_pr -= 1; re_mark_all(-1); /* delproc - all chans move down in _ids_ */ #else while (now._nr_qs && q_offset[now._nr_qs-1] > proc_offset[h]) { delq(sav); i++; } d = vsize - proc_offset[h]; if (sav) { if (!stack->nxt) { stack->nxt = (_Stack *) emalloc(sizeof(_Stack)); stack->nxt->body = emalloc(Maxbody * sizeof(char)); stack->nxt->lst = stack; smax++; } stack = stack->nxt; stack->o_offset = proc_offset[h]; #if VECTORSZ>32000 stack->o_skip = (int) proc_skip[h]; #else stack->o_skip = (short) proc_skip[h]; #endif #ifndef XUSAFE stack->o_name = p_name[h]; #endif stack->o_delta = d; stack->o_delqs = i; memcpy(stack->body, (char *)pptr(h), d); } vsize = proc_offset[h]; now._nr_pr -= 1; memset((char *)pptr(h), 0, d); vsize -= (int) proc_skip[h]; #if !defined(NOCOMP) && !defined(HC) #ifdef BFS_PAR bfs_prepmask(3); /* delproc - no chance in proc_offset or proc_skip */ #endif for (i = vsize; i < o_vsize; i++) Mask[i] = 0; /* reset */ #ifdef BFS_PAR bfs_fixmask(3); /* delproc */ #endif #endif #endif #ifndef NOVSZ now._vsz = vsize; #endif return 1; } void delq(int sav) { int h = now._nr_qs - 1; #ifdef TRIX int d = channels[now._nr_qs - 1]->psize; #else int d = vsize - q_offset[now._nr_qs - 1]; #endif #ifndef NOCOMP int k, o_vsize = vsize; #endif if (sav) { if (!stack->nxt) { stack->nxt = (_Stack *) emalloc(sizeof(_Stack)); #ifndef TRIX stack->nxt->body = emalloc(Maxbody * sizeof(char)); #endif stack->nxt->lst = stack; smax++; } stack = stack->nxt; #ifdef TRIX stack->parent = channels[h]->parent_pid; stack->b_ptr = now._ids_[h]; #else stack->o_offset = q_offset[h]; #if VECTORSZ>32000 stack->o_skip = (int) q_skip[h]; #else stack->o_skip = (short) q_skip[h]; #endif #endif #ifndef XUSAFE stack->o_name = q_name[h]; #endif stack->o_delta = d; #ifndef TRIX memcpy(stack->body, (char *)qptr(h), d); #endif } #ifdef TRIX vsize -= sizeof(char *); #ifdef V_TRIX printf("%4d: delq %d parent %d\n", depth, h, channels[h]->parent_pid); #endif #else vsize = q_offset[h]; vsize -= (int) q_skip[h]; #if !defined(NOCOMP) && !defined(HC) #ifdef BFS_PAR bfs_prepmask(3); /* delq - no change in q_offset or q_skip */ #endif for (k = vsize; k < o_vsize; k++) Mask[k] = 0; /* reset */ #ifdef BFS_PAR bfs_fixmask(3); /* delq */ #endif #endif #endif now._nr_qs -= 1; memset((char *)qptr(h), 0, d); #ifdef TRIX #ifndef BFS channels[h]->nxt = freebodies; freebodies = channels[h]; channels[h] = (TRIX_v6 *) 0; #endif #endif #ifndef NOVSZ now._vsz = vsize; #endif } int qs_empty(void) { int i; for (i = 0; i < (int) now._nr_qs; i++) { if (q_sz(i) > 0) return 0; } return 1; } int endstate(void) { int i; P0 *ptr; for (i = BASE; i < (int) now._nr_pr; i++) { ptr = (P0 *) pptr(i); if (!stopstate[ptr->_t][ptr->_p]) return 0; } if (strict) return qs_empty(); #if defined(EVENT_TRACE) if (!stopstate[EVENT_TRACE][now._event] && !a_cycles) { printf("pan: event_trace not completed\n"); return 0; } #endif return 1; } #if !defined(SAFETY) && !defined(BFS) void checkcycles(void) { uchar o_a_t = now._a_t; #ifndef NOFAIR uchar o_cnt = now._cnt[1]; #endif #ifdef FULLSTACK #ifndef MA H_el *sv = trpt->ostate; /* save */ #else uchar prov = trpt->proviso; /* save */ #endif #endif #ifdef DEBUG { int i; uchar *v = (uchar *) &now; printf(" set Seed state "); #ifndef NOFAIR if (fairness) printf("(cnt = %d:%d, nrpr=%d) ", now._cnt[0], now._cnt[1], now._nr_pr); #endif /* for (i = 0; i < n; i++) printf("%d,", v[i]); */ printf("\n"); } printf("%ld: cycle check starts\n", depth); #endif now._a_t |= (1|16|32); /* 1 = 2nd DFS; (16|32) to improve hashing */ #ifndef NOFAIR now._cnt[1] = now._cnt[0]; #endif memcpy((char *)&A_Root, (char *)&now, vsize); A_depth = depthfound = depth; #if NCORE>1 mem_put_acc(); #else new_state(); /* start 2nd DFS */ #endif now._a_t = o_a_t; #ifndef NOFAIR now._cnt[1] = o_cnt; #endif A_depth = 0; depthfound = -1; #ifdef DEBUG printf("%ld: cycle check returns\n", depth); #endif #ifdef FULLSTACK #ifndef MA trpt->ostate = sv; /* restore */ #else trpt->proviso = prov; #endif #endif } #endif #if defined(FULLSTACK) && defined(BITSTATE) H_el *Free_list = (H_el *) 0; void onstack_init(void) /* to store stack states in a bitstate search */ { S_Tab = (H_el **) emalloc(maxdepth*sizeof(H_el *)); } #endif #if !defined(BFS_PAR) #if defined(FULLSTACK) && defined(BITSTATE) H_el * grab_state(int n) { H_el *v, *last = 0; if (H_tab == S_Tab) { for (v = Free_list; v && ((int) v->tagged >= n); v=v->nxt) { if ((int) v->tagged == n) { if (last) last->nxt = v->nxt; else gotcha: Free_list = v->nxt; v->tagged = 0; v->nxt = 0; #ifdef COLLAPSE v->ln = 0; #endif return v; } Fh++; last=v; } /* new: second try */ v = Free_list; if (v && ((int) v->tagged >= n)) goto gotcha; ngrabs++; } return (H_el *) emalloc(sizeof(H_el)+n-sizeof(unsigned)); } #else #if NCORE>1 H_el * grab_state(int n) { H_el *grab_shared(int); return grab_shared(sizeof(H_el)+n-sizeof(unsigned)); } #else #ifndef AUTO_RESIZE #define grab_state(n) (H_el *) \ emalloc(sizeof(H_el)+n-sizeof(ulong)); #else H_el * grab_state(int n) { H_el *p; int cnt = sizeof(H_el)+n-sizeof(ulong); #ifndef MA if (reclaim_size >= cnt+WS) { if ((cnt & (WS-1)) != 0) /* alignment */ { cnt += WS - (cnt & (WS-1)); } p = (H_el *) reclaim_mem; reclaim_mem += cnt; reclaim_size -= cnt; memset(p, 0, cnt); } else #endif { p = (H_el *) emalloc(cnt); } return p; } #endif #endif #endif #else extern volatile uchar *sh_pre_malloc(ulong); extern volatile uchar *sh_malloc(ulong); H_el * grab_state(int n) /* bfs_par */ { volatile uchar *rval = NULL; int m = sizeof(H_el) + n - sizeof(unsigned); if (n == 0) m = m/n; #ifdef BFS_SEP_HASH rval = emalloc((ulong) m); #else rval = sh_malloc((ulong) m); #endif memset((void *) rval, 0, (size_t) m); return (H_el *) rval; } #endif #ifdef COLLAPSE ulong ordinal(char *v, long n, short tp) { H_el *tmp, *ntmp; long m; H_el *olst = (H_el *) 0; s_hash((uchar *)v, n); #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) e_critical(BFS_ID); /* bfs_par / collapse */ #endif #if NCORE>1 && !defined(SEP_STATE) enter_critical(CS_ID); /* uses spinlock - 1..128 */ #endif tmp = H_tab[j1_spin]; if (!tmp) { tmp = grab_state(n); H_tab[j1_spin] = tmp; } else for ( ;; olst = tmp, tmp = tmp->nxt) { if (n == tmp->ln) { m = memcmp(((char *)&(tmp->state)), v, n); if (m == 0) goto done; if (m < 0) { Insert: ntmp = grab_state(n); ntmp->nxt = tmp; if (!olst) H_tab[j1_spin] = ntmp; else olst->nxt = ntmp; tmp = ntmp; break; } else if (!tmp->nxt) { Append: tmp->nxt = grab_state(n); tmp = tmp->nxt; break; } continue; } if (n < tmp->ln) goto Insert; else if (!tmp->nxt) goto Append; } #if NCORE>1 && !defined(SEP_STATE) enter_critical(GLOBAL_LOCK); #endif #ifdef BFS_PAR e_critical(BFS_ORD); /* bfs_par */ #endif m = ++ncomps[tp]; #ifdef BFS_PAR x_critical(BFS_ORD); #endif #if NCORE>1 && !defined(SEP_STATE) leave_critical(GLOBAL_LOCK); #endif #ifdef FULLSTACK tmp->tagged = m; #else tmp->st_id = m; #endif #if defined(AUTO_RESIZE) && !defined(BITSTATE) tmp->m_K1 = K1; #endif memcpy(((char *)&(tmp->state)), v, n); tmp->ln = n; done: #if NCORE>1 && !defined(SEP_STATE) leave_critical(CS_ID); #endif #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #ifdef FULLSTACK return tmp->tagged; #else return tmp->st_id; #endif } int compress(char *vin, int nin) /* collapse compression */ { char *w, *v = (char *) &comp_now; int i, j; ulong n; static char *x; static uchar nbytes[513]; /* 1 + 256 + 256 */ static unsigned short nbytelen; long col_q(int, char *); long col_p(int, char *); #ifndef SAFETY if (a_cycles) *v++ = now._a_t; #ifndef NOFAIR if (fairness) for (i = 0; i < NFAIR; i++) *v++ = now._cnt[i]; #endif #endif nbytelen = 0; #ifndef JOINPROCS for (i = 0; i < (int) now._nr_pr; i++) { n = col_p(i, (char *) 0); #ifdef NOFIX nbytes[nbytelen] = 0; #else nbytes[nbytelen] = 1; *v++ = ((P0 *) pptr(i))->_t; #endif *v++ = n&255; if (n >= (1<<8)) { nbytes[nbytelen]++; *v++ = (n>>8)&255; } if (n >= (1<<16)) { nbytes[nbytelen]++; *v++ = (n>>16)&255; } if (n >= (1<<24)) { nbytes[nbytelen]++; *v++ = (n>>24)&255; } nbytelen++; } #else x = scratch; for (i = 0; i < (int) now._nr_pr; i++) x += col_p(i, x); n = ordinal(scratch, x-scratch, 2); /* procs */ *v++ = n&255; nbytes[nbytelen] = 0; if (n >= (1<<8)) { nbytes[nbytelen]++; *v++ = (n>>8)&255; } if (n >= (1<<16)) { nbytes[nbytelen]++; *v++ = (n>>16)&255; } if (n >= (1<<24)) { nbytes[nbytelen]++; *v++ = (n>>24)&255; } nbytelen++; #endif #ifdef SEPQS for (i = 0; i < (int) now._nr_qs; i++) { n = col_q(i, (char *) 0); nbytes[nbytelen] = 0; *v++ = n&255; if (n >= (1<<8)) { nbytes[nbytelen]++; *v++ = (n>>8)&255; } if (n >= (1<<16)) { nbytes[nbytelen]++; *v++ = (n>>16)&255; } if (n >= (1<<24)) { nbytes[nbytelen]++; *v++ = (n>>24)&255; } nbytelen++; } #endif #ifdef NOVSZ /* 3 = _a_t, _nr_pr, _nr_qs */ w = (char *) &now + 3 * sizeof(uchar); #ifndef NOFAIR w += NFAIR; #endif #else #if VECTORSZ<65536 w = (char *) &(now._vsz) + sizeof(unsigned short); #else w = (char *) &(now._vsz) + sizeof(ulong); #endif #endif x = scratch; *x++ = now._nr_pr; *x++ = now._nr_qs; if (now._nr_qs > 0 && qptr(0) < pptr(0)) n = qptr(0) - (uchar *) w; else n = pptr(0) - (uchar *) w; j = w - (char *) &now; #if !defined(NOCOMP) && !defined(HC) for (i = 0; i < (int) n; i++, w++) if (!Mask[j++]) *x++ = *w; #else memcpy(x, w, n); x += n; #endif #ifndef SEPQS for (i = 0; i < (int) now._nr_qs; i++) x += col_q(i, x); #endif x--; for (i = 0, j = 6; i < nbytelen; i++) { if (j == 6) { j = 0; *(++x) = 0; } else j += 2; *x |= (nbytes[i] << j); } x++; for (j = 0; j < WS-1; j++) *x++ = 0; x -= j; j = 0; n = ordinal(scratch, x-scratch, 0); /* globals */ *v++ = n&255; if (n >= (1<< 8)) { *v++ = (n>> 8)&255; j++; } if (n >= (1<<16)) { *v++ = (n>>16)&255; j++; } if (n >= (1<<24)) { *v++ = (n>>24)&255; j++; } *v++ = j; /* add last count as a byte */ for (i = 0; i < WS-1; i++) *v++ = 0; v -= i; #if 0 printf("collapse %d -> %d\n", vsize, v - (char *)&comp_now); #endif return v - (char *)&comp_now; } #else #if !defined(NOCOMP) int compress(char *vin, int n) /* default compression */ { #ifdef HC int delta = 0; s_hash((uchar *)vin, n); /* sets K1 and K2 */ #ifndef SAFETY if (S_A) { delta++; /* _a_t */ #ifndef NOFAIR if (S_A > NFAIR) delta += NFAIR; /* _cnt[] */ #endif } #endif memcpy((char *) &comp_now + delta, (char *) &K1, WS); delta += WS; #if HC>0 memcpy((char *) &comp_now + delta, (char *) &K2, HC); delta += HC; #endif return delta; #else char *vv = vin; char *v = (char *) &comp_now; int i; #ifndef NO_FAST_C int r = 0, unroll = n/8; if (unroll > 0) { i = 0; while (r++ < unroll) { /* unroll 8 times, avoid ifs */ /* 1 */ *v = *vv++; v += 1 - Mask[i++]; /* 2 */ *v = *vv++; v += 1 - Mask[i++]; /* 3 */ *v = *vv++; v += 1 - Mask[i++]; /* 4 */ *v = *vv++; v += 1 - Mask[i++]; /* 5 */ *v = *vv++; v += 1 - Mask[i++]; /* 6 */ *v = *vv++; v += 1 - Mask[i++]; /* 7 */ *v = *vv++; v += 1 - Mask[i++]; /* 8 */ *v = *vv++; v += 1 - Mask[i++]; } r = n - i; /* the rest, at most 7 */ switch (r) { case 7: *v = *vv++; v += 1 - Mask[i++]; case 6: *v = *vv++; v += 1 - Mask[i++]; case 5: *v = *vv++; v += 1 - Mask[i++]; case 4: *v = *vv++; v += 1 - Mask[i++]; case 3: *v = *vv++; v += 1 - Mask[i++]; case 2: *v = *vv++; v += 1 - Mask[i++]; case 1: *v = *vv++; v += 1 - Mask[i++]; case 0: break; } n = i = v - (char *)&comp_now; /* bytes written so far */ r = (n+WS-1)/WS; /* in words, rounded up */ r *= WS; /* total bytes to fill */ i = r - i; /* remaining bytes */ switch (i) { case 7: *v++ = 0; /* fall thru */ case 6: *v++ = 0; case 5: *v++ = 0; case 4: *v++ = 0; case 3: *v++ = 0; case 2: *v++ = 0; case 1: *v++ = 0; case 0: break; default: Uerror("unexpected wordsize"); } v -= i; } else #endif { for (i = 0; i < n; i++, vv++) if (!Mask[i]) *v++ = *vv; for (i = 0; i < WS-1; i++) *v++ = 0; v -= i; } #if 0 printf("compress %d -> %d\n", n, v - (char *)&comp_now); #endif return v - (char *)&comp_now; #endif } #endif #endif #if defined(FULLSTACK) && defined(BITSTATE) #if defined(MA) #if !defined(onstack_now) int onstack_now(void) {} #endif #if !defined(onstack_put) void onstack_put(void) {} #endif #if !defined(onstack_zap) void onstack_zap(void) {} #endif #else void onstack_zap(void) { H_el *v, *w, *last = 0; H_el **tmp = H_tab; char *nv; int n, m; static char warned = 0; #if defined(BCS) && defined(NO_LAST) && defined(HAS_LAST) uchar was_last = now._last; now._last = 0; #endif H_tab = S_Tab; #ifndef NOCOMP nv = (char *) &comp_now; n = compress((char *)&now, vsize); #else #if defined(BITSTATE) && defined(LC) nv = (char *) &comp_now; n = compact_stack((char *)&now, vsize); #else nv = (char *) &now; n = vsize; #endif #endif #if !defined(HC) && !(defined(BITSTATE) && defined(LC)) s_hash((uchar *)nv, n); #endif H_tab = tmp; for (v = S_Tab[j1_spin]; v; Zh++, last=v, v=v->nxt) { m = memcmp(&(v->state), nv, n); if (m == 0) goto Found; if (m < 0) break; } /* NotFound: */ #ifndef ZAPH /* seen this happen, likely harmless in multicore */ if (warned == 0) { /* Uerror("stack out of wack - zap"); */ cpu_printf("pan: warning, stack incomplete\n"); warned = 1; } #endif goto done; Found: ZAPS++; if (last) last->nxt = v->nxt; else S_Tab[j1_spin] = v->nxt; v->tagged = (unsigned) n; #if !defined(NOREDUCE) && !defined(SAFETY) v->proviso = 0; #endif v->nxt = last = (H_el *) 0; for (w = Free_list; w; Fa++, last=w, w = w->nxt) { if ((int) w->tagged <= n) { if (last) { v->nxt = w; last->nxt = v; } else { v->nxt = Free_list; Free_list = v; } goto done; } if (!w->nxt) { w->nxt = v; goto done; } } Free_list = v; done: #if defined(BCS) && defined(NO_LAST) && defined(HAS_LAST) now._last = was_last; #endif return; } #ifndef BFS_PAR void onstack_put(void) { H_el **tmp = H_tab; #if defined(BCS) && defined(NO_LAST) && defined(HAS_LAST) uchar was_last = now._last; now._last = 0; #endif H_tab = S_Tab; if (h_store((char *)&now, vsize) != 0) #if defined(BITSTATE) && defined(LC) printf("pan: warning, double stack entry\n"); #else #ifndef ZAPH Uerror("cannot happen - unstack_put"); #endif #endif H_tab = tmp; trpt->ostate = Lstate; PUT++; #if defined(BCS) && defined(NO_LAST) && defined(HAS_LAST) now._last = was_last; #endif } int onstack_now(void) { H_el *tmp; H_el **tmp2 = H_tab; char *v; int n, m = 1; #if defined(BCS) && defined(NO_LAST) && defined(HAS_LAST) uchar was_last = now._last; now._last = 0; #endif H_tab = S_Tab; #ifdef NOCOMP #if defined(BITSTATE) && defined(LC) v = (char *) &comp_now; n = compact_stack((char *)&now, vsize); #else v = (char *) &now; n = vsize; #endif #else v = (char *) &comp_now; n = compress((char *)&now, vsize); #endif #if !defined(HC) && !(defined(BITSTATE) && defined(LC)) s_hash((uchar *)v, n); #endif H_tab = tmp2; for (tmp = S_Tab[j1_spin]; tmp; Zn++, tmp = tmp->nxt) { m = memcmp(((char *)&(tmp->state)),v,n); if (m <= 0) { Lstate = (H_el *) tmp; /* onstack_now */ break; } } PROBE++; #if defined(BCS) && defined(NO_LAST) && defined(HAS_LAST) now._last = was_last; #endif return (m == 0); } #endif #endif #endif #ifdef BITSTATE void init_SS(ulong); void sinit(void) { if (udmem) { udmem *= 1024L*1024L; #if NCORE>1 if (!readtrail) { init_SS((ulong) udmem); } else #endif #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) SS = (uchar *) sh_pre_malloc((ulong) udmem); #else SS = (uchar *) emalloc(udmem); #endif b_store = bstore_mod; } else { #if NCORE>1 init_SS(ONE_L<<(ssize-3)); #else #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) SS = (uchar *) sh_pre_malloc((ulong)(ONE_L<<(ssize-3))); #else SS = (uchar *) emalloc(ONE_L<<(ssize-3)); #endif #endif } } #else #if !defined(MA) || defined(COLLAPSE) void set_H_tab(void) { #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) H_tab = (H_el **) sh_pre_malloc((ulong)((ONE_L<<ssize)*sizeof(H_el *))); #else H_tab = (H_el **) emalloc((ONE_L<<ssize)*sizeof(H_el *)); #endif } #endif void hinit(void) { #ifdef MA #ifdef R_XPT { void r_xpoint(void); r_xpoint(); } #else dfa_init((unsigned short) (MA+a_cycles)); #if NCORE>1 && !defined(COLLAPSE) if (!readtrail) { void init_HT(ulong); init_HT(0L); } #endif #endif #endif #if !defined(MA) || defined(COLLAPSE) #if NCORE>1 || (defined(BFS_PAR) && defined(USE_TDH) && !defined(WIN32) && !defined(WIN64)) if (!readtrail) { void init_HT(ulong); init_HT((ulong) (ONE_L<<ssize)*sizeof(H_el *)); #if defined(TRIX) || (defined(BFS_PAR) && defined(COLLAPSE)) set_H_tab(); /* need both */ #endif } else #endif { set_H_tab(); /* @htable ssize */ } #endif } #endif #if !defined(BITSTATE) || defined(FULLSTACK) #ifdef DEBUG void dumpstate(int wasnew, char *v, int n, int tag) { int i; #ifndef SAFETY if (S_A) { printf(" state tags %d (%d::%d): ", V_A, wasnew, v[0]); #ifdef FULLSTACK printf(" %d ", tag); #endif printf("\n"); } #endif #ifdef SDUMP printf(" State: "); #if !defined(NOCOMP) && !defined(HC) for (i = 0; i < vsize; i++) printf("%d%s,", ((char *)&now)[i], Mask[i]?"*":""); #else for (i = 0; i < vsize; i++) printf("%d,", ((char *)&now)[i]); #endif printf("\n Vector: "); for (i = 0; i < n; i++) printf("%d,", v[i]); printf("\n"); #endif } #endif #ifdef MA int g_store(char *vin, int nin, uchar pbit) { int n, i; int ret_val = 1; uchar *v; static uchar Info[MA+1]; #ifndef NOCOMP n = compress(vin, nin); v = (uchar *) &comp_now; #else n = nin; v = (uchar *) vin; #endif if (n >= MA) { printf("pan: error, MA too small, recompile pan.c"); printf(" with -DMA=N with N>%d\n", n); Uerror("aborting"); } if (n > (int) maxgs) { maxgs = (uint) n; } for (i = 0; i < n; i++) { Info[i] = v[i]; } for ( ; i < MA-1; i++) { Info[i] = 0; } Info[MA-1] = pbit; if (a_cycles) /* place _a_t at the end */ { Info[MA] = Info[0]; Info[0] = 0; } #ifdef BFS_PAR e_critical(BFS_STATE); /* bfs_par / g_store */ #endif #if NCORE>1 && !defined(SEP_STATE) enter_critical(GLOBAL_LOCK); /* crude, but necessary */ /* to make this mode work, also replace emalloc with grab_shared inside store MA routines */ #endif if (!dfa_store(Info)) { if (pbit == 0 && (now._a_t&1) && depth > A_depth) { Info[MA] &= ~(1|16|32); /* _a_t */ if (dfa_member(MA)) { Info[MA-1] = 4; /* off-stack bit */ nShadow++; if (!dfa_member(MA-1)) { ret_val = 3; #ifdef VERBOSE printf("intersected 1st dfs stack\n"); #endif goto done; } } } ret_val = 0; #ifdef VERBOSE printf("new state\n"); #endif goto done; } #ifdef FULLSTACK if (pbit == 0) { Info[MA-1] = 1; /* proviso bit */ #ifndef BFS trpt->proviso = dfa_member(MA-1); #endif Info[MA-1] = 4; /* off-stack bit */ if (dfa_member(MA-1)) { ret_val = 1; /* off-stack */ #ifdef VERBOSE printf("old state\n"); #endif } else { ret_val = 2; /* on-stack */ #ifdef VERBOSE printf("on-stack\n"); #endif } goto done; } #endif ret_val = 1; #ifdef VERBOSE printf("old state\n"); #endif done: #ifdef BFS_PAR x_critical(BFS_STATE); #endif #if NCORE>1 && !defined(SEP_STATE) leave_critical(GLOBAL_LOCK); #endif return ret_val; /* old state */ } #endif #if defined(BITSTATE) && defined(LC) int compact_stack(char *vin, int n) { int delta = 0; s_hash((uchar *)vin, n); /* sets K1 and K2 */ #ifndef SAFETY delta++; /* room for state[0] |= 128 */ #endif memcpy((char *) &comp_now + delta, (char *) &K1, WS); delta += WS; memcpy((char *) &comp_now + delta, (char *) &K2, WS); delta += WS; /* use all available bits */ return delta; } #endif #ifdef TRIX void sv_populate(void) { int i, cnt = 0; TRIX_v6 **base = processes; int bound = now._nr_pr; /* MAXPROC+1; */ #ifdef V_TRIX printf("%4d: sv_populate\n", depth); #endif again: for (i = 0; i < bound; i++) { if (base[i] != NULL) { H_el *tmp; int m, n; uchar *v; #ifndef BFS if (base[i]->modified == 0) { cnt++; #ifdef V_TRIX printf("%4d: %s %d not modified\n", depth, (base == processes)?"proc":"chan", i); #endif continue; } #ifndef V_MOD base[i]->modified = 0; #endif #endif #ifdef TRIX_RIX if (base == processes) { ((P0 *)pptr(i))->_pid = 0; } #endif n = base[i]->psize; v = base[i]->body; s_hash(v, n); /* sets j1_spin */ tmp = H_tab[j1_spin]; if (!tmp) /* new */ { tmp = grab_state(n); H_tab[j1_spin] = tmp; m = 1; /* non-zero */ } else { H_el *ntmp, *olst = (H_el *) 0; for (;; hcmp++, olst = tmp, tmp = tmp->nxt) { m = memcmp(((char *)&(tmp->state)), v, n); if (m == 0) /* match */ { break; } else if (m < 0) /* insert */ { ntmp = grab_state(n); ntmp->nxt = tmp; if (!olst) H_tab[j1_spin] = ntmp; else olst->nxt = ntmp; tmp = ntmp; break; } else if (!tmp->nxt) /* append */ { tmp->nxt = grab_state(n); tmp = tmp->nxt; break; } } } if (m != 0) { memcpy((char *)&(tmp->state), v, n); #if defined(AUTO_RESIZE) && !defined(BITSTATE) tmp->m_K1 = K1; /* set via s_hash */ #endif if (verbose) { if (base == processes) { _p_count[i]++; } else { _c_count[i]++; } } } now._ids_[cnt++] = (char *)&(tmp->state); #ifdef TRIX_RIX if (base == processes) { ((P0 *)pptr(i))->_pid = i; if (BASE > 0 && i > 0) { ((P0 *)pptr(i))->_pid -= BASE; } } #endif } } /* do the same for all channels */ if (base == processes) { base = channels; bound = now._nr_qs; /* MAXQ+1; */ goto again; } } #endif #if !defined(BFS_PAR) || (!defined(BITSTATE) && !defined(USE_TDH)) int h_store(char *vin, int nin) /* hash table storage */ { H_el *ntmp; H_el *tmp, *olst = (H_el *) 0; char *v; int n, m=0; #ifdef HC uchar rem_a; #endif #ifdef TRIX sv_populate(); /* update proc and chan ids */ #endif #ifdef NOCOMP #if defined(BITSTATE) && defined(LC) if (S_Tab == H_tab) { v = (char *) &comp_now; n = compact_stack(vin, nin); } else { v = vin; n = nin; } #else v = vin; n = nin; #endif #else v = (char *) &comp_now; #ifdef HC rem_a = now._a_t; now._a_t = 0; #endif n = compress(vin, nin); #ifdef HC now._a_t = rem_a; #endif #ifndef SAFETY if (S_A) { v[0] = 0; /* _a_t */ #ifndef NOFAIR if (S_A > NFAIR) for (m = 0; m < NFAIR; m++) v[m+1] = 0; /* _cnt[] */ #endif m = 0; } #endif #endif #if !defined(HC) && !(defined(BITSTATE) && defined(LC)) s_hash((uchar *)v, n); #endif /* for BFS_PAR we can only get here in BITSTATE mode */ /* and in that case we don't use locks */ #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) e_critical(BFS_ID); /* bfs_par / h_store */ #endif #if NCORE>1 && !defined(SEP_STATE) && !defined(BITSTATE) enter_critical(CS_ID); #endif tmp = H_tab[j1_spin]; if (!tmp) { tmp = grab_state(n); #if NCORE>1 if (!tmp) { /* if we get here -- we've already issued a warning */ /* but we want to allow the normal distributed termination */ /* to collect the stats on all cpus in the wrapup */ #if !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 1; /* allow normal termination */ } #endif H_tab[j1_spin] = tmp; } else { for (;; hcmp++, olst = tmp, tmp = tmp->nxt) { /* skip the _a_t and the _cnt bytes */ #ifdef COLLAPSE if (tmp->ln != 0) { if (!tmp->nxt) goto Append; continue; } #endif m = memcmp(((char *)&(tmp->state)) + S_A, v + S_A, n - S_A); if (m == 0) { #ifdef SAFETY #define wasnew 0 #else int wasnew = 0; #endif #if !defined(SAFETY) && !defined(NOCOMP) if (S_A) { if ((((char *)&(tmp->state))[0] & V_A) != V_A) { wasnew = 1; nShadow++; ((char *)&(tmp->state))[0] |= V_A; } #ifndef NOFAIR if (S_A > NFAIR) { /* 0 <= now._cnt[now._a_t&1] < MAXPROC */ uint ci, bp; /* index, bit pos */ ci = (now._cnt[now._a_t&1] / 8); bp = (now._cnt[now._a_t&1] - 8*ci); if (now._a_t&1) /* use tail-bits in _cnt */ { ci = (NFAIR - 1) - ci; bp = 7 - bp; /* bp = 0..7 */ } ci++; /* skip over _a_t */ bp = 1 << bp; /* the bit mask */ if ((((char *)&(tmp->state))[ci] & bp)==0) { if (!wasnew) { wasnew = 1; nShadow++; } ((char *)&(tmp->state))[ci] |= bp; } } /* else: wasnew == 0, i.e., old state */ #endif } #endif #if NCORE>1 Lstate = (H_el *) tmp; /* h_store */ #endif #ifdef FULLSTACK #ifndef SAFETY if (wasnew) { Lstate = (H_el *) tmp; /* h_store */ tmp->tagged |= V_A; if ((now._a_t&1) && (tmp->tagged&A_V) && depth > A_depth) { intersect: #ifdef CHECK #if NCORE>1 printf("cpu%d: ", core_id); #endif printf("1st dfs-stack intersected on state %d+\n", (int) tmp->st_id); #endif #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #if NCORE>1 && !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 3; } #ifdef CHECK #if NCORE>1 printf("cpu%d: ", core_id); #endif printf(" New state %d+\n", (int) tmp->st_id); #endif #ifdef DEBUG dumpstate(1, (char *)&(tmp->state),n,tmp->tagged); #endif #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #if NCORE>1 && !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 0; } else #endif if ((S_A)?(tmp->tagged&V_A):tmp->tagged) { Lstate = (H_el *) tmp; /* h_store */ #ifndef SAFETY /* already on current dfs stack */ /* but may also be on 1st dfs stack */ if ((now._a_t&1) && (tmp->tagged&A_V) && depth > A_depth #ifndef NOFAIR && (!fairness || now._cnt[1] <= 1) #endif ) goto intersect; #endif #ifdef CHECK #if NCORE>1 printf("cpu%d: ", core_id); #endif printf(" Stack state %d\n", (int) tmp->st_id); #endif #ifdef DEBUG dumpstate(0, (char *)&(tmp->state),n,tmp->tagged); #endif #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #if NCORE>1 && !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 2; /* match on stack */ } #else if (wasnew) { #ifdef CHECK #if NCORE>1 printf("cpu%d: ", core_id); #endif printf(" New state %d+\n", (int) tmp->st_id); #endif #ifdef DEBUG dumpstate(1, (char *)&(tmp->state), n, 0); #endif #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #if NCORE>1 && !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 0; } #endif #ifdef CHECK #if NCORE>1 printf("cpu%d: ", core_id); #endif printf(" Old state %d\n", (int) tmp->st_id); #endif #ifdef DEBUG dumpstate(0, (char *)&(tmp->state), n, 0); #endif #if defined(BCS) #ifdef CONSERVATIVE if (tmp->ctx_low > trpt->sched_limit) { tmp->ctx_low = trpt->sched_limit; tmp->ctx_pid[(now._last)/8] = 1 << ((now._last)%8); /* new */ #ifdef CHECK #if NCORE>1 printf("cpu%d: ", core_id); #endif printf(" Revisit with fewer context switches\n"); #endif nstates--; #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #if NCORE>1 && !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 0; } else if ((tmp->ctx_low == trpt->sched_limit && (tmp->ctx_pid[(now._last)/8] & ( 1 << ((now._last)%8) )) == 0 )) { tmp->ctx_pid[(now._last)/8] |= 1 << ((now._last)%8); /* add */ #ifdef CHECK #if NCORE>1 printf("cpu%d: ", core_id); #endif printf(" Revisit with same nr of context switches\n"); #endif nstates--; #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #if NCORE>1 && !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 0; } #endif #endif #ifdef REACH if (tmp->D > depth) { tmp->D = depth; #ifdef CHECK #if NCORE>1 printf("cpu%d: ", core_id); #endif printf(" ReVisiting (from smaller depth)\n"); #endif nstates--; #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #if NCORE>1 && !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 0; } #endif #if (defined(BFS) && defined(Q_PROVISO)) || NCORE>1 Lstate = (H_el *) tmp; /* h_store */ #endif #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #if NCORE>1 && !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 1; /* match outside stack */ } else if (m < 0) { /* insert state before tmp */ ntmp = grab_state(n); #if NCORE>1 if (!ntmp) { #if !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 1; /* allow normal termination */ } #endif ntmp->nxt = tmp; if (!olst) H_tab[j1_spin] = ntmp; else olst->nxt = ntmp; tmp = ntmp; break; } else if (!tmp->nxt) { /* append after tmp */ #ifdef COLLAPSE Append: #endif tmp->nxt = grab_state(n); #if NCORE>1 if (!tmp->nxt) { #if !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif return 1; /* allow normal termination */ } #endif tmp = tmp->nxt; break; } } } #ifdef CHECK tmp->st_id = (unsigned) nstates; #if NCORE>1 printf("cpu%d: ", core_id); #endif #ifdef BITSTATE printf(" Push state %d\n", ((int) nstates) - 1); #else printf(" New state %d\n", (int) nstates); #endif #endif #if defined(BCS) tmp->ctx_low = trpt->sched_limit; #ifdef CONSERVATIVE tmp->ctx_pid[(now._last)/8] = 1 << ((now._last)%8); /* new limit */ #endif #endif #if !defined(SAFETY) || defined(REACH) tmp->D = depth; #endif #if !defined(SAFETY) && !defined(NOCOMP) if (S_A) { v[0] = V_A; #ifndef NOFAIR if (S_A > NFAIR) { uint ci, bp; /* as above */ ci = (now._cnt[now._a_t&1] / 8); bp = (now._cnt[now._a_t&1] - 8*ci); if (now._a_t&1) { ci = (NFAIR - 1) - ci; bp = 7 - bp; /* bp = 0..7 */ } v[1+ci] = 1 << bp; } #endif } #endif #if defined(AUTO_RESIZE) && !defined(BITSTATE) tmp->m_K1 = K1; #endif memcpy(((char *)&(tmp->state)), v, n); #ifdef FULLSTACK tmp->tagged = (S_A)?V_A:(depth+1); #ifdef DEBUG dumpstate(-1, v, n, tmp->tagged); #endif Lstate = (H_el *) tmp; /* end of h_store */ #else #ifdef DEBUG dumpstate(-1, v, n, 0); #endif #if NCORE>1 Lstate = (H_el *) tmp; /* end of h_store */ #endif #endif #if defined(BFS_PAR) && !defined(BFS_SEP_HASH) x_critical(BFS_ID); #endif #if NCORE>1 #ifdef V_PROVISO tmp->cpu_id = core_id; #endif #if !defined(SEP_STATE) && !defined(BITSTATE) leave_critical(CS_ID); #endif #endif return 0; } #endif void o_hash32(uchar *s, int len, int h) /* 32-bit, like d_sfh, but with seed */ { uint32_t tmp; int rem; rem = len & 3; len >>= 2; for ( ; len > 0; len--) { h += get16bits(s); tmp = (get16bits(s+2) << 11) ^ h; h = (h << 16) ^ tmp; s += 2*sizeof(uint16_t); h += h >> 11; } switch (rem) { case 3: h += get16bits(s); h ^= h << 16; h ^= s[sizeof(uint16_t)] << 18; h += h >> 11; break; case 2: h += get16bits(s); h ^= h << 11; h += h >> 17; break; case 1: h += *s; h ^= h << 10; h += h >> 1; break; } h ^= h << 3; h += h >> 5; h ^= h << 4; h += h >> 17; h ^= h << 25; h += h >> 6; K1 = h; } void o_hash64(uchar *kb, int nbytes, int seed) { uint8_t *bp; uint64_t a, b, c, n; const uint64_t *k = (uint64_t *) kb; n = nbytes/WS; /* nr of 8-byte chunks */ /* extend to multiple of words, if needed */ a = WS - (nbytes % WS); if (a > 0 && a < WS) { n++; bp = kb + nbytes; switch (a) { case 7: *bp++ = 0; /* fall thru */ case 6: *bp++ = 0; /* fall thru */ case 5: *bp++ = 0; /* fall thru */ case 4: *bp++ = 0; /* fall thru */ case 3: *bp++ = 0; /* fall thru */ case 2: *bp++ = 0; /* fall thru */ case 1: *bp = 0; case 0: break; } } a = (uint64_t) seed; b = HASH_CONST[HASH_NR]; c = 0x9e3779b97f4a7c13LL; /* arbitrary */ while (n >= 3) { a += k[0]; b += k[1]; c += k[2]; mix(a,b,c); n -= 3; k += 3; } c += (((uint64_t) nbytes)<<3); switch (n) { case 2: b += k[1]; case 1: a += k[0]; case 0: break; } mix(a,b,c); K1 = a; } #if defined(USE_TDH) && !defined(WIN32) && !defined(WIN64) #ifdef HC #ifndef T_HC #ifdef BFS_HC #define T_HC BFS_HC #else #define T_HC 2 #endif #endif #if T_HC<1 || T_HC>4 #error "BFS_HC must be 1, 2, 3, or 4 (default is 2)" #endif #endif #define T_ROW 6 #define T_ROW_SIZE (1<<T_ROW) #define T_ROW_MASK -(1<<T_ROW) #define T_FREE 0 #define T_STAT 1 /* status bit */ #ifndef T_VSZ #define T_VSZ VECTORSZ/4 /* compressed vectorsize */ #endif static volatile char *ohash_sd; /* state data */ static volatile uint32_t *ohash_hv; /* hash values */ static ulong ohash_max; static ulong ohash_mask; #if defined(USE_TDH) && defined(Q_PROVISO) static volatile uchar *ohash_inq; /* open/closed flag BFS_INQ */ #endif #ifdef HC static uint32_t ohash_hc[T_HC]; static ulong ohash_hc_sz; #endif void init_HT(ulong x) /* USE_TDH cygwin/linux */ { x = x / (ulong) sizeof(H_el *); /* room for x pointers */ #ifdef DEBUG printf("prealloc x %lu v %d x*v %lu\n", x, T_VSZ, (ulong) (x * (ulong)T_VSZ)); #endif #ifndef HC if (!(x * (ulong) T_VSZ > x)) { Uerror("assertion x * (ulong) T_VSZ > x fails"); } #ifdef BFS_SEP_HASH ohash_sd = (char *) emalloc(x * (ulong) T_VSZ); #else ohash_sd = (volatile char *) sh_pre_malloc(x * (ulong) T_VSZ); #endif #else ohash_hc_sz = (ulong) (T_HC * (ulong) sizeof(uint32_t)); if (!(x * ohash_hc_sz > x)) { Uerror("assertion x * ohash_hc_sz > x fails"); } #ifdef BFS_SEP_HASH ohash_sd = (char *) emalloc(x * ohash_hc_sz); #else ohash_sd = (volatile char *) sh_pre_malloc(x * ohash_hc_sz); #endif #endif #ifdef BFS_SEP_HASH ohash_hv = (uint32_t *) emalloc(x * (ulong) sizeof(uint32_t)); #else ohash_hv = (volatile uint32_t *) sh_pre_malloc(x * (ulong) sizeof(uint32_t)); #endif ohash_mask = (((ulong)1)<<ssize)-1; ohash_max = (((ulong)1)<<ssize)/100; #if defined(USE_TDH) && defined(Q_PROVISO) #ifdef BFS_SEP_HASH ohash_inq = (uchar *) emalloc(x * (ulong) sizeof(uchar)); #else ohash_inq = (volatile uchar *) sh_pre_malloc(x * (ulong) sizeof(uchar)); #endif #endif } static int h_table_full; #ifdef L_BOUND void bfs_mark_live(void) { int i; trpt->o_pm &= ~2; #ifdef VERBOSE bfs_printf("check to mark\n"); #endif for (i = 0; i < (int) now._nr_pr; i++) { P0 *ptr = (P0 *) pptr(i); if (accpstate[ptr->_t][ptr->_p]) { trpt->o_pm |= 2; now._l_bnd = L_bound; now._l_sds = (uchar *) 0; #ifdef VERBOSE bfs_printf("mark state live\n"); #endif break; } } } void bfs_check_live(uchar b, uchar *s) { /* assert(b>0); */ now._l_bnd = b-1; /* decrease bound */ #ifdef VERBOSE bfs_printf("check live %d\n", b); #endif if (b == L_bound && boq == -1) { now._l_sds = (uchar *) Lstate; /* new target */ } else { now._l_sds = s; /* restore target */ if (s == (uchar *) Lstate) { depthfound = depth - (BASE+1)*(L_bound - now._l_bnd - 1); uerror("accept cycle found"); depthfound = -1; now._l_bnd = 0; now._l_sds = (uchar *) 0; } } #ifdef VERBOSE bfs_printf("set l_bound to %d -- sds %p\n", b-1, (void *) now._l_sds); #endif } #endif /* closed hashing with locality - similar to ltsmin */ int o_store(const char *vin, int nin) { int i, seed = 0; ulong hash_v, ix, ex; uint32_t T_BUSY, T_DONE; volatile uint32_t *t_entry; #ifdef HC ulong vs = ohash_hc_sz; #else ulong vs = (ulong) T_VSZ; #endif #ifdef L_BOUND uchar o_bnd, *o_sds; #endif #ifndef STOP_ON_FULL if (h_table_full) { goto done; } #endif #ifdef L_BOUND if (now._l_bnd == 0) { bfs_mark_live(); } #ifdef VERBOSE else { bfs_printf("non-markable state %d\n", now._l_bnd); } #endif o_bnd = now._l_bnd; o_sds = now._l_sds; now._l_bnd = (o_bnd)?1:0; /* mark nested phase of bounded search */ now._l_sds = (uchar *) 0; #endif #if !defined(HC) && !defined(T_NOCOMP) nin = compress((char *)vin, nin); vin = (char *) &comp_now; #endif do { o_hash((uchar *)vin, nin, seed++); hash_v = K1; } while (hash_v == T_FREE || hash_v == T_STAT); /* unlikely, hash_v 0 or 1 */ T_BUSY = ((uint32_t) hash_v & ~((uint32_t) T_STAT)); /* hash with status bit 0 */ T_DONE = ((uint32_t) hash_v | ((uint32_t) T_STAT)); /* hash with status bit 1 */ #ifdef HC d_hash((uchar *)vin, nin); ohash_hc[0] = (uint32_t) K1; #if T_HC>1 ohash_hc[1] = (uint32_t) (K1>>32); #endif #if T_HC>2 ohash_hc[2] = (uint32_t) K2; #endif #if T_HC>3 ohash_hc[3] = (uint32_t) (K2>>32); #endif #endif while (seed < ohash_max) { ix = hash_v & ohash_mask; ex = (ix & T_ROW_MASK) + T_ROW_SIZE; for (i = 0; i < T_ROW_SIZE; i++) { t_entry = (uint32_t *) &ohash_hv[ix]; if (*t_entry == T_FREE && cas(t_entry, T_FREE, T_BUSY)) { #ifndef HC memcpy((char *) &ohash_sd[ix * vs], vin, nin); #else memcpy((char *) &ohash_sd[ix * vs], (char *) ohash_hc, vs); #endif #if defined(USE_TDH) && defined(Q_PROVISO) ohash_inq[ix] = (uchar) BFS_INQ; Lstate = (H_el *) &ohash_inq[ix]; #endif *t_entry = T_DONE; #ifdef VERBOSE #ifdef L_BOUND bfs_printf("New state %p [%p]\n", (void *) Lstate, (void *) o_sds); #else bfs_printf("New state %p\n", (void *) Lstate); #endif #endif #ifdef L_BOUND if (o_bnd) { bfs_check_live(o_bnd, o_sds); } #endif return 0; /* New State */ } while (*t_entry == T_BUSY) { usleep(2); /* wait */ } if (*t_entry == T_DONE /* (first) hash matches, check data */ #ifndef HC && memcmp((char *) &ohash_sd[ix * vs], vin, nin) == 0) #else && memcmp((char *) &ohash_sd[ix * vs], (char *) ohash_hc, vs) == 0) #endif { #if defined(USE_TDH) && defined(Q_PROVISO) Lstate = (H_el *) &ohash_inq[ix]; #endif #ifdef VERBOSE #ifdef L_BOUND bfs_printf("Old state %p [%p]\n", (void *) Lstate, (void *) o_sds); #else bfs_printf("Old state %p\n", (void *) Lstate); #endif #endif #ifdef L_BOUND if (o_bnd) { bfs_check_live(o_bnd, o_sds); } #endif return 1; /* Old State */ } hcmp++; ix++; ix = (ix==ex) ? ex - T_ROW_SIZE : ix; } /* find a new slot: */ do { o_hash((uchar *)vin, nin, (int) (hash_v + seed++)); hash_v = K1; } while (hash_v == T_FREE || hash_v == T_STAT); T_BUSY = ((uint32_t) hash_v & ~((uint32_t) T_STAT)); T_DONE = ((uint32_t) hash_v | ((uint32_t) T_STAT)); } #ifdef STOP_ON_FULL Uerror("hash table full"); /* no return from Uerror */ #else if (!h_table_full) { h_table_full++; if (who_am_i == 0) { bfs_printf("hash table is full\n"); } } done: bfs_punt++; /* counts this as a lost state */ #endif #ifdef L_BOUND now._l_bnd = 0; /* no more checking */ now._l_sds = (uchar *) 0; #endif return 1; /* technically should be 0, but we want to throttle down */ } #endif #endif #include TRANSITIONS void do_reach(void) { r_ck(reached0, _nstates0, 0, src_ln0, src_file0); r_ck(reached1, _nstates1, 1, src_ln1, src_file1); r_ck(reached2, _nstates2, 2, src_ln2, src_file2); } void iniglobals(int calling_pid) { now.button = 0; now.detector = 0; now.state = 0; #ifdef VAR_RANGES logval("button", now.button); logval("detector", now.detector); logval("state", now.state); #endif } int addqueue(int calling_pid, int n, int is_rv) { int j=0, i = now._nr_qs; #if !defined(NOCOMP) && !defined(TRIX) int k; #endif if (i >= MAXQ) Uerror("too many queues"); #ifdef V_TRIX printf("%4d: add queue %d\n", depth, i); #endif switch (n) { default: Uerror("bad queue - addqueue"); } #ifdef BFS_PAR bfs_prepmask(2); /* addqueue */ #endif #ifdef TRIX vsize += sizeof(H_el *); #else if (vsize%WS) q_skip[i] = WS-(vsize%WS); else q_skip[i] = 0; #if !defined(NOCOMP) && !defined(HC) k = vsize; #ifndef BFS if (is_rv) k += j; #endif for (k += (int) q_skip[i]; k > vsize; k--) Mask[k-1] = 1; #endif vsize += (int) q_skip[i]; q_offset[i] = vsize; vsize += j; #ifdef BFS_PAR bfs_fixmask(2); /* addqueue */ #endif #endif now._nr_qs += 1; #ifndef NOVSZ now._vsz = vsize; #endif hmax = max(hmax, vsize); #ifdef TRIX #ifndef BFS if (freebodies) { channels[i] = freebodies; freebodies = freebodies->nxt; } else { channels[i] = (TRIX_v6 *) emalloc(sizeof(TRIX_v6)); channels[i]->body = (uchar *) emalloc(Maxbody * sizeof(char)); } channels[i]->modified = 1; /* addq */ #endif channels[i]->psize = j; channels[i]->parent_pid = calling_pid; channels[i]->nxt = (TRIX_v6 *) 0; #else if (vsize >= VECTORSZ) Uerror("VECTORSZ is too small, edit pan.h"); #endif if (j > 0) { memset((char *)qptr(i), 0, j); } ((Q0 *)qptr(i))->_t = n; return i+1; } #ifdef TRIX int what_p_size(int t) { int j; switch (t) { case 0: j = sizeof(P0); break; case 1: j = sizeof(P1); break; case 2: j = sizeof(P2); break; case 3: j = sizeof(P3); break; default: Uerror("bad proctype"); } return j; } int what_q_size(int t) { int j; switch (t) { case 0: j = sizeof(Q0); break; default: Uerror("bad qtype"); } return j; } #endif #if NQS>0 void qsend(int into, int sorted, int args_given) { int j; uchar *z; #ifdef HAS_SORTED int k; #endif if (!into--) uerror("ref to uninitialized chan name (sending)"); if (into >= (int) now._nr_qs || into < 0) Uerror("qsend bad queue#"); #if defined(TRIX) && !defined(BFS) #ifndef TRIX_ORIG (trpt+1)->q_bup = now._ids_[now._nr_pr+into]; #ifdef V_TRIX printf("%4d: channel %d s save %p from %d\n", depth, into, (trpt+1)->q_bup, now._nr_pr+into); #endif #endif channels[into]->modified = 1; /* qsend */ #ifdef V_TRIX printf("%4d: channel %d modified\n", depth, into); #endif #endif z = qptr(into); j = ((Q0 *)qptr(into))->Qlen; switch (((Q0 *)qptr(into))->_t) { case 0: printf("queue %d was deleted\n", into+1); default: Uerror("bad queue - qsend"); } #ifdef EVENT_TRACE if (in_s_scope(into+1)) require('s', into); #endif } #endif #if SYNC int q_zero(int from) { if (!from--) { uerror("ref to uninitialized chan name (q_zero)"); return 0; } switch(((Q0 *)qptr(from))->_t) { case 0: printf("queue %d was deleted\n", from+1); } Uerror("bad queue q-zero"); return -1; } int not_RV(int from) { if (q_zero(from)) { printf("==>> a test of the contents of a rv "); printf("channel always returns FALSE\n"); uerror("error to poll rendezvous channel"); } return 1; } #endif #ifndef XUSAFE void setq_claim(int x, int m, char *s, int y, char *p) { if (x == 0) uerror("x[rs] claim on uninitialized channel"); if (x < 0 || x > MAXQ) Uerror("cannot happen setq_claim"); q_claim[x] |= m; p_name[y] = p; q_name[x] = s; if (m&2) q_S_check(x, y); if (m&1) q_R_check(x, y); } short q_sender[MAXQ+1]; int q_S_check(int x, int who) { if (!q_sender[x]) { q_sender[x] = who+1; #if SYNC if (q_zero(x)) { printf("chan %s (%d), ", q_name[x], x-1); printf("sndr proc %s (%d)\n", p_name[who], who); uerror("xs chans cannot be used for rv"); } #endif } else if (q_sender[x] != who+1) { printf("pan: xs assertion violated: "); printf("access to chan <%s> (%d)\npan: by ", q_name[x], x-1); if (q_sender[x] > 0 && p_name[q_sender[x]-1]) printf("%s (proc %d) and by ", p_name[q_sender[x]-1], q_sender[x]-1); printf("%s (proc %d)\n", p_name[who], who); uerror("error, partial order reduction invalid"); } return 1; } short q_recver[MAXQ+1]; int q_R_check(int x, int who) { #ifdef VERBOSE printf("q_R_check x=%d who=%d\n", x, who); #endif if (!q_recver[x]) { q_recver[x] = who+1; #if SYNC if (q_zero(x)) { printf("chan %s (%d), ", q_name[x], x-1); printf("recv proc %s (%d)\n", p_name[who], who); uerror("xr chans cannot be used for rv"); } #endif } else if (q_recver[x] != who+1) { printf("pan: xr assertion violated: "); printf("access to chan %s (%d)\npan: ", q_name[x], x-1); if (q_recver[x] > 0 && p_name[q_recver[x]-1]) printf("by %s (proc %d) and ", p_name[q_recver[x]-1], q_recver[x]-1); printf("by %s (proc %d)\n", p_name[who], who); uerror("error, partial order reduction invalid"); } return 1; } #endif int q_len(int x) { if (!x--) uerror("ref to uninitialized chan name (len)"); return ((Q0 *)qptr(x))->Qlen; } int q_full(int from) { if (!from--) uerror("ref to uninitialized chan name (qfull)"); switch(((Q0 *)qptr(from))->_t) { case 0: printf("queue %d was deleted\n", from+1); } Uerror("bad queue - q_full"); return 0; } #ifdef HAS_UNLESS int q_e_f(int from) { /* empty or full */ return !q_len(from) || q_full(from); } #endif #if NQS>0 int qrecv(int from, int slot, int fld, int done) { uchar *z; int j, k, r=0; if (!from--) uerror("ref to uninitialized chan name (receiving)"); #if defined(TRIX) && !defined(BFS) #ifndef TRIX_ORIG (trpt+1)->q_bup = now._ids_[now._nr_pr+from]; #ifdef V_TRIX printf("%4d: channel %d r save %p from %d\n", depth, from, (trpt+1)->q_bup, now._nr_pr+from); #endif #endif channels[from]->modified = 1; /* qrecv */ #ifdef V_TRIX printf("%4d: channel %d modified\n", depth, from); #endif #endif if (from >= (int) now._nr_qs || from < 0) Uerror("qrecv bad queue#"); z = qptr(from); #ifdef EVENT_TRACE if (done && (in_r_scope(from+1))) require('r', from); #endif switch (((Q0 *)qptr(from))->_t) { case 0: printf("queue %d was deleted\n", from+1); default: Uerror("bad queue - qrecv"); } return r; } #endif #ifndef BITSTATE #ifdef COLLAPSE long col_q(int i, char *z) { int j=0, k; char *x, *y; Q0 *ptr = (Q0 *) qptr(i); switch (ptr->_t) { default: Uerror("bad qtype - collapse"); } if (z) x = z; else x = scratch; y = (char *) ptr; k = q_offset[i]; #if NQS > 0 /* no need to store the empty slots at the end */ j -= (q_max[ptr->_t] - ptr->Qlen) * ((j - 2)/q_max[ptr->_t]); #endif #if !defined(NOCOMP) && !defined(HC) for ( ; j > 0; j--, y++) if (!Mask[k++]) *x++ = *y; #else memcpy(x, y, j); x += j; #endif for (j = 0; j < WS-1; j++) *x++ = 0; x -= j; if (z) return (long) (x - z); return ordinal(scratch, x-scratch, 1); /* chan */ } #endif #endif int unsend(int into) { int _m=0, j; uchar *z; #ifdef HAS_SORTED int k; #endif if (!into--) uerror("ref to uninitialized chan (unsend)"); #if defined(TRIX) && !defined(BFS) #ifndef TRIX_ORIG now._ids_[now._nr_pr+into] = trpt->q_bup; #ifdef V_TRIX printf("%4d: channel %d s restore %p into %d\n", depth, into, trpt->q_bup, now._nr_pr+into); #endif #else channels[into]->modified = 1; /* unsend */ #ifdef V_TRIX printf("%4d: channel %d unmodify\n", depth, into); #endif #endif #endif z = qptr(into); j = ((Q0 *)z)->Qlen; ((Q0 *)z)->Qlen = --j; switch (((Q0 *)qptr(into))->_t) { default: Uerror("bad queue - unsend"); } return _m; } void unrecv(int from, int slot, int fld, int fldvar, int strt) { int j; uchar *z; if (!from--) uerror("ref to uninitialized chan (unrecv)"); #if defined(TRIX) && !defined(BFS) #ifndef TRIX_ORIG now._ids_[now._nr_pr+from] = trpt->q_bup; #ifdef V_TRIX printf("%4d: channel %d r restore %p into %d\n", depth, from, trpt->q_bup, now._nr_pr+from); #endif #else channels[from]->modified = 1; /* unrecv */ #ifdef V_TRIX printf("%4d: channel %d unmodify\n", depth, from); #endif #endif #endif z = qptr(from); j = ((Q0 *)z)->Qlen; if (strt) ((Q0 *)z)->Qlen = j+1; switch (((Q0 *)qptr(from))->_t) { default: Uerror("bad queue - qrecv"); } } int q_cond(short II, Trans *t) { int i = 0; for (i = 0; i < 6; i++) { if (t->ty[i] == TIMEOUT_F) return 1; if (t->ty[i] == ALPHA_F) #ifdef GLOB_ALPHA return 0; #else return (II+1 == (short) now._nr_pr && II+1 < MAXPROC); #endif switch (t->qu[i]) { case 0: break; default: Uerror("unknown qid - q_cond"); return 0; } } return 1; } void to_compile(void) { char ctd[2048], carg[128]; #ifdef BITSTATE strcpy(ctd, "-DBITSTATE "); #else strcpy(ctd, ""); #endif #ifdef BFS_PAR strcat(ctd, "-DBFS_PAR "); #endif #ifdef NOVSZ strcat(ctd, "-DNOVSZ "); #endif #ifdef RHASH strcat(ctd, "-DRHASH "); #else #ifdef PERMUTED strcat(ctd, "-DPERMUTED "); #endif #endif #ifdef P_REVERSE strcat(ctd, "-DP_REVERSE "); #endif #ifdef T_REVERSE strcat(ctd, "-DT_REVERSE "); #endif #ifdef T_RAND #if T_RAND>0 sprintf(carg, "-DT_RAND=%d ", T_RAND); strcat(ctd, carg); #else strcat(ctd, "-DT_RAND "); #endif #endif #ifdef P_RAND #if P_RAND>0 sprintf(carg, "-DP_RAND=%d ", P_RAND); strcat(ctd, carg); #else strcat(ctd, "-DP_RAND "); #endif #endif #ifdef BCS sprintf(carg, "-DBCS=%d ", BCS); strcat(ctd, carg); #endif #ifdef BFS strcat(ctd, "-DBFS "); #endif #ifdef MEMLIM sprintf(carg, "-DMEMLIM=%d ", MEMLIM); strcat(ctd, carg); #else #ifdef MEMCNT sprintf(carg, "-DMEMCNT=%d ", MEMCNT); strcat(ctd, carg); #endif #endif #ifdef NOCLAIM strcat(ctd, "-DNOCLAIM "); #endif #ifdef SAFETY strcat(ctd, "-DSAFETY "); #else #ifdef NOFAIR strcat(ctd, "-DNOFAIR "); #else #ifdef NFAIR if (NFAIR != 2) { sprintf(carg, "-DNFAIR=%d ", NFAIR); strcat(ctd, carg); } #endif #endif #endif #ifdef NOREDUCE strcat(ctd, "-DNOREDUCE "); #else #ifdef XUSAFE strcat(ctd, "-DXUSAFE "); #endif #endif #ifdef NP strcat(ctd, "-DNP "); #endif #ifdef PEG strcat(ctd, "-DPEG "); #endif #ifdef VAR_RANGES strcat(ctd, "-DVAR_RANGES "); #endif #ifdef HC strcat(ctd, "-DHC "); #endif #ifdef CHECK strcat(ctd, "-DCHECK "); #endif #ifdef CTL strcat(ctd, "-DCTL "); #endif #ifdef TRIX strcat(ctd, "-DTRIX "); #endif #ifdef NIBIS strcat(ctd, "-DNIBIS "); #endif #ifdef NOBOUNDCHECK strcat(ctd, "-DNOBOUNDCHECK "); #endif #ifdef NOSTUTTER strcat(ctd, "-DNOSTUTTER "); #endif #ifdef REACH strcat(ctd, "-DREACH "); #endif #ifdef PRINTF strcat(ctd, "-DPRINTF "); #endif #ifdef COLLAPSE strcat(ctd, "-DCOLLAPSE "); #endif #ifdef MA sprintf(carg, "-DMA=%d ", MA); strcat(ctd, carg); #endif #ifdef SVDUMP strcat(ctd, "-DSVDUMP "); #endif #if defined(VECTORSZ) && !defined(TRIX) if (VECTORSZ != 1024) { sprintf(carg, "-DVECTORSZ=%d ", VECTORSZ); strcat(ctd, carg); } #endif #ifdef VERBOSE strcat(ctd, "-DVERBOSE "); #endif #ifdef CHECK strcat(ctd, "-DCHECK "); #endif #ifdef SDUMP strcat(ctd, "-DSDUMP "); #endif #if NCORE>1 sprintf(carg, "-DNCORE=%d ", NCORE); strcat(ctd, carg); #endif #ifdef VMAX if (VMAX != 256) { sprintf(carg, "-DVMAX=%d ", VMAX); strcat(ctd, carg); } #endif #ifdef PMAX if (PMAX != 16) { sprintf(carg, "-DPMAX=%d ", PMAX); strcat(ctd, carg); } #endif #ifdef QMAX if (QMAX != 16) { sprintf(carg, "-DQMAX=%d ", QMAX); strcat(ctd, carg); } #endif #ifdef SET_WQ_SIZE sprintf(carg, "-DSET_WQ_SIZE=%d ", SET_WQ_SIZE); strcat(ctd, carg); #endif printf("Compiled as: cc -o pan %span.c\n", ctd); } void active_procs(void) { if (reversing == 0) { Addproc(0, 1); Addproc(1, 1); } else { Addproc(1, 1); Addproc(0, 1); } } #ifdef MA #define TWIDTH 256 #define HASH(y,n) (n)*(((long)y)) #define INRANGE(e,h) ((h>=e->From && h<=e->To)||(e->s==1 && e->S==h)) extern char *emalloc(unsigned long); /* imported routine */ extern void dfa_init(ushort); /* 4 exported routines */ extern int dfa_member(ulong); extern int dfa_store(uchar *); extern void dfa_stats(void); typedef struct Edge { uchar From, To; /* max range 0..255 */ uchar s, S; /* if s=1, S is singleton */ struct Vertex *Dst; struct Edge *Nxt; } Edge; typedef struct Vertex { ulong key, num; /* key for splay tree, nr incoming edges */ uchar from[2], to[2]; /* in-node predefined edge info */ struct Vertex *dst[2];/* most nodes have 2 or more edges */ struct Edge *Succ; /* in case there are more edges */ struct Vertex *lnk, *left, *right; /* splay tree plumbing */ } Vertex; static Edge *free_edges; static Vertex *free_vertices; static Vertex **layers; /* one splay tree of nodes per layer */ static Vertex **path; /* run of word in the DFA */ static Vertex *R, *F, *NF; /* Root, Final, Not-Final */ static uchar *word, *lastword;/* string, and last string inserted */ static int dfa_depth, iv=0, nv=0, pfrst=0, Tally; static void insert_it(Vertex *, int); /* splay-tree code */ static void delete_it(Vertex *, int); static Vertex *find_it(Vertex *, Vertex *, uchar, int); static void recyc_edges(Edge *e) { if (!e) return; recyc_edges(e->Nxt); e->Nxt = free_edges; free_edges = e; } static Edge * new_edge(Vertex *dst) { Edge *e; if (free_edges) { e = free_edges; free_edges = e->Nxt; e->From = e->To = e->s = e->S = 0; e->Nxt = (Edge *) 0; } else e = (Edge *) emalloc(sizeof(Edge)); e->Dst = dst; return e; } static void recyc_vertex(Vertex *v) { recyc_edges(v->Succ); v->Succ = (Edge *) free_vertices; free_vertices = v; nr_states--; } static Vertex * new_vertex(void) { Vertex *v; if (free_vertices) { v = free_vertices; free_vertices = (Vertex *) v->Succ; v->Succ = (Edge *) 0; v->num = 0; } else v = (Vertex *) emalloc(sizeof(Vertex)); nr_states++; return v; } static Vertex * allDelta(Vertex *v, int n) { Vertex *dst = new_vertex(); v->from[0] = 0; v->to[0] = 255; v->dst[0] = dst; dst->num = 256; insert_it(v, n); return dst; } static void insert_edge(Vertex *v, Edge *e) { /* put new edge first */ if (!v->dst[0]) { v->dst[0] = e->Dst; v->from[0] = e->From; v->to[0] = e->To; recyc_edges(e); return; } if (!v->dst[1]) { v->from[1] = v->from[0]; v->from[0] = e->From; v->to[1] = v->to[0]; v->to[0] = e->To; v->dst[1] = v->dst[0]; v->dst[0] = e->Dst; recyc_edges(e); return; } /* shift */ { int f = v->from[1]; int t = v->to[1]; Vertex *d = v->dst[1]; v->from[1] = v->from[0]; v->from[0] = e->From; v->to[1] = v->to[0]; v->to[0] = e->To; v->dst[1] = v->dst[0]; v->dst[0] = e->Dst; e->From = f; e->To = t; e->Dst = d; } e->Nxt = v->Succ; v->Succ = e; } static void copyRecursive(Vertex *v, Edge *e) { Edge *f; if (e->Nxt) copyRecursive(v, e->Nxt); f = new_edge(e->Dst); f->From = e->From; f->To = e->To; f->s = e->s; f->S = e->S; f->Nxt = v->Succ; v->Succ = f; } static void copyEdges(Vertex *to, Vertex *from) { int i; for (i = 0; i < 2; i++) { to->from[i] = from->from[i]; to->to[i] = from->to[i]; to->dst[i] = from->dst[i]; } if (from->Succ) copyRecursive(to, from->Succ); } static Edge * cacheDelta(Vertex *v, int h, int first) { static Edge *ov, tmp; int i; if (!first && INRANGE(ov,h)) return ov; /* intercepts about 10% */ for (i = 0; i < 2; i++) if (v->dst[i] && h >= v->from[i] && h <= v->to[i]) { tmp.From = v->from[i]; tmp.To = v->to[i]; tmp.Dst = v->dst[i]; tmp.s = tmp.S = 0; ov = &tmp; return ov; } for (ov = v->Succ; ov; ov = ov->Nxt) if (INRANGE(ov,h)) return ov; Uerror("cannot get here, cacheDelta"); return (Edge *) 0; } static Vertex * Delta(Vertex *v, int h) /* v->delta[h] */ { Edge *e; if (v->dst[0] && h >= v->from[0] && h <= v->to[0]) return v->dst[0]; /* oldest edge */ if (v->dst[1] && h >= v->from[1] && h <= v->to[1]) return v->dst[1]; for (e = v->Succ; e; e = e->Nxt) if (INRANGE(e,h)) return e->Dst; Uerror("cannot happen Delta"); return (Vertex *) 0; } static void numDelta(Vertex *v, int d) { Edge *e; ulong cnt; int i; for (i = 0; i < 2; i++) if (v->dst[i]) { cnt = v->dst[i]->num + d*(1 + v->to[i] - v->from[i]); if (d == 1 && cnt < v->dst[i]->num) goto bad; v->dst[i]->num = cnt; } for (e = v->Succ; e; e = e->Nxt) { cnt = e->Dst->num + d*(1 + e->To - e->From + e->s); if (d == 1 && cnt < e->Dst->num) bad: Uerror("too many incoming edges"); e->Dst->num = cnt; } } static void setDelta(Vertex *v, int h, Vertex *newdst) /* v->delta[h] = newdst; */ { Edge *e, *f = (Edge *) 0, *g; int i; /* remove the old entry, if there */ for (i = 0; i < 2; i++) if (v->dst[i] && h >= v->from[i] && h <= v->to[i]) { if (h == v->from[i]) { if (h == v->to[i]) { v->dst[i] = (Vertex *) 0; v->from[i] = v->to[i] = 0; } else v->from[i]++; } else if (h == v->to[i]) { v->to[i]--; } else { g = new_edge(v->dst[i]);/* same dst */ g->From = v->from[i]; g->To = h-1; /* left half */ v->from[i] = h+1; /* right half */ insert_edge(v, g); } goto part2; } for (e = v->Succ; e; f = e, e = e->Nxt) { if (e->s == 1 && e->S == h) { e->s = e->S = 0; goto rem_tst; } if (h >= e->From && h <= e->To) { if (h == e->From) { if (h == e->To) { if (e->s) { e->From = e->To = e->S; e->s = 0; break; } else goto rem_do; } else e->From++; } else if (h == e->To) { e->To--; } else /* split */ { g = new_edge(e->Dst); /* same dst */ g->From = e->From; g->To = h-1; /* g=left half */ e->From = h+1; /* e=right half */ g->Nxt = e->Nxt; /* insert g */ e->Nxt = g; /* behind e */ break; /* done */ } rem_tst: if (e->From > e->To) { if (e->s == 0) { rem_do: if (f) f->Nxt = e->Nxt; else v->Succ = e->Nxt; e->Nxt = (Edge *) 0; recyc_edges(e); } else { e->From = e->To = e->S; e->s = 0; } } break; } } part2: /* check if newdst is already there */ for (i = 0; i < 2; i++) if (v->dst[i] == newdst) { if (h+1 == (int) v->from[i]) { v->from[i] = h; return; } if (h == (int) v->to[i]+1) { v->to[i] = h; return; } } for (e = v->Succ; e; e = e->Nxt) { if (e->Dst == newdst) { if (h+1 == (int) e->From) { e->From = h; if (e->s == 1 && e->S+1 == e->From) { e->From = e->S; e->s = e->S = 0; } return; } if (h == (int) e->To+1) { e->To = h; if (e->s == 1 && e->S == e->To+1) { e->To = e->S; e->s = e->S = 0; } return; } if (e->s == 0) { e->s = 1; e->S = h; return; } } } /* add as a new edge */ e = new_edge(newdst); e->From = e->To = h; insert_edge(v, e); } static ulong cheap_key(Vertex *v) { ulong vk2 = 0; if (v->dst[0]) { vk2 = (ulong) v->dst[0]; if ((ulong) v->dst[1] > vk2) vk2 = (ulong) v->dst[1]; } else if (v->dst[1]) vk2 = (ulong) v->dst[1]; if (v->Succ) { Edge *e; for (e = v->Succ; e; e = e->Nxt) if ((ulong) e->Dst > vk2) vk2 = (ulong) e->Dst; } Tally = (vk2>>2)&(TWIDTH-1); return v->key; } static ulong mk_key(Vertex *v) /* not sensitive to order */ { ulong m = 0, vk2 = 0; Edge *e; if (v->dst[0]) { m += HASH(v->dst[0], v->to[0] - v->from[0] + 1); vk2 = (ulong) v->dst[0]; } if (v->dst[1]) { m += HASH(v->dst[1], v->to[1] - v->from[1] + 1); if ((ulong) v->dst[1] > vk2) vk2 = (ulong) v->dst[1]; } for (e = v->Succ; e; e = e->Nxt) { m += HASH(e->Dst, e->To - e->From + 1 + e->s); if ((ulong) e->Dst > vk2) vk2 = (ulong) e->Dst; } Tally = (vk2>>2)&(TWIDTH-1); return m; } static ulong mk_special(int sigma, Vertex *n, Vertex *v) { ulong m = 0, vk2 = 0; Edge *f; int i; for (i = 0; i < 2; i++) if (v->dst[i]) { if (sigma >= v->from[i] && sigma <= v->to[i]) { m += HASH(v->dst[i], v->to[i]-v->from[i]); if ((ulong) v->dst[i] > vk2 && v->to[i] > v->from[i]) vk2 = (ulong) v->dst[i]; } else { m += HASH(v->dst[i], v->to[i]-v->from[i]+1); if ((ulong) v->dst[i] > vk2) vk2 = (ulong) v->dst[i]; } } for (f = v->Succ; f; f = f->Nxt) { if (sigma >= f->From && sigma <= f->To) { m += HASH(f->Dst, f->To - f->From + f->s); if ((ulong) f->Dst > vk2 && f->To - f->From + f->s > 0) vk2 = (ulong) f->Dst; } else if (f->s == 1 && sigma == f->S) { m += HASH(f->Dst, f->To - f->From + 1); if ((ulong) f->Dst > vk2) vk2 = (ulong) f->Dst; } else { m += HASH(f->Dst, f->To - f->From + 1 + f->s); if ((ulong) f->Dst > vk2) vk2 = (ulong) f->Dst; } } if ((ulong) n > vk2) vk2 = (ulong) n; Tally = (vk2>>2)&(TWIDTH-1); m += HASH(n, 1); return m; } void dfa_init(ushort nr_layers) { int i; Vertex *r, *t; dfa_depth = nr_layers; /* one byte per layer */ path = (Vertex **) emalloc((dfa_depth+1)*sizeof(Vertex *)); layers = (Vertex **) emalloc(TWIDTH*(dfa_depth+1)*sizeof(Vertex *)); lastword = (uchar *) emalloc((dfa_depth+1)*sizeof(uchar)); lastword[dfa_depth] = lastword[0] = 255; path[0] = R = new_vertex(); F = new_vertex(); for (i = 1, r = R; i < dfa_depth; i++, r = t) t = allDelta(r, i-1); NF = allDelta(r, i-1); } #if 0 static void complement_dfa(void) { Vertex *tmp = F; F = NF; NF = tmp; } #endif double tree_stats(Vertex *t) { Edge *e; double cnt=0.0; if (!t) return 0; if (!t->key) return 0; t->key = 0; /* precaution */ if (t->dst[0]) cnt++; if (t->dst[1]) cnt++; for (e = t->Succ; e; e = e->Nxt) cnt++; cnt += tree_stats(t->lnk); cnt += tree_stats(t->left); cnt += tree_stats(t->right); return cnt; } void dfa_stats(void) { int i, j; double cnt = 0.0; for (j = 0; j < TWIDTH; j++) for (i = 0; i < dfa_depth+1; i++) cnt += tree_stats(layers[i*TWIDTH+j]); printf("Minimized Automaton: %6lu nodes and %6g edges\n", nr_states, cnt); } int dfa_member(ulong n) { Vertex **p, **q; uchar *w = &word[n]; int i; p = &path[n]; q = (p+1); for (i = n; i < dfa_depth; i++) *q++ = Delta(*p++, *w++); return (*p == F); } int dfa_store(uchar *sv) { Vertex **p, **q, *s, *y, *old, *new = F; uchar *w, *u = lastword; int i, j, k; w = word = sv; while (*w++ == *u++) /* find first byte that differs */ ; pfrst = (int) (u - lastword) - 1; memcpy(&lastword[pfrst], &sv[pfrst], dfa_depth-pfrst); if (pfrst > iv) pfrst = iv; if (pfrst > nv) pfrst = nv; /* phase1: */ p = &path[pfrst]; q = (p+1); w = &word[pfrst]; for (i = pfrst; i < dfa_depth; i++) *q++ = Delta(*p++, *w++); /* (*p)->delta[*w++]; */ if (*p == F) return 1; /* it's already there */ /* phase2: */ iv = dfa_depth; do { iv--; old = new; new = find_it(path[iv], old, word[iv], iv); } while (new && iv > 0); /* phase3: */ nv = k = 0; s = path[0]; for (j = 1; j <= iv; ++j) if (path[j]->num > 1) { y = new_vertex(); copyEdges(y, path[j]); insert_it(y, j); numDelta(y, 1); delete_it(s, j-1); setDelta(s, word[j-1], y); insert_it(s, j-1); y->num = 1; /* initial value 1 */ s = y; path[j]->num--; /* only 1 moved from j to y */ k = 1; } else { s = path[j]; if (!k) nv = j; } y = Delta(s, word[iv]); y->num--; delete_it(s, iv); setDelta(s, word[iv], old); insert_it(s, iv); old->num++; for (j = iv+1; j < dfa_depth; j++) if (path[j]->num == 0) { numDelta(path[j], -1); delete_it(path[j], j); recyc_vertex(path[j]); } else break; return 0; } static Vertex * splay(ulong i, Vertex *t) { Vertex N, *l, *r, *y; if (!t) return t; N.left = N.right = (Vertex *) 0; l = r = &N; for (;;) { if (i < t->key) { if (!t->left) break; if (i < t->left->key) { y = t->left; t->left = y->right; y->right = t; t = y; if (!t->left) break; } r->left = t; r = t; t = t->left; } else if (i > t->key) { if (!t->right) break; if (i > t->right->key) { y = t->right; t->right = y->left; y->left = t; t = y; if (!t->right) break; } l->right = t; l = t; t = t->right; } else break; } l->right = t->left; r->left = t->right; t->left = N.right; t->right = N.left; return t; } static void insert_it(Vertex *v, int L) { Vertex *new, *t; ulong i; int nr; i = mk_key(v); nr = ((L*TWIDTH)+Tally); t = layers[nr]; v->key = i; if (!t) { layers[nr] = v; return; } t = splay(i, t); if (i < t->key) { new = v; new->left = t->left; new->right = t; t->left = (Vertex *) 0; } else if (i > t->key) { new = v; new->right = t->right; new->left = t; t->right = (Vertex *) 0; } else /* it's already there */ { v->lnk = t->lnk; /* put in linked list off v */ t->lnk = v; new = t; } layers[nr] = new; } static int checkit(Vertex *h, Vertex *v, Vertex *n, uchar sigma) { Edge *g, *f; int i, k, j = 1; for (k = 0; k < 2; k++) if (h->dst[k]) { if (sigma >= h->from[k] && sigma <= h->to[k]) { if (h->dst[k] != n) goto no_match; } for (i = h->from[k]; i <= h->to[k]; i++) { if (i == sigma) continue; g = cacheDelta(v, i, j); j = 0; if (h->dst[k] != g->Dst) goto no_match; if (g->s == 0 || g->S != i) i = g->To; } } for (f = h->Succ; f; f = f->Nxt) { if (INRANGE(f,sigma)) { if (f->Dst != n) goto no_match; } for (i = f->From; i <= f->To; i++) { if (i == sigma) continue; g = cacheDelta(v, i, j); j = 0; if (f->Dst != g->Dst) goto no_match; if (g->s == 1 && i == g->S) continue; i = g->To; } if (f->s && f->S != sigma) { g = cacheDelta(v, f->S, 1); if (f->Dst != g->Dst) goto no_match; } } if (h->Succ || h->dst[0] || h->dst[1]) return 1; no_match: return 0; } static Vertex * find_it(Vertex *v, Vertex *n, uchar sigma, int L) { Vertex *z, *t; ulong i; int nr; i = mk_special(sigma,n,v); nr = ((L*TWIDTH)+Tally); t = layers[nr]; if (!t) return (Vertex *) 0; layers[nr] = t = splay(i, t); if (i == t->key) for (z = t; z; z = z->lnk) if (checkit(z, v, n, sigma)) return z; return (Vertex *) 0; } static void delete_it(Vertex *v, int L) { Vertex *x, *t; ulong i; int nr; i = cheap_key(v); nr = ((L*TWIDTH)+Tally); t = layers[nr]; if (!t) return; t = splay(i, t); if (i == t->key) { Vertex *z, *y = (Vertex *) 0; for (z = t; z && z != v; y = z, z = z->lnk) ; if (z != v) goto bad; if (y) { y->lnk = z->lnk; z->lnk = (Vertex *) 0; layers[nr] = t; return; } else if (z->lnk) /* z == t == v */ { y = z->lnk; y->left = t->left; y->right = t->right; t->left = t->right = t->lnk = (Vertex *) 0; layers[nr] = y; return; } /* delete the node itself */ if (!t->left) { x = t->right; } else { x = splay(i, t->left); x->right = t->right; } t->left = t->right = t->lnk = (Vertex *) 0; layers[nr] = x; return; } bad: Uerror("cannot happen delete"); } #endif #if defined(MA) && (defined(W_XPT) || defined(R_XPT)) static Vertex **temptree; static char wbuf[4096]; static int WCNT = 4096, wcnt=0; static uchar stacker[MA+1]; static ulong stackcnt = 0; extern double nstates, nlinks, truncs, truncs2; static void xwrite(int fd, char *b, int n) { if (wcnt+n >= 4096) { write(fd, wbuf, wcnt); wcnt = 0; } memcpy(&wbuf[wcnt], b, n); wcnt += n; } static void wclose(fd) { if (wcnt > 0) write(fd, wbuf, wcnt); wcnt = 0; close(fd); } static void w_vertex(int fd, Vertex *v) { char t[3]; int i; Edge *e; xwrite(fd, (char *) &v, sizeof(Vertex *)); t[0] = 0; for (i = 0; i < 2; i++) if (v->dst[i]) { t[1] = v->from[i], t[2] = v->to[i]; xwrite(fd, t, 3); xwrite(fd, (char *) &(v->dst[i]), sizeof(Vertex *)); } for (e = v->Succ; e; e = e->Nxt) { t[1] = e->From, t[2] = e->To; xwrite(fd, t, 3); xwrite(fd, (char *) &(e->Dst), sizeof(Vertex *)); if (e->s) { t[1] = t[2] = e->S; xwrite(fd, t, 3); xwrite(fd, (char *) &(e->Dst), sizeof(Vertex *)); } } } static void w_layer(int fd, Vertex *v) { uchar c=1; if (!v) return; xwrite(fd, (char *) &c, 1); w_vertex(fd, v); w_layer(fd, v->lnk); w_layer(fd, v->left); w_layer(fd, v->right); } void w_xpoint(void) { int fd; char nm[64]; int i, j; uchar c; static uchar xwarned = 0; sprintf(nm, "%s.xpt", PanSource); if ((fd = creat(nm, 0666)) <= 0) if (!xwarned) { xwarned = 1; printf("cannot creat checkpoint file\n"); return; } xwrite(fd, (char *) &nstates, sizeof(double)); xwrite(fd, (char *) &truncs, sizeof(double)); xwrite(fd, (char *) &truncs2, sizeof(double)); xwrite(fd, (char *) &nlinks, sizeof(double)); xwrite(fd, (char *) &dfa_depth, sizeof(int)); xwrite(fd, (char *) &R, sizeof(Vertex *)); xwrite(fd, (char *) &F, sizeof(Vertex *)); xwrite(fd, (char *) &NF, sizeof(Vertex *)); for (j = 0; j < TWIDTH; j++) for (i = 0; i < dfa_depth+1; i++) { w_layer(fd, layers[i*TWIDTH+j]); c = 2; xwrite(fd, (char *) &c, 1); } wclose(fd); } static void xread(int fd, char *b, int n) { int m = wcnt; int delta = 0; if (m < n) { if (m > 0) memcpy(b, &wbuf[WCNT-m], m); delta = m; WCNT = wcnt = read(fd, wbuf, 4096); if (wcnt < n-m) Uerror("xread failed -- insufficient data"); n -= m; } memcpy(&b[delta], &wbuf[WCNT-wcnt], n); wcnt -= n; } static void x_cleanup(Vertex *c) { Edge *e; /* remove the tree and edges from c */ if (!c) return; for (e = c->Succ; e; e = e->Nxt) x_cleanup(e->Dst); recyc_vertex(c); } static void x_remove(void) { Vertex *tmp; int i, s; int r, j; /* double-check: */ stacker[dfa_depth-1] = 0; r = dfa_store(stacker); stacker[dfa_depth-1] = 4; j = dfa_member(dfa_depth-1); if (r != 1 || j != 0) { printf("%lu: ", stackcnt); for (i = 0; i < dfa_depth; i++) printf("%d,", stacker[i]); printf(" -- not a stackstate <o:%d,4:%d>\n", r, j); return; } stacker[dfa_depth-1] = 1; s = dfa_member(dfa_depth-1); { tmp = F; F = NF; NF = tmp; } /* complement */ if (s) dfa_store(stacker); stacker[dfa_depth-1] = 0; dfa_store(stacker); stackcnt++; { tmp = F; F = NF; NF = tmp; } } static void x_rm_stack(Vertex *t, int k) { int j; Edge *e; if (k == 0) { x_remove(); return; } if (t) for (e = t->Succ; e; e = e->Nxt) { for (j = e->From; j <= (int) e->To; j++) { stacker[k] = (uchar) j; x_rm_stack(e->Dst, k-1); } if (e->s) { stacker[k] = e->S; x_rm_stack(e->Dst, k-1); } } } static Vertex * insert_withkey(Vertex *v, int L) { Vertex *new, *t = temptree[L]; if (!t) { temptree[L] = v; return v; } t = splay(v->key, t); if (v->key < t->key) { new = v; new->left = t->left; new->right = t; t->left = (Vertex *) 0; } else if (v->key > t->key) { new = v; new->right = t->right; new->left = t; t->right = (Vertex *) 0; } else { if (t != R && t != F && t != NF) Uerror("double insert, bad checkpoint data"); else { recyc_vertex(v); new = t; } } temptree[L] = new; return new; } static Vertex * find_withkey(Vertex *v, int L) { Vertex *t = temptree[L]; if (t) { temptree[L] = t = splay((ulong) v, t); if (t->key == (ulong) v) return t; } Uerror("not found error, bad checkpoint data"); return (Vertex *) 0; } void r_layer(int fd, int n) { Vertex *v; Edge *e; char c, t[2]; for (;;) { xread(fd, &c, 1); if (c == 2) break; if (c == 1) { v = new_vertex(); xread(fd, (char *) &(v->key), sizeof(Vertex *)); v = insert_withkey(v, n); } else /* c == 0 */ { e = new_edge((Vertex *) 0); xread(fd, t, 2); e->From = t[0]; e->To = t[1]; xread(fd, (char *) &(e->Dst), sizeof(Vertex *)); insert_edge(v, e); } } } static void v_fix(Vertex *t, int nr) { int i; Edge *e; if (!t) return; for (i = 0; i < 2; i++) if (t->dst[i]) t->dst[i] = find_withkey(t->dst[i], nr); for (e = t->Succ; e; e = e->Nxt) e->Dst = find_withkey(e->Dst, nr); v_fix(t->left, nr); v_fix(t->right, nr); } static void v_insert(Vertex *t, int nr) { Edge *e; int i; if (!t) return; v_insert(t->left, nr); v_insert(t->right, nr); /* remove only leafs from temptree */ t->left = t->right = t->lnk = (Vertex *) 0; insert_it(t, nr); /* into layers */ for (i = 0; i < 2; i++) if (t->dst[i]) t->dst[i]->num += (t->to[i] - t->from[i] + 1); for (e = t->Succ; e; e = e->Nxt) e->Dst->num += (e->To - e->From + 1 + e->s); } static void x_fixup(void) { int i; for (i = 0; i < dfa_depth; i++) v_fix(temptree[i], (i+1)); for (i = dfa_depth; i >= 0; i--) v_insert(temptree[i], i); } static Vertex * x_tail(Vertex *t, ulong want) { int i, yes, no; Edge *e; Vertex *v = (Vertex *) 0; if (!t) return v; yes = no = 0; for (i = 0; i < 2; i++) if ((ulong) t->dst[i] == want) { /* was t->from[i] <= 0 && t->to[i] >= 0 */ /* but from and to are uchar */ if (t->from[i] == 0) yes = 1; else if (t->from[i] <= 4 && t->to[i] >= 4) no = 1; } for (e = t->Succ; e; e = e->Nxt) if ((ulong) e->Dst == want) { /* was INRANGE(e,0) but From and To are uchar */ if ((e->From == 0) || (e->s==1 && e->S==0)) yes = 1; else if (INRANGE(e, 4)) no = 1; } if (yes && !no) return t; v = x_tail(t->left, want); if (v) return v; v = x_tail(t->right, want); if (v) return v; return (Vertex *) 0; } static void x_anytail(Vertex *t, Vertex *c, int nr) { int i; Edge *e, *f; Vertex *v; if (!t) return; for (i = 0; i < 2; i++) if ((ulong) t->dst[i] == c->key) { v = new_vertex(); v->key = t->key; f = new_edge(v); f->From = t->from[i]; f->To = t->to[i]; f->Nxt = c->Succ; c->Succ = f; if (nr > 0) x_anytail(temptree[nr-1], v, nr-1); } for (e = t->Succ; e; e = e->Nxt) if ((ulong) e->Dst == c->key) { v = new_vertex(); v->key = t->key; f = new_edge(v); f->From = e->From; f->To = e->To; f->s = e->s; f->S = e->S; f->Nxt = c->Succ; c->Succ = f; x_anytail(temptree[nr-1], v, nr-1); } x_anytail(t->left, c, nr); x_anytail(t->right, c, nr); } static Vertex * x_cpy_rev(void) { Vertex *c, *v; /* find 0 and !4 predecessor of F */ v = x_tail(temptree[dfa_depth-1], F->key); if (!v) return (Vertex *) 0; c = new_vertex(); c->key = v->key; /* every node on dfa_depth-2 that has v->key as succ */ /* make copy and let c point to these (reversing ptrs) */ x_anytail(temptree[dfa_depth-2], c, dfa_depth-2); return c; } void r_xpoint(void) { int fd; char nm[64]; Vertex *d; int i, j; wcnt = 0; sprintf(nm, "%s.xpt", PanSource); if ((fd = open(nm, 0)) < 0) /* O_RDONLY */ Uerror("cannot open checkpoint file"); xread(fd, (char *) &nstates, sizeof(double)); xread(fd, (char *) &truncs, sizeof(double)); xread(fd, (char *) &truncs2, sizeof(double)); xread(fd, (char *) &nlinks, sizeof(double)); xread(fd, (char *) &dfa_depth, sizeof(int)); if (dfa_depth != MA+a_cycles) Uerror("bad dfa_depth in checkpoint file"); path = (Vertex **) emalloc((dfa_depth+1)*sizeof(Vertex *)); layers = (Vertex **) emalloc(TWIDTH*(dfa_depth+1)*sizeof(Vertex *)); temptree = (Vertex **) emalloc((dfa_depth+2)*sizeof(Vertex *)); lastword = (uchar *) emalloc((dfa_depth+1)*sizeof(uchar)); lastword[dfa_depth] = lastword[0] = 255; path[0] = R = new_vertex(); xread(fd, (char *) &R->key, sizeof(Vertex *)); R = insert_withkey(R, 0); F = new_vertex(); xread(fd, (char *) &F->key, sizeof(Vertex *)); F = insert_withkey(F, dfa_depth); NF = new_vertex(); xread(fd, (char *) &NF->key, sizeof(Vertex *)); NF = insert_withkey(NF, dfa_depth); for (j = 0; j < TWIDTH; j++) for (i = 0; i < dfa_depth+1; i++) r_layer(fd, i); if (wcnt != 0) Uerror("bad count in checkpoint file"); d = x_cpy_rev(); x_fixup(); stacker[dfa_depth-1] = 0; x_rm_stack(d, dfa_depth-2); x_cleanup(d); close(fd); printf("pan: removed %lu stackstates\n", stackcnt); nstates -= (double) stackcnt; } #endif void c_globals(void) { /* int i; */ printf("global vars:\n"); printf(" bit button: %d\n", now.button); printf(" bit detector: %d\n", now.detector); printf(" byte state: %d\n", now.state); printf(" mtype OFF: 3\n"); printf(" mtype ON: 2\n"); printf(" mtype SONANDO: 1\n"); } void c_locals(int pid, int tp) { /* int i; */ switch(tp) { case 2: /* none */ break; case 1: /* none */ break; case 0: /* none */ break; } } void printm(int x) { switch (x) { case 1: Printf("SONANDO"); break; case 2: Printf("ON"); break; case 3: Printf("OFF"); break; default: Printf("%d", x); } } void c_chandump(int unused) { unused++; /* avoid complaints */ } Trans *t_id_lkup[64]; #ifdef BFS_PAR #include "pan.p" #endif /* end of pan.c */
[ "lcortes.spinola@gmail.com" ]
lcortes.spinola@gmail.com
3077e697336e3b20028dca12719c0c043266dd4b
14c77d6dee2f0fd522ea8cbf31ee68786856f11f
/7079_Big_Mod.c
271e16f31fe464f669ee00a4cfb593526e397279
[]
no_license
hydai/NTHU-OJ-Code
c3d10dddb6748b7df0c299b69ad9101fe0386b4c
6016952e3e44243413f9b5eab3dd1f70cd347b18
refs/heads/master
2021-01-17T08:37:41.216418
2016-07-09T02:26:45
2016-07-09T02:26:45
12,322,536
6
0
null
null
null
null
UTF-8
C
false
false
893
c
#include <stdio.h> #include <stdlib.h> /*value*/ int m; /*function*/ long long int mode(int b, int p); int main(int argc, char *argv[]) { int b, p; long long int ans; while (EOF != scanf("%d%d%d", &b, &p, &m)) { if (b%m==0) { ans = 0; } ans = mode(b, p); printf("%lld\n", ans); } return 0; } long long int mode(int b, int p) { long long int ans = 1; if (p==0 || b==1) { return 1; } if (p==1) { return b; } if (p%2==0) { if (b>m) { ans = mode(b%m, p); } else if (b<m) { ans = mode(b*b, p/2); } } else { if (b>m) { ans = mode(b%m, p-1)*b; } else if (b<m) { ans = mode(b*b, (p-1)/2)*b; } if (ans>m) { ans%=m; } } return ans; }
[ "z54981220@gmail.com" ]
z54981220@gmail.com
7c50c143541ce5a7fe7ae39b21d4f1e7b1b1c1a6
6d94ddbe6bb313f95e4193efb14197b055d36d31
/code/embedded/tests/radio/main.c
1d042b1820825236f3cbb7fd44e23e7cd3d12185
[]
no_license
alejandrorosas/trowelproject
340d292815207e355e0f50adc15b6e1f51940f97
46eef4bbb75486b39f5bbf41b6a8db36a982d1a4
refs/heads/master
2021-01-10T14:23:44.458570
2010-06-07T08:56:10
2010-06-07T08:56:10
46,488,159
0
0
null
null
null
null
UTF-8
C
false
false
1,573
c
#include <io.h> #include <signal.h> #include <string.h> #include "clock.h" #include "leds.h" #include "mac.h" #include "timer.h" #define EVENT_NONE 0 #define EVENT_SEND 1 #define EVENT_SENT 2 #define EVENT_RX 3 volatile int event = 0; uint8_t msg[14] = "hello"; uint16_t rx_from; uint8_t rx_msg[14]; int send(void) { event = EVENT_SEND; return 1; } int sent(int success) { event = EVENT_SENT; return 1; } int rx(uint8_t* data, int16_t len, uint8_t src) { if (len == strlen(msg) && !strcmp(msg, data)) { event = EVENT_RX; return 1; } return 0; } int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer eint(); clock_dco_set(8); // DCO 8MHz clock_mclk_set(CLOCK_SOURCE_DCO, 1); // MCLK 8MHz clock_smclk_set(CLOCK_SOURCE_DCO, 8); // SMCLK 1MHz clock_aclk_set(1); leds_init(); leds_off(LEDS_ALL); mac_init(); mac_set_tx_cb(sent); mac_set_rx_cb(rx); timer_start(TIMER_SOURCE_ACLK, 1); timer_register_cb(TIMER_ALARM_0, send); timer_set_alarm(TIMER_ALARM_0, 12000, 12000, TIMER_MODE_FROM_NOW, 0); leds_on(LEDS_ALL); while (1) { event = 0; LPM0; switch (event) { case EVENT_SEND: mac_send(msg, strlen(msg), MAC_BROADCAST); break; case EVENT_SENT: leds_toggle(LED_GREEN); break; case EVENT_RX: leds_toggle(LED_RED); break; } } return 0; }
[ "clement.bdr@16d9f100-46de-11de-89ec-3d9467717a5a" ]
clement.bdr@16d9f100-46de-11de-89ec-3d9467717a5a
e045099f57195034164a128cc342076d55312328
91a882547e393d4c4946a6c2c99186b5f72122dd
/Source/XPSP1/NT/base/screg/winreg/server/regsec.c
c09ec7768916b0fef69b3ad9077ceb99ef0c7fc3
[]
no_license
IAmAnubhavSaini/cryptoAlgorithm-nt5src
94f9b46f101b983954ac6e453d0cf8d02aa76fc7
d9e1cdeec650b9d6d3ce63f9f0abe50dabfaf9e2
refs/heads/master
2023-09-02T10:14:14.795579
2021-11-20T13:47:06
2021-11-20T13:47:06
null
0
0
null
null
null
null
UTF-8
C
false
false
33,020
c
/*++ Copyright (c) 1991 Microsoft Corporation Module Name: RegSec.c Abstract: This module contains code to apply security to the otherwise unsecured top level keys, in fashion that will allow existing consumers access to the keys that they need (print, srvmgr, etc.). Author: Richard Ward (richardw) 15 May 1996 Notes: --*/ #include <rpc.h> #include <string.h> #include <wchar.h> #include "regrpc.h" #include "localreg.h" #include "regsec.h" #define REGSEC_READ 1 #define REGSEC_WRITE 2 WCHAR RemoteRegistryKey[] = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\SecurePipeServers\\winreg"; WCHAR AllowedPathsKey[] = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\SecurePipeServers\\winreg\\AllowedPaths"; WCHAR MachineValue[] = L"Machine"; WCHAR UsersValue[] = L"Users"; PSECURITY_DESCRIPTOR RemoteRegistrySD; PUNICODE_STRING MachineAllowedPaths; PUCHAR MachineAllowedPathsBase; ULONG MachineAllowedPathsCount; PUNICODE_STRING UsersAllowedPaths; PUCHAR UsersAllowedPathsBase; ULONG UsersAllowedPathsCount; GENERIC_MAPPING RemoteRegistryMappings; LARGE_INTEGER WinregChange ; LARGE_INTEGER AllowedPathsChange ; RTL_RESOURCE RegSecReloadLock ; NTSTATUS RegSecReadSDFromRegistry( IN HANDLE hKey, OUT PSECURITY_DESCRIPTOR * pSDToUse) /*++ Routine Description: This function checks the registry in the magic place to see if an extra ACL has been defined for the pipe being passed in. If there is one, it is translated to a NP acl, then returned. If there isn't one, or if something goes wrong, an NULL acl is returned. Arguments: InterfaceName name of the pipe to check for, e.g. winreg, etc. pSDToUse returned a pointer to the security decriptor to use. Return Value: STATUS_SUCCESS, STATUS_NO_MEMORY, Possible other errors from registry apis. --*/ { NTSTATUS Status ; PSECURITY_DESCRIPTOR pSD; ULONG cbNeeded; ACL_SIZE_INFORMATION AclSize; ULONG AceIndex; ACCESS_MASK NewMask; PACCESS_ALLOWED_ACE pAce; PACL pAcl; BOOLEAN DaclPresent; BOOLEAN DaclDefaulted; UNICODE_STRING Interface; UNICODE_STRING Allowed; ULONG i; BOOLEAN PipeNameOk; PSECURITY_DESCRIPTOR pNewSD; PACL pNewAcl; PSID pSid; PSID pSidCopy; BOOLEAN Defaulted; PACL Acl; PSID AdminSid = NULL ; SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY ; ULONG SizeOfAcl ; *pSDToUse = NULL; // // Son of a gun, someone has established security for this pipe. // pSD = NULL; cbNeeded = 0; Status = NtQuerySecurityObject( hKey, DACL_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION, NULL, 0, &cbNeeded ); if (Status == STATUS_BUFFER_TOO_SMALL) { pSD = RtlAllocateHeap(RtlProcessHeap(), 0, cbNeeded); if (pSD) { Status = NtQuerySecurityObject( hKey, DACL_SECURITY_INFORMATION | OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION, pSD, cbNeeded, &cbNeeded ); if (NT_SUCCESS(Status)) { // // Now, the tricky part. There is no 1-1 mapping of Key // permissions to Pipe permissions. So, we do it here. // We walk the DACL, and examine each ACE. We build a new // access mask for each ACE, and set the flags as follows: // // if (KEY_READ) GENERIC_READ // if (KEY_WRITE) GENERIC_WRITE // Status = RtlGetDaclSecurityDescriptor( pSD, &DaclPresent, &pAcl, &DaclDefaulted); // // If this failed, or there is no DACL present, then // we're in trouble. // if (!NT_SUCCESS(Status) || !DaclPresent || !pAcl) { goto GetSDFromKey_BadAcl; } Status = RtlQueryInformationAcl(pAcl, &AclSize, sizeof(AclSize), AclSizeInformation); if (!NT_SUCCESS(Status)) { goto GetSDFromKey_BadAcl; } for (AceIndex = 0; AceIndex < AclSize.AceCount ; AceIndex++ ) { NewMask = 0; Status = RtlGetAce( pAcl, AceIndex, & pAce); // // We don't care what kind of ACE it is, since we // are just mapping the access types, and the access // mask is always at a constant position. // if (NT_SUCCESS(Status)) { if ((pAce->Header.AceType != ACCESS_ALLOWED_ACE_TYPE) && (pAce->Header.AceType != ACCESS_DENIED_ACE_TYPE)) { // // Must be an audit or random ACE type. Skip it. // continue; } if (pAce->Mask & KEY_READ) { NewMask |= REGSEC_READ; } if (pAce->Mask & KEY_WRITE) { NewMask |= REGSEC_WRITE; } pAce->Mask = NewMask; } else { // // Panic: Bad ACL? // goto GetSDFromKey_BadAcl; } } // // RPC does not understand self-relative SDs, so // we have to turn this into an absolute for them to turn // back into a self relative. // pNewSD = RtlAllocateHeap(RtlProcessHeap(), 0, cbNeeded); if (!pNewSD) { goto GetSDFromKey_BadAcl; } InitializeSecurityDescriptor( pNewSD, SECURITY_DESCRIPTOR_REVISION); pNewAcl = (PACL) (((PUCHAR) pNewSD) + sizeof(SECURITY_DESCRIPTOR) ); RtlCopyMemory(pNewAcl, pAcl, AclSize.AclBytesInUse); SetSecurityDescriptorDacl(pNewSD, TRUE, pNewAcl, FALSE); Status = RtlGetOwnerSecurityDescriptor( pSD, &pSid, &Defaulted ); if ( NT_SUCCESS( Status ) ) { pSidCopy = RtlAllocateHeap( RtlProcessHeap(), 0, RtlLengthSid( pSid ) ); if ( pSidCopy ) { RtlCopyMemory( pSidCopy, pSid, RtlLengthSid( pSid ) ); } RtlSetOwnerSecurityDescriptor( pNewSD, pSidCopy, FALSE ); } Status = RtlGetGroupSecurityDescriptor( pSD, &pSid, &Defaulted ); if ( NT_SUCCESS( Status ) ) { pSidCopy = RtlAllocateHeap( RtlProcessHeap(), 0, RtlLengthSid( pSid ) ); if ( pSidCopy ) { RtlCopyMemory( pSidCopy, pSid, RtlLengthSid( pSid ) ); } RtlSetGroupSecurityDescriptor( pNewSD, pSidCopy, FALSE ); } RtlFreeHeap(RtlProcessHeap(), 0, pSD); *pSDToUse = pNewSD; return(Status); } } return(STATUS_NO_MEMORY); } else { GetSDFromKey_BadAcl: // // Free the SD that we have allocated // if (pSD) { RtlFreeHeap(RtlProcessHeap(), 0, pSD); } // // Key exists, but there is no security descriptor, or it is unreadable // for whatever reason. // pSD = RtlAllocateHeap(RtlProcessHeap(), 0, sizeof(SECURITY_DESCRIPTOR) ); if (pSD) { InitializeSecurityDescriptor( pSD, SECURITY_DESCRIPTOR_REVISION ); Status = RtlAllocateAndInitializeSid( &NtAuthority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdminSid ); SizeOfAcl = sizeof( ACL ) + sizeof( ACL ) + sizeof( ACE_HEADER ) + RtlLengthRequiredSid( 2 ); Acl = RtlAllocateHeap( RtlProcessHeap(), 0, SizeOfAcl ); if ( NT_SUCCESS( Status ) && (Acl != NULL )) { (VOID) RtlCreateAcl(Acl, SizeOfAcl, ACL_REVISION ); Status = RtlAddAccessAllowedAce( Acl, ACL_REVISION, REGSEC_READ | REGSEC_WRITE, AdminSid ); if ( NT_SUCCESS( Status ) ) { Status = RtlSetDaclSecurityDescriptor( pSD, TRUE, Acl, FALSE ); if ( NT_SUCCESS( Status ) ) { RtlFreeSid( AdminSid ); *pSDToUse = pSD; return STATUS_SUCCESS ; } } } if ( AdminSid ) { RtlFreeSid( AdminSid ); } if ( NT_SUCCESS( Status ) ) { Status = STATUS_NO_MEMORY ; } } return(STATUS_NO_MEMORY); } return Status ; } NTSTATUS RegSecCheckIfAclValid( VOID ) /*++ Routine Description: Checks if the local copy of the ACL from the registry is still valid (that is, no one has changed it. If it is gone, the ACL is destroyed. Arguments: None. Returns: STATUS_SUCCESS if the state of the ACL is valid (whether it is present or not), other error if an error occurred. --*/ { HANDLE hKey; OBJECT_ATTRIBUTES ObjAttr; UNICODE_STRING UniString; PKEY_BASIC_INFORMATION KeyInfo ; HANDLE Token ; HANDLE NullHandle ; UCHAR Buffer[ sizeof( KEY_BASIC_INFORMATION ) + sizeof( RemoteRegistryKey ) + 16 ]; NTSTATUS Status ; ULONG BufferSize ; RtlInitUnicodeString( &UniString, RemoteRegistryKey ); InitializeObjectAttributes( &ObjAttr, &UniString, OBJ_CASE_INSENSITIVE, NULL, NULL); // // Open the thread token. If we're in the middle of an RPC call, we won't be // able to open the key (necessarily). So, revert to local system in order to // open successfully. Status = NtOpenThreadToken( NtCurrentThread(), MAXIMUM_ALLOWED, TRUE, &Token ); if ( ( Status == STATUS_NO_IMPERSONATION_TOKEN ) || ( Status == STATUS_NO_TOKEN ) ) { Token = NULL ; } else if ( Status == STATUS_SUCCESS ) { NullHandle = NULL ; Status = NtSetInformationThread( NtCurrentThread(), ThreadImpersonationToken, (PVOID) &NullHandle, (ULONG) sizeof( NullHandle ) ); } else { return Status ; } Status = NtOpenKey( &hKey, KEY_READ, &ObjAttr); if ( Token ) { NTSTATUS RestoreStatus; RestoreStatus = NtSetInformationThread( NtCurrentThread(), ThreadImpersonationToken, (PVOID) &Token, sizeof( NullHandle ) ); NtClose( Token ); if ( !NT_SUCCESS( RestoreStatus ) ) { Status = RestoreStatus ; } } if ( !NT_SUCCESS( Status ) ) { if ( ( Status == STATUS_OBJECT_PATH_NOT_FOUND ) || ( Status == STATUS_OBJECT_NAME_NOT_FOUND ) ) { // // The key is not present. Either, the key has never been present, // in which case we're essentially done, or the key has been deleted. // If the key is deleted, we need to get rid of the remote acl. // if ( WinregChange.QuadPart ) { // // Ok, the key has been deleted. Get the exclusive lock and get to work. // RtlAcquireResourceExclusive( &RegSecReloadLock, TRUE ); // // Make sure no one else got through and deleted it already: // if ( WinregChange.QuadPart ) { RtlFreeHeap( RtlProcessHeap(), 0, RemoteRegistrySD ); RemoteRegistrySD = NULL ; WinregChange.QuadPart = 0 ; } RtlReleaseResource( &RegSecReloadLock ); } Status = STATUS_SUCCESS ; } return Status ; } Status = NtQueryKey( hKey, KeyBasicInformation, Buffer, sizeof( Buffer ), & BufferSize ); if ( !NT_SUCCESS( Status ) ) { NtClose( hKey ); return Status ; } KeyInfo = (PKEY_BASIC_INFORMATION) Buffer ; // // See if it has changed // if ( KeyInfo->LastWriteTime.QuadPart > WinregChange.QuadPart ) { RtlAcquireResourceExclusive( &RegSecReloadLock, TRUE ); // // Since the last check was not safe, try again. Another thread // may have updated things already. // if ( KeyInfo->LastWriteTime.QuadPart > WinregChange.QuadPart ) { // // Ok, this one is out of date. If there is already an SD // allocated, free it. We can do that, since every other thread // either is waiting for a shared access, or has also noticed that // it is out of date, and waiting for exclusive access. // if ( RemoteRegistrySD ) { RtlFreeHeap( RtlProcessHeap(), 0, RemoteRegistrySD ); RemoteRegistrySD = NULL ; } Status = RegSecReadSDFromRegistry( hKey, &RemoteRegistrySD ); if ( NT_SUCCESS( Status ) ) { WinregChange.QuadPart = KeyInfo->LastWriteTime.QuadPart ; } } RtlReleaseResource( &RegSecReloadLock ); } NtClose( hKey ); return Status ; } //+--------------------------------------------------------------------------- // // Function: RegSecReadAllowedPath // // Synopsis: Pull the Allowed paths out of the registry, and set up a // table for searching later. This is a flat list, since the // number of elements by default is 2, and shouldn't grow much // bigger. // // Arguments: [hKey] -- // [Value] -- // [List] -- // [ListBase] -- // [ListCount] -- // // History: 5-17-96 RichardW Created // // Notes: // //---------------------------------------------------------------------------- BOOL RegSecReadAllowedPath( HANDLE hKey, PWSTR Value, PUNICODE_STRING * List, PUCHAR * ListBase, PULONG ListCount) { NTSTATUS Status; UNICODE_STRING UniString; PKEY_VALUE_PARTIAL_INFORMATION pValue; ULONG Size; PWSTR Scan; ULONG StringCount; PUNICODE_STRING Paths; // // Read the value size: // RtlInitUnicodeString( &UniString, Value ); Status = NtQueryValueKey( hKey, &UniString, KeyValuePartialInformation, NULL, 0, &Size ); if ( !NT_SUCCESS( Status ) && (Status != STATUS_BUFFER_TOO_SMALL)) { if ( (Status == STATUS_OBJECT_PATH_NOT_FOUND) || (Status == STATUS_OBJECT_NAME_NOT_FOUND) ) { return( TRUE ); } return FALSE ; } // // Allocate enough: // pValue = RtlAllocateHeap( RtlProcessHeap(), 0, Size ); if ( pValue ) { Status = NtQueryValueKey( hKey, &UniString, KeyValuePartialInformation, pValue, Size, &Size ); } if ( !pValue ) { return( FALSE ); } // // Okay, we should have a multi-valued set of paths that we can // allow access to despite the access control. // if ( pValue->Type != REG_MULTI_SZ ) { RtlFreeHeap( RtlProcessHeap(), 0, pValue ); return( FALSE ); } // // Scan list, determine how many strings: // Scan = (PWSTR) pValue->Data; StringCount = 0; while ( *Scan ) { while ( *Scan ) { Scan ++; } StringCount ++; Scan ++; } // // Allocate enough UNICODE_STRING structs to point to each string // Paths = RtlAllocateHeap( RtlProcessHeap(), 0, StringCount * sizeof(UNICODE_STRING) ); if ( !Paths ) { RtlFreeHeap( RtlProcessHeap(), 0, pValue ); return( FALSE ); } Scan = ( PWSTR ) pValue->Data; *ListCount = StringCount; StringCount = 0; // // Set up one UNICODE_STRING per string in the multi_sz, // while ( *Scan ) { RtlInitUnicodeString( &Paths[ StringCount ], Scan ); while ( *Scan) { Scan ++; } StringCount ++; Scan ++; } // // And pass the list back. // *ListBase = (PUCHAR) pValue; *List = Paths; return( TRUE ); } //+--------------------------------------------------------------------------- // // Function: RegSecReadAllowedPaths // // Synopsis: Reads the allowed paths out of the registry // // Arguments: (none) // // History: 5-17-96 RichardW Created // // Notes: // //---------------------------------------------------------------------------- NTSTATUS RegSecCheckAllowedPaths( VOID ) { HANDLE hKey; OBJECT_ATTRIBUTES ObjAttr; UNICODE_STRING UniString; NTSTATUS Status; HANDLE Token ; HANDLE NullHandle ; PKEY_BASIC_INFORMATION KeyInfo ; UCHAR Buffer[ sizeof( KEY_BASIC_INFORMATION ) + sizeof( AllowedPathsKey ) + 16 ]; ULONG BufferSize ; RtlInitUnicodeString(&UniString, AllowedPathsKey); InitializeObjectAttributes( &ObjAttr, &UniString, OBJ_CASE_INSENSITIVE, NULL, NULL); // // Open the thread token. If we're in the middle of an RPC call, we won't be // able to open the key (necessarily). So, revert to local system in order to // open successfully. Status = NtOpenThreadToken( NtCurrentThread(), MAXIMUM_ALLOWED, TRUE, &Token ); if ( ( Status == STATUS_NO_IMPERSONATION_TOKEN ) || ( Status == STATUS_NO_TOKEN ) ) { Token = NULL ; } else if ( Status == STATUS_SUCCESS ) { NullHandle = NULL ; Status = NtSetInformationThread( NtCurrentThread(), ThreadImpersonationToken, (PVOID) &NullHandle, (ULONG) sizeof( NullHandle ) ); } else { return Status ; } // // Open the key in local system context // Status = NtOpenKey( &hKey, KEY_READ, &ObjAttr); // // Immediately restore back to the client token. // if ( Token ) { NTSTATUS RestoreStatus; RestoreStatus = NtSetInformationThread( NtCurrentThread(), ThreadImpersonationToken, (PVOID) &Token, sizeof( NullHandle ) ); NtClose( Token ); if ( !NT_SUCCESS( RestoreStatus ) ) { Status = RestoreStatus ; } } if ( !NT_SUCCESS( Status ) ) { if ( ( Status == STATUS_OBJECT_PATH_NOT_FOUND ) || ( Status == STATUS_OBJECT_NAME_NOT_FOUND ) ) { // // The key is not present. Either, the key has never been present, // in which case we're essentially done, or the key has been deleted. // If the key is deleted, we need to get rid of the remote acl. // if ( AllowedPathsChange.QuadPart ) { // // Ok, the key has been deleted. Get the exclusive lock and get to work. // RtlAcquireResourceExclusive( &RegSecReloadLock, TRUE ); // // Make sure no one else has freed it already: // if ( AllowedPathsChange.QuadPart ) { if ( MachineAllowedPaths ) { RtlFreeHeap( RtlProcessHeap(), 0, MachineAllowedPaths ); RtlFreeHeap( RtlProcessHeap(), 0, MachineAllowedPathsBase ); MachineAllowedPaths = NULL ; MachineAllowedPathsBase = NULL ; } if ( UsersAllowedPaths ) { RtlFreeHeap( RtlProcessHeap(), 0, UsersAllowedPaths ); RtlFreeHeap( RtlProcessHeap(), 0, UsersAllowedPathsBase ); UsersAllowedPaths = NULL ; UsersAllowedPathsBase = NULL ; } AllowedPathsChange.QuadPart = 0; } RtlReleaseResource( &RegSecReloadLock ); } Status = STATUS_SUCCESS ; } return Status ; } Status = NtQueryKey( hKey, KeyBasicInformation, Buffer, sizeof( Buffer ), & BufferSize ); if ( !NT_SUCCESS( Status ) ) { NtClose( hKey ); return Status ; } KeyInfo = (PKEY_BASIC_INFORMATION) Buffer ; // // See if it has changed // if ( KeyInfo->LastWriteTime.QuadPart > AllowedPathsChange.QuadPart ) { // // Well, it changed. So, we need to flush out the old (familiar?) stuff, // and reload with the new stuff. So, back to the synchronization games. // RtlAcquireResourceExclusive( &RegSecReloadLock, TRUE ); // // Make sure no one else beat us to it // if ( KeyInfo->LastWriteTime.QuadPart > AllowedPathsChange.QuadPart ) { if ( MachineAllowedPaths ) { RtlFreeHeap( RtlProcessHeap(), 0, MachineAllowedPaths ); RtlFreeHeap( RtlProcessHeap(), 0, MachineAllowedPathsBase ); MachineAllowedPaths = NULL ; MachineAllowedPathsBase = NULL ; } if ( UsersAllowedPaths ) { RtlFreeHeap( RtlProcessHeap(), 0, UsersAllowedPaths ); RtlFreeHeap( RtlProcessHeap(), 0, UsersAllowedPathsBase ); UsersAllowedPaths = NULL ; UsersAllowedPathsBase = NULL ; } // // Read in the paths allowed: // RegSecReadAllowedPath( hKey, MachineValue, &MachineAllowedPaths, &MachineAllowedPathsBase, &MachineAllowedPathsCount ); RegSecReadAllowedPath( hKey, UsersValue, &UsersAllowedPaths, &UsersAllowedPathsBase, &UsersAllowedPathsCount ); } RtlReleaseResource( &RegSecReloadLock ); } NtClose( hKey ); return STATUS_SUCCESS ; } //+--------------------------------------------------------------------------- // // Function: InitializeRemoteSecurity // // Synopsis: Hook to initialize our look-aside stuff // // Arguments: (none) // // History: 5-17-96 RichardW Created // // Notes: // //---------------------------------------------------------------------------- BOOL InitializeRemoteSecurity( VOID ) { NTSTATUS Status ; try { RtlInitializeResource( &RegSecReloadLock ); Status = STATUS_SUCCESS ; } except (EXCEPTION_EXECUTE_HANDLER) { Status = GetExceptionCode(); } if ( !NT_SUCCESS( Status ) ) { return Status ; } RemoteRegistryMappings.GenericRead = REGSEC_READ; RemoteRegistryMappings.GenericWrite = REGSEC_WRITE; RemoteRegistryMappings.GenericExecute = REGSEC_READ; RemoteRegistryMappings.GenericAll = REGSEC_READ | REGSEC_WRITE; WinregChange.QuadPart = 0 ; AllowedPathsChange.QuadPart = 0 ; return( TRUE ); } //+--------------------------------------------------------------------------- // // Function: RegSecCheckRemoteAccess // // Synopsis: Check remote access against the security descriptor we built // on the side. // // Arguments: [phKey] -- // // History: 5-17-96 RichardW Created // // Notes: // //---------------------------------------------------------------------------- BOOL RegSecCheckRemoteAccess( PRPC_HKEY phKey) { NTSTATUS Status; ACCESS_MASK Mask; NTSTATUS AccessStatus; HANDLE Token; ULONG Size; UCHAR QuickBuffer[sizeof(PRIVILEGE_SET) + 4 * sizeof(LUID_AND_ATTRIBUTES)]; PPRIVILEGE_SET PrivSet; ULONG PrivilegeSetLen; Status = RegSecCheckIfAclValid(); if ( !NT_SUCCESS( Status ) ) { return FALSE ; } RtlAcquireResourceShared( &RegSecReloadLock, TRUE ); if ( RemoteRegistrySD ) { // // Capture the thread's token // Status = NtOpenThreadToken( NtCurrentThread(), MAXIMUM_ALLOWED, TRUE, &Token ); if ( !NT_SUCCESS(Status) ) { RtlReleaseResource( &RegSecReloadLock ); return( FALSE ); } PrivSet = (PPRIVILEGE_SET) QuickBuffer; PrivilegeSetLen = sizeof( QuickBuffer ); // // Do the access check. // Status = NtAccessCheck( RemoteRegistrySD, Token, MAXIMUM_ALLOWED, &RemoteRegistryMappings, PrivSet, &PrivilegeSetLen, &Mask, &AccessStatus ); RtlReleaseResource( &RegSecReloadLock ); (void) NtClose( Token ); if ( NT_SUCCESS( Status ) ) { if ( NT_SUCCESS( AccessStatus ) && (Mask & (REGSEC_READ | REGSEC_WRITE)) ) { return( TRUE ); } return( FALSE ); } else { return FALSE ; } } RtlReleaseResource( &RegSecReloadLock ); return( TRUE ); } //+--------------------------------------------------------------------------- // // Function: RegSecCheckPath // // Synopsis: Check a specific key path if we should ignore the current // ACL. // // Arguments: [hKey] -- // [pSubKey] -- // // History: 5-17-96 RichardW Created // // Notes: // //---------------------------------------------------------------------------- BOOL RegSecCheckPath( HKEY hKey, PUNICODE_STRING pSubKey) { UNICODE_STRING Comparator; UNICODE_STRING String; ULONG i; ULONG Count = 0; PUNICODE_STRING List; BOOL Success ; NTSTATUS Status ; Status = RegSecCheckAllowedPaths(); if ( !NT_SUCCESS( Status ) ) { return FALSE ; } if ( (pSubKey->Buffer == NULL) || (pSubKey->Length == 0 ) || (pSubKey->MaximumLength == 0 ) ) { return FALSE ; } RtlAcquireResourceShared( &RegSecReloadLock, TRUE ); if ( REGSEC_TEST_HANDLE( hKey, CHECK_USER_PATHS ) ) { Count = UsersAllowedPathsCount; List = UsersAllowedPaths; } if ( REGSEC_TEST_HANDLE( hKey, CHECK_MACHINE_PATHS ) ) { Count = MachineAllowedPathsCount; List = MachineAllowedPaths; } Success = FALSE ; for ( i = 0 ; i < Count ; i++ ) { String = *pSubKey; // // Ah ha, RPC strings often have the NULL included in the length. // touch that up. // while ( (String.Length != 0) && (String.Buffer[ (String.Length / sizeof(WCHAR)) - 1] == L'\0') ) { String.Length -= sizeof(WCHAR) ; } Comparator = List[ i ]; // // If the Comparator is a prefix of the sub key, allow it (for spooler) // if ( String.Length > Comparator.Length ) { if ( String.Buffer[ Comparator.Length / sizeof(WCHAR) ] == L'\\' ) { // // Length-wise, it could be an ancestor // String.Length = Comparator.Length; } } // // If it matches, let it go... // if ( RtlCompareUnicodeString( &String, &Comparator, TRUE ) == 0 ) { Success = TRUE ; break; } } RtlReleaseResource( &RegSecReloadLock ) ; return( Success ); }
[ "support@cryptoalgo.cf" ]
support@cryptoalgo.cf
7125685161cfa95f84daf17a3cad16a2c26288fd
eaadacb20e66f88aee44547fa5d8fb9e37a908eb
/Build/Pods/Headers/Public/React-jsi/jsi/jsilib.h
827a6c74d12433ba238b634387cf99382d62d4d0
[]
no_license
butchi-conviva/conviva-ios-reference-app
afa3923d5a8fbd1229a9c7f706763dfec9336eee
6692d20bb67c23d676410ca37cec49992ccb2eb1
refs/heads/master
2020-12-18T20:17:20.165852
2019-09-19T18:38:53
2019-09-19T18:38:53
235,510,048
0
0
null
2020-01-22T06:07:05
2020-01-22T06:07:04
null
UTF-8
C
false
false
107
h
../../../../../../Source/conviva-react-native-refapp/node_modules/react-native/ReactCommon/jsi/jsi/jsilib.h
[ "gtiwari@conviva.com" ]
gtiwari@conviva.com
b954138153bad41ffefd1c4242aa2e9293a1c503
05c1823cd0d78136bd80d0120b2d98b056e9fff7
/firmware/scratch_server/serial.c
515a8fd0d369f8b3759aecd12b34af1bb23c008d
[]
no_license
fluffware/scratchx_PLC_S5
70b860b812323c12d79948c58b8dd83b8cc0b4c7
98aff13a1d66ff507cfb839f1f014b7a2362dbc1
refs/heads/master
2021-01-21T12:52:48.735363
2015-08-26T19:54:42
2015-08-26T19:54:42
39,632,360
1
1
null
null
null
null
UTF-8
C
false
false
1,392
c
#include "serial.h" #include <mcs51reg.h> #include <stdint.h> #define BPS 38400 #define F_OSC 14745600 #define S0REL (1024 - (F_OSC/((long)64*BPS))) #define S1REL (1024 - (F_OSC / ((long)32 * BPS))) #define TI1_MASK 0x02 #define RI1_MASK 0x01 #define ES1_MASK 0x01 /* Ring buffer for reading */ static __xdata uint8_t rx_head = 0; static __xdata uint8_t rx_tail = 0; static __xdata uint8_t rx_buffer[256]; /* Ring buffer for writing */ static __xdata uint8_t tx_head = 0; static __xdata uint8_t tx_tail = 0; static __xdata uint8_t tx_buffer[256]; void serial1_isr(void) __interrupt(16) { if (S1CON & TI1_MASK) { if (tx_head != tx_tail) { tx_tail++; if (tx_head != tx_tail) { S1BUF = tx_buffer[tx_tail]; } } S1CON &= ~TI1_MASK; } if (S1CON & RI1_MASK) { if (rx_head + 1 != rx_tail) { rx_buffer[rx_head] = S1BUF; rx_head++; } S1CON &= ~RI1_MASK; } } void putchar(char c) __critical { if (tx_head + 1 != tx_tail) { if (tx_head == tx_tail) { S1BUF = c; } tx_buffer[tx_head] = c; tx_head++; } } char getchar(void) { if (rx_head != rx_tail) { return rx_buffer[rx_tail++]; } else { return '\0'; } } void init_serial_1(void) { S1CON = 0x92; /* Serial mode B, 8bit async. Enable receiver */ S1RELH = S1REL>>8; S1RELL = S1REL; S1CON &= ~(TI1_MASK | RI1_MASK); IEN2 |= ES1_MASK; }
[ "ksb@fluffware.se" ]
ksb@fluffware.se
d621677a14d67cd0196ea1240bd548581c005257
b09bd2fda971f526d386b755648150e605f53458
/rush00/ex00/rush04.c
82b0211d1a808c235fd29caf545f6f874cd6cfa6
[]
no_license
JeanHo3/42Pool
4e91037b11f96d233c0298d73f928cb49dcbc8dc
51b476c85501c8d79b1361774cc97cbfe1356fc2
refs/heads/master
2020-03-23T12:17:28.000555
2018-07-25T18:39:42
2018-07-25T18:39:42
141,549,590
0
0
null
null
null
null
UTF-8
C
false
false
1,495
c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* rush04.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: tcherret <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2018/07/07 13:32:05 by tcherret #+# #+# */ /* Updated: 2018/07/07 14:51:59 by jhourman ### ########.fr */ /* */ /* ************************************************************************** */ void ft_putchar(char c); void ft_print(int x, int y, int a, int b) { if ((a == 1 && b == 1) || (a == x && b == y)) { ft_putchar('A'); } else if ((a == 1 && b == y) || (a == x && b == 1)) { ft_putchar('C'); } else if ((b >= 1 && b <= y) && (a == 1 || a == x)) { ft_putchar('B'); } else if ((b == 1 || b == y) && (a > 1 && a < x)) { ft_putchar('B'); } else { ft_putchar(' '); } if (a == x) { ft_putchar('\n'); } } void rush04(int x, int y) { int a; int b; a = 1; b = 1; while (b <= y) { while (a <= x) { ft_print(x, y, a, b); a++; } a = 1; b++; } }
[ "jhourman@e3r5p15.42.fr" ]
jhourman@e3r5p15.42.fr
454daad3bd96a4a671f6a0d023ddbd70883f4b4d
95e03acc94d9749c7a4b42bf0b0860062b2abdb2
/LinkedLists/g4g/reverseLinkedList/code.c
3aaeef680acff052fabffe094569fc5a25c21ccb
[]
no_license
NileshkumarRaghuvanshi/DSA
8a0d3c39a0cf80d2835f6a6c7a9a6830d296ef8b
882fd246cdc4afdb296c6eaee378a85953c6d8a0
refs/heads/master
2021-01-01T16:46:40.608203
2018-05-09T09:09:43
2018-05-09T09:09:43
97,917,121
0
0
null
null
null
null
UTF-8
C
false
false
1,084
c
#include <stdio.h> #include <stdlib.h> #include <malloc.h> struct node { int data; struct node *next; }; struct node *createNode(int data) { struct node *temp = malloc(sizeof(struct node)); if(temp) { temp->data =data; temp->next = NULL; } else { printf("Malloc error\n"); exit(-1); } return temp; } void printList(struct node *head) { while(head) { printf("%d ",head->data); head = head->next; } printf("\n"); } struct node *reverseList(struct node **head, struct node *node) { struct node *temp; if(!node->next) { *head = node; return node; } temp = reverseList(head,node->next); temp->next = node; node->next = NULL; return node; } int main() { struct node *root = createNode(10); //root->next = createNode(20); //root->next->next = createNode(30); //root->next->next->next = createNode(40); //root->next->next->next->next = createNode(50); //root->next->next->next->next->next = createNode(60); printList(root); reverseList(&root,root); printList(root); reverseList(&root,root); printList(root); return 0; }
[ "noreply@github.com" ]
noreply@github.com
d1b13deb44bc7b401c54b35eda123ae79459ab97
870b0291d1e2602ea72edb28974a1aa705e3eb05
/test/stdlib/lldiv.c
0385a4cb3797ee48aa8f18647f4819bf67634aba
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SeanBarber/libc
7e4b3bc1b4d4de9e5e08728bb15b8b8be62e7ad8
6c4a6a36cdaf9eda52f6d65dfd9ed59ffdce5ff1
refs/heads/master
2021-08-30T22:40:48.249685
2017-12-17T19:18:33
2017-12-17T20:44:32
114,787,919
0
0
null
2017-12-19T16:33:50
2017-12-19T16:33:50
null
UTF-8
C
false
false
9,757
c
/* * Copyright © 2017 Embedded Artistry LLC. * License: MIT. See LICENSE file for details. */ #include <stdlib.h> // Cmocka needs these // clang-format off #include <setjmp.h> #include <stdarg.h> #include <stddef.h> #include <cmocka/cmocka.h> // clang-format on static struct { uint64_t x, y, div, mod; } t[] = { 0x8ddb1a43e77c4031ull, 0x5950e8c33d34979eull, 0x1ull, 0x348a3180aa47a893ull, 0x723f4114006c08c7ull, 0x817de530db2b43fcull, 0x0ull, 0x723f4114006c08c7ull, 0x47811fa5f00f74dull, 0x3d98e7d3fcd5d5c5ull, 0x0ull, 0x47811fa5f00f74dull, 0x51ffcc7cdc989d43ull, 0x36be8bd6746b70e4ull, 0x1ull, 0x1b4140a6682d2c5full, 0x57bf9128512fe829ull, 0x197b3858155d498dull, 0x3ull, 0xb4de82011180b82ull, 0x89fc1c5968fa817full, 0xdcea797734c7115ull, 0x9ull, 0xdb838065b4a87c2ull, 0x4ed5264cf7092ec5ull, 0xde40d1e15ef3e74ull, 0x5ull, 0x960e4b6895cf681ull, 0xffd86b253d97317bull, 0x13f9ff2d24b6d6f4ull, 0xcull, 0x1020750785051e0bull, 0x8771fa2da656a721ull, 0x9210fe654c59bfcull, 0xeull, 0x7a31b9503881f59ull, 0xb5961d12bcd3e937ull, 0xbdb5a33662f547aull, 0xfull, 0x3bbd40fc00df611ull, 0x93c79eecdac7ed3dull, 0x6f267c57ea2b7b5ull, 0x15ull, 0x1e51bb9776edb64ull, 0x6b93ffce49f1a4b3ull, 0x3583d1f9702ee03ull, 0x20ull, 0x8c5bdb6993e453ull, 0x138aefcc98ce5d19ull, 0x117002fa7600b11ull, 0x11ull, 0x103eca27b6da0f8ull, 0xb3da641cef491fefull, 0x357615f638334b8ull, 0x35ull, 0x2c33b5d551f35d7ull, 0x71c4b06e463912b5ull, 0x1c286ad9e8f5229ull, 0x40ull, 0x1230506a2648875ull, 0x97d4cf7df046d6ebull, 0x1e9412f5c77b2b8ull, 0x4full, 0xd9b1e06756b023ull, 0x1428f04bd490ea11ull, 0x9d97f29a897c93ull, 0x20ull, 0x75f1f8836157b1ull, 0x35256c76832705a7ull, 0xa962f1a447dcd7ull, 0x50ull, 0x3680f32cb20277ull, 0x2969e82bd9347f2dull, 0x723d68574d4156ull, 0x5cull, 0x5bd6ac79710445ull, 0x9061a12aae71a823ull, 0x4186d8a1a66175ull, 0x234ull, 0x48be68be2f25full, 0x695b8d33ef342e09ull, 0x3ed1fe1a998fe3ull, 0x1adull, 0x15a6615bde0ea2ull, 0x46b4dd1e06367a5full, 0xa04e70622e4e8ull, 0x70eull, 0x64750bc0b9dafull, 0xd68b05ba7eee12a5ull, 0x72ab3fb682444ull, 0x1defull, 0x3c437fc988329ull, 0x1e59cc2ac508f85bull, 0xeb15ae6d4d7f9ull, 0x210ull, 0xc00aeae0b86cbull, 0x296f8d2c76a0901ull, 0xf65628b31b01ull, 0x2b0ull, 0xf14566117651ull, 0x7036f5ad7cbc5e17ull, 0xa09d3bfcf72cfull, 0xb2dull, 0x72236db564ab4ull, 0x915d6883c575ad1dull, 0x3a38d68d3a38eull, 0x27f2ull, 0x241de6f7a6ee1ull, 0x845ba74f5adfa793ull, 0x2f6950e58d00bull, 0x2caaull, 0x249dc90239c45ull, 0xb910d16c54805af9ull, 0x1fc2ca5c99a7aull, 0x5d3aull, 0x1771487b50955ull, 0x27a2e280bcf990cfull, 0x389aa0c0b0cc0ull, 0xb34ull, 0x9d71d12eb9cfull, 0x1e032f04a5372e95ull, 0x63c2a1d58710ull, 0x4d04ull, 0x154ce4414255ull, 0x3a1a5659908495cbull, 0x279dcd85418aull, 0x17775ull, 0x132c6f9c7bb9ull, 0xd769a376e5e103f1ull, 0xadacb670e0c7ull, 0x13d85ull, 0x8ad256e5d18eull, 0x269f4f4baaaf287ull, 0x1aed2ad9daf0ull, 0x16f3ull, 0x426550f80b7ull, 0x6700daeeb87a770dull, 0xeca7ab1aa93ull, 0x6f6c5ull, 0x70d9466f1eeull, 0xd0201f3783c2a303ull, 0x3a0c01aa3e6aull, 0x395e1ull, 0x18b33b9015d9ull, 0xca3f2e00d291e3e9ull, 0xbe0e048cd94ull, 0x1106c2ull, 0x37f7fc0a1c1ull, 0xec4d240dc289633full, 0x4f8aadb7483ull, 0x2f8855ull, 0x46e0db91bc0ull, 0xd7967b29e2e36685ull, 0xe61d902db27ull, 0xefd69ull, 0x36811fff886ull, 0xe3ecd4374320af3bull, 0x4edd0edd0a0ull, 0x2e3defull, 0x4ad0da4c9dbull, 0x7a08fe1d98b4dae1ull, 0x6bced9c0c15ull, 0x121c89ull, 0x40c856617a4ull, 0x34435992a5c9c2f7ull, 0x4f4a94c109full, 0xa8bc9ull, 0x94c5d46120ull, 0x6fd0027468f1dcfdull, 0x597186b0153ull, 0x140060ull, 0x16f26555dddull, 0x4fe37c1db1619a73ull, 0x47a0c30bd15ull, 0x11d861ull, 0x5964fb3d7eull, 0x77aa77f86d07c8d9ull, 0x3a39cf03d65ull, 0x20e21cull, 0x37f7fede7cdull, 0xc072e76ad59cf1afull, 0x3a786701dull, 0x34a98c59ull, 0x22b6b1b9aull, 0xfb8e8f1f7781ba75ull, 0xe8ca427d3eull, 0x114a34dull, 0xa344eb94cfull, 0x160e34cf590444abull, 0xe2388f12feull, 0x18f574ull, 0xc303329393ull, 0x2509ddea3a648dd1ull, 0xec762d81bcull, 0x281955ull, 0xc0463d1e65ull, 0xc9ba10cd6eafcf67ull, 0x96a51d06f7ull, 0x156ce72ull, 0x133e2df369ull, 0x1dd4fe261b4adeedull, 0x2736e25406ull, 0xc2bfefull, 0x1354c1f353ull, 0x480258f92fc38de3ull, 0x2599b52bb0ull, 0x1ea450cull, 0x2879f11a3ull, 0x5a3257b1114109c9ull, 0x2978f9f1aaull, 0x22cc30aull, 0x1317311b25ull, 0xf4eeda8f34ab3c1full, 0x1aa70450d9ull, 0x9309d64ull, 0x1187b6925bull, 0x3c2c319ca8612a65ull, 0x73fc01eceull, 0x84d0088ull, 0x3165accf5ull, 0x4f6034e74a16561bull, 0x1f29d53707ull, 0x28c0daaull, 0xd88e07075ull, 0x206665a7072f1cc1ull, 0xda87e7ceaull, 0x25f48c1ull, 0xd3ddb2057ull, 0x100c559d7db417d7ull, 0xb907ebbc2ull, 0x1634188ull, 0xa2eae16c7ull, 0x64c5f83691b47cddull, 0x5aced6ebbull, 0x11c17fb7ull, 0x344109030ull, 0x32a812777eaf7d53ull, 0x1cb63fe4full, 0x1c3a9675ull, 0xb113f938ull, 0x67478d96865ca6b9ull, 0x142fa03aull, 0x51dcb463dull, 0x11359ce7ull, 0x71024e740deb428full, 0x142d3885ull, 0x599d9edd5ull, 0x13b1ae6ull, 0x52c78160b090b655ull, 0xd02101c6ull, 0x65d1b205ull, 0x1c0a0177ull, 0x16917d5f9fde38bull, 0xfb1566c7ull, 0x17029e0ull, 0x1bbe166bull, 0xa6ee688a0d1387b1ull, 0x22c4d384ull, 0x4cd19afcfull, 0x77143f5ull, 0x74babc1be2ed9c47ull, 0x22eda9a6ull, 0x3578b1967ull, 0x189b247dull, 0x7c5cbf2dfc1db6cdull, 0x5f09c060ull, 0x14efd44d4ull, 0x5210e74dull, 0x7c046071c1ac68c3ull, 0x3696c8e6ull, 0x24596d86bull, 0x26060a1ull, 0x84728ab55d399fa9ull, 0x267d7771ull, 0x370ea7405ull, 0x255d1674ull, 0x99f57100ef5404ffull, 0x10c0df86ull, 0x9308fef0dull, 0x9009131ull, 0x3f4c0514b0df5e45ull, 0xf2c3810ull, 0x42bf84d39ull, 0x3aa12b5ull, 0xd01edb572821ecfbull, 0x2a443aeull, 0x4ec8b88639ull, 0x111c73dull, 0xeecb08561bd0cea1ull, 0xbeca231ull, 0x140692508bull, 0x9b36e06ull, 0x8c856facc6335cb7ull, 0x398eab4ull, 0x271008c7a5ull, 0x922ab3ull, 0x23fb9839e8358cbdull, 0x24deb54ull, 0xf9d714151ull, 0xb9c329ull, 0x2005d5de30015033ull, 0x47c06dbull, 0x7240bccbaull, 0x104d115ull, 0x67d59c29e076f499ull, 0x179f009ull, 0x465554ac22ull, 0x10b0767ull, 0x32d2dd34369c836full, 0x13d3fbfull, 0x2902f2fb54ull, 0x7553c3ull, 0x3960c3c99fdc2235ull, 0x1b808baull, 0x21618743cdull, 0x11e7743ull, 0x343bad5adfa9726bull, 0xeef444ull, 0x37f58c51a6ull, 0x3d8a53ull, 0x7a4aadd7b4e5f191ull, 0x129c9ull, 0x6921bb5a2a53ull, 0x6b66ull, 0x9eb7dae5d71c5927ull, 0x31d7f5ull, 0x32f2ff2c6d5ull, 0x22c4eull, 0x1b285999316afeadull, 0x115477ull, 0x1912cf6611eull, 0x801bbull, 0x917aee3d84b533a3ull, 0x71d26full, 0x1473408589aull, 0x6e74ddull, 0x18e6a86b0473a589ull, 0x50a12ull, 0x4f0fabc67d4ull, 0x210a1ull, 0xf22c9887813bbddfull, 0x5b17aull, 0x2a897505c07bull, 0x1f841ull, 0xef7a551239d60225ull, 0x7fb5aull, 0x1e00b98e188bull, 0x41847ull, 0xffd2ad0e77b73dbull, 0x146f14ull, 0xc8500600a3ull, 0xba1full, 0x76743abdfb91f081ull, 0xd5888ull, 0x8e0303c479cull, 0x245a1ull, 0xc2eeb030bcff9197ull, 0x7a4e8ull, 0x198034e02c37ull, 0x343bfull, 0x63cc9c23f0ed0c9dull, 0x6c1e5ull, 0xec4d5841041ull, 0x38178ull, 0x7ad70f846e8f1313ull, 0x7fdf5ull, 0xf5ecec69bc9ull, 0x756b6ull, 0x60de3d71574eb279ull, 0x6ea3ull, 0xe02421997a61ull, 0x18b6ull, 0xd27054901c68b44full, 0x2dd0full, 0x497d639c8f46ull, 0xe135ull, 0xbcf297b8f0dbfe15ull, 0xcf17ull, 0xe992af0ca1abull, 0x32b8ull, 0x96c3ae70323ef14bull, 0xbbdcull, 0xcd7329b68d81ull, 0x1b6full, 0xdc1a13cfa4d3cb71ull, 0xdb16ull, 0x1012fe5ed296full, 0x46e7ull, 0xa1d40a2986f40607ull, 0x8067ull, 0x142a473fdb7beull, 0x1895ull, 0x227f92ef6daab68dull, 0x15ecull, 0x192dda5d5ed25ull, 0xf71ull, 0xc0a4a7810015ee83ull, 0x6064ull, 0x1ffa220762fc8ull, 0x4463ull, 0xd38b6eb9f0e71b69ull, 0x1909ull, 0x8732ce2cc77f4ull, 0xfd5ull, 0x2e588bdb751a66bfull, 0x229cull, 0x156d025c70d97ull, 0x10bbull, 0xd90f7e11dcbd1605ull, 0x760ull, 0x1d6e934381ba2eull, 0x2c5ull, 0x60ab67a4e5aeabbull, 0x1bf7ull, 0x374f26f3e3edull, 0x210ull, 0x224f627be76a8261ull, 0x4f4ull, 0x6ed4d3882b567ull, 0x35ull, 0x300d1ab91bd0b677ull, 0xe9cull, 0x34a002fb76e63ull, 0x823ull, 0x2a63d80e0c52fc7dull, 0x32ull, 0xd90970ebc4383full, 0x2full, 0xb0e94bbc1f90c5f3ull, 0x3b3ull, 0x2fd2ef70381c52ull, 0x29dull, 0x2b5dc22562dbe059ull, 0x30aull, 0xe45055015fff5ull, 0x1c7ull, 0x4a7fd1078807d52full, 0x18dull, 0x300a32f60677d4ull, 0x16bull, 0x41a01ee8ab0849f5ull, 0x13cull, 0x352a3971f57e9dull, 0x29ull, 0x95a7287ad5f6602bull, 0x1d0ull, 0x529130d1034a23ull, 0xbbull, 0x723bacc76bd51551ull, 0x16ull, 0x53142091089af83ull, 0xfull, 0x81c49febaa2ca2e7ull, 0xcdull, 0xa20d44956f5bf4ull, 0x83ull, 0x11593d6b3f54de6dull, 0x63ull, 0x2cdc6b1a7f9078ull, 0x5ull, 0x756c82d6f7069963ull, 0x5cull, 0x146bea3ba565525ull, 0x17ull, 0xda882ab2a88c0149ull, 0x1bull, 0x8180194d6d5c728ull, 0x11ull, 0xbb03671751a7ff9full, 0x20ull, 0x5d81b38ba8d3ffcull, 0x1full, 0x6884fa0a8f0c99e5ull, 0x12ull, 0x5ce7fab40d6088cull, 0xdull, 0x5052a2953c528441ull, 0x7ull, 0xb7984f0bf79809bull, 0x4ull, 0x58dd1583185ecb57ull, 0x9ull, 0x9dfad0e90ee1697ull, 0x8ull, 0xaa6870c376df5c5dull, 0x3ull, 0x38cd7aebd24a741full, 0x0ull, 0x4b21d01617167e39ull, 0x2ull, 0x2590e80b0b8b3f1cull, 0x1ull, }; #pragma mark - Private Functions - static void lldiv_test(void** state) { uint64_t x, y, div, mod; int i; for(i = 0; i < (sizeof(t) / sizeof(*t)); i++) { x = t[i].x; y = t[i].y; div = x / y; mod = x % y; assert_true(div == t[i].div); assert_true(mod == t[i].mod); } } #pragma mark - Public Functions - int lldiv_tests(void) { const struct CMUnitTest lldiv_tests[] = {cmocka_unit_test(lldiv_test)}; return cmocka_run_group_tests(lldiv_tests, NULL, NULL); }
[ "phillip@embeddedartistry.com" ]
phillip@embeddedartistry.com
e295e342d0e068db5c0e05ebc47018dc3011afea
cc215e2f54d91e1ba20e7a5affead251afef7b93
/freetype/src/pcf/pcf.c
00c98fbc6975bfa12b654efae2a5e8d7db303ea8
[ "FTL", "MIT" ]
permissive
SeriyyKust/CreatePNG
8bc365daf8274330251d2cad06aaa8c103aead07
e79d08991bf1d579af6596bb3b18467a48fd5537
refs/heads/master
2023-04-13T09:56:50.487595
2021-04-21T05:18:03
2021-04-21T05:18:03
360,038,702
0
0
null
null
null
null
UTF-8
C
false
false
1,288
c
/* pcf.c FreeType font driver for pcf fonts Copyright 2000-2001, 2003 by Francesco Zappa Nardelli Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #define FT_MAKE_OPTION_SINGLE_OBJECT #include "pcfdrivr.c" #include "pcfread.c" #include "pcfutil.c" /* END */
[ "tima.zavrazhnov@mail.ru" ]
tima.zavrazhnov@mail.ru
f413d9468f147c730979280e18b92d264be545ed
fe1404db3707436fe1339a959542e0a432d9586e
/FURenderKit/FURenderKit.framework/Headers/metamacros.h
41509585839fe190b37e9f86473cef1e3479c080
[]
no_license
Faceunity/FULiveDemo
cedb4f2420f84bdd2d8968921b0754bcdf71d8c0
3e93a2b6ff394915cabbc7aec17ef18c2711c64b
refs/heads/master
2023-07-26T00:05:29.202432
2023-07-07T08:48:38
2023-07-07T08:48:38
81,923,494
307
114
null
2023-07-07T08:48:39
2017-02-14T08:36:05
Objective-C
UTF-8
C
false
false
441,757
h
/** * Macros for metaprogramming * ExtendedC * * This file has been generated using * MetamacrosGenerator software. * Copyright (C) 2020 Egor Chiglintsev * * Source code available at * https://github.com/wanderwaltz/MetamacroGenerator * * It is based on and is extending the metamacros.h * file included in extobjc library which can be found * at https://github.com/jspahrsummers/libextobjc * * Copyright (C) 2012 Justin Spahr-Summers * Released under the MIT license */ #ifndef EXTC_METAMACROS_EXTENDED_H #define EXTC_METAMACROS_EXTENDED_H #pragma mark - #pragma mark 'Interface' part, use these macros for your metaprogramming /////////////////////////////////////////////////////////////////////////////////// /** * Executes one or more expressions (which may have a void type, such as a call * to a function that returns no value) and always returns true. */ #define metamacro_exprify(...) \ ((__VA_ARGS__), true) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Returns a string representation of VALUE after full macro expansion. */ #define metamacro_stringify(VALUE) \ metamacro_stringify_(VALUE) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Returns A and B concatenated after full macro expansion. */ #define metamacro_concat(A, B) \ metamacro_concat_(A, B) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Returns the first argument given. At least one argument must be provided. * * This is useful when implementing a variadic macro, where you may have only * one variadic argument, but no way to retrieve it (for example, because \c ... * always needs to match at least one argument). * * @code #define varmacro(...) \ metamacro_head(__VA_ARGS__) * @endcode */ #define metamacro_head(...) \ metamacro_head_(__VA_ARGS__, 0) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Returns every argument except the first. At least two arguments must be * provided. */ #define metamacro_tail(...) \ metamacro_tail_(__VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Returns the Nth variadic argument (starting from zero). At least * N + 1 variadic arguments must be given. N must be in [0..150]. */ #define metamacro_at(N, ...) \ metamacro_concat(metamacro_at, N)(__VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Returns the number of arguments (up to 150) provided to the macro. At * least one argument must be provided. * * This implementation is based on ##__VA_ARGS__ extension and properly processes * the case with zero arguments provided. * * Based on http://stackoverflow.com/questions/11317474/macro-to-count-number-of-arguments */ #define metamacro_argcount(...) \ metamacro_argcount_(X, ##__VA_ARGS__, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Returns the first N (up to 150) variadic arguments as a new argument list. * At least N variadic arguments must be provided. */ #define metamacro_take(N, ...) \ metamacro_concat(metamacro_take, N)(__VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Removes the first N (up to 150) variadic arguments from the given argument * list. At least N variadic arguments must be provided. */ #define metamacro_drop(N, ...) \ metamacro_concat(metamacro_drop, N)(__VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Increments VAL, which must be a number between 0 and 150, inclusive. * * This is primarily useful when dealing with indexes and counts in * metaprogramming. */ #define metamacro_inc(VAL) \ metamacro_at(VAL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Decrements VAL, which must be a number between 0 and 150, inclusive. * * This is primarily useful when dealing with indexes and counts in * metaprogramming. */ #define metamacro_dec(VAL) \ metamacro_at(VAL, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Returns 1 if N is an even number, or 0 otherwise. * N must be between 0 and 150, inclusive. * * For the purposes of this test, zero is considered even. */ #define metamacro_is_even(N) \ metamacro_at(N, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Returns the logical NOT of B, which must be the number zero or one. */ #define metamacro_not(B) \ metamacro_at(B, 1, 0) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * For each consecutive variadic argument (up to 150), MACRO is passed the * zero-based index of the current argument, CONTEXT, and then the argument * itself. The results of adjoining invocations of MACRO are then separated by * SEP. * * Inspired by P99: http://p99.gforge.inria.fr */ #define metamacro_foreach_cxt(MACRO, SEP, CONTEXT, ...) \ metamacro_concat(metamacro_foreach_cxt, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Identical to #metamacro_foreach_cxt. This can be used when the former would * fail due to recursive macro expansion. */ #define metamacro_foreach_cxt_recursive(MACRO, SEP, CONTEXT, ...) \ metamacro_concat(metamacro_foreach_cxt_recursive, metamacro_argcount(__VA_ARGS__))(MACRO, SEP, CONTEXT, __VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Identical to #metamacro_foreach_cxt, except that no CONTEXT argument is * given. Only the index and current argument will thus be passed to MACRO. */ #define metamacro_foreach(MACRO, SEP, ...) \ metamacro_foreach_cxt(metamacro_foreach_iter, SEP, MACRO, __VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * In consecutive order, appends each variadic argument (up to 150) onto * BASE. The resulting concatenations are then separated by SEP. * * This is primarily useful to manipulate a list of macro invocations into instead * invoking a different, possibly related macro. */ #define metamacro_foreach_concat(BASE, SEP, ...) \ metamacro_foreach_cxt(metamacro_foreach_concat_iter, SEP, BASE, __VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Iterates COUNT times, each time invoking MACRO with the current index * (starting at zero) and CONTEXT. The results of adjoining invocations of MACRO * are then separated by SEP. * * COUNT must be an integer between zero and 150, inclusive. */ #define metamacro_for_cxt(COUNT, MACRO, SEP, CONTEXT) \ metamacro_concat(metamacro_for_cxt, COUNT)(MACRO, SEP, CONTEXT) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * If A is equal to B, the next argument list is expanded; otherwise, the * argument list after that is expanded. A and B must be numbers between zero * and 150, inclusive. Additionally, B must be greater than or equal to A. * * @code // expands to true metamacro_if_eq(0, 0)(true)(false) // expands to false metamacro_if_eq(0, 1)(true)(false) * @endcode * * This is primarily useful when dealing with indexes and counts in * metaprogramming. */ #define metamacro_if_eq(A, B) \ metamacro_concat(metamacro_if_eq, A)(B) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// /** * Identical to #metamacro_if_eq. This can be used when the former would fail * due to recursive macro expansion. */ #define metamacro_if_eq_recursive(A, B) \ metamacro_concat(metamacro_if_eq_recursive, A)(B) /////////////////////////////////////////////////////////////////////////////////// #pragma mark - #pragma mark 'Implementation' part, do not write code which depends on any lines below /////////////////////////////////////////////////////////////////////////////////// #define metamacro_stringify_(VALUE) # VALUE /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// #define metamacro_concat_(A, B) A ## B /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// #define metamacro_head_(FIRST, ...) FIRST /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// #define metamacro_tail_(FIRST, ...) __VA_ARGS__ /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // metamacro_at expansions #define metamacro_at0(...) metamacro_head(__VA_ARGS__) #define metamacro_at1(_0, ...) metamacro_head(__VA_ARGS__) #define metamacro_at2(_0, _1, ...) metamacro_head(__VA_ARGS__) #define metamacro_at3(_0, _1, _2, ...) metamacro_head(__VA_ARGS__) #define metamacro_at4(_0, _1, _2, _3, ...) metamacro_head(__VA_ARGS__) #define metamacro_at5(_0, _1, _2, _3, _4, ...) metamacro_head(__VA_ARGS__) #define metamacro_at6(_0, _1, _2, _3, _4, _5, ...) metamacro_head(__VA_ARGS__) #define metamacro_at7(_0, _1, _2, _3, _4, _5, _6, ...) metamacro_head(__VA_ARGS__) #define metamacro_at8(_0, _1, _2, _3, _4, _5, _6, _7, ...) metamacro_head(__VA_ARGS__) #define metamacro_at9(_0, _1, _2, _3, _4, _5, _6, _7, _8, ...) metamacro_head(__VA_ARGS__) #define metamacro_at10(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, ...) metamacro_head(__VA_ARGS__) #define metamacro_at11(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, ...) metamacro_head(__VA_ARGS__) #define metamacro_at12(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, ...) metamacro_head(__VA_ARGS__) #define metamacro_at13(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, ...) metamacro_head(__VA_ARGS__) #define metamacro_at14(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, ...) metamacro_head(__VA_ARGS__) #define metamacro_at15(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, ...) metamacro_head(__VA_ARGS__) #define metamacro_at16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, ...) metamacro_head(__VA_ARGS__) #define metamacro_at17(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, ...) metamacro_head(__VA_ARGS__) #define metamacro_at18(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, ...) metamacro_head(__VA_ARGS__) #define metamacro_at19(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, ...) metamacro_head(__VA_ARGS__) #define metamacro_at20(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, ...) metamacro_head(__VA_ARGS__) #define metamacro_at21(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, ...) metamacro_head(__VA_ARGS__) #define metamacro_at22(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, ...) metamacro_head(__VA_ARGS__) #define metamacro_at23(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, ...) metamacro_head(__VA_ARGS__) #define metamacro_at24(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, ...) metamacro_head(__VA_ARGS__) #define metamacro_at25(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, ...) metamacro_head(__VA_ARGS__) #define metamacro_at26(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, ...) metamacro_head(__VA_ARGS__) #define metamacro_at27(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, ...) metamacro_head(__VA_ARGS__) #define metamacro_at28(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, ...) metamacro_head(__VA_ARGS__) #define metamacro_at29(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, ...) metamacro_head(__VA_ARGS__) #define metamacro_at30(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, ...) metamacro_head(__VA_ARGS__) #define metamacro_at31(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, ...) metamacro_head(__VA_ARGS__) #define metamacro_at32(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, ...) metamacro_head(__VA_ARGS__) #define metamacro_at33(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, ...) metamacro_head(__VA_ARGS__) #define metamacro_at34(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, ...) metamacro_head(__VA_ARGS__) #define metamacro_at35(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, ...) metamacro_head(__VA_ARGS__) #define metamacro_at36(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, ...) metamacro_head(__VA_ARGS__) #define metamacro_at37(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, ...) metamacro_head(__VA_ARGS__) #define metamacro_at38(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, ...) metamacro_head(__VA_ARGS__) #define metamacro_at39(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, ...) metamacro_head(__VA_ARGS__) #define metamacro_at40(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, ...) metamacro_head(__VA_ARGS__) #define metamacro_at41(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, ...) metamacro_head(__VA_ARGS__) #define metamacro_at42(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, ...) metamacro_head(__VA_ARGS__) #define metamacro_at43(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, ...) metamacro_head(__VA_ARGS__) #define metamacro_at44(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, ...) metamacro_head(__VA_ARGS__) #define metamacro_at45(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, ...) metamacro_head(__VA_ARGS__) #define metamacro_at46(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, ...) metamacro_head(__VA_ARGS__) #define metamacro_at47(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, ...) metamacro_head(__VA_ARGS__) #define metamacro_at48(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, ...) metamacro_head(__VA_ARGS__) #define metamacro_at49(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, ...) metamacro_head(__VA_ARGS__) #define metamacro_at50(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, ...) metamacro_head(__VA_ARGS__) #define metamacro_at51(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, ...) metamacro_head(__VA_ARGS__) #define metamacro_at52(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, ...) metamacro_head(__VA_ARGS__) #define metamacro_at53(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, ...) metamacro_head(__VA_ARGS__) #define metamacro_at54(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, ...) metamacro_head(__VA_ARGS__) #define metamacro_at55(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, ...) metamacro_head(__VA_ARGS__) #define metamacro_at56(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, ...) metamacro_head(__VA_ARGS__) #define metamacro_at57(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, ...) metamacro_head(__VA_ARGS__) #define metamacro_at58(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, ...) metamacro_head(__VA_ARGS__) #define metamacro_at59(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, ...) metamacro_head(__VA_ARGS__) #define metamacro_at60(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, ...) metamacro_head(__VA_ARGS__) #define metamacro_at61(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, ...) metamacro_head(__VA_ARGS__) #define metamacro_at62(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, ...) metamacro_head(__VA_ARGS__) #define metamacro_at63(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, ...) metamacro_head(__VA_ARGS__) #define metamacro_at64(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, ...) metamacro_head(__VA_ARGS__) #define metamacro_at65(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, ...) metamacro_head(__VA_ARGS__) #define metamacro_at66(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, ...) metamacro_head(__VA_ARGS__) #define metamacro_at67(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, ...) metamacro_head(__VA_ARGS__) #define metamacro_at68(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, ...) metamacro_head(__VA_ARGS__) #define metamacro_at69(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, ...) metamacro_head(__VA_ARGS__) #define metamacro_at70(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, ...) metamacro_head(__VA_ARGS__) #define metamacro_at71(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, ...) metamacro_head(__VA_ARGS__) #define metamacro_at72(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, ...) metamacro_head(__VA_ARGS__) #define metamacro_at73(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, ...) metamacro_head(__VA_ARGS__) #define metamacro_at74(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, ...) metamacro_head(__VA_ARGS__) #define metamacro_at75(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, ...) metamacro_head(__VA_ARGS__) #define metamacro_at76(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, ...) metamacro_head(__VA_ARGS__) #define metamacro_at77(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, ...) metamacro_head(__VA_ARGS__) #define metamacro_at78(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, ...) metamacro_head(__VA_ARGS__) #define metamacro_at79(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, ...) metamacro_head(__VA_ARGS__) #define metamacro_at80(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, ...) metamacro_head(__VA_ARGS__) #define metamacro_at81(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, ...) metamacro_head(__VA_ARGS__) #define metamacro_at82(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, ...) metamacro_head(__VA_ARGS__) #define metamacro_at83(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, ...) metamacro_head(__VA_ARGS__) #define metamacro_at84(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, ...) metamacro_head(__VA_ARGS__) #define metamacro_at85(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, ...) metamacro_head(__VA_ARGS__) #define metamacro_at86(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, ...) metamacro_head(__VA_ARGS__) #define metamacro_at87(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, ...) metamacro_head(__VA_ARGS__) #define metamacro_at88(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, ...) metamacro_head(__VA_ARGS__) #define metamacro_at89(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, ...) metamacro_head(__VA_ARGS__) #define metamacro_at90(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, ...) metamacro_head(__VA_ARGS__) #define metamacro_at91(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, ...) metamacro_head(__VA_ARGS__) #define metamacro_at92(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, ...) metamacro_head(__VA_ARGS__) #define metamacro_at93(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, ...) metamacro_head(__VA_ARGS__) #define metamacro_at94(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, ...) metamacro_head(__VA_ARGS__) #define metamacro_at95(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, ...) metamacro_head(__VA_ARGS__) #define metamacro_at96(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, ...) metamacro_head(__VA_ARGS__) #define metamacro_at97(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, ...) metamacro_head(__VA_ARGS__) #define metamacro_at98(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, ...) metamacro_head(__VA_ARGS__) #define metamacro_at99(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, ...) metamacro_head(__VA_ARGS__) #define metamacro_at100(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, ...) metamacro_head(__VA_ARGS__) #define metamacro_at101(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, ...) metamacro_head(__VA_ARGS__) #define metamacro_at102(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, ...) metamacro_head(__VA_ARGS__) #define metamacro_at103(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, ...) metamacro_head(__VA_ARGS__) #define metamacro_at104(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, ...) metamacro_head(__VA_ARGS__) #define metamacro_at105(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, ...) metamacro_head(__VA_ARGS__) #define metamacro_at106(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, ...) metamacro_head(__VA_ARGS__) #define metamacro_at107(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, ...) metamacro_head(__VA_ARGS__) #define metamacro_at108(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, ...) metamacro_head(__VA_ARGS__) #define metamacro_at109(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, ...) metamacro_head(__VA_ARGS__) #define metamacro_at110(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, ...) metamacro_head(__VA_ARGS__) #define metamacro_at111(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, ...) metamacro_head(__VA_ARGS__) #define metamacro_at112(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, ...) metamacro_head(__VA_ARGS__) #define metamacro_at113(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, ...) metamacro_head(__VA_ARGS__) #define metamacro_at114(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, ...) metamacro_head(__VA_ARGS__) #define metamacro_at115(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, ...) metamacro_head(__VA_ARGS__) #define metamacro_at116(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, ...) metamacro_head(__VA_ARGS__) #define metamacro_at117(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, ...) metamacro_head(__VA_ARGS__) #define metamacro_at118(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, ...) metamacro_head(__VA_ARGS__) #define metamacro_at119(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, ...) metamacro_head(__VA_ARGS__) #define metamacro_at120(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, ...) metamacro_head(__VA_ARGS__) #define metamacro_at121(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, ...) metamacro_head(__VA_ARGS__) #define metamacro_at122(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, ...) metamacro_head(__VA_ARGS__) #define metamacro_at123(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, ...) metamacro_head(__VA_ARGS__) #define metamacro_at124(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, ...) metamacro_head(__VA_ARGS__) #define metamacro_at125(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, ...) metamacro_head(__VA_ARGS__) #define metamacro_at126(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, ...) metamacro_head(__VA_ARGS__) #define metamacro_at127(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, ...) metamacro_head(__VA_ARGS__) #define metamacro_at128(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, ...) metamacro_head(__VA_ARGS__) #define metamacro_at129(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, ...) metamacro_head(__VA_ARGS__) #define metamacro_at130(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, ...) metamacro_head(__VA_ARGS__) #define metamacro_at131(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, ...) metamacro_head(__VA_ARGS__) #define metamacro_at132(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, ...) metamacro_head(__VA_ARGS__) #define metamacro_at133(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, ...) metamacro_head(__VA_ARGS__) #define metamacro_at134(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, ...) metamacro_head(__VA_ARGS__) #define metamacro_at135(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, ...) metamacro_head(__VA_ARGS__) #define metamacro_at136(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, ...) metamacro_head(__VA_ARGS__) #define metamacro_at137(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, ...) metamacro_head(__VA_ARGS__) #define metamacro_at138(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, ...) metamacro_head(__VA_ARGS__) #define metamacro_at139(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, ...) metamacro_head(__VA_ARGS__) #define metamacro_at140(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, ...) metamacro_head(__VA_ARGS__) #define metamacro_at141(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, ...) metamacro_head(__VA_ARGS__) #define metamacro_at142(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, ...) metamacro_head(__VA_ARGS__) #define metamacro_at143(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, ...) metamacro_head(__VA_ARGS__) #define metamacro_at144(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, ...) metamacro_head(__VA_ARGS__) #define metamacro_at145(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, ...) metamacro_head(__VA_ARGS__) #define metamacro_at146(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, ...) metamacro_head(__VA_ARGS__) #define metamacro_at147(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, ...) metamacro_head(__VA_ARGS__) #define metamacro_at148(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, ...) metamacro_head(__VA_ARGS__) #define metamacro_at149(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, ...) metamacro_head(__VA_ARGS__) #define metamacro_at150(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, ...) metamacro_head(__VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// #define metamacro_argcount_(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, N, ...) N /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // metamacro_take expansions #define metamacro_take0(...) #define metamacro_take1(...) metamacro_head(__VA_ARGS__) #define metamacro_take2(...) metamacro_head(__VA_ARGS__), metamacro_take1(metamacro_tail(__VA_ARGS__)) #define metamacro_take3(...) metamacro_head(__VA_ARGS__), metamacro_take2(metamacro_tail(__VA_ARGS__)) #define metamacro_take4(...) metamacro_head(__VA_ARGS__), metamacro_take3(metamacro_tail(__VA_ARGS__)) #define metamacro_take5(...) metamacro_head(__VA_ARGS__), metamacro_take4(metamacro_tail(__VA_ARGS__)) #define metamacro_take6(...) metamacro_head(__VA_ARGS__), metamacro_take5(metamacro_tail(__VA_ARGS__)) #define metamacro_take7(...) metamacro_head(__VA_ARGS__), metamacro_take6(metamacro_tail(__VA_ARGS__)) #define metamacro_take8(...) metamacro_head(__VA_ARGS__), metamacro_take7(metamacro_tail(__VA_ARGS__)) #define metamacro_take9(...) metamacro_head(__VA_ARGS__), metamacro_take8(metamacro_tail(__VA_ARGS__)) #define metamacro_take10(...) metamacro_head(__VA_ARGS__), metamacro_take9(metamacro_tail(__VA_ARGS__)) #define metamacro_take11(...) metamacro_head(__VA_ARGS__), metamacro_take10(metamacro_tail(__VA_ARGS__)) #define metamacro_take12(...) metamacro_head(__VA_ARGS__), metamacro_take11(metamacro_tail(__VA_ARGS__)) #define metamacro_take13(...) metamacro_head(__VA_ARGS__), metamacro_take12(metamacro_tail(__VA_ARGS__)) #define metamacro_take14(...) metamacro_head(__VA_ARGS__), metamacro_take13(metamacro_tail(__VA_ARGS__)) #define metamacro_take15(...) metamacro_head(__VA_ARGS__), metamacro_take14(metamacro_tail(__VA_ARGS__)) #define metamacro_take16(...) metamacro_head(__VA_ARGS__), metamacro_take15(metamacro_tail(__VA_ARGS__)) #define metamacro_take17(...) metamacro_head(__VA_ARGS__), metamacro_take16(metamacro_tail(__VA_ARGS__)) #define metamacro_take18(...) metamacro_head(__VA_ARGS__), metamacro_take17(metamacro_tail(__VA_ARGS__)) #define metamacro_take19(...) metamacro_head(__VA_ARGS__), metamacro_take18(metamacro_tail(__VA_ARGS__)) #define metamacro_take20(...) metamacro_head(__VA_ARGS__), metamacro_take19(metamacro_tail(__VA_ARGS__)) #define metamacro_take21(...) metamacro_head(__VA_ARGS__), metamacro_take20(metamacro_tail(__VA_ARGS__)) #define metamacro_take22(...) metamacro_head(__VA_ARGS__), metamacro_take21(metamacro_tail(__VA_ARGS__)) #define metamacro_take23(...) metamacro_head(__VA_ARGS__), metamacro_take22(metamacro_tail(__VA_ARGS__)) #define metamacro_take24(...) metamacro_head(__VA_ARGS__), metamacro_take23(metamacro_tail(__VA_ARGS__)) #define metamacro_take25(...) metamacro_head(__VA_ARGS__), metamacro_take24(metamacro_tail(__VA_ARGS__)) #define metamacro_take26(...) metamacro_head(__VA_ARGS__), metamacro_take25(metamacro_tail(__VA_ARGS__)) #define metamacro_take27(...) metamacro_head(__VA_ARGS__), metamacro_take26(metamacro_tail(__VA_ARGS__)) #define metamacro_take28(...) metamacro_head(__VA_ARGS__), metamacro_take27(metamacro_tail(__VA_ARGS__)) #define metamacro_take29(...) metamacro_head(__VA_ARGS__), metamacro_take28(metamacro_tail(__VA_ARGS__)) #define metamacro_take30(...) metamacro_head(__VA_ARGS__), metamacro_take29(metamacro_tail(__VA_ARGS__)) #define metamacro_take31(...) metamacro_head(__VA_ARGS__), metamacro_take30(metamacro_tail(__VA_ARGS__)) #define metamacro_take32(...) metamacro_head(__VA_ARGS__), metamacro_take31(metamacro_tail(__VA_ARGS__)) #define metamacro_take33(...) metamacro_head(__VA_ARGS__), metamacro_take32(metamacro_tail(__VA_ARGS__)) #define metamacro_take34(...) metamacro_head(__VA_ARGS__), metamacro_take33(metamacro_tail(__VA_ARGS__)) #define metamacro_take35(...) metamacro_head(__VA_ARGS__), metamacro_take34(metamacro_tail(__VA_ARGS__)) #define metamacro_take36(...) metamacro_head(__VA_ARGS__), metamacro_take35(metamacro_tail(__VA_ARGS__)) #define metamacro_take37(...) metamacro_head(__VA_ARGS__), metamacro_take36(metamacro_tail(__VA_ARGS__)) #define metamacro_take38(...) metamacro_head(__VA_ARGS__), metamacro_take37(metamacro_tail(__VA_ARGS__)) #define metamacro_take39(...) metamacro_head(__VA_ARGS__), metamacro_take38(metamacro_tail(__VA_ARGS__)) #define metamacro_take40(...) metamacro_head(__VA_ARGS__), metamacro_take39(metamacro_tail(__VA_ARGS__)) #define metamacro_take41(...) metamacro_head(__VA_ARGS__), metamacro_take40(metamacro_tail(__VA_ARGS__)) #define metamacro_take42(...) metamacro_head(__VA_ARGS__), metamacro_take41(metamacro_tail(__VA_ARGS__)) #define metamacro_take43(...) metamacro_head(__VA_ARGS__), metamacro_take42(metamacro_tail(__VA_ARGS__)) #define metamacro_take44(...) metamacro_head(__VA_ARGS__), metamacro_take43(metamacro_tail(__VA_ARGS__)) #define metamacro_take45(...) metamacro_head(__VA_ARGS__), metamacro_take44(metamacro_tail(__VA_ARGS__)) #define metamacro_take46(...) metamacro_head(__VA_ARGS__), metamacro_take45(metamacro_tail(__VA_ARGS__)) #define metamacro_take47(...) metamacro_head(__VA_ARGS__), metamacro_take46(metamacro_tail(__VA_ARGS__)) #define metamacro_take48(...) metamacro_head(__VA_ARGS__), metamacro_take47(metamacro_tail(__VA_ARGS__)) #define metamacro_take49(...) metamacro_head(__VA_ARGS__), metamacro_take48(metamacro_tail(__VA_ARGS__)) #define metamacro_take50(...) metamacro_head(__VA_ARGS__), metamacro_take49(metamacro_tail(__VA_ARGS__)) #define metamacro_take51(...) metamacro_head(__VA_ARGS__), metamacro_take50(metamacro_tail(__VA_ARGS__)) #define metamacro_take52(...) metamacro_head(__VA_ARGS__), metamacro_take51(metamacro_tail(__VA_ARGS__)) #define metamacro_take53(...) metamacro_head(__VA_ARGS__), metamacro_take52(metamacro_tail(__VA_ARGS__)) #define metamacro_take54(...) metamacro_head(__VA_ARGS__), metamacro_take53(metamacro_tail(__VA_ARGS__)) #define metamacro_take55(...) metamacro_head(__VA_ARGS__), metamacro_take54(metamacro_tail(__VA_ARGS__)) #define metamacro_take56(...) metamacro_head(__VA_ARGS__), metamacro_take55(metamacro_tail(__VA_ARGS__)) #define metamacro_take57(...) metamacro_head(__VA_ARGS__), metamacro_take56(metamacro_tail(__VA_ARGS__)) #define metamacro_take58(...) metamacro_head(__VA_ARGS__), metamacro_take57(metamacro_tail(__VA_ARGS__)) #define metamacro_take59(...) metamacro_head(__VA_ARGS__), metamacro_take58(metamacro_tail(__VA_ARGS__)) #define metamacro_take60(...) metamacro_head(__VA_ARGS__), metamacro_take59(metamacro_tail(__VA_ARGS__)) #define metamacro_take61(...) metamacro_head(__VA_ARGS__), metamacro_take60(metamacro_tail(__VA_ARGS__)) #define metamacro_take62(...) metamacro_head(__VA_ARGS__), metamacro_take61(metamacro_tail(__VA_ARGS__)) #define metamacro_take63(...) metamacro_head(__VA_ARGS__), metamacro_take62(metamacro_tail(__VA_ARGS__)) #define metamacro_take64(...) metamacro_head(__VA_ARGS__), metamacro_take63(metamacro_tail(__VA_ARGS__)) #define metamacro_take65(...) metamacro_head(__VA_ARGS__), metamacro_take64(metamacro_tail(__VA_ARGS__)) #define metamacro_take66(...) metamacro_head(__VA_ARGS__), metamacro_take65(metamacro_tail(__VA_ARGS__)) #define metamacro_take67(...) metamacro_head(__VA_ARGS__), metamacro_take66(metamacro_tail(__VA_ARGS__)) #define metamacro_take68(...) metamacro_head(__VA_ARGS__), metamacro_take67(metamacro_tail(__VA_ARGS__)) #define metamacro_take69(...) metamacro_head(__VA_ARGS__), metamacro_take68(metamacro_tail(__VA_ARGS__)) #define metamacro_take70(...) metamacro_head(__VA_ARGS__), metamacro_take69(metamacro_tail(__VA_ARGS__)) #define metamacro_take71(...) metamacro_head(__VA_ARGS__), metamacro_take70(metamacro_tail(__VA_ARGS__)) #define metamacro_take72(...) metamacro_head(__VA_ARGS__), metamacro_take71(metamacro_tail(__VA_ARGS__)) #define metamacro_take73(...) metamacro_head(__VA_ARGS__), metamacro_take72(metamacro_tail(__VA_ARGS__)) #define metamacro_take74(...) metamacro_head(__VA_ARGS__), metamacro_take73(metamacro_tail(__VA_ARGS__)) #define metamacro_take75(...) metamacro_head(__VA_ARGS__), metamacro_take74(metamacro_tail(__VA_ARGS__)) #define metamacro_take76(...) metamacro_head(__VA_ARGS__), metamacro_take75(metamacro_tail(__VA_ARGS__)) #define metamacro_take77(...) metamacro_head(__VA_ARGS__), metamacro_take76(metamacro_tail(__VA_ARGS__)) #define metamacro_take78(...) metamacro_head(__VA_ARGS__), metamacro_take77(metamacro_tail(__VA_ARGS__)) #define metamacro_take79(...) metamacro_head(__VA_ARGS__), metamacro_take78(metamacro_tail(__VA_ARGS__)) #define metamacro_take80(...) metamacro_head(__VA_ARGS__), metamacro_take79(metamacro_tail(__VA_ARGS__)) #define metamacro_take81(...) metamacro_head(__VA_ARGS__), metamacro_take80(metamacro_tail(__VA_ARGS__)) #define metamacro_take82(...) metamacro_head(__VA_ARGS__), metamacro_take81(metamacro_tail(__VA_ARGS__)) #define metamacro_take83(...) metamacro_head(__VA_ARGS__), metamacro_take82(metamacro_tail(__VA_ARGS__)) #define metamacro_take84(...) metamacro_head(__VA_ARGS__), metamacro_take83(metamacro_tail(__VA_ARGS__)) #define metamacro_take85(...) metamacro_head(__VA_ARGS__), metamacro_take84(metamacro_tail(__VA_ARGS__)) #define metamacro_take86(...) metamacro_head(__VA_ARGS__), metamacro_take85(metamacro_tail(__VA_ARGS__)) #define metamacro_take87(...) metamacro_head(__VA_ARGS__), metamacro_take86(metamacro_tail(__VA_ARGS__)) #define metamacro_take88(...) metamacro_head(__VA_ARGS__), metamacro_take87(metamacro_tail(__VA_ARGS__)) #define metamacro_take89(...) metamacro_head(__VA_ARGS__), metamacro_take88(metamacro_tail(__VA_ARGS__)) #define metamacro_take90(...) metamacro_head(__VA_ARGS__), metamacro_take89(metamacro_tail(__VA_ARGS__)) #define metamacro_take91(...) metamacro_head(__VA_ARGS__), metamacro_take90(metamacro_tail(__VA_ARGS__)) #define metamacro_take92(...) metamacro_head(__VA_ARGS__), metamacro_take91(metamacro_tail(__VA_ARGS__)) #define metamacro_take93(...) metamacro_head(__VA_ARGS__), metamacro_take92(metamacro_tail(__VA_ARGS__)) #define metamacro_take94(...) metamacro_head(__VA_ARGS__), metamacro_take93(metamacro_tail(__VA_ARGS__)) #define metamacro_take95(...) metamacro_head(__VA_ARGS__), metamacro_take94(metamacro_tail(__VA_ARGS__)) #define metamacro_take96(...) metamacro_head(__VA_ARGS__), metamacro_take95(metamacro_tail(__VA_ARGS__)) #define metamacro_take97(...) metamacro_head(__VA_ARGS__), metamacro_take96(metamacro_tail(__VA_ARGS__)) #define metamacro_take98(...) metamacro_head(__VA_ARGS__), metamacro_take97(metamacro_tail(__VA_ARGS__)) #define metamacro_take99(...) metamacro_head(__VA_ARGS__), metamacro_take98(metamacro_tail(__VA_ARGS__)) #define metamacro_take100(...) metamacro_head(__VA_ARGS__), metamacro_take99(metamacro_tail(__VA_ARGS__)) #define metamacro_take101(...) metamacro_head(__VA_ARGS__), metamacro_take100(metamacro_tail(__VA_ARGS__)) #define metamacro_take102(...) metamacro_head(__VA_ARGS__), metamacro_take101(metamacro_tail(__VA_ARGS__)) #define metamacro_take103(...) metamacro_head(__VA_ARGS__), metamacro_take102(metamacro_tail(__VA_ARGS__)) #define metamacro_take104(...) metamacro_head(__VA_ARGS__), metamacro_take103(metamacro_tail(__VA_ARGS__)) #define metamacro_take105(...) metamacro_head(__VA_ARGS__), metamacro_take104(metamacro_tail(__VA_ARGS__)) #define metamacro_take106(...) metamacro_head(__VA_ARGS__), metamacro_take105(metamacro_tail(__VA_ARGS__)) #define metamacro_take107(...) metamacro_head(__VA_ARGS__), metamacro_take106(metamacro_tail(__VA_ARGS__)) #define metamacro_take108(...) metamacro_head(__VA_ARGS__), metamacro_take107(metamacro_tail(__VA_ARGS__)) #define metamacro_take109(...) metamacro_head(__VA_ARGS__), metamacro_take108(metamacro_tail(__VA_ARGS__)) #define metamacro_take110(...) metamacro_head(__VA_ARGS__), metamacro_take109(metamacro_tail(__VA_ARGS__)) #define metamacro_take111(...) metamacro_head(__VA_ARGS__), metamacro_take110(metamacro_tail(__VA_ARGS__)) #define metamacro_take112(...) metamacro_head(__VA_ARGS__), metamacro_take111(metamacro_tail(__VA_ARGS__)) #define metamacro_take113(...) metamacro_head(__VA_ARGS__), metamacro_take112(metamacro_tail(__VA_ARGS__)) #define metamacro_take114(...) metamacro_head(__VA_ARGS__), metamacro_take113(metamacro_tail(__VA_ARGS__)) #define metamacro_take115(...) metamacro_head(__VA_ARGS__), metamacro_take114(metamacro_tail(__VA_ARGS__)) #define metamacro_take116(...) metamacro_head(__VA_ARGS__), metamacro_take115(metamacro_tail(__VA_ARGS__)) #define metamacro_take117(...) metamacro_head(__VA_ARGS__), metamacro_take116(metamacro_tail(__VA_ARGS__)) #define metamacro_take118(...) metamacro_head(__VA_ARGS__), metamacro_take117(metamacro_tail(__VA_ARGS__)) #define metamacro_take119(...) metamacro_head(__VA_ARGS__), metamacro_take118(metamacro_tail(__VA_ARGS__)) #define metamacro_take120(...) metamacro_head(__VA_ARGS__), metamacro_take119(metamacro_tail(__VA_ARGS__)) #define metamacro_take121(...) metamacro_head(__VA_ARGS__), metamacro_take120(metamacro_tail(__VA_ARGS__)) #define metamacro_take122(...) metamacro_head(__VA_ARGS__), metamacro_take121(metamacro_tail(__VA_ARGS__)) #define metamacro_take123(...) metamacro_head(__VA_ARGS__), metamacro_take122(metamacro_tail(__VA_ARGS__)) #define metamacro_take124(...) metamacro_head(__VA_ARGS__), metamacro_take123(metamacro_tail(__VA_ARGS__)) #define metamacro_take125(...) metamacro_head(__VA_ARGS__), metamacro_take124(metamacro_tail(__VA_ARGS__)) #define metamacro_take126(...) metamacro_head(__VA_ARGS__), metamacro_take125(metamacro_tail(__VA_ARGS__)) #define metamacro_take127(...) metamacro_head(__VA_ARGS__), metamacro_take126(metamacro_tail(__VA_ARGS__)) #define metamacro_take128(...) metamacro_head(__VA_ARGS__), metamacro_take127(metamacro_tail(__VA_ARGS__)) #define metamacro_take129(...) metamacro_head(__VA_ARGS__), metamacro_take128(metamacro_tail(__VA_ARGS__)) #define metamacro_take130(...) metamacro_head(__VA_ARGS__), metamacro_take129(metamacro_tail(__VA_ARGS__)) #define metamacro_take131(...) metamacro_head(__VA_ARGS__), metamacro_take130(metamacro_tail(__VA_ARGS__)) #define metamacro_take132(...) metamacro_head(__VA_ARGS__), metamacro_take131(metamacro_tail(__VA_ARGS__)) #define metamacro_take133(...) metamacro_head(__VA_ARGS__), metamacro_take132(metamacro_tail(__VA_ARGS__)) #define metamacro_take134(...) metamacro_head(__VA_ARGS__), metamacro_take133(metamacro_tail(__VA_ARGS__)) #define metamacro_take135(...) metamacro_head(__VA_ARGS__), metamacro_take134(metamacro_tail(__VA_ARGS__)) #define metamacro_take136(...) metamacro_head(__VA_ARGS__), metamacro_take135(metamacro_tail(__VA_ARGS__)) #define metamacro_take137(...) metamacro_head(__VA_ARGS__), metamacro_take136(metamacro_tail(__VA_ARGS__)) #define metamacro_take138(...) metamacro_head(__VA_ARGS__), metamacro_take137(metamacro_tail(__VA_ARGS__)) #define metamacro_take139(...) metamacro_head(__VA_ARGS__), metamacro_take138(metamacro_tail(__VA_ARGS__)) #define metamacro_take140(...) metamacro_head(__VA_ARGS__), metamacro_take139(metamacro_tail(__VA_ARGS__)) #define metamacro_take141(...) metamacro_head(__VA_ARGS__), metamacro_take140(metamacro_tail(__VA_ARGS__)) #define metamacro_take142(...) metamacro_head(__VA_ARGS__), metamacro_take141(metamacro_tail(__VA_ARGS__)) #define metamacro_take143(...) metamacro_head(__VA_ARGS__), metamacro_take142(metamacro_tail(__VA_ARGS__)) #define metamacro_take144(...) metamacro_head(__VA_ARGS__), metamacro_take143(metamacro_tail(__VA_ARGS__)) #define metamacro_take145(...) metamacro_head(__VA_ARGS__), metamacro_take144(metamacro_tail(__VA_ARGS__)) #define metamacro_take146(...) metamacro_head(__VA_ARGS__), metamacro_take145(metamacro_tail(__VA_ARGS__)) #define metamacro_take147(...) metamacro_head(__VA_ARGS__), metamacro_take146(metamacro_tail(__VA_ARGS__)) #define metamacro_take148(...) metamacro_head(__VA_ARGS__), metamacro_take147(metamacro_tail(__VA_ARGS__)) #define metamacro_take149(...) metamacro_head(__VA_ARGS__), metamacro_take148(metamacro_tail(__VA_ARGS__)) #define metamacro_take150(...) metamacro_head(__VA_ARGS__), metamacro_take149(metamacro_tail(__VA_ARGS__)) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // metamacro_drop expansions #define metamacro_drop0(...) __VA_ARGS__ #define metamacro_drop1(...) metamacro_tail(__VA_ARGS__) #define metamacro_drop2(...) metamacro_drop1(metamacro_tail(__VA_ARGS__)) #define metamacro_drop3(...) metamacro_drop2(metamacro_tail(__VA_ARGS__)) #define metamacro_drop4(...) metamacro_drop3(metamacro_tail(__VA_ARGS__)) #define metamacro_drop5(...) metamacro_drop4(metamacro_tail(__VA_ARGS__)) #define metamacro_drop6(...) metamacro_drop5(metamacro_tail(__VA_ARGS__)) #define metamacro_drop7(...) metamacro_drop6(metamacro_tail(__VA_ARGS__)) #define metamacro_drop8(...) metamacro_drop7(metamacro_tail(__VA_ARGS__)) #define metamacro_drop9(...) metamacro_drop8(metamacro_tail(__VA_ARGS__)) #define metamacro_drop10(...) metamacro_drop9(metamacro_tail(__VA_ARGS__)) #define metamacro_drop11(...) metamacro_drop10(metamacro_tail(__VA_ARGS__)) #define metamacro_drop12(...) metamacro_drop11(metamacro_tail(__VA_ARGS__)) #define metamacro_drop13(...) metamacro_drop12(metamacro_tail(__VA_ARGS__)) #define metamacro_drop14(...) metamacro_drop13(metamacro_tail(__VA_ARGS__)) #define metamacro_drop15(...) metamacro_drop14(metamacro_tail(__VA_ARGS__)) #define metamacro_drop16(...) metamacro_drop15(metamacro_tail(__VA_ARGS__)) #define metamacro_drop17(...) metamacro_drop16(metamacro_tail(__VA_ARGS__)) #define metamacro_drop18(...) metamacro_drop17(metamacro_tail(__VA_ARGS__)) #define metamacro_drop19(...) metamacro_drop18(metamacro_tail(__VA_ARGS__)) #define metamacro_drop20(...) metamacro_drop19(metamacro_tail(__VA_ARGS__)) #define metamacro_drop21(...) metamacro_drop20(metamacro_tail(__VA_ARGS__)) #define metamacro_drop22(...) metamacro_drop21(metamacro_tail(__VA_ARGS__)) #define metamacro_drop23(...) metamacro_drop22(metamacro_tail(__VA_ARGS__)) #define metamacro_drop24(...) metamacro_drop23(metamacro_tail(__VA_ARGS__)) #define metamacro_drop25(...) metamacro_drop24(metamacro_tail(__VA_ARGS__)) #define metamacro_drop26(...) metamacro_drop25(metamacro_tail(__VA_ARGS__)) #define metamacro_drop27(...) metamacro_drop26(metamacro_tail(__VA_ARGS__)) #define metamacro_drop28(...) metamacro_drop27(metamacro_tail(__VA_ARGS__)) #define metamacro_drop29(...) metamacro_drop28(metamacro_tail(__VA_ARGS__)) #define metamacro_drop30(...) metamacro_drop29(metamacro_tail(__VA_ARGS__)) #define metamacro_drop31(...) metamacro_drop30(metamacro_tail(__VA_ARGS__)) #define metamacro_drop32(...) metamacro_drop31(metamacro_tail(__VA_ARGS__)) #define metamacro_drop33(...) metamacro_drop32(metamacro_tail(__VA_ARGS__)) #define metamacro_drop34(...) metamacro_drop33(metamacro_tail(__VA_ARGS__)) #define metamacro_drop35(...) metamacro_drop34(metamacro_tail(__VA_ARGS__)) #define metamacro_drop36(...) metamacro_drop35(metamacro_tail(__VA_ARGS__)) #define metamacro_drop37(...) metamacro_drop36(metamacro_tail(__VA_ARGS__)) #define metamacro_drop38(...) metamacro_drop37(metamacro_tail(__VA_ARGS__)) #define metamacro_drop39(...) metamacro_drop38(metamacro_tail(__VA_ARGS__)) #define metamacro_drop40(...) metamacro_drop39(metamacro_tail(__VA_ARGS__)) #define metamacro_drop41(...) metamacro_drop40(metamacro_tail(__VA_ARGS__)) #define metamacro_drop42(...) metamacro_drop41(metamacro_tail(__VA_ARGS__)) #define metamacro_drop43(...) metamacro_drop42(metamacro_tail(__VA_ARGS__)) #define metamacro_drop44(...) metamacro_drop43(metamacro_tail(__VA_ARGS__)) #define metamacro_drop45(...) metamacro_drop44(metamacro_tail(__VA_ARGS__)) #define metamacro_drop46(...) metamacro_drop45(metamacro_tail(__VA_ARGS__)) #define metamacro_drop47(...) metamacro_drop46(metamacro_tail(__VA_ARGS__)) #define metamacro_drop48(...) metamacro_drop47(metamacro_tail(__VA_ARGS__)) #define metamacro_drop49(...) metamacro_drop48(metamacro_tail(__VA_ARGS__)) #define metamacro_drop50(...) metamacro_drop49(metamacro_tail(__VA_ARGS__)) #define metamacro_drop51(...) metamacro_drop50(metamacro_tail(__VA_ARGS__)) #define metamacro_drop52(...) metamacro_drop51(metamacro_tail(__VA_ARGS__)) #define metamacro_drop53(...) metamacro_drop52(metamacro_tail(__VA_ARGS__)) #define metamacro_drop54(...) metamacro_drop53(metamacro_tail(__VA_ARGS__)) #define metamacro_drop55(...) metamacro_drop54(metamacro_tail(__VA_ARGS__)) #define metamacro_drop56(...) metamacro_drop55(metamacro_tail(__VA_ARGS__)) #define metamacro_drop57(...) metamacro_drop56(metamacro_tail(__VA_ARGS__)) #define metamacro_drop58(...) metamacro_drop57(metamacro_tail(__VA_ARGS__)) #define metamacro_drop59(...) metamacro_drop58(metamacro_tail(__VA_ARGS__)) #define metamacro_drop60(...) metamacro_drop59(metamacro_tail(__VA_ARGS__)) #define metamacro_drop61(...) metamacro_drop60(metamacro_tail(__VA_ARGS__)) #define metamacro_drop62(...) metamacro_drop61(metamacro_tail(__VA_ARGS__)) #define metamacro_drop63(...) metamacro_drop62(metamacro_tail(__VA_ARGS__)) #define metamacro_drop64(...) metamacro_drop63(metamacro_tail(__VA_ARGS__)) #define metamacro_drop65(...) metamacro_drop64(metamacro_tail(__VA_ARGS__)) #define metamacro_drop66(...) metamacro_drop65(metamacro_tail(__VA_ARGS__)) #define metamacro_drop67(...) metamacro_drop66(metamacro_tail(__VA_ARGS__)) #define metamacro_drop68(...) metamacro_drop67(metamacro_tail(__VA_ARGS__)) #define metamacro_drop69(...) metamacro_drop68(metamacro_tail(__VA_ARGS__)) #define metamacro_drop70(...) metamacro_drop69(metamacro_tail(__VA_ARGS__)) #define metamacro_drop71(...) metamacro_drop70(metamacro_tail(__VA_ARGS__)) #define metamacro_drop72(...) metamacro_drop71(metamacro_tail(__VA_ARGS__)) #define metamacro_drop73(...) metamacro_drop72(metamacro_tail(__VA_ARGS__)) #define metamacro_drop74(...) metamacro_drop73(metamacro_tail(__VA_ARGS__)) #define metamacro_drop75(...) metamacro_drop74(metamacro_tail(__VA_ARGS__)) #define metamacro_drop76(...) metamacro_drop75(metamacro_tail(__VA_ARGS__)) #define metamacro_drop77(...) metamacro_drop76(metamacro_tail(__VA_ARGS__)) #define metamacro_drop78(...) metamacro_drop77(metamacro_tail(__VA_ARGS__)) #define metamacro_drop79(...) metamacro_drop78(metamacro_tail(__VA_ARGS__)) #define metamacro_drop80(...) metamacro_drop79(metamacro_tail(__VA_ARGS__)) #define metamacro_drop81(...) metamacro_drop80(metamacro_tail(__VA_ARGS__)) #define metamacro_drop82(...) metamacro_drop81(metamacro_tail(__VA_ARGS__)) #define metamacro_drop83(...) metamacro_drop82(metamacro_tail(__VA_ARGS__)) #define metamacro_drop84(...) metamacro_drop83(metamacro_tail(__VA_ARGS__)) #define metamacro_drop85(...) metamacro_drop84(metamacro_tail(__VA_ARGS__)) #define metamacro_drop86(...) metamacro_drop85(metamacro_tail(__VA_ARGS__)) #define metamacro_drop87(...) metamacro_drop86(metamacro_tail(__VA_ARGS__)) #define metamacro_drop88(...) metamacro_drop87(metamacro_tail(__VA_ARGS__)) #define metamacro_drop89(...) metamacro_drop88(metamacro_tail(__VA_ARGS__)) #define metamacro_drop90(...) metamacro_drop89(metamacro_tail(__VA_ARGS__)) #define metamacro_drop91(...) metamacro_drop90(metamacro_tail(__VA_ARGS__)) #define metamacro_drop92(...) metamacro_drop91(metamacro_tail(__VA_ARGS__)) #define metamacro_drop93(...) metamacro_drop92(metamacro_tail(__VA_ARGS__)) #define metamacro_drop94(...) metamacro_drop93(metamacro_tail(__VA_ARGS__)) #define metamacro_drop95(...) metamacro_drop94(metamacro_tail(__VA_ARGS__)) #define metamacro_drop96(...) metamacro_drop95(metamacro_tail(__VA_ARGS__)) #define metamacro_drop97(...) metamacro_drop96(metamacro_tail(__VA_ARGS__)) #define metamacro_drop98(...) metamacro_drop97(metamacro_tail(__VA_ARGS__)) #define metamacro_drop99(...) metamacro_drop98(metamacro_tail(__VA_ARGS__)) #define metamacro_drop100(...) metamacro_drop99(metamacro_tail(__VA_ARGS__)) #define metamacro_drop101(...) metamacro_drop100(metamacro_tail(__VA_ARGS__)) #define metamacro_drop102(...) metamacro_drop101(metamacro_tail(__VA_ARGS__)) #define metamacro_drop103(...) metamacro_drop102(metamacro_tail(__VA_ARGS__)) #define metamacro_drop104(...) metamacro_drop103(metamacro_tail(__VA_ARGS__)) #define metamacro_drop105(...) metamacro_drop104(metamacro_tail(__VA_ARGS__)) #define metamacro_drop106(...) metamacro_drop105(metamacro_tail(__VA_ARGS__)) #define metamacro_drop107(...) metamacro_drop106(metamacro_tail(__VA_ARGS__)) #define metamacro_drop108(...) metamacro_drop107(metamacro_tail(__VA_ARGS__)) #define metamacro_drop109(...) metamacro_drop108(metamacro_tail(__VA_ARGS__)) #define metamacro_drop110(...) metamacro_drop109(metamacro_tail(__VA_ARGS__)) #define metamacro_drop111(...) metamacro_drop110(metamacro_tail(__VA_ARGS__)) #define metamacro_drop112(...) metamacro_drop111(metamacro_tail(__VA_ARGS__)) #define metamacro_drop113(...) metamacro_drop112(metamacro_tail(__VA_ARGS__)) #define metamacro_drop114(...) metamacro_drop113(metamacro_tail(__VA_ARGS__)) #define metamacro_drop115(...) metamacro_drop114(metamacro_tail(__VA_ARGS__)) #define metamacro_drop116(...) metamacro_drop115(metamacro_tail(__VA_ARGS__)) #define metamacro_drop117(...) metamacro_drop116(metamacro_tail(__VA_ARGS__)) #define metamacro_drop118(...) metamacro_drop117(metamacro_tail(__VA_ARGS__)) #define metamacro_drop119(...) metamacro_drop118(metamacro_tail(__VA_ARGS__)) #define metamacro_drop120(...) metamacro_drop119(metamacro_tail(__VA_ARGS__)) #define metamacro_drop121(...) metamacro_drop120(metamacro_tail(__VA_ARGS__)) #define metamacro_drop122(...) metamacro_drop121(metamacro_tail(__VA_ARGS__)) #define metamacro_drop123(...) metamacro_drop122(metamacro_tail(__VA_ARGS__)) #define metamacro_drop124(...) metamacro_drop123(metamacro_tail(__VA_ARGS__)) #define metamacro_drop125(...) metamacro_drop124(metamacro_tail(__VA_ARGS__)) #define metamacro_drop126(...) metamacro_drop125(metamacro_tail(__VA_ARGS__)) #define metamacro_drop127(...) metamacro_drop126(metamacro_tail(__VA_ARGS__)) #define metamacro_drop128(...) metamacro_drop127(metamacro_tail(__VA_ARGS__)) #define metamacro_drop129(...) metamacro_drop128(metamacro_tail(__VA_ARGS__)) #define metamacro_drop130(...) metamacro_drop129(metamacro_tail(__VA_ARGS__)) #define metamacro_drop131(...) metamacro_drop130(metamacro_tail(__VA_ARGS__)) #define metamacro_drop132(...) metamacro_drop131(metamacro_tail(__VA_ARGS__)) #define metamacro_drop133(...) metamacro_drop132(metamacro_tail(__VA_ARGS__)) #define metamacro_drop134(...) metamacro_drop133(metamacro_tail(__VA_ARGS__)) #define metamacro_drop135(...) metamacro_drop134(metamacro_tail(__VA_ARGS__)) #define metamacro_drop136(...) metamacro_drop135(metamacro_tail(__VA_ARGS__)) #define metamacro_drop137(...) metamacro_drop136(metamacro_tail(__VA_ARGS__)) #define metamacro_drop138(...) metamacro_drop137(metamacro_tail(__VA_ARGS__)) #define metamacro_drop139(...) metamacro_drop138(metamacro_tail(__VA_ARGS__)) #define metamacro_drop140(...) metamacro_drop139(metamacro_tail(__VA_ARGS__)) #define metamacro_drop141(...) metamacro_drop140(metamacro_tail(__VA_ARGS__)) #define metamacro_drop142(...) metamacro_drop141(metamacro_tail(__VA_ARGS__)) #define metamacro_drop143(...) metamacro_drop142(metamacro_tail(__VA_ARGS__)) #define metamacro_drop144(...) metamacro_drop143(metamacro_tail(__VA_ARGS__)) #define metamacro_drop145(...) metamacro_drop144(metamacro_tail(__VA_ARGS__)) #define metamacro_drop146(...) metamacro_drop145(metamacro_tail(__VA_ARGS__)) #define metamacro_drop147(...) metamacro_drop146(metamacro_tail(__VA_ARGS__)) #define metamacro_drop148(...) metamacro_drop147(metamacro_tail(__VA_ARGS__)) #define metamacro_drop149(...) metamacro_drop148(metamacro_tail(__VA_ARGS__)) #define metamacro_drop150(...) metamacro_drop149(metamacro_tail(__VA_ARGS__)) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // metamacro_foreach_cxt expansions #define metamacro_foreach_cxt0(MACRO, SEP, CONTEXT) #define metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) #define metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ metamacro_foreach_cxt1(MACRO, SEP, CONTEXT, _0) \ SEP \ MACRO(1, CONTEXT, _1) #define metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ metamacro_foreach_cxt2(MACRO, SEP, CONTEXT, _0, _1) \ SEP \ MACRO(2, CONTEXT, _2) #define metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ metamacro_foreach_cxt3(MACRO, SEP, CONTEXT, _0, _1, _2) \ SEP \ MACRO(3, CONTEXT, _3) #define metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ metamacro_foreach_cxt4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ SEP \ MACRO(4, CONTEXT, _4) #define metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ metamacro_foreach_cxt5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ SEP \ MACRO(5, CONTEXT, _5) #define metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ metamacro_foreach_cxt6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ SEP \ MACRO(6, CONTEXT, _6) #define metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ metamacro_foreach_cxt7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ SEP \ MACRO(7, CONTEXT, _7) #define metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ metamacro_foreach_cxt8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ SEP \ MACRO(8, CONTEXT, _8) #define metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ metamacro_foreach_cxt9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ SEP \ MACRO(9, CONTEXT, _9) #define metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ metamacro_foreach_cxt10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ SEP \ MACRO(10, CONTEXT, _10) #define metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ metamacro_foreach_cxt11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ SEP \ MACRO(11, CONTEXT, _11) #define metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ metamacro_foreach_cxt12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ SEP \ MACRO(12, CONTEXT, _12) #define metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ metamacro_foreach_cxt13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ SEP \ MACRO(13, CONTEXT, _13) #define metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ metamacro_foreach_cxt14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ SEP \ MACRO(14, CONTEXT, _14) #define metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ metamacro_foreach_cxt15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ SEP \ MACRO(15, CONTEXT, _15) #define metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ metamacro_foreach_cxt16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ SEP \ MACRO(16, CONTEXT, _16) #define metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ metamacro_foreach_cxt17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ SEP \ MACRO(17, CONTEXT, _17) #define metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ metamacro_foreach_cxt18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ SEP \ MACRO(18, CONTEXT, _18) #define metamacro_foreach_cxt20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ metamacro_foreach_cxt19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ SEP \ MACRO(19, CONTEXT, _19) #define metamacro_foreach_cxt21(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20) \ metamacro_foreach_cxt20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ SEP \ MACRO(20, CONTEXT, _20) #define metamacro_foreach_cxt22(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21) \ metamacro_foreach_cxt21(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20) \ SEP \ MACRO(21, CONTEXT, _21) #define metamacro_foreach_cxt23(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22) \ metamacro_foreach_cxt22(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21) \ SEP \ MACRO(22, CONTEXT, _22) #define metamacro_foreach_cxt24(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23) \ metamacro_foreach_cxt23(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22) \ SEP \ MACRO(23, CONTEXT, _23) #define metamacro_foreach_cxt25(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24) \ metamacro_foreach_cxt24(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23) \ SEP \ MACRO(24, CONTEXT, _24) #define metamacro_foreach_cxt26(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25) \ metamacro_foreach_cxt25(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24) \ SEP \ MACRO(25, CONTEXT, _25) #define metamacro_foreach_cxt27(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26) \ metamacro_foreach_cxt26(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25) \ SEP \ MACRO(26, CONTEXT, _26) #define metamacro_foreach_cxt28(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27) \ metamacro_foreach_cxt27(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26) \ SEP \ MACRO(27, CONTEXT, _27) #define metamacro_foreach_cxt29(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28) \ metamacro_foreach_cxt28(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27) \ SEP \ MACRO(28, CONTEXT, _28) #define metamacro_foreach_cxt30(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29) \ metamacro_foreach_cxt29(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28) \ SEP \ MACRO(29, CONTEXT, _29) #define metamacro_foreach_cxt31(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30) \ metamacro_foreach_cxt30(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29) \ SEP \ MACRO(30, CONTEXT, _30) #define metamacro_foreach_cxt32(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31) \ metamacro_foreach_cxt31(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30) \ SEP \ MACRO(31, CONTEXT, _31) #define metamacro_foreach_cxt33(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32) \ metamacro_foreach_cxt32(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31) \ SEP \ MACRO(32, CONTEXT, _32) #define metamacro_foreach_cxt34(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33) \ metamacro_foreach_cxt33(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32) \ SEP \ MACRO(33, CONTEXT, _33) #define metamacro_foreach_cxt35(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34) \ metamacro_foreach_cxt34(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33) \ SEP \ MACRO(34, CONTEXT, _34) #define metamacro_foreach_cxt36(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35) \ metamacro_foreach_cxt35(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34) \ SEP \ MACRO(35, CONTEXT, _35) #define metamacro_foreach_cxt37(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36) \ metamacro_foreach_cxt36(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35) \ SEP \ MACRO(36, CONTEXT, _36) #define metamacro_foreach_cxt38(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37) \ metamacro_foreach_cxt37(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36) \ SEP \ MACRO(37, CONTEXT, _37) #define metamacro_foreach_cxt39(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38) \ metamacro_foreach_cxt38(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37) \ SEP \ MACRO(38, CONTEXT, _38) #define metamacro_foreach_cxt40(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39) \ metamacro_foreach_cxt39(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38) \ SEP \ MACRO(39, CONTEXT, _39) #define metamacro_foreach_cxt41(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40) \ metamacro_foreach_cxt40(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39) \ SEP \ MACRO(40, CONTEXT, _40) #define metamacro_foreach_cxt42(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41) \ metamacro_foreach_cxt41(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40) \ SEP \ MACRO(41, CONTEXT, _41) #define metamacro_foreach_cxt43(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42) \ metamacro_foreach_cxt42(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41) \ SEP \ MACRO(42, CONTEXT, _42) #define metamacro_foreach_cxt44(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43) \ metamacro_foreach_cxt43(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42) \ SEP \ MACRO(43, CONTEXT, _43) #define metamacro_foreach_cxt45(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44) \ metamacro_foreach_cxt44(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43) \ SEP \ MACRO(44, CONTEXT, _44) #define metamacro_foreach_cxt46(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45) \ metamacro_foreach_cxt45(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44) \ SEP \ MACRO(45, CONTEXT, _45) #define metamacro_foreach_cxt47(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46) \ metamacro_foreach_cxt46(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45) \ SEP \ MACRO(46, CONTEXT, _46) #define metamacro_foreach_cxt48(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47) \ metamacro_foreach_cxt47(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46) \ SEP \ MACRO(47, CONTEXT, _47) #define metamacro_foreach_cxt49(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48) \ metamacro_foreach_cxt48(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47) \ SEP \ MACRO(48, CONTEXT, _48) #define metamacro_foreach_cxt50(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49) \ metamacro_foreach_cxt49(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48) \ SEP \ MACRO(49, CONTEXT, _49) #define metamacro_foreach_cxt51(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50) \ metamacro_foreach_cxt50(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49) \ SEP \ MACRO(50, CONTEXT, _50) #define metamacro_foreach_cxt52(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51) \ metamacro_foreach_cxt51(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50) \ SEP \ MACRO(51, CONTEXT, _51) #define metamacro_foreach_cxt53(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52) \ metamacro_foreach_cxt52(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51) \ SEP \ MACRO(52, CONTEXT, _52) #define metamacro_foreach_cxt54(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53) \ metamacro_foreach_cxt53(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52) \ SEP \ MACRO(53, CONTEXT, _53) #define metamacro_foreach_cxt55(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54) \ metamacro_foreach_cxt54(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53) \ SEP \ MACRO(54, CONTEXT, _54) #define metamacro_foreach_cxt56(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55) \ metamacro_foreach_cxt55(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54) \ SEP \ MACRO(55, CONTEXT, _55) #define metamacro_foreach_cxt57(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56) \ metamacro_foreach_cxt56(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55) \ SEP \ MACRO(56, CONTEXT, _56) #define metamacro_foreach_cxt58(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57) \ metamacro_foreach_cxt57(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56) \ SEP \ MACRO(57, CONTEXT, _57) #define metamacro_foreach_cxt59(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58) \ metamacro_foreach_cxt58(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57) \ SEP \ MACRO(58, CONTEXT, _58) #define metamacro_foreach_cxt60(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59) \ metamacro_foreach_cxt59(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58) \ SEP \ MACRO(59, CONTEXT, _59) #define metamacro_foreach_cxt61(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60) \ metamacro_foreach_cxt60(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59) \ SEP \ MACRO(60, CONTEXT, _60) #define metamacro_foreach_cxt62(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61) \ metamacro_foreach_cxt61(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60) \ SEP \ MACRO(61, CONTEXT, _61) #define metamacro_foreach_cxt63(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62) \ metamacro_foreach_cxt62(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61) \ SEP \ MACRO(62, CONTEXT, _62) #define metamacro_foreach_cxt64(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63) \ metamacro_foreach_cxt63(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62) \ SEP \ MACRO(63, CONTEXT, _63) #define metamacro_foreach_cxt65(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64) \ metamacro_foreach_cxt64(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63) \ SEP \ MACRO(64, CONTEXT, _64) #define metamacro_foreach_cxt66(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65) \ metamacro_foreach_cxt65(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64) \ SEP \ MACRO(65, CONTEXT, _65) #define metamacro_foreach_cxt67(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66) \ metamacro_foreach_cxt66(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65) \ SEP \ MACRO(66, CONTEXT, _66) #define metamacro_foreach_cxt68(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67) \ metamacro_foreach_cxt67(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66) \ SEP \ MACRO(67, CONTEXT, _67) #define metamacro_foreach_cxt69(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68) \ metamacro_foreach_cxt68(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67) \ SEP \ MACRO(68, CONTEXT, _68) #define metamacro_foreach_cxt70(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69) \ metamacro_foreach_cxt69(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68) \ SEP \ MACRO(69, CONTEXT, _69) #define metamacro_foreach_cxt71(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70) \ metamacro_foreach_cxt70(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69) \ SEP \ MACRO(70, CONTEXT, _70) #define metamacro_foreach_cxt72(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71) \ metamacro_foreach_cxt71(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70) \ SEP \ MACRO(71, CONTEXT, _71) #define metamacro_foreach_cxt73(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72) \ metamacro_foreach_cxt72(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71) \ SEP \ MACRO(72, CONTEXT, _72) #define metamacro_foreach_cxt74(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73) \ metamacro_foreach_cxt73(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72) \ SEP \ MACRO(73, CONTEXT, _73) #define metamacro_foreach_cxt75(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74) \ metamacro_foreach_cxt74(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73) \ SEP \ MACRO(74, CONTEXT, _74) #define metamacro_foreach_cxt76(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75) \ metamacro_foreach_cxt75(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74) \ SEP \ MACRO(75, CONTEXT, _75) #define metamacro_foreach_cxt77(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76) \ metamacro_foreach_cxt76(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75) \ SEP \ MACRO(76, CONTEXT, _76) #define metamacro_foreach_cxt78(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77) \ metamacro_foreach_cxt77(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76) \ SEP \ MACRO(77, CONTEXT, _77) #define metamacro_foreach_cxt79(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78) \ metamacro_foreach_cxt78(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77) \ SEP \ MACRO(78, CONTEXT, _78) #define metamacro_foreach_cxt80(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79) \ metamacro_foreach_cxt79(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78) \ SEP \ MACRO(79, CONTEXT, _79) #define metamacro_foreach_cxt81(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80) \ metamacro_foreach_cxt80(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79) \ SEP \ MACRO(80, CONTEXT, _80) #define metamacro_foreach_cxt82(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81) \ metamacro_foreach_cxt81(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80) \ SEP \ MACRO(81, CONTEXT, _81) #define metamacro_foreach_cxt83(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82) \ metamacro_foreach_cxt82(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81) \ SEP \ MACRO(82, CONTEXT, _82) #define metamacro_foreach_cxt84(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83) \ metamacro_foreach_cxt83(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82) \ SEP \ MACRO(83, CONTEXT, _83) #define metamacro_foreach_cxt85(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84) \ metamacro_foreach_cxt84(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83) \ SEP \ MACRO(84, CONTEXT, _84) #define metamacro_foreach_cxt86(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85) \ metamacro_foreach_cxt85(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84) \ SEP \ MACRO(85, CONTEXT, _85) #define metamacro_foreach_cxt87(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86) \ metamacro_foreach_cxt86(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85) \ SEP \ MACRO(86, CONTEXT, _86) #define metamacro_foreach_cxt88(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87) \ metamacro_foreach_cxt87(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86) \ SEP \ MACRO(87, CONTEXT, _87) #define metamacro_foreach_cxt89(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88) \ metamacro_foreach_cxt88(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87) \ SEP \ MACRO(88, CONTEXT, _88) #define metamacro_foreach_cxt90(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89) \ metamacro_foreach_cxt89(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88) \ SEP \ MACRO(89, CONTEXT, _89) #define metamacro_foreach_cxt91(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90) \ metamacro_foreach_cxt90(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89) \ SEP \ MACRO(90, CONTEXT, _90) #define metamacro_foreach_cxt92(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91) \ metamacro_foreach_cxt91(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90) \ SEP \ MACRO(91, CONTEXT, _91) #define metamacro_foreach_cxt93(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92) \ metamacro_foreach_cxt92(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91) \ SEP \ MACRO(92, CONTEXT, _92) #define metamacro_foreach_cxt94(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93) \ metamacro_foreach_cxt93(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92) \ SEP \ MACRO(93, CONTEXT, _93) #define metamacro_foreach_cxt95(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94) \ metamacro_foreach_cxt94(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93) \ SEP \ MACRO(94, CONTEXT, _94) #define metamacro_foreach_cxt96(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95) \ metamacro_foreach_cxt95(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94) \ SEP \ MACRO(95, CONTEXT, _95) #define metamacro_foreach_cxt97(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96) \ metamacro_foreach_cxt96(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95) \ SEP \ MACRO(96, CONTEXT, _96) #define metamacro_foreach_cxt98(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97) \ metamacro_foreach_cxt97(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96) \ SEP \ MACRO(97, CONTEXT, _97) #define metamacro_foreach_cxt99(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98) \ metamacro_foreach_cxt98(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97) \ SEP \ MACRO(98, CONTEXT, _98) #define metamacro_foreach_cxt100(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99) \ metamacro_foreach_cxt99(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98) \ SEP \ MACRO(99, CONTEXT, _99) #define metamacro_foreach_cxt101(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100) \ metamacro_foreach_cxt100(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99) \ SEP \ MACRO(100, CONTEXT, _100) #define metamacro_foreach_cxt102(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101) \ metamacro_foreach_cxt101(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100) \ SEP \ MACRO(101, CONTEXT, _101) #define metamacro_foreach_cxt103(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102) \ metamacro_foreach_cxt102(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101) \ SEP \ MACRO(102, CONTEXT, _102) #define metamacro_foreach_cxt104(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103) \ metamacro_foreach_cxt103(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102) \ SEP \ MACRO(103, CONTEXT, _103) #define metamacro_foreach_cxt105(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104) \ metamacro_foreach_cxt104(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103) \ SEP \ MACRO(104, CONTEXT, _104) #define metamacro_foreach_cxt106(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105) \ metamacro_foreach_cxt105(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104) \ SEP \ MACRO(105, CONTEXT, _105) #define metamacro_foreach_cxt107(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106) \ metamacro_foreach_cxt106(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105) \ SEP \ MACRO(106, CONTEXT, _106) #define metamacro_foreach_cxt108(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107) \ metamacro_foreach_cxt107(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106) \ SEP \ MACRO(107, CONTEXT, _107) #define metamacro_foreach_cxt109(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108) \ metamacro_foreach_cxt108(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107) \ SEP \ MACRO(108, CONTEXT, _108) #define metamacro_foreach_cxt110(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109) \ metamacro_foreach_cxt109(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108) \ SEP \ MACRO(109, CONTEXT, _109) #define metamacro_foreach_cxt111(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110) \ metamacro_foreach_cxt110(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109) \ SEP \ MACRO(110, CONTEXT, _110) #define metamacro_foreach_cxt112(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111) \ metamacro_foreach_cxt111(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110) \ SEP \ MACRO(111, CONTEXT, _111) #define metamacro_foreach_cxt113(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112) \ metamacro_foreach_cxt112(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111) \ SEP \ MACRO(112, CONTEXT, _112) #define metamacro_foreach_cxt114(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113) \ metamacro_foreach_cxt113(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112) \ SEP \ MACRO(113, CONTEXT, _113) #define metamacro_foreach_cxt115(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114) \ metamacro_foreach_cxt114(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113) \ SEP \ MACRO(114, CONTEXT, _114) #define metamacro_foreach_cxt116(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115) \ metamacro_foreach_cxt115(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114) \ SEP \ MACRO(115, CONTEXT, _115) #define metamacro_foreach_cxt117(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116) \ metamacro_foreach_cxt116(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115) \ SEP \ MACRO(116, CONTEXT, _116) #define metamacro_foreach_cxt118(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117) \ metamacro_foreach_cxt117(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116) \ SEP \ MACRO(117, CONTEXT, _117) #define metamacro_foreach_cxt119(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118) \ metamacro_foreach_cxt118(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117) \ SEP \ MACRO(118, CONTEXT, _118) #define metamacro_foreach_cxt120(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119) \ metamacro_foreach_cxt119(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118) \ SEP \ MACRO(119, CONTEXT, _119) #define metamacro_foreach_cxt121(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120) \ metamacro_foreach_cxt120(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119) \ SEP \ MACRO(120, CONTEXT, _120) #define metamacro_foreach_cxt122(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121) \ metamacro_foreach_cxt121(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120) \ SEP \ MACRO(121, CONTEXT, _121) #define metamacro_foreach_cxt123(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122) \ metamacro_foreach_cxt122(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121) \ SEP \ MACRO(122, CONTEXT, _122) #define metamacro_foreach_cxt124(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123) \ metamacro_foreach_cxt123(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122) \ SEP \ MACRO(123, CONTEXT, _123) #define metamacro_foreach_cxt125(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124) \ metamacro_foreach_cxt124(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123) \ SEP \ MACRO(124, CONTEXT, _124) #define metamacro_foreach_cxt126(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125) \ metamacro_foreach_cxt125(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124) \ SEP \ MACRO(125, CONTEXT, _125) #define metamacro_foreach_cxt127(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126) \ metamacro_foreach_cxt126(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125) \ SEP \ MACRO(126, CONTEXT, _126) #define metamacro_foreach_cxt128(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127) \ metamacro_foreach_cxt127(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126) \ SEP \ MACRO(127, CONTEXT, _127) #define metamacro_foreach_cxt129(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128) \ metamacro_foreach_cxt128(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127) \ SEP \ MACRO(128, CONTEXT, _128) #define metamacro_foreach_cxt130(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129) \ metamacro_foreach_cxt129(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128) \ SEP \ MACRO(129, CONTEXT, _129) #define metamacro_foreach_cxt131(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130) \ metamacro_foreach_cxt130(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129) \ SEP \ MACRO(130, CONTEXT, _130) #define metamacro_foreach_cxt132(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131) \ metamacro_foreach_cxt131(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130) \ SEP \ MACRO(131, CONTEXT, _131) #define metamacro_foreach_cxt133(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132) \ metamacro_foreach_cxt132(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131) \ SEP \ MACRO(132, CONTEXT, _132) #define metamacro_foreach_cxt134(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133) \ metamacro_foreach_cxt133(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132) \ SEP \ MACRO(133, CONTEXT, _133) #define metamacro_foreach_cxt135(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134) \ metamacro_foreach_cxt134(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133) \ SEP \ MACRO(134, CONTEXT, _134) #define metamacro_foreach_cxt136(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135) \ metamacro_foreach_cxt135(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134) \ SEP \ MACRO(135, CONTEXT, _135) #define metamacro_foreach_cxt137(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136) \ metamacro_foreach_cxt136(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135) \ SEP \ MACRO(136, CONTEXT, _136) #define metamacro_foreach_cxt138(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137) \ metamacro_foreach_cxt137(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136) \ SEP \ MACRO(137, CONTEXT, _137) #define metamacro_foreach_cxt139(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138) \ metamacro_foreach_cxt138(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137) \ SEP \ MACRO(138, CONTEXT, _138) #define metamacro_foreach_cxt140(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139) \ metamacro_foreach_cxt139(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138) \ SEP \ MACRO(139, CONTEXT, _139) #define metamacro_foreach_cxt141(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140) \ metamacro_foreach_cxt140(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139) \ SEP \ MACRO(140, CONTEXT, _140) #define metamacro_foreach_cxt142(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141) \ metamacro_foreach_cxt141(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140) \ SEP \ MACRO(141, CONTEXT, _141) #define metamacro_foreach_cxt143(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142) \ metamacro_foreach_cxt142(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141) \ SEP \ MACRO(142, CONTEXT, _142) #define metamacro_foreach_cxt144(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143) \ metamacro_foreach_cxt143(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142) \ SEP \ MACRO(143, CONTEXT, _143) #define metamacro_foreach_cxt145(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144) \ metamacro_foreach_cxt144(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143) \ SEP \ MACRO(144, CONTEXT, _144) #define metamacro_foreach_cxt146(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145) \ metamacro_foreach_cxt145(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144) \ SEP \ MACRO(145, CONTEXT, _145) #define metamacro_foreach_cxt147(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146) \ metamacro_foreach_cxt146(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145) \ SEP \ MACRO(146, CONTEXT, _146) #define metamacro_foreach_cxt148(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147) \ metamacro_foreach_cxt147(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146) \ SEP \ MACRO(147, CONTEXT, _147) #define metamacro_foreach_cxt149(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148) \ metamacro_foreach_cxt148(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147) \ SEP \ MACRO(148, CONTEXT, _148) #define metamacro_foreach_cxt150(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149) \ metamacro_foreach_cxt149(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148) \ SEP \ MACRO(149, CONTEXT, _149) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // metamacro_foreach_cxt expansions #define metamacro_foreach_cxt_recursive0(MACRO, SEP, CONTEXT) #define metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) MACRO(0, CONTEXT, _0) #define metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ metamacro_foreach_cxt_recursive1(MACRO, SEP, CONTEXT, _0) \ SEP \ MACRO(1, CONTEXT, _1) #define metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ metamacro_foreach_cxt_recursive2(MACRO, SEP, CONTEXT, _0, _1) \ SEP \ MACRO(2, CONTEXT, _2) #define metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ metamacro_foreach_cxt_recursive3(MACRO, SEP, CONTEXT, _0, _1, _2) \ SEP \ MACRO(3, CONTEXT, _3) #define metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ metamacro_foreach_cxt_recursive4(MACRO, SEP, CONTEXT, _0, _1, _2, _3) \ SEP \ MACRO(4, CONTEXT, _4) #define metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ metamacro_foreach_cxt_recursive5(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4) \ SEP \ MACRO(5, CONTEXT, _5) #define metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ metamacro_foreach_cxt_recursive6(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5) \ SEP \ MACRO(6, CONTEXT, _6) #define metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ metamacro_foreach_cxt_recursive7(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6) \ SEP \ MACRO(7, CONTEXT, _7) #define metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ metamacro_foreach_cxt_recursive8(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7) \ SEP \ MACRO(8, CONTEXT, _8) #define metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ metamacro_foreach_cxt_recursive9(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8) \ SEP \ MACRO(9, CONTEXT, _9) #define metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ metamacro_foreach_cxt_recursive10(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9) \ SEP \ MACRO(10, CONTEXT, _10) #define metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ metamacro_foreach_cxt_recursive11(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) \ SEP \ MACRO(11, CONTEXT, _11) #define metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ metamacro_foreach_cxt_recursive12(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) \ SEP \ MACRO(12, CONTEXT, _12) #define metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ metamacro_foreach_cxt_recursive13(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) \ SEP \ MACRO(13, CONTEXT, _13) #define metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ metamacro_foreach_cxt_recursive14(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) \ SEP \ MACRO(14, CONTEXT, _14) #define metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ metamacro_foreach_cxt_recursive15(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) \ SEP \ MACRO(15, CONTEXT, _15) #define metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ metamacro_foreach_cxt_recursive16(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) \ SEP \ MACRO(16, CONTEXT, _16) #define metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ metamacro_foreach_cxt_recursive17(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) \ SEP \ MACRO(17, CONTEXT, _17) #define metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ metamacro_foreach_cxt_recursive18(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) \ SEP \ MACRO(18, CONTEXT, _18) #define metamacro_foreach_cxt_recursive20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ metamacro_foreach_cxt_recursive19(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) \ SEP \ MACRO(19, CONTEXT, _19) #define metamacro_foreach_cxt_recursive21(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20) \ metamacro_foreach_cxt_recursive20(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) \ SEP \ MACRO(20, CONTEXT, _20) #define metamacro_foreach_cxt_recursive22(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21) \ metamacro_foreach_cxt_recursive21(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20) \ SEP \ MACRO(21, CONTEXT, _21) #define metamacro_foreach_cxt_recursive23(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22) \ metamacro_foreach_cxt_recursive22(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21) \ SEP \ MACRO(22, CONTEXT, _22) #define metamacro_foreach_cxt_recursive24(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23) \ metamacro_foreach_cxt_recursive23(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22) \ SEP \ MACRO(23, CONTEXT, _23) #define metamacro_foreach_cxt_recursive25(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24) \ metamacro_foreach_cxt_recursive24(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23) \ SEP \ MACRO(24, CONTEXT, _24) #define metamacro_foreach_cxt_recursive26(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25) \ metamacro_foreach_cxt_recursive25(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24) \ SEP \ MACRO(25, CONTEXT, _25) #define metamacro_foreach_cxt_recursive27(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26) \ metamacro_foreach_cxt_recursive26(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25) \ SEP \ MACRO(26, CONTEXT, _26) #define metamacro_foreach_cxt_recursive28(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27) \ metamacro_foreach_cxt_recursive27(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26) \ SEP \ MACRO(27, CONTEXT, _27) #define metamacro_foreach_cxt_recursive29(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28) \ metamacro_foreach_cxt_recursive28(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27) \ SEP \ MACRO(28, CONTEXT, _28) #define metamacro_foreach_cxt_recursive30(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29) \ metamacro_foreach_cxt_recursive29(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28) \ SEP \ MACRO(29, CONTEXT, _29) #define metamacro_foreach_cxt_recursive31(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30) \ metamacro_foreach_cxt_recursive30(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29) \ SEP \ MACRO(30, CONTEXT, _30) #define metamacro_foreach_cxt_recursive32(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31) \ metamacro_foreach_cxt_recursive31(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30) \ SEP \ MACRO(31, CONTEXT, _31) #define metamacro_foreach_cxt_recursive33(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32) \ metamacro_foreach_cxt_recursive32(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31) \ SEP \ MACRO(32, CONTEXT, _32) #define metamacro_foreach_cxt_recursive34(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33) \ metamacro_foreach_cxt_recursive33(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32) \ SEP \ MACRO(33, CONTEXT, _33) #define metamacro_foreach_cxt_recursive35(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34) \ metamacro_foreach_cxt_recursive34(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33) \ SEP \ MACRO(34, CONTEXT, _34) #define metamacro_foreach_cxt_recursive36(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35) \ metamacro_foreach_cxt_recursive35(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34) \ SEP \ MACRO(35, CONTEXT, _35) #define metamacro_foreach_cxt_recursive37(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36) \ metamacro_foreach_cxt_recursive36(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35) \ SEP \ MACRO(36, CONTEXT, _36) #define metamacro_foreach_cxt_recursive38(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37) \ metamacro_foreach_cxt_recursive37(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36) \ SEP \ MACRO(37, CONTEXT, _37) #define metamacro_foreach_cxt_recursive39(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38) \ metamacro_foreach_cxt_recursive38(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37) \ SEP \ MACRO(38, CONTEXT, _38) #define metamacro_foreach_cxt_recursive40(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39) \ metamacro_foreach_cxt_recursive39(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38) \ SEP \ MACRO(39, CONTEXT, _39) #define metamacro_foreach_cxt_recursive41(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40) \ metamacro_foreach_cxt_recursive40(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39) \ SEP \ MACRO(40, CONTEXT, _40) #define metamacro_foreach_cxt_recursive42(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41) \ metamacro_foreach_cxt_recursive41(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40) \ SEP \ MACRO(41, CONTEXT, _41) #define metamacro_foreach_cxt_recursive43(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42) \ metamacro_foreach_cxt_recursive42(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41) \ SEP \ MACRO(42, CONTEXT, _42) #define metamacro_foreach_cxt_recursive44(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43) \ metamacro_foreach_cxt_recursive43(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42) \ SEP \ MACRO(43, CONTEXT, _43) #define metamacro_foreach_cxt_recursive45(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44) \ metamacro_foreach_cxt_recursive44(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43) \ SEP \ MACRO(44, CONTEXT, _44) #define metamacro_foreach_cxt_recursive46(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45) \ metamacro_foreach_cxt_recursive45(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44) \ SEP \ MACRO(45, CONTEXT, _45) #define metamacro_foreach_cxt_recursive47(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46) \ metamacro_foreach_cxt_recursive46(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45) \ SEP \ MACRO(46, CONTEXT, _46) #define metamacro_foreach_cxt_recursive48(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47) \ metamacro_foreach_cxt_recursive47(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46) \ SEP \ MACRO(47, CONTEXT, _47) #define metamacro_foreach_cxt_recursive49(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48) \ metamacro_foreach_cxt_recursive48(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47) \ SEP \ MACRO(48, CONTEXT, _48) #define metamacro_foreach_cxt_recursive50(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49) \ metamacro_foreach_cxt_recursive49(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48) \ SEP \ MACRO(49, CONTEXT, _49) #define metamacro_foreach_cxt_recursive51(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50) \ metamacro_foreach_cxt_recursive50(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49) \ SEP \ MACRO(50, CONTEXT, _50) #define metamacro_foreach_cxt_recursive52(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51) \ metamacro_foreach_cxt_recursive51(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50) \ SEP \ MACRO(51, CONTEXT, _51) #define metamacro_foreach_cxt_recursive53(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52) \ metamacro_foreach_cxt_recursive52(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51) \ SEP \ MACRO(52, CONTEXT, _52) #define metamacro_foreach_cxt_recursive54(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53) \ metamacro_foreach_cxt_recursive53(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52) \ SEP \ MACRO(53, CONTEXT, _53) #define metamacro_foreach_cxt_recursive55(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54) \ metamacro_foreach_cxt_recursive54(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53) \ SEP \ MACRO(54, CONTEXT, _54) #define metamacro_foreach_cxt_recursive56(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55) \ metamacro_foreach_cxt_recursive55(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54) \ SEP \ MACRO(55, CONTEXT, _55) #define metamacro_foreach_cxt_recursive57(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56) \ metamacro_foreach_cxt_recursive56(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55) \ SEP \ MACRO(56, CONTEXT, _56) #define metamacro_foreach_cxt_recursive58(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57) \ metamacro_foreach_cxt_recursive57(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56) \ SEP \ MACRO(57, CONTEXT, _57) #define metamacro_foreach_cxt_recursive59(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58) \ metamacro_foreach_cxt_recursive58(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57) \ SEP \ MACRO(58, CONTEXT, _58) #define metamacro_foreach_cxt_recursive60(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59) \ metamacro_foreach_cxt_recursive59(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58) \ SEP \ MACRO(59, CONTEXT, _59) #define metamacro_foreach_cxt_recursive61(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60) \ metamacro_foreach_cxt_recursive60(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59) \ SEP \ MACRO(60, CONTEXT, _60) #define metamacro_foreach_cxt_recursive62(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61) \ metamacro_foreach_cxt_recursive61(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60) \ SEP \ MACRO(61, CONTEXT, _61) #define metamacro_foreach_cxt_recursive63(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62) \ metamacro_foreach_cxt_recursive62(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61) \ SEP \ MACRO(62, CONTEXT, _62) #define metamacro_foreach_cxt_recursive64(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63) \ metamacro_foreach_cxt_recursive63(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62) \ SEP \ MACRO(63, CONTEXT, _63) #define metamacro_foreach_cxt_recursive65(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64) \ metamacro_foreach_cxt_recursive64(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63) \ SEP \ MACRO(64, CONTEXT, _64) #define metamacro_foreach_cxt_recursive66(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65) \ metamacro_foreach_cxt_recursive65(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64) \ SEP \ MACRO(65, CONTEXT, _65) #define metamacro_foreach_cxt_recursive67(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66) \ metamacro_foreach_cxt_recursive66(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65) \ SEP \ MACRO(66, CONTEXT, _66) #define metamacro_foreach_cxt_recursive68(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67) \ metamacro_foreach_cxt_recursive67(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66) \ SEP \ MACRO(67, CONTEXT, _67) #define metamacro_foreach_cxt_recursive69(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68) \ metamacro_foreach_cxt_recursive68(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67) \ SEP \ MACRO(68, CONTEXT, _68) #define metamacro_foreach_cxt_recursive70(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69) \ metamacro_foreach_cxt_recursive69(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68) \ SEP \ MACRO(69, CONTEXT, _69) #define metamacro_foreach_cxt_recursive71(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70) \ metamacro_foreach_cxt_recursive70(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69) \ SEP \ MACRO(70, CONTEXT, _70) #define metamacro_foreach_cxt_recursive72(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71) \ metamacro_foreach_cxt_recursive71(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70) \ SEP \ MACRO(71, CONTEXT, _71) #define metamacro_foreach_cxt_recursive73(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72) \ metamacro_foreach_cxt_recursive72(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71) \ SEP \ MACRO(72, CONTEXT, _72) #define metamacro_foreach_cxt_recursive74(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73) \ metamacro_foreach_cxt_recursive73(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72) \ SEP \ MACRO(73, CONTEXT, _73) #define metamacro_foreach_cxt_recursive75(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74) \ metamacro_foreach_cxt_recursive74(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73) \ SEP \ MACRO(74, CONTEXT, _74) #define metamacro_foreach_cxt_recursive76(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75) \ metamacro_foreach_cxt_recursive75(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74) \ SEP \ MACRO(75, CONTEXT, _75) #define metamacro_foreach_cxt_recursive77(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76) \ metamacro_foreach_cxt_recursive76(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75) \ SEP \ MACRO(76, CONTEXT, _76) #define metamacro_foreach_cxt_recursive78(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77) \ metamacro_foreach_cxt_recursive77(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76) \ SEP \ MACRO(77, CONTEXT, _77) #define metamacro_foreach_cxt_recursive79(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78) \ metamacro_foreach_cxt_recursive78(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77) \ SEP \ MACRO(78, CONTEXT, _78) #define metamacro_foreach_cxt_recursive80(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79) \ metamacro_foreach_cxt_recursive79(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78) \ SEP \ MACRO(79, CONTEXT, _79) #define metamacro_foreach_cxt_recursive81(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80) \ metamacro_foreach_cxt_recursive80(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79) \ SEP \ MACRO(80, CONTEXT, _80) #define metamacro_foreach_cxt_recursive82(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81) \ metamacro_foreach_cxt_recursive81(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80) \ SEP \ MACRO(81, CONTEXT, _81) #define metamacro_foreach_cxt_recursive83(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82) \ metamacro_foreach_cxt_recursive82(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81) \ SEP \ MACRO(82, CONTEXT, _82) #define metamacro_foreach_cxt_recursive84(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83) \ metamacro_foreach_cxt_recursive83(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82) \ SEP \ MACRO(83, CONTEXT, _83) #define metamacro_foreach_cxt_recursive85(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84) \ metamacro_foreach_cxt_recursive84(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83) \ SEP \ MACRO(84, CONTEXT, _84) #define metamacro_foreach_cxt_recursive86(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85) \ metamacro_foreach_cxt_recursive85(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84) \ SEP \ MACRO(85, CONTEXT, _85) #define metamacro_foreach_cxt_recursive87(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86) \ metamacro_foreach_cxt_recursive86(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85) \ SEP \ MACRO(86, CONTEXT, _86) #define metamacro_foreach_cxt_recursive88(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87) \ metamacro_foreach_cxt_recursive87(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86) \ SEP \ MACRO(87, CONTEXT, _87) #define metamacro_foreach_cxt_recursive89(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88) \ metamacro_foreach_cxt_recursive88(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87) \ SEP \ MACRO(88, CONTEXT, _88) #define metamacro_foreach_cxt_recursive90(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89) \ metamacro_foreach_cxt_recursive89(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88) \ SEP \ MACRO(89, CONTEXT, _89) #define metamacro_foreach_cxt_recursive91(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90) \ metamacro_foreach_cxt_recursive90(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89) \ SEP \ MACRO(90, CONTEXT, _90) #define metamacro_foreach_cxt_recursive92(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91) \ metamacro_foreach_cxt_recursive91(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90) \ SEP \ MACRO(91, CONTEXT, _91) #define metamacro_foreach_cxt_recursive93(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92) \ metamacro_foreach_cxt_recursive92(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91) \ SEP \ MACRO(92, CONTEXT, _92) #define metamacro_foreach_cxt_recursive94(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93) \ metamacro_foreach_cxt_recursive93(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92) \ SEP \ MACRO(93, CONTEXT, _93) #define metamacro_foreach_cxt_recursive95(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94) \ metamacro_foreach_cxt_recursive94(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93) \ SEP \ MACRO(94, CONTEXT, _94) #define metamacro_foreach_cxt_recursive96(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95) \ metamacro_foreach_cxt_recursive95(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94) \ SEP \ MACRO(95, CONTEXT, _95) #define metamacro_foreach_cxt_recursive97(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96) \ metamacro_foreach_cxt_recursive96(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95) \ SEP \ MACRO(96, CONTEXT, _96) #define metamacro_foreach_cxt_recursive98(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97) \ metamacro_foreach_cxt_recursive97(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96) \ SEP \ MACRO(97, CONTEXT, _97) #define metamacro_foreach_cxt_recursive99(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98) \ metamacro_foreach_cxt_recursive98(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97) \ SEP \ MACRO(98, CONTEXT, _98) #define metamacro_foreach_cxt_recursive100(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99) \ metamacro_foreach_cxt_recursive99(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98) \ SEP \ MACRO(99, CONTEXT, _99) #define metamacro_foreach_cxt_recursive101(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100) \ metamacro_foreach_cxt_recursive100(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99) \ SEP \ MACRO(100, CONTEXT, _100) #define metamacro_foreach_cxt_recursive102(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101) \ metamacro_foreach_cxt_recursive101(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100) \ SEP \ MACRO(101, CONTEXT, _101) #define metamacro_foreach_cxt_recursive103(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102) \ metamacro_foreach_cxt_recursive102(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101) \ SEP \ MACRO(102, CONTEXT, _102) #define metamacro_foreach_cxt_recursive104(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103) \ metamacro_foreach_cxt_recursive103(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102) \ SEP \ MACRO(103, CONTEXT, _103) #define metamacro_foreach_cxt_recursive105(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104) \ metamacro_foreach_cxt_recursive104(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103) \ SEP \ MACRO(104, CONTEXT, _104) #define metamacro_foreach_cxt_recursive106(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105) \ metamacro_foreach_cxt_recursive105(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104) \ SEP \ MACRO(105, CONTEXT, _105) #define metamacro_foreach_cxt_recursive107(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106) \ metamacro_foreach_cxt_recursive106(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105) \ SEP \ MACRO(106, CONTEXT, _106) #define metamacro_foreach_cxt_recursive108(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107) \ metamacro_foreach_cxt_recursive107(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106) \ SEP \ MACRO(107, CONTEXT, _107) #define metamacro_foreach_cxt_recursive109(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108) \ metamacro_foreach_cxt_recursive108(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107) \ SEP \ MACRO(108, CONTEXT, _108) #define metamacro_foreach_cxt_recursive110(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109) \ metamacro_foreach_cxt_recursive109(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108) \ SEP \ MACRO(109, CONTEXT, _109) #define metamacro_foreach_cxt_recursive111(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110) \ metamacro_foreach_cxt_recursive110(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109) \ SEP \ MACRO(110, CONTEXT, _110) #define metamacro_foreach_cxt_recursive112(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111) \ metamacro_foreach_cxt_recursive111(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110) \ SEP \ MACRO(111, CONTEXT, _111) #define metamacro_foreach_cxt_recursive113(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112) \ metamacro_foreach_cxt_recursive112(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111) \ SEP \ MACRO(112, CONTEXT, _112) #define metamacro_foreach_cxt_recursive114(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113) \ metamacro_foreach_cxt_recursive113(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112) \ SEP \ MACRO(113, CONTEXT, _113) #define metamacro_foreach_cxt_recursive115(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114) \ metamacro_foreach_cxt_recursive114(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113) \ SEP \ MACRO(114, CONTEXT, _114) #define metamacro_foreach_cxt_recursive116(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115) \ metamacro_foreach_cxt_recursive115(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114) \ SEP \ MACRO(115, CONTEXT, _115) #define metamacro_foreach_cxt_recursive117(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116) \ metamacro_foreach_cxt_recursive116(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115) \ SEP \ MACRO(116, CONTEXT, _116) #define metamacro_foreach_cxt_recursive118(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117) \ metamacro_foreach_cxt_recursive117(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116) \ SEP \ MACRO(117, CONTEXT, _117) #define metamacro_foreach_cxt_recursive119(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118) \ metamacro_foreach_cxt_recursive118(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117) \ SEP \ MACRO(118, CONTEXT, _118) #define metamacro_foreach_cxt_recursive120(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119) \ metamacro_foreach_cxt_recursive119(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118) \ SEP \ MACRO(119, CONTEXT, _119) #define metamacro_foreach_cxt_recursive121(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120) \ metamacro_foreach_cxt_recursive120(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119) \ SEP \ MACRO(120, CONTEXT, _120) #define metamacro_foreach_cxt_recursive122(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121) \ metamacro_foreach_cxt_recursive121(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120) \ SEP \ MACRO(121, CONTEXT, _121) #define metamacro_foreach_cxt_recursive123(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122) \ metamacro_foreach_cxt_recursive122(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121) \ SEP \ MACRO(122, CONTEXT, _122) #define metamacro_foreach_cxt_recursive124(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123) \ metamacro_foreach_cxt_recursive123(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122) \ SEP \ MACRO(123, CONTEXT, _123) #define metamacro_foreach_cxt_recursive125(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124) \ metamacro_foreach_cxt_recursive124(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123) \ SEP \ MACRO(124, CONTEXT, _124) #define metamacro_foreach_cxt_recursive126(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125) \ metamacro_foreach_cxt_recursive125(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124) \ SEP \ MACRO(125, CONTEXT, _125) #define metamacro_foreach_cxt_recursive127(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126) \ metamacro_foreach_cxt_recursive126(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125) \ SEP \ MACRO(126, CONTEXT, _126) #define metamacro_foreach_cxt_recursive128(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127) \ metamacro_foreach_cxt_recursive127(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126) \ SEP \ MACRO(127, CONTEXT, _127) #define metamacro_foreach_cxt_recursive129(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128) \ metamacro_foreach_cxt_recursive128(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127) \ SEP \ MACRO(128, CONTEXT, _128) #define metamacro_foreach_cxt_recursive130(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129) \ metamacro_foreach_cxt_recursive129(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128) \ SEP \ MACRO(129, CONTEXT, _129) #define metamacro_foreach_cxt_recursive131(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130) \ metamacro_foreach_cxt_recursive130(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129) \ SEP \ MACRO(130, CONTEXT, _130) #define metamacro_foreach_cxt_recursive132(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131) \ metamacro_foreach_cxt_recursive131(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130) \ SEP \ MACRO(131, CONTEXT, _131) #define metamacro_foreach_cxt_recursive133(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132) \ metamacro_foreach_cxt_recursive132(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131) \ SEP \ MACRO(132, CONTEXT, _132) #define metamacro_foreach_cxt_recursive134(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133) \ metamacro_foreach_cxt_recursive133(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132) \ SEP \ MACRO(133, CONTEXT, _133) #define metamacro_foreach_cxt_recursive135(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134) \ metamacro_foreach_cxt_recursive134(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133) \ SEP \ MACRO(134, CONTEXT, _134) #define metamacro_foreach_cxt_recursive136(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135) \ metamacro_foreach_cxt_recursive135(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134) \ SEP \ MACRO(135, CONTEXT, _135) #define metamacro_foreach_cxt_recursive137(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136) \ metamacro_foreach_cxt_recursive136(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135) \ SEP \ MACRO(136, CONTEXT, _136) #define metamacro_foreach_cxt_recursive138(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137) \ metamacro_foreach_cxt_recursive137(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136) \ SEP \ MACRO(137, CONTEXT, _137) #define metamacro_foreach_cxt_recursive139(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138) \ metamacro_foreach_cxt_recursive138(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137) \ SEP \ MACRO(138, CONTEXT, _138) #define metamacro_foreach_cxt_recursive140(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139) \ metamacro_foreach_cxt_recursive139(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138) \ SEP \ MACRO(139, CONTEXT, _139) #define metamacro_foreach_cxt_recursive141(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140) \ metamacro_foreach_cxt_recursive140(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139) \ SEP \ MACRO(140, CONTEXT, _140) #define metamacro_foreach_cxt_recursive142(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141) \ metamacro_foreach_cxt_recursive141(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140) \ SEP \ MACRO(141, CONTEXT, _141) #define metamacro_foreach_cxt_recursive143(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142) \ metamacro_foreach_cxt_recursive142(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141) \ SEP \ MACRO(142, CONTEXT, _142) #define metamacro_foreach_cxt_recursive144(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143) \ metamacro_foreach_cxt_recursive143(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142) \ SEP \ MACRO(143, CONTEXT, _143) #define metamacro_foreach_cxt_recursive145(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144) \ metamacro_foreach_cxt_recursive144(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143) \ SEP \ MACRO(144, CONTEXT, _144) #define metamacro_foreach_cxt_recursive146(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145) \ metamacro_foreach_cxt_recursive145(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144) \ SEP \ MACRO(145, CONTEXT, _145) #define metamacro_foreach_cxt_recursive147(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146) \ metamacro_foreach_cxt_recursive146(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145) \ SEP \ MACRO(146, CONTEXT, _146) #define metamacro_foreach_cxt_recursive148(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147) \ metamacro_foreach_cxt_recursive147(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146) \ SEP \ MACRO(147, CONTEXT, _147) #define metamacro_foreach_cxt_recursive149(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148) \ metamacro_foreach_cxt_recursive148(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147) \ SEP \ MACRO(148, CONTEXT, _148) #define metamacro_foreach_cxt_recursive150(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149) \ metamacro_foreach_cxt_recursive149(MACRO, SEP, CONTEXT, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148) \ SEP \ MACRO(149, CONTEXT, _149) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// #define metamacro_foreach_iter(INDEX, MACRO, ARG) MACRO(INDEX, ARG) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // implemented from scratch so that metamacro_concat() doesn't end up nesting #define metamacro_foreach_concat_iter(INDEX, BASE, ARG) metamacro_foreach_concat_iter_(BASE, ARG) #define metamacro_foreach_concat_iter_(BASE, ARG) BASE ## ARG /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // metamacro_for_cxt expansions #define metamacro_for_cxt0(MACRO, SEP, CONTEXT) #define metamacro_for_cxt1(MACRO, SEP, CONTEXT) MACRO(0, CONTEXT) #define metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ metamacro_for_cxt1(MACRO, SEP, CONTEXT) \ SEP \ MACRO(1, CONTEXT) #define metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ metamacro_for_cxt2(MACRO, SEP, CONTEXT) \ SEP \ MACRO(2, CONTEXT) #define metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ metamacro_for_cxt3(MACRO, SEP, CONTEXT) \ SEP \ MACRO(3, CONTEXT) #define metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ metamacro_for_cxt4(MACRO, SEP, CONTEXT) \ SEP \ MACRO(4, CONTEXT) #define metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ metamacro_for_cxt5(MACRO, SEP, CONTEXT) \ SEP \ MACRO(5, CONTEXT) #define metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ metamacro_for_cxt6(MACRO, SEP, CONTEXT) \ SEP \ MACRO(6, CONTEXT) #define metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ metamacro_for_cxt7(MACRO, SEP, CONTEXT) \ SEP \ MACRO(7, CONTEXT) #define metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ metamacro_for_cxt8(MACRO, SEP, CONTEXT) \ SEP \ MACRO(8, CONTEXT) #define metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ metamacro_for_cxt9(MACRO, SEP, CONTEXT) \ SEP \ MACRO(9, CONTEXT) #define metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ metamacro_for_cxt10(MACRO, SEP, CONTEXT) \ SEP \ MACRO(10, CONTEXT) #define metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ metamacro_for_cxt11(MACRO, SEP, CONTEXT) \ SEP \ MACRO(11, CONTEXT) #define metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ metamacro_for_cxt12(MACRO, SEP, CONTEXT) \ SEP \ MACRO(12, CONTEXT) #define metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ metamacro_for_cxt13(MACRO, SEP, CONTEXT) \ SEP \ MACRO(13, CONTEXT) #define metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ metamacro_for_cxt14(MACRO, SEP, CONTEXT) \ SEP \ MACRO(14, CONTEXT) #define metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ metamacro_for_cxt15(MACRO, SEP, CONTEXT) \ SEP \ MACRO(15, CONTEXT) #define metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ metamacro_for_cxt16(MACRO, SEP, CONTEXT) \ SEP \ MACRO(16, CONTEXT) #define metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ metamacro_for_cxt17(MACRO, SEP, CONTEXT) \ SEP \ MACRO(17, CONTEXT) #define metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ metamacro_for_cxt18(MACRO, SEP, CONTEXT) \ SEP \ MACRO(18, CONTEXT) #define metamacro_for_cxt20(MACRO, SEP, CONTEXT) \ metamacro_for_cxt19(MACRO, SEP, CONTEXT) \ SEP \ MACRO(19, CONTEXT) #define metamacro_for_cxt21(MACRO, SEP, CONTEXT) \ metamacro_for_cxt20(MACRO, SEP, CONTEXT) \ SEP \ MACRO(20, CONTEXT) #define metamacro_for_cxt22(MACRO, SEP, CONTEXT) \ metamacro_for_cxt21(MACRO, SEP, CONTEXT) \ SEP \ MACRO(21, CONTEXT) #define metamacro_for_cxt23(MACRO, SEP, CONTEXT) \ metamacro_for_cxt22(MACRO, SEP, CONTEXT) \ SEP \ MACRO(22, CONTEXT) #define metamacro_for_cxt24(MACRO, SEP, CONTEXT) \ metamacro_for_cxt23(MACRO, SEP, CONTEXT) \ SEP \ MACRO(23, CONTEXT) #define metamacro_for_cxt25(MACRO, SEP, CONTEXT) \ metamacro_for_cxt24(MACRO, SEP, CONTEXT) \ SEP \ MACRO(24, CONTEXT) #define metamacro_for_cxt26(MACRO, SEP, CONTEXT) \ metamacro_for_cxt25(MACRO, SEP, CONTEXT) \ SEP \ MACRO(25, CONTEXT) #define metamacro_for_cxt27(MACRO, SEP, CONTEXT) \ metamacro_for_cxt26(MACRO, SEP, CONTEXT) \ SEP \ MACRO(26, CONTEXT) #define metamacro_for_cxt28(MACRO, SEP, CONTEXT) \ metamacro_for_cxt27(MACRO, SEP, CONTEXT) \ SEP \ MACRO(27, CONTEXT) #define metamacro_for_cxt29(MACRO, SEP, CONTEXT) \ metamacro_for_cxt28(MACRO, SEP, CONTEXT) \ SEP \ MACRO(28, CONTEXT) #define metamacro_for_cxt30(MACRO, SEP, CONTEXT) \ metamacro_for_cxt29(MACRO, SEP, CONTEXT) \ SEP \ MACRO(29, CONTEXT) #define metamacro_for_cxt31(MACRO, SEP, CONTEXT) \ metamacro_for_cxt30(MACRO, SEP, CONTEXT) \ SEP \ MACRO(30, CONTEXT) #define metamacro_for_cxt32(MACRO, SEP, CONTEXT) \ metamacro_for_cxt31(MACRO, SEP, CONTEXT) \ SEP \ MACRO(31, CONTEXT) #define metamacro_for_cxt33(MACRO, SEP, CONTEXT) \ metamacro_for_cxt32(MACRO, SEP, CONTEXT) \ SEP \ MACRO(32, CONTEXT) #define metamacro_for_cxt34(MACRO, SEP, CONTEXT) \ metamacro_for_cxt33(MACRO, SEP, CONTEXT) \ SEP \ MACRO(33, CONTEXT) #define metamacro_for_cxt35(MACRO, SEP, CONTEXT) \ metamacro_for_cxt34(MACRO, SEP, CONTEXT) \ SEP \ MACRO(34, CONTEXT) #define metamacro_for_cxt36(MACRO, SEP, CONTEXT) \ metamacro_for_cxt35(MACRO, SEP, CONTEXT) \ SEP \ MACRO(35, CONTEXT) #define metamacro_for_cxt37(MACRO, SEP, CONTEXT) \ metamacro_for_cxt36(MACRO, SEP, CONTEXT) \ SEP \ MACRO(36, CONTEXT) #define metamacro_for_cxt38(MACRO, SEP, CONTEXT) \ metamacro_for_cxt37(MACRO, SEP, CONTEXT) \ SEP \ MACRO(37, CONTEXT) #define metamacro_for_cxt39(MACRO, SEP, CONTEXT) \ metamacro_for_cxt38(MACRO, SEP, CONTEXT) \ SEP \ MACRO(38, CONTEXT) #define metamacro_for_cxt40(MACRO, SEP, CONTEXT) \ metamacro_for_cxt39(MACRO, SEP, CONTEXT) \ SEP \ MACRO(39, CONTEXT) #define metamacro_for_cxt41(MACRO, SEP, CONTEXT) \ metamacro_for_cxt40(MACRO, SEP, CONTEXT) \ SEP \ MACRO(40, CONTEXT) #define metamacro_for_cxt42(MACRO, SEP, CONTEXT) \ metamacro_for_cxt41(MACRO, SEP, CONTEXT) \ SEP \ MACRO(41, CONTEXT) #define metamacro_for_cxt43(MACRO, SEP, CONTEXT) \ metamacro_for_cxt42(MACRO, SEP, CONTEXT) \ SEP \ MACRO(42, CONTEXT) #define metamacro_for_cxt44(MACRO, SEP, CONTEXT) \ metamacro_for_cxt43(MACRO, SEP, CONTEXT) \ SEP \ MACRO(43, CONTEXT) #define metamacro_for_cxt45(MACRO, SEP, CONTEXT) \ metamacro_for_cxt44(MACRO, SEP, CONTEXT) \ SEP \ MACRO(44, CONTEXT) #define metamacro_for_cxt46(MACRO, SEP, CONTEXT) \ metamacro_for_cxt45(MACRO, SEP, CONTEXT) \ SEP \ MACRO(45, CONTEXT) #define metamacro_for_cxt47(MACRO, SEP, CONTEXT) \ metamacro_for_cxt46(MACRO, SEP, CONTEXT) \ SEP \ MACRO(46, CONTEXT) #define metamacro_for_cxt48(MACRO, SEP, CONTEXT) \ metamacro_for_cxt47(MACRO, SEP, CONTEXT) \ SEP \ MACRO(47, CONTEXT) #define metamacro_for_cxt49(MACRO, SEP, CONTEXT) \ metamacro_for_cxt48(MACRO, SEP, CONTEXT) \ SEP \ MACRO(48, CONTEXT) #define metamacro_for_cxt50(MACRO, SEP, CONTEXT) \ metamacro_for_cxt49(MACRO, SEP, CONTEXT) \ SEP \ MACRO(49, CONTEXT) #define metamacro_for_cxt51(MACRO, SEP, CONTEXT) \ metamacro_for_cxt50(MACRO, SEP, CONTEXT) \ SEP \ MACRO(50, CONTEXT) #define metamacro_for_cxt52(MACRO, SEP, CONTEXT) \ metamacro_for_cxt51(MACRO, SEP, CONTEXT) \ SEP \ MACRO(51, CONTEXT) #define metamacro_for_cxt53(MACRO, SEP, CONTEXT) \ metamacro_for_cxt52(MACRO, SEP, CONTEXT) \ SEP \ MACRO(52, CONTEXT) #define metamacro_for_cxt54(MACRO, SEP, CONTEXT) \ metamacro_for_cxt53(MACRO, SEP, CONTEXT) \ SEP \ MACRO(53, CONTEXT) #define metamacro_for_cxt55(MACRO, SEP, CONTEXT) \ metamacro_for_cxt54(MACRO, SEP, CONTEXT) \ SEP \ MACRO(54, CONTEXT) #define metamacro_for_cxt56(MACRO, SEP, CONTEXT) \ metamacro_for_cxt55(MACRO, SEP, CONTEXT) \ SEP \ MACRO(55, CONTEXT) #define metamacro_for_cxt57(MACRO, SEP, CONTEXT) \ metamacro_for_cxt56(MACRO, SEP, CONTEXT) \ SEP \ MACRO(56, CONTEXT) #define metamacro_for_cxt58(MACRO, SEP, CONTEXT) \ metamacro_for_cxt57(MACRO, SEP, CONTEXT) \ SEP \ MACRO(57, CONTEXT) #define metamacro_for_cxt59(MACRO, SEP, CONTEXT) \ metamacro_for_cxt58(MACRO, SEP, CONTEXT) \ SEP \ MACRO(58, CONTEXT) #define metamacro_for_cxt60(MACRO, SEP, CONTEXT) \ metamacro_for_cxt59(MACRO, SEP, CONTEXT) \ SEP \ MACRO(59, CONTEXT) #define metamacro_for_cxt61(MACRO, SEP, CONTEXT) \ metamacro_for_cxt60(MACRO, SEP, CONTEXT) \ SEP \ MACRO(60, CONTEXT) #define metamacro_for_cxt62(MACRO, SEP, CONTEXT) \ metamacro_for_cxt61(MACRO, SEP, CONTEXT) \ SEP \ MACRO(61, CONTEXT) #define metamacro_for_cxt63(MACRO, SEP, CONTEXT) \ metamacro_for_cxt62(MACRO, SEP, CONTEXT) \ SEP \ MACRO(62, CONTEXT) #define metamacro_for_cxt64(MACRO, SEP, CONTEXT) \ metamacro_for_cxt63(MACRO, SEP, CONTEXT) \ SEP \ MACRO(63, CONTEXT) #define metamacro_for_cxt65(MACRO, SEP, CONTEXT) \ metamacro_for_cxt64(MACRO, SEP, CONTEXT) \ SEP \ MACRO(64, CONTEXT) #define metamacro_for_cxt66(MACRO, SEP, CONTEXT) \ metamacro_for_cxt65(MACRO, SEP, CONTEXT) \ SEP \ MACRO(65, CONTEXT) #define metamacro_for_cxt67(MACRO, SEP, CONTEXT) \ metamacro_for_cxt66(MACRO, SEP, CONTEXT) \ SEP \ MACRO(66, CONTEXT) #define metamacro_for_cxt68(MACRO, SEP, CONTEXT) \ metamacro_for_cxt67(MACRO, SEP, CONTEXT) \ SEP \ MACRO(67, CONTEXT) #define metamacro_for_cxt69(MACRO, SEP, CONTEXT) \ metamacro_for_cxt68(MACRO, SEP, CONTEXT) \ SEP \ MACRO(68, CONTEXT) #define metamacro_for_cxt70(MACRO, SEP, CONTEXT) \ metamacro_for_cxt69(MACRO, SEP, CONTEXT) \ SEP \ MACRO(69, CONTEXT) #define metamacro_for_cxt71(MACRO, SEP, CONTEXT) \ metamacro_for_cxt70(MACRO, SEP, CONTEXT) \ SEP \ MACRO(70, CONTEXT) #define metamacro_for_cxt72(MACRO, SEP, CONTEXT) \ metamacro_for_cxt71(MACRO, SEP, CONTEXT) \ SEP \ MACRO(71, CONTEXT) #define metamacro_for_cxt73(MACRO, SEP, CONTEXT) \ metamacro_for_cxt72(MACRO, SEP, CONTEXT) \ SEP \ MACRO(72, CONTEXT) #define metamacro_for_cxt74(MACRO, SEP, CONTEXT) \ metamacro_for_cxt73(MACRO, SEP, CONTEXT) \ SEP \ MACRO(73, CONTEXT) #define metamacro_for_cxt75(MACRO, SEP, CONTEXT) \ metamacro_for_cxt74(MACRO, SEP, CONTEXT) \ SEP \ MACRO(74, CONTEXT) #define metamacro_for_cxt76(MACRO, SEP, CONTEXT) \ metamacro_for_cxt75(MACRO, SEP, CONTEXT) \ SEP \ MACRO(75, CONTEXT) #define metamacro_for_cxt77(MACRO, SEP, CONTEXT) \ metamacro_for_cxt76(MACRO, SEP, CONTEXT) \ SEP \ MACRO(76, CONTEXT) #define metamacro_for_cxt78(MACRO, SEP, CONTEXT) \ metamacro_for_cxt77(MACRO, SEP, CONTEXT) \ SEP \ MACRO(77, CONTEXT) #define metamacro_for_cxt79(MACRO, SEP, CONTEXT) \ metamacro_for_cxt78(MACRO, SEP, CONTEXT) \ SEP \ MACRO(78, CONTEXT) #define metamacro_for_cxt80(MACRO, SEP, CONTEXT) \ metamacro_for_cxt79(MACRO, SEP, CONTEXT) \ SEP \ MACRO(79, CONTEXT) #define metamacro_for_cxt81(MACRO, SEP, CONTEXT) \ metamacro_for_cxt80(MACRO, SEP, CONTEXT) \ SEP \ MACRO(80, CONTEXT) #define metamacro_for_cxt82(MACRO, SEP, CONTEXT) \ metamacro_for_cxt81(MACRO, SEP, CONTEXT) \ SEP \ MACRO(81, CONTEXT) #define metamacro_for_cxt83(MACRO, SEP, CONTEXT) \ metamacro_for_cxt82(MACRO, SEP, CONTEXT) \ SEP \ MACRO(82, CONTEXT) #define metamacro_for_cxt84(MACRO, SEP, CONTEXT) \ metamacro_for_cxt83(MACRO, SEP, CONTEXT) \ SEP \ MACRO(83, CONTEXT) #define metamacro_for_cxt85(MACRO, SEP, CONTEXT) \ metamacro_for_cxt84(MACRO, SEP, CONTEXT) \ SEP \ MACRO(84, CONTEXT) #define metamacro_for_cxt86(MACRO, SEP, CONTEXT) \ metamacro_for_cxt85(MACRO, SEP, CONTEXT) \ SEP \ MACRO(85, CONTEXT) #define metamacro_for_cxt87(MACRO, SEP, CONTEXT) \ metamacro_for_cxt86(MACRO, SEP, CONTEXT) \ SEP \ MACRO(86, CONTEXT) #define metamacro_for_cxt88(MACRO, SEP, CONTEXT) \ metamacro_for_cxt87(MACRO, SEP, CONTEXT) \ SEP \ MACRO(87, CONTEXT) #define metamacro_for_cxt89(MACRO, SEP, CONTEXT) \ metamacro_for_cxt88(MACRO, SEP, CONTEXT) \ SEP \ MACRO(88, CONTEXT) #define metamacro_for_cxt90(MACRO, SEP, CONTEXT) \ metamacro_for_cxt89(MACRO, SEP, CONTEXT) \ SEP \ MACRO(89, CONTEXT) #define metamacro_for_cxt91(MACRO, SEP, CONTEXT) \ metamacro_for_cxt90(MACRO, SEP, CONTEXT) \ SEP \ MACRO(90, CONTEXT) #define metamacro_for_cxt92(MACRO, SEP, CONTEXT) \ metamacro_for_cxt91(MACRO, SEP, CONTEXT) \ SEP \ MACRO(91, CONTEXT) #define metamacro_for_cxt93(MACRO, SEP, CONTEXT) \ metamacro_for_cxt92(MACRO, SEP, CONTEXT) \ SEP \ MACRO(92, CONTEXT) #define metamacro_for_cxt94(MACRO, SEP, CONTEXT) \ metamacro_for_cxt93(MACRO, SEP, CONTEXT) \ SEP \ MACRO(93, CONTEXT) #define metamacro_for_cxt95(MACRO, SEP, CONTEXT) \ metamacro_for_cxt94(MACRO, SEP, CONTEXT) \ SEP \ MACRO(94, CONTEXT) #define metamacro_for_cxt96(MACRO, SEP, CONTEXT) \ metamacro_for_cxt95(MACRO, SEP, CONTEXT) \ SEP \ MACRO(95, CONTEXT) #define metamacro_for_cxt97(MACRO, SEP, CONTEXT) \ metamacro_for_cxt96(MACRO, SEP, CONTEXT) \ SEP \ MACRO(96, CONTEXT) #define metamacro_for_cxt98(MACRO, SEP, CONTEXT) \ metamacro_for_cxt97(MACRO, SEP, CONTEXT) \ SEP \ MACRO(97, CONTEXT) #define metamacro_for_cxt99(MACRO, SEP, CONTEXT) \ metamacro_for_cxt98(MACRO, SEP, CONTEXT) \ SEP \ MACRO(98, CONTEXT) #define metamacro_for_cxt100(MACRO, SEP, CONTEXT) \ metamacro_for_cxt99(MACRO, SEP, CONTEXT) \ SEP \ MACRO(99, CONTEXT) #define metamacro_for_cxt101(MACRO, SEP, CONTEXT) \ metamacro_for_cxt100(MACRO, SEP, CONTEXT) \ SEP \ MACRO(100, CONTEXT) #define metamacro_for_cxt102(MACRO, SEP, CONTEXT) \ metamacro_for_cxt101(MACRO, SEP, CONTEXT) \ SEP \ MACRO(101, CONTEXT) #define metamacro_for_cxt103(MACRO, SEP, CONTEXT) \ metamacro_for_cxt102(MACRO, SEP, CONTEXT) \ SEP \ MACRO(102, CONTEXT) #define metamacro_for_cxt104(MACRO, SEP, CONTEXT) \ metamacro_for_cxt103(MACRO, SEP, CONTEXT) \ SEP \ MACRO(103, CONTEXT) #define metamacro_for_cxt105(MACRO, SEP, CONTEXT) \ metamacro_for_cxt104(MACRO, SEP, CONTEXT) \ SEP \ MACRO(104, CONTEXT) #define metamacro_for_cxt106(MACRO, SEP, CONTEXT) \ metamacro_for_cxt105(MACRO, SEP, CONTEXT) \ SEP \ MACRO(105, CONTEXT) #define metamacro_for_cxt107(MACRO, SEP, CONTEXT) \ metamacro_for_cxt106(MACRO, SEP, CONTEXT) \ SEP \ MACRO(106, CONTEXT) #define metamacro_for_cxt108(MACRO, SEP, CONTEXT) \ metamacro_for_cxt107(MACRO, SEP, CONTEXT) \ SEP \ MACRO(107, CONTEXT) #define metamacro_for_cxt109(MACRO, SEP, CONTEXT) \ metamacro_for_cxt108(MACRO, SEP, CONTEXT) \ SEP \ MACRO(108, CONTEXT) #define metamacro_for_cxt110(MACRO, SEP, CONTEXT) \ metamacro_for_cxt109(MACRO, SEP, CONTEXT) \ SEP \ MACRO(109, CONTEXT) #define metamacro_for_cxt111(MACRO, SEP, CONTEXT) \ metamacro_for_cxt110(MACRO, SEP, CONTEXT) \ SEP \ MACRO(110, CONTEXT) #define metamacro_for_cxt112(MACRO, SEP, CONTEXT) \ metamacro_for_cxt111(MACRO, SEP, CONTEXT) \ SEP \ MACRO(111, CONTEXT) #define metamacro_for_cxt113(MACRO, SEP, CONTEXT) \ metamacro_for_cxt112(MACRO, SEP, CONTEXT) \ SEP \ MACRO(112, CONTEXT) #define metamacro_for_cxt114(MACRO, SEP, CONTEXT) \ metamacro_for_cxt113(MACRO, SEP, CONTEXT) \ SEP \ MACRO(113, CONTEXT) #define metamacro_for_cxt115(MACRO, SEP, CONTEXT) \ metamacro_for_cxt114(MACRO, SEP, CONTEXT) \ SEP \ MACRO(114, CONTEXT) #define metamacro_for_cxt116(MACRO, SEP, CONTEXT) \ metamacro_for_cxt115(MACRO, SEP, CONTEXT) \ SEP \ MACRO(115, CONTEXT) #define metamacro_for_cxt117(MACRO, SEP, CONTEXT) \ metamacro_for_cxt116(MACRO, SEP, CONTEXT) \ SEP \ MACRO(116, CONTEXT) #define metamacro_for_cxt118(MACRO, SEP, CONTEXT) \ metamacro_for_cxt117(MACRO, SEP, CONTEXT) \ SEP \ MACRO(117, CONTEXT) #define metamacro_for_cxt119(MACRO, SEP, CONTEXT) \ metamacro_for_cxt118(MACRO, SEP, CONTEXT) \ SEP \ MACRO(118, CONTEXT) #define metamacro_for_cxt120(MACRO, SEP, CONTEXT) \ metamacro_for_cxt119(MACRO, SEP, CONTEXT) \ SEP \ MACRO(119, CONTEXT) #define metamacro_for_cxt121(MACRO, SEP, CONTEXT) \ metamacro_for_cxt120(MACRO, SEP, CONTEXT) \ SEP \ MACRO(120, CONTEXT) #define metamacro_for_cxt122(MACRO, SEP, CONTEXT) \ metamacro_for_cxt121(MACRO, SEP, CONTEXT) \ SEP \ MACRO(121, CONTEXT) #define metamacro_for_cxt123(MACRO, SEP, CONTEXT) \ metamacro_for_cxt122(MACRO, SEP, CONTEXT) \ SEP \ MACRO(122, CONTEXT) #define metamacro_for_cxt124(MACRO, SEP, CONTEXT) \ metamacro_for_cxt123(MACRO, SEP, CONTEXT) \ SEP \ MACRO(123, CONTEXT) #define metamacro_for_cxt125(MACRO, SEP, CONTEXT) \ metamacro_for_cxt124(MACRO, SEP, CONTEXT) \ SEP \ MACRO(124, CONTEXT) #define metamacro_for_cxt126(MACRO, SEP, CONTEXT) \ metamacro_for_cxt125(MACRO, SEP, CONTEXT) \ SEP \ MACRO(125, CONTEXT) #define metamacro_for_cxt127(MACRO, SEP, CONTEXT) \ metamacro_for_cxt126(MACRO, SEP, CONTEXT) \ SEP \ MACRO(126, CONTEXT) #define metamacro_for_cxt128(MACRO, SEP, CONTEXT) \ metamacro_for_cxt127(MACRO, SEP, CONTEXT) \ SEP \ MACRO(127, CONTEXT) #define metamacro_for_cxt129(MACRO, SEP, CONTEXT) \ metamacro_for_cxt128(MACRO, SEP, CONTEXT) \ SEP \ MACRO(128, CONTEXT) #define metamacro_for_cxt130(MACRO, SEP, CONTEXT) \ metamacro_for_cxt129(MACRO, SEP, CONTEXT) \ SEP \ MACRO(129, CONTEXT) #define metamacro_for_cxt131(MACRO, SEP, CONTEXT) \ metamacro_for_cxt130(MACRO, SEP, CONTEXT) \ SEP \ MACRO(130, CONTEXT) #define metamacro_for_cxt132(MACRO, SEP, CONTEXT) \ metamacro_for_cxt131(MACRO, SEP, CONTEXT) \ SEP \ MACRO(131, CONTEXT) #define metamacro_for_cxt133(MACRO, SEP, CONTEXT) \ metamacro_for_cxt132(MACRO, SEP, CONTEXT) \ SEP \ MACRO(132, CONTEXT) #define metamacro_for_cxt134(MACRO, SEP, CONTEXT) \ metamacro_for_cxt133(MACRO, SEP, CONTEXT) \ SEP \ MACRO(133, CONTEXT) #define metamacro_for_cxt135(MACRO, SEP, CONTEXT) \ metamacro_for_cxt134(MACRO, SEP, CONTEXT) \ SEP \ MACRO(134, CONTEXT) #define metamacro_for_cxt136(MACRO, SEP, CONTEXT) \ metamacro_for_cxt135(MACRO, SEP, CONTEXT) \ SEP \ MACRO(135, CONTEXT) #define metamacro_for_cxt137(MACRO, SEP, CONTEXT) \ metamacro_for_cxt136(MACRO, SEP, CONTEXT) \ SEP \ MACRO(136, CONTEXT) #define metamacro_for_cxt138(MACRO, SEP, CONTEXT) \ metamacro_for_cxt137(MACRO, SEP, CONTEXT) \ SEP \ MACRO(137, CONTEXT) #define metamacro_for_cxt139(MACRO, SEP, CONTEXT) \ metamacro_for_cxt138(MACRO, SEP, CONTEXT) \ SEP \ MACRO(138, CONTEXT) #define metamacro_for_cxt140(MACRO, SEP, CONTEXT) \ metamacro_for_cxt139(MACRO, SEP, CONTEXT) \ SEP \ MACRO(139, CONTEXT) #define metamacro_for_cxt141(MACRO, SEP, CONTEXT) \ metamacro_for_cxt140(MACRO, SEP, CONTEXT) \ SEP \ MACRO(140, CONTEXT) #define metamacro_for_cxt142(MACRO, SEP, CONTEXT) \ metamacro_for_cxt141(MACRO, SEP, CONTEXT) \ SEP \ MACRO(141, CONTEXT) #define metamacro_for_cxt143(MACRO, SEP, CONTEXT) \ metamacro_for_cxt142(MACRO, SEP, CONTEXT) \ SEP \ MACRO(142, CONTEXT) #define metamacro_for_cxt144(MACRO, SEP, CONTEXT) \ metamacro_for_cxt143(MACRO, SEP, CONTEXT) \ SEP \ MACRO(143, CONTEXT) #define metamacro_for_cxt145(MACRO, SEP, CONTEXT) \ metamacro_for_cxt144(MACRO, SEP, CONTEXT) \ SEP \ MACRO(144, CONTEXT) #define metamacro_for_cxt146(MACRO, SEP, CONTEXT) \ metamacro_for_cxt145(MACRO, SEP, CONTEXT) \ SEP \ MACRO(145, CONTEXT) #define metamacro_for_cxt147(MACRO, SEP, CONTEXT) \ metamacro_for_cxt146(MACRO, SEP, CONTEXT) \ SEP \ MACRO(146, CONTEXT) #define metamacro_for_cxt148(MACRO, SEP, CONTEXT) \ metamacro_for_cxt147(MACRO, SEP, CONTEXT) \ SEP \ MACRO(147, CONTEXT) #define metamacro_for_cxt149(MACRO, SEP, CONTEXT) \ metamacro_for_cxt148(MACRO, SEP, CONTEXT) \ SEP \ MACRO(148, CONTEXT) #define metamacro_for_cxt150(MACRO, SEP, CONTEXT) \ metamacro_for_cxt149(MACRO, SEP, CONTEXT) \ SEP \ MACRO(149, CONTEXT) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // metamacro_if_eq expansions #define metamacro_if_eq0(VALUE) \ metamacro_concat(metamacro_if_eq0_, VALUE) #define metamacro_if_eq0_0(...) __VA_ARGS__ metamacro_consume_ #define metamacro_if_eq0_1(...) metamacro_expand_ #define metamacro_if_eq0_2(...) metamacro_expand_ #define metamacro_if_eq0_3(...) metamacro_expand_ #define metamacro_if_eq0_4(...) metamacro_expand_ #define metamacro_if_eq0_5(...) metamacro_expand_ #define metamacro_if_eq0_6(...) metamacro_expand_ #define metamacro_if_eq0_7(...) metamacro_expand_ #define metamacro_if_eq0_8(...) metamacro_expand_ #define metamacro_if_eq0_9(...) metamacro_expand_ #define metamacro_if_eq0_10(...) metamacro_expand_ #define metamacro_if_eq0_11(...) metamacro_expand_ #define metamacro_if_eq0_12(...) metamacro_expand_ #define metamacro_if_eq0_13(...) metamacro_expand_ #define metamacro_if_eq0_14(...) metamacro_expand_ #define metamacro_if_eq0_15(...) metamacro_expand_ #define metamacro_if_eq0_16(...) metamacro_expand_ #define metamacro_if_eq0_17(...) metamacro_expand_ #define metamacro_if_eq0_18(...) metamacro_expand_ #define metamacro_if_eq0_19(...) metamacro_expand_ #define metamacro_if_eq0_20(...) metamacro_expand_ #define metamacro_if_eq0_21(...) metamacro_expand_ #define metamacro_if_eq0_22(...) metamacro_expand_ #define metamacro_if_eq0_23(...) metamacro_expand_ #define metamacro_if_eq0_24(...) metamacro_expand_ #define metamacro_if_eq0_25(...) metamacro_expand_ #define metamacro_if_eq0_26(...) metamacro_expand_ #define metamacro_if_eq0_27(...) metamacro_expand_ #define metamacro_if_eq0_28(...) metamacro_expand_ #define metamacro_if_eq0_29(...) metamacro_expand_ #define metamacro_if_eq0_30(...) metamacro_expand_ #define metamacro_if_eq0_31(...) metamacro_expand_ #define metamacro_if_eq0_32(...) metamacro_expand_ #define metamacro_if_eq0_33(...) metamacro_expand_ #define metamacro_if_eq0_34(...) metamacro_expand_ #define metamacro_if_eq0_35(...) metamacro_expand_ #define metamacro_if_eq0_36(...) metamacro_expand_ #define metamacro_if_eq0_37(...) metamacro_expand_ #define metamacro_if_eq0_38(...) metamacro_expand_ #define metamacro_if_eq0_39(...) metamacro_expand_ #define metamacro_if_eq0_40(...) metamacro_expand_ #define metamacro_if_eq0_41(...) metamacro_expand_ #define metamacro_if_eq0_42(...) metamacro_expand_ #define metamacro_if_eq0_43(...) metamacro_expand_ #define metamacro_if_eq0_44(...) metamacro_expand_ #define metamacro_if_eq0_45(...) metamacro_expand_ #define metamacro_if_eq0_46(...) metamacro_expand_ #define metamacro_if_eq0_47(...) metamacro_expand_ #define metamacro_if_eq0_48(...) metamacro_expand_ #define metamacro_if_eq0_49(...) metamacro_expand_ #define metamacro_if_eq0_50(...) metamacro_expand_ #define metamacro_if_eq0_51(...) metamacro_expand_ #define metamacro_if_eq0_52(...) metamacro_expand_ #define metamacro_if_eq0_53(...) metamacro_expand_ #define metamacro_if_eq0_54(...) metamacro_expand_ #define metamacro_if_eq0_55(...) metamacro_expand_ #define metamacro_if_eq0_56(...) metamacro_expand_ #define metamacro_if_eq0_57(...) metamacro_expand_ #define metamacro_if_eq0_58(...) metamacro_expand_ #define metamacro_if_eq0_59(...) metamacro_expand_ #define metamacro_if_eq0_60(...) metamacro_expand_ #define metamacro_if_eq0_61(...) metamacro_expand_ #define metamacro_if_eq0_62(...) metamacro_expand_ #define metamacro_if_eq0_63(...) metamacro_expand_ #define metamacro_if_eq0_64(...) metamacro_expand_ #define metamacro_if_eq0_65(...) metamacro_expand_ #define metamacro_if_eq0_66(...) metamacro_expand_ #define metamacro_if_eq0_67(...) metamacro_expand_ #define metamacro_if_eq0_68(...) metamacro_expand_ #define metamacro_if_eq0_69(...) metamacro_expand_ #define metamacro_if_eq0_70(...) metamacro_expand_ #define metamacro_if_eq0_71(...) metamacro_expand_ #define metamacro_if_eq0_72(...) metamacro_expand_ #define metamacro_if_eq0_73(...) metamacro_expand_ #define metamacro_if_eq0_74(...) metamacro_expand_ #define metamacro_if_eq0_75(...) metamacro_expand_ #define metamacro_if_eq0_76(...) metamacro_expand_ #define metamacro_if_eq0_77(...) metamacro_expand_ #define metamacro_if_eq0_78(...) metamacro_expand_ #define metamacro_if_eq0_79(...) metamacro_expand_ #define metamacro_if_eq0_80(...) metamacro_expand_ #define metamacro_if_eq0_81(...) metamacro_expand_ #define metamacro_if_eq0_82(...) metamacro_expand_ #define metamacro_if_eq0_83(...) metamacro_expand_ #define metamacro_if_eq0_84(...) metamacro_expand_ #define metamacro_if_eq0_85(...) metamacro_expand_ #define metamacro_if_eq0_86(...) metamacro_expand_ #define metamacro_if_eq0_87(...) metamacro_expand_ #define metamacro_if_eq0_88(...) metamacro_expand_ #define metamacro_if_eq0_89(...) metamacro_expand_ #define metamacro_if_eq0_90(...) metamacro_expand_ #define metamacro_if_eq0_91(...) metamacro_expand_ #define metamacro_if_eq0_92(...) metamacro_expand_ #define metamacro_if_eq0_93(...) metamacro_expand_ #define metamacro_if_eq0_94(...) metamacro_expand_ #define metamacro_if_eq0_95(...) metamacro_expand_ #define metamacro_if_eq0_96(...) metamacro_expand_ #define metamacro_if_eq0_97(...) metamacro_expand_ #define metamacro_if_eq0_98(...) metamacro_expand_ #define metamacro_if_eq0_99(...) metamacro_expand_ #define metamacro_if_eq0_100(...) metamacro_expand_ #define metamacro_if_eq0_101(...) metamacro_expand_ #define metamacro_if_eq0_102(...) metamacro_expand_ #define metamacro_if_eq0_103(...) metamacro_expand_ #define metamacro_if_eq0_104(...) metamacro_expand_ #define metamacro_if_eq0_105(...) metamacro_expand_ #define metamacro_if_eq0_106(...) metamacro_expand_ #define metamacro_if_eq0_107(...) metamacro_expand_ #define metamacro_if_eq0_108(...) metamacro_expand_ #define metamacro_if_eq0_109(...) metamacro_expand_ #define metamacro_if_eq0_110(...) metamacro_expand_ #define metamacro_if_eq0_111(...) metamacro_expand_ #define metamacro_if_eq0_112(...) metamacro_expand_ #define metamacro_if_eq0_113(...) metamacro_expand_ #define metamacro_if_eq0_114(...) metamacro_expand_ #define metamacro_if_eq0_115(...) metamacro_expand_ #define metamacro_if_eq0_116(...) metamacro_expand_ #define metamacro_if_eq0_117(...) metamacro_expand_ #define metamacro_if_eq0_118(...) metamacro_expand_ #define metamacro_if_eq0_119(...) metamacro_expand_ #define metamacro_if_eq0_120(...) metamacro_expand_ #define metamacro_if_eq0_121(...) metamacro_expand_ #define metamacro_if_eq0_122(...) metamacro_expand_ #define metamacro_if_eq0_123(...) metamacro_expand_ #define metamacro_if_eq0_124(...) metamacro_expand_ #define metamacro_if_eq0_125(...) metamacro_expand_ #define metamacro_if_eq0_126(...) metamacro_expand_ #define metamacro_if_eq0_127(...) metamacro_expand_ #define metamacro_if_eq0_128(...) metamacro_expand_ #define metamacro_if_eq0_129(...) metamacro_expand_ #define metamacro_if_eq0_130(...) metamacro_expand_ #define metamacro_if_eq0_131(...) metamacro_expand_ #define metamacro_if_eq0_132(...) metamacro_expand_ #define metamacro_if_eq0_133(...) metamacro_expand_ #define metamacro_if_eq0_134(...) metamacro_expand_ #define metamacro_if_eq0_135(...) metamacro_expand_ #define metamacro_if_eq0_136(...) metamacro_expand_ #define metamacro_if_eq0_137(...) metamacro_expand_ #define metamacro_if_eq0_138(...) metamacro_expand_ #define metamacro_if_eq0_139(...) metamacro_expand_ #define metamacro_if_eq0_140(...) metamacro_expand_ #define metamacro_if_eq0_141(...) metamacro_expand_ #define metamacro_if_eq0_142(...) metamacro_expand_ #define metamacro_if_eq0_143(...) metamacro_expand_ #define metamacro_if_eq0_144(...) metamacro_expand_ #define metamacro_if_eq0_145(...) metamacro_expand_ #define metamacro_if_eq0_146(...) metamacro_expand_ #define metamacro_if_eq0_147(...) metamacro_expand_ #define metamacro_if_eq0_148(...) metamacro_expand_ #define metamacro_if_eq0_149(...) metamacro_expand_ #define metamacro_if_eq0_150(...) metamacro_expand_ #define metamacro_if_eq1(VALUE) metamacro_if_eq0(metamacro_dec(VALUE)) #define metamacro_if_eq2(VALUE) metamacro_if_eq1(metamacro_dec(VALUE)) #define metamacro_if_eq3(VALUE) metamacro_if_eq2(metamacro_dec(VALUE)) #define metamacro_if_eq4(VALUE) metamacro_if_eq3(metamacro_dec(VALUE)) #define metamacro_if_eq5(VALUE) metamacro_if_eq4(metamacro_dec(VALUE)) #define metamacro_if_eq6(VALUE) metamacro_if_eq5(metamacro_dec(VALUE)) #define metamacro_if_eq7(VALUE) metamacro_if_eq6(metamacro_dec(VALUE)) #define metamacro_if_eq8(VALUE) metamacro_if_eq7(metamacro_dec(VALUE)) #define metamacro_if_eq9(VALUE) metamacro_if_eq8(metamacro_dec(VALUE)) #define metamacro_if_eq10(VALUE) metamacro_if_eq9(metamacro_dec(VALUE)) #define metamacro_if_eq11(VALUE) metamacro_if_eq10(metamacro_dec(VALUE)) #define metamacro_if_eq12(VALUE) metamacro_if_eq11(metamacro_dec(VALUE)) #define metamacro_if_eq13(VALUE) metamacro_if_eq12(metamacro_dec(VALUE)) #define metamacro_if_eq14(VALUE) metamacro_if_eq13(metamacro_dec(VALUE)) #define metamacro_if_eq15(VALUE) metamacro_if_eq14(metamacro_dec(VALUE)) #define metamacro_if_eq16(VALUE) metamacro_if_eq15(metamacro_dec(VALUE)) #define metamacro_if_eq17(VALUE) metamacro_if_eq16(metamacro_dec(VALUE)) #define metamacro_if_eq18(VALUE) metamacro_if_eq17(metamacro_dec(VALUE)) #define metamacro_if_eq19(VALUE) metamacro_if_eq18(metamacro_dec(VALUE)) #define metamacro_if_eq20(VALUE) metamacro_if_eq19(metamacro_dec(VALUE)) #define metamacro_if_eq21(VALUE) metamacro_if_eq20(metamacro_dec(VALUE)) #define metamacro_if_eq22(VALUE) metamacro_if_eq21(metamacro_dec(VALUE)) #define metamacro_if_eq23(VALUE) metamacro_if_eq22(metamacro_dec(VALUE)) #define metamacro_if_eq24(VALUE) metamacro_if_eq23(metamacro_dec(VALUE)) #define metamacro_if_eq25(VALUE) metamacro_if_eq24(metamacro_dec(VALUE)) #define metamacro_if_eq26(VALUE) metamacro_if_eq25(metamacro_dec(VALUE)) #define metamacro_if_eq27(VALUE) metamacro_if_eq26(metamacro_dec(VALUE)) #define metamacro_if_eq28(VALUE) metamacro_if_eq27(metamacro_dec(VALUE)) #define metamacro_if_eq29(VALUE) metamacro_if_eq28(metamacro_dec(VALUE)) #define metamacro_if_eq30(VALUE) metamacro_if_eq29(metamacro_dec(VALUE)) #define metamacro_if_eq31(VALUE) metamacro_if_eq30(metamacro_dec(VALUE)) #define metamacro_if_eq32(VALUE) metamacro_if_eq31(metamacro_dec(VALUE)) #define metamacro_if_eq33(VALUE) metamacro_if_eq32(metamacro_dec(VALUE)) #define metamacro_if_eq34(VALUE) metamacro_if_eq33(metamacro_dec(VALUE)) #define metamacro_if_eq35(VALUE) metamacro_if_eq34(metamacro_dec(VALUE)) #define metamacro_if_eq36(VALUE) metamacro_if_eq35(metamacro_dec(VALUE)) #define metamacro_if_eq37(VALUE) metamacro_if_eq36(metamacro_dec(VALUE)) #define metamacro_if_eq38(VALUE) metamacro_if_eq37(metamacro_dec(VALUE)) #define metamacro_if_eq39(VALUE) metamacro_if_eq38(metamacro_dec(VALUE)) #define metamacro_if_eq40(VALUE) metamacro_if_eq39(metamacro_dec(VALUE)) #define metamacro_if_eq41(VALUE) metamacro_if_eq40(metamacro_dec(VALUE)) #define metamacro_if_eq42(VALUE) metamacro_if_eq41(metamacro_dec(VALUE)) #define metamacro_if_eq43(VALUE) metamacro_if_eq42(metamacro_dec(VALUE)) #define metamacro_if_eq44(VALUE) metamacro_if_eq43(metamacro_dec(VALUE)) #define metamacro_if_eq45(VALUE) metamacro_if_eq44(metamacro_dec(VALUE)) #define metamacro_if_eq46(VALUE) metamacro_if_eq45(metamacro_dec(VALUE)) #define metamacro_if_eq47(VALUE) metamacro_if_eq46(metamacro_dec(VALUE)) #define metamacro_if_eq48(VALUE) metamacro_if_eq47(metamacro_dec(VALUE)) #define metamacro_if_eq49(VALUE) metamacro_if_eq48(metamacro_dec(VALUE)) #define metamacro_if_eq50(VALUE) metamacro_if_eq49(metamacro_dec(VALUE)) #define metamacro_if_eq51(VALUE) metamacro_if_eq50(metamacro_dec(VALUE)) #define metamacro_if_eq52(VALUE) metamacro_if_eq51(metamacro_dec(VALUE)) #define metamacro_if_eq53(VALUE) metamacro_if_eq52(metamacro_dec(VALUE)) #define metamacro_if_eq54(VALUE) metamacro_if_eq53(metamacro_dec(VALUE)) #define metamacro_if_eq55(VALUE) metamacro_if_eq54(metamacro_dec(VALUE)) #define metamacro_if_eq56(VALUE) metamacro_if_eq55(metamacro_dec(VALUE)) #define metamacro_if_eq57(VALUE) metamacro_if_eq56(metamacro_dec(VALUE)) #define metamacro_if_eq58(VALUE) metamacro_if_eq57(metamacro_dec(VALUE)) #define metamacro_if_eq59(VALUE) metamacro_if_eq58(metamacro_dec(VALUE)) #define metamacro_if_eq60(VALUE) metamacro_if_eq59(metamacro_dec(VALUE)) #define metamacro_if_eq61(VALUE) metamacro_if_eq60(metamacro_dec(VALUE)) #define metamacro_if_eq62(VALUE) metamacro_if_eq61(metamacro_dec(VALUE)) #define metamacro_if_eq63(VALUE) metamacro_if_eq62(metamacro_dec(VALUE)) #define metamacro_if_eq64(VALUE) metamacro_if_eq63(metamacro_dec(VALUE)) #define metamacro_if_eq65(VALUE) metamacro_if_eq64(metamacro_dec(VALUE)) #define metamacro_if_eq66(VALUE) metamacro_if_eq65(metamacro_dec(VALUE)) #define metamacro_if_eq67(VALUE) metamacro_if_eq66(metamacro_dec(VALUE)) #define metamacro_if_eq68(VALUE) metamacro_if_eq67(metamacro_dec(VALUE)) #define metamacro_if_eq69(VALUE) metamacro_if_eq68(metamacro_dec(VALUE)) #define metamacro_if_eq70(VALUE) metamacro_if_eq69(metamacro_dec(VALUE)) #define metamacro_if_eq71(VALUE) metamacro_if_eq70(metamacro_dec(VALUE)) #define metamacro_if_eq72(VALUE) metamacro_if_eq71(metamacro_dec(VALUE)) #define metamacro_if_eq73(VALUE) metamacro_if_eq72(metamacro_dec(VALUE)) #define metamacro_if_eq74(VALUE) metamacro_if_eq73(metamacro_dec(VALUE)) #define metamacro_if_eq75(VALUE) metamacro_if_eq74(metamacro_dec(VALUE)) #define metamacro_if_eq76(VALUE) metamacro_if_eq75(metamacro_dec(VALUE)) #define metamacro_if_eq77(VALUE) metamacro_if_eq76(metamacro_dec(VALUE)) #define metamacro_if_eq78(VALUE) metamacro_if_eq77(metamacro_dec(VALUE)) #define metamacro_if_eq79(VALUE) metamacro_if_eq78(metamacro_dec(VALUE)) #define metamacro_if_eq80(VALUE) metamacro_if_eq79(metamacro_dec(VALUE)) #define metamacro_if_eq81(VALUE) metamacro_if_eq80(metamacro_dec(VALUE)) #define metamacro_if_eq82(VALUE) metamacro_if_eq81(metamacro_dec(VALUE)) #define metamacro_if_eq83(VALUE) metamacro_if_eq82(metamacro_dec(VALUE)) #define metamacro_if_eq84(VALUE) metamacro_if_eq83(metamacro_dec(VALUE)) #define metamacro_if_eq85(VALUE) metamacro_if_eq84(metamacro_dec(VALUE)) #define metamacro_if_eq86(VALUE) metamacro_if_eq85(metamacro_dec(VALUE)) #define metamacro_if_eq87(VALUE) metamacro_if_eq86(metamacro_dec(VALUE)) #define metamacro_if_eq88(VALUE) metamacro_if_eq87(metamacro_dec(VALUE)) #define metamacro_if_eq89(VALUE) metamacro_if_eq88(metamacro_dec(VALUE)) #define metamacro_if_eq90(VALUE) metamacro_if_eq89(metamacro_dec(VALUE)) #define metamacro_if_eq91(VALUE) metamacro_if_eq90(metamacro_dec(VALUE)) #define metamacro_if_eq92(VALUE) metamacro_if_eq91(metamacro_dec(VALUE)) #define metamacro_if_eq93(VALUE) metamacro_if_eq92(metamacro_dec(VALUE)) #define metamacro_if_eq94(VALUE) metamacro_if_eq93(metamacro_dec(VALUE)) #define metamacro_if_eq95(VALUE) metamacro_if_eq94(metamacro_dec(VALUE)) #define metamacro_if_eq96(VALUE) metamacro_if_eq95(metamacro_dec(VALUE)) #define metamacro_if_eq97(VALUE) metamacro_if_eq96(metamacro_dec(VALUE)) #define metamacro_if_eq98(VALUE) metamacro_if_eq97(metamacro_dec(VALUE)) #define metamacro_if_eq99(VALUE) metamacro_if_eq98(metamacro_dec(VALUE)) #define metamacro_if_eq100(VALUE) metamacro_if_eq99(metamacro_dec(VALUE)) #define metamacro_if_eq101(VALUE) metamacro_if_eq100(metamacro_dec(VALUE)) #define metamacro_if_eq102(VALUE) metamacro_if_eq101(metamacro_dec(VALUE)) #define metamacro_if_eq103(VALUE) metamacro_if_eq102(metamacro_dec(VALUE)) #define metamacro_if_eq104(VALUE) metamacro_if_eq103(metamacro_dec(VALUE)) #define metamacro_if_eq105(VALUE) metamacro_if_eq104(metamacro_dec(VALUE)) #define metamacro_if_eq106(VALUE) metamacro_if_eq105(metamacro_dec(VALUE)) #define metamacro_if_eq107(VALUE) metamacro_if_eq106(metamacro_dec(VALUE)) #define metamacro_if_eq108(VALUE) metamacro_if_eq107(metamacro_dec(VALUE)) #define metamacro_if_eq109(VALUE) metamacro_if_eq108(metamacro_dec(VALUE)) #define metamacro_if_eq110(VALUE) metamacro_if_eq109(metamacro_dec(VALUE)) #define metamacro_if_eq111(VALUE) metamacro_if_eq110(metamacro_dec(VALUE)) #define metamacro_if_eq112(VALUE) metamacro_if_eq111(metamacro_dec(VALUE)) #define metamacro_if_eq113(VALUE) metamacro_if_eq112(metamacro_dec(VALUE)) #define metamacro_if_eq114(VALUE) metamacro_if_eq113(metamacro_dec(VALUE)) #define metamacro_if_eq115(VALUE) metamacro_if_eq114(metamacro_dec(VALUE)) #define metamacro_if_eq116(VALUE) metamacro_if_eq115(metamacro_dec(VALUE)) #define metamacro_if_eq117(VALUE) metamacro_if_eq116(metamacro_dec(VALUE)) #define metamacro_if_eq118(VALUE) metamacro_if_eq117(metamacro_dec(VALUE)) #define metamacro_if_eq119(VALUE) metamacro_if_eq118(metamacro_dec(VALUE)) #define metamacro_if_eq120(VALUE) metamacro_if_eq119(metamacro_dec(VALUE)) #define metamacro_if_eq121(VALUE) metamacro_if_eq120(metamacro_dec(VALUE)) #define metamacro_if_eq122(VALUE) metamacro_if_eq121(metamacro_dec(VALUE)) #define metamacro_if_eq123(VALUE) metamacro_if_eq122(metamacro_dec(VALUE)) #define metamacro_if_eq124(VALUE) metamacro_if_eq123(metamacro_dec(VALUE)) #define metamacro_if_eq125(VALUE) metamacro_if_eq124(metamacro_dec(VALUE)) #define metamacro_if_eq126(VALUE) metamacro_if_eq125(metamacro_dec(VALUE)) #define metamacro_if_eq127(VALUE) metamacro_if_eq126(metamacro_dec(VALUE)) #define metamacro_if_eq128(VALUE) metamacro_if_eq127(metamacro_dec(VALUE)) #define metamacro_if_eq129(VALUE) metamacro_if_eq128(metamacro_dec(VALUE)) #define metamacro_if_eq130(VALUE) metamacro_if_eq129(metamacro_dec(VALUE)) #define metamacro_if_eq131(VALUE) metamacro_if_eq130(metamacro_dec(VALUE)) #define metamacro_if_eq132(VALUE) metamacro_if_eq131(metamacro_dec(VALUE)) #define metamacro_if_eq133(VALUE) metamacro_if_eq132(metamacro_dec(VALUE)) #define metamacro_if_eq134(VALUE) metamacro_if_eq133(metamacro_dec(VALUE)) #define metamacro_if_eq135(VALUE) metamacro_if_eq134(metamacro_dec(VALUE)) #define metamacro_if_eq136(VALUE) metamacro_if_eq135(metamacro_dec(VALUE)) #define metamacro_if_eq137(VALUE) metamacro_if_eq136(metamacro_dec(VALUE)) #define metamacro_if_eq138(VALUE) metamacro_if_eq137(metamacro_dec(VALUE)) #define metamacro_if_eq139(VALUE) metamacro_if_eq138(metamacro_dec(VALUE)) #define metamacro_if_eq140(VALUE) metamacro_if_eq139(metamacro_dec(VALUE)) #define metamacro_if_eq141(VALUE) metamacro_if_eq140(metamacro_dec(VALUE)) #define metamacro_if_eq142(VALUE) metamacro_if_eq141(metamacro_dec(VALUE)) #define metamacro_if_eq143(VALUE) metamacro_if_eq142(metamacro_dec(VALUE)) #define metamacro_if_eq144(VALUE) metamacro_if_eq143(metamacro_dec(VALUE)) #define metamacro_if_eq145(VALUE) metamacro_if_eq144(metamacro_dec(VALUE)) #define metamacro_if_eq146(VALUE) metamacro_if_eq145(metamacro_dec(VALUE)) #define metamacro_if_eq147(VALUE) metamacro_if_eq146(metamacro_dec(VALUE)) #define metamacro_if_eq148(VALUE) metamacro_if_eq147(metamacro_dec(VALUE)) #define metamacro_if_eq149(VALUE) metamacro_if_eq148(metamacro_dec(VALUE)) #define metamacro_if_eq150(VALUE) metamacro_if_eq149(metamacro_dec(VALUE)) /////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////// // metamacro_if_eq_recursive expansions #define metamacro_if_eq_recursive0(VALUE) \ metamacro_concat(metamacro_if_eq_recursive0_, VALUE) #define metamacro_if_eq_recursive0_0(...) __VA_ARGS__ metamacro_consume_ #define metamacro_if_eq_recursive0_1(...) metamacro_expand_ #define metamacro_if_eq_recursive0_2(...) metamacro_expand_ #define metamacro_if_eq_recursive0_3(...) metamacro_expand_ #define metamacro_if_eq_recursive0_4(...) metamacro_expand_ #define metamacro_if_eq_recursive0_5(...) metamacro_expand_ #define metamacro_if_eq_recursive0_6(...) metamacro_expand_ #define metamacro_if_eq_recursive0_7(...) metamacro_expand_ #define metamacro_if_eq_recursive0_8(...) metamacro_expand_ #define metamacro_if_eq_recursive0_9(...) metamacro_expand_ #define metamacro_if_eq_recursive0_10(...) metamacro_expand_ #define metamacro_if_eq_recursive0_11(...) metamacro_expand_ #define metamacro_if_eq_recursive0_12(...) metamacro_expand_ #define metamacro_if_eq_recursive0_13(...) metamacro_expand_ #define metamacro_if_eq_recursive0_14(...) metamacro_expand_ #define metamacro_if_eq_recursive0_15(...) metamacro_expand_ #define metamacro_if_eq_recursive0_16(...) metamacro_expand_ #define metamacro_if_eq_recursive0_17(...) metamacro_expand_ #define metamacro_if_eq_recursive0_18(...) metamacro_expand_ #define metamacro_if_eq_recursive0_19(...) metamacro_expand_ #define metamacro_if_eq_recursive0_20(...) metamacro_expand_ #define metamacro_if_eq_recursive0_21(...) metamacro_expand_ #define metamacro_if_eq_recursive0_22(...) metamacro_expand_ #define metamacro_if_eq_recursive0_23(...) metamacro_expand_ #define metamacro_if_eq_recursive0_24(...) metamacro_expand_ #define metamacro_if_eq_recursive0_25(...) metamacro_expand_ #define metamacro_if_eq_recursive0_26(...) metamacro_expand_ #define metamacro_if_eq_recursive0_27(...) metamacro_expand_ #define metamacro_if_eq_recursive0_28(...) metamacro_expand_ #define metamacro_if_eq_recursive0_29(...) metamacro_expand_ #define metamacro_if_eq_recursive0_30(...) metamacro_expand_ #define metamacro_if_eq_recursive0_31(...) metamacro_expand_ #define metamacro_if_eq_recursive0_32(...) metamacro_expand_ #define metamacro_if_eq_recursive0_33(...) metamacro_expand_ #define metamacro_if_eq_recursive0_34(...) metamacro_expand_ #define metamacro_if_eq_recursive0_35(...) metamacro_expand_ #define metamacro_if_eq_recursive0_36(...) metamacro_expand_ #define metamacro_if_eq_recursive0_37(...) metamacro_expand_ #define metamacro_if_eq_recursive0_38(...) metamacro_expand_ #define metamacro_if_eq_recursive0_39(...) metamacro_expand_ #define metamacro_if_eq_recursive0_40(...) metamacro_expand_ #define metamacro_if_eq_recursive0_41(...) metamacro_expand_ #define metamacro_if_eq_recursive0_42(...) metamacro_expand_ #define metamacro_if_eq_recursive0_43(...) metamacro_expand_ #define metamacro_if_eq_recursive0_44(...) metamacro_expand_ #define metamacro_if_eq_recursive0_45(...) metamacro_expand_ #define metamacro_if_eq_recursive0_46(...) metamacro_expand_ #define metamacro_if_eq_recursive0_47(...) metamacro_expand_ #define metamacro_if_eq_recursive0_48(...) metamacro_expand_ #define metamacro_if_eq_recursive0_49(...) metamacro_expand_ #define metamacro_if_eq_recursive0_50(...) metamacro_expand_ #define metamacro_if_eq_recursive0_51(...) metamacro_expand_ #define metamacro_if_eq_recursive0_52(...) metamacro_expand_ #define metamacro_if_eq_recursive0_53(...) metamacro_expand_ #define metamacro_if_eq_recursive0_54(...) metamacro_expand_ #define metamacro_if_eq_recursive0_55(...) metamacro_expand_ #define metamacro_if_eq_recursive0_56(...) metamacro_expand_ #define metamacro_if_eq_recursive0_57(...) metamacro_expand_ #define metamacro_if_eq_recursive0_58(...) metamacro_expand_ #define metamacro_if_eq_recursive0_59(...) metamacro_expand_ #define metamacro_if_eq_recursive0_60(...) metamacro_expand_ #define metamacro_if_eq_recursive0_61(...) metamacro_expand_ #define metamacro_if_eq_recursive0_62(...) metamacro_expand_ #define metamacro_if_eq_recursive0_63(...) metamacro_expand_ #define metamacro_if_eq_recursive0_64(...) metamacro_expand_ #define metamacro_if_eq_recursive0_65(...) metamacro_expand_ #define metamacro_if_eq_recursive0_66(...) metamacro_expand_ #define metamacro_if_eq_recursive0_67(...) metamacro_expand_ #define metamacro_if_eq_recursive0_68(...) metamacro_expand_ #define metamacro_if_eq_recursive0_69(...) metamacro_expand_ #define metamacro_if_eq_recursive0_70(...) metamacro_expand_ #define metamacro_if_eq_recursive0_71(...) metamacro_expand_ #define metamacro_if_eq_recursive0_72(...) metamacro_expand_ #define metamacro_if_eq_recursive0_73(...) metamacro_expand_ #define metamacro_if_eq_recursive0_74(...) metamacro_expand_ #define metamacro_if_eq_recursive0_75(...) metamacro_expand_ #define metamacro_if_eq_recursive0_76(...) metamacro_expand_ #define metamacro_if_eq_recursive0_77(...) metamacro_expand_ #define metamacro_if_eq_recursive0_78(...) metamacro_expand_ #define metamacro_if_eq_recursive0_79(...) metamacro_expand_ #define metamacro_if_eq_recursive0_80(...) metamacro_expand_ #define metamacro_if_eq_recursive0_81(...) metamacro_expand_ #define metamacro_if_eq_recursive0_82(...) metamacro_expand_ #define metamacro_if_eq_recursive0_83(...) metamacro_expand_ #define metamacro_if_eq_recursive0_84(...) metamacro_expand_ #define metamacro_if_eq_recursive0_85(...) metamacro_expand_ #define metamacro_if_eq_recursive0_86(...) metamacro_expand_ #define metamacro_if_eq_recursive0_87(...) metamacro_expand_ #define metamacro_if_eq_recursive0_88(...) metamacro_expand_ #define metamacro_if_eq_recursive0_89(...) metamacro_expand_ #define metamacro_if_eq_recursive0_90(...) metamacro_expand_ #define metamacro_if_eq_recursive0_91(...) metamacro_expand_ #define metamacro_if_eq_recursive0_92(...) metamacro_expand_ #define metamacro_if_eq_recursive0_93(...) metamacro_expand_ #define metamacro_if_eq_recursive0_94(...) metamacro_expand_ #define metamacro_if_eq_recursive0_95(...) metamacro_expand_ #define metamacro_if_eq_recursive0_96(...) metamacro_expand_ #define metamacro_if_eq_recursive0_97(...) metamacro_expand_ #define metamacro_if_eq_recursive0_98(...) metamacro_expand_ #define metamacro_if_eq_recursive0_99(...) metamacro_expand_ #define metamacro_if_eq_recursive0_100(...) metamacro_expand_ #define metamacro_if_eq_recursive0_101(...) metamacro_expand_ #define metamacro_if_eq_recursive0_102(...) metamacro_expand_ #define metamacro_if_eq_recursive0_103(...) metamacro_expand_ #define metamacro_if_eq_recursive0_104(...) metamacro_expand_ #define metamacro_if_eq_recursive0_105(...) metamacro_expand_ #define metamacro_if_eq_recursive0_106(...) metamacro_expand_ #define metamacro_if_eq_recursive0_107(...) metamacro_expand_ #define metamacro_if_eq_recursive0_108(...) metamacro_expand_ #define metamacro_if_eq_recursive0_109(...) metamacro_expand_ #define metamacro_if_eq_recursive0_110(...) metamacro_expand_ #define metamacro_if_eq_recursive0_111(...) metamacro_expand_ #define metamacro_if_eq_recursive0_112(...) metamacro_expand_ #define metamacro_if_eq_recursive0_113(...) metamacro_expand_ #define metamacro_if_eq_recursive0_114(...) metamacro_expand_ #define metamacro_if_eq_recursive0_115(...) metamacro_expand_ #define metamacro_if_eq_recursive0_116(...) metamacro_expand_ #define metamacro_if_eq_recursive0_117(...) metamacro_expand_ #define metamacro_if_eq_recursive0_118(...) metamacro_expand_ #define metamacro_if_eq_recursive0_119(...) metamacro_expand_ #define metamacro_if_eq_recursive0_120(...) metamacro_expand_ #define metamacro_if_eq_recursive0_121(...) metamacro_expand_ #define metamacro_if_eq_recursive0_122(...) metamacro_expand_ #define metamacro_if_eq_recursive0_123(...) metamacro_expand_ #define metamacro_if_eq_recursive0_124(...) metamacro_expand_ #define metamacro_if_eq_recursive0_125(...) metamacro_expand_ #define metamacro_if_eq_recursive0_126(...) metamacro_expand_ #define metamacro_if_eq_recursive0_127(...) metamacro_expand_ #define metamacro_if_eq_recursive0_128(...) metamacro_expand_ #define metamacro_if_eq_recursive0_129(...) metamacro_expand_ #define metamacro_if_eq_recursive0_130(...) metamacro_expand_ #define metamacro_if_eq_recursive0_131(...) metamacro_expand_ #define metamacro_if_eq_recursive0_132(...) metamacro_expand_ #define metamacro_if_eq_recursive0_133(...) metamacro_expand_ #define metamacro_if_eq_recursive0_134(...) metamacro_expand_ #define metamacro_if_eq_recursive0_135(...) metamacro_expand_ #define metamacro_if_eq_recursive0_136(...) metamacro_expand_ #define metamacro_if_eq_recursive0_137(...) metamacro_expand_ #define metamacro_if_eq_recursive0_138(...) metamacro_expand_ #define metamacro_if_eq_recursive0_139(...) metamacro_expand_ #define metamacro_if_eq_recursive0_140(...) metamacro_expand_ #define metamacro_if_eq_recursive0_141(...) metamacro_expand_ #define metamacro_if_eq_recursive0_142(...) metamacro_expand_ #define metamacro_if_eq_recursive0_143(...) metamacro_expand_ #define metamacro_if_eq_recursive0_144(...) metamacro_expand_ #define metamacro_if_eq_recursive0_145(...) metamacro_expand_ #define metamacro_if_eq_recursive0_146(...) metamacro_expand_ #define metamacro_if_eq_recursive0_147(...) metamacro_expand_ #define metamacro_if_eq_recursive0_148(...) metamacro_expand_ #define metamacro_if_eq_recursive0_149(...) metamacro_expand_ #define metamacro_if_eq_recursive0_150(...) metamacro_expand_ #define metamacro_if_eq_recursive1(VALUE) metamacro_if_eq_recursive0(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive2(VALUE) metamacro_if_eq_recursive1(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive3(VALUE) metamacro_if_eq_recursive2(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive4(VALUE) metamacro_if_eq_recursive3(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive5(VALUE) metamacro_if_eq_recursive4(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive6(VALUE) metamacro_if_eq_recursive5(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive7(VALUE) metamacro_if_eq_recursive6(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive8(VALUE) metamacro_if_eq_recursive7(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive9(VALUE) metamacro_if_eq_recursive8(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive10(VALUE) metamacro_if_eq_recursive9(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive11(VALUE) metamacro_if_eq_recursive10(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive12(VALUE) metamacro_if_eq_recursive11(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive13(VALUE) metamacro_if_eq_recursive12(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive14(VALUE) metamacro_if_eq_recursive13(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive15(VALUE) metamacro_if_eq_recursive14(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive16(VALUE) metamacro_if_eq_recursive15(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive17(VALUE) metamacro_if_eq_recursive16(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive18(VALUE) metamacro_if_eq_recursive17(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive19(VALUE) metamacro_if_eq_recursive18(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive20(VALUE) metamacro_if_eq_recursive19(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive21(VALUE) metamacro_if_eq_recursive20(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive22(VALUE) metamacro_if_eq_recursive21(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive23(VALUE) metamacro_if_eq_recursive22(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive24(VALUE) metamacro_if_eq_recursive23(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive25(VALUE) metamacro_if_eq_recursive24(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive26(VALUE) metamacro_if_eq_recursive25(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive27(VALUE) metamacro_if_eq_recursive26(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive28(VALUE) metamacro_if_eq_recursive27(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive29(VALUE) metamacro_if_eq_recursive28(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive30(VALUE) metamacro_if_eq_recursive29(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive31(VALUE) metamacro_if_eq_recursive30(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive32(VALUE) metamacro_if_eq_recursive31(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive33(VALUE) metamacro_if_eq_recursive32(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive34(VALUE) metamacro_if_eq_recursive33(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive35(VALUE) metamacro_if_eq_recursive34(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive36(VALUE) metamacro_if_eq_recursive35(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive37(VALUE) metamacro_if_eq_recursive36(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive38(VALUE) metamacro_if_eq_recursive37(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive39(VALUE) metamacro_if_eq_recursive38(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive40(VALUE) metamacro_if_eq_recursive39(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive41(VALUE) metamacro_if_eq_recursive40(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive42(VALUE) metamacro_if_eq_recursive41(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive43(VALUE) metamacro_if_eq_recursive42(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive44(VALUE) metamacro_if_eq_recursive43(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive45(VALUE) metamacro_if_eq_recursive44(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive46(VALUE) metamacro_if_eq_recursive45(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive47(VALUE) metamacro_if_eq_recursive46(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive48(VALUE) metamacro_if_eq_recursive47(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive49(VALUE) metamacro_if_eq_recursive48(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive50(VALUE) metamacro_if_eq_recursive49(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive51(VALUE) metamacro_if_eq_recursive50(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive52(VALUE) metamacro_if_eq_recursive51(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive53(VALUE) metamacro_if_eq_recursive52(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive54(VALUE) metamacro_if_eq_recursive53(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive55(VALUE) metamacro_if_eq_recursive54(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive56(VALUE) metamacro_if_eq_recursive55(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive57(VALUE) metamacro_if_eq_recursive56(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive58(VALUE) metamacro_if_eq_recursive57(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive59(VALUE) metamacro_if_eq_recursive58(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive60(VALUE) metamacro_if_eq_recursive59(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive61(VALUE) metamacro_if_eq_recursive60(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive62(VALUE) metamacro_if_eq_recursive61(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive63(VALUE) metamacro_if_eq_recursive62(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive64(VALUE) metamacro_if_eq_recursive63(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive65(VALUE) metamacro_if_eq_recursive64(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive66(VALUE) metamacro_if_eq_recursive65(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive67(VALUE) metamacro_if_eq_recursive66(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive68(VALUE) metamacro_if_eq_recursive67(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive69(VALUE) metamacro_if_eq_recursive68(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive70(VALUE) metamacro_if_eq_recursive69(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive71(VALUE) metamacro_if_eq_recursive70(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive72(VALUE) metamacro_if_eq_recursive71(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive73(VALUE) metamacro_if_eq_recursive72(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive74(VALUE) metamacro_if_eq_recursive73(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive75(VALUE) metamacro_if_eq_recursive74(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive76(VALUE) metamacro_if_eq_recursive75(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive77(VALUE) metamacro_if_eq_recursive76(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive78(VALUE) metamacro_if_eq_recursive77(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive79(VALUE) metamacro_if_eq_recursive78(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive80(VALUE) metamacro_if_eq_recursive79(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive81(VALUE) metamacro_if_eq_recursive80(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive82(VALUE) metamacro_if_eq_recursive81(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive83(VALUE) metamacro_if_eq_recursive82(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive84(VALUE) metamacro_if_eq_recursive83(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive85(VALUE) metamacro_if_eq_recursive84(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive86(VALUE) metamacro_if_eq_recursive85(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive87(VALUE) metamacro_if_eq_recursive86(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive88(VALUE) metamacro_if_eq_recursive87(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive89(VALUE) metamacro_if_eq_recursive88(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive90(VALUE) metamacro_if_eq_recursive89(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive91(VALUE) metamacro_if_eq_recursive90(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive92(VALUE) metamacro_if_eq_recursive91(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive93(VALUE) metamacro_if_eq_recursive92(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive94(VALUE) metamacro_if_eq_recursive93(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive95(VALUE) metamacro_if_eq_recursive94(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive96(VALUE) metamacro_if_eq_recursive95(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive97(VALUE) metamacro_if_eq_recursive96(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive98(VALUE) metamacro_if_eq_recursive97(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive99(VALUE) metamacro_if_eq_recursive98(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive100(VALUE) metamacro_if_eq_recursive99(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive101(VALUE) metamacro_if_eq_recursive100(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive102(VALUE) metamacro_if_eq_recursive101(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive103(VALUE) metamacro_if_eq_recursive102(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive104(VALUE) metamacro_if_eq_recursive103(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive105(VALUE) metamacro_if_eq_recursive104(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive106(VALUE) metamacro_if_eq_recursive105(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive107(VALUE) metamacro_if_eq_recursive106(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive108(VALUE) metamacro_if_eq_recursive107(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive109(VALUE) metamacro_if_eq_recursive108(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive110(VALUE) metamacro_if_eq_recursive109(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive111(VALUE) metamacro_if_eq_recursive110(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive112(VALUE) metamacro_if_eq_recursive111(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive113(VALUE) metamacro_if_eq_recursive112(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive114(VALUE) metamacro_if_eq_recursive113(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive115(VALUE) metamacro_if_eq_recursive114(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive116(VALUE) metamacro_if_eq_recursive115(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive117(VALUE) metamacro_if_eq_recursive116(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive118(VALUE) metamacro_if_eq_recursive117(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive119(VALUE) metamacro_if_eq_recursive118(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive120(VALUE) metamacro_if_eq_recursive119(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive121(VALUE) metamacro_if_eq_recursive120(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive122(VALUE) metamacro_if_eq_recursive121(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive123(VALUE) metamacro_if_eq_recursive122(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive124(VALUE) metamacro_if_eq_recursive123(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive125(VALUE) metamacro_if_eq_recursive124(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive126(VALUE) metamacro_if_eq_recursive125(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive127(VALUE) metamacro_if_eq_recursive126(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive128(VALUE) metamacro_if_eq_recursive127(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive129(VALUE) metamacro_if_eq_recursive128(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive130(VALUE) metamacro_if_eq_recursive129(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive131(VALUE) metamacro_if_eq_recursive130(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive132(VALUE) metamacro_if_eq_recursive131(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive133(VALUE) metamacro_if_eq_recursive132(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive134(VALUE) metamacro_if_eq_recursive133(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive135(VALUE) metamacro_if_eq_recursive134(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive136(VALUE) metamacro_if_eq_recursive135(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive137(VALUE) metamacro_if_eq_recursive136(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive138(VALUE) metamacro_if_eq_recursive137(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive139(VALUE) metamacro_if_eq_recursive138(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive140(VALUE) metamacro_if_eq_recursive139(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive141(VALUE) metamacro_if_eq_recursive140(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive142(VALUE) metamacro_if_eq_recursive141(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive143(VALUE) metamacro_if_eq_recursive142(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive144(VALUE) metamacro_if_eq_recursive143(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive145(VALUE) metamacro_if_eq_recursive144(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive146(VALUE) metamacro_if_eq_recursive145(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive147(VALUE) metamacro_if_eq_recursive146(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive148(VALUE) metamacro_if_eq_recursive147(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive149(VALUE) metamacro_if_eq_recursive148(metamacro_dec(VALUE)) #define metamacro_if_eq_recursive150(VALUE) metamacro_if_eq_recursive149(metamacro_dec(VALUE)) /////////////////////////////////////////////////////////////////////////////////// #endif // #ifndef EXTC_METAMACROS_EXTENDED_H
[ "lshmissjhy@gmail.com" ]
lshmissjhy@gmail.com
19da40db10975e1c5c7e00f101a3bea0d05cb264
50e7f29b07531bf3db585e420fb7a4209bacf102
/unity-samples/Temp/il2cppOutput/il2cppOutput/Mono_Security_Mono_Security_Protocol_Tls_Handshake_Handshake.h
e25e05b3de9837230285b4552ac21a01bfe6a7b8
[]
no_license
golergka/appboy-unity-sdk
0d7a8732c6dfd66ffbf30c9214c932a04f2b6d59
deeeba3849bd3a8e6a1166e95a6a5be6f5038646
refs/heads/master
2021-01-18T11:53:22.096992
2016-03-17T12:24:52
2016-03-17T12:24:52
54,115,484
0
0
null
2016-03-17T12:18:57
2016-03-17T12:18:56
null
UTF-8
C
false
false
436
h
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include "mscorlib_System_Enum.h" #include "Mono_Security_Mono_Security_Protocol_Tls_Handshake_Handshake.h" // Mono.Security.Protocol.Tls.Handshake.HandshakeType struct HandshakeType_t1350 { // System.Byte Mono.Security.Protocol.Tls.Handshake.HandshakeType::value__ uint8_t ___value___1; };
[ "wenzhi@appboy.com" ]
wenzhi@appboy.com
b1f548bc730940b5f1d74eee190a6d84b56c0162
dfefadef9e532b23f5935cb6019a2c7a8a56a02f
/PT3 Problem 1 -BlockChain/others/miner.h
17b5fa872561d8e5ffb2701395743c4ce3ef88a0
[]
no_license
ohadke/OdooTest
b964837bb66215efba7efd022b07bfac26842a1c
cd86aa2e08ab137fc472c4d8ed7ee05823f3d8d2
refs/heads/main
2023-07-10T18:13:27.003981
2021-08-18T13:58:09
2021-08-18T13:58:09
397,619,279
0
0
null
null
null
null
UTF-8
C
false
false
280
h
#ifndef __MINER__ #define __MINER__ #include"globals.h" #include"BlockChain.h" void* MinerRoutine(void* input); void* DummyMinerRoutine(void* input); Block createBlock(BlockDataForHash blockData,unsigned int hash); BlockDataForHash getBlockForDataData( int id); #endif
[ "noreply@github.com" ]
noreply@github.com
1d03c560a6a2a1845268bbc89c935a9a74e46e2c
e31bd0a506b2673455216c6f32af5985bb21cd50
/ft_memmove.c
ba0886dfbeed490f8dff06c2208c9dfa56fd42bc
[]
no_license
newmersedez/libft
aee62d3f212842c5929edf1bce9b6b5d2bcf7ab9
b99bd7d256dd17f98d07ffcadf77f9be832020cc
refs/heads/master
2023-08-18T11:01:17.259779
2021-10-27T07:57:20
2021-10-27T07:57:20
null
0
0
null
null
null
null
UTF-8
C
false
false
1,312
c
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_memmove.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: lorphan <lorphan@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/09/21 15:38:34 by lorphan #+# #+# */ /* Updated: 2021/09/21 15:38:35 by lorphan ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void *ft_memmove(void *dest, const void *src, size_t n) { size_t i; unsigned char *src_temp; unsigned char *dest_temp; i = 0; src_temp = (unsigned char *)src; dest_temp = (unsigned char *)dest; if (dest_temp > src_temp) { while (n-- != 0) dest_temp[n] = src_temp[n]; } if (src_temp > dest_temp) { while (i < n) { dest_temp[i] = src_temp[i]; i++; } } return (dest); }
[ "trishkk2001@gmail.com" ]
trishkk2001@gmail.com