monastery/core.lisp

54 lines
1.3 KiB
Common Lisp

(in-package :monastery)
;;; Main interface to the C ABI
;;; All functions are raw defined here with its
;;; types. See types.lisp for more information.
(defcfun ("mdict_init" %mdict_init) :pointer
(dictionary_path :string))
(defcfun ("mdict_lookup" %mdict_lookup) :void
(dict :pointer)
(word :string)
(result (:pointer :string)))
(defcfun ("mdict_locate" %mdict_locate) :void
(dict :pointer)
(word :string)
(result (:pointer :string))
(encoding mdict-encoding))
(defcfun ("mdict_parse_definition" %mdict_parse_definition) :void
(dict :pointer)
(word :string)
(record_start :unsigned-long)
(result (:pointer :string)))
(defcfun ("mdict_keylist" %mdict_keylist) (:pointer simple-key-item)
(dict :pointer)
(len (:pointer :uint64)))
(defcfun ("free_simple_key_list" %free-simple-key-list) :int
(key-items (:pointer simple-key-item))
(length :uint64))
(defcfun ("mdict_filetype" %mdict-filetype) :int
(dict :pointer))
(defcfun ("mdict_suggest" %mdict-suggest) :void
(dict :pointer)
(word :string)
(suggested-words (:pointer :string))
(length :int))
(defcfun ("mdict_stem" %mdict-stem) :void
(dict :pointer)
(word :string)
(suggested-words (:pointer :string))
(length :int))
(defcfun ("mdict_destroy" %mdict-destroy) :int
(dict :pointer))
(defcfun ("c_mime_detect" %c-mime-detect) s-data
(filename :string))