gpp4  1.3.1
Functions
cmap_open.c File Reference

Opening CCP4-format map files. More...

#include <string.h>
#include <math.h>
#include <stdarg.h>
#include <fcntl.h>
#include "cmaplib.h"
#include "cmap_header.h"
#include "cmap_labels.h"
#include "cmap_errno.h"

Functions

CMMFileinit_cmap_read (void)
 
CMMFileinit_cmap_write (void)
 
int is_cmap (CCP4File *file)
 
void * ccp4_cmap_open (const char *filename, int mode)
 

Detailed Description

Opening CCP4-format map files.

Author
Charles Ballard

Function Documentation

void* ccp4_cmap_open ( const char *  filename,
int  mode 
)

The file is opened for reading/writing.

Parameters
filename(char *) the filename
mode(int) the i/o mode , possible values are O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, O_TMP, O_CREAT, O_TRUNC - see ccp4_sysdep.h
Returns
(void *) CMMFile structure

References ccp4_file_close(), ccp4_file_open(), ccp4_file_rarch(), ccp4_file_raw_setstamp(), ccp4_signal(), _CMMFile::file_name, init_cmap_read(), init_cmap_write(), is_cmap(), parse_mapheader(), parse_maplabels(), _CMMFile::stream, write_mapheader(), and write_maplabels().

Referenced by FORTRAN_SUBR().

CMMFile* init_cmap_read ( void  )

Internal: malloc CMMFile struct for reading into

Returns
CMMFile

Referenced by ccp4_cmap_open().

CMMFile* init_cmap_write ( void  )

Internal: malloc CMMFile struct for writing

Returns
CMMFile

References _CMMFile_Symop::offset.

Referenced by ccp4_cmap_open().

int is_cmap ( CCP4File file)

Internal: Identify file as a ccp4 format map

Parameters
fileThe (CCP4File *) struct representing the file.
Returns
non-zero on true, 0 on false

References ccp4_file_raw_seek(), ccp4_file_readchar(), and ccp4_file_rewind().

Referenced by ccp4_cmap_open().