---
name: "SLOG_RDEF_SetExtraNumOfRecDefs"
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_RDEF_SetExtraNumOfRecDefs"
---

# SLOG\_RDEF\_SetExtraNumOfRecDefs(3)

Write the starting file pointer SLOG\_recdefs\_table\_t to the slog's header and then set the maximum extra number of Record Definitions.

## NAME

SLOG\_RDEF\_SetExtraNumOfRecDefs -  Write the starting file pointer  SLOG\_recdefs\_table\_t to the slog's header and then set the maximum  extra number of Record Definitions.

## SYNOPSIS

```
int SLOG_RDEF_SetExtraNumOfRecDefs(       SLOG_STREAM  *slog,
                                    const SLOG_uint32   Nentries_extra )
```

## MODIFIED INPUT VARIABLES

- **slog**

  \- pointer to the SLOG\_STREAM where SLOG Record Definition Table is located.

## UNMODIFUED INPUT VARIABLES

- **Nentries\_extra**

  \- Number of extra record definitions to be reserved on the disk

## MODIFIED OUTPUT VARIABLES

- **returned value**

  \- integer status code.

## USAGE NOTES ON THIS SUBROUTINE

Notes on the Addition of Extra Record Definitions This note is to clarify the usage of SLOG\_RDEF\_XXX() routines especially while the user wants to add extra record definitions to the logfile when the process of addition of interval records to the logfile has been started, for instance if one needs to add user marker interval records.

Under normal circumstances, the record definition table is created by first opening the section of the logfile for storing the table using SLOG\_RDEF\_Open().  Then add the record definition using SLOG\_RDEF\_AddRecDef() and close the table section by SLOG\_RDEF\_Close().

In the case that the logfile involves interval records whose interval type are NOT known until the process of inserting of the interval records to the logfile has been started, one should open the SLOG\_RDEF\_Open().  Then add the known record definitions using SLOG\_RDEF\_AddRecDef().  However, one should NOT call SLOG\_RDEF\_Close() to close the table section.  Instead, SLOG\_RDEF\_SetExtraNumOfRecDefs() should be called to set the extra number of record definition entries needed( the number can be greater than what one actually needs ).  Then when user encounters a new interval record type, SLOG\_RDEF\_AddExtraRecDef() can then be called to add the new interval record type to the record definition table.  This has to be done before adding the interval record to the logfile using SLOG\_Irec\_ToOutputStream() which does NOT allow interval record of with unknown interval type to the record definition table.

## INCLUDE FILE NEEDED

slog\_recdefs.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
