mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
MacOS only
This commit is contained in:
parent
37ec12f250
commit
e024b28c9e
@ -333,10 +333,13 @@ static void XPStringsNotFoundAlert()
|
||||
ExitToShell();
|
||||
}
|
||||
|
||||
char * XP_GetBuiltinString(long i);
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
char * XP_GetString( int xpStringID )
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
/*
|
||||
// Add the offset (the one added by the perl script) but leave it as 32 bits, so
|
||||
// we can check the range.
|
||||
int32 resID = xpStringID + RES_OFFSET;
|
||||
@ -356,12 +359,73 @@ char * XP_GetString( int xpStringID )
|
||||
// You should call XP_STRDUP or otherwise store the string if you
|
||||
// want it to persist
|
||||
return GetCString(resID);
|
||||
*/
|
||||
|
||||
static char buf[128];
|
||||
static char strclass[128];
|
||||
char *ret;
|
||||
char *type;
|
||||
//XrmValue value;
|
||||
|
||||
/*
|
||||
(void) PR_snprintf(buf, sizeof (buf),
|
||||
"%s.strings.%d", fe_progclass, xpStringID + RES_OFFSET);
|
||||
(void) PR_snprintf(strclass, sizeof (strclass),
|
||||
"%s.Strings.Number", fe_progclass);
|
||||
if (fe_display && ((database = XtDatabase(fe_display))) &&
|
||||
XrmGetResource(database, buf, strclass, &type, &value))
|
||||
{
|
||||
return value.addr;
|
||||
}
|
||||
|
||||
if ((ret = mcom_cmd_xfe_xfe_err_h_strings (i + RES_OFFSET)))
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
*/
|
||||
return XP_GetBuiltinString((long)xpStringID);
|
||||
|
||||
}
|
||||
|
||||
extern "C" char * mcom_include_merrors_i_strings (long);
|
||||
extern "C" char * mcom_include_secerr_i_strings (long);
|
||||
extern "C" char * mcom_include_sec_dialog_strings(long);
|
||||
extern "C" char * mcom_include_sslerr_i_strings (long);
|
||||
extern "C" char * mcom_include_xp_error_i_strings(long);
|
||||
extern "C" char * mcom_include_xp_msg_i_strings (long);
|
||||
|
||||
char * XP_GetBuiltinString(long i);
|
||||
//----------------------------------------------------------------------------------------
|
||||
char *
|
||||
XP_GetBuiltinString(long i)
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
static char buf[128];
|
||||
char *ret;
|
||||
|
||||
i += RES_OFFSET;
|
||||
if
|
||||
(
|
||||
((ret = (mcom_include_merrors_i_strings (i)) )) ||
|
||||
((ret = (mcom_include_secerr_i_strings (i)) )) ||
|
||||
((ret = (mcom_include_sec_dialog_strings(i)) )) ||
|
||||
((ret = (mcom_include_sslerr_i_strings (i)) )) ||
|
||||
((ret = (mcom_include_xp_error_i_strings(i)) )) ||
|
||||
((ret = (mcom_include_xp_msg_i_strings (i)) ))
|
||||
)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
(void) sprintf(buf, "XP_GetBuiltinString: %d not found", i);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
//-----------------------------------
|
||||
static void InitializeStrings()
|
||||
//-----------------------------------
|
||||
{
|
||||
/*
|
||||
static Boolean initialized = false;
|
||||
if (initialized)
|
||||
return;
|
||||
@ -404,6 +468,7 @@ static void InitializeStrings()
|
||||
MoveResourceMapBelowApp();
|
||||
|
||||
UseResFile(currentFileRefNum);
|
||||
*/
|
||||
} // InitializeStrings
|
||||
|
||||
void MoveResourceMapBelowApp()
|
||||
|
@ -17,10 +17,23 @@
|
||||
*/
|
||||
|
||||
|
||||
/* BEGIN NEW_STRING_LIB */
|
||||
/* See the long commend in xpstring.xps for how this whole thing works */
|
||||
|
||||
/*#include <stdio.h>*/
|
||||
|
||||
/* Manually include the prefix file, so that MWCPPC picks it up */
|
||||
#include "MacConfigInclude.h"
|
||||
|
||||
/*END NEW NEW_STRING_LIB*/
|
||||
|
||||
/* the prefix file should have already defined OTUNIXERRORS at this stage */
|
||||
#include <OpenTransport.h>
|
||||
#include "OpenTransport.h"
|
||||
|
||||
|
||||
/* BEGIN NEW_STRING_LIB */
|
||||
#define RESOURCE_STR 1
|
||||
/*END NEW NEW_STRING_LIB*/
|
||||
|
||||
#pragma export on
|
||||
|
||||
|
Binary file not shown.
@ -28,6 +28,8 @@ extern int XP_DOCINFO_2;
|
||||
extern int XP_DOCINFO_3;
|
||||
extern int XP_DOCINFO_4;
|
||||
|
||||
/*#include "allxpstr.h"*/
|
||||
|
||||
PUBLIC int16
|
||||
INTL_CharSetNameToID(char *charset)
|
||||
{
|
||||
|
@ -26,6 +26,11 @@
|
||||
#include "mkgeturl.h"
|
||||
#include "cvunzip.h"
|
||||
|
||||
/* BEGIN NEW_STRING_LIB */
|
||||
#ifdef XP_MAC
|
||||
#include "allxpstr.h"
|
||||
#endif
|
||||
/* END NEW_STRING_LIB */
|
||||
#ifdef MOZILLA_CLIENT
|
||||
|
||||
#include "mkstream.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user