1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1996, by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 27 #pragma ident "%Z%%M% %I% %E% SMI" 28 29 /* 30 * MKS interface to XPG message internationalization routines. 31 * Copyright 1989, 1992 by Mortice Kern Systems Inc. All rights reserved. 32 * 33 ** Written by Trevor John Thompson 34 */ 35 #ifdef M_RCSID 36 #ifndef lint 37 static char rcsID[] = "$Header: /rd/src/libc/i18n/rcs/m_strmsg.c 1.5 1992/07/16 19:08:40 tj Exp $"; 38 #endif 39 #endif 40 41 #define I18N 1 /* InternationalizatioN on */ 42 43 #include <mks.h> 44 #include <stdlib.h> 45 46 LDEFN char* 47 m_strmsg(str) 48 const char* str; 49 { 50 char* cp; 51 int id = (int)strtol(str, &cp, 0); 52 53 if (cp[0]!='#' || cp[1]!='#') /* no "##" delimiter */ 54 return ((char *)str); 55 else 56 return (m_textmsg(id, &cp[2], "")); 57 } 58