brewed library shows, for instance).
Yes, they don't realize how generics destroy the locality of code because
they generate huge bloated binaries.
--
Roberto E. Vargas Caballero
---
st.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/st.c b/st.c
index ab3fa6e..83293f4 100644
--- a/st.c
+++ b/st.c
@@ -2496,10 +2496,10 @@ eschandle(uchar ascii) {
case 'k': /* old title set compatibility */
tstrsequence(ascii);
St runs an interactive shell and not a login shell, and it means
that profile is not loaded. The default terminal configuration
in some system is not the correct for st, but since profile is
not loaded there is no way of getting a script configures the
correct values.
St doesn't update the utmp
the difference between
them:
- enacs: enable alternate char set
- smacs: start alternate char set
I will take a look to my terminfo book later at home, but I think this is
a problem related to the implementation of urwid.
Regards,
--
Roberto E. Vargas Caballero
as
part of Xlib, at least on my installation.
I like the idea of the patch, but I would like know how this function
works. I mean, you say that you can have a process listenning for the
event, but, what happens if you don't have such process?
Regards,
--
Roberto E. Vargas Caballero
of it is correct, but again, it seems like an error of urwid.
Regards,
--
Roberto E. Vargas Caballero
. From the README.md
of alot:
Alot is an experimental terminal MUA based on notmuch mail.
It is written in python using the urwid toolkit.
So I hope the patch will also fix this other problem.
Regards,
--
Roberto E. Vargas Caballero
On Wed, Oct 08, 2014 at 09:11:35AM +0200, Roberto E. Vargas Caballero wrote:
Sorry, this is wrong, enacs=\E)0 and smacs=\E(0, so the problem is enacs.
I don't know why urwid is using enacs. I will review that the definition
of it is correct, but again, it seems like an error of urwid
St has enacs, which must be printed if a program requires to use
the alternate charset (graphic charset), that in st case was to
select charset graphic for G1, but it was not useful
at all because smacs and rmacs were always redefining the value
of G0.
---
st.info | 4 ++--
1 file changed, 2
These sequences are the equivalents of LS0 and LS1, but for G2 and
G3.
---
st.c | 4
1 file changed, 4 insertions(+)
diff --git a/st.c b/st.c
index 19e4379..22a1ce6 100644
--- a/st.c
+++ b/st.c
@@ -2497,6 +2497,10 @@ eschandle(uchar ascii) {
case 'k': /* old title set compatibility
SI (0x0F or ^O) means Shift In, and it selects G1 charset definition,
and SO (0x0E or ^N) means Shift Out, and it selects G0 charset
definition, but st was doing just the inverse.
---
st.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/st.c b/st.c
index
XkbDeviceForceBell or have AudibleBell set to off.
Ok, I will apply the patch the next week.
Thanks!!
--
Roberto E. Vargas Caballero
Before removing bit fields:
$ size find
textdata bss dec hex filename
16751 968 48 177674567 find
After removing bit fields:
$ size find
textdata bss dec hex filename
16527 968 68 17563449b find
This is an example where
find(1) uses clock_gettime which in some systems needs -lrt.
---
config.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.mk b/config.mk
index a944970..b375d6d 100644
--- a/config.mk
+++ b/config.mk
@@ -12,4 +12,4 @@ RANLIB = ranlib
CPPFLAGS = -D_DEFAULT_SOURCE
I defined and this didn't solved, the same error. I didn't backtraced
again.
Can you posted the output of your compilation process after adding
the define? (there was a very bad warning in your previous compilation).
Regards,
Some programs can only deal with XA_STRING, and it makes impossible st
be able of copying to them. This patch makes st answer also to XA_STRING,
althought it sends utf8 strings. It is not a problem because moderm
applications must support utf8.
---
st.c | 6 +-
1 file changed, 5
On Sun, Mar 15, 2015 at 11:07:26PM +0800, Ivan Tham wrote:
Thanks, but how do I know about the -dev, but how do I know libxinerama-dev?
Experience and / or guess-work. Compiler complaining about $HEADER.h?
Try installing lib$HEADER-dev (Debian) or $HEADER-devel (RHEL). Failing
If you are
Hi,
I considered that, but thought it the lesser evil. *Ideally*, build
systems and version control systems shouldn't be tightly coupled, if at
all. I have my own prejudices, and we can agree to cordially disagree on
such a trivial and here insignificant matter.
Why do you suppose that
I'm going to apply it, but with this small change:
- csiescseq.mode[1] = *p;
+ csiescseq.mode[1] = (p csiescseq.buf+csiescseq.len) ? *p : '\0';
because my suggestion was not totally true, and it was possible
go further of the end of the string.
Regards,
Hi,
st build options:
Package fontconfig was not found in the pkg-config search path.
Perhaps you should add the directory containing `fontconfig.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fontconfig' found
Are you sure you have the development package of fontconfig?
- { XK_BackSpace, XK_ANY_MOD, \177, +1,0,0},
+ { XK_BackSpace, XK_ANY_MOD, \177, 0,0,0},
Due to the reasons why we changed the backspace behaviour, I think your
patch makes sense. I will apply it (and I will update the reverse patch of
If you mean [1], it doesn't add (or restore) the alt+backspace ability to
delete the previous word.
But changing the mask from XK_ANY_MOD to XK_NO_MOD does:
Upss, you are rigth, I mistook reviewing the patch. I will fix it.
Thanks.
I had fontconfig 2.9.0-7.1.
I have installed libfontconfig1-dev but it doesn't seem to work.
You should have in your system a file called fontconfig.pc.
In my machine I have it in /usr/X11R7/lib/pkgconfig/fontconfig.pc.
See if your file is in a directory contained in PKG_CONFIG_PATH.
Talking about st keys behaviour : a while ago I was looking for a way to hack
my st in
order to have alt + backspace deleting the previous word and I found [1].
The patch of Ivan Delalande should fix it. Can you test it?
Regards,
change NOTREACHED to not reached
NOTREACHED is the traditional comment and it is understood by dozen of
lint incarnations (although I guess gcc ignores it), so my vote is to
keep NOTREACHED.
Regards,
Hi,
I'm not opposed in switching fully to Xft. Xfonts are a mess as well.
Though I'd really like to base st/dwm/dmenu on libsl/drw.c
With this, dmenu/dwm/st would not directly depend on Xft/fontconfig,
but on drw only. Then it depends on the drw-implementation what it
uses internally.
Hi,
Changing line 3880, drawtimeout.tv_set=0 to 1, I'm now able to type the
sentence The quick brown fox jumped over the lazy brown dog, and all
characters appear without much apparent delay, except for the last char g
mysteriously takes up to 1-2 seconds to appear. Key repeat also
Hi,
* You can scroll past the top line in the buffer. Fixed with the
attached diff.
You can push your changes to the wiki if you want.
Regards,
I really don't like the idea of C-S-C or M3-C as these are really basic
keybinds and may be used for applications. Also the proximity with C-C
makes it easier to terminate a running application when you just wanted
to copy some text.
It is impossible to use ctrl + shift combinations in the
## I cannot compile st in OpenBSD
-OpenBSD lacks of librt, despite it begin mandatory in POSIX
+OpenBSD lacks of librt, despite it began to be mandatory in POSIX
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/c99.html#tag_20_11_13.
Applied, with removing of 'of'.
Regards,
I think this is what was originally intended:
OpenBSD lacks of librt, despite it *being* mandatory in POSIX
Uhmmm, I think you are rigth here. The correct sentence should be:
OpenBSD lacks librt, despite it being mandatory in POSIX
is it? (you guys know that my english
So my non-ASCII characters look incorrect in your MUA because you're
stuck in an insane locale? Too bad. That pain is self-inflicted.
Don't blame me, I'm not the one who created all those funky European accented
characters, etc.
All these 'funky' characters predate to the first english
On Mon, Mar 2, 2015 at 3:56 PM, Anthony J. Bentley anth...@cathet.us wrote:
VLAs are a fundamentally broken feature because they do not allow any
error checking. alloca() is the same.
--
Anthony J. Bentley
But when do you ever do error checking of stack size? Is recursion a
alloca() isn't even standard C, that's some black voodoo GNU sorcery
right there.
From alloca(2):
There is evedence that the alloca() function appeared in 32V,
PWB, PWD.2, 3BSD and 4BSD. There is a man page for it in
4.3BSD.
It was common before GNU, and it was not
Try adjusting xfps and actionfps.
I don't like this manual adjusting. We should rework the main
loop, and it is something we have said lot of times.
Regards,
It was my understanding that Do not mix declarations and code meant
stick to ANSI C declarations. ANSI C allows declarations of variables
only at the top of blocks, but allows them in any block so they aren't
relegated to the top of the function. It was pointed out to me that
Do not mix
col is used to display troff documents in ttys, removing the reverse
line feeds generated by .2C in ms. This implementation keeps the limit
of 256 lines of 800 characteres of the original implementation.
---
Makefile | 1 +
README | 1 +
col.1| 90 +
col.c|
usleep needs _XOPEN_SOURCE=500 or
_XOPEN_SOURCE _XOPEN_SOURCE_EXTENDED. Some system publish it
with BSD_SOURCE but not all.
---
config.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.mk b/config.mk
index c0d466b..a641d56 100644
--- a/config.mk
+++ b/config.mk
@@
from st.c:25:
/usr/X11R6/include/X11/Xfuncproto.h:156:24: warning: ISO C does not permit
named variadic macros
st.c: In function 'strparse':
st.c:2265: warning: implicit declaration of function 'strsep'
st.c:2265: warning: assignment makes pointer from integer without a
- csiescseq.mode = *p;
+ csiescseq.mode[0] = *p;
+ p++;
+ if (strchr(q, *p))
+ csiescseq.mode[1] = *p;
}
The strchr is not needed, you can do something like:
csiescseq.mode[0] = *p++;
csiescseq.mode[1] = *p;
if the string has only one
It seems to be in vogue to squash patches into one, and lose history.
The one on the website purports to be from Alexander Huemer, but the
authors are listed as Jochen Sprickerhof and Matthew on the web page,
and http://lists.suckless.org/dev/1310/17807.html also mentions v4hn.
I suppose
Applied, thanks!
Well, it would be identified as such, so you just go to the commit
before that.
In the end, this is a very weak argument. If you change the style
early enough, the succeeding history will be fine.
And when you go to the previous commit, you discover that it was
another style change and you
XFilterEvent usually filters KeyPress events that are hooked by input
method, but at this point the window is not mapped so it is impossible
to press keys in the terminal.
Calling XFilterEvent would only be useful if input methods filtered
ConfigureNotify or MapNotify events. I don't think
Applied, thanks.
Hi,
It looks like you can use SOUP_CHECK_VERSION(2, 34, 0) to test for the
version that supports disk cache. May you please try your patch with that
code, and send me an updated patch? I will then test on my own system with
support, and verify that the positive case also works.
I
Not always is desirable to create a pseudo terminal, and some times
we want to open a terminal emulator over a tty line. With this new
patch is possible to do someting like:
$ st -l /dev/ttyS0 115200
Without this option was needed to launch another terminal emulator
over st (for example
It compiles fine with that patch on Wheezy, too.
Not even all of Roberto's patch seems necessary. The attached patch
works for me.
Maybe we should add these lines to the base version, at least
until the cache code becomes more stable.
Regards,
Not always is desirable to create a pseudo terminal, and some times
we want to open a terminal emulator over a tty line. With this new
patch is possible to do someting like:
$ stty raw /dev/ttyS0
$ stty -iexten /dev/ttyS0
$ stty 115200 /dev/ttyS0
$ st -l /dev/ttyS0
Applied, thanks.
Hi,
- Color *cp;
if(loaded) {
- for (cp = dc.col; cp dc.col + LEN(dc.col); ++cp)
- XftColorFree(xw.dpy, xw.vis, xw.cmap, cp);
+ for (i = 0; i LEN(dc.col); i++)
+ XftColorFree(xw.dpy, xw.vis, xw.cmap, dc.col[i]);
Applied, thanks.
Applied. Thanks.
+ if (opt_line) {
+ if((cmdfd = open(opt_line, O_RDWR)) 0)
+ die(open line failed: %s\n, strerror(errno));
+ close(STDIN_FILENO);
+ dup(cmdfd);
+ stty();
+ return;
Is the duplication of the cmdfd without saving
- drawtimeout.tv_nsec = (1000/xfps) * 1E6;
+ drawtimeout.tv_nsec = 10 / xfps;
I like the patch, but not the comment. In the original code there is no
floating point calculation at all; the division is integer, but is true
that there is accuary lost. Maybe the
As per The C Programming Language 2nd Edition and the BSD style guide,
the proper way to loop infinitely in C is for(;;).
I agree about moving the assignment out of the loop initialization
though. It is cleaner this way.
I totally agree. for (;;) is the only one true ;). I will review all
Applied with minor changes in the comments.
- memset(term.trantbl, sizeof(term.trantbl), CS_USA);
+ memset(term.trantbl, CS_USA, sizeof(term.trantbl));
Uppss, good catch. Applied.
same as uint_fast32_t. uint_least32_t is 4 bytes almost always. int is
not an option as it may be 2 bytes long.
Not in Posix. Posix forces int to be at least 32 bits. Although the terminal
emulation part is mostly portable, so I think is better don't relay on this
point.
Regards,
I will not apply this patch. To use int or bool is something that depend
of the taste of everyone, and in st both are admited (mainly because
X uses bool data type, because in other case I think the style guide
should forbid them). There are some cases where it is better to use int
instead of
Applied, thanks.
Applied, thanks.
I do not think changing 'long' to 'wchar_t' is a good idea because
'wchar_t' has undefined size and long is at least 32-bit long.
Yeah ,it is true. And not only this, the ISO interface in incredible
wrong, and it makes impossible some of the operations we do in
st, so I already discarded to use
Applied, thanks.
Hi,
maybe I misunderstood this paragraph, but The Unix Programming
Environment is _the_ book for every ongoing unix programmer.
Even though it has aged over the years, it has aged well and most
practices shown in the book are still valid today.
Yeah, it is totally true. There are some points
You should also include The Elements of Programming Style by
Kernighan Plauger. My personal favorite computer-related book.
Yeah, and the books of Stevens:
- Advenced programming in the unix environment
- Unix network programming
Regards,
We don't have any opportunity of having a race condition, so there is
no reason to use dup2 instead of dup. So I wil keep the current
version.
Hi,
Hello, I noticed that the Glyph struct was using more memory than was
needed. Considering that the fg and bg colors have values that are
always in the range of [0, 255], there is no need to use a uint32_t
for them. A single byte each would suffice. Furthermore, assuming
This is a good
st.c:1321:2: warning: ignoring return value of function declared with
warn_unused_result attribute [-Wunused-result]
system(cmd);
^~ ~~~
I usually don't care about this kind of warnings, but in this case I
think we should check the value returned by system,
The control flow is necessary in a terminal because you have two
asynchronous process, one in the terminal and another in the computer,
comunicate between them through a serial line using buffers in every
side. When one of this buffer is full, then it must signal to the
other process because in
Applied, thanks.
I have applied a version of this patch with short size.
typedef struct {
char c[UTF_SIZ]; /* character code */
- ushort mode; /* attribute flags */
- uint32_t fg; /* foreground */
- uint32_t bg; /* background */
+ ushort mode; /* attribute flags
Hi,
Only wait for termination of the shell.
...
- if(waitpid(pid, stat, 0) 0)
+ if((p = waitpid(pid, stat, WNOHANG)) 0)
die(Waiting for pid %hd failed: %s\n, pid, strerror(errno));
I don't understand this patch. The master process only has one child,
the shell, so
With the pointer loop, you need to understand the context of the
surrounding for loop to understand what this statement is executing.
I can’t tell anything from just this one line of code other than that
a method is being called with what appear to be a pointer (based on
the assumption that
Applied (with minor changes), thanks.
Applied, thanks.
Applied, thanks.
Applied, thanks.
---BeginMessage---
---
st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/st.c b/st.c
index 0204b2e..b756a40 100644
--- a/st.c
+++ b/st.c
@@ -3672,7 +3672,6 @@ drawregion(int x1, int y1, int x2, int y2) {
Glyph base, new;
char
Applied, thanks.
Applied, thanks.
Hi,
Only wait for termination of the shell.
...
- if(waitpid(pid, stat, 0) 0)
+ if((p = waitpid(pid, stat, WNOHANG)) 0)
die(Waiting for pid %hd failed: %s\n, pid, strerror(errno));
I don't understand this patch. The master process only has one child,
the shell, so
GCC and Clang define long as 64-bits by default for x86_64, AArch64,
and many other 64-bit target architectures, which is wasteful for
Unicode code points.
Uhmmm, so do you propose don't use long arrays ever? because in
some implementations long may be 4, but in others may be
8. We also
Hi,
Matter of style maybe. It's still annoying to have noise in the build.
I don't admit this types of commits about quiting some compiler. First
point, warnings are not part of the standard, so you are free of take
care of them or not. If you don't like to have noise add some flags to
your
typedef struct {
uint_least32_t u;
uint_least32_t mode:12;
uint_least32_t fg:10;
uint_least32_t bg:10;
} Glyph;
The size of this struct is only one byte less than if the
same of the struct using shorts. You can test it if you
want.
Regards,
Non-maintainers like us can't push to the repository. Mailing list only.
The idea is to use the mailing list as a peer review mechanism. I am
one of the maintainer of st and I also send the patches first to the
mailing list to see the opinion of another hackers.
Regards,
Hi,
I am going to apply the original patch. I think there is
space for improvements, so new patches are welcome.
Regards,
Applied, thanks.
- if (sel.type == SEL_RECTANGULAR)
- return;
...
+ if(sel.type == SEL_REGULAR) {
+ int len = tlinelen(sel.nb.y);
This patch inverts the logic. In the current code the function returns
when sel.type == SEL_RECTANGULAR, but in your code it test len only
when
@@ -753,14 +752,13 @@ selsnap(int *x, int *y, int direction) {
gp = term.line[newy][newx];
delim = ISDELIM(gp-u);
- if(!(gp-mode ATTR_WDUMMY) (delim != prevdelim
+ if(!(gp-mode ATTR_WDUMMY) (delim !=
On Thu, Apr 30, 2015 at 09:23:15PM +, noname wrote:
It is equal to term.col-1 in any case.
Can you explain why xt is equal to term.col-1 in any case? I cannot see
it from your comments. Please, could you extend explanations in your
commits?
Regards,
Applied, thanks.
I prefer the current code, because the responsability of each function
is better designed. In the current code selsnap does all the work related
to SNAP_LINE and SNAP_WORD, but in your commit, a part is done in
selnormalize and other part in selsnap.
Regards,
Applied, thanks.
Applied, thanks.
Applied, thanks.
- tsetdirt(sel.nb.y, sel.ne.y);
Can you explain why is not needed?
Regards,
Applied, thanks.
It is no casuality they added this rule to the standard. They added
it because is the idiomatic way of running over an array in C. Of
course CS teachers that liked pascal don't teach it anymore when
they were forced to move to C, but it is the best way for experienced
The code in
For what it's worth, I agree with this approach. uint32_t is
guaranteed (since C99) to be just the right size to hold all Unicode
points (as well as their UTF-8 representation) without wasting (too
much) space.
But uint32_t is not guaranteed to be present in all the implementations,
Sorry, there aren't actually two extra padding bytes, even though the
struct is two bytes longer in length. Don't know what I was thinking.
Time for a coffee.
The problem with this kind of things is they depend too much
of the implementations, because you can have the padding or
not, so
501 - 600 of 700 matches
Mail list logo