Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Cif_Msginsert(3) — Sun WorkShop 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Cif(3)

Cif_Close(3)

Cif_Duplicate(3)

Cif_Errstring(3)

Cif_Free(3)

Cif_Getpos(3)

Cif_Getrecord(3)

Cif_Memmode(3)

Cif_Open(3)

Cif_Release(3)

Cif_Setpos(3)

Cif_Getfiledir(3)

Cif_Getunitdir(3)

Cif_Recgroup(3)

cifconv(1)

CIF_MSGINSERT(3)

NAME

Cif_Msginsert - Inserts message arguments into message text

SYNOPSIS

#define CIF_VERSION 2
#include <cif.h>
 int Cif_Msginsert (msgbuff, msgstruct, newbuff, nblen)
char ∗msgbuff;
struct Cif_generic ∗msgstruct;
char ∗newbuff;
int nblen;

IMPLEMENTATION

All Sun SPARC systems

DESCRIPTION

The compiler information file (CIF) message structures (Cif_c_message and Cif_message) reference messages by number.  The message text must be retrieved from the message catalog by using catgetmsg.  After the text is available, the Cif_Msginsert routine combines the message arguments from the message structure (msgstruct) with the text (msgbuff) and produces a printable message (newbuff).  newbuff must consist of nblen characters.  If the message is too long to fit in newbuff, Cif_Msginsert truncates the end of the message. 

CIF_VERSION defines the library version.  The default is 1.  The newest version is 2 and should be used with this routine. 

See the Cif(3) man page for a discussion about CIF information, format, and versions. 

RETURN VALUES

A positive return value indicates successful completion.  A negative return value indicates that an error occurred. 

EXAMPLES

The following example, when used in a program, produces a printable message from the message number contained in a Cif_message structure: char msgtext[100]; struct Cif_message ∗msg; char newtext[100];      .       .       .  (void) Cif_Msginsert (msgtext, (struct Cif_generic ∗)msg, newtext, 100);      .       .       . 

SEE ALSO

Cif(3) for general information about CIFs
Cif_Close(3), Cif_Duplicate(3), Cif_Errstring(3), Cif_Free(3), Cif_Getpos(3), Cif_Getrecord(3), Cif_Memmode(3), Cif_Open(3), Cif_Release(3), Cif_Setpos(3) for information about general CIF library routines
Cif_Getfiledir(3), Cif_Getunitdir(3), Cif_Recgroup(3) for information about
binary-format specific CIF library routines

cifconv(1) for information about ASCII to binary format conversion in the

Compiler information file CIF Compiler information Compiler listings

SunOS 3.0.1  —  Last change:

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026