Optimization for C isMigrated function
I am not sure how far you intend to expand Migrated, but something like this could be an optimisation:

char* Migrated[]={"026","109"};

int isMigrated(char* codeB)
{   
    int i;
    // since we know that all strings in Migrated are 4 bytes long
    int32_t _codeB_as_int32 = *(int32_t *)codeB; 
    int32_t * Migrated_as_int32 = Migrated;

    for(i=0;
        i&lt;sizeof(Migrated)/sizeof(*Migrated); // sizeof is a compile time constant, better to put it here
        i++)
    {   
        if(codeB == Migrated_as_int32[i])
            return 0;
    }
    return -1;
}


it all really depends on what you intend to have in Migrated.