move.c 746 B

12345678910111213141516171819202122232425
  1. /* $Header$ */
  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. /* A program to move the file pem??.m to pem.m */
  7. /* Called when "apc pem.p" fails. It is assumed that the binary
  8. file is incorrect in that case and has to be created from the compact
  9. code file.
  10. This program selects the correct compact code file for each combination
  11. of word and pointer size.
  12. It will return an error code if the move failed
  13. */
  14. main(argc) {
  15. char copy[100] ;
  16. if ( argc!=1 ) {
  17. printf("No arguments allowed\n") ;
  18. exit(1) ;
  19. }
  20. sprintf(copy,"cp pem%d%d.m pem.m", EM_WSIZE, EM_PSIZE) ;
  21. printf("%s\n",copy) ;
  22. exit(system(copy)) ;
  23. }