Henrique Lengler | 20 Aug 01:04 2014

sic or ii, whats the main differences?

sic or ii as IRC client? whats the purpouse of each one?

--

-- 
Henrique Lengler	

https://gitorious.org/~henriqueleng

Roberto E. Vargas Caballero | 19 Aug 00:59 2014

[st][PATCH] Improve execsh() and don't allow anonymous shells

This patch improves the shell selection on execsh and forbid
shell with users don't registered in the passwd file.
---
 st.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/st.c b/st.c
index a207730..06761f1 100644
--- a/st.c
+++ b/st.c
 <at>  <at>  -1139,23 +1139,29  <at>  <at>  die(const char *errstr, ...) {

 void
 execsh(void) {
-	char **args;
-	char *envshell = getenv("SHELL");
-	const struct passwd *pass = getpwuid(getuid());
+	char **args, *sh;
+	const struct passwd *pw;
 	char buf[sizeof(long) * 8 + 1];

+	errno = 0;
+	if((pw = getpwuid(getuid())) == NULL) {
+		if(errno)
+			die("getpwuid:%s\n", strerror(errno));
+		else
+			die("who are you?\n");
+	}
 	unsetenv("COLUMNS");
 	unsetenv("LINES");
(Continue reading)

Roberto E. Vargas Caballero | 18 Aug 23:29 2014

[st][PATCH] Fix definition of CONTROLC0

DEL character is not thecnically talking a C0 control character,
although it has some common properties with them, so it is useful
for us consider it as C0. Before this patch DEL (\177), was not
ignored as it ought to be.
---
 st.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/st.c b/st.c
index 8488024..a207730 100644
--- a/st.c
+++ b/st.c
 <at>  <at>  -70,7 +70,7  <at>  <at>  char *argv0;
 #define LEN(a)     (sizeof(a) / sizeof(a)[0])
 #define DEFAULT(a, b)     (a) = (a) ? (a) : (b)
 #define BETWEEN(x, a, b)  ((a) <= (x) && (x) <= (b))
-#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f))
+#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177')
 #define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
 #define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
 #define LIMIT(x, a, b)    (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
--

-- 
1.9.3

Roberto E. Vargas Caballero | 18 Aug 23:29 2014

[st][PATCH] Make useful DEL in application mode

DEL key has to generate the sequence ^[P in application mode,
because such sequence means delete current character. It implies
that the character sent in keypad mode must be ^? (DEL character).
---
 config.def.h | 10 ++++++++--
 st.info      |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/config.def.h b/config.def.h
index 53e8087..7cc0b51 100644
--- a/config.def.h
+++ b/config.def.h
 <at>  <at>  -196,11 +196,14  <at>  <at>  static Key key[] = {
 	{ XK_KP_Insert,     ControlMask,    "\033[2;5~",    +1,    0,    0},
 	{ XK_KP_Insert,     XK_ANY_MOD,     "\033[4h",      -1,    0,    0},
 	{ XK_KP_Insert,     XK_ANY_MOD,     "\033[2~",      +1,    0,    0},
+
 	{ XK_KP_Delete,     ControlMask,    "\033[M",       -1,    0,    0},
 	{ XK_KP_Delete,     ControlMask,    "\033[3;5~",    +1,    0,    0},
 	{ XK_KP_Delete,     ShiftMask,      "\033[2K",      -1,    0,    0},
 	{ XK_KP_Delete,     ShiftMask,      "\033[3;2~",    +1,    0,    0},
-	{ XK_KP_Delete,     XK_ANY_MOD,     "\033[3~",      +1,    0,    0},
+	{ XK_KP_Delete,     XK_ANY_MOD,     "\033[P",       -1,    0,    0},
+	{ XK_KP_Delete,     XK_ANY_MOD,     "\177",         +1,    0,    0},
+
 	{ XK_KP_Multiply,   XK_ANY_MOD,     "\033Oj",       +2,    0,    0},
 	{ XK_KP_Add,        XK_ANY_MOD,     "\033Ok",       +2,    0,    0},
 	{ XK_KP_Enter,      XK_ANY_MOD,     "\033OM",       +2,    0,    0},
 <at>  <at>  -250,11 +253,14  <at>  <at>  static Key key[] = {
 	{ XK_Insert,        ControlMask,    "\033[2;5~",    +1,    0,    0},
(Continue reading)

Quentin Carbonneaux | 18 Aug 19:20 2014

[PATCH 3/3] reset the alt screen in treset

---
 st.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/st.c b/st.c
index 28e5b50..8488024 100644
--- a/st.c
+++ b/st.c
 <at>  <at>  -1356,9 +1356,12  <at>  <at>  treset(void) {
 	memset(term.trantbl, sizeof(term.trantbl), CS_USA);
 	term.charset = 0;

-	tclearregion(0, 0, term.col-1, term.row-1);
-	tmoveto(0, 0);
-	tcursor(CURSOR_SAVE);
+	for(i = 0; i < 2; i++) {
+		tmoveto(0, 0);
+		tcursor(CURSOR_SAVE);
+		tclearregion(0, 0, term.col-1, term.row-1);
+		tswapscreen();
+	}
 }

 void
--

-- 
2.0.4

Quentin Carbonneaux | 18 Aug 19:19 2014

[PATCH 2/3] simplify loop in tresize

---
 st.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/st.c b/st.c
index 835e6a1..28e5b50 100644
--- a/st.c
+++ b/st.c
 <at>  <at>  -2661,7 +2661,6  <at>  <at>  tresize(int col, int row) {
 	int mincol = MIN(col, term.col);
 	int slide = term.c.y - row + 1;
 	bool *bp;
-	Line *orig;
 	TCursor c;

 	if(col < 1 || row < 1) {
 <at>  <at>  -2724,9 +2723,8  <at>  <at>  tresize(int col, int row) {
 	/* make use of the LIMIT in tmoveto */
 	tmoveto(term.c.x, term.c.y);
 	/* Clearing both screens (it makes dirty all lines) */
-	orig = term.line;
 	c = term.c;
-	do {
+	for(i = 0; i < 2; i++) {
 		if(mincol < col && 0 < minrow) {
 			tclearregion(mincol, 0, col - 1, minrow - 1);
 		}
 <at>  <at>  -2735,7 +2733,7  <at>  <at>  tresize(int col, int row) {
 		}
 		tswapscreen();
(Continue reading)

Quentin Carbonneaux | 18 Aug 19:19 2014

[st] [PATCH 1/3] remove empty trailing line

---
 st.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/st.c b/st.c
index 8f19018..835e6a1 100644
--- a/st.c
+++ b/st.c
 <at>  <at>  -3933,4 +3933,3  <at>  <at>  run:

 	return 0;
 }
-
--

-- 
2.0.4

Quentin Carbonneaux | 18 Aug 18:06 2014

[st] [PATCH] fix screen clearing in tresize

If defaultbg != 0, the alt screen is cleared with the wrong
color.  The bug is fixed by avoiding to load a cursor that
might be 0 initialized.
---
 st.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/st.c b/st.c
index 8f19018..783965e 100644
--- a/st.c
+++ b/st.c
 <at>  <at>  -2661,8 +2661,6  <at>  <at>  tresize(int col, int row) {
 	int mincol = MIN(col, term.col);
 	int slide = term.c.y - row + 1;
 	bool *bp;
-	Line *orig;
-	TCursor c;

 	if(col < 1 || row < 1) {
 		fprintf(stderr,
 <at>  <at>  -2724,9 +2722,7  <at>  <at>  tresize(int col, int row) {
 	/* make use of the LIMIT in tmoveto */
 	tmoveto(term.c.x, term.c.y);
 	/* Clearing both screens (it makes dirty all lines) */
-	orig = term.line;
-	c = term.c;
-	do {
+	for(i = 1; i <= 2; i++) {
 		if(mincol < col && 0 < minrow) {
 			tclearregion(mincol, 0, col - 1, minrow - 1);
(Continue reading)

Roberto E. Vargas Caballero | 18 Aug 15:26 2014

[ubase][PATCH] Add lastlog.1

---
 Makefile  |  2 ++
 lastlog.1 | 12 ++++++++++
 lastlog.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+)
 create mode 100644 lastlog.1
 create mode 100644 lastlog.c

diff --git a/Makefile b/Makefile
index 5a3f0fd..e54e6fa 100644
--- a/Makefile
+++ b/Makefile
 <at>  <at>  -33,6 +33,7  <at>  <at>  LIB = \
 	util/tty.o

 SRC = \
+	lastlog.c           \
 	chvt.c              \
 	clear.c             \
 	ctrlaltdel.c        \
 <at>  <at>  -80,6 +81,7  <at>  <at>  SRC = \
 	who.c

 MAN1 = \
+	lastlog.1           \
 	chvt.1              \
 	clear.1             \
 	dd.1                \
diff --git a/lastlog.1 b/lastlog.1
new file mode 100644
(Continue reading)

Alexander Huemer | 18 Aug 01:52 2014

[PATCH] Simplify README

The term 'virtual terminal emulator' was broken. There is nothing
virtual about it, it's a terminal emulator.

Signed-off-by: Alexander Huemer <alexander.huemer <at> xx.vu>
---
 README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README b/README
index 25606a2..b38c88b 100644
--- a/README
+++ b/README
 <at>  <at>  -1,6 +1,6  <at>  <at> 
 st - simple terminal
 --------------------
-st is a simple virtual terminal emulator for X which sucks less.
+st is a simple terminal emulator for X which sucks less.

 
 Requirements
--

-- 
2.1.0.rc1

Roberto E. Vargas Caballero | 17 Aug 20:52 2014

[st][PATCH] Fix man page and usage()

Man page was repeating -f option, the second time instead of -i,
and this option was lost in usage() message. This patch also indent
the output of usage().
---
 st.1 | 2 +-
 st.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/st.1 b/st.1
index 7174da2..e655530 100644
--- a/st.1
+++ b/st.1
 <at>  <at>  -42,7 +42,7  <at>  <at>  The form is [=][<cols>{xX}<rows>][{+-}<xoffset>{+-}<yoffset>]. See
 .BR XParseGeometry (3)
 for further details.
 .TP
-.B \-f
+.B \-i
 will fixate the position given with the -g option.
 .TP
 .BI \-o " file"
diff --git a/st.c b/st.c
index 6e5953a..8f19018 100644
--- a/st.c
+++ b/st.c
 <at>  <at>  -3870,8 +3870,8  <at>  <at>  run(void) {
 void
 usage(void) {
 	die("%s " VERSION " (c) 2010-2014 st engineers\n" \
-	"usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]" \
(Continue reading)


Gmane