Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- tabcount = 2;
- Tabs = (tab*)malloc(sizeof(tab) * 4);
- // liczby
- Tabs[0].name = "liczby";
- Tabs[0].column_count = 1;
- Tabs[0].column_names = (char**)malloc(sizeof(char*) * 1);
- Tabs[0].column_names[0] = "wartosc";
- Tabs[0].column_data = (void**)malloc(sizeof(void*) * 1);
- Tabs[0].column_types = (unsigned long long int*)malloc(sizeof(unsigned long long int) * 1);
- Tabs[0].column_types[0] = TYP::INT;
- //
- // end:liczby
- // studenci
- Tabs[1].name = "studenci";
- Tabs[1].column_count = 3;
- Tabs[1].column_names = (char**)malloc(sizeof(char*) * 3);
- Tabs[1].column_names[0] = "indeks";
- Tabs[1].column_names[1] = "imie" ;
- Tabs[1].column_names[2] = "nazwisko";
- Tabs[1].column_data = (void**)malloc(sizeof(void*) * 3);
- Tabs[1].column_types = (unsigned long long int*)malloc(sizeof(unsigned long long int) * 3);
- Tabs[1].column_types[0] = TYP::INT;
- Tabs[1].column_types[1] = TYP::STRING;
- Tabs[1].column_types[2] = TYP::STRING;
- // end:studenci
- // przedmioty
- Tabs[2].name = "przedmioty";
- Tabs[2].column_count = 3;
- Tabs[2].column_names = (char**)malloc(sizeof(char*) * 3);
- Tabs[2].column_names[0] = "id";
- Tabs[2].column_names[1] = "nazwa" ;
- Tabs[2].column_names[2] = "semestr";
- Tabs[2].column_data = (void**)malloc(sizeof(void*) * 3);
- Tabs[2].column_types = (unsigned long long int*)malloc(sizeof(unsigned long long int) * 3);
- Tabs[2].column_types[0] = TYP::INCINT;
- Tabs[2].column_types[1] = TYP::STRING;
- Tabs[2].column_types[2] = TYP::CLAMP;
- Tabs[2].column_types[2]+= 1 << TYP::MASK::CLAMPHIGHER; // must be higher than , range:0 - 32767 (15 bits)
- Tabs[2].column_types[2]+= 10 << TYP::MASK::CLAMPLOWER; // must be lower than , range:0 - 32767 (15 bits)
- // end:przedmioty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement