c_getstr - Retrieves the TAE parameter of type string

SYNTAX

#include "las.h"

FUNCTION c_getstr (block, param, count, len, buffer)

     struct PARBLK      *block;
     char               *param;
     long               *count;
     long               *len;
     char               *buffer;

PARAMETERS

block (input, PARBLK)

TAE parameter block passed by reference. It is assumed that TAE has been initialized prior to calling c_getstr().

param (input, character, length (*))

Defines the TAE parameter name in the TAE parameter block which contains the string(s).

count (input, long)

Defines the number of entries in the parameter array specified by param to copy into buffer.

len (input, long)

Defines the offset between the beginnings of strings as they are copied into the buffer. This parameter should be at least the size of the string in TAE plus one. The buffer will be filled in every len bytes.

buffer (output, character, length(*))

The strings in the TAE parameter block specified by param are copied into this part of memory. This buffer must have allocated to it at least (count * len) bytes. It is assumed this memory has been allocated prior to calling c_getstr(). Be warned that if len is less than or equal to the length specified in the TAE parameter block, c_getstr will possibly try to write past the end of your allocated buffer.

DESCRIPTION

The c_getstr() function retrieves TAE string parameters located in the TAE parameter block under the name of param. It checks to see that the parameter name exists and does error checking on the data type. It does NOT return from these errors.

RETURN VALUE

c_getstr() returns

   It's return value is the number of entries actually read in.
   Return value 0 means the parameter has a "null value"
   and -1 means "no value".

The routine may output other informational error messages.