Changeset 15746 for lang/gauche

Show
Ignore:
Timestamp:
07/13/08 18:54:44 (4 months ago)
Author:
kiyoka
Message:

Supported parsing with no timeline of a wiki content.

Location:
lang/gauche/oldtype/trunk
Files:
1 added
7 modified

Legend:

Unmodified
Added
Removed
  • lang/gauche/oldtype/trunk/Kahua/oldtype/oldtype/page.scm

    r14347 r15746  
    8282 
    8383 
     84;; Parsing wiki format 
     85;; 
     86;;   In case of log-file or ann-file is #f, this function takes only parse action. 
     87;; 
    8488(define-method parse ((self <oldtype-page>) wiki-port log-file ann-file) 
    8589  (let1 timeline (make <oldtype-timeline> :name (name-of self)) 
    8690        (set! (timeline-of self) 
    87               (parse timeline log-file ann-file))) 
     91              (if (and log-file ann-file) 
     92                  (parse timeline log-file ann-file) 
     93                  timeline))) 
    8894  (set! (sxml-of self) 
    8995        (oldtype:sxml->internal 
  • lang/gauche/oldtype/trunk/Kahua/oldtype/oldtype/timeline.scm

    r13593 r15746  
    7070   ;; vector of <oldtype-log> in page 
    7171   (annotation    :accessor annotation-of    :init-keyword :annotation 
    72                   :init-value '()) 
     72                  :init-value '#()) 
    7373   ;; vector of text in page 
    7474   (text          :accessor text-of          :init-keyword :text 
    75                   :init-value '()) 
     75                  :init-value '#()) 
    7676   ;; distribution of revision 
    7777   (distribution  :accessor distribution-of  :init-keyword :distribution 
  • lang/gauche/oldtype/trunk/Kahua/oldtype/oldtype/version.kahua

    r15250 r15746  
    77 
    88;;--------------------------------------------------------- 
    9 (define *oldtype-version* "0.3.0") 
     9(define *oldtype-version* "0.3.1") 
  • lang/gauche/oldtype/trunk/config.sh

    r8342 r15746  
    22 
    33# variables 
    4 export OT_MASTER=nil  # t or nil 
     4export OT_MASTER=t  # t or nil 
    55 
    66export OT_SITE=/home/kiyoka/work/site-unstable 
     
    88export OT_PASS_BACKEND=${OT_PASSWORD} 
    99export OT_USER_LOCAL="kiyoka" 
    10 export OT_SVNURL=http://genkan.sumibi.org/svn/oldtype 
     10export OT_SVNURL=http://genkan.sumibi.org/svn/newtype 
  • lang/gauche/oldtype/trunk/src/Makefile

    r14228 r15746  
    55all: log.txt  Test.ann.txt  Entry1.ann.txt  Entry2.ann.txt 
    66        gosh -I ../Kahua/oldtype ./oldtype_to internal  ../edit/Test.ot    log.txt Test.ann.txt    > Test.sexp 
     7        gosh -I ../Kahua/oldtype ./oldtype_to internal  ../edit/Test.ot                            > Test.no-timeline.sexp 
    78        gosh -I ../Kahua/oldtype ./oldtype_to internal  ../edit/Entry1.ot  log.txt Entry1.ann.txt  > Entry1.sexp 
    89        gosh -I ../Kahua/oldtype ./oldtype_to internal  ../edit/Entry2.ot  log.txt Entry2.ann.txt  > Entry2.sexp 
  • lang/gauche/oldtype/trunk/src/oldtype_to

    r14263 r15746  
    145145    (case type 
    146146      ('internal 
    147        (when (< 1 (length rest)) 
    148          (let1 oldtype-page   (parse (make <oldtype-page> :name wikiname) input-port (car rest) (cadr rest)) 
    149                (pretty-print-sexp (serialize oldtype-page))))) 
     147       (if (< 1 (length rest)) 
     148           (let1 oldtype-page   (parse (make <oldtype-page> :name wikiname) input-port (car rest) (cadr rest)) 
     149                 (pretty-print-sexp (serialize oldtype-page))) 
     150           (let1 oldtype-page   (parse (make <oldtype-page> :name wikiname) input-port #f #f) 
     151                 (pretty-print-sexp (serialize oldtype-page))))) 
    150152      ('sxml 
    151153       (let1 sxml (oldtype-parse input-port) 
  • lang/gauche/oldtype/trunk/src/test.scm

    r15741 r15746  
    3636          (open-input-string converted-str))) 
    3737    (let ((oldtype-page #f) 
     38          (oldtype-page-no-timeline #f) 
    3839          (oldtype-timeline #f) 
    39           (loaded        (with-input-from-file "Test.sexp.master" 
    40                            (lambda () 
    41                              (read))))) 
    42  
     40          (loaded 
     41           (with-input-from-file "Test.sexp.master" 
     42             (lambda () 
     43               (read)))) 
     44          (loaded-no-timeline 
     45           (with-input-from-file "Test.no-timeline.sexp.master" 
     46             (lambda () 
     47               (read))))) 
    4348      (test-start "serialize,deserialize") 
    4449 
     
    5459 
    5560      (test-section "oldtype-page") 
    56       (set! oldtype-page (parse (make <oldtype-page> :name "Test") input-port log-file ann-file)) 
     61      (set! oldtype-page 
     62            (parse (make <oldtype-page> :name "Test") input-port log-file ann-file)) 
     63      (port-seek input-port 0) 
     64      (set! oldtype-page-no-timeline 
     65            (parse (make <oldtype-page> :name "Test") input-port #f #f)) 
     66 
    5767      (let1 serialized     (serialize oldtype-page) 
    58             (test "serialized == DATA        " 
     68            (test "serialized == DATA (1)  " 
    5969                  loaded 
    6070                  (lambda () (serialize oldtype-page))) 
    61  
     71             
    6272            (test "serialized == deserialized" serialized (lambda ()  
    6373                                                            (serialize 
    6474                                                             (deserialize 
    6575                                                              (make <oldtype-page>) 
    66                                                               serialized))))) 
     76                                                              serialized)))) 
     77            (test "serialized == DATA (2)  " 
     78                  loaded-no-timeline 
     79                  (lambda () (serialize oldtype-page-no-timeline)))) 
    6780      (test-end) 
    6881 
     
    187200                  "M" 
    188201                  (lambda () 
    189                     (sys-system (format "echo 'a' >> ~a/~a/~a" (get-fullpath work) "edit" "_kiyoka.ot")) 
    190                     (car (status work "_kiyoka")))) 
    191  
     202                    (sys-system (format "echo 'a' >> ~a/~a/~a" (get-fullpath work) "edit" "test.ot")) 
     203                    (car (status work "test")))) 
     204             
    192205            (when 
    193206                #f 
     
    196209                    (lambda () 
    197210                      (commit work))))) 
    198  
     211       
    199212      (test-end) 
    200213