dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/engine lib_numformat.c,NONE,1.1 Makefile


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/engine lib_numformat.c,NONE,1.1 Makefile.am,1.46,1.47 internal.c,1.33,1.34 int_table.c,1.28,1.29 int_proto.h,1.26,1.27
Date: Sun, 03 Nov 2002 14:33:29 -0500

Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv24075/engine

Modified Files:
        Makefile.am internal.c int_table.c int_proto.h 
Added Files:
        lib_numformat.c 
Log Message:
Single and Double .ToString()


--- NEW FILE ---
/*
 * lib_numformat.c - Internalcall methods for "System.Private.NumberFormatter".
 *
 * Copyright (C) 2002  Free Software Foundation, Inc.
 * 
 * Contributed by Richard Baumann
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include "engine.h"
#include "lib_defs.h"
#include "il_utils.h"

#ifdef  __cplusplus
extern  "C" {
#endif

/*
 * public static String FormatReal(double d, String format, int buflen);
 */
ILString *_IL_NumberFormatter_FormatReal(ILExecThread *thread, ILDouble d,
                                         ILString *format, ILInt32 buflen)
{
        char *cformat;
        if (!(cformat = ILStringToAnsi(thread, format)))
        {
                return 0;
        }
        else
        {
                return ILStringCreate(thread, ILFormatReal(d, cformat, buflen));
        }
}

#ifdef  __cplusplus
};
#endif

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/Makefile.am,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** Makefile.am 6 Jul 2002 05:08:05 -0000       1.46
--- Makefile.am 3 Nov 2002 19:33:26 -0000       1.47
***************
*** 29,32 ****
--- 29,33 ----
                                                lib_math.c \
                                                lib_misc.c \
+                                               lib_numformat.c \
                                                lib_object.c \
                                                lib_reflect.c \

Index: internal.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/internal.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** internal.c  29 Jun 2002 10:58:05 -0000      1.33
--- internal.c  3 Nov 2002 19:33:26 -0000       1.34
***************
*** 34,37 ****
--- 34,38 ----
        #define _IL_Double_suppressed
        #define _IL_Decimal_suppressed
+       #define _IL_NumberFormatter_suppressed
  #endif
  #if !defined(IL_CONFIG_VARARGS)

Index: int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** int_table.c 23 Oct 2002 21:10:43 -0000      1.28
--- int_table.c 3 Nov 2002 19:33:26 -0000       1.29
***************
*** 935,938 ****
--- 935,956 ----
  #if !defined(HAVE_LIBFFI)
  
+ static void marshal_ppdpi(void (*fn)(), void *rvalue, void **avalue)
+ {
+       *((void * *)rvalue) = (*(void * (*)(void *, ILDouble, void *, 
ILInt32))fn)(*((void * *)(avalue[0])), *((ILDouble *)(avalue[1])), *((void * 
*)(avalue[2])), *((ILInt32 *)(avalue[3])));
+ }
+ 
+ #endif
+ 
+ #ifndef _IL_NumberFormatter_suppressed
+ 
+ IL_METHOD_BEGIN(NumberFormatter_Methods)
+       IL_METHOD("FormatReal", "(doSystem.String;i)oSystem.String;", 
_IL_NumberFormatter_FormatReal, marshal_ppdpi)
+ IL_METHOD_END
+ 
+ #endif
+ 
+ 
+ #if !defined(HAVE_LIBFFI)
+ 
  static void marshal_vpi(void (*fn)(), void *rvalue, void **avalue)
  {
***************
*** 2427,2430 ****
--- 2445,2451 ----
  #ifndef _IL_Mutex_suppressed
        {"Mutex", "System.Threading", Mutex_Methods},
+ #endif
+ #ifndef _IL_NumberFormatter_suppressed
+       {"NumberFormatter", "System.Private", NumberFormatter_Methods},
  #endif
  #ifndef _IL_Object_suppressed

Index: int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** int_proto.h 23 Oct 2002 21:10:43 -0000      1.26
--- int_proto.h 3 Nov 2002 19:33:26 -0000       1.27
***************
*** 169,172 ****
--- 169,174 ----
  extern void _IL_Monitor_PulseAll(ILExecThread * _thread, ILObject * obj);
  
+ extern ILString * _IL_NumberFormatter_FormatReal(ILExecThread * _thread, 
ILDouble d, ILString * format, ILInt32 buflen);
+ 
  extern void _IL_WaitHandle_InternalClose(ILExecThread * _thread, ILNativeInt 
privateData);
  extern ILBool _IL_WaitHandle_InternalWaitAll(ILExecThread * _thread, 
System_Array * waitHandles, ILInt32 timeout, ILBool exitContext);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]