Re: [hackers] [sent] Fix cmdline argument check
> Noted, I sent a modified version of the patch, what do you think about > it? I think this version is clearly better than the first. Sometimes is difficult don't abuse of the ternary operator ;). Regards,
Re: [hackers] [farbfeld] Fix 2 little things in jpg2ff(1) || FRIGN
> I was wondering, don't you mean "argc != 0"? :) uhmmm, yeah. Regards,
[hackers] [st] xtermclear() is now done by xdrawglyphfontspecs() || Christoph Lohmann
commit 30440295bc054f37a2a8275acca769cd83bcb780 Author: Christoph Lohmann <2...@r-36.net> AuthorDate: Mon Mar 7 14:33:05 2016 +0100 Commit: Christoph Lohmann <2...@r-36.net> CommitDate: Mon Mar 7 14:33:05 2016 +0100 xtermclear() is now done by xdrawglyphfontspecs() Thanks Ton van den Heuvel for the proposal! diff --git a/st.c b/st.c index 0536b6f..2473af7 100644 --- a/st.c +++ b/st.c @@ -439,7 +439,6 @@ static void xresettitle(void); static void xsetpointermotion(int); static void xseturgency(int); static void xsetsel(char *, Time); -static void xtermclear(int, int, int, int); static void xunloadfont(Font *); static void xunloadfonts(void); static void xresize(int, int); @@ -3213,17 +3212,6 @@ xsetcolorname(int x, const char *name) return 0; } -void -xtermclear(int col1, int row1, int col2, int row2) -{ - XftDrawRect(xw.draw, - &dc.col[IS_SET(MODE_REVERSE) ? defaultfg : defaultbg], - borderpx + col1 * xw.cw, - borderpx + row1 * xw.ch, - (col2-col1+1) * xw.cw, - (row2-row1+1) * xw.ch); -} - /* * Absolute coordinates. */ @@ -3983,7 +3971,6 @@ drawregion(int x1, int y1, int x2, int y2) if (!term.dirty[y]) continue; - xtermclear(0, y, term.col, y); term.dirty[y] = 0; specs = term.specbuf;
[hackers] [surf] Disable globbing in curl. || Christoph Lohmann
commit f5e8baad06eafef22df12ab2649139260127d4e4 Author: Christoph Lohmann <2...@r-36.net> AuthorDate: Mon Mar 7 14:28:23 2016 +0100 Commit: Christoph Lohmann <2...@r-36.net> CommitDate: Mon Mar 7 14:28:23 2016 +0100 Disable globbing in curl. diff --git a/config.def.h b/config.def.h index 93a3d49..7c2b10f 100644 --- a/config.def.h +++ b/config.def.h @@ -48,7 +48,7 @@ static Bool allowgeolocation = TRUE; /* DOWNLOAD(URI, referer) */ #define DOWNLOAD(d, r) { \ .v = (char *[]){ "/bin/sh", "-c", \ -"st -e /bin/sh -c \"curl -L -J -O --user-agent '$1'" \ +"st -e /bin/sh -c \"curl -g -L -J -O --user-agent '$1'" \ " --referer '$2' -b $3 -c $3 '$0';" \ " sleep 5;\"", \ d, useragent, r, cookiefile, NULL \
Re: [hackers] [libzahl] Fix example in comments
On Mon, 7 Mar 2016 14:48:12 +0200 Vasily Kolobkov wrote: > On Mon, Mar 07, 2016 at 01:35:13PM +0100, Mattias Andrée > wrote: > > Sorry, it is correct. 4010 is split to 40⋅10² + 10, and > > 3020 is split to 30⋅10² + 20. 40⋅10² ⋅ 30⋅10² = > > 40⋅30⋅10⁴. > > oh, pardon me - on my terminal and in my eyes the > superscript 4 looked so like a 6. > Easly mistake. Only 0 through 3 look good on all fonts with small size. pgpPJMnf_ZgyI.pgp Description: OpenPGP digital signature
Re: [hackers] [libzahl] Fix example in comments
On Mon, Mar 07, 2016 at 01:35:13PM +0100, Mattias Andrée wrote: > Sorry, it is correct. 4010 is split to 40⋅10² + 10, and > 3020 is split to 30⋅10² + 20. 40⋅10² ⋅ 30⋅10² = 40⋅30⋅10⁴. oh, pardon me - on my terminal and in my eyes the superscript 4 looked so like a 6.
Re: [hackers] [libzahl] Fix example in comments
On Mon, 7 Mar 2016 14:08:04 +0200 Vasily Kolobkov wrote: > From 9677f7bf03f91966a5118033a7fdcb641c1dc935 Mon Sep 17 > 00:00:00 2001 From: Vasily Kolobkov <> > Date: Mon, 7 Mar 2016 14:00:06 +0200 > Subject: [PATCH] Attune example to classical axiomatics > > --- > src/zmul.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/zmul.c b/src/zmul.c > index 6023664..71115df 100644 > --- a/src/zmul.c > +++ b/src/zmul.c > @@ -6,15 +6,15 @@ void > zmul(z_t a, z_t b, z_t c) > { > /* >* Karatsuba algorithm >* >* Basically, this is how you were taught to > multiply large numbers >* by hand in school: 4010⋅3020 = (4000 + > 10)(3000 + 20) = > - = 40⋅30⋅10⁴ + (40⋅20 + 30⋅10)⋅10² + 10⋅20, but > the middle is > + = 4⋅3⋅10⁴ + (40⋅20 + 30⋅10)⋅10² + 10⋅20, but > the middle is >* optimised to only one multiplication: >* 40⋅20 + 30⋅10 = (40 + 10)(30 + 20) − 40⋅30 − > 10⋅20. */ > > size_t m, m2; > z_t z0, z1, z2, b_high, b_low, c_high, c_low; > int b_sign, c_sign; Sorry, it is correct. 4010 is split to 40⋅10² + 10, and 3020 is split to 30⋅10² + 20. 40⋅10² ⋅ 30⋅10² = 40⋅30⋅10⁴. Simplifying further to 4⋅3⋅10⁶ would be misleading as that is not how it is calculated in the Karatsuba algorithm, rather 40⋅30 is calculated with Karatsuba algorithm and therefore split again. pgp2F_mwIMf0k.pgp Description: OpenPGP digital signature
Re: [hackers] [libzahl] Fix example in comments
On Mon, 7 Mar 2016 14:08:04 +0200 Vasily Kolobkov wrote: > - = 40⋅30⋅10⁴ + (40⋅20 + 30⋅10)⋅10² + 10⋅20, but the middle is > + = 4⋅3⋅10⁴ + (40⋅20 + 30⋅10)⋅10² + 10⋅20, but the middle is 4000 * 3000 = 40 * 30 * 10^4 = 4 * 3 * 10^6. -- FRIGN
[hackers] [libzahl] Fix example in comments
>From 9677f7bf03f91966a5118033a7fdcb641c1dc935 Mon Sep 17 00:00:00 2001 From: Vasily Kolobkov <> Date: Mon, 7 Mar 2016 14:00:06 +0200 Subject: [PATCH] Attune example to classical axiomatics --- src/zmul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zmul.c b/src/zmul.c index 6023664..71115df 100644 --- a/src/zmul.c +++ b/src/zmul.c @@ -6,15 +6,15 @@ void zmul(z_t a, z_t b, z_t c) { /* * Karatsuba algorithm * * Basically, this is how you were taught to multiply large numbers * by hand in school: 4010⋅3020 = (4000 + 10)(3000 + 20) = -= 40⋅30⋅10⁴ + (40⋅20 + 30⋅10)⋅10² + 10⋅20, but the middle is += 4⋅3⋅10⁴ + (40⋅20 + 30⋅10)⋅10² + 10⋅20, but the middle is * optimised to only one multiplication: * 40⋅20 + 30⋅10 = (40 + 10)(30 + 20) − 40⋅30 − 10⋅20. */ size_t m, m2; z_t z0, z1, z2, b_high, b_low, c_high, c_low; int b_sign, c_sign; -- 2.7.0