Re: [dev] [sbase] New branch for sbase+ubase

2024-03-14 Thread Roberto E. Vargas Caballero
Hi, On Wed, Mar 13, 2024 at 11:51:46PM +0100, Elie Le Vaillant wrote: > I think this layout has a few problems: > > - we lose the meaningful separation that the sbase/ubase layout allowed, > i.e the distinction > between what is portable and what isn't. This _could_ be included as > part

[dev] [sbase] New branch for sbase+ubase

2024-03-13 Thread Roberto E. Vargas Caballero
Hi, I have pushed a new branch called ubase-merge that has all the files from ubase in the directory ubase of the root directory in the repository. You can still see the full history of a file in that directory using something like git log --follow. I am thinking about the new layout, and for

Re: [dev] [sbase] Defining scope of sbase and ubase

2024-03-11 Thread Roberto E. Vargas Caballero
Hi, After reading the opinion of the people in this thread, I think the best option is to merge the sbase and ubase repositories and having a mechanism in the build system to select the set of tools to be included in the build. The main drawback of this is that the build system will be more

[dev] [sbase] Defining scope of sbase and ubase

2024-03-07 Thread Roberto E. Vargas Caballero
Hi, While reviewing several patches for sbase adding new tools some discussion happened and I thought it was better to move the discussion here. The patches raised a concern about what should be the scope of sbase. The idea of sbase was to provide a minimal portable POSIX base, while having

Re: [dev] [sbase] expr segmentation fault

2024-01-30 Thread Roberto E. Vargas Caballero
Hi, On Mon, Jan 22, 2024 at 08:11:42PM +, ruivlea wrote: > After sbase commits: > - 270ca025ce236885e3177cd7acfd2cfbdf6e36a5 > expr: don't evaluate matched substr as a number > - e50d533d598dbe284e225e2ee52ed5f76a6e6f6a > expr: treat expressions as strs until evaluation > > I fail to

Re: [dev] [edit] Introducing edit, a simple text editor

2023-10-24 Thread Roberto E. Vargas Caballero
Hi, On Mon, Oct 23, 2023 at 10:52:11AM -0400, Sean MacLennan wrote: > Basically, I agree that undo is hard. Indeed. Ed gets undo by design keeping a history keeping a list of lines and every modification implies a new list, so you can always undo (at least once). Regards,

Re: [dev] getting rid of cmake builds

2023-09-22 Thread Roberto E. Vargas Caballero
Hi, On Fri, Sep 22, 2023 at 05:08:15PM +0200, Mattias Andrée wrote: > > You can used make to run ./configure automatically, all you need to do is > simply > rename Makefile to makefile.in, let ./configure run `ln -s makefile.in > makefile` > and create a new file named Makefile containing: >

Re: [dev] getting rid of cmake builds

2023-09-22 Thread Roberto E. Vargas Caballero
Hi, On Fri, Sep 22, 2023 at 07:27:25PM +0600, NRK wrote: > $ make > # ... builds st > $ make CFLAGS="-g3 -fsanitize=address,undefined" > # ... builds nothing because make doesn't take CFLAGS changes into > account. > > I've seen some (hacky) ways to dump the flags into a

Re: [dev] getting rid of cmake builds

2023-09-22 Thread Roberto E. Vargas Caballero
Hi, On Fri, Sep 22, 2023 at 04:06:25PM +0600, NRK wrote: > On Fri, Sep 22, 2023 at 11:18:47AM +0200, Страхиња Радић wrote: > > ./build.sh > > But in short: you simply include any `.c` file into one. There's zero and then you get name collisions because all the static symbols are compiled in a

Re: [dev] sbm dmenu bookmarker

2023-07-31 Thread Roberto E. Vargas Caballero
Hi, On Sun, Jul 30, 2023 at 05:18:35PM -0300, Spenser Truex wrote: > A friend of mine was impressed with how quickly I was spamming the most > based and redpilled links from this script and wanted me to publish it. I have a simple script also based in dmenu for this task, but yours is much more

Re: [dev] [dwm] [st] benefits (or not) of -march=x86-64-v3 and gcc optimizations

