]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MINICERN/packlib/kernlib/kerngen/ccgen/unlini.c
This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / MINICERN / packlib / kernlib / kerngen / ccgen / unlini.c
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:50  mclareni
9  * Merge Winnt and 97a versions
10  *
11  * Revision 1.1.1.1.2.1  1997/01/21 11:29:47  mclareni
12  * All mods for Winnt 96a on winnt branch
13  *
14  * Revision 1.1.1.1  1996/02/15 17:49:28  mclareni
15  * Kernlib
16  *
17  */
18 #include "kerngen/pilot.h"
19 #include "kerngen/fortranc.h"
20
21 /*>    ROUTINE UNLINI
22   CERN PROGLIB# Z265    UNLINI          .VERSION KERNFOR  4.31  911111
23   ORIG. 15/10/91, JZ
24   Fortran interface routine to unlink
25
26       ISTAT =  UNLINKF (NAME)
27
28           NAME  the name of the file to be deleted
29          ISTAT  returns zero if successful
30 */
31 #include <stdio.h>
32 #include "kerngen/fortchar.h"
33 #if defined(CERNLIB_QX_SC)
34 int type_of_call unlini_(fname,lgname)
35 #endif
36 #if defined(CERNLIB_QXNO_SC)
37 int type_of_call unlini(fname,lgname)
38 #endif
39 #if defined(CERNLIB_QXCAPT)
40 #  ifndef CERNLIB_MSSTDCALL
41      int type_of_call UNLINI(fname,lgname)
42 #  else
43      int type_of_call UNLINI(fname,lfname,lgname)
44      int lfname;
45 #  endif
46 #endif
47 #if defined(CERNLIB_QMCRY)
48       _fcd  fname;
49 #endif
50 #if !defined(CERNLIB_QMCRY)
51       char *fname;
52 #endif
53       int  *lgname;
54 {
55       char *ptname, *fchtak();
56       int  istat, unlink();
57
58 /*        get memory and copy NAME terminated  */
59
60       ptname = fchtak(fname,*lgname);
61       if (ptname == NULL)           goto bad;
62
63       istat = unlink (ptname);
64       free (ptname);
65       return istat;
66
67 bad:  return -1;
68 }
69 /*> END <----------------------------------------------------------*/
70 #ifdef CERNLIB_TCGEN_UNLINKF
71 #undef CERNLIB_TCGEN_UNLINKF
72 #endif