Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2015-01-19 | sdsheader: cast pointer through void pointer | Johannes Löthberg | 1 | -1/+3 | |
Because a char* and struct sdshdr pointer have a different alignment you get the following warning when try to cast it directly: warning: cast from 'sds' (aka 'char *') to 'struct sdshdr *' increases required alignment from 1 to 8 [-Wcast-align] To silence the warning we cast it to a void pointer first. | |||||
2015-01-19 | test.c: Make test_list static const, fix oldfree type | Johannes Löthberg | 1 | -2/+2 | |
2015-01-19 | sdsIncrLen: change incr argument to size_t | Johannes Löthberg | 2 | -2/+2 | |
2015-01-19 | sdsrange: change start/end args to ptrdiff_t | Johannes Löthberg | 2 | -2/+3 | |
An sds string can hold a much bigger value than an int can hold, but since size_t is unsigned it can’t be used for this function. Using ptrdiff_t limits the function to work on roughly 1 Exabyte long strings, but if you need to work with longer ones you probably will have your custom string library already. | |||||
2015-01-19 | sds.h: Change len and free to size_t | Johannes Löthberg | 1 | -2/+3 | |
2015-01-19 | sds.c: Disable format-nonliteral warning around sdscatvprintf | Johannes Löthberg | 1 | -0/+2 | |
2015-01-19 | sds.c: Add two function prototypes | Johannes Löthberg | 1 | -0/+3 | |
is_hex_digit and hex_digit_to_int functions had no function prototypes. Silences two warnings. | |||||
2015-01-19 | man: Add initial sdsfree(3) manpage | Johannes Löthberg | 3 | -2/+24 | |
2015-01-19 | man: Add initial sdsnew(3) manpage | Johannes Löthberg | 3 | -1/+36 | |
2015-01-19 | man: Add initial sds(3) manpage | Johannes Löthberg | 3 | -2/+42 | |
2015-01-18 | Makefile: Fix HEADERS typo | Johannes Löthberg | 1 | -1/+1 | |
2015-01-18 | sds.c: Add braces around all one-line if and while loops | Johannes Löthberg | 1 | -33/+33 | |
2015-01-18 | sds.c: add braces around naked while loops | Johannes Löthberg | 1 | -2/+4 | |
2015-01-18 | sds.{c,h}: Sort includes | Johannes Löthberg | 2 | -3/+3 | |
2015-01-18 | sds.h: len/avail: remove unnecessary temp var | Johannes Löthberg | 1 | -4/+2 | |
Use the returned value of sdsheader directly in the return call instead of using a temporary variable since we’re not doing pointer arithmetic directly in the sdslen and sdsavail functions anymore. | |||||
2015-01-18 | sdsfromlonglong: Cast abs ternary statement to ull | Johannes Löthberg | 1 | -1/+1 | |
Fixes the warning about the ternary statement changing the signedness of value. | |||||
2015-01-17 | sds.c: All if statements should be braced | Johannes Löthberg | 1 | -5/+8 | |
2015-01-17 | Reindent with tabs. | Johannes Löthberg | 2 | -413/+411 | |
All source code should be indented with tabs and aligned with spaces. When talking about line length a tab equals 4 spaces. | |||||
2015-01-17 | sds.c Replace all in-place calculations with sdsheader | Johannes Löthberg | 2 | -16/+16 | |
2015-01-17 | sds.h: Add inline function for getting the sdshdr | Johannes Löthberg | 1 | -0/+4 | |
2015-01-17 | sds.h: Clean up sdshdr struct pointer arithmetic | Johannes Löthberg | 1 | -2/+2 | |
Remove the unnecessary casting of the pointer arithmetic result in sdslen and sdsavail to a void pointer since it will already be an sdshdr struct. | |||||
2015-01-17 | Revert "SDS Header pointer math rewritten in a more elegant form." | Johannes Löthberg | 2 | -19/+19 | |
This reverts commit c636fc6cd25e455a75dca24ac08ba736f62db6c8. This commit was just utterly senseless, all it does is make the code less clear for literally nothing. | |||||
2014-12-06 | test.c: Remove blanklines before return | Johannes Löthberg | 1 | -21/+0 | |
2014-12-06 | twbctf: Save the print_width to a variable | Johannes Löthberg | 1 | -3/+4 | |
2014-12-06 | Makefile: Add test.c as sds-test prerequisite | Johannes Löthberg | 1 | -1/+1 | |
2014-12-06 | Makefile: Append to CFLAGS, don’t overwrite | Johannes Löthberg | 1 | -1/+1 | |
2014-12-05 | sds.h: Don’t use __ in front of include guard | Johannes Löthberg | 1 | -2/+2 | |
It’s reserved for the implementation and shouldn’t be used. | |||||
2014-12-05 | Makefile: Add newline after HEADERS | Johannes Löthberg | 1 | -0/+1 | |
2014-12-05 | Replace testsuite with one based on twbctf | Johannes Löthberg | 7 | -188/+310 | |
2014-12-05 | Makefile: Make It Nicer™ | Johannes Löthberg | 1 | -3/+6 | |
2014-12-05 | Move source files to src dir, use VPATH in Makefile | Johannes Löthberg | 4 | -1/+3 | |
2014-12-03 | README: Fix grammatical errors; fix examples | Sam Stuewe | 1 | -12/+12 | |
[Commit message amended by Johannes Löthberg] closes #1 | |||||
2014-12-03 | README: Fix typos, reformat sentences, use other section headings | Johannes Löthberg | 1 | -90/+122 | |
2014-12-03 | Correct 'hold' typo in readme | Harry Jeffery | 1 | -1/+1 | |
A 'hold' is missing its 'h' and a variable was misnamed. This patch fixes these issues. [antirez/sds#12 fixed the variable typos] | |||||
2014-12-03 | Fixed minor spelling typos in README. | Eric Siegel | 1 | -1/+1 | |
2014-12-03 | Fixed variable naming in README for sdscatrepr. | Eric Siegel | 1 | -3/+3 | |
2014-12-03 | Fixed some typos and grammar. | Jan-Erik Rediger | 1 | -10/+10 | |
Some typos where found by aspell: `aspell -l en_US check README.md` | |||||
2014-12-03 | README: Correct typo, BDS -> BSD | ZyX-I | 1 | -1/+1 | |
2014-09-25 | Make English more idiomatic in README. | John Zwinck | 1 | -31/+30 | |
2014-02-06 | Fixed num to string example. | antirez | 1 | -1/+1 | |
2014-02-06 | Fix broken markup hopefully. | antirez | 1 | -6/+6 | |
2014-02-06 | README: Add C highlight in example it was missing. | antirez | 1 | -0/+2 | |
2014-02-06 | Merge pull request #4 from dchest/patch-1 | Salvatore Sanfilippo | 1 | -1/+1 | |
Fix list item indentation | |||||
2014-02-06 | Merge pull request #2 from JuanitoFatas/patch/polish-readme | Salvatore Sanfilippo | 1 | -194/+292 | |
quick pass to polish readme. | |||||
2014-02-06 | Fix list item indentation | Dmitry Chestnykh | 1 | -1/+1 | |
2014-02-06 | SDS Header pointer math rewritten in a more elegant form. | antirez | 2 | -19/+19 | |
As suggested by unwind in the Hacker News site the calculation of "sh" could be improved. In his own words: "Since the entire idea is that the pointer on the left-hand side is to the type whose size should be subtracted, I think it's better not to repeat the type but to "lock it" to the pointer instead. This also (of course) means we can drop the parenthesis with sizeof, since those are only needed when its argument is a type name." | |||||
2014-02-06 | quick pass to polish readme. | Juanito Fatas | 1 | -194/+292 | |
2014-02-06 | Two examples fixed. | antirez | 1 | -3/+3 | |
2014-02-06 | README: fixed sdscatprintf() example. | antirez | 1 | -1/+1 | |
2014-02-06 | README: sentence improved in concatenating strings sec. | antirez | 1 | -1/+1 | |