summaryrefslogtreecommitdiffstats
path: root/src/getstring.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright rangesLukas Fleischer2013-02-041-1/+1
| | | | | | | Add 2013 to the copyright range for all source and documentation files. Reported-by: Frederic Culot <frederic@culot.org> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Switch to Linux kernel coding styleLukas Fleischer2012-05-211-147/+128
| | | | | | | | | | | | | | Convert our code base to adhere to Linux kernel coding style using Lindent, with the following exceptions: * Use spaces, instead of tabs, for indentation. * Use 2-character indentations (instead of 8 characters). Rationale: We currently have too much levels of indentation. Using 8-character tabs would make huge code parts unreadable. These need to be cleaned up before we can switch to 8 characters. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update copyright rangesLukas Fleischer2012-03-261-1/+1
| | | | | | Add 2012 to the copyright range for all source and documentation files. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove parentheses from return statementsLukas Fleischer2011-11-021-2/+2
| | | | | | | | | | | | | | No reason to use "return (x);" here. Refer to the GNU coding guidelines for details. Created using following semantic patch: @@ expression expr; @@ - return (expr); + return expr; Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Do not cast unused return values to voidLukas Fleischer2011-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | A small style fix that removes all remaining "(void)" casts. Using these isn't encouraged in GNU coding guidelines and doesn't serve a certain purpose, except for satisfying a few static code analysis tools. We already nuked some of these in previous patches, but this semantic patch should fix what's left: @@ identifier func; @@ - (void)func ( + func ( ...); Long lines were re-formatted manually. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Avoid use of printf()/fprintf()Lukas Fleischer2011-11-021-1/+1
| | | | | | | | | | | | | | | | Use one of the following functions where appropriate: * puts() (whenever we print hard coded strings to stdout) * fputs() (whenever we print hard coded strings to a stream) * putchar() (whenever we print a single character to stdout) * fputc() (whenever we print a single character to a stream) * strncpy() (whenever we copy hard coded strings to a buffer) This removes the overhead introduced by the format string parser and reduces the number of false positive C-format strings spotted by xgettext(1)'s heuristics. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Avoid segfault in getstr_fixscr()Lukas Fleischer2011-07-021-2/+2
| | | | | | | | Avoid a segfault that may occur if getstr_fixscr() changes the scroll offset to something outside the input boundaries (e.g. if a word that is only partly visible is killed via backward-kill-word). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use constant for maximum UTF-8 character sizeLukas Fleischer2011-07-021-2/+3
| | | | | | | Introduce a UTF8_MAXLEN constant instead of using the literal value "6" at various places. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor getstring codeLukas Fleischer2011-07-021-53/+65
| | | | | | | | | | * Rename static showstring() function to getstr_print(), rename ins_char() to getstr_ins_char() and del_char() to getstr_del_char(). * Refactor out getstring data structure initialization and window scrolling routines. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Make getstring() UTF-8 compatibleLukas Fleischer2011-06-291-54/+120
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Split line editing functions into separate fileLukas Fleischer2011-06-291-0/+220
Move getstring() related stuff into a separate file as a first step on our way to UTF-8 support for line editing helpers. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>