#ifdef __cplusplus
extern "C" {
#endif
#ifndef H_SCCSID
#include <sccs.h>
#endif /* ! H_SCCSID */
H_SCCSID(@(#)mesg.h	1.2	AIX);	/* Modified 8/5/90 02:42:23 */
/* @(#)mesg.h	1.6  com/inc,3.1,8924 6/16/89 13:09:13 */
/*
 * INC: mesg.h
 *                                                                    
 * ORIGIN: IBM
 *
 * IBM CONFIDENTIAL
 * Copyright International Business Machines Corp. 1988
 * Unpublished Work
 * All Rights Reserved
 * Licensed Material - Property of IBM
 *
 * RESTRICTED RIGHTS LEGEND
 * Use, Duplication or Disclosure by the Government is subject to
 * restrictions as set forth in paragraph (b)(3)(B) of the Rights in
 * Technical Data and Computer Software clause in DAR 7-104.9(a).
 */                                                                   

#ifndef _H_MESG
#define _H_MESG

#include <nl_types.h>
#include <limits.h>
#define CAT_MAGIC 	505
#define CATD_ERR 	((nl_catd) -1)
#define NL_MAXOPEN	10

CATD *_do_open();

struct _message {
	unsigned short 	_set,
			_msg;
	char 		*_text;
	unsigned	_old;
};

struct _header {
	unsigned short	_magic;
	unsigned short	_n_sets,
			_setmax;
	char 		_filler[16];
	unsigned short	_n_all_msgs,
			_all_msgs_max;
};
struct _catset {
	unsigned short 	_setno,
			_n_msgs;
	struct _msgptr 	*_mp;
	char	**_msgtxt;
};

#ifndef _H_STDIO
#include <stdio.h>
#endif
struct catalog_descriptor {
	char		*_mem;
	char		*_name;
	FILE 		*_fd;
	struct _header 	*_hd;
	struct _catset 	*_set;
	int		_setmax;
	int		_stat;
};

struct _msgptr {
	unsigned short 	_msgno,
			_msglen;
	unsigned long	_offset;
};
#endif
#ifdef __cplusplus
}
#endif
