Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Formatting changes | Thomas Voss | 2022-11-21 | 1 | -8/+8 |
| | |||||
* | Remove redundant compiler flag | Thomas Voss | 2022-11-17 | 1 | -1/+1 |
| | |||||
* | Use OpenBSDesque formatting | Thomas Voss | 2022-11-16 | 1 | -6/+6 |
| | | | | | | | | | | | Here is a snippet of how long options with arguments are handled in the OpenBSD sort(1) manual: .It Fl S Ar size , Fl Fl buffer-size Ns = Ns Ar size There are a few take aways from this: 1) The argument should be shown for both the short and long option 2) You don’t need to use “Ns” before the comma | ||||
* | Use constants instead of macrosv1.3.0 | Thomas Voss | 2022-11-13 | 1 | -5/+4 |
| | |||||
* | Don't define _POSIX_C_SOURCE | Thomas Voss | 2022-11-13 | 1 | -1/+1 |
| | |||||
* | Add support for long options | Thomas Voss | 2022-11-13 | 3 | -15/+25 |
| | |||||
* | Add ZSH completions | Thomas Voss | 2022-11-11 | 2 | -7/+20 |
| | |||||
* | Centering was off by 1, lolv1.2.0 | Thomas Voss | 2022-11-10 | 1 | -1/+1 |
| | |||||
* | Move the flags in the usage string to PROG_ARGS | Thomas Voss | 2022-11-04 | 1 | -5/+2 |
| | | | | | This allows us to wrap the code to 80 columns while still remaining rather readable. | ||||
* | Properly handle backspace charactersv1.1.0 | Thomas Voss | 2022-10-15 | 1 | -2/+2 |
| | |||||
* | Remove POSIXLY_CORRECT and use -D in CFLAGS | Thomas Voss | 2022-10-15 | 2 | -4/+1 |
| | |||||
* | Get screen width initially from 205 | Thomas Voss | 2022-10-15 | 1 | -18/+26 |
| | |||||
* | Fix diagnostic message during overflow | Thomas Voss | 2022-10-15 | 1 | -1/+1 |
| | |||||
* | Define the die() and diex() macros | Thomas Voss | 2022-10-15 | 1 | -4/+7 |
| | |||||
* | Change up CFLAGS | Thomas Voss | 2022-10-15 | 1 | -1/+3 |
| | |||||
* | Sort flags alphabetically | Thomas Voss | 2022-10-15 | 1 | -3/+3 |
| | |||||
* | Use the MANDIR variable | Thomas Voss | 2022-10-15 | 1 | -4/+5 |
| | |||||
* | Document new center package | Thomas Voss | 2022-10-13 | 1 | -1/+2 |
| | |||||
* | Move long parsing to its own functionv1.0.0 | Thomas Voss | 2022-10-09 | 1 | -19/+22 |
| | |||||
* | Add install instructions to the README | Thomas Voss | 2022-10-08 | 1 | -2/+18 |
| | |||||
* | Support DESTDIR | Thomas Voss | 2022-10-08 | 1 | -3/+4 |
| | |||||
* | Document the new -r flag | Thomas Voss | 2022-10-08 | 1 | -6/+26 |
| | |||||
* | Mark TODO #2 as complete | Thomas Voss | 2022-10-08 | 1 | -1/+1 |
| | |||||
* | Add the -r flag to print tabs using spaces | sheepmax | 2022-10-08 | 1 | -28/+63 |
| | | | | | | | | If the -r flag is provided, then tabs will be displayed by printing a space character `tabwidth' times. With this commit TODO item #2 is complete. Co-authored-by: Thomas Voss <mail@thomasvoss.com> | ||||
* | De-verbosify usage | Thomas Voss | 2022-10-08 | 2 | -5/+5 |
| | |||||
* | Document the new -l and -t flags | Thomas Voss | 2022-10-08 | 1 | -6/+19 |
| | |||||
* | Wrap code to 80 columns | Thomas Voss | 2022-10-05 | 1 | -11/+21 |
| | | | | | | With my new laptop setup and stuff, 80 characters is about half of the screen; wrapping code to 80 columns allows me to have two terminals in a split screen while viewing all the code. | ||||
* | Sort command-line flags | Thomas Voss | 2022-10-05 | 1 | -12/+12 |
| | |||||
* | Mark TODO #1 as complete | Thomas Voss | 2022-10-05 | 1 | -1/+1 |
| | | | | nothing-c completed that TODO in commit a05ee66. | ||||
* | Add tab width specification (#5) | nothing-c | 2022-10-05 | 1 | -3/+13 |
| | | | | | Add default value for tabsize, fix usage of width where it should have tabsize, fix optarg string, limit tabsize to being non-negative only. | ||||
* | Remove excess parens | Thomas Voss | 2022-10-04 | 1 | -1/+1 |
| | |||||
* | Fix bug when width is less than line length | Thomas Voss | 2022-10-04 | 1 | -3/+3 |
| | | | | | | If the length of a line is longer than the width of the display we want to center on, `width - len` becomes negative which causes an infinite loop of printing spaces. This fixes that bug. | ||||
* | Update Caspers' default email address | Thomas Voss | 2022-10-04 | 1 | -2/+2 |
| | | | | | cas — Today at 07:18 Use <casper.casan@gmail.com> | ||||
* | Mark TODO #3 as complete | Thomas Voss | 2022-10-04 | 1 | -1/+1 |
| | | | | Casper completed that TODO in commit 7aed855. | ||||
* | Add a .mailmap | Thomas Voss | 2022-10-04 | 1 | -0/+3 |
| | | | | | | | My older commits on this repo were under the email <thomasvoss@live.com> instead of my newer <mail@thomasvoss.com>. Casper also has commits as both <casper@casan.se> and <casper.casan@gmail.com> with the names Casper and Casper Andersson, so this should fix those issues. | ||||
* | Add centering by longest line (#3) | Casper Andersson | 2022-10-04 | 1 | -3/+73 |
| | | | | | | | | | | Centering by longest line requires inputting all lines before starting output, to determine which is longest. Use a tail queue for this to insert at end and then iterate from start. The lines are freed after being output. Unlike the static read buffer, we can't reuse the list buffers in an easy way if we are iterating over multiple input files. So they need to be freed to avoid memory leaks. | ||||
* | Add TODO #4 | Thomas Voss | 2022-10-03 | 1 | -0/+5 |
| | |||||
* | Remove unused flags from call to getopt() | Thomas Voss | 2022-10-03 | 1 | -1/+1 |
| | |||||
* | Make buffer and size static to avoid memory leak | Casper Andersson | 2022-10-01 | 1 | -2/+2 |
| | | | | | | | getline() allocates/reallocates memory dynamically. When center() is called repeatedly it would leak memory. Make them static so the same memory is reallocated all the time, and none is lost. No need to free manually, let the OS take care of that. | ||||
* | Properly terminate the list | Thomas Voss | 2022-10-01 | 1 | -0/+1 |
| | |||||
* | Update my email-address | Thomas Voss | 2022-10-01 | 1 | -1/+1 |
| | |||||
* | Fix centering with ANSI escapes | Thomas Voss | 2022-09-23 | 1 | -1/+1 |
| | | | | | | This was broken with the logic change in #68f7fb9 I think. At the very least it’s that commit after which I noticed this bug. Doesn’t matter though, it’s fixed now. | ||||
* | Enable warnings | Thomas Voss | 2022-09-23 | 1 | -1/+1 |
| | |||||
* | Add a target variable | Thomas Voss | 2022-09-23 | 1 | -5/+7 |
| | |||||
* | Fix text centering of multibyte characters | Thomas Voss | 2022-09-23 | 1 | -2/+7 |
| | |||||
* | Add license text | Thomas Voss | 2022-09-20 | 2 | -0/+31 |
| | |||||
* | Use unicode box characters | Thomas Voss | 2022-09-20 | 1 | -33/+33 |
| | |||||
* | Add a README | Thomas Voss | 2022-09-20 | 1 | -0/+13 |
| | |||||
* | Add a TODO file | Thomas Voss | 2022-09-20 | 1 | -0/+70 |
| | | | | | | With Hacktoberfest coming up, a TODO will allow potential new people to find issues to work on. GitHub issues could be used, but the main repo is not on GitHub so no thanks. | ||||
* | Fix usage string | Thomas Voss | 2022-08-09 | 1 | -1/+1 |
| |