public override void write( output_port p ) { p.write( "#<" ); foreign.write_object( key, p ); for ( int i= 0 ; i < values.Length ; ++i ) { p.write( " " ); foreign.write_object( values[i], p ); } p.write( ">" ); }
public void write( output_port p ) { p.write( "<exit" ); for( exit i= this ; i != null ; i= i.prev ) { p.write( " " ); p.write( i.stamp ); } p.write(">"); }
// constructor public bgldynamic() { exitd_top= new exit(); exitd_val = new pair( new pair(unspecified._unspecified, unspecified._unspecified), unspecified._unspecified ); error_handler= nil._nil; uncaught_exception_handler= nil._nil; mvalues_number= 1; current_input_port= new input_console_port( foreign.default_io_bufsiz ); current_output_port= new output_stream_port( Console.OpenStandardOutput() ); // !!!!! to check current_error_port= new output_stream_port( Console.OpenStandardError() ); // !!!!! to check error_handler= bigloo.nil._nil; }
public override void write( output_port p ) { p.write( "(" ); foreign.write_object( car, p ); Object rest= cdr; while (rest is pair) { pair c= (pair)rest; p.write( " " ); foreign.write_object( c.car, p ); rest= c.cdr; } if (rest != nil._nil) { p.write( " . " ); foreign.write_object( rest, p ); } p.write( ")" ); }
public override void write( output_port p ) { p.write( "[PORT " + name + " @" + filepos + "-" + matchstart + "." + forward + "." + matchstop + "-" + bufsiz + "." + bufpos + "]" ); }
public static Object bgl_display_bignum( bignum n, output_port p ) { p.write( n.value.ToString() ); return p; }
public static Object write_ucs2( bucs2 s, output_port p ) { int value= s.value; p.write( "#u" ); p.write( hexa[ (value & 0xf000) >> 12 ] ); p.write( hexa[ (value & 0x0f00) >> 8 ] ); p.write( hexa[ (value & 0x00f0) >> 4 ] ); p.write( hexa[ (value & 0x000f) ] ); return p; }
public static Object write_object( Object o, output_port p ) { if (o == null) p.write( "#<.NET:null>" ); else if (o is obj) ((obj)o).write( p ); else p.write( o.ToString() ); return p; }
public static Object write_char( bchar c, output_port p ) { int cn= c.value & 0xFF; if ((0 < cn) && (cn < 128)) { String rep= char_name[cn]; if (rep.Length != 0) { p.write( "#\\" ); p.write( rep ); return p; } } p.write( "#a" ); p.write( ((byte)'0') + (cn / 100) ); p.write( ((byte)'0') + ((cn / 10) % 10) ); p.write( ((byte)'0') + (cn % 10) ); return p; }
public static void setCurrentOutputPort( bgldynamic env, output_port o ) { env.current_output_port = o; }
public static Object FLUSH_OUTPUT_PORT( output_port p ) { return p.flush(); }
public static Object display_ucs2string( char[] s, output_port p ) { p.write( new String( s ) ); return p; }
public static Object display_ucs2( bucs2 s, output_port p ) { p.write( s.value ); return p; }
public static Object display_substring( byte[] s, int start, int end, output_port p ) { p.write( s, start, end ); return p; }
public static Object display_string( byte[] s, output_port p ) { p.write( s ); return p; }
public static byte[] OUTPUT_PORT_NAME( output_port p ) { return p.name; }
public static void setCurrentErrorPort( bgldynamic env, output_port o ) { env.current_error_port = o; }
public static byte[] get_output_string( output_port p ) { // CARE why not a correct signature in Scheme return ((output_string_port)p).get_string(); }
public static Object bgl_close_output_port( output_port p ) { return p.close(); }
public static void OUTPUT_PORT_CHOOK_SET(output_port o, procedure p) { o.chook = p; }
public static Object write_llong( long n, output_port p ) { p.write( (byte)'#' ); p.write( (byte)'l' ); p.write( n.ToString() ); return p; }
public static Object OUTPUT_PORT_FHOOK(output_port o) { return o.fhook; }
public static Object write_string( byte[] s, bool b, output_port p ) { if (b) p.write( (byte)'#' ); p.write( (byte)'\"' ); p.write( s ); p.write( (byte)'\"' ); return p; }
public static void OUTPUT_PORT_FHOOK_SET(output_port o, Object p) { o.fhook = p; }
public static Object write_utf8string( byte[] s, output_port p ) { p.write( ucs2_string_to_utf8_string( "#u\"" + foreign.newstring( s ) + "\"" ) ); return p; }
public static int OUTPUT_PORT_FILEPOS( output_port p ) { return 0; }
public override void write( output_port p ) { foreign.write_object( car, p ); }
public static Object OUTPUT_PORT_FLUSHBUF(output_port o) { return o.flushbuf; }
public override void write( output_port p ) { p.write( "#<socket:" + ((IPEndPoint)_server_socket.LocalEndPoint).Address + ":" + PORT() + ">" ); }
public static void OUTPUT_PORT_FLUSHBUF_SET(output_port o, Object p) { o.flushbuf = p; }