IP_MsgLisp

Cogent API and Utilities: Version 4.1
Prev |  | Next

# `IP_MsgLisp`

`IP_MsgLisp` -- constructs a formatted text message.

## Syntax

``int IP_MsgLisp`(IP_Msg* message, int status, char* format ...);`

## Arguments

`message`

  A pointer to a message.

`status`

  The message status to be set.

`format`

  A `UT_LispString` style format string followed by a variable number of arguments.

## Returns

`0` on success; or `-1` if the message could not be resized, and `errno` is set:

- ENOSYS - the message is either not resizable or not dynamic.

- ENOMEM - the memory reallocation returned `NULL`.

The `msg` portion of message is set to `NULL`.

## Description

This function constructs a formatted text message in the data portion of the message by calling `UT_LispString`. If the message data is too short to hold the formatted text, then the message size is increased by progressive factors of two and the format attempt is repeated until the message can be written or until a call to `IP_MsgResize` fails. The resulting message is submitted to `IP_MsgCascade` with a subtype of `IP_SUB_LISP` and the status as supplied in the status argument to `IP_MsgLisp`.

## See Also

Messages, `IP_MsgResize`

Prev | Home | Next
`IP_MsgInfoReplyRaw` | Up | `IP_MsgRaw`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.