Re: [dev] [RFC] Design of a vim like text editor

2014-09-17 Thread Roberto E. Vargas Caballero
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

[dev] [st][PATCH] Add missed names of charset sequences

2014-09-24 Thread 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);

[dev] [st][PATCH] Add support for utmp in st

2014-09-24 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] St does not work with urwid

2014-10-06 Thread Roberto E. Vargas Caballero
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

Re: [dev] patch for bell in st

2014-10-07 Thread 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

Re: [dev] [st] St does not work with urwid

2014-10-07 Thread Roberto E. Vargas Caballero
of it is correct, but again, it seems like an error of urwid. Regards, -- Roberto E. Vargas Caballero

Re: [dev] [st] St does not work with urwid

2014-10-08 Thread 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

Re: [dev] [st] St does not work with urwid

2014-10-08 Thread 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

[dev] [st][PATCH 3/3] Use G1 for alternate charset

2014-10-08 Thread Roberto E. Vargas Caballero
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

[dev] [st][PATCH 2/3] Add LS2 and LS3

2014-10-08 Thread Roberto E. Vargas Caballero
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

[dev] [st][PATCH 1/3] Fix SI and SO

2014-10-08 Thread Roberto E. Vargas Caballero
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

Re: [dev] patch for bell in st

2014-10-08 Thread Roberto E. Vargas Caballero
XkbDeviceForceBell or have AudibleBell set to off. Ok, I will apply the patch the next week. Thanks!! -- Roberto E. Vargas Caballero

[dev] [sbase][PATCH 2/2] Remove bit fields

2015-02-20 Thread 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

[dev] [sbase][PATCH 1/2] Add -lrt switch

2015-02-20 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] segfault when selecting text

2015-03-18 Thread Roberto E. Vargas Caballero
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,

[dev] [st][PATCH] Support XA_STRING in notify request

2015-03-15 Thread Roberto E. Vargas Caballero
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

Re: [dev] [dwm] Add i3 to differences in http://dwm.suckless.org/

2015-03-15 Thread Roberto E. Vargas Caballero
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

Re: [dev] [PATCH] Use git to create dist archives.

2015-03-17 Thread Roberto E. Vargas Caballero
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

Re: [dev] [PATCH] Support the DECSCUSR CSI escape sequence

2015-03-18 Thread Roberto E. Vargas Caballero
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,

Re: [dev] Problems install st

2015-03-09 Thread Roberto E. Vargas Caballero
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?

Re: [dev] [st] [PATCH] Backspace value shouldn't depend on keypad state

2015-03-11 Thread Roberto E. Vargas Caballero
- { 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

Re: [dev] [st] Backspace is now Linux

2015-03-12 Thread Roberto E. Vargas Caballero
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.

Re: [dev] Problems install st

2015-03-11 Thread Roberto E. Vargas Caballero
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.

Re: [dev] [st] Backspace is now Linux

2015-03-11 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [sbase][patch] test: a little cleanup

2015-03-07 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [dwm] [dmenu] The Xft situation

2015-03-07 Thread Roberto E. Vargas Caballero
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.

Re: [dev] [st] Slow ST character typing on i686/pentium3 platforms]

2015-03-07 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] Bugs in scrollback buffer patch

2015-03-14 Thread Roberto E. Vargas Caballero
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,

Re: [dev] st: selecting text affects both primary and clipbaord

2015-03-11 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH] FAQ: fix wording

2015-03-10 Thread Roberto E. Vargas Caballero
## 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,

Re: [dev] [st] [PATCH] FAQ: fix wording

2015-03-10 Thread Roberto E. Vargas Caballero
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

Re: [dev] sed breaks utf8 in [ ]

2015-03-31 Thread Roberto E. Vargas Caballero
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

Re: [dev] [style] variable declaration locations and varriable length

2015-03-03 Thread Roberto E. Vargas Caballero
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

Re: [dev] [style] variable declaration locations and varriable length

2015-03-03 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] Slow ST character typing on i686/pentium3 platforms]

2015-03-04 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [style] variable declaration locations and varriable length arrays vs malloc

2015-03-03 Thread Roberto E. Vargas Caballero
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

[dev] [sbase][PATCH] Add col command

2015-03-03 Thread Roberto E. Vargas Caballero
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|

[dev] [dmenu][PATCH] Add _XOPEN_SOURCE=500 define

2015-02-22 Thread Roberto E. Vargas Caballero
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 @@

Re: [dev] [st] segfault when selecting text

2015-03-18 Thread Roberto E. Vargas Caballero
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

[dev] [st] Support the DECSCUSR CSI escape sequence

2015-03-18 Thread Roberto E. Vargas Caballero
- 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

Re: [dev] [st] Bugs in scrollback buffer patch

2015-03-18 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH 2/3] Do not use tmoveto in tputtab.

2015-04-13 Thread Roberto E. Vargas Caballero
Applied, thanks!

Re: [dev] [dwm] Style changes

2015-04-10 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH 2/2] Simplify window mapping loop.

2015-04-10 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] ICCCM compatible selection handling

2015-04-13 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [surf] [PATCH] Add NODISKCACHE option to disable the disk cache at compile-time

2015-04-13 Thread Roberto E. Vargas Caballero
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

[dev] [st][PATCH v2] Add tty line support

2015-04-14 Thread Roberto E. Vargas Caballero
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

Re: [dev] [surf] [PATCH] Add NODISKCACHE option to disable the disk

2015-04-14 Thread Roberto E. Vargas Caballero
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,

