MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / pack_table

Function pack_table

extern/btyacc/output.c:423–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421
422
423void pack_table()
424{
425 register int i;
426 register int place;
427 register int state;
428
429 base = NEW2(nvectors, Yshort);
430 pos = NEW2(nentries, Yshort);
431
432 maxtable = 1000;
433 table = NEW2(maxtable, Yshort);
434 check = NEW2(maxtable, Yshort);
435
436 lowzero = 0;
437 high = 0;
438
439 for (i = 0; i < maxtable; i++)
440 check[i] = -1;
441
442 for (i = 0; i < nentries; i++)
443 {
444 state = matching_vector(i);
445
446 if (state < 0)
447 place = pack_vector(i);
448 else
449 place = base[state];
450
451 pos[i] = place;
452 base[order[i]] = place;
453 }
454
455 for (i = 0; i < nvectors; i++)
456 {
457 if (froms[i])
458 FREE(froms[i]);
459 if (tos[i])
460 FREE(tos[i]);
461 }
462
463 FREE(froms);
464 FREE(tos);
465 FREE(tally);
466 FREE(width);
467 FREE(pos);
468}
469
470
471/* The function matching_vector determines if the vector specified by */

Callers 1

output_actionsFunction · 0.85

Calls 2

matching_vectorFunction · 0.85
pack_vectorFunction · 0.85

Tested by

no test coverage detected