Crewes Seismic I/O Library File Index. Function Documentation. Functions to access seimic header definitions, страница 10

value   value to place in the header

int seisioFileHdr_putI4 (int id, const char * hdrName, int32 hdrValue)

See also:

seisioFileHdr_putI2() (p.pagenum)

int seisioFileHdr_setHdr (int id, char * hdr)

Sets the file header from an array of chars (length must be 3600).

The header should be formatted in big endian binary. Returns non-zero on error (see seisio.h for error definitions).

Parameters:

id   identification number of the seismic file header instance to access

hdr   file header source

int seisioFileHdr_setText (int id, const char * text)

Sets the text segment of the supplied file header object from a string.

The text part of the file header is a 40 row x 80 col area of text. Each line starts with a CXX line prefix, where XX is the line number. The supplied string is pasted into columns 4 to 80. Each carriage return with the string (' ') causes text to be written to the start of the next line. Each row is padded with spaces so as to make it 80 characters wide. The last line will always contain "C40 END EBCDIC". The space after this may be filled with text, if the input string contains a sufficient number of lines (39 newlines).

Parameters:

id   identification number of the seismic file header instance to access

text   string of characters which are copied into text segment of the file  header. Embedded newlines (' ') indicate where line breaks should occur.

Returns:

non-zero if unable to fit all of fileHdrStr into the text segment.

int seisioFileHdr_setTextLine (int id, const char * text, int line)

Sets a single line of the text segment of the file header from a string.

The file will start with CXX, where XX == line number. ' ' characters in the input string are replaced with spaces Returns non-zero if unable to fit all of fileHdrStr into the text segment.

Parameters:

id   identification number of the seismic file header instance to access

text   string of characters to store in the text segment of the file header


seisioHdrDefn.c File Reference

seismic file header-word-definition object.

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include "seisio.h"

#include "seisioHdrDefn.h"

Functions

·  int seisioHdrDefn_new ()

Creates a new seismic header definition instance.

·  int seisioHdrDefn_close (int id)

Deallocates memory for the corresponding seismic header definition instance.

·  int seisioHdrDefn_readFromFile (int id, char *filename)

Reads header definitions from a file into a header definition object.

·  int seisioHdrDefn_loadDefaults (int id)

Initializes the seismic header definition instance from defaults.

·  int seisioHdrDefn_removeAll (int id)

Removes all header definitions from a header defintion object.

·  int seisioHdrDefn_get (int id, const char *hdrName, char hdrType, int *type, int *byte)

Find header definition corresponding to a name and type (file or header).

·  int seisioHdrDefn_set (int id, const char *hdrName, const char *hdrDescription, char hdrType, int type, int byte)

Sets the header definition corresponding to a header definition name.

·  int seisioHdrDefn_writeToFile (int id, char *filename)

Writes the current state of the seismic definition instance to a file.

·  char** seisioHdrDefn_getHdrNames (int id, char hdrType, int *numHdrNames, int *errNum)

Returns an array of strings containing all the current header names.

·  char** seisioHdrDefn_getHdrDescriptions (int id, char hdrType, int *numHdrDescriptions, int *errNum)

Returns an array of strings containing all the current header descriptions.

·  int* seisioHdrDefn_getHdrValueTypes (int id, char hdrType, int *numHdrValueTypes, int *errNum)

Returns an array of integers containing all the current header value types.

·  int seisioHdrDefn_compareNodes (SeisioHdrDefnNode *a, SeisioHdrDefnNode *b, void *param)