home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / f2c / f77lib / system_.c < prev    next >
C/C++ Source or Header  |  2000-06-22  |  374b  |  23 lines

  1. /* f77 interface to system routine */
  2.  
  3. #include "f2c.h"
  4.  
  5. #ifdef KR_headers
  6. system_(s, n) register char *s; ftnlen n;
  7. #else
  8. #undef abs
  9. #include "stdlib.h"
  10. system_(register char *s, ftnlen n)
  11. #endif
  12. {
  13. char buff[1000];
  14. register char *bp, *blast;
  15.  
  16. blast = buff + (n < 1000 ? n : 1000);
  17.  
  18. for(bp = buff ; bp<blast && *s!='\0' ; )
  19.     *bp++ = *s++;
  20. *bp = '\0';
  21. return system(buff);
  22. }
  23.