1
0
Fork 0

- prepared code for kamid.

This commit is contained in:
cage 2022-01-02 16:10:05 +01:00
parent 8a141c1707
commit c9d99addad
7 changed files with 45 additions and 95 deletions

View File

@ -1,32 +0,0 @@
(in-package :9p-client)
(define-condition 9p-error (error)
((error-value
:initarg :error-value
:reader error-value)
(message-type
:initarg :message-type
:reader message-type)
(tag
:initarg :tag
:reader tag))
(:report (lambda (condition stream)
(format stream
"message-type ~a tag ~a: ~a"
(message-type condition)
(tag condition)
(error-value condition))))
(:documentation "Error for 9p protocol"))
(define-condition 9p-initialization-error (error)
((tag
:initarg :tag
:reader tag)
(rtag
:initarg :rtag
:reader rtag))
(:report (lambda (condition stream)
(format stream "error initialization tag sent ~a, got ~a instead"
(tag condition) (rtag condition))))
(:documentation "Error for 9p protocol"))

View File

@ -1,53 +0,0 @@
(in-package :9p-client)
(defparameter *tversion* 100)
(defparameter *rversion* 101)
(defparameter *tauth* 102)
(defparameter *rauth* 103)
(defparameter *tattach* 104)
(defparameter *rattach* 105)
(defparameter *terror* 106) ; there is no terror
(defparameter *rerror* 107)
(defparameter *tflush* 108)
(defparameter *rflush* 108)
(defparameter *twalk* 110)
(defparameter *rwalk* 109)
(defparameter *topen* 112)
(defparameter *ropen* 113)
(defparameter *tcreate* 114)
(defparameter *rcreate* 115)
(defparameter *tread* 116)
(defparameter *rread* 117)
(defparameter *twrite* 118)
(defparameter *rwrite* 119)
(defparameter *tclunk* 120)
(defparameter *rclunk* 121)
(defparameter *tremove* 122)
(defparameter *rremove* 123)
(defparameter *tstat* 124)
(defparameter *rstat* 125)

1
src/kami/client.lisp Normal file
View File

@ -0,0 +1 @@
(in-package :kami)

7
src/kami/package.lisp Normal file
View File

@ -0,0 +1,7 @@
(defpackage :kami
(:use
:cl
:config
:constants
:purgatory)
(:export))

20
src/tests/kami-tests.lisp Normal file
View File

@ -0,0 +1,20 @@
;; tinmop: an humble gemini and pleroma client
;; Copyright (C) 2021 cage
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program.
;; If not, see [[http://www.gnu.org/licenses/][http://www.gnu.org/licenses/]].
(in-package :kami-tests)
(defsuite kami-suite (all-suite))

View File

@ -118,3 +118,11 @@
:text-utils
:all-tests)
(:export))
(defpackage :kami-tests
(:use :cl
:clunit
:misc
:kami
:all-tests)
(:export))

View File

@ -31,6 +31,7 @@
:sqlite
:sxql
:sxql-composer
:purgatory
:marshal
:bordeaux-threads
:cl-base64
@ -85,17 +86,15 @@
(:file "date-formatter")
(:file "software-configuration")
(:file "tui-utils")
(:module 9p-client
:components ((:file "package")
(:file "message-types")
(:file "conditions")
(:file "client")))
(:module gemini
:components ((:file "package")
(:file "gemini-constants")
(:file "gemini-parser")
(:file "client")
(:file "subscription")))
:components ((:file "package")
(:file "gemini-constants")
(:file "gemini-parser")
(:file "client")
(:file "subscription")))
(:module kami
:components ((:file "package")
(:file "client")))
(:file "command-line")
(:file "specials")
(:file "keybindings")