Lines Matching defs:list
33 Vcint_t v, g, list[N_LIST], copy[N_LIST];
76 /* Generate a list of positive integers.
79 list[0] = 2; list[1] = 6; list[2] = 9; list[3] = 7; list[4] = 2;
85 list[v] = list[v-1] + (random()%17);
86 else list[v] = list[v-1] - (random()%53);
87 if(list[v] <= 0)
88 list[v] = random()%37 + 1;
91 memcpy(copy,list,N_LIST*sizeof(Vcint_t));
93 /* check coding size of original list using base-128 coding */
96 vcioputu(&io, list[v]);
101 if((g = vciogetu(&io)) != list[v])
104 /* check coding size of original list using gamma coding */
108 vcioputg(&io, list[v]);
115 if((g = vciogetg(&io)) != list[v])
119 /* test integer list io */
121 if((v = vcioputlist(&io, list, N_LIST)) < 0)
126 list[v] = -1;
128 if((v = vciogetlist(&io, list, N_LIST)) != N_LIST)
131 if(list[v] != copy[v])
132 terror("Wrong value %d\n", (int)list[v]);