Added write-processed-line option to cpp-e.

Pascal J. Bourguignon [2015-07-06 20:41]
Added write-processed-line option to cpp-e.
Filename
languages/cpp/cpp.lisp
diff --git a/languages/cpp/cpp.lisp b/languages/cpp/cpp.lisp
index 1008078..f1d4b58 100644
--- a/languages/cpp/cpp.lisp
+++ b/languages/cpp/cpp.lisp
@@ -1203,7 +1203,7 @@ RETURN: the token text; the end position."
                                   (when restart (invoke-restart restart))))))
     ,@body))

-(defun cpp-e (path &rest options &key defines includes write-sharp-line &allow-other-keys)
+(defun cpp-e (path &rest options &key (write-processed-lines t) defines includes write-sharp-line &allow-other-keys)
   "
 DEFINE:     a plist of object-like macro definitions: (macro-name macro-value)
             macro-name is a string designator.
@@ -1234,8 +1234,9 @@ Other keys shall be context option keys.
                                                   (acons :include-quote-directories includes
                                                          *default-options*))
                                  :environment environment)
-        (terpri)
-        (write-processed-lines lines :write-sharp-line write-sharp-line)
+        (when write-processed-lines
+          (terpri)
+          (write-processed-lines lines :write-sharp-line write-sharp-line))
         ;; (print-hashtable (context-environment context))
         context))))
ViewGit