mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
c205f6c127
These files are currently not being used nor compiled in MariaDB. The use of large lists of 'case' statements in these source files are also not a great way to represent translated strings. This git history can be referred to when a better translation interface can be implemented in the future. Therefore, these files can be removed to cleanup the MariaDB codebase. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
58 lines
1.8 KiB
C
58 lines
1.8 KiB
C
/**************** RCMsg C Program Source Code File (.C) ****************/
|
|
/* PROGRAM NAME: RCMSG */
|
|
/* ------------- */
|
|
/* Version 1.3 */
|
|
/* */
|
|
/* COPYRIGHT */
|
|
/* ---------- */
|
|
/* (C) Copyright to the author Olivier BERTRAND: 2005 - 2014 */
|
|
/* */
|
|
/* WHAT THIS PROGRAM DOES */
|
|
/* ----------------------- */
|
|
/* This program simulates LoadString. */
|
|
/* */
|
|
/***********************************************************************/
|
|
#if !defined(XMSG)
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include "resource.h"
|
|
#include "rcmsg.h"
|
|
#if defined(NEWMSG)
|
|
#include "msgid.h"
|
|
#endif // NEWMSG
|
|
|
|
#if !defined(_WIN32)
|
|
#define stricmp strcasecmp
|
|
#endif // !_WIN32
|
|
|
|
char *msglang(void);
|
|
|
|
const char *GetMsgid(int id)
|
|
{
|
|
const char *p = NULL;
|
|
|
|
// This conditional until a real fix is found for MDEV-7304
|
|
switch (id) {
|
|
#include "enids.h"
|
|
#if defined(NEWMSG)
|
|
#include "encas.h"
|
|
#endif // NEWMSG
|
|
} // endswitch(id)
|
|
|
|
return p;
|
|
} // end of GetMsgid
|
|
|
|
int GetRcString(int id, char *buf, int bufsize)
|
|
{
|
|
const char *p = NULL;
|
|
char msg[32];
|
|
|
|
if (!(p = GetMsgid(id))) {
|
|
sprintf(msg, "ID=%d unknown", id);
|
|
p = msg;
|
|
} // endif p
|
|
|
|
return sprintf(buf, "%.*s", bufsize-1, p);
|
|
} // end of GetRcString
|
|
|
|
#endif // !XMSG
|