Index: main/cdk.lisp
===================================================================
--- main/cdk.lisp	(revision main,18)
+++ main/cdk.lisp	(revision main,22.1.1)
@@ -1,5 +1,5 @@
 (defpackage #:cdk
   (:use #:cl #:cffi)
-  (:export #:with-screen #:with-der-window))
+  (:export #:with-screen #:with-der-window #:add-ch #:add-string #:wmove))
 
 (in-package #:cdk)
@@ -127,8 +127,6 @@
   (x :int))
 
-(defcfun ("mvwadd_wch" c-move-and-add-char) :int
-  (window :pointer)
-  (y :int)
-  (x :int)
+(defcfun "wadd_wch" :int
+  (window :pointer)
   (wch :pointer))
 
@@ -157,5 +155,10 @@
     (inc-pointer nc-wacs (* (foreign-type-size 'cchar_t) code))))
 
-(defun move-and-add-char (window y x ch)
+(defcfun ("wmove" c-wmove) :int
+  (window :pointer)
+  (y :int)
+  (x :int))
+
+(defun add-char (window ch)
   (with-foreign-object (s 'cchar_t)
     (with-foreign-slots ((attr char) s cchar_t)
@@ -164,14 +167,17 @@
         (setf (mem-aref char :uint32 i) 0))
       (setf (mem-aref char :uint32) (char-code ch)))
-    (c-move-and-add-char window y x s)))
+    (wadd-wch window s)))
+
+(defun add-string (window s)
+  (dotimes (i (length s))
+    (add-char window (aref s i))))
+
+(defun move-and-add-char (window y x ch)
+  (wmove window y x)
+  (add-char window ch))
 
 (defun move-and-add-string (window y x s)
-  (dotimes (i (length s))
-    (move-and-add-char window y (+ x i) (aref s i))))
-
-(defcfun ("wmove" c-wmove) :int
-  (window :pointer)
-  (y :int)
-  (x :int))
+  (wmove window y x)
+  (add-string window s))
 
 (defcfun ("wrefresh" c-refresh-window) :int
