Applied, thanks.
First two patches can be applied. The second patch is not mine, I just
cherry-picked it from wchar branch.
Third patch changes internal representation in Glyph and makes it work.
Fourth patch changes some functions mostly in the way already done in
wchar branch.
The general idea is to decode UTF-
On Tue, Apr 14, 2015 at 05:25:15PM +0200, Willem van de Krol wrote:
> Permission errors are handled in text_load(). To detect these errors,
> and other open() errors (opening a directory, for example), check the
> return value of text_load().
>
> This fixes a segmentation fault when opening a dire
---
drw.c | 120 --
drw.h | 17 +-
2 files changed, 75 insertions(+), 62 deletions(-)
diff --git a/drw.c b/drw.c
index 078b6b8..196f53b 100644
--- a/drw.c
+++ b/drw.c
@@ -11,6 +11,8 @@
#define UTF_INVALID 0xFFFD
#define UT
---
drw.c | 41 +
drw.h | 24 ++--
2 files changed, 31 insertions(+), 34 deletions(-)
diff --git a/drw.c b/drw.c
index 6c0859e..362484a 100644
--- a/drw.c
+++ b/drw.c
@@ -171,35 +171,36 @@ drw_font_free(Fnt *font) {
free(font);
---
drw.c | 30 +++---
drw.h | 8 +---
2 files changed, 12 insertions(+), 26 deletions(-)
diff --git a/drw.c b/drw.c
index eb3b3c3..6c0859e 100644
--- a/drw.c
+++ b/drw.c
@@ -220,7 +220,7 @@ int
drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, const c
---
drw.c | 16 +++-
drw.h | 2 +-
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/drw.c b/drw.c
index 362484a..078b6b8 100644
--- a/drw.c
+++ b/drw.c
@@ -204,17 +204,15 @@ drw_setscheme(Drw *drw, Scm *scm) {
}
void
-drw_rect(Drw *drw, int x, int y, unsigned int w,
---
st.c | 107 ---
1 file changed, 45 insertions(+), 62 deletions(-)
diff --git a/st.c b/st.c
index fa21c4e..3a37994 100644
--- a/st.c
+++ b/st.c
@@ -383,20 +383,20 @@ static void tmoveato(int, int);
static void tnew(int, int);
st
---
st.c | 79 +---
1 file changed, 38 insertions(+), 41 deletions(-)
diff --git a/st.c b/st.c
index 0c31fc5..fa21c4e 100644
--- a/st.c
+++ b/st.c
@@ -72,6 +72,7 @@ char *argv0;
#define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) ==
This parameter was always UTF_SIZ, so it is better remove it and
use directly UTF_SIZ in in.
---
st.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/st.c b/st.c
index b756a40..0c31fc5 100644
--- a/st.c
+++ b/st.c
@@ -459,7 +459,7 @@ static void mousereport(XEvent *)
---
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 buf[DRAW_BUF_SIZ];
bool ena_sel = sel.ob.x
---
st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/st.c b/st.c
index 0204b2e..3e706f7 100644
--- a/st.c
+++ b/st.c
@@ -4066,7 +4066,7 @@ run:
if(argc > 0) {
/* eat all remaining arguments */
opt_cmd = argv;
- if(!opt_t
Hi again,
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.
Plan 9 Port do
Hi all,
These are just a couple of thoughts I've had that we've discussed a
little in IRC recently. They aren't exactly earth-shattering, but I
think they might still be of use to someone.
Shell aliases which give default arguments, like alias ls='ls -1', are
useful but must be invoked from the s
---
st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/st.c b/st.c
index 0204b2e..adf0b62 100644
--- a/st.c
+++ b/st.c
@@ -1298,8 +1298,7 @@ ttynew(void) {
if (opt_line) {
if((cmdfd = open(opt_line, O_RDWR)) < 0)
die("open lin
At least we can safely reduce to uint16_t now.
On Tue, Apr 21, 2015 at 10:32:26AM -0700, Eric Pruitt wrote:
> On Tue, Apr 21, 2015 at 07:03:57PM +0200, Roberto E. Vargas Caballero wrote:
> > The problem here is that st was designed in this way, and to change it
> > is going to generate segfault in all the users that update the st
> > version wi
On Tue, Apr 21, 2015 at 07:54:27AM +0200, Roberto E. Vargas Caballero wrote:
>
> 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
On Tue, Apr 21, 2015 at 07:03:57PM +0200, Roberto E. Vargas Caballero wrote:
> Guys, are you using colors upper 256?
I use it for my background and cursor colours.
On Tue, Apr 21, 2015 at 07:03:57PM +0200, Roberto E. Vargas Caballero wrote:
> The problem here is that st was designed in this way, and to change it
> is going to generate segfault in all the users that update the st
> version without changing the config file.
Is that really a concern? My st buil
> > + 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 cmd
> 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
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
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
default alignment and packin
st.c:1321:2: warning: ignoring return value of function declared with
warn_unused_result attribute [-Wunused-result]
system(cmd);
^~ ~~~
Debatable whether an error here should case exit(EXIT_FAILURE). Just
preserving the existing behaviour for now.
---
st.c | 3 ++
On Tue, Apr 14, 2015 at 12:35:52PM +0200, Roberto E. Vargas Caballero wrote:
> + if (opt_line) {
> + if((cmdfd = open(opt_line, O_RDWR)) < 0)
> + die("open line failed: %s\n", strerror(errno));
> + close(STDIN_FILENO);
> + dup(cmdfd);
> +
> I prefer the pointer version. I don't know why an index version
> is better in this case. The reference here is [1], section "The
> use of pointers".
IMHO in this particular case index version much better for reading and
understanding.
Applied, thanks.
28 matches
Mail list logo