Happy Thanksgiving!
I'm having trouble using `git --send-email` to send a patch in.
I am trying to use this email address (mcp...@nau.edu) with the
following settings in my global config:
```
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
smtpuser = mcp...@nau.edu
smt
On Thu, Jun 16, 2022 at 11:20 AM an2qzavok wrote:
> >do not roll your own crypto
> I believe this refers only to inventing your own algorithm, just
> writing your own implementation of existing and tested algorithms is
> fine.
I've heard it in both contexts. The more popular context I've heard it
On Thu, Jun 16, 2022 at 9:54 AM T Taylor Gurney wrote:
> https://loup-vaillant.fr/articles/implemented-my-own-crypto
>
> This person studied cryptography on his own for a while and then decided
> to roll his own crypto library. The result is a single .c file, about 3000
> lines, which received a f
> I've heard of se before, however was never able to build it. Such a shame
> that a small project like this (5K loc) uses auto* hell configure and make
> for no reason.
Agreed.
> If anybody wants to go and fix the build let me know of your fork or
> patch as I want to try it, out of curiosity.
> Jonathan Bakke wrote:
> Daniel Littlewood wrote:
> > From the other end, there is always ed.
>
> I use ed. Each tool is specialized, though.
>
> I prefer vi-like editing for fixing typos. Having visual feedback
> drastically reduces errors from commands like sed.
You might like se[1]. It's a s
On 2021-12-30, NRK wrote:
> Hmm, I was under the impression that `?=` was accepted into POSIX. But I
> cannot find any mention of it in the posix manpage (man 1p make) so I
> guess I was wrong.
It is accepted for the upcoming POSIX issue 8:
https://austingroupbugs.net/view.php?id=330
Hi Janek,
> After trying surf recently, I was appalled to see a ".surf"
> directory in my home. Is XDG basedir compliance not natural in
> suckless software?
dmenu is the only suckless software I know that does anything related
to the XDG basedir spec. I think the suckless way is to implement o
On 2020-07-05, Nihal Jere wrote:
> I wrote a very simple TLS reverse proxy which can be used as a companion
> to quark. Essentially, it just turns quark's HTTP into HTTPS. It depends
> only on libtls (from LibreSSL) and libbsd (for strlcpy).
Seems like a neat project. Have you considered using me
owing this behaviour in dwm.
A picture was added to the mail where the "hidden terminal" is in the
right top part, idk if it's allowed here.
Sincerely Michael
On 2020-03-16, Laslo Hunhold wrote:
> Would you be open to work on a small patchset for it reflecting your
> proposals? But before you do that, we might also just want to wait for
> feedback by Michael Forney, who seems to be the current active
> maintainer.
I'm not the maintain
On 2020-03-22, Hiltjo Posthuma wrote:
> Maybe it's an idea to just place issues in a TODO file in the repository?
That's a good idea, thanks.
I added a section with the issues reported by Cág, some existing items
from ed.c, and a few others I have noticed.
> I'm very glad to announce libgrapheme[0], a library for handling grapheme
> clusters.
To avoid Warnock's dilemma, let me just say that this looks excellent. The
API and implementation is clean and focused. Thank you for publishing this
library.
On 2020-03-21, Hiltjo Posthuma wrote:
> What kind of tracker?
Did you see my other reply?
https://lists.suckless.org/dev/2003/33827.html
>I think discussions of suckless projects should stay
> on the mailinglist and/or IRC, not an external bugtracker or something.
Would suckless.org consider ho
On 2020-03-17, Hiltjo Posthuma wrote:
> Where is the patch?
I know it's contrary to the opinion of a lot of people here, but
personally, I have no issue with bug reports without a patch.
Sometimes people just don't have the time to investigate the issue and
come up with a fix. It could even be th
On 2020-03-17, Cág wrote:
> There are a couple things I've come across the
> sbase's version of ed:
> 1. w doesn't print the byte count. Suppose a sample
> ed session (using P to distinguish my input from ed's
> output):
> % ed
> P
> *a
> milk
> bread
> eggs
> meat
> veggies
> bananas
> apples
>
On 2020-01-17, Quentin Rameau wrote:
>> Perhaps we should bring this up on the austin group list and get them
>> to clarify the text.
>
> Done, let's wait and see.
Thanks, Quentin!
For anyone following, the clarification request is at
https://www.austingroupbugs.net/view.php?id=1319
Hello,
I recently ran into a package (dialog), which uses the following sed
script to generate its dlg_config.h header:
/@DEFS@/r conftest.frag
/@DEFS@/d
The intention is to replace @DEFS@ in the header template with the
contents of a file. However, sbase sed skips writing the contents of
the fi
On 2019-12-23, Laslo Hunhold wrote:
> On Sat, 21 Dec 2019 19:05:45 -0800
> Michael Forney wrote:
>
> Dear Michael,
>
>> I can think of two possibilities here:
>>
>> 1. Remove the -H, -L, and -P options from chmod, always set r.follow =
>> 'H
On 2019-11-03, Silvan Jegen wrote:
> I assume it's the leading whitespace that was the problem since here[0]
> the output format is given as
>
> "%d %d %d %s\n", , , ,
>
>
> Considering this and that [0] doesn't mention anything about alignment,
> just having "%zu %zu %zu %s\n" as before seems li
leaning towards 1
since it doesn't seem like those options are used commonly.
-Michael
Hi,
I was looking through wc.c in sbase and noticed a couple curious
things about the output formatting. POSIX says the tool should write
"%d %d %d %s\n", , , ,
When the tool was first written, it used fixed field widths,
presumably to maintain alignment when multiple files were specifi
On 2019-06-25, Michael Forney wrote:
> 1. Invert the ifdef by conditionally *omitting* the sysmacros.h
> include on systems that don't have it rather than including it only on
> glibc. I know this includes at least OpenBSD. Does anyone know of any
> others?
I think this
Since glibc 2.28, sys/types.h no longer includes sys/sysmacros.h which
defines the major and minor macros. Some BSDs don't have
sys/sysmacros.h, so sbase has been conditionally including
sys/sysmacros.h on glibc since 99c78763[0].
However, in the upcoming musl release, it too will remove the
sys/s
I noticed that when passwd in ubase is changing a password, it will
try to dereference a NULL pointer when /etc/shadow exists, but the
user's password is not stored in /etc/shadow (i.e. marked with "x" in
/etc/passwd). It will try to save the spw entry if /etc/shadow exists,
even if the shadow entr
On 2019-05-26, Paul Swanson wrote:
> Hello,
>
> I've a fresh clone of dwm and the dwm alpha patch (20180613-b69c870) and
> it's generating
> the following error:
>
> dwm.c
> In file included from dwm.c:280:0:
> config.h:24:27: error: initializer element is not constant
>
On 2019-05-20, sylvain.bertr...@gmail.com wrote:
> Sadly, gcc-4.7 does not have an aarch64 backend and it's a pain to
> configure
> without breaking anything.
I wonder what the state of ARM/aarch64-4.7-branch is:
https://gcc.gnu.org/viewcvs/gcc/branches/ARM/aarch64-4.7-branch/
It doesn't look li
Hi all,
I know there are a number of small C compilers out there in various
states of completion, but recently I've been working on another to add
to the mix:
https://git.sr.ht/~mcf/cc
It is a C11 compiler based on QBE. The name is not yet chosen. I hope
to differentiate it from the others by fo
On 2019-05-12, Markus Wichmann wrote:
> On Sat, May 11, 2019 at 08:52:32PM +0100, Piotr Oleskiewicz wrote:
>> I would prefer to
>> write
>>
>> X(int, i, 1)
>>
>> rather than
>>
>> X(int, i, atoi, "%d", 1)
>>
>> Many thanks,
>> Piotr
>>
>
> That is going to be tough, as in C in a macro, t
On 2019-05-08, Daniel Cegiełka wrote:
> • lack of {% and %} which is quite common (license):
> https://github.com/openbsd/src/blob/master/usr.bin/awk/awkgram.y
> • I don't even know what else:
> https://github.com/9fans/plan9port/blob/master/src/cmd/hoc/hoc.y#L32
I think these are both the s
eem to handle
escape sequences in literals (i.e. '\n').
After working around those issues, I get a different error
$n has no type (on line 171)
I think this is due to the usage of $2 referring to a token (EQOP in
this case) rather than a non-terminal. I haven't investigated t
If you're on dwm you can try this patch:
Am Di., 23. Apr. 2019 um 15:20 Uhr schrieb Alexander Krotov :
>
> On 23/04/2019 13:54, Enan Ajmain wrote:
> > Hi,
> >
> > I want to add a keybinding to ST to spawn a new ST window in the
> > current working directory. How do I do that?
> >
> > Thanks,
> > E
>> If you're on dwm you can try this patch:
https://dwm.suckless.org/patches/spawn_cwd/
Am Di., 23. Apr. 2019 um 20:18 Uhr schrieb Michael Buch
:
>
> If you're on dwm you can try this patch:
>
> Am Di., 23. Apr. 2019 um 15:20 Uhr schrieb Alexander Krotov
> :
&g
On 2019-02-02, Sean MacLennan wrote:
> First a question: how portable do we want things? The current sdhcp
> works only on Linux.
I think that depends on how feasible it is to make it portable without
relying on a bunch of ifdefs to support different platforms.
In terms of timerfd, I think it sh
> Anybody else enjoying Go? Or hating it?
I've been writing Go code daily for about six years now. Overall I
like it. It sucks less than most languages I've worked with.
I enjoy that the language has stayed small (~80 page spec) and the
developers have declined nearly all feature requests for th
Hi Daniel,
On 2018-11-24, Daniel Cegiełka wrote:
> Hi,
>
> https://lists.suckless.org/dev/1811/33025.html
>
> I prepared a more detailed description of how to compile vis +
> netbsd-curses.
>
> 1) copy from ncurses/ncurses/names.c strnames & strfnames:
>
> DCL(strnames) = {
> "cbt",
> "be
On 2018-11-12, Sean MacLennan wrote:
> I am surprised you are getting away with binding the socket to the
> broadcast address.
I found in ip(7):
INADDR_BROADCAST (255.255.255.255) means any host and has the same
effect on bind as INADDR_ANY for historical reasons.
So that explains why it wo
On 2018-11-13, Markus Wichmann wrote:
> On Mon, Nov 12, 2018 at 01:14:38PM -0800, Michael Forney wrote:
>> Usually how it works is either the display server itself needs to be
>> setuid to open those input devices, or some other program (commonly
>> systemd-logind) needs to
On 2018-11-12, Alessandro Pistocchi wrote:
> What is swc?
My wayland compositor library: https://github.com/michaelforney/swc
> Where can I find oasis? Would you be interested in helping a bit if I needed
> help starting from oasis and removing gpl/lgpl stuff? I am ok with gpl apps
> but not wit
On 2018-11-12, Markus Wichmann wrote:
> On Mon, Nov 12, 2018 at 11:17:49AM +, Alessandro Pistocchi wrote:
>> I would use some help to make it work with X ( does it work with
>> Wayland? ). There are not many docs I found about it...
>
> Ah, that old chestnut. As far as I know, the X input driv
On 2018-10-11, Markus Wichmann wrote:
> Hi all,
>
> I recently read the source code of sdhcp, and it does seem to be a nice
> tool, but I couldn't help but notice a few things. Now, maybe I'm dense,
> and none of the things I'm about to bring up matter for some reason, and
> if so, that would be r
On 2018-03-13, Laslo Hunhold wrote:
> On Tue, 13 Mar 2018 13:44:08 -0600
> Gavin Howard wrote:
>> About GNU extensions: this was originally implemented for toybox
>> (http://landley.net/toybox/), and the maintainer specifically asked
>> that my bc be able to run
>> https://git.kernel.org/pub/scm/
On 2018-03-07, pet...@riseup.net wrote:
> Looking at the chacha API one needs to use a nonce, in the monocypher
> implementation it is 24 bits wide, which would give the option of almost
> 17M runs with a single key. IIUC adding a salt would further randomize
> the output and possibly prevent some
On 2018-03-07, pet...@riseup.net wrote:
> On 2018-03-07 00:23, Michael Forney wrote:
>> Another related project I've been following is https://monocypher.org/
>>
>> It has a quite permissive license and encourages inlining the source
>> like you want.
>
> Hi
On 2018-03-06, pet...@riseup.net wrote:
> On 2018-03-06 10:01, Truls Becken wrote:
>> Some libraries to look at are; libressl, libtomcrypt, nacl.cr.yp.to,
>> libsodium, nettle, libgcrypt and libmcrypt.
>
> Hello Truls,
>
> thank you for this list. I was hoping there would be a publicly
> available
On 2017-09-01, Silvan Jegen wrote:
> On Fri, Sep 01, 2017 at 08:40:34AM -0400, Carlos Torres wrote:
>> > On Aug 30, 2017, at 2:07 PM, Silvan Jegen wrote:
>> >
>> > * Wayland dwm prototype?
>> > * Suckless Wayland client library prototype?
>>
>>
On 7/26/17, Anselm R Garbe wrote:
> On 26 July 2017 at 09:05, Silvan Jegen wrote:
>> That's what I suspected. Not sure it's desirable to ever work on a
>> codebase big enough to require a build system which uses ninja under
>> the hood. If I find myself in such a position I will turn to samurai
>
On 7/25/17, Silvan Jegen wrote:
> Hi
>
> On Wed, Jul 26, 2017 at 7:32 AM, Michael Forney
> wrote:
>> Over the past couple weeks, I implemented a ninja-compatible build
>> tool in C. It is much simpler and smaller than ninja and seems to
>> perform at least as
Hi all,
Over the past couple weeks, I implemented a ninja-compatible build
tool in C. It is much simpler and smaller than ninja and seems to
perform at least as well.
https://github.com/michaelforney/samurai
It has all the features I care about, apart from gcc -MD header
dependency parsing which
Hi,
I noticed that git.suckless.org is no longer accepting connections
with the git protocol. HTTP still works though.
Just pointing that out in case it wasn't a deliberate change.
-Michael
On 6/13/17, Mattias Andrée wrote:
> On Linux, the performance of cat(1) can be doubled
> when cat(1):ing from one pipe to another, by compiling
> with -DBUFSIZ=(1<<16) (the default pipe capacity).
> This is close to optimial for a read(3)/write(3)
> implementation.
Agreed. On my sbase branch, I b
On Tue, Mar 28, 2017 at 3:34 AM, Kamil Cholewiński wrote:
>> I think it might have been possible to use some other build tool to
>> achieve something similar, but I don't think it would have worked out
>> as well.
>
> http://gittup.org/tup/ ?
I think tup could have worked too, but I still prefer
On Mon, Mar 27, 2017 at 2:44 PM, Marc André Tanner wrote:
> Hi Michael,
>
> Overall I like your package selection, but I also have a few questions:
>
> * Did you consider using netbsd-curses[1] instead of ncurses?
>
>This probably won't work as is, because libtermk
For a while now, I've been working on putting together a linux system
based on suckless core tools, as well as various other projects. There
are still a number of things left to do, but I'm now at a point where
it is quite usable for me, and maybe for others as well.
https://github.com/michaelforn
On 2/2/17, willy wrote:
> At this point, I'm not sure where to look at, or even if the bug
> really lies in tar and not in bzip2.
> I checked the size (both octal and converted) and the value is good. So
> I'm not sure why the headers are not well read.
> In the case of the archive above, the erro
On 12/24/16, Cág wrote:
> Markus Wichmann wrote:
>
>> Well, that looks like it might be problematic, doesn't it? Especially
>> when you find out, that the size of h->name there is 100 bytes. path
>> contains, of course, the entire file path relative to the starting
>> directory. In short, you will
I recently came across an issue running `make headers_install` for
installing kernel headers. The headers_install.sh script runs
sed -r \
-e 's/([ \t(])(__user|__force|__iomem)[ \t]/\1/g' \
-e 's/__attribute_const__([ \t]|$)/\1/g' \
-e 's@^#include @@' \
-e 's/(^|[^a-zA-Z0-9])__packed([^a-
On 10/23/16, Bruno Vetter wrote:
>> I suggest just grabbing cert.pem from libressl.
>
> Thanks for the quick reply. Do you know if there is a designated default
> path for certs in stali?
It looks like the stali curl_config.h sets CURL_CA_BUNDLE to
/etc/ssl/certs/ca-certificates.crt[0]. I suspect
On Sun, Oct 23, 2016 at 8:47 AM, Bruno Vetter
wrote:
> what is the recommended way to obtain a decent bundle of CA certificates for
> stali? Like the ones I find in /etc/ssl/certs in my current distro.
I suggest just grabbing cert.pem from libressl.
On Mon, Oct 17, 2016 at 6:53 PM, Evan Gates wrote:
> The plan for now is to use 9 base troff and a pager which has not yet
> been picked. Currently 9 base troff has been added to the src repo,
> but the mdoc macros still need to be included (the ones from heirloom
> troff worked). As such you shou
On Oct 7, 2016 7:24 AM, "Bruno Vetter" wrote:
> yes, it's tedious and I understand that it's not crucial to have the
> toolchain statically linked. Trying to do so also brings up a lot of
> questions that I cannot answer easily. For example a statically linked linker
> apparently does not suppo
On Mon, Oct 3, 2016 at 5:02 PM, stephen Turner
wrote:
> Thanks for the links i will check it out! Also i wasn't aware of the
> -F function, playing with it now and that is a big help with working
> around the whole color bit. Clearly the / is for directories. How are
> the rest used? Surprisingly
GCC, probably. Which sucks, but if Hitler warns you not to step of a
cliff, you don't ignore his warning because he is Hitler.
On Tue, Sep 6, 2016 at 5:02 AM, Staven wrote:
> On Thu, Sep 01, 2016 at 11:28:03AM -0300, Marc Collin wrote:
>> Hey guys.
>>
>> I was warned by the compiler about a misle
Hello suckless folk,
what do you use to communicate with the part of the world (a majority,
unfortunately) who uses suckish formats such as .doc(x), .od[tspg] or
whatever? If Office is bloated, LibreOffice ain't slim, and people
keep sending me word documents :/
Kevin
Hello suckless.org fellows!
I find myself competing in the national selection for the IOI[0] and
was wondering: what does the suckless.org community think about
competitive programming contests?
They certainly promote bad practices such as namespace pollution,
non-descriptive naming of variables,
can you compare the two? You need a third-party library (wld) to
> > get shit done. Just wait down the line how much of a fucking mess we
> > are going to have!
With X11 and Xlib, you need an X server that implements every drawing
routine you might want to call.
But maybe you are arguing for server-side rendering over the display
server connection. I think it's simpler to just have the client do the
rendering, which it can do however it pleases.
--
Michael Forney
This way, people don't have to do double negatives in their head.
---
grep.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/grep.c b/grep.c
index 64ffbe2..ae23967 100644
--- a/grep.c
+++ b/grep.c
@@ -114,23 +114,23 @@ grep(FILE *fp, const char *str)
Previously, it printed lines that didn't match some pattern. Instead,
it should print lines that don't match *any* pattern.
Test case:
out=$(echo foo | ./grep -v -e foo -e bar)
if [ "$?" = 1 ] && [ -z "$out" ] ; then
echo pass
else
echo fail
fi
---
grep.c | 28 +++
Test case:
if printf '%s\n' foo bar | ./grep -F foo >/dev/null ; then
echo pass
else
echo fail
fi
---
grep.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/grep.c b/grep.c
index ae23967..fb911ff 100644
--- a/grep.c
+++ b/grep.c
@@ -107,7 +107,7 @@ grep
On Sat, Mar 12, 2016 at 11:46:31AM -0800, Michael Forney wrote:
> In eb9bda878736344d1bef06d42e57e96de542a663, a bug was introduced in the
> handling of -1 return values from getline. Since the type of the len
> field in struct line is unsigned, the break condition was never true.
>
In eb9bda878736344d1bef06d42e57e96de542a663, a bug was introduced in the
handling of -1 return values from getline. Since the type of the len
field in struct line is unsigned, the break condition was never true.
This caused sort -u to never succeed.
---
sort.c | 11 ---
1 file changed, 8 i
On Fri, Oct 02, 2015 at 05:25:55PM +0200, Jens Staal wrote:
> On Friday 02 October 2015 16.59.57 Christian Neukirchen wrote:
> > (Statically linking X11 apps results in massively bloated binaries,
> > I can't recommend it.)
>
> Anyone tried a static wayland dwm-like client like velox and its wayla
Quoth Ross Mohn:
> Hi,
>
> After my last pull a few weeks ago, I started noticing some strange
> behavior with abduco and I want to know if others can reproduce it.
> Here are the steps:
>
> 1) Run 'abduco -A foo ping suckless.org'
>
> 2) Press 'CTRL+\' to detach
>
> 3) Run 'abduco -A foo' to r
On 05/28/15 00:49, Michael Reed wrote:
> Hi,
>
> 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.
>
> Regards,
> Michael
>
Ap
Hi,
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.
Regards,
Michael
diff --git a/st.1 b/st.1
index 9548c1a..1d9646a 100644
--- a/st.1
+++ b/st.1
@@ -1,151
---
touch.c | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/touch.c b/touch.c
index 2789716..fb04142 100644
--- a/touch.c
+++ b/touch.c
@@ -14,14 +14,13 @@
static int aflag;
static int cflag;
static int mflag;
-static struct timespec t;
+static struct
---
touch.c | 24 +++-
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/touch.c b/touch.c
index 563f919..2789716 100644
--- a/touch.c
+++ b/touch.c
@@ -14,14 +14,14 @@
static int aflag;
static int cflag;
static int mflag;
-static time_t t;
+static struct times
Otherwise, we run into problems in a typical autoconf-based build
system:
- config.status is created at some point between two seconds.
- config.status is run, generating Makefile by first writing to a file
in /tmp, and then mv-ing it to Makefile.
- If this mv happens before the beginnin
On Thu, May 07, 2015 at 05:03:16PM +0200, Jochen Sprickerhof wrote:
> Hi Alex,
>
> * Alexander Huemer [2015-05-07 16:19]:
> > P.S.: Maybe there is some other nice feed reader out there that I don't
> > know about. tt-rss, miniflux and all the others are monsters
> > unfortunately.
>
> I had th
Hi suckless,
I came across some issues in sbase whose solution wasn't immediately
apparent:
printf
--
Ignores flag characters '#', '0', '-', ' ', and '+', but is labeled as
POSIX compliant and complete, so this is presumably unintentional.
"git am" breaks without this functionality.
tar
---
---
sdhcp.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sdhcp.c b/sdhcp.c
index aa3cef2..9ff9baf 100644
--- a/sdhcp.c
+++ b/sdhcp.c
@@ -339,6 +339,8 @@ acceptlease(void)
static void
run(void)
{
+ int forked = 0;
+
#if 0
InitReboot:
/* send DHCPre
---
sdhcp.1 | 3 +++
sdhcp.c | 8 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/sdhcp.1 b/sdhcp.1
index ef22689..d037624 100644
--- a/sdhcp.1
+++ b/sdhcp.1
@@ -28,6 +28,9 @@ don't change interface information such as an IP address.
.TP
.B "\-e program"
run program. Var
---
tr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tr.c b/tr.c
index 38ea6a3..ad5c690 100644
--- a/tr.c
+++ b/tr.c
@@ -221,6 +221,8 @@ read:
else
goto write;
}
+ if (cf
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 Sun, Mar 01, 2015 at 11:51:35PM +0100, FRIGN wrote:
> On Sun, 1 Mar 2015 14:44:12 -0800
> Michael Forney wrote:
> > That looks good to me.
>
> Thanks! Applied:
> http://git.2f30.org/sbase/commit/?id=48696d8c955db9d0621812aca7ef5caac727da31
I just realized that this coul
On Sun, Mar 01, 2015 at 11:23:28PM +0100, FRIGN wrote:
> I'd do it like this instead, makes it clearer that we're
> dealing with one special case:
>
> if (remove(path) < 0) {
> if (!rm_fflag)
> weprintf("remove %s:", path);
> rm_status = !(rm
Under the description for the -f option, POSIX says, "Do not modify the
exit status in the case of nonexistent operands".
---
Whoops, just realized that simply using the errno from the remove call is way
simpler.
libutil/rm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a
Under the description for the -f option, POSIX says, "Do not modify the
exit status in the case of nonexistent operands".
---
libutil/rm.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libutil/rm.c b/libutil/rm.c
index 53ae3f2..30a1b41 100644
--- a/libutil/rm.c
+++ b/li
Currently surf cannot handle mailto links.
This patch changes that and passes them to the email client.
>From 1414a492f53095b793d12b18e1b5092b338503f8 Mon Sep 17 00:00:00 2001
From: Michael Schupikov
Date: Sun, 18 Jan 2015 15:01:28 +0100
Subject: [PATCH] Add support for mailto li
t of special interpretation).
See, this example (pruned for the system calls that matter)
$ strace ls -l foo
lstat("foo", {st_mode=S_IFLNK|0777, st_size=3, ...}) = 0
stat("foo", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
lrwxrwxrwx1 michael michael 3 Dec
The -d option is a GNU extension and is equivalent to its "-P
--preserve=links" options.
Since we don't implement the --preserve=links functionality anyway (it
means preserve hard links between files), just call it -P, which is
specified by POSIX.
Additionally, there is no need to check for cp_Pf
Otherwise, if the length of the link target is the same as BUFSIZ, we
will try to write past the end of buf.
---
ls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ls.c b/ls.c
index b48391b..a2fb5cb 100644
--- a/ls.c
+++ b/ls.c
@@ -291,7 +291,7 @@ output(Entry *ent)
Also, implement the -H and -L options.
---
Again, not sure how to handle the long line.
ls.1 | 9 -
ls.c | 32
2 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/ls.1 b/ls.1
index ec61bee..792b07b 100644
--- a/ls.1
+++ b/ls.1
@@ -3,7 +3,7 @@
On Sun, Dec 07, 2014 at 03:43:36PM -0800, Eric Pruitt wrote:
> I don't know if this is the correct behavior. Whether or not a symlink
> to a directory has its contents shown with GNU ls depends on whether or
> not there's a slash present and the flags used:
>
> playground$ mkdir AFolder
>
---
Not sure if you want to break up the long line. Up to you.
Another possibility is
if (S_ISLINK(ent->mode))
stat(path, &st);
ent->isdir = S_ISDIR(st.st_mode);
which looks nicer, but I'm not sure if stat(2) is required to not modify the st
argument if it fails.
On Sun, Dec 07, 2014 at 10:40:42PM +, Michael Forney wrote:
> ---
> ls.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/ls.c b/ls.c
> index b48391b..90193cc 100644
> --- a/ls.c
> +++ b/ls.c
> @@ -21,6 +21,7 @@ typedef struct {
>
---
ls.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ls.c b/ls.c
index b48391b..90193cc 100644
--- a/ls.c
+++ b/ls.c
@@ -21,6 +21,7 @@ typedef struct {
off_t size;
time_t mtime;
ino_t ino;
+ int isdir;
} Entry;
static int entcmp(const vo
Also, now that we are using {sym,}linkat, implement the trivial -L and
-P options.
---
ln.1 | 11 +--
ln.c | 53 ++---
2 files changed, 47 insertions(+), 17 deletions(-)
diff --git a/ln.1 b/ln.1
index 4205ea7..3b1ac98 100644
--- a/ln.1
+++ b
---
sort.1 | 11 +++
sort.c | 57 +++--
2 files changed, 58 insertions(+), 10 deletions(-)
diff --git a/sort.1 b/sort.1
index 12fb95d..71c8154 100644
--- a/sort.1
+++ b/sort.1
@@ -15,9 +15,20 @@ writes the sorted concatenation of the giv
---
chown.c | 25 -
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/chown.c b/chown.c
index 3fd5f87..5d57801 100644
--- a/chown.c
+++ b/chown.c
@@ -11,8 +11,8 @@
static void chownpwgr(const char *);
static bool rflag = false;
-static struct passwd *pw = N
I found quite a lot of bugs, so I ended up pretty much rewriting as I
followed the spec¹.
Now, it works as follows:
- Determine a mask (who) of bits that can be modified for the subsequent
operations. If none are specified, select all file mode bits.
- In a loop, determine which operation (+, -
1 - 100 of 219 matches
Mail list logo