2023-02-07 Thread Roberto E. Vargas Caballero
Hi, On Tue, Feb 07, 2023 at 10:30:24AM +0200, Κρακ Άουτ wrote: > As I mentioned, in practice I don't see any differences. I'm wondering if > theoretically there could be some positive effect. People who know how > exactly the code works are better suited to supply a definitive answer than >

Re: [dev] [st] incorrect italic, bold, bold italic versions

2022-08-06 Thread Roberto E. Vargas Caballero
Hi, On Sat, Aug 06, 2022 at 04:55:47AM +0600, NRK wrote: > The font2 patch[0] on the wiki kinda enables fallback fonts. But I > didn't like the fact that it adds a separate array `font2`. IMO you > should be able to do this, similar to dmenu/dwm: > > static const char *fonts[] = { >

Re: [dev] Re: [st] incorrect italic, bold, bold italic versions

2022-08-06 Thread Roberto E. Vargas Caballero
Hi, On Sat, Aug 06, 2022 at 01:31:16AM +0300, Plato Kiorpelidis wrote: > Here is my branch: https://github.com/kioplato/st/tree/user-specified-fonts Please, can you send a patch to show the changes instead of a link a some random page? Regards,

Re: [dev] Replace ranlib(1) calls?

2022-08-01 Thread Roberto E. Vargas Caballero
Hi, On Sun, Jul 31, 2022 at 01:00:23AM +0200, Laslo Hunhold wrote: > I must admit that I only copied the ar-ranlib-invocation likewise from > what I found on the internet for my libraries, so even though I don't > think it makes any difference (i.e. increases portability apart from >

Re: [dev] Replace ranlib(1) calls?

2022-08-01 Thread Roberto E. Vargas Caballero
Hi, On Sun, Jul 31, 2022 at 12:59:23AM +0200, Laslo Hunhold wrote: > Granted, it's one thing what a standard defines and another what is > actually used in everyday life, but calling a standard-defined option > as _less_ portable than an undefined historical artifact is a stretch. -std=c99 is

Re: [dev] Replace ranlib(1) calls?

2022-07-22 Thread Roberto E. Vargas Caballero
Hi, On Wed, Jul 20, 2022 at 12:23:01PM +, Tom Schwindl wrote: > ranlib(1) is, in fact, legacy. It was used to create symbol tables for > archives > before ar(1) was able to do that by itself. > POSIX now specifies that ar(1) should create a symbol table by default, when > there is at least

Re: [dev] [surf] webkit

2022-07-10 Thread Roberto E. Vargas Caballero
Hi, On Sat, Jul 09, 2022 at 11:39:37AM -0300, Renato Andrade Galvão wrote: > So I have used surf, which I compile from your suckless repositories, > along with the webkit lib package from debian. Currently I can't do > anything better than this. I use surf in this way too. It works but it has

Re: [dev] [st] Incorrect colours in 88-colour mode with urwid

2022-07-08 Thread Roberto E. Vargas Caballero
Hi, On Sat, Jul 02, 2022 at 11:08:44PM +0200, Robin Ekman wrote: > Possibly this is at least partially an issue with urwid, cf. > https://lists.suckless.org/dev/1410/23724.html Uh, yeah I think it can be a problem related to urwid. Maybe a good idea is trying to reproduce the problem in a

Re: [dev] Automatic C header dependency tracking for the redo build-system

2022-06-09 Thread Roberto E. Vargas Caballero
Hi, On Tue, Jun 07, 2022 at 03:21:49PM +0200, David Demelier wrote: > -include ${DEPS} ... > And you're done. On a fresh directory the -include ${DEPS} will > silently fail and rebuild everything. Then .d files will be generated > and touching any file will rebuild exactly what should be. > >

Re: [dev] ST 'loginShell'

2022-03-04 Thread Roberto E. Vargas Caballero
Hi, On Fri, Mar 04, 2022 at 07:59:09AM +, Sime Ramov wrote: > I didn't manage to get this going via `config.h`: > > /* > * What program is execed by st depends of these precedence rules: > * 1: program passed with -e > * 2: scroll and/or utmp > * 3: SHELL environment

[dev] Patches for st

