cl-grep

Simple implementation of grep
Log | Files | Refs

commit b17feb2111a275772968fbff62184f8582b52644
parent ac0bd2240ead610276e1f8bb31d047ffb9f32f34
Author: ChanderG <[email protected]>
Date:   Thu,  4 Dec 2025 15:50:31 +0530

convert color funcs to macros; no PERF improvement

Diffstat:
Mgrep.lisp | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/grep.lisp b/grep.lisp @@ -12,12 +12,12 @@ (setf *queue* (lq:make-queue)) (setf *print-queue* (lq:make-queue))) -(defun color-magenta (str) - (format nil "~c[35m~a~c[0m" #\ESC str #\ESC)) -(defun color-green (str) - (format nil "~c[32m~a~c[0m" #\ESC str #\ESC)) -(defun color-red (str) - (format nil "~c[91m~a~c[0m" #\ESC str #\ESC)) +(defmacro color-magenta (str) + `(format nil "~c[35m~a~c[0m" #\ESC ,str #\ESC)) +(defmacro color-green (str) + `(format nil "~c[32m~a~c[0m" #\ESC ,str #\ESC)) +(defmacro color-red (str) + `(format nil "~c[91m~a~c[0m" #\ESC ,str #\ESC)) (defstruct file-result name entries)