On Thu, Apr 24, 2014 at 07:29:35AM +0200, Roberto E. Vargas Caballero wrote:
Hello,
u suffix was here for a purpose. The patch has comment about multibyte
characters. As 0x20u is unsigned, c was converted to unsigned char
before comparison so multibyte characters were not considered
---
st.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/st.c b/st.c
index 60243a7..816caf7 100644
--- a/st.c
+++ b/st.c
@@ -1762,17 +1762,10 @@ tsetattr(int *attr, int l) {
void
tsetscroll(int t, int b) {
- int temp;
-
LIMIT(t, 0, term.row-1);
---
st.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/st.c b/st.c
index 816caf7..35bbe9c 100644
--- a/st.c
+++ b/st.c
@@ -2746,10 +2746,10 @@ int
xsetcolorname(int x, const char *name) {
XRenderColor color = { .alpha = 0x };
Colour colour;
-
sel.alt is only changed by
sel.alt = IS_SET(MODE_ALTSCREEN);
---
st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/st.c b/st.c
index 35bbe9c..083d1c1 100644
--- a/st.c
+++ b/st.c
@@ -3445,7 +3445,7 @@ drawregion(int x1, int y1, int x2, int y2) {
bool ena_sel
---
st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/st.c b/st.c
index 083d1c1..fd342aa 100644
--- a/st.c
+++ b/st.c
@@ -990,7 +990,7 @@ selnotify(XEvent *e) {
}
/*
-* As seen in selcopy:
+* As seen in
---
st.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/st.c b/st.c
index 9de7f81..061dafd 100644
--- a/st.c
+++ b/st.c
@@ -1778,7 +1778,6 @@ tsetmode(bool priv, bool set, int *args, int narg) {
for(lim = args + narg; args lim; ++args) {
if(priv) {
---
st.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/st.c b/st.c
index fd342aa..dae23c5 100644
--- a/st.c
+++ b/st.c
@@ -1839,7 +1839,7 @@ tsetmode(bool priv, bool set, int *args, int narg) {
if (!allowaltscreen)
---
st.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/st.c b/st.c
index dae23c5..9de7f81 100644
--- a/st.c
+++ b/st.c
@@ -1234,8 +1234,10 @@ dump(char c) {
static int col;
fprintf(stderr, %02x '%c' , c, isprint(c)?c:'.');
- if(++col % 10 == 0)
+
Currently tputc handles the case of too long control string waiting for
the end of control string.
Another case is when there is ESC character is encountered but is not
followed by '\\'. In this case st stops processing control string,
but ESC character is ignored.
After this patch st processes
---
st.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/st.c b/st.c
index 5477c81..22ce4fb 100644
--- a/st.c
+++ b/st.c
@@ -149,7 +149,7 @@ enum charset {
enum escape_state {
ESC_START = 1,
ESC_CSI= 2,
- ESC_STR= 4, /* DSC,
Removed special handling of corner case.
Current CSI parsing code uses strtol to parse arguments and allows them
to be negative. Negative argument is not properly handled in tdeletechar
and tinsertblank and results in memory corruption in memmove.
Reproduce with printf '\e[-500@'
---
st.c | 26
Hi,
We use ‐Wall to show all warnings. If the compiler complains, fix the
warning. Easy. At least this keeps the code to a certain style. St was
The problem is Wall change from one system to another (this is something
OpenBSD users know with strcpy calls...), and it doesn't force how to
Greetings.
On Fri, 25 Apr 2014 16:51:15 +0200 Roberto E. Vargas Caballero
k...@shike2.com wrote:
Hi,
We use ‐Wall to show all warnings. If the compiler complains, fix the
warning. Easy. At least this keeps the code to a certain style. St was
The problem is Wall change from one
We can modify it as follows:
if(BETWEEN(c, 0x00, 0x1f) || c == 0x7f) { /* control code */
I like this solution because make explicit what we want to do. With
the u suffix is a bit obscure and can generate some errors.
I also thought about using incntrl(). It should work the same way
Applied, thanks!
--
Roberto E. Vargas Caballero
The large and repeated expression used in memmove to indirect
the line can be simplified using a pointer, that makes more
clear where begins and where ends the movement.
---
st.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/st.c b/st.c
index 263abaa..e468d73
Hi,
It makes sense with the rest of the code, so I'll apply it.
Regards,
--
Roberto E. Vargas Caballero
- if(sel.alt ^ IS_SET(MODE_ALTSCREEN))
+ if(sel.alt != IS_SET(MODE_ALTSCREEN))
This bit logical operation comes from another age when IS_SET
had not a comparision operator. It does not make sense anymore, so
this change is good.
Regards,
--
Roberto E. Vargas Caballero
Before this patch executing
printf '\e[100I'
or
printf '\e[100Z'
resulted in long delay.
I don't mind this delay, because it is a uncommon case, but code
feels better with this patch (the while in the switch was a bit
ugly), so I will apply it to.
Regards,
--
Currently the alternate screen get messed up on resize if it has
different colors or mode.
Good catch, I'll apply it.
Regards,
--
Roberto E. Vargas Caballero
This patch is duplicated. I usually wait some days before of applying
a patch, so if someone has something to say he can do it. If you see
that in a longer time there is no reply for your patch, please send
a ping. Due to the repetion I have to verify that the patches are
identical and they are
- * As seen in selcopy:
+ * As seen in getsel:
Good catch, I'll apply it.
Regards,
--
Roberto E. Vargas Caballero
@@ -1234,8 +1234,10 @@ dump(char c) {
static int col;
fprintf(stderr, %02x '%c' , c, isprint(c)?c:'.');
- if(++col % 10 == 0)
+ if(++col == 10) {
fprintf(stderr, \n);
+ col = 0;
+ }
}
dump is not used in any place. It is dead code,
noname wrote:
@@ -1897,7 +1896,6 @@ tsetmode(bool priv, bool set, int *args, int narg) {
fprintf(stderr,
erresc: unknown set/reset mode %d\n,
*args);
- break;
It is true that it is ugly to have different styles in fall through,
but it is also true that we have a lot of fall through where we don't
put any comment. Put a comment in all these places is a very bad idea,
but I think maybe there are more places where we should put a comment.
I agree with you
although a break statement in the last case is unnecessary, I think it should
be
left there. If someone appends a new case, he could forget to break this one
and
get an unwanted fallthrough. The style in st.c is not consistent, there are
multiple places without the break in the last case
- case 'P': /* DSC -- Device Control String */
+ case 'P': /* DCS -- Device Control String */
I begin to think that you have a very good eyes, because we didn't realise
this stupid typo. Thanks!!!
--
Roberto E. Vargas Caballero
Applied to, thanks!!!
--
Roberto E. Vargas Caballero
From: Yuri Karaban suckl...@dev97.com
Hello,
Currently st does not follow X geometry specification. Implementation
is incomplete and partially broken:
- There is calculation of offset parameters, but these parameters are
never saved in window manager hints. Therefore setting offsets has
no
From: Yuri Karaban suckl...@dev97.com
- Interpret width and height as rows and columns (common behavior
for X applications with resize increment hints set)
- Obey the offset parameters
---
st.c | 98 ++--
1 file changed, 38
I don't usually have problems with the geometry specified by
rows and columns, it would be nice if we could retain this behaviour
from the patch.
Even though X11 may have introduced a lot of bad stuff, this one makes
sense and simplifies a lot of code and logic.
If you are specifying geometry,
So if bloat is our problem, let's remove all geometry handling code.
So if bloat is our problem, let's remove all geometry handling code.
But the geom setting would still be useful for handling the floating
and non tiled wms cases.
cover.1398443207.git.suckl...@dev97.com
c0632c3819b55460b4658e297d309f8c11ad412c.1398443207.git.suckl...@dev97.com
User-Agent: rohrpost
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
From: Christoph Lohmann 2...@r-36.net
To: dev mail list
CL == Christoph Lohmann 2...@r-36.net writes:
CL Suckless is writing software for dwm. A specified geometry is
CL fixed. Otherwise st is not floating by default when forcing a
CL size.
If st was designed only to support tiling window managers then I guess I
made a wrong choice.
CL == 20h 2...@r-36.net writes:
Thank you very much! From your previous post I thought you will never
accept it. I was thinking about stopping using st.
But now I got motivation to continue use st and contribute :-)
CL I applied your patch with an extension. Now st has a Б─░i flag
CL
Well you fixed a bug, but not all the bugs relatd to control
strings. After your patch a control string ends with a '\a'
or a ESC \\, but if you read [1]:
*The VT510 ignores all following characters until it receives a
SUB, ST, or any other C1 control character.
So OSC, PM and
37 matches
Mail list logo