MacOS only

This commit is contained in:
saari%netscape.com 1998-09-25 14:45:53 +00:00
parent 37ec12f250
commit e024b28c9e
5 changed files with 86 additions and 1 deletions

View File

@ -333,10 +333,13 @@ static void XPStringsNotFoundAlert()
ExitToShell(); ExitToShell();
} }
char * XP_GetBuiltinString(long i);
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
char * XP_GetString( int xpStringID ) char * XP_GetString( int xpStringID )
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
{ {
/*
// Add the offset (the one added by the perl script) but leave it as 32 bits, so // Add the offset (the one added by the perl script) but leave it as 32 bits, so
// we can check the range. // we can check the range.
int32 resID = xpStringID + RES_OFFSET; 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 // You should call XP_STRDUP or otherwise store the string if you
// want it to persist // want it to persist
return GetCString(resID); 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 void InitializeStrings()
//----------------------------------- //-----------------------------------
{ {
/*
static Boolean initialized = false; static Boolean initialized = false;
if (initialized) if (initialized)
return; return;
@ -404,6 +468,7 @@ static void InitializeStrings()
MoveResourceMapBelowApp(); MoveResourceMapBelowApp();
UseResFile(currentFileRefNum); UseResFile(currentFileRefNum);
*/
} // InitializeStrings } // InitializeStrings
void MoveResourceMapBelowApp() void MoveResourceMapBelowApp()

View File

@ -17,10 +17,23 @@
*/ */
/* BEGIN NEW_STRING_LIB */
/* See the long commend in xpstring.xps for how this whole thing works */ /* 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 */ /* 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 #pragma export on

Binary file not shown.

View File

@ -28,6 +28,8 @@ extern int XP_DOCINFO_2;
extern int XP_DOCINFO_3; extern int XP_DOCINFO_3;
extern int XP_DOCINFO_4; extern int XP_DOCINFO_4;
/*#include "allxpstr.h"*/
PUBLIC int16 PUBLIC int16
INTL_CharSetNameToID(char *charset) INTL_CharSetNameToID(char *charset)
{ {

View File

@ -26,6 +26,11 @@
#include "mkgeturl.h" #include "mkgeturl.h"
#include "cvunzip.h" #include "cvunzip.h"
/* BEGIN NEW_STRING_LIB */
#ifdef XP_MAC
#include "allxpstr.h"
#endif
/* END NEW_STRING_LIB */
#ifdef MOZILLA_CLIENT #ifdef MOZILLA_CLIENT
#include "mkstream.h" #include "mkstream.h"