How to prevent cdr from capitalizing symbols?

From: Andrei (astebakov_at_yahoo.com)
Date: 09/23/04


Date: 22 Sep 2004 16:14:37 -0700

Hi,
Maybe it's a stupid newbie question but how to return exactly the same
symbol from the list as initially defined?

Let's say I have a code:

(setq *assoc-func* (list (list (list 'G 1) 'GetInput)
                         (list (list 'S 1) 'SetInput)))
(defun DefAlienFunc (assoclist)
  (if (not (null assoclist))
      (let ((sDefAlienFunc (format nil "~aC" (cadar assoclist))))
        (def-alien-routine sDefAlienFunc void (fd integer) (param (* t)))
        (DefAlienFunc (cdr assoclist)))))

(DefAlienFunc *assoc-func*)

All I want here is to define alien routines with "C" suffix like
"GetInputC", "SetInputC" etc. All I get is "GETINPUTC" and "SETINPUTC"
function defined.
Is there any way to prevent c[ad]r functions from returning
captitalized symbols?

If I do it this way:
(setq *assoc-func* (list (list (list 'G 1) "GetInput")
                         (list (list 'S 1) "SetInput")))

then I have a problem calling a lisp function (defun GetInput ....)
because I return the function name from the *assoc-func* list and it's
string instead of a symbol:
(funcall (GetAssocFunc *assoc-func* *param-list*) fd)

If I try:
(funcall (coerce (GetAssocFunc *assoc-func* *param-list*) 'function)
fd)

The debugger complains that it cannot find source for the function.

Hope my question is not too messy :)
Thanks is advance,
Andrew