Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* $Id: mycat.h,v 1.1 2003-11-07 15:20:41 eraxxon Exp $ */ 00002 /* -*-Mode: C;-*- */ 00003 /* * BeginRiceCopyright ***************************************************** 00004 * 00005 * ******************************************************* EndRiceCopyright */ 00006 00007 #ifndef MY_CAT_H 00008 #define MY_CAT_H 1 00009 00010 /*************************** System Include Files ***************************/ 00011 00012 #define DISABLE_NL_TYPES_SYMBOL_RENAMING 1 /* nl_types workaround */ 00013 #include <nl_types.h> 00014 #undef DISABLE_NL_TYPES_SYMBOL_RENAMING 00015 00016 /**************************** User Include Files ****************************/ 00017 00018 /*************************** Forward Declarations ***************************/ 00019 00020 /****************************************************************************/ 00021 00022 /* This implements a replacement of the gencat, catopen(), catclose(), 00023 catgets(), catgetmsg() functionality provided by <nl_types.h> and 00024 libc. The motivation is that neither Cygwin nor MacOS provide a 00025 gencat or catgetmsg(), and we need a quick workaround. 00026 00027 Caveats: 00028 - While a full replacement w.r.t. Open64's (English) messages, 00029 this is not a full scale replacement of the message catalogue 00030 system. For example, the messages here are hard coded and there 00031 is no support for other languages. 00032 - Another important difference between this implementation and a 00033 real version is that hard coding the message strings means that 00034 they are compiled into the binary and reside in core during 00035 runtime (consuming about 170 Kb). A real version would allow for 00036 the messages to be stored on disk. 00037 00038 Data comes from crayf90/fe90/cf90.i which was produced from 00039 crayf90/fe90/cf90.msgs. 00040 00041 cf. libcsup/msgnew/catgetmsg.c 00042 cf. libcsup/msgnew/catmsgfmt.c 00043 00044 */ 00045 00046 #ifdef __cplusplus 00047 extern "C" { 00048 #endif 00049 00050 extern nl_catd my_catopen(const char *name, int oflag); 00051 extern int my_catclose(nl_catd catd); 00052 00053 extern char *my_catgets(nl_catd catd, 00054 int set_num, 00055 int msg_num, 00056 const char *s); 00057 00058 extern char* my_catgetmsg(nl_catd catd, 00059 int set_num, 00060 int msg_num, 00061 char *buf, 00062 int buflen); 00063 00064 extern char* my_catmsgfmt(const char *cmdname, 00065 const char *groupcode, 00066 int msgnum, 00067 const char *severity, 00068 const char *msgtext, 00069 char *buf, 00070 int buflen, 00071 const char *position, 00072 const char *debug); 00073 00074 #ifdef __cplusplus 00075 } 00076 #endif 00077 00078 /****************************************************************************/ 00079 00080 #endif /* MY_CAT_H */