diff options
author | Tanguy LE CARROUR <tanguy@bioneland.org> | 2012-02-02 15:02:23 +0100 |
---|---|---|
committer | Tanguy LE CARROUR <tanguy@bioneland.org> | 2012-02-02 15:02:23 +0100 |
commit | 29d1a9e3e4d53057bc37ad32ddcb734a0b88a8ff (patch) | |
tree | 7ddd922f6cd8b89cebfd164567e2b87af5cb1451 /user/tlecarrour/suckless-tools.mdwn | |
parent | 4df998f4178dec0cf29d2cdfae85d9b96d6e5052 (diff) | |
download | web-29d1a9e3e4d53057bc37ad32ddcb734a0b88a8ff.tar.gz web-29d1a9e3e4d53057bc37ad32ddcb734a0b88a8ff.tar.bz2 web-29d1a9e3e4d53057bc37ad32ddcb734a0b88a8ff.zip |
Add user page and patch pages for tlecarrour.
Diffstat (limited to 'user/tlecarrour/suckless-tools.mdwn')
-rw-r--r-- | user/tlecarrour/suckless-tools.mdwn | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/user/tlecarrour/suckless-tools.mdwn b/user/tlecarrour/suckless-tools.mdwn new file mode 100644 index 00000000..a646fac3 --- /dev/null +++ b/user/tlecarrour/suckless-tools.mdwn @@ -0,0 +1,79 @@ +[[!meta copyright="Copyright © 2010 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + + +suckless-tools +============== + +Home of dwm, dmenu and other quality software with a focus on simplicity, clarity, and frugality. +**Home page**: [[http://suckless.org]] + +[[!toc startlevel=2]] + + +* * * + + +Log +--- + +* **Started**: 2012-01-31 +* **Discussed**: [2012-01-31](http://lists.debian.org/debian-hurd/2012/01/msg00191.html) +* **Draft Submitted**: [2012-02-01](http://lists.debian.org/debian-hurd/2012/02/msg00001.html) +* **Submitted**: - +* **Accepted**: - + + +* * * + + +ToDo +---- + +Here is the output of `grep -R PATH_MAX suckless-tools-38/*`: + + dmenu/dmenu_path.c: char buf[PATH_MAX]; + + +* * * + + +Comments +-------- + +Here are comments on the patch... + + void + scan(void) { + - char buf[PATH_MAX]; + + char *buf = NULL; + + char *new_buf = NULL; + + size_t buf_size = 0; + +In this function we turn `buf` into dynamically allocated string. + + + while((ent = readdir(dp))) { + + buf_size = strlen(dir)+strlen(ent->d_name)+2; + + if(!buf || strlen(buf) < buf_size) { + + new_buf = realloc(buf, buf_size); + + if(!new_buf) + + die("realloc failed"); + + buf = new_buf; + + } + +For each directory entry we create or adapt the buffer size. + + + } + + free(buf); + +We free the buf when done. + |