Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f8ad953e8b
Fetching contributors…

Cannot retrieve contributors at this time

file 23 lines (18 sloc) 0.72 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
(in-package #:se.defmacro.c-amplify)

(defun mkstr (&rest args)
  (with-output-to-string (s)
    (dolist (a args) (princ a s))))

(defun symb (&rest args)
  "Make a symbol by concatenating all ARGS as strings"
  (values (intern (string-upcase (apply #'mkstr args)))))

(defmacro defun/compile-time (&rest form)
  "Exactly like DEFUN, but wrapped in an EVAL-WHEN that makes it
available at compile-time."
  `(eval-when (:compile-toplevel :load-toplevel :execute)
     (defun ,@form)))

(defun logor (x y)
  "Implements the missing logical or function of two integers X and Y."
  (declare (type integer x y))
  (logorc1 (lognot x) y))

(defun dump-hash (hash)
  (maphash #'(lambda (k v) (format t "~S = ~S~%" k v)) hash))
Something went wrong with that request. Please try again.