libXg is now completely agnostic of the command set - sam - An updated version … | |
git clone git://vernunftzentrum.de/sam.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 9b6fa1212ba63bb72cf3ef44d7345c82c9991d1d | |
parent 0f57224765fa40eb25464f20ba2d7fcbf2adeba6 | |
Author: Rob King <[email protected]> | |
Date: Fri, 9 Sep 2016 22:22:46 -0500 | |
libXg is now completely agnostic of the command set | |
Diffstat: | |
include/commands.h | 43 ------------------------------ | |
include/libg.h | 16 ++++++++++++++-- | |
libXg/gwin.c | 2 +- | |
samterm/main.c | 1 - | |
samterm/samrc.c | 4 +++- | |
samterm/samterm.h | 25 +++++++++++++++++++++++++ | |
6 files changed, 43 insertions(+), 48 deletions(-) | |
--- | |
diff --git a/include/commands.h b/include/commands.h | |
@@ -1,43 +0,0 @@ | |
-#ifndef _COMMANDS_H | |
-#define _COMMANDS_H | |
- | |
-enum{ | |
- Knone, /* invalid command type */ | |
- Kdefault, /* perform default command action */ | |
- Kraw, /* insert raw character code, subject to transformation (e.g. … | |
- Kcomposed, /* insert composed character code */ | |
- Kcommand, /* execute command (see below) */ | |
- Kend /* mark the end of a command list */ | |
-}; | |
- | |
-enum{ | |
- Cnone, /* invalid command */ | |
- Cescape, /* highlight recently typed text */ | |
- Cscrolldown, /* scroll file down by screen */ | |
- Cscrollup, /* scroll file up by screen */ | |
- Cscrolldownline, /* scroll file down by line */ | |
- Cscrollupline, /* scroll file up by line */ | |
- Cjump, /* jump to/from command file */ | |
- Ccharright, /* move dot right by character */ | |
- Ccharleft, /* move dot left by character */ | |
- Clinedown, /* move dot down by line */ | |
- Clineup, /* move dot up by line */ | |
- Cdelword, /* delete word to left of dot */ | |
- Cdelbol, /* delete to beginning of line */ | |
- Cdel, /* delete character to left of dot */ | |
- Csnarf, /* snarf dot */ | |
- Ccut, /* cut dot */ | |
- Cpaste, /* paste from snarf buffer */ | |
- Cexchange, /* exchange snarf buffer with OS */ | |
- Cwrite, /* write file */ | |
- Ceol, /* move to beginning of line */ | |
- Cbol, /* move to end of line */ | |
- Cmax /* invalid command */ | |
-}; | |
- | |
-enum{ | |
- Tcurrent, /* command is sent to focused layer */ | |
- Tmouse /* command is sent to layer containing the mouse */ | |
-}; | |
- | |
-#endif | |
diff --git a/include/libg.h b/include/libg.h | |
@@ -8,8 +8,6 @@ | |
#include <X11/Xft/Xft.h> | |
-#include <commands.h> | |
- | |
enum{ EMAXMSG = 128+8192 }; /* max event size */ | |
/* | |
@@ -97,6 +95,20 @@ struct RGB | |
unsigned long blue; | |
}; | |
+enum{ | |
+ Knone, /* invalid command type */ | |
+ Kdefault, /* perform default command action */ | |
+ Kraw, /* insert raw character code, subject to transformation (e.g. … | |
+ Kcomposed, /* insert composed character code */ | |
+ Kcommand, /* execute command (see below) */ | |
+ Kend /* mark the end of a command list */ | |
+}; | |
+ | |
+enum{ | |
+ Tcurrent, /* command is sent to focused layer */ | |
+ Tmouse /* command is sent to layer containing the mouse */ | |
+}; | |
+ | |
/* | |
* Codes for bitblt etc. | |
* | |
diff --git a/libXg/gwin.c b/libXg/gwin.c | |
@@ -1,6 +1,7 @@ | |
/* Copyright (c) 1998 Lucent Technologies - All rights reserved. */ | |
#include <u.h> | |
#include <libc.h> | |
+#include <libg.h> | |
#include <stdio.h> | |
#include <X11/IntrinsicP.h> | |
#include <X11/StringDefs.h> | |
@@ -15,7 +16,6 @@ | |
#endif | |
#include "GwinP.h" | |
-#include <commands.h> | |
/* Forward declarations */ | |
static void Realize(Widget, XtValueMask *, XSetWindowAttributes *); | |
diff --git a/samterm/main.c b/samterm/main.c | |
@@ -6,7 +6,6 @@ | |
#include <unistd.h> | |
#include "flayer.h" | |
#include "samterm.h" | |
-#include <commands.h> | |
extern unsigned long _bgpixel; | |
extern void hmoveto(int, long, Flayer *); | |
diff --git a/samterm/samrc.c b/samterm/samrc.c | |
@@ -5,9 +5,11 @@ | |
#include <X11/Xlib.h> | |
#include <X11/keysym.h> | |
-#include <commands.h> | |
#include <u.h> | |
#include <libg.h> | |
+#include <frame.h> | |
+#include "flayer.h" | |
+#include "samterm.h" | |
extern int expandtabs; | |
extern int tabwidth; | |
diff --git a/samterm/samterm.h b/samterm/samterm.h | |
@@ -6,6 +6,31 @@ | |
#define NL 5 | |
enum{ | |
+ Cnone, /* invalid command */ | |
+ Cescape, /* highlight recently typed text */ | |
+ Cscrolldown, /* scroll file down by screen */ | |
+ Cscrollup, /* scroll file up by screen */ | |
+ Cscrolldownline, /* scroll file down by line */ | |
+ Cscrollupline, /* scroll file up by line */ | |
+ Cjump, /* jump to/from command file */ | |
+ Ccharright, /* move dot right by character */ | |
+ Ccharleft, /* move dot left by character */ | |
+ Clinedown, /* move dot down by line */ | |
+ Clineup, /* move dot up by line */ | |
+ Cdelword, /* delete word to left of dot */ | |
+ Cdelbol, /* delete to beginning of line */ | |
+ Cdel, /* delete character to left of dot */ | |
+ Csnarf, /* snarf dot */ | |
+ Ccut, /* cut dot */ | |
+ Cpaste, /* paste from snarf buffer */ | |
+ Cexchange, /* exchange snarf buffer with OS */ | |
+ Cwrite, /* write file */ | |
+ Ceol, /* move to beginning of line */ | |
+ Cbol, /* move to end of line */ | |
+ Cmax /* invalid command */ | |
+}; | |
+ | |
+enum{ | |
Up, | |
Down | |
}; |