[dev] [st][PATCH] Add tty line support

2015-04-13 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH] Remove WIN_REDRAW flag.

2015-04-20 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st PATCH 1/3] xloadcols: remove cp variable

2015-04-20 Thread Roberto E. Vargas Caballero
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]);

Re: [dev] [st PATCH 3/3] Move common code to xloadcolor.

2015-04-21 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st PATCH 2/3] Use LEN(dc.col) instead of LEN(colorname).

2015-04-21 Thread Roberto E. Vargas Caballero
Applied. Thanks.

Re: [dev] [st][PATCH v2] Add tty line support

2015-04-21 Thread Roberto E. Vargas Caballero
+ 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

Re: [dev] [st] [PATCH 3/5] Do not use floating point to calculate timeout

2015-04-20 Thread Roberto E. Vargas Caballero
- 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

Re: [dev] [st] [PATCH 2/5] Replace for with while.

2015-04-19 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH 5/5] Monotonic clock cannot jump backwards.

2015-04-20 Thread Roberto E. Vargas Caballero
Applied with minor changes in the comments.

Re: [dev] [st] [PATCH 3/3] Place memset arguments in the correct order.

2015-04-20 Thread Roberto E. Vargas Caballero
- memset(term.trantbl, sizeof(term.trantbl), CS_USA); + memset(term.trantbl, CS_USA, sizeof(term.trantbl)); Uppss, good catch. Applied.

Re: [dev] [st] [PATCH 2/5] Replace for with while.

2015-04-20 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [st] [PATCH 4/5] Make dodraw bool and remove initialization.

2015-04-20 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH 2/3] Remove explicit 'return' from 'void' functions.

2015-04-20 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st] [PATCH 6/6] Remove deltatime variable.

2015-04-20 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st] [PATCH 2/5] Replace for with while.

2015-04-20 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH] Do not set terminal title based on stty arguments.

2015-04-21 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] books that rock

2015-04-25 Thread Roberto E. Vargas Caballero
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

Re: [dev] books that rock

2015-04-25 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [st] [PATCH] Replace close and dup with dup2.

2015-04-22 Thread Roberto E. Vargas Caballero
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.

Re: [dev] [st] [PATCH] Optimize memory footprint of line buffers

2015-04-21 Thread Roberto E. Vargas Caballero
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

Re: [dev] [PATCH] Make build shut up about system() without return value check.

2015-04-21 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [st] Flow control support

2015-04-20 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH 1/5] Place tlinelen type on separate line.

2015-04-20 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st] [PATCH] Optimize memory footprint of line buffers

2015-04-27 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH] Fix sigchld

2015-04-27 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st PATCH 1/3] xloadcols: remove cp variable

2015-04-27 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-04-27 Thread Roberto E. Vargas Caballero
Applied (with minor changes), thanks.

Re: [dev] [st] [PATCH] Clarify calculation precedence for '' and '?'

2015-04-27 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st] [PATCH] Use %u for uint

2015-04-27 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st utf8 1/4] Use utf8len instead of utf8decode.

2015-04-27 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st utf8 4/4] Make tputc, tsetchar and techo accept unicode

2015-04-27 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st] [PATCH] len assignment is never used

2015-04-27 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st] [PATCH] Fix sigchld

2015-04-27 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-04-27 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH] Replace close and dup with dup2.

2015-04-27 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st] [PATCH] Optimize memory footprint of line buffers

2015-04-27 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [st] [PATCH] Optimize memory footprint of line buffers

2015-05-04 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [st] [PATCH] Fix sigchld

2015-05-04 Thread Roberto E. Vargas Caballero
Hi, I am going to apply the original patch. I think there is space for improvements, so new patches are welcome. Regards,

Re: [dev] [PATCH 2/3] Remove first argument of selsnap.

2015-05-04 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [PATCH 3/3] selnormalize: check for SEL_REGULAR explicitly

2015-05-04 Thread Roberto E. Vargas Caballero
- 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

Re: [dev] [PATCH 4/5] selsnap: remove prevdelim variable

2015-05-04 Thread Roberto E. Vargas Caballero
@@ -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 !=

Re: [dev] [PATCH 5/5] selsnap: remove xt variable

2015-05-04 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [PATCH 6/7] selsnap: simplify SNAP_LINE case

2015-05-04 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [PATCH 7/7] Simplify selsnap and selnormalize.

2015-05-04 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [PATCH 1/3] selnormalize: make special case explicit

2015-05-04 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [PATCH 8/8] Add enumeration for sel.mode

2015-05-04 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [PATCH] Fix indentation.

2015-05-04 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [PATCH 09/10] Remove unnecessary tsetdirt.

2015-05-04 Thread Roberto E. Vargas Caballero
- tsetdirt(sel.nb.y, sel.ne.y); Can you explain why is not needed? Regards,

Re: [dev] [PATCH 10/10] Fix empty selection highlighting bug.

2015-05-04 Thread Roberto E. Vargas Caballero
Applied, thanks.

Re: [dev] [st PATCH 1/3] xloadcols: remove cp variable

2015-05-04 Thread Roberto E. Vargas Caballero
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

Re: [dev] [st utf8 3/4] Change internal character representation.

2015-05-04 Thread Roberto E. Vargas Caballero
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,

Re: [dev] [st] [PATCH] Optimize memory footprint of line buffers

2015-05-04 Thread Roberto E. Vargas Caballero
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

<    1   2   3   4   5   6   7   8   >