[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h, 1.82, 1.83 int_table
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h, 1.82, 1.83 int_table.c, 1.85, 1.86 lib_info.c, 1.4, 1.5 |
Date: |
Sat, 30 Aug 2003 23:45:45 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv15554/engine
Modified Files:
int_proto.h int_table.c lib_info.c
Log Message:
New internalcalls in "InfoMethods" for getting the user
storage and global configuration directories..
Index: int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -r1.82 -r1.83
*** int_proto.h 29 Aug 2003 04:58:47 -0000 1.82
--- int_proto.h 31 Aug 2003 03:45:42 -0000 1.83
***************
*** 555,558 ****
--- 555,560 ----
extern ILString * _IL_InfoMethods_GetUserName(ILExecThread * _thread);
extern ILInt64 _IL_InfoMethods_GetWorkingSet(ILExecThread * _thread);
+ extern ILString * _IL_InfoMethods_GetGlobalConfigDir(ILExecThread * _thread);
+ extern ILString * _IL_InfoMethods_GetUserStorageDir(ILExecThread * _thread);
extern ILNativeInt _IL_RegexpMethods_CompileWithSyntaxInternal(ILExecThread *
_thread, ILString * _p1, ILInt32 _p2);
Index: int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -r1.85 -r1.86
*** int_table.c 29 Aug 2003 04:58:47 -0000 1.85
--- int_table.c 31 Aug 2003 03:45:42 -0000 1.86
***************
*** 2523,2526 ****
--- 2523,2528 ----
IL_METHOD("GetUserName", "()oSystem.String;",
_IL_InfoMethods_GetUserName, marshal_pp)
IL_METHOD("GetWorkingSet", "()l", _IL_InfoMethods_GetWorkingSet,
marshal_lp)
+ IL_METHOD("GetGlobalConfigDir", "()oSystem.String;",
_IL_InfoMethods_GetGlobalConfigDir, marshal_pp)
+ IL_METHOD("GetUserStorageDir", "()oSystem.String;",
_IL_InfoMethods_GetUserStorageDir, marshal_pp)
IL_METHOD_END
Index: lib_info.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_info.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** lib_info.c 18 Jul 2003 18:33:57 -0000 1.4
--- lib_info.c 31 Aug 2003 03:45:43 -0000 1.5
***************
*** 22,25 ****
--- 22,26 ----
#include "lib_defs.h"
#include "il_utils.h"
+ #include "il_sysio.h"
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
***************
*** 132,141 ****
/*
! * public static String GetSpecialFolder(Environment.SpecialFolder f);
*/
! ILString *_IL_InfoMethods_GetSpecialFolder(ILExecThread * _thread, ILInt32 f)
{
! /* Special folders are security-sensitive, so don't return them */
return 0;
}
--- 133,207 ----
/*
! * public static String GetGlobalConfigDir();
*/
! extern ILString *_IL_InfoMethods_GetGlobalConfigDir(ILExecThread *_thread)
{
! #if !defined(__palmos__)
! char *env;
! ILString *str;
!
! /* Try the "CLI_MACHINE_CONFIG_DIR" environment variable first */
! if((env = getenv("CLI_MACHINE_CONFIG_DIR")) != 0 && *env != '\0')
! {
! return ILStringCreate(_thread, env);
! }
!
! /* Return a standard path such as "/usr/local/share/cscc/config" */
! env = ILGetStandardDataPath("cscc/config");
! if(!env)
! {
! ILExecThreadThrowOutOfMemory(_thread);
! return 0;
! }
! str = ILStringCreate(_thread, env);
! ILFree(env);
! return str;
! #else
! return 0;
! #endif
! }
!
! /*
! * public static String GetUserStorageDir();
! */
! extern ILString *_IL_InfoMethods_GetUserStorageDir(ILExecThread *_thread)
! {
! #if !defined(__palmos__)
! char *env;
! char *full;
! ILString *str;
!
! /* Try the "CLI_STORAGE_ROOT" environment variable first */
! if((env = getenv("CLI_STORAGE_ROOT")) != 0 && *env != '\0')
! {
! return ILStringCreate(_thread, env);
! }
!
! /* Use "$HOME/.cli" instead */
! env = getenv("HOME");
! if(env && *env != '\0' && ILGetFileType(env) == ILFileType_DIR)
! {
! full = (char *)ILMalloc(strlen(env) + 6);
! if(!full)
! {
! ILExecThreadThrowOutOfMemory(_thread);
! return 0;
! }
! strcpy(full, env);
! #ifdef IL_WIN32_NATIVE
! strcat(full, "\\.cli");
! #else
! strcat(full, "/.cli");
! #endif
! str = ILStringCreate(_thread, full);
! ILFree(full);
! return str;
! }
!
! /* We don't know how to get the user storage directory */
return 0;
+ #else
+ return 0;
+ #endif
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine int_proto.h, 1.82, 1.83 int_table.c, 1.85, 1.86 lib_info.c, 1.4, 1.5,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2672,1.2673
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security MiniXml.cs, 1.4, 1.5 SecurityElement.cs, 1.8, 1.9
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2672,1.2673
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Security MiniXml.cs, 1.4, 1.5 SecurityElement.cs, 1.8, 1.9
- Index(es):