Esempio n. 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( ">" );
 }
Esempio n. 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(">");
        }
Esempio n. 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;
        }
Esempio n. 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( ")" );
        }
Esempio n. 5
0
 public override void write( output_port  p )
 {
     p.write( "[PORT " + name + " @" + filepos + "-" + matchstart + "." + forward + "." + matchstop + "-" + bufsiz + "." + bufpos + "]" );
 }
Esempio n. 6
0
 public static Object bgl_display_bignum( bignum n, output_port p )
 {
     p.write( n.value.ToString() );
     return p;
 }
Esempio n. 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;
        }
Esempio n. 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;
 }
Esempio n. 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;
        }
Esempio n. 10
0
 public static void setCurrentOutputPort( bgldynamic env, output_port  o )
 {
     env.current_output_port = o;
 }
Esempio n. 11
0
 public static Object FLUSH_OUTPUT_PORT( output_port p )
 {
     return p.flush();
 }
Esempio n. 12
0
 public static Object display_ucs2string( char[] s, output_port p )
 {
     p.write( new String( s ) );
     return p;
 }
Esempio n. 13
0
        public static Object display_ucs2( bucs2        s,
					 output_port p )
        {
            p.write( s.value );
            return p;
        }
Esempio n. 14
0
 public static Object display_substring( byte[] s, int start, int end, output_port p )
 {
     p.write( s, start, end );
     return p;
 }
Esempio n. 15
0
 public static Object display_string( byte[] s, output_port p )
 {
     p.write( s );
     return p;
 }
Esempio n. 16
0
 public static byte[] OUTPUT_PORT_NAME( output_port p )
 {
     return p.name;
 }
Esempio n. 17
0
 public static void setCurrentErrorPort( bgldynamic env, output_port  o )
 {
     env.current_error_port = o;
 }
Esempio n. 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();
 }
Esempio n. 19
0
 public static Object bgl_close_output_port( output_port p )
 {
     return p.close();
 }
Esempio n. 20
0
 public static void OUTPUT_PORT_CHOOK_SET(output_port o, procedure p)
 {
     o.chook = p;
 }
Esempio n. 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;
 }
Esempio n. 22
0
 public static Object OUTPUT_PORT_FHOOK(output_port o)
 {
     return o.fhook;
 }
Esempio n. 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;
 }
Esempio n. 24
0
 public static void OUTPUT_PORT_FHOOK_SET(output_port o, Object p)
 {
     o.fhook = p;
 }
Esempio n. 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;
 }
Esempio n. 26
0
 public static int OUTPUT_PORT_FILEPOS( output_port p )
 {
     return 0;
 }
Esempio n. 27
0
 public override void write( output_port  p )
 {
     foreign.write_object( car, p );
 }
Esempio n. 28
0
 public static Object OUTPUT_PORT_FLUSHBUF(output_port o)
 {
     return o.flushbuf;
 }
Esempio n. 29
0
 public override void write( output_port  p )
 {
     p.write( "#<socket:" +
       ((IPEndPoint)_server_socket.LocalEndPoint).Address +
       ":" + PORT() + ">" );
 }
Esempio n. 30
0
 public static void OUTPUT_PORT_FLUSHBUF_SET(output_port o, Object p)
 {
     o.flushbuf = p;
 }