aboutsummaryrefslogtreecommitdiffstats
path: root/libopkg/parse_util.c
AgeCommit message (Collapse)Author
2019-10-25add SPDX License identifierYann CARDAILLAC
Signed-off-by: Yann CARDAILLAC <yann.cardaillac@smile.fr> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-12-16opkg: ignore empty fields in package listsFlorin Gherendi
This is to work around issues with package list generators creating empty fields in some environments. Based on a patch by Paul Selkrik <pselkrik@isc.org> Signed-off-by: Steven Barth <steven@midlink.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38390 3c298f89-4303-0410-b956-a3cf2f4a3e73 The patch was imported from OpenWRT git server (git://git.openwrt.org/openwrt.git) as of commit id 65929a79366afe1b5c0a2f1c7e3b255090604c8f. changes: libopkg/parse_util.c: added #include <stdlib.h> to suppress compilation warning Signed-off-by: Florin Gherendi <floring2502@gmail.com> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2014-12-15libopkg: Use regular format for strcmp testsPaul Barker
The return value of strcmp or strncmp is always compared to zero using either '==', '!=', '<', '<=', '>' or '>='. Using a regular format like this should make the logic easy to understand at first glance. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-12-15libopkg: Avoid functions with side effects in if statementsPaul Barker
Functions which have significant side effects are moved outside of if statements. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-12-15Initial reformat with 'indent'Paul Barker
For each file, the command executed was: indent -linux -i4 -nut -sc -bbo -nhnl $f This is the first step in improving the code formatting and further work is still required. 'indent' is confused by the 'extern "c" {}' wrapping in the header files and gets the indentation wrong. It also produces sub-optimal formatting for some long lines. Each file will be reviewed by hand after this commit. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-06-05Cleanup trailing whitespaceEmmanuel Deloget
The whitespaces has been removed automatically using the following command line: grep --exclude-dir .git -rHn '[[:space:]]$' | \ awk -F: '{ print $1 }' | sort | uniq | \ grep -v COPYING | \ while read f; do sed -i 's/[[:space:]]*$//g' $f; done The COPYING file has been spared because (a) it's a GNU file, not an opkg file and (b) the ^L control chars are in the [[:space:]] character list (and we don't want them to disapear). Changes to ChangeLog.ipkg were dropped as they are unnecessary for such a legacy file. Signed-off-by: Emmanuel Deloget <logout@free.fr> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-30Add vim modelines to all .c and .h filesPaul Barker
This also corrects the existing vim modelines to match the desired format. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-30Respect config.hPaul Barker
config.h defines things like _FILE_OFFSET_BITS and so must be included in every C file before any other headers are included. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-02-05xfuncs.c: Move to libopkg and remove empty libbbPaul Barker
This involves a lot of header and build system tidyup to remove libbb. We still need to do another pass of header tidyup. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-02-05libopkg: Fixup header inclusionPaul Barker
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2011-04-26Introduce a specific pointer typedef for parse_line functionsjaviplx@gmail.com
git-svn-id: http://opkg.googlecode.com/svn/trunk@620 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2011-04-26Move pkg_parse_from_stream_nomalloc into parse_utiljaviplx@gmail.com
git-svn-id: http://opkg.googlecode.com/svn/trunk@619 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
2011-04-07Create parse_util with some of the non-public functions from pkg_parse.cjaviplx@gmail.com
git-svn-id: http://opkg.googlecode.com/svn/trunk@611 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358