summaryrefslogtreecommitdiffstats
path: root/src/pacman/ini.c
AgeCommit message (Collapse)AuthorFilesLines
2015-09-20move ini parser into commonAndrew Gregory1-116/+1
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-20move strtrim to util-commonAndrew Gregory1-1/+1
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01Update copyright notices for 2015Allan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-21ini.c: move error output into conf.cAndrew Gregory1-11/+7
Move the remaining output into conf.c by notifying the callback of read errors. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21ini.c: remove useless key checkAndrew Gregory1-6/+0
key points to a statically allocated string so it can't be NULL and empty keys are rejected by the callback. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21ini.c: remove empty section name restrictionAndrew Gregory1-7/+0
alpm will reject empty database names already. Reduces error handling in the ini parser. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21ini.c: remove unnecessary helper functionAndrew Gregory1-34/+16
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21ini.c: move Include parsing to conf.cAndrew Gregory1-64/+3
Reduces the number of errors the ini parser must handle to make it more suitable for sharing with the backend. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21ini.c: remove final callback callAndrew Gregory1-6/+1
Storing repo information removes the need for the final callback. This allows the call signature to be re-purposed for indicating read errors. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-09-23wrap fgets to retry on EINTRAndrew Gregory1-1/+1
The read() underlying fgets() can be interrupted by a signal handler causing fgets() to return NULL. Before we started handling SIGWINCH, the odds of interrupting a read were low and typically resulted in termination anyway. Replace all fgets calls with a wrapper that retries in EINTR. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-01-28Remove ts and sw from vim modeline when noet is setFlorian Pritz1-1/+1
Forcing vim users to view files with a tabstop of 2 seems really unnecessary when noet is set. I find it much easier to read code with ts=4 and I dislike having to override the modeline by hand. Command run: find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} + Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Update copyright years for 2014Allan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21ini.c: give recursion limit file scopeAndrew Gregory1-3/+5
The recursion limit is an artificial limitation imposed to prevent memory exhaustion in a recursive function. Giving it file-level scope increases its visibility. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21ini.c: make errors in includes fatalAndrew Gregory1-1/+5
If an error in the main file would be fatal there is little reason to ignore the error in an included file. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21ini.c: reuse line bufferAndrew Gregory1-5/+5
By the time we make the recursive call we have already finished with the line buffer, making it safe to reuse. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21conf.c: extract ini parsing code to separate filesAndrew Gregory1-0/+211
Move _parseconfig to ini.c as _parse_ini and create a convenient wrapper for the public API. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>