---
name: "SLOG_Irec_FromInputStream"
section: "3"
platform: "linux"
package: "mpi-doc"
version: "1.2.5.3-5"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/SLOG_Irec_FromInputStream"
---

# SLOG\_Irec\_FromInputStream(3)

Return a pointer to the next interval record in the given SLOG\_STREAM. The interval record returned can be real or pseudo record.

## NAME

SLOG\_Irec\_FromInputStream -  Return a pointer to the next interval  record in the given SLOG\_STREAM. The interval record returned can be real or pseudo record.

## SYNOPSIS

```
const SLOG_intvlrec_t *
SLOG_Irec_FromInputStream( SLOG_STREAM *slog, int *irc )
```

## MODIFIED INPUT VARIABLES

- **slog**

  \- pointer to the SLOG\_STREAM where interval record is retrieved.

- **irc**

  \- pointer to the returned integer status code.

## MODIFIED OUTPUT VARIABLES

- **returned value**

  \- pointer to the next interval record of type  SLOG\_intvlrec\_t in the frame buffer.  The "const"  qualifier indicates that user should NOT modify the content.  The pointer is NULL when the routine  encounters error or end of file.

## USAGE NOTES ON THIS SUBROUTINE

The routine returns a pointer to the interval record of the various Bbuf in current frame buffer in the SLOG\_STREAM given.  The routine does NOT create new node/irec.  It just simply returns a pointer to the existing one in the bi-directional linked list( an internal data structure ).  If one wants to modify the content of the interval record without modification of the specified bi-directional linked node, one should use SLOG\_Irec\_Copy() to copy the returned record content to a new record.  The routine also ADVANCES the internal pointer of the specified linked list buffer.  Also, the routine does NOT gurantee the memory associated with previously \_returned\_ interval record be retained in the next call of the routine.  So if one wants to keep interval record for future reference, one need to use SLOG\_Irec\_Copy() to copy the content of the interval record to another memory location \_\_BEFORE\_\_ calling SLOG\_Irec\_FromInputStream() again.  The example program, slog\_readtest.c shows the typical way of using this subroutine.

## INCLUDE FILE NEEDED

slog.h

## NOTES ON SLOG RETURN STATUS CODE

There are 5 allowed SLOG returned status codes.  They include SLOG\_SUCCESS, SLOG\_FAIL and SLOG\_EOF.  Their actual values are defined in slog.h

SLOG\_SUCCESS is returned when no error is encountered.

SLOG\_FAIL is returned when error is encounted.

SLOG\_EOF is returned when End of file is encounted.

There are also SLOG\_TRUE and SLOG\_FALSE which are sued as boolean values, in particular they are used in boolean functions which are usually named as IsXXXXX(), AreXXXXX() and HasXXXXX().\

## LOCATION
