mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 13:04:28 +00:00
Removing unused MORK_OBSOLETE and MORK_ALONE code. r=bienvenu, sr=alecf.
This commit is contained in:
parent
7a8f056a0b
commit
e5534233ce
@ -50,49 +50,11 @@
|
||||
|
||||
//3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
|
||||
|
||||
/* ----- ----- ----- ----- MORK_OBSOLETE ----- ----- ----- ----- */
|
||||
#if defined(MORK_OBSOLETE) || defined(MORK_ALONE)
|
||||
|
||||
#include <Types.h>
|
||||
//#include "plstr.h"
|
||||
|
||||
static void // copied almost verbatim from the IronDoc debugger sources:
|
||||
mork_mac_break_string(register const char* inMessage) /*i*/
|
||||
{
|
||||
Str255 pascalStr; // to hold Pascal string version of inMessage
|
||||
mork_u4 length = MORK_STRLEN(inMessage);
|
||||
|
||||
// if longer than maximum 255 bytes, just copy 255 bytes worth
|
||||
pascalStr[ 0 ] = (mork_u1) ((length > 255)? 255 : length);
|
||||
if ( length ) // anything to copy? */
|
||||
{
|
||||
register mork_u1* p = ((mork_u1*) &pascalStr) + 1; // after length byte
|
||||
register mork_u1* end = p + length; // one past last byte to copy
|
||||
while ( p < end ) // more bytes to copy?
|
||||
{
|
||||
register int c = (mork_u1) *inMessage++;
|
||||
if ( c == ';' ) // c is the MacsBug ';' metacharacter?
|
||||
c = ':'; // change to ':', rendering harmless in a MacsBug context
|
||||
*p++ = (mork_u1) c;
|
||||
}
|
||||
}
|
||||
|
||||
DebugStr(pascalStr); /* call Mac debugger entry point */
|
||||
}
|
||||
#endif /*MORK_OBSOLETE*/
|
||||
/* ----- ----- ----- ----- MORK_OBSOLETE ----- ----- ----- ----- */
|
||||
|
||||
void mork_assertion_signal(const char* inMessage)
|
||||
{
|
||||
#if defined(MORK_OBSOLETE) || defined(MORK_ALONE)
|
||||
mork_mac_break_string(inMessage);
|
||||
#endif /*MORK_OBSOLETE*/
|
||||
|
||||
#if defined(MORK_WIN) || defined(MORK_MAC)
|
||||
// asm { int 3 }
|
||||
#ifndef MORK_ALONE
|
||||
NS_ASSERTION(0, inMessage);
|
||||
#endif /*MORK_ALONE*/
|
||||
#endif /*MORK_WIN*/
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,6 @@
|
||||
// { %%%%% begin platform defs peculiar to Mork %%%%%
|
||||
|
||||
//#define XP_MAC 1
|
||||
//#define MORK_ALONE 1
|
||||
|
||||
#ifdef XP_MAC
|
||||
#define MORK_MAC 1
|
||||
@ -75,10 +74,6 @@
|
||||
#define MORK_BEOS 1
|
||||
#endif
|
||||
|
||||
#ifdef MORK_OBSOLETE
|
||||
#undef MORK_MAC
|
||||
#endif
|
||||
|
||||
// } %%%%% end platform defs peculiar to Mork %%%%%
|
||||
|
||||
#if defined(MORK_WIN) || defined(MORK_UNIX) || defined(MORK_MAC) || defined(MORK_BEOS)
|
||||
@ -93,9 +88,7 @@
|
||||
#include <unistd.h> /* for SEEK_SET, SEEK_END */
|
||||
#endif
|
||||
|
||||
#ifndef MORK_ALONE
|
||||
#include "nsDebug.h"
|
||||
#endif /*MORK_ALONE*/
|
||||
|
||||
#define MORK_ISPRINT(c) isprint(c)
|
||||
|
||||
@ -106,18 +99,6 @@
|
||||
#define MORK_FILECLOSE(file) fclose(file)
|
||||
#endif /*MORK_WIN*/
|
||||
|
||||
#ifdef MORK_OBSOLETE
|
||||
#include "xp_file.h"
|
||||
#include <ctype.h>
|
||||
#define MORK_ISPRINT(c) isprint(c)
|
||||
|
||||
#define MORK_FILETELL(file) XP_FileTell(file)
|
||||
#define MORK_FILESEEK(file, where, how) XP_FileSeek(file, where, how)
|
||||
#define MORK_FILEREAD(outbuf, insize, file) XP_FileRead(outbuf, insize, file)
|
||||
#define MORK_FILEFLUSH(file) XP_FileFlush(file)
|
||||
#define MORK_FILECLOSE(file) XP_FileClose(file)
|
||||
#endif /*MORK_OBSOLETE*/
|
||||
|
||||
/* ===== separating switchable features ===== */
|
||||
|
||||
#define MORK_ENABLE_ZONE_ARENAS 1 /* using morkZone for pooling */
|
||||
@ -144,7 +125,7 @@
|
||||
#define mork_kTAB '\011'
|
||||
#define mork_kCRLF "\015\012" /* A CR LF equivalent string */
|
||||
|
||||
#if defined(MORK_MAC) || defined(MORK_OBSOLETE)
|
||||
#if defined(MORK_MAC)
|
||||
# define mork_kNewline "\015"
|
||||
# define mork_kNewlineSize 1
|
||||
#else
|
||||
@ -171,10 +152,6 @@ extern void mork_assertion_signal(const char* inMessage);
|
||||
// { %%%%% begin standard c utility methods %%%%%
|
||||
/*define MORK_USE_XP_STDLIB 1*/
|
||||
|
||||
#ifdef MORK_OBSOLETE
|
||||
#define MORK_PROVIDE_STDLIB 1
|
||||
#endif /*MORK_OBSOLETE*/
|
||||
|
||||
#if defined(MORK_WIN) || defined(MORK_UNIX) || defined(MORK_MAC) || defined(MORK_BEOS)
|
||||
#define MORK_USE_C_STDLIB 1
|
||||
#endif /*MORK_WIN*/
|
||||
|
@ -268,7 +268,7 @@ morkFile::NewFileErrnoError(morkEnv* ev) const
|
||||
|
||||
// ````` ````` ````` ````` newlines ````` ````` ````` `````
|
||||
|
||||
#if defined(MORK_MAC) || defined(MORK_OBSOLETE)
|
||||
#if defined(MORK_MAC)
|
||||
static const char* morkFile_kNewlines =
|
||||
"\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015";
|
||||
# define morkFile_kNewlinesCount 16
|
||||
|
@ -315,7 +315,7 @@ morkStream::PutByteThenNewline(morkEnv* ev, int inByte)
|
||||
mork_size
|
||||
morkStream::PutLineBreak(morkEnv* ev)
|
||||
{
|
||||
#if defined(MORK_MAC) || defined(MORK_OBSOLETE)
|
||||
#if defined(MORK_MAC)
|
||||
|
||||
this->Putc(ev, mork_kCR);
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user