get.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* $Id$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. /* I N P U T R O U T I N E S */
  7. extern FILE *curinp; /* current input file */
  8. extern block_id lastbid; /* block identifying number */
  9. extern lab_id lastlabid; /* last label identifier */
  10. #define getbyte() getc(curinp)
  11. extern short getshort(); /* ()
  12. * Read a short from curinp
  13. */
  14. extern offset getoff(); /* ()
  15. * Read an offset from curinp
  16. */
  17. extern line_p read_line(); /* ( proc_p *p_out)
  18. * Read a line of EM code (i.e. one
  19. * instruction) and its arguments
  20. * (if any). If the instruction is a
  21. * 'pro' pseudo, set p_out.
  22. */
  23. extern line_p getlines(); /* ( FILE *lf; int n; proc_p *p_out;
  24. * bool collect_mes)
  25. * Read n lines of EM text and doubly
  26. * link them. Also process messages
  27. * if required.
  28. */
  29. extern bblock_p freshblock(); /* ()
  30. * Allocate a bblock struct and assign
  31. * it a brand new block_id.
  32. */
  33. extern lab_id freshlabel(); /* ()
  34. * Get a brand new lab_id.
  35. */
  36. extern dblock_p getdtable(); /* (char *dname)
  37. * Read the data block table from
  38. * the file with the given name.
  39. */
  40. extern proc_p getptable(); /* (char *pname)
  41. * Read the proc table from
  42. * the file with the given name.
  43. */
  44. extern bool getunit(); /* (FILE *gf,*lf; short kind_out;
  45. * bblock_p g_out; line_p l_out;
  46. * proc_p *p_out; bool collect_mes)
  47. * Read the control flow graph
  48. * (from file gf) and the EM text
  49. * (from lf). If collect_mes is TRUE,
  50. * all register messages will be
  51. * collected and put in the global
  52. * variable 'mesregs'. The proc read
  53. * is returned in p_out.
  54. */
  55. extern message(); /* (line_p lnp)
  56. * See if lnp is some useful message.
  57. * (e.g. a message telling that a
  58. * certain local variable will never be
  59. * referenced indirectly, so it may be
  60. * put in a register.
  61. * If so, add it to the mesregs set.)
  62. */