frags.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* frags.h - Header file for the frag concept.
  2. Copyright (C) 1987 Free Software Foundation, Inc.
  3. This file is part of GAS, the GNU Assembler.
  4. GAS is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 1, or (at your option)
  7. any later version.
  8. GAS is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GAS; see the file COPYING. If not, write to
  14. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  15. extern struct obstack frags;
  16. /* Frags ONLY live in this obstack. */
  17. /* We use obstack_next_free() macro */
  18. /* so please don't put any other objects */
  19. /* on this stack! */
  20. /*
  21. * A macro to speed up appending exactly 1 char
  22. * to current frag.
  23. */
  24. /* JF changed < 1 to <= 1 to avoid a race conditon */
  25. #define FRAG_APPEND_1_CHAR(datum) \
  26. { \
  27. if (obstack_room( &frags ) <= 1) {\
  28. frag_wane (frag_now); \
  29. frag_new (0); \
  30. } \
  31. obstack_1grow( &frags, datum ); \
  32. }
  33. /* end: frags.h */