Welcome to the CHICKEN Scheme pasting service

qwiki patch added by mario-goulart on Thu Dec 4 10:47:40 2025

Index: qwiki.scm
===================================================================
--- qwiki.scm	(revision 45109)
+++ qwiki.scm	(working copy)
@@ -343,12 +343,15 @@
          (file-rev (or (and (file-exists? source-file) (get-last-modified-revision source-file)) 0))
          ;; Used for the spam check, but not sent into the form
          (file-author (if (zero? file-rev) "-" (cadar (get-history source-file file-rev 1))))
-         (source (string-translate*
-                  (or (alist-ref 'source postdata)
+         (%source (or (alist-ref 'source postdata)
                       (handle-exceptions exn ""
-                        (with-input-from-file source-file read-string)))
-                  ;; normalize all EOL styles to Unix line endings
-                  '(("\r\n" . "\n") ("\r" . "\n"))))
+                        (with-input-from-file source-file read-string))))
+         (source (if (eof-object? %source)
+                     ""
+                     (string-translate*
+                      %source
+                      ;; normalize all EOL styles to Unix line endings
+                      '(("\r\n" . "\n") ("\r" . "\n")))))
          (sxml (call-with-input-string source svnwiki->sxml))
          (comment (alist-ref 'comment postdata eq? ""))
          (username (alist-ref 'username postdata eq? ""))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What's the procedure that returns the car of a cdr?
Visually impaired? Let me spell it for you (wav file) download WAV