mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
5d8311960a
They are still experimental and should not be used in production. added: storage/connect/encas.h storage/connect/english.msg storage/connect/enids.h storage/connect/frcas.h storage/connect/french.msg storage/connect/frids.h storage/connect/frmsg.h modified: storage/connect/connect.cc storage/connect/engmsg.h storage/connect/filamdbf.cpp storage/connect/global.h storage/connect/ha_connect.cc storage/connect/msgid.h storage/connect/plgdbutl.cpp storage/connect/plugutil.c storage/connect/rcmsg.c storage/connect/resource.h storage/connect/tabfmt.h - Fix global variable not being properly initialized (MDEV-6690, MDEV-7094) modified: storage/connect/ha_connect.cc storage/connect/plugutil.c storage/connect/user_connect.cc storage/connect/xindex.cpp - Implement Rewind for ODBC tables (MDEV-7097) modified: storage/connect/odbconn.cpp storage/connect/odbconn.h storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp - Reset N when reopening MYSQL tables modified: storage/connect/tabmysql.cpp
61 lines
1.9 KiB
C
61 lines
1.9 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
|
|
|
|
char *msglang(void);
|
|
|
|
char *GetMsgid(int id)
|
|
{
|
|
char *p = NULL;
|
|
|
|
if (!stricmp(msglang(), "french"))
|
|
switch (id) {
|
|
#include "frids.h"
|
|
#if defined(NEWMSG)
|
|
#include "frcas.h"
|
|
#endif // NEWMSG
|
|
} // endswitch(id)
|
|
|
|
else // English
|
|
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)
|
|
{
|
|
char *p = NULL, 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
|