]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | /* |
2 | * $Id$ | |
3 | * | |
4 | * $Log$ | |
5 | * Revision 1.3 1997/09/02 14:26:40 mclareni | |
6 | * WINNT correction | |
7 | * | |
8 | * Revision 1.2 1997/02/04 17:34:45 mclareni | |
9 | * Merge Winnt and 97a versions | |
10 | * | |
11 | * Revision 1.1.1.1.2.1 1997/01/21 11:29:44 mclareni | |
12 | * All mods for Winnt 96a on winnt branch | |
13 | * | |
14 | * Revision 1.1.1.1 1996/02/15 17:49:27 mclareni | |
15 | * Kernlib | |
16 | * | |
17 | */ | |
18 | #include "kerngen/pilot.h" | |
19 | #include "kerngen/fortranc.h" | |
20 | ||
21 | /*> ROUTINE SYSTEI | |
22 | CERN PROGLIB# Z265 SYSTEI .VERSION KERNFOR 4.31 911111 | |
23 | ORIG. 22/02/91, JZ | |
24 | Fortran interface routine to system | |
25 | ||
26 | ISTAT = SYSTEMF (TEXT) | |
27 | ||
28 | TEXT the command to be executed . | |
29 | ISTAT returns zero if successful | |
30 | */ | |
31 | #include <stdio.h> | |
32 | #include "kerngen/fortchar.h" | |
33 | ||
34 | #if defined(CERNLIB_QX_SC) | |
35 | int type_of_call systei_(ftext,nsize) | |
36 | #endif | |
37 | ||
38 | #if defined(CERNLIB_QXNO_SC) | |
39 | int type_of_call systei(ftext,nsize) | |
40 | #endif | |
41 | ||
42 | #if defined(CERNLIB_QXCAPT) | |
43 | # ifndef CERNLIB_MSSTDCALL | |
44 | int type_of_call SYSTEI(ftext,nsize) | |
45 | # else | |
46 | int type_of_call SYSTEI(ftext,len_ftext,nsize) | |
47 | # endif | |
48 | #endif | |
49 | ||
50 | #if defined(CERNLIB_QMCRY) | |
51 | _fcd ftext; | |
52 | #endif | |
53 | #if !defined(CERNLIB_QMCRY) | |
54 | char *ftext; | |
55 | #endif | |
56 | int *nsize; | |
57 | #ifdef CERNLIB_MSSTDCALL | |
58 | int len_ftext; | |
59 | #endif | |
60 | { | |
61 | char *ptname, *fchtak(); | |
62 | int system(); | |
63 | int istat; | |
64 | ||
65 | /* get memory and copy TEXT terminated */ | |
66 | ||
67 | ptname = fchtak(ftext,*nsize); | |
68 | if (ptname == NULL) goto bad; | |
69 | ||
70 | istat = system (ptname); | |
71 | free (ptname); | |
72 | return istat; | |
73 | ||
74 | bad: return -1; | |
75 | } | |
76 | /*> END <----------------------------------------------------------*/ |