2020-04-11 Thread Roberto E. Vargas Caballero
Hi, I attach several patches for st (sorry, for different reasons i cannot use git-send-email). Regards, >From d18c3a8c9eb82b2d135f4feb44060e6adb29428e Mon Sep 17 00:00:00 2001 From: "Roberto E. Vargas Caballero" Date: Fri, 10 Apr 2020 22:26:12 +0200 Subject: [PATCH 3/4] Fi

Re: [dev] freetype2/fc pain

2018-09-25 Thread Roberto E. Vargas Caballero
On Mon, Sep 24, 2018 at 10:26:52PM +0600, Eon S. Jeon wrote: > I think fontconfig is to blame here. It?s what st is using to find fallbacks. > It?s just that we don?t want such highly sophisticated fallback mechanism. We > all love simple infallible code, so that we can always blame users. ;) >

Re: [dev] freetype2/fc pain

2018-09-24 Thread Roberto E. Vargas Caballero
On Sun, Sep 23, 2018 at 10:07:45PM +0200, Silvan Jegen wrote: > The author of the fork also maintains a simple Wayland drawing library[2] > (which is also used in the Wayland st fork) and a Wayland compositor[3] > library. The author is the current maintainer of sbase.

Re: [dev] freetype2/fc pain

2018-09-24 Thread Roberto E. Vargas Caballero
On Sun, Sep 23, 2018 at 05:20:27PM +, sylvain.bertr...@gmail.com wrote: > On Sun, Sep 23, 2018 at 09:22:00AM -0700, AR Garbe wrote: > > On Sun, 23 Sep 2018 at 06:37, wrote: > > And has st a wayland backend or fork? Yes, Michael Forney wrote it.

Re: [dev] freetype2/fc pain

2018-09-24 Thread Roberto E. Vargas Caballero
On Mon, Sep 24, 2018 at 09:35:11AM +0200, Hiltjo Posthuma wrote: > > I don't think we should throw out support for a feature that more than a > > billion > > people on the planet rely on. That doesn't mean that we can't rethink how we > > go about supporting that feature though. Of course no, I

Re: [dev] freetype2/fc pain

2018-09-23 Thread Roberto E. Vargas Caballero
On Sun, Sep 23, 2018 at 01:49:01PM +0200, Hiltjo Posthuma wrote: > For st there was a X11/terminal code split to support Wayland, automated > testing of terminal emulator code. Now there are abstractions but it is not > useful. Maybe it should be reverted also? The abstractions in st are really

Re: [dev] freetype2/fc pain

2018-09-23 Thread Roberto E. Vargas Caballero
Hi, On Sat, Sep 22, 2018 at 09:10:37PM -0700, AR Garbe wrote: > I'm really at a point to consider forking dwm and dmenu to simply rely > on X11 as it used to be, perhaps with going the extra mile to remove > Xinerama support as well and to rely on single headed setups. I feel the same about st.

Re: [dev] [st] How to make it distinguish Control-p from Control-P?

2018-05-17 Thread Roberto E. Vargas Caballero
I am sorry, but st hasn't super powers, and it cannot do impossible things. Control mask the upper bits of the key (key & 0x1F) while shift clears the 6th bit, so ctrl+shift+p = (p & ~0x20) & 0x1f. As you can see, it is impossible to differentiate between ^p and ^P. Regards,

Re: [dev] [st] shift + backspace

2018-04-29 Thread Roberto E. Vargas Caballero
,p

Re: [dev] [announce] mle: a small terminal-based text editor

2017-04-10 Thread Roberto E . Vargas Caballero
> I wrote a patch[0] for mg which sort of adds Unicode support a while I wrote a 1 line editor for st [1]. It allows you to edit a page of text and then print it to stdout or to some other file using -o. Regards, [1] http://lists.suckless.org/dev/1401/19894.html

Re: [dev] st: different keybindings not in man page

2017-04-10 Thread Roberto E . Vargas Caballero
> If someone can confirm that the man page should be updated to reflect > the new keybindings, I will submit a patch of st.1. The man page still > has "Alt". Yeah, the man page should be updated. Regards,

Re: [dev] [announce] mle: a small terminal-based text editor

