xref: /csrg-svn/usr.bin/f77/libF77/CCI/system_.c (revision 47942)
1*47942Sbostic /*-
2*47942Sbostic  * Copyright (c) 1991 The Regents of the University of California.
3*47942Sbostic  * All rights reserved.
4*47942Sbostic  *
5*47942Sbostic  * This code is derived from software contributed to Berkeley by
6*47942Sbostic  * Computer Consoles Inc.
7*47942Sbostic  *
8*47942Sbostic  * %sccs.include.proprietary.c%
929957Smckusick  */
1029957Smckusick 
11*47942Sbostic #ifndef lint
12*47942Sbostic static char sccsid[] = "@(#)system_.c	5.2 (Berkeley) 04/12/91";
13*47942Sbostic #endif /* not lint */
14*47942Sbostic 
1529957Smckusick /* f77 interface to system routine */
1629957Smckusick 
system_(s,n)1729957Smckusick system_(s, n)
1829957Smckusick register char *s;
1929957Smckusick long int n;
2029957Smckusick {
2129957Smckusick char buff[1001];
2229957Smckusick register char *bp, *blast;
2329957Smckusick 
2429957Smckusick blast = buff + (n<1000 ? n : 1000L);
2529957Smckusick 
2629957Smckusick for(bp = buff ; bp<blast && *s!='\0' ; )
2729957Smckusick 	*bp++ = *s++;
2829957Smckusick *bp = '\0';
2929957Smckusick system(buff);
3029957Smckusick }
31