bag.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* bag.h -- ARMulator support code: ARM6 Instruction Emulator.
  2. Copyright (C) 1994 Advanced RISC Machines Ltd.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, see <http://www.gnu.org/licenses/>. */
  13. /********************************************************************/
  14. /* bag.h: */
  15. /* Header file for bag.c */
  16. /* Offers a data structure for storing and getting pairs of number. */
  17. /* The numbers are stored together, put one can be looked up by */
  18. /* quoting the other. If a new pair is entered and one of the */
  19. /* numbers is a repeat of a previous pair, then the previos pair */
  20. /* is deleted. */
  21. /********************************************************************/
  22. typedef enum
  23. {
  24. NO_ERROR,
  25. DELETED_OLD_PAIR,
  26. NO_SUCH_PAIR,
  27. }
  28. Bag_error;
  29. void BAG_putpair (long first, long second);
  30. void BAG_newbag (void);
  31. Bag_error BAG_killpair_byfirst (long first);
  32. Bag_error BAG_killpair_bysecond (long second);
  33. Bag_error BAG_getfirst (long *first, long second);
  34. Bag_error BAG_getsecond (long first, long *second);