defs.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. /*
  7. * We need the S_EXT because we leave locals alone.
  8. */
  9. #define ISUNDEFINED(n) (((n)->on_type & (S_TYP | S_EXT)) == (S_UND | S_EXT))
  10. #define ISABSOLUTE(n) (((n)->on_type & (S_TYP | S_EXT)) == (S_ABS | S_EXT))
  11. #define ISCOMMON(n) (((n)->on_type & (S_COM | S_EXT)) == (S_COM | S_EXT))
  12. #define mustsavelocal(name) (!((name)->on_type & S_SCT))
  13. /* archive.c */
  14. void arch();
  15. void arch2();
  16. /* extract.c */
  17. void extract();
  18. void namerelocate(struct outname *name);
  19. /* finish.c */
  20. void finish();
  21. void do_crs(struct outname *base, unsigned int count);
  22. /* main.c */
  23. bool setbit(int indx, char *string);
  24. void addbase(struct outname *name);
  25. /* output.c */
  26. void endoutput();
  27. void beginoutput();
  28. /* error.c */
  29. void stop();
  30. void fatal(char *format, ...);
  31. void warning(char *format, ...);
  32. void error(char *format, ...);
  33. int do_verbose(char *format, ...);
  34. /* read.c */
  35. void rd_fatal();
  36. /* write.c */
  37. void wr_fatal();
  38. void begin_write();
  39. void end_write();
  40. void wrt_emit(char *emit, int sectindex, long cnt);
  41. void wrt_nulls(int sectindex, long cnt);
  42. void wrt_name(struct outname *name, int writename);
  43. /* sym.c */
  44. void init_symboltable();
  45. struct outname *searchname(char *string, int hashval);
  46. void entername(struct outname *name, int hashval);
  47. unsigned int indexof(struct outname *name);
  48. int hash(char *p);
  49. /* save.c */
  50. void savemagic();
  51. void savehdr(struct ar_hdr * hdr);
  52. ind_t savechar(int piece, ind_t off);
  53. void savelocal(struct outname *name);
  54. /* relocate.c */
  55. void relocate(struct outhead *head, char *emit, struct outname names[], struct outrelo *relo, long off);
  56. /* scan.c */
  57. int getfile(char *filename);
  58. void closefile(char *filename);
  59. void get_archive_header(struct ar_hdr *archive_header);
  60. void get_modul();
  61. void seek(long pos);
  62. void skip_modul(struct outhead *head);
  63. void startrelo(struct outhead *head);
  64. struct outrelo *nextrelo();
  65. char *getemit(struct outhead *head, struct outsect *sects, int sectindex);
  66. char *getblk(long totalsz, long *pblksz, int sectindex);
  67. void endemit(char *emit);
  68. /* --- */