aboutsummaryrefslogtreecommitdiff
path: root/sys/libc/copen.c
blob: 144dc5d411096f0950dd476b8b464c29913af98c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
*/

#define import_spp
#define	import_libc
#define	import_xnames
#include <iraf.h>


/* C_OPEN -- FIO file open.
*/
int
c_open (
  char	*fname,			/* name of file to be opened	*/
  int	mode,			/* access mode			*/
  int	type			/* file type			*/
)
{
	int	fd;
	XINT  x_mode = mode, x_type = type;

	iferr (fd = (int) OPEN (c_sppstr(fname), &x_mode, &x_type))
	    return (ERR);
	else
	    return (fd);
}