Changeset 1047

Show
Ignore:
Timestamp:
11/23/07 16:18:49 (1 year ago)
Author:
kris
Message:

changes for toUtf8/toString

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/mango/icu/UString.d

    r939 r1047  
    11931193        ***********************************************************************/ 
    11941194 
    1195         final char[] toUtf8 (char[] dst = null) 
     1195        final char[] toString (char[] dst = null) 
    11961196        { 
    11971197                uint    x; 
  • trunk/mango/net/http/server/HttpProvider.d

    r1014 r1047  
    6868        **********************************************************************/ 
    6969 
    70         override char[] toUtf8() 
     70        override char[] toString() 
    7171        { 
    7272                return "raw"; 
  • trunk/mango/net/http/server/HttpResponse.d

    r966 r1047  
    144144        void sendError (inout HttpStatus status, Exception ex) 
    145145        { 
    146                 sendError (status, status.name, ex.toUtf8); 
     146                sendError (status, status.name, ex.toString); 
    147147        } 
    148148 
  • trunk/mango/net/http/server/HttpServer.d

    r1014 r1047  
    9191        **********************************************************************/ 
    9292 
    93         override char[] toUtf8() 
     93        override char[] toString() 
    9494        { 
    95                 return getProtocol~"::"~provider.toUtf8
     95                return getProtocol~"::"~provider.toString
    9696        } 
    9797 
  • trunk/mango/net/http/server/ServiceProvider.d

    r939 r1047  
    5555        **********************************************************************/ 
    5656 
    57         char[] toUtf8 (); 
     57        char[] toString (); 
    5858} 
    5959 
  • trunk/mango/net/servlet/Servlet.d

    r957 r1047  
    1313module mango.net.servlet.Servlet; 
    1414 
    15 private import  tango.core.Type : Time
     15private import  tango.core.TimeSpan
    1616 
    1717public  import  tango.net.http.HttpConst, 
     
    159159 
    160160                overridable implementation of getLastModified() returns 
    161                 Time.max to say it doesn't know. 
    162  
    163         **********************************************************************/ 
    164  
    165         Time getLastModified (IServletRequest request) 
    166         { 
    167                 return Time.max
     161                Time.zero to say it doesn't know. 
     162 
     163        **********************************************************************/ 
     164 
     165        TimeSpan getLastModified (IServletRequest request) 
     166        { 
     167                return TimeSpan.zero
    168168        } 
    169169 
     
    182182        { 
    183183                auto lastModified = getLastModified (request); 
    184                 if (lastModified is Time.max)  
     184                if (lastModified is TimeSpan.zero)  
    185185                    doGet (request, response); 
    186186                else 
  • trunk/mango/net/servlet/ServletContext.d

    r947 r1047  
    360360        IServletContext log (char[] msg, Object error) 
    361361        { 
    362                 logger.error (msg ~ error.toUtf8); 
     362                logger.error (msg ~ error.toString); 
    363363                return this; 
    364364        } 
  • trunk/mango/net/servlet/ServletProvider.d

    r939 r1047  
    124124        **********************************************************************/ 
    125125 
    126         override char[] toUtf8() 
     126        override char[] toString() 
    127127        { 
    128128                return "Servlet"; 
     
    421421 
    422422                    } catch (UnavailableException ux) 
    423                              response.sendError (HttpResponses.ServiceUnavailable, ux.toUtf8); 
     423                             response.sendError (HttpResponses.ServiceUnavailable, ux.toString); 
    424424 
    425425                      catch (ServletException sx) 
     
    438438        private void error (ServletResponse response, Object x) 
    439439        { 
    440                 response.sendError (HttpResponses.InternalServerError, x.toUtf8); 
     440                response.sendError (HttpResponses.InternalServerError, x.toString); 
    441441                getDefaultContext.log ("Internal error:", x); 
    442442        } 
  • trunk/mango/net/servlet/tools/AdminServlet.d

    r960 r1047  
    111111                    action = "L"; 
    112112                else 
    113                    log.trace ("request to logadmin with uri: " ~ uri.toUtf8); 
     113                   log.trace ("request to logadmin with uri: " ~ uri.toString); 
    114114                 
    115115                switch (action[0]) 
  • trunk/mango/net/util/AbstractServer.d

    r987 r1047  
    7979        **********************************************************************/ 
    8080 
    81         protected abstract char[] toUtf8(); 
     81        protected abstract char[] toString(); 
    8282 
    8383        /********************************************************************** 
  • trunk/mango/net/util/KeepAliveServer.d

    r1039 r1047  
    111111                    } catch (IOException x) 
    112112                             if (! Runtime.isHalting) 
    113                                    logger.trace (client ~ " '" ~ x.toUtf8() ~ "'"); 
     113                                   logger.trace (client ~ " '" ~ x.toString() ~ "'"); 
    114114 
    115115                      catch (Object x) 
    116                              logger.fatal (client ~ " '" ~ x.toUtf8() ~ "'"); 
     116                             logger.fatal (client ~ " '" ~ x.toString() ~ "'"); 
    117117 
    118118                // log our halt status 
     
    196196        **********************************************************************/ 
    197197 
    198         override char[] toUtf8() 
     198        override char[] toString() 
    199199        { 
    200200                return getProtocol ~ "::host"; 
  • trunk/mango/net/util/ServerThread.d

    r969 r1047  
    9191 
    9292                           } catch (IOException x) 
    93                                     server.getLogger.error ("IOException: "~x.toUtf8); 
     93                                    server.getLogger.error ("IOException: "~x.toString); 
    9494 
    9595                             catch (Object x) 
    96                                     server.getLogger.fatal ("Exception: "~x.toUtf8); 
     96                                    server.getLogger.fatal ("Exception: "~x.toString); 
    9797        } 
    9898} 
  • trunk/mango/net/util/cache/Payload.d

    r1009 r1047  
    5656        **********************************************************************/ 
    5757 
    58         override char[] toUtf8 () 
     58        override char[] toString () 
    5959        { 
    60                 return super.toUtf8
     60                return super.toString
    6161        } 
    6262 
  • trunk/mango/net/util/cache/QueuedCache.d

    r987 r1047  
    391391        **********************************************************************/ 
    392392 
    393         override char[] toUtf8() 
     393        override char[] toString() 
    394394        { 
    395395                return key; 
  • trunk/mango/xml/rpc/Servlet.d

    r955 r1047  
    346346    void value(int i) { 
    347347        if (current == null) 
    348             throw new Exception("Bad param: int = " ~ Integer.toUtf8(i)); 
     348            throw new Exception("Bad param: int = " ~ Integer.toString(i)); 
    349349        current(ValueType.Int, i); 
    350350    } 
  • trunk/mango/xml/sax/parser/teqXML.d

    r1044 r1047  
    438438                            throw new TeqXMLException("Cannot have text (" ~ text ~ ") before first tag!"); 
    439439                        } else { 
    440                             throw new TeqXMLException("Cannot have text (" ~ Utf.toUtf8(text) ~ ") before first tag!"); 
     440                            throw new TeqXMLException("Cannot have text (" ~ Utf.toString(text) ~ ") before first tag!"); 
    441441                        } 
    442442                    } 
     
    620620        else 
    621621        { 
    622             //Stdout("Misnested tags: " ~ cast(char[])toUtf8(str, Into.type) ~ "'s hash does not match")(CR).flush(); 
     622            //Stdout("Misnested tags: " ~ cast(char[])toString(str, Into.type) ~ "'s hash does not match")(CR).flush(); 
    623623            char[] str8; 
    624624            static if (is(T == char)) { 
    625625                str8 = str; 
    626626            } else { 
    627                 str8 = tango.text.convert.Utf.toUtf8(str); 
     627                str8 = tango.text.convert.Utf.toString(str); 
    628628            } 
    629629            throw new TeqXMLException("Misnested tags: " ~ str8 ~ "'s hash does not match");