aboutsummaryrefslogtreecommitdiff
path: root/evspy-core.h
diff options
context:
space:
mode:
authorGuillermo Ramos2011-10-29 21:37:52 +0200
committerGuillermo Ramos2011-10-29 21:37:52 +0200
commit28974e52f86f8873d47a899cbb2e5b122d62bfc1 (patch)
tree0f90267f0e5c45e08cc7b53699f75fb939b511ef /evspy-core.h
parent55a2212feb5042e65fbf0ed8891c0cab55479621 (diff)
downloadevspy-28974e52f86f8873d47a899cbb2e5b122d62bfc1.tar.gz
First version of cbuf.c and cbuf.h
Switching to standard kfifo.h Linux circular buffer implementation
Diffstat (limited to 'evspy-core.h')
-rw-r--r--evspy-core.h59
1 files changed, 7 insertions, 52 deletions
diff --git a/evspy-core.h b/evspy-core.h
index dfc0b2e..e9727f4 100644
--- a/evspy-core.h
+++ b/evspy-core.h
@@ -52,61 +52,16 @@
#define is_ascii(c) (map[c] >= 'a' && map[c] <= 'z')
/*
- * If pointer is at the end of buffer, put it at the beginning.
- * If not, simply add 1 to it.
- */
-#define evs_incp(p) \
-({ \
- if ((p) == &buffer[EVS_BUFSIZE-1]) \
- (p) = buffer; \
- else \
- (p)++; \
- (p); \
-})
-
-/*
- * Same as evs_incp but backwards
- */
-#define evs_decp(p) \
-({ \
- if ((p) == buffer) \
- (p) = &buffer[EVS_BUFSIZE-1]; \
- else \
- (p)--; \
- (p); \
-})
-
-/*
- * Insert character c where wrp is pointing and move it to the next char.
- * If rdp == wrp, increase rdp too.
- */
-#define evs_insert(c) \
-({ \
- *wrp = (c); \
- if (evs_incp(wrp) == rdp) \
- evs_incp(rdp); \
-})
-
-/*
- * Remove a character from the buffer
- */
-#define evs_delete() \
-({ \
- if (likely(wrp != rdp)) \
- evs_decp(wrp); \
-})
-
-/*
* Try to delete the last char inserted. If it is a special key ("[KEY]"),
* insert "[<<]" instead
*/
-#define evs_backspace() \
-({ \
- if (*(wrp-1) != ']') \
- evs_delete(); \
- else \
- special_char(KEY_BACKSPACE, EVS_VAL_PRESS); \
-})
+//#define evs_backspace() \
+//({ \
+// if (*(wrp-1) != ']') \
+//
+// else \
+// special_char(KEY_BACKSPACE, EVS_VAL_PRESS); \
+//})
/*
* Is the c event code associated to any of the FX buttons?