2017-03-29 Thread Roberto E . Vargas Caballero
> purposes. Both approaches are better than writing your own configuration > parser. You can write your parser configurator using: scanf(" %40s = %40s", key, value); Regards,

Re: [dev] [st] [PATCH 2/2] Keep end of lines in memory when resizing terminal

2017-03-29 Thread Roberto E . Vargas Caballero
> scrollback buffer built into st itself. Instead of mandating the use > of tmux et al, I would rather put a helper tool into the st repo, that > works as a basic shell wrapper process (no detaching). It would It can be a separated tool integrated with st, in the same way than utmp. I am going to

Re: [dev] [st] [PATCH 2/2] Keep end of lines in memory when resizing terminal

2017-03-29 Thread Roberto E . Vargas Caballero
> scrollback buffer built into st itself. Instead of mandating the use > of tmux et al, I would rather put a helper tool into the st repo, that > works as a basic shell wrapper process (no detaching). It would It can be a separated tool integrated with st, in the same way than utmp. I am going to

Re: [dev] [st] [PATCH 2/2] Keep end of lines in memory when resizing terminal

2017-03-29 Thread Roberto E . Vargas Caballero
> scrollback buffer built into st itself. Instead of mandating the use > of tmux et al, I would rather put a helper tool into the st repo, that > works as a basic shell wrapper process (no detaching). It would It can be a separated tool integrated with st, in the same way than utmp. I am going to

Re: [dev] [st] [PATCH 2/2] Keep end of lines in memory when resizing terminal

2017-03-29 Thread Roberto E . Vargas Caballero
> I'd love to see scrollback also. I've played around a tiny bit with dumping If you want to work in the backscroll tool I can help you [1]. Regards, [1] http://ix.io/1vQQ

Re: [dev] [st] [PATCH 2/2] Keep end of lines in memory when

2017-03-29 Thread Roberto E . Vargas Caballero
> this is a very good point! Even if this was approached with an external > tool you probably just start implementing st again with all the bells > and whistles, let alone the fact that you need a separate program to > make st work as desired in a normal setup within a window manager. No, you

Re: [dev] [st] [PATCH 1/2] Fix commented out code

2017-03-29 Thread Roberto E . Vargas Caballero
> I don't think that's a typo, just a short form for "hey, watch out, > remember we still have `i == minrow` from the last loop here!". ;) Uh, you are right. Sadly I read your comment after pushing it. Best regards,

Re: [dev] [st] [PATCH 2/2] Keep end of lines in memory when resizing terminal

2017-03-29 Thread Roberto E . Vargas Caballero
> Totally inconsistent crap. Basically you have to stop using stupid > programs that care about terminal width. It's the only real solution. > > I'm not even gonna talk about this curses bullshit. I don't care about > integrating such useless programs into scrollback. Indeed. Programs that look

Re: [dev] [st] [PATCH 2/2] Keep end of lines in memory when resizing

2017-03-29 Thread Roberto E . Vargas Caballero
> I can live without scrollback, but what I dislike about st now is > that it loses lines when I just shuffle my terminals around with > dwm. When I have 3 windows (1 master, 2 stack) and move terminal As I have said in the previous mail, I can help you to write the tool to solve this problem.

Re: [dev] [st] [PATCH 2/2] Keep end of lines in memory when resizing terminal

2017-03-29 Thread Roberto E . Vargas Caballero
Hi, Thank you for your contribution, but after thinking about it I think I am going to reject this patch. There are important reasons why st hasn't a scrollback buffer, and the same reasons apply to this patch. There are so many cases and so many interactions that is better to keep this logic out

Re: [dev] [st/dwm] Alt-Shift-C and Mod1-Shift-C

