[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/image class.c,1.26,1.27 compress.c,1.1.
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/image class.c,1.26,1.27 compress.c,1.1.1.1,1.2 debug_writer.c,1.3,1.4 image.h,1.23,1.24 java_loader.c,1.8,1.9 java_writer.c,1.2,1.3 link.c,1.22,1.23 meta_writer.c,1.12,1.13 pecoff_loader.c,1.13,1.14 pecoff_writer.c,1.11,1.12writer.c,1.11,1.12 |
Date: |
Thu, 15 May 2003 00:51:51 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/image
In directory subversions:/tmp/cvs-serv26038/image
Modified Files:
class.c compress.c debug_writer.c image.h java_loader.c
java_writer.c link.c meta_writer.c pecoff_loader.c
pecoff_writer.c writer.c
Log Message:
Port the "image" library to m68k-palmos.
Index: class.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/class.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** class.c 5 Mar 2003 23:13:16 -0000 1.26
--- class.c 15 May 2003 04:51:47 -0000 1.27
***************
*** 347,351 ****
{
/* The global scope is the first module definition record */
! if(image->tokenCount[IL_META_TOKEN_MODULE >> 24] > 0)
{
return (ILProgramItem *)ILImageTokenInfo
--- 347,351 ----
{
/* The global scope is the first module definition record */
! if(image->tokenCount[((ILUInt32)IL_META_TOKEN_MODULE) >> 24] > 0)
{
return (ILProgramItem *)ILImageTokenInfo
Index: compress.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/compress.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** compress.c 13 Aug 2001 05:22:56 -0000 1.1.1.1
--- compress.c 15 May 2003 04:51:47 -0000 1.2
***************
*** 48,52 ****
return 2;
}
! else if(data < (unsigned long)(1 << 29))
{
buf[0] = (unsigned char)((data >> 24) | 0xC0);
--- 48,52 ----
return 2;
}
! else if(data < (unsigned long)(1L << 29))
{
buf[0] = (unsigned char)((data >> 24) | 0xC0);
***************
*** 109,113 ****
return 2;
}
! else if(data < (unsigned long)(1 << 28))
{
buf[0] = (unsigned char)((data >> 23) | 0xC0);
--- 109,113 ----
return 2;
}
! else if(data < (unsigned long)(1L << 28))
{
buf[0] = (unsigned char)((data >> 23) | 0xC0);
***************
*** 140,144 ****
return 2;
}
! else if(data >= ((long)-(1 << 29)))
{
buf[0] = (unsigned char)(((data >> 23) & 0x1F) | 0xC0);
--- 140,144 ----
return 2;
}
! else if(data >= ((long)-(1L << 29)))
{
buf[0] = (unsigned char)(((data >> 23) & 0x1F) | 0xC0);
Index: debug_writer.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/debug_writer.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** debug_writer.c 2 Apr 2002 06:43:39 -0000 1.3
--- debug_writer.c 15 May 2003 04:51:47 -0000 1.4
***************
*** 21,24 ****
--- 21,26 ----
#include "program.h"
+ #ifdef IL_USE_WRITER
+
#ifdef __cplusplus
extern "C" {
***************
*** 296,297 ****
--- 298,301 ----
};
#endif
+
+ #endif /* IL_USE_WRITER */
Index: image.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/image.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** image.h 27 Mar 2003 22:01:35 -0000 1.23
--- image.h 15 May 2003 04:51:47 -0000 1.24
***************
*** 26,30 ****
--- 26,35 ----
#include "il_utils.h"
#include "il_program.h"
+ #if !defined(__palmos__)
+ #define IL_USE_WRITER
+ #endif
+ #ifdef IL_USE_WRITER
#include "il_writer.h"
+ #endif
#ifdef __cplusplus
***************
*** 304,307 ****
--- 309,314 ----
#define IL_FIXUP_FIELD_RVA 1
+ #ifdef IL_USE_WRITER
+
/*
* Internal structure used when writing IL binaries.
***************
*** 364,367 ****
--- 371,376 ----
};
+ #endif /* !REDUCED_STDIO */
+
/*
* Create a persistent version of a string if necessary.
***************
*** 384,387 ****
--- 393,398 ----
ILImage *_ILImageCreate(ILContext *context, unsigned size);
+ #ifdef IL_CONFIG_JAVA
+
/*
* Declare the Java image loading function for use by "ILImageLoad".
***************
*** 390,393 ****
--- 401,406 ----
ILImage **image, int flags, char
*buffer);
+ #endif /* IL_CONFIG_JAVA */
+
/*
* Free a section map.
***************
*** 448,451 ****
--- 461,466 ----
unsigned long token, unsigned long
tokenKind);
+ #ifdef IL_USE_WRITER
+
/*
* Compute the size of all token types prior to writing
***************
*** 490,493 ****
--- 505,510 ----
int _ILWBufferListAdd(ILWBufferList *list, const void *buffer, unsigned size);
+ #endif /* IL_USE_WRITER */
+
/*
* Remove all classes for an image from the class lookup hash.
***************
*** 514,517 ****
--- 531,536 ----
(ILImage *image, ILType *type, ILType *classParams);
+ #if IL_USE_WRITER
+
/*
* Compact all type and member references in an image to
***************
*** 541,544 ****
--- 560,565 ----
void WriteJavaClass(ILWriter *writer, ILClass *class);
+ #endif /* IL_USE_WRITER */
+
/*
* Recommended number of token columns for use with "ILImageRawTokenData".
***************
*** 776,780 ****
--- 797,805 ----
* Define this to 1 to enable debugging.
*/
+ #ifndef REDUCED_STDIO
#define IL_DEBUG_META 1
+ #else
+ #define IL_DEBUG_META 0
+ #endif
/*
Index: java_loader.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/java_loader.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** java_loader.c 28 Feb 2003 04:57:46 -0000 1.8
--- java_loader.c 15 May 2003 04:51:47 -0000 1.9
***************
*** 22,25 ****
--- 22,27 ----
#include "il_jopcodes.h"
+ #ifdef IL_CONFIG_JAVA
+
#ifdef __cplusplus
extern "C" {
***************
*** 2393,2394 ****
--- 2395,2398 ----
};
#endif
+
+ #endif /* IL_CONFIG_JAVA */
Index: java_writer.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/java_writer.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** java_writer.c 31 Oct 2002 14:21:02 -0000 1.2
--- java_writer.c 15 May 2003 04:51:47 -0000 1.3
***************
*** 23,26 ****
--- 23,28 ----
#include "il_jopcodes.h"
+ #ifdef IL_CONFIG_JAVA
+
#ifdef __cplusplus
extern "C" {
***************
*** 1168,1169 ****
--- 1170,1173 ----
};
#endif
+
+ #endif /* IL_CONFIG_JAVA */
Index: link.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/link.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** link.c 6 May 2003 09:53:21 -0000 1.22
--- link.c 15 May 2003 04:51:47 -0000 1.23
***************
*** 175,178 ****
--- 175,179 ----
static void LoadSystemPath(void)
{
+ #if !defined(__palmos__)
if(!systemPath)
{
***************
*** 187,190 ****
--- 188,192 ----
#endif
}
+ #endif
}
Index: meta_writer.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/meta_writer.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** meta_writer.c 6 May 2003 09:53:21 -0000 1.12
--- meta_writer.c 15 May 2003 04:51:47 -0000 1.13
***************
*** 21,24 ****
--- 21,26 ----
#include "program.h"
+ #ifdef IL_USE_WRITER
+
#ifdef __cplusplus
extern "C" {
***************
*** 1621,1622 ****
--- 1623,1626 ----
};
#endif
+
+ #endif /* IL_USE_WRITER */
Index: pecoff_loader.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/pecoff_loader.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** pecoff_loader.c 27 Mar 2003 22:01:35 -0000 1.13
--- pecoff_loader.c 15 May 2003 04:51:47 -0000 1.14
***************
*** 31,35 ****
--- 31,37 ----
struct _tagILInputContext
{
+ #ifndef REDUCED_STDIO
FILE *stream;
+ #endif
const char *buffer;
unsigned long bufLen;
***************
*** 37,40 ****
--- 39,44 ----
};
+ #ifndef REDUCED_STDIO
+
/*
* Stdio-based read operation.
***************
*** 45,48 ****
--- 49,58 ----
}
+ #else
+
+ #define fileno(f) 0
+
+ #endif
+
/*
* Memory-based read operation.
***************
*** 454,458 ****
--- 464,472 ----
isInPlace = 0;
}
+ #ifndef REDUCED_STDIO
else if(!(ctx->stream) && (flags & IL_LOADFLAG_IN_PLACE) != 0)
+ #else
+ else if((flags & IL_LOADFLAG_IN_PLACE) != 0)
+ #endif
{
/* Execute directly from the supplied buffer */
***************
*** 630,633 ****
--- 644,649 ----
}
+ #ifndef REDUCED_STDIO
+
int ILImageLoad(FILE *file, const char *filename,
ILContext *context, ILImage **image, int flags)
***************
*** 690,693 ****
--- 706,711 ----
}
+ #endif /* !REDUCED_STDIO */
+
int ILImageLoadFromMemory(const void *buffer, unsigned long bufLen,
ILContext *context, ILImage
**image,
***************
*** 695,699 ****
--- 713,719 ----
{
ILInputContext ctx;
+ #ifndef REDUCED_STDIO
ctx.stream = 0;
+ #endif
ctx.buffer = (const char *)buffer;
ctx.bufLen = bufLen;
Index: pecoff_writer.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/pecoff_writer.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** pecoff_writer.c 8 Feb 2003 23:41:32 -0000 1.11
--- pecoff_writer.c 15 May 2003 04:51:47 -0000 1.12
***************
*** 20,23 ****
--- 20,26 ----
#include "program.h"
+
+ #ifdef IL_USE_WRITER
+
#include <time.h>
***************
*** 1032,1033 ****
--- 1035,1038 ----
};
#endif
+
+ #endif /* IL_USE_WRITER */
Index: writer.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/writer.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** writer.c 25 Apr 2003 01:22:00 -0000 1.11
--- writer.c 15 May 2003 04:51:47 -0000 1.12
***************
*** 20,23 ****
--- 20,26 ----
#include "program.h"
+
+ #ifdef IL_USE_WRITER
+
#include <time.h>
***************
*** 665,666 ****
--- 668,671 ----
};
#endif
+
+ #endif /* IL_USE_WRITER */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/image class.c,1.26,1.27 compress.c,1.1.1.1,1.2 debug_writer.c,1.3,1.4 image.h,1.23,1.24 java_loader.c,1.8,1.9 java_writer.c,1.2,1.3 link.c,1.22,1.23 meta_writer.c,1.12,1.13 pecoff_loader.c,1.13,1.14 pecoff_writer.c,1.11,1.12writer.c,1.11,1.12,
Rhys Weatherley <address@hidden> <=