>From 5ea38e499e84d811972aea4a75badc25832d3fe2 Mon Sep 17 00:00:00 2001 From: Kooda Date: Sat, 21 Oct 2017 13:25:33 +0200 Subject: [PATCH 2/4] Remove the date from the header comment of generated C files. --- c-backend.scm | 57 +++++++++++++++++++++++---------------------------------- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/c-backend.scm b/c-backend.scm index 4262cc51..d7b8844b 100644 --- a/c-backend.scm +++ b/c-backend.scm @@ -554,40 +554,29 @@ (expr node temps) ) (define (header) - (define (pad0 n) - (if (< n 10) - (string-append "0" (number->string n)) - n) ) - (let* ((tm (##sys#decode-seconds (current-seconds) #f)) - (min (vector-ref tm 1)) - (hour (vector-ref tm 2)) - (mday (vector-ref tm 3)) - (mon (vector-ref tm 4)) - (year (vector-ref tm 5)) ) - (gen "/* Generated from " source-file " by the CHICKEN compiler" #t - " http://www.call-cc.org" #t - " " (+ 1900 year) #\- (pad0 (add1 mon)) #\- (pad0 mday) #\space (pad0 hour) #\: (pad0 min) #t - (string-intersperse - (map (cut string-append " " <> "\n") - (string-split (chicken-version #t) "\n") ) - "") - " command line: ") - (gen-list user-supplied-options) - (unless (not unit-name) - (gen #t " unit: " unit-name)) - (unless (null? used-units) - (gen #t " uses: ") - (gen-list used-units)) - (gen #t "*/") - (gen #t "#include \"" target-include-file "\"") - (when external-protos-first - (generate-foreign-callback-stub-prototypes foreign-callback-stubs) ) - (when (pair? foreign-declarations) - (gen #t) - (for-each (lambda (decl) (gen #t decl)) foreign-declarations) ) - (unless external-protos-first - (generate-foreign-callback-stub-prototypes foreign-callback-stubs) ) ) ) - + (gen "/* Generated from " source-file " by the CHICKEN compiler" #t + " http://www.call-cc.org" #t + (string-intersperse + (map (cut string-append " " <> "\n") + (string-split (chicken-version #t) "\n") ) + "") + " command line: ") + (gen-list user-supplied-options) + (unless (not unit-name) + (gen #t " unit: " unit-name)) + (unless (null? used-units) + (gen #t " uses: ") + (gen-list used-units)) + (gen #t "*/") + (gen #t "#include \"" target-include-file "\"") + (when external-protos-first + (generate-foreign-callback-stub-prototypes foreign-callback-stubs) ) + (when (pair? foreign-declarations) + (gen #t) + (for-each (lambda (decl) (gen #t decl)) foreign-declarations) ) + (unless external-protos-first + (generate-foreign-callback-stub-prototypes foreign-callback-stubs) ) ) + (define (trailer) (gen #t #t "/*" #t (uncommentify -- 2.15.0.rc1