2017-01-24 Thread Roberto E . Vargas Caballero
> Use Ctrl-Sfhit-C, not Alt-Shift-C, like the other terminal emulators use. If all the people agree I am going to change the defaul keybinding to CTRL+SHIFT+C, because it is an impossible sequence in the terminal world, and it is not hiding any valid combination that can be used by the programs

Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-24 Thread Roberto E. Vargas Caballero
Hi, On Tue, Jan 19, 2016 at 01:56:56PM -0200, Brad Luther wrote: > Roberto Vargas - it works in a perfect way! I have one question. Why > didn't it work by default on ash? Is ash a sucky shell? Should I file > a bug? Because by what I understand this is a hack, right? Not the > ideal way. But so

Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-19 Thread Roberto E. Vargas Caballero
On Tue, Jan 19, 2016 at 10:02:01AM -0200, Brad Luther wrote: > I'm using ash and it's not working out of the box. > I'll see if I can find a patch or then I'll try using mksh, but I > really like ash. > Thanks for the tips. The patch is not so complex ... Can someone put it in the wiki? diff

Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-17 Thread Roberto E. Vargas Caballero
Hello, On Sun, Jan 17, 2016 at 12:20:11PM -0200, Brad Luther wrote: > Roberto Caballero The short form of my name is Roberto Vargas. Read [1]. > so I understand that the behavior that makes > content be lost is because it is less hungry on memory? If that's the > case, I think this is

Re: [dev] [bugs] st clears up upon resize and other little things

2016-01-17 Thread Roberto E. Vargas Caballero
Hi, On Fri, Jan 15, 2016 at 10:53:30AM -0200, Brad Luther wrote: > 1 - when you open st and some strings printed (try 'ls' for example), > upon resizing it down and resizing it back up, the content is lost. > Shouldn't the printed stuff remain there? This is an annoyance for > when I, for

Re: [dev] Auto-preview man pages

2016-01-07 Thread Roberto E. Vargas Caballero
On Thu, Jan 07, 2016 at 01:56:13PM -0500, Greg Reagle wrote: > I find it a real pain to work with things like man page source and markdown > source and so forth because of the extra steps of making the output/object > format. > You can use something like [0], or use gv, which automatically

[dev] [sbase][PATCH 2/4] ed: Reset modflag in clearbuf()

2016-01-01 Thread Roberto E. Vargas Caballero
For the same reason we don't care about the state of the buffer in clearundo() we can reset modflag in clearbuf(), because after calling it we don't want to know anything about the previous state. --- ed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ed.c b/ed.c index

[dev] [sbase][PATCH 3/4] ed: add init()

2016-01-01 Thread Roberto E. Vargas Caballero
These funcction initializes the scratch buffer, and in case of having a file name parameter it loads the file in the scratch. It also fixes a problem before this version, where the saved filename was not set when the file didn't exist. --- ed.c | 32 ++-- 1 file

[dev] [sbase][PATCH 1/4] ed: Move modflag=0 to clearundo()

2016-01-01 Thread Roberto E. Vargas Caballero
When we discard the content of an undo buffer is because we don't need it anymore, and it means that we don't care about the modify state of the buffer so we can reset the modflag in clearundo(), and remove this assignation each time clearundo() is called. --- ed.c | 3 +-- 1 file changed, 1

[dev] [sbase][PATCH 4/4] ed: Don't show size of files in no diagnosistic mode

2016-01-01 Thread Roberto E. Vargas Caballero
-s flag disables such warnings. --- ed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ed.c b/ed.c index 1cf0d60..7e7fbb6 100644 --- a/ed.c +++ b/ed.c @@ -623,7 +623,8 @@ doread(char *fname) } inject(s); } - printf("%zu\n",

Re: [dev][ubase][PATCH] fix several problems in dd

2016-01-01 Thread Roberto E. Vargas Caballero
On Fri, Jan 01, 2016 at 12:15:18PM +, Dimitris Papastamos wrote: > At the end of the day, a bug is a bug irrespective of how it was introduced. > > I will have a look at the patch tomorrow. My opinion is that all the code imported should be removed and written in house.

Re: [dev] [st] Reporting a Segmentation fault

2015-11-27 Thread Roberto E. Vargas Caballero
On Fri, Nov 20, 2015 at 10:52:28AM -0200, Marc Collin wrote: > Hello, I want to report a segfault when using st. > > Steps to reproduce: > 1) open st > 2) "vim file" > 3) Press "Enter" > > Around 30% of times this results in a crash. > Here's the message st gives: > > erresc: unknown sequence

Re: [dev] [sandy] [st] Title incorrectly shown if TERM=st

