On Sat, Apr 19, 2014 at 9:13 AM, Krol, Willem van de <008...@jfc.nl> wrote:
> Isn't setpgid(0, 0) after setsid() redundant?
>
No. [0] setsid() creates a new session.
cheers!
mar77i
[0] http://pubs.opengroup.org/onlinepubs/009695399/functions/setsid.html
On Tue, Apr 22, 2014 at 09:09:31AM +0200, Martti Kühne wrote:
> On Sat, Apr 19, 2014 at 9:13 AM, Krol, Willem van de <008...@jfc.nl> wrote:
> > Isn't setpgid(0, 0) after setsid() redundant?
> >
>
> No. [0] setsid() creates a new session.
The issue is related to setsid() - in particular if you use
---
st.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/st.c b/st.c
index 6da4827..64384cd 100644
--- a/st.c
+++ b/st.c
@@ -360,7 +360,7 @@ static void strparse(void);
static void strreset(void);
static int tattrset(int);
-static void tprinter(char *s, size_t
---
st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/st.c b/st.c
index 92fd7da..6da4827 100644
--- a/st.c
+++ b/st.c
@@ -2256,8 +2256,7 @@ printsel(const Arg *arg) {
}
void
-tdumpsel(void)
-{
+tdumpsel(void) {
char *ptr;
if((ptr = getsel())) {
--
1.
---
st.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/st.c b/st.c
index bb3e687..aba034f 100644
--- a/st.c
+++ b/st.c
@@ -549,12 +549,10 @@ xrealloc(void *p, size_t len) {
char *
xstrdup(char *s) {
- char *p = strdup(s);
-
- if (!p)
+ if((s = strd
---
st.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/st.c b/st.c
index 64384cd..b8bf84b 100644
--- a/st.c
+++ b/st.c
@@ -298,13 +298,13 @@ typedef struct {
typedef union {
int i;
- unsigned int ui;
+ uint ui;
float f;
const void
---
st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/st.c b/st.c
index b8bf84b..bb3e687 100644
--- a/st.c
+++ b/st.c
@@ -1544,8 +1544,7 @@ tsetchar(char *c, Glyph *attr, int x, int y) {
* The table is proudly stolen from rxvt.
*/
if(attr->mode &
---
st.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/st.c b/st.c
index 019f53c..92fd7da 100644
--- a/st.c
+++ b/st.c
@@ -1628,18 +1628,14 @@ tinsertblank(int n) {
void
tinsertblankline(int n) {
- if(term.c.y < term.top || term.c.y > term.bot)
-
Internally st represents characters using "char" type.
It is used in CSIEscape.buf, Glyph.c etc.
However, char can be either signed or unsigned depends on the
architecture.
On x86 '\x80' < 0x20 is true, but (uchar)'\x80' < 0x20 is false.
tputc explicitly converts character to ascii code:
BTW what do you think about converting st code to store characters in uchar
instead of
char to avoid these problems in the future and avoid manual conversions?
tsetchar should probably be fixed too.
c[0] >= 0x41 && c[0] <= 0x7e
works, but it is better to change type of `c' to uchar *.
On Sun, Apr 20, 2014 at 9:24 PM, Rob wrote:
> Into the bikeshed I go...
>
> LEN(a + 2) doesn't mean anything anyway, as a's type decays.
>
> To do it properly there should be some kind of static assert in the
> macro that the argument is of array type. But this is a small code base
> and you'd exp
Hi,
I like these patches, and I want to apply them, but there is a
small thing that I think should be modified. After the patches tscolldown
has:
tsetdirt(orig, term.bot-n);
tclearregion(0, term.bot-n+1, term.col-1, term.bot);
but tscrollup has:
tclearregion(0, o
Hi,
I am going to apply the full set of patches. Thanks!!
--
Roberto E. Vargas Caballero
On Tue, Apr 22, 2014 at 09:34:58PM +0200, Roberto E. Vargas Caballero wrote:
> Hi,
>
> I like these patches, and I want to apply them, but there is a
> small thing that I think should be modified. After the patches tscolldown
> has:
>
> tsetdirt(orig, term.bot-n);
> tclearregion
> It is used in CSIEscape.buf, Glyph.c etc.
> However, char can be either signed or unsigned depends on the
> architecture.
It depends of the compiler, not of the architecture. Compiler will decide
signess of char based in what can be more efficient or what is
more logical.
> On x86 '\x80' < 0x20
techo compares signed char to '\x20'. Any character with code less then
'\x20' is treated as control character. This way characters with MSB
set to 1 are considered control characters too.
Also this patch makes techo display DEL character as ^?.
To reprocuce the bug, enable echo mode using print
> How are you getting on with this? I am planning to do a bit more polishing
> to ubase + add 1-2 tools and then make an initial v0.1 release. Would
wouldn't this fit better in sbase?
On Tue, Apr 22, 2014 at 05:20:29PM -0400, Calvin Morrison wrote:
> > How are you getting on with this? I am planning to do a bit more polishing
> > to ubase + add 1-2 tools and then make an initial v0.1 release. Would
>
> wouldn't this fit better in sbase?
depends... a naive implementation can
On 22 April 2014 17:24, sin wrote:
> On Tue, Apr 22, 2014 at 05:20:29PM -0400, Calvin Morrison wrote:
>> > How are you getting on with this? I am planning to do a bit more polishing
>> > to ubase + add 1-2 tools and then make an initial v0.1 release. Would
>>
>> wouldn't this fit better in sbase
On Tue, Apr 22, 2014 at 05:34:47PM -0400, Calvin Morrison wrote:
> On 22 April 2014 17:24, sin wrote:
> > On Tue, Apr 22, 2014 at 05:20:29PM -0400, Calvin Morrison wrote:
> >> > How are you getting on with this? I am planning to do a bit more
> >> > polishing
> >> > to ubase + add 1-2 tools and
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@'
Patch also removes special handling for corner case and s
Minor typo correction.
diff --git a/TODO b/TODO
index 6e01237..535a8e4 100644
--- a/TODO
+++ b/TODO
@@ -13,7 +13,7 @@ In no particular order, at sandy.c:
At config.def.h:
- Bindings!
- Use local/system script path and all
-- Choose color-set for either black of white bg
+- Choose color-set for e
22 matches
Mail list logo