Пример #1
0
 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( ">" );
 }
Пример #2
0
        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(">");
        }
Пример #3
0
        // 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;
        }
Пример #4
0
        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( ")" );
        }
Пример #5
0
 public override void write( output_port  p )
 {
     p.write( "[PORT " + name + " @" + filepos + "-" + matchstart + "." + forward + "." + matchstop + "-" + bufsiz + "." + bufpos + "]" );
 }
Пример #6
0
 public static Object bgl_display_bignum( bignum n, output_port p )
 {
     p.write( n.value.ToString() );
     return p;
 }
Пример #7
0
        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;
        }
Пример #8
0
 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;
 }
Пример #9
0
        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;
        }
Пример #10
0
 public static void setCurrentOutputPort( bgldynamic env, output_port  o )
 {
     env.current_output_port = o;
 }
Пример #11
0
 public static Object FLUSH_OUTPUT_PORT( output_port p )
 {
     return p.flush();
 }
Пример #12
0
 public static Object display_ucs2string( char[] s, output_port p )
 {
     p.write( new String( s ) );
     return p;
 }
Пример #13
0
        public static Object display_ucs2( bucs2        s,
					 output_port p )
        {
            p.write( s.value );
            return p;
        }
Пример #14
0
 public static Object display_substring( byte[] s, int start, int end, output_port p )
 {
     p.write( s, start, end );
     return p;
 }
Пример #15
0
 public static Object display_string( byte[] s, output_port p )
 {
     p.write( s );
     return p;
 }
Пример #16
0
 public static byte[] OUTPUT_PORT_NAME( output_port p )
 {
     return p.name;
 }
Пример #17
0
 public static void setCurrentErrorPort( bgldynamic env, output_port  o )
 {
     env.current_error_port = o;
 }
Пример #18
0
 public static byte[] get_output_string( output_port p )
 {
     // CARE why not a correct signature in Scheme
     return ((output_string_port)p).get_string();
 }
Пример #19
0
 public static Object bgl_close_output_port( output_port p )
 {
     return p.close();
 }
Пример #20
0
 public static void OUTPUT_PORT_CHOOK_SET(output_port o, procedure p)
 {
     o.chook = p;
 }
Пример #21
0
 public static Object write_llong( long n, output_port p )
 {
     p.write( (byte)'#' );
     p.write( (byte)'l' );
     p.write( n.ToString() );
     return p;
 }
Пример #22
0
 public static Object OUTPUT_PORT_FHOOK(output_port o)
 {
     return o.fhook;
 }
Пример #23
0
 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;
 }
Пример #24
0
 public static void OUTPUT_PORT_FHOOK_SET(output_port o, Object p)
 {
     o.fhook = p;
 }
Пример #25
0
 public static Object write_utf8string( byte[] s, output_port p )
 {
     p.write( ucs2_string_to_utf8_string( "#u\"" + foreign.newstring( s ) + "\"" ) );
     return p;
 }
Пример #26
0
 public static int OUTPUT_PORT_FILEPOS( output_port p )
 {
     return 0;
 }
Пример #27
0
 public override void write( output_port  p )
 {
     foreign.write_object( car, p );
 }
Пример #28
0
 public static Object OUTPUT_PORT_FLUSHBUF(output_port o)
 {
     return o.flushbuf;
 }
Пример #29
0
 public override void write( output_port  p )
 {
     p.write( "#<socket:" +
       ((IPEndPoint)_server_socket.LocalEndPoint).Address +
       ":" + PORT() + ">" );
 }
Пример #30
0
 public static void OUTPUT_PORT_FLUSHBUF_SET(output_port o, Object p)
 {
     o.flushbuf = p;
 }