2015-10-15 Thread Roberto E. Vargas Caballero
> hmm, it was originally added with > b2db58c2a05168257ee4e4b941f0533c6dde2a10 to make the window title the > status line. > The window title does become the status line, but sandy keeps spitting > stuff out while I'm editing, so I'll take a printed terminal status > line over spittle. > Is there

Re: [dev] [sandy] [st] Title incorrectly shown if TERM=st

2015-10-06 Thread Roberto E. Vargas Caballero
On Sun, Oct 04, 2015 at 01:45:58PM -0400, shua lloret wrote: > When I try to run sandy with TERM set as any of st,st-16color,st-256color, > the title line is not shown, and is instead printed out randomly to stdout > as I try to insert text. This happens when running "TERM=st sandy" in rxvt, >

Re: [dev] Stali RC

2015-10-05 Thread Roberto E. Vargas Caballero
> > > - am I correct in thinking that we install manual pages, but currently no > > 'man' program to read them? > > I'd propose using the OpenBSD man tools. > I propose to use neatroff, that is a new implementation from scratch of the full troff toolchain. I know that the main use of troff

Re: [dev] [st] Terminal abnormal key codes

2015-09-03 Thread Roberto E. Vargas Caballero
Hi, > That's not what I'm talking about. Of course a tone of terminals have > smkx defined, but fish currently doesn't send it and works on (as far as > I know) anything but st. > > In other words: > > If you launch fish in { konsole, xterm, gnome-terminal, linux in-kernel > VTs, iTerm2, ... }

Re: [dev] [st] Terminal abnormal key codes

