firstfile.c 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /* Find the initialization functions of following files.
  2. This goes with initialize.h and lastfile.c.
  3. Copyright (C) 1986 Free Software Foundation, Inc.
  4. NO WARRANTY
  5. BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY
  6. NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT
  7. WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC,
  8. RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS"
  9. WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
  10. BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  11. FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY
  12. AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
  13. DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
  14. CORRECTION.
  15. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M.
  16. STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY
  17. WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE
  18. LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR
  19. OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
  20. USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
  21. DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR
  22. A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS
  23. PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
  24. DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
  25. GENERAL PUBLIC LICENSE TO COPY
  26. 1. You may copy and distribute verbatim copies of this source file
  27. as you receive it, in any medium, provided that you conspicuously and
  28. appropriately publish on each copy a valid copyright notice "Copyright
  29. (C) 1986 Free Software Foundation, Inc."; and include following the
  30. copyright notice a verbatim copy of the above disclaimer of warranty
  31. and of this License. You may charge a distribution fee for the
  32. physical act of transferring a copy.
  33. 2. You may modify your copy or copies of this source file or
  34. any portion of it, and copy and distribute such modifications under
  35. the terms of Paragraph 1 above, provided that you also do the following:
  36. a) cause the modified files to carry prominent notices stating
  37. that you changed the files and the date of any change; and
  38. b) cause the whole of any work that you distribute or publish,
  39. that in whole or in part contains or is a derivative of this
  40. program or any part thereof, to be licensed at no charge to all
  41. third parties on terms identical to those contained in this
  42. License Agreement (except that you may choose to grant more
  43. extensive warranty protection to third parties, at your option).
  44. c) You may charge a distribution fee for the physical act of
  45. transferring a copy, and you may at your option offer warranty
  46. protection in exchange for a fee.
  47. 3. You may copy and distribute this program or any portion of it in
  48. compiled, executable or object code form under the terms of Paragraphs
  49. 1 and 2 above provided that you do the following:
  50. a) cause each such copy to be accompanied by the
  51. corresponding machine-readable source code, which must
  52. be distributed under the terms of Paragraphs 1 and 2 above; or,
  53. b) cause each such copy to be accompanied by a
  54. written offer, with no time limit, to give any third party
  55. free (except for a nominal shipping charge) a machine readable
  56. copy of the corresponding source code, to be distributed
  57. under the terms of Paragraphs 1 and 2 above; or,
  58. c) in the case of a recipient of this program in compiled, executable
  59. or object code form (without the corresponding source code) you
  60. shall cause copies you distribute to be accompanied by a copy
  61. of the written offer of source code which you received along
  62. with the copy you received.
  63. 4. You may not copy, sublicense, distribute or transfer this program
  64. except as expressly provided under this License Agreement. Any attempt
  65. otherwise to copy, sublicense, distribute or transfer this program is void and
  66. your rights to use the program under this License agreement shall be
  67. automatically terminated. However, parties who have received computer
  68. software programs from you with this License Agreement will not have
  69. their licenses terminated so long as such parties remain in full compliance.
  70. 5. If you wish to incorporate parts of this program into other free
  71. programs whose distribution conditions are different, write to the Free
  72. Software Foundation at 1000 Mass Ave, Cambridge, MA 02138. We have not yet
  73. worked out a simple rule that can be stated here, but we will often permit
  74. this. We will be guided by the two goals of preserving the free status of
  75. all derivatives our free software and of promoting the sharing and reuse of
  76. software.
  77. In other words, you are welcome to use, share and improve this program.
  78. You are forbidden to forbid anyone else to use, share and improve
  79. what you give them. Help stamp out software-hoarding! */
  80. /* This is a magical hack for finding, automatically,
  81. all the files that are linked together
  82. and calling an initialization function in each one
  83. without requiring the main file to know which other
  84. files there are.
  85. Call initialize_all_files to run the initialization functions
  86. of all the files. Each initialization function can enter
  87. the commands of its file into a global data base so that the
  88. contents of the file can be used.
  89. The files to be found must follow this file. Each of them
  90. must start START_FILE, before any other functions,
  91. and end with END_FILE, after any other functions.
  92. These macros are defined in initialize.h.
  93. In addition, each file must contain a function named
  94. `initialize', which will be called with no arguments.
  95. After the files to be found must come the file `lastfile'
  96. which ends the chain of calls. */
  97. #include "initialize.h"
  98. static initialize_next_file ();
  99. static initialize_dummy_1 ();
  100. static initialize_dummy_2 ();
  101. initialize_all_files ()
  102. {
  103. initialize_next_file ((char *) initialize_dummy_2
  104. - (char *) initialize_dummy_1);
  105. }
  106. /* The next two functions exist just so we can find
  107. out how long the first of them is.
  108. That tells us how long initialize_next_file is,
  109. since that function has the same definition as this one. */
  110. static
  111. initialize_dummy_1 (offset)
  112. int offset;
  113. {
  114. long addr = FILEADDR_ROUND ((int) initialize_next_file + offset);
  115. (*(void (*) ()) addr) (offset);
  116. }
  117. static
  118. initialize_dummy_2 ()
  119. {
  120. }
  121. /* This makes the function initialize_next_file. */
  122. END_FILE