public static Object get( int depth ) { stack_trace runner = top_of_stack; obj l = nil._nil; int level= 0; while (((depth < 0) || (level < depth)) && (runner != null)) { if (bigloo.foreign.SYMBOLP( runner._name )) { l = new pair(new pair(runner._name, runner._location), l); level++; } runner= runner.link; } return l; }
public static Object SET_CDR( pair c, Object o ) { c.cdr= o; return unspecified._unspecified; }
public static bool bgl_chmod( byte[] f, bool r, bool w, bool x ) { if (bigloo.os.OS_CLASS.Equals( getbytes( "unix" ) )) { pair args = new pair( f, nil._nil ); StringBuilder mode = new StringBuilder( "a" ); mode.Append( r ? "+r " : "-r " ); mode.Append( w ? "+w " : "-w " ); mode.Append( x ? "+x " : "-x " ); args= new pair( getbytes( mode.ToString() ), args ); process p = new process( null, false, true, null, bigloo.foreign.BUNSPEC, bigloo.foreign.BUNSPEC, getbytes( "chmod" ), args, null ); obj x_status= p.xstatus(); return ((x_status is bint) && (((bint)x_status).value == 0)); } return false; }
public static Object listargv( String[] argv ) { int len = argv.Length; Object result = BNIL; for ( int i = 0 ; i < len ; ++i ) result = new pair( getbytes( argv[len-i-1] ), result ); result = new pair( executable_name, result ); command_line = result; return result; }
public static Object directory_to_list( byte[] name ) { FileInfo[] files= new DirectoryInfo( newstring( name ) ).GetFiles(); Object result= BNIL; foreach (FileInfo file_info in files) result= new pair( getbytes( file_info.Name ), result ); return result; }
public static Object CDR( pair c ) { return c.cdr; }
public static Object CAR( pair c ) { return c.car; }