Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
2.8 KiB

  1. /*
  2. * Used by makefile to generate OFFSETS.I for ASM source files.
  3. *
  4. * Also creates some constants for tables.
  5. *
  6. * Outputs offsets into the context structure.
  7. */
  8. #include "decoder.h"
  9. #include <stdio.h>
  10. t_decoder_context p;
  11. void main(void)
  12. {
  13. printf("MAIN_TREE_TABLE_BITS EQU %d\n", MAIN_TREE_TABLE_BITS);
  14. printf("MAIN_TREE_TABLE_ELEMENTS EQU %d\n", 1 << MAIN_TREE_TABLE_BITS);
  15. printf("SECONDARY_LEN_TREE_TABLE_BITS EQU %d\n", SECONDARY_LEN_TREE_TABLE_BITS);
  16. printf("SECONDARY_TREE_TABLE_ELEMENTS EQU %d\n", 1 << SECONDARY_LEN_TREE_TABLE_BITS);
  17. printf("NUM_SECONDARY_LENGTHS EQU %d\n", NUM_SECONDARY_LENGTHS);
  18. printf("ALIGNED_TABLE_ELEMENTS EQU %d\n", 1 << ALIGNED_TABLE_BITS);
  19. printf("ALIGNED_NUM_ELEMENTS EQU %d\n", ALIGNED_NUM_ELEMENTS);
  20. printf("OFF_MEM_WINDOW EQU %d\n", (byte *) &p.dec_mem_window - (byte *) &p);
  21. printf("OFF_WINDOW_SIZE EQU %d\n", (byte *) &p.dec_window_size - (byte *) &p);
  22. printf("OFF_WINDOW_MASK EQU %d\n", (byte *) &p.dec_window_mask - (byte *) &p);
  23. printf("OFF_LAST_MATCHPOS_OFFSET EQU %d\n", (byte *) &p.dec_last_matchpos_offset[0] - (byte *) &p);
  24. printf("OFF_MAIN_TREE_TABLE EQU %d\n", (byte *) &p.dec_main_tree_table[0] - (byte *) &p);
  25. printf("OFF_SECONDARY_TREE_TABLE EQU %d\n", (byte *) &p.dec_secondary_length_tree_table[0] - (byte *) &p);
  26. printf("OFF_MAIN_TREE_LEN EQU %d\n", (byte *) &p.dec_main_tree_len[0] - (byte *) &p);
  27. printf("OFF_SECONDARY_TREE_LEN EQU %d\n", (byte *) &p.dec_secondary_length_tree_len[0] - (byte *) &p);
  28. printf("OFF_ALIGNED_TABLE EQU %d\n", (byte *) &p.dec_aligned_table[0] - (byte *) &p);
  29. printf("OFF_ALIGNED_LEN EQU %d\n", (byte *) &p.dec_aligned_len[0] - (byte *) &p);
  30. printf("OFF_MAIN_TREE_LEFTRIGHT EQU %d\n", (byte *) &p.dec_main_tree_left_right[0] - (byte *) &p);
  31. printf("OFF_SECONDARY_TREE_LEFTRIGHT EQU %d\n", (byte *) &p.dec_secondary_length_tree_left_right[0] - (byte *) &p);
  32. printf("OFF_INPUT_CURPOS EQU %d\n", (byte *) &p.dec_input_curpos - (byte *) &p);
  33. printf("OFF_INPUT_ENDPOS EQU %d\n", (byte *) &p.dec_end_input_pos - (byte *) &p);
  34. printf("OFF_MAIN_TREE_PREV_LEN EQU %d\n", (byte *) &p.dec_main_tree_prev_len[0] - (byte *) &p);
  35. printf("OFF_SECONDARY_TREE_PREV_LEN EQU %d\n", (byte *) &p.dec_secondary_length_tree_prev_len[0] - (byte *) &p);
  36. printf("OFF_BITBUF EQU %d\n", (byte *) &p.dec_bitbuf - (byte *) &p);
  37. printf("OFF_BITCOUNT EQU %d\n", (byte *) &p.dec_bitcount - (byte *) &p);
  38. printf("OFF_NUM_POSITION_SLOTS EQU %d\n", (byte *) &p.dec_num_position_slots - (byte *) &p);
  39. printf("OFF_BUFPOS EQU %d\n", (byte *) &p.dec_bufpos - (byte *) &p);
  40. exit(0);
  41. }