2015-09-03 Thread Roberto E. Vargas Caballero
Hi, > > Wrong again: > > > > Nope, fish works, though it turns out we bound the other escape > manually. > > xterm (debian testing): > > > > $ tput rmkx > > ^[[F (End key) > > ^[[H (Home key) > > $ tput smkx > > ^[OF (End key) > > ^[OH (Home key) It means you are wrong. Fish doesn't work

Re: [dev] [st] Terminal abnormal key codes

2015-09-02 Thread Roberto E. Vargas Caballero
> How do you know that smkx should be '\E[?1h\E='? Is there any > documentation about it? http://www.vt100.net/docs/vt100-ug/chapter3.html#SM http://www.vt100.net/docs/vt100-ug/chapter3.html#DECKPAM There are two issues related to keyboard configuration in the terminal world: -

Re: [dev] [st] Terminal abnormal key codes

2015-09-02 Thread Roberto E. Vargas Caballero
Hi, > Our question is probably better stated as the following: > > st seems to e.g. send "[P" for delete instead of the '\E[3;2~' in > terminfo (which fish does use), unless we explicitly do the equivalent > of "tput smkx". This not only applies to delete, but a few other key > combinations as

Re: [dev] [st] Stuck in ISO 2022 locking escapes and Evil escape sequences

2015-09-01 Thread Roberto E. Vargas Caballero
> >mosh mentions some "UTF8 terminal mode", which is different > >from "ISO 2022" and doesn't even have G0-3. It's all mentioned > >in the link[1]. > > > >[1]: https://www.cl.cam.ac.uk/~mgk25/unicode.html#term This is the personal opinion of the author of the article. Can you send me a link to

Re: [dev] [st] Terminal abnormal key codes

2015-09-01 Thread Roberto E. Vargas Caballero
On Tue, Sep 01, 2015 at 10:22:52PM +0800, Pickfire wrote: > Hi, it seems that st does some terminal codes abnormally[1]. > > What is the reason for st's key codes to be different from the other > terminals? Is st following some standards? > > [1]: >

Re: [dev] scc vs 8cc

2015-07-27 Thread Roberto E. Vargas Caballero
On Sun, Jul 26, 2015 at 11:58:20PM +0200, Teodoro Santoni wrote: so why scc? Once upon a time 8cc was a linux x86 64bit C compiler and scc a unix Z80 C compiler. Why what? Yes, it is true. When I began scc (at that moment kcc), the problem I had was that compilers for z80 was not

[dev] St style changes

2015-07-10 Thread Roberto E. Vargas Caballero
Hi, We are doing deep changes of style in st, and it means the style will not be ready until 2 or three weeks, so if you have to update some of your patches in the wiki, then it is better wait a bit (mainly because in other case you will have to update your patch several times). Thank

Re: [dev] [PATCH 1/1] remove useless dup()

2015-07-09 Thread Roberto E. Vargas Caballero
On Wed, Jul 08, 2015 at 09:30:47PM +0200, Markus Wichmann wrote: On Wed, Jul 08, 2015 at 12:00:35PM +0200, Roberto E. Vargas Caballero wrote: We are ignoring return value of dup(), so just remove it. From dup(3): The dup() system call creates a copy of the file

Re: [dev] st -e

2015-07-09 Thread Roberto E. Vargas Caballero
On Thu, Jul 09, 2015 at 10:23:45PM +0200, S. R. Gal wrote: st -e sh -c 'tmux a -d || tmux' Both, above and st -e ''tmux a -d || tmux'', seem to work but they result with the following error messages: Theoretically you can also omit -e in both cases. Regards,

Re: [dev] [PATCH 1/1] remove useless dup()

2015-07-08 Thread Roberto E. Vargas Caballero
We are ignoring return value of dup(), so just remove it. From dup(3): The dup() system call creates a copy of the file descriptor oldfd, using the lowest-numbered unused descriptor for the new descriptor. if((cmdfd = open(opt_line, O_RDWR)) 0)

Re: [dev] [PATCH 1/1] remove useless dup()

2015-07-08 Thread Roberto E. Vargas Caballero
In fact, the only thing that can be done here is: close(STDIN_FILENO); dup(cmdfd); + close(cmdfd); stty(); because we are not going to use this file descriptor anymore, but I think we will not have a significant improvement.

Re: [dev] Input method under break (again) under st

2015-07-02 Thread Roberto E. Vargas Caballero
Hi, On Wed, Jul 01, 2015 at 09:40:41AM -0700, Weng Xuetian wrote: Some fcitx user reaches me about input method issue, and I surprisingly found that input method is broken again in st because I have fixed it once. Yes. Maybe it is my fault because I didn't tested this part of st. The new

Re: [dev] [st][PATCH] Preserve pixelsize fractions in font defaultsize.

2015-06-15 Thread Roberto E. Vargas Caballero
On Fri, Jun 12, 2015 at 09:43:41PM +0200, Quentin Rameau wrote: The font size is actually a double and can have non-integer values when fonts are specified in point size instead of pixel size. Update zoom functions to preserve the fractional component in a float. Some small precision is

Re: [dev] [st] question about 24-bit color support

2015-06-02 Thread Roberto E. Vargas Caballero
Hi, But fg is defined as a ushort. [4] typedef struct { Rune u; /* character code */ ushort mode; /* attribute flags */ ushort fg;/* foreground */ ushort bg;/* background */

Re: [dev] [st] segfault with true color output

2015-06-02 Thread Roberto E. Vargas Caballero
Hi, On Sun, May 31, 2015 at 12:01:20PM -0400, s j wrote: printf \e[38;2;255;255;255mTRUECOLOR Thanks for the bug report. I think this bug is not related to the other problem reported (the incorrect data size for fg and bg), but if you can try after reverting the commit 7ab6c92 it will be useful

Re: [dev] [st] [PATCH] Convert manual to mdoc

2015-05-28 Thread Roberto E. Vargas Caballero
Hi, On Thu, May 28, 2015 at 01:55:20AM -0400, Michael Reed wrote: This was mostly a 1-1 conversion, although mandoc(1) -Tlint and igor(1) prompted moving AUTHORS down (among other small things). Punctuation was also made more consistent to match sbase. This is a topic we have discussed in

Re: [dev] [ST] [PATCH] Clean up xdraws and optimize glyph drawing with non-unit kerning values

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

Re: [dev] [ST] [PATCH] Changed type for UTF-32 codepoints from long to uint_least32_t

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

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

Re: [dev] Odds and ends (2/2): $XEMBED

2015-05-04 Thread Roberto E. Vargas Caballero
Hi, In Plan 9, when one executes a graphical program from a terminal window it will take over that window, so that running a graphical text editor like Sam from a terminal is not so different from running a line editor. This was one of my favourite things from the Plan 9 GUI. Indeed. My

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.

  1   2   3   4   5   6   7   >