Commit Graph

19 Commits

Author SHA1 Message Date
Rob Landley
7dc743d21f Have llist_pop(0) return NULL the same way dlist_pop() does. 2021-12-28 16:17:50 -06:00
Rob Landley
d3025b14b9 Convert utf8towc from wchar_t to unsigned (to match wctoutf8).
The maximum unicode code point is 0x10ffff which is 21 bits.
2021-05-15 11:14:03 -05:00
Rob Landley
b17fc0c2ce Allow dlist_terminate() to be called repeatedly on same list. 2019-12-28 16:01:02 -06:00
Rob Landley
c3ccbbc4ff Add dlist_lpop() to remove last entry (use dlist as stack). 2019-07-10 01:53:23 -05:00
Rob Landley
90cc056dcd Teach dlist_pop() to work on a dlist_terminate()d list 2019-06-20 16:59:49 -05:00
Rob Landley
57dafe3915 Last commit depends on new lib code I forgot to check in. (Oops.) 2016-06-19 07:07:44 -05:00
Rob Landley
dc640259ad Switch mtab_list to doubly linked so we can traverse in either order. Convert umount and df. Add dlist_terminate() to break lists for traversal in either direction. 2014-05-29 05:22:02 -05:00
Rob Landley
e604d53444 Add free functions for predefined llist types. 2014-05-21 06:57:43 -05:00
Rob Landley
bb215e4a1f Adjust patch to use dlist_pop() 2013-09-09 05:26:52 -05:00
Rob Landley
5f57bccc41 Redo tail closer to the original design. Add more tests for large data sets. (Still no -f support yet.) 2013-09-09 04:26:03 -05:00
Rob Landley
fe91e68e8d Remove readlink -m for being poorly defined ("readlink -m /dev/null/and/more" answers what question, exactly?), rewrite xabspath() to work right and not depend on realpath, fix subtle longstanding bug in llist_traverse(). 2012-11-22 21:18:09 -06:00
Rob Landley
7aa651a6a4 Reindent to two spaces per level. Remove vi: directives that haven't worked right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style.
The actual code should be the same afterward, this is just cosmetic refactoring.
2012-11-13 17:14:08 -06:00
Rob Landley
9e2b6db36a Genericize llist code a bit: rename llist_free() to llist_traverse(), and no longer accept NULL as a synonym for free. 2012-07-15 17:22:04 -05:00
Rob Landley
2c48247a01 Redo tail to use optargs and optionally support lseek. Add support to optargs and llist.c, plus add a test suite entry. Still no -f support though. 2012-03-12 00:25:40 -05:00
Rob Landley
53c7504586 Typo fix in comment. 2010-01-05 10:43:36 -06:00
Rob Landley
bdf037ff5e Upgrade patch to detect hunks that start after a false start.
Imagine a hunk that starts with a blank line, but the site to patch starts
with two blank lines.  Before we'd read the first blank line, think it was the
start of the hunk and buffer it, read the second blank line, notice that it
didn't match the second line of the hunk, and discard _both_ buffered lines of
context (writing them to the output file) without checking that one of the
later context lines might have been the real start of the hunk.

Make it re-check the rest of the buffered context for matches each time it
discards a line of buffered context.
2008-10-23 16:44:30 -05:00
Rob Landley
6ef04efa85 Move dlist_add() to lib/llist.c 2008-01-20 17:34:53 -06:00
Rob Landley
0a04b3ef85 Implement which. Add hello world to menuconfig. Wrap the various applet main
functions in main.c with USE() macros so --gc-sections can strip them.
2006-11-03 00:05:52 -05:00
Rob Landley
15bdc11ec8 Linked list functions, forgot to add this to the repository. 2006-11-01 22:28:46 -05:00