Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.

(Some other minor things here and there.)

original commit: debd1f9f1e6899e2a7e4ab5de929a49df490b5c7
This commit is contained in:
Eli Barzilay 2011-06-20 04:00:14 -04:00
parent 785cd52135
commit 760adf6428
28 changed files with 64 additions and 75 deletions

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
base64-encode-stream
base64-decode-stream

View File

@ -1,6 +1,6 @@
#lang scheme/unit
#lang racket/unit
(require "base64-sig.ss")
(require "base64-sig.rkt")
(import)
(export base64^)

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
;; -- exceptions raised --
(struct cgi-error ())

View File

@ -1,5 +1,5 @@
#lang scheme/unit
(require "cgi-sig.ss" "uri-codec.ss")
#lang racket/unit
(require "cgi-sig.rkt" "uri-codec.rkt")
(import)
(export cgi^)

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
cookie-name?
cookie-value?

View File

@ -1,5 +1,5 @@
;;;
;;; <cookie-unit.ss> ---- HTTP cookies library
;;; <cookie-unit.rkt> ---- HTTP cookies library
;;; Time-stamp: <03/04/25 10:50:05 noel>
;;;
;;; Copyright (C) 2002 by Francisco Solsona.
@ -48,9 +48,9 @@
;;
;; You should think of this procedures as a `format' for cookies.
#lang scheme/unit
#lang racket/unit
(require srfi/13/string srfi/14/char-set "cookie-sig.ss")
(require srfi/13/string srfi/14/char-set "cookie-sig.rkt")
(import)
(export cookie^)
@ -323,4 +323,4 @@
(define (valid-path? v)
(and (string? v) (rfc2109:value? v)))
;;; cookie-unit.ss ends here
;;; cookie-unit.rkt ends here

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
dns-get-address
dns-get-name

View File

@ -1,6 +1,6 @@
#lang scheme/unit
#lang racket/unit
(require "dns-sig.ss" scheme/system scheme/udp)
(require "dns-sig.rkt" racket/system racket/udp)
(import)
(export dns^)

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
empty-header
validate-header

View File

@ -1,6 +1,6 @@
#lang scheme/unit
#lang racket/unit
(require mzlib/date mzlib/string "head-sig.ss")
(require racket/date racket/string "head-sig.rkt")
(import)
(export head^)

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
imap-port-number
imap-connection?

View File

@ -1,8 +1,6 @@
#lang scheme/unit
#lang racket/unit
(require scheme/tcp
"imap-sig.ss"
"private/rbtree.ss")
(require racket/tcp "imap-sig.rkt" "private/rbtree.rkt")
(import)
(export imap^)

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
;; -- exceptions raised --
(struct mime-error () #:omit-constructor)

View File

@ -1,5 +1,5 @@
;;;
;;; <mime-unit.ss> ---- MIME support
;;; <mime-unit.rkt> ---- MIME support
;;;
;;; Copyright (C) 2002 by PLT.
;;; Copyright (C) 2001 by Wish Computing.
@ -27,14 +27,11 @@
;; Commentary: MIME support for PLT Scheme: an implementation of
;; rfc2045, rfc2046, rfc2047, rfc2048, and rfc2049.
#lang scheme/unit
#lang racket/unit
(require "mime-sig.ss"
"qp-sig.ss"
"base64-sig.ss"
"head-sig.ss"
"mime-util.ss"
scheme/port)
(require "mime-sig.rkt" "qp-sig.rkt" "base64-sig.rkt" "head-sig.rkt"
"mime-util.rkt"
racket/port)
(import base64^ qp^ head^)
(export mime^)

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
(struct communicator (sender receiver server port))
connect-to-server connect-to-server* disconnect-from-server

View File

@ -1,6 +1,6 @@
#lang scheme/unit
#lang racket/unit
(require scheme/tcp "nntp-sig.ss")
(require racket/tcp "nntp-sig.rkt")
(import)
(export nntp^)

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
(struct communicator (sender receiver server port state))
connect-to-server connect-to-server* disconnect-from-server

View File

@ -1,6 +1,6 @@
#lang scheme/unit
#lang racket/unit
(require scheme/tcp "pop3-sig.ss")
(require racket/tcp "pop3-sig.rkt")
(import)
(export pop3^)

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
;; -- exceptions raised --
(struct qp-error () #:omit-constructor)

View File

@ -1,5 +1,5 @@
;;;
;;; <qp-unit.ss> ---- Quoted Printable Implementation
;;; <qp-unit.rkt> ---- Quoted Printable Implementation
;;;
;;; Copyright (C) 2002 by PLT.
;;; Copyright (C) 2001 by Francisco Solsona.
@ -26,9 +26,9 @@
;;
;; Commentary:
#lang scheme/unit
#lang racket/unit
(require "qp-sig.ss")
(require "qp-sig.rkt")
(import)
(export qp^)
@ -162,4 +162,4 @@
(vector-set! hex-bytes (+ 10 i) (+ i 65))
(loop (add1 i))))
;;; qp-unit.ss ends here
;;; qp-unit.rkt ends here

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
send-mail-message/port
send-mail-message

View File

@ -1,6 +1,6 @@
#lang scheme/unit
#lang racket/unit
(require mzlib/process "sendmail-sig.ss")
(require racket/system "sendmail-sig.rkt")
(import)
(export sendmail^)

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
smtp-sending-server
smtp-send-message

View File

@ -1,6 +1,6 @@
#lang scheme/unit
#lang racket/unit
(require scheme/tcp "base64.ss" "smtp-sig.ss")
(require racket/tcp "base64.rkt" "smtp-sig.rkt")
(import)
(export smtp^)
@ -9,9 +9,8 @@
(define debug-via-stdio? #f)
(define (log . args)
;; (apply printf args)
(void))
;; (define log printf)
(define log void)
(define (starts-with? l n)
(and (>= (string-length l) (string-length n))

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
uri-encode
uri-decode

View File

@ -15,7 +15,7 @@ See more in PR8831.
;;;
;;; <uri-codec-unit.ss> ---- En/Decode URLs and form-urlencoded data
;;; <uri-codec-unit.rkt> ---- En/Decode URLs and form-urlencoded data
;;; Time-stamp: <03/04/25 10:31:31 noel>
;;;
;;; Copyright (C) 2002 by Noel Welsh.
@ -86,13 +86,9 @@ See more in PR8831.
;; Draws inspiration from encode-decode.scm by Kurt Normark and a code
;; sample provided by Eli Barzilay
#lang scheme/unit
#lang racket/unit
(require mzlib/match
mzlib/string
mzlib/list
mzlib/etc
"uri-codec-sig.ss")
(require racket/match racket/string racket/list "uri-codec-sig.rkt")
(import)
(export uri-codec^)
@ -151,7 +147,7 @@ See more in PR8831.
(let ([encoding-table (build-vector ascii-size number->hex-string)]
[decoding-table (build-vector ascii-size values)])
(for-each (match-lambda
[(orig . enc)
[(cons orig enc)
(vector-set! encoding-table
(char->integer orig)
(string enc))
@ -188,17 +184,16 @@ See more in PR8831.
;; vector string -> string
(define (decode table str)
(define internal-decode
(match-lambda [() (list)]
[(#\% (? hex-digit? char1) (? hex-digit? char2) . rest)
(match-lambda [(list) (list)]
[(list* #\% (? hex-digit? char1) (? hex-digit? char2) rest)
;; This used to consult the table again, but I think that's
;; wrong. For example %2b should produce +, not a space.
(cons (string->number (string char1 char2) 16)
(internal-decode rest))]
[((? ascii-char? char) . rest)
(cons
(vector-ref table (char->integer char))
(internal-decode rest))]
[(char . rest)
[(cons (? ascii-char? char) rest)
(cons (vector-ref table (char->integer char))
(internal-decode rest))]
[(cons char rest)
(append
(bytes->list (string->bytes/utf-8 (string char)))
(internal-decode rest))]))
@ -292,4 +287,4 @@ See more in PR8831.
s))
s)))
;;; uri-codec-unit.ss ends here
;;; uri-codec-unit.rkt ends here

View File

@ -1,4 +1,4 @@
#lang scheme/signature
#lang racket/signature
get-pure-port
get-impure-port

View File

@ -1,4 +1,4 @@
#lang scheme/unit
#lang racket/unit
;; To do:
;; Handle HTTP/file errors.
@ -11,11 +11,11 @@
;; "impure" = they have text waiting
;; "pure" = the MIME headers have been read
(require scheme/port scheme/string
"url-structs.ss"
"uri-codec.ss"
"url-sig.ss"
"tcp-sig.ss")
(require racket/port racket/string
"url-structs.rkt"
"uri-codec.rkt"
"url-sig.rkt"
"tcp-sig.rkt")
(import tcp^)
(export url^)