summaryrefslogtreecommitdiffstats
path: root/lib/frrstr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: Fix so that `--enable-pcreposix` actually compilesDonald Sharp2020-02-161-0/+4
| | | | | | | | The `--enable-pcreposix` configure option was not actually compiling properly. Follow pre-existing pattern for inclusion of regex.h or the pcreposix.h header. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* *: fix ctype (isalpha & co.) castsDavid Lamparter2019-08-061-1/+1
| | | | | | | | | The correct cast for these is (unsigned char), because "char" could be signed and thus have some negative value. isalpha & co. expect an int arg that is positive, i.e. 0-255. So we need to cast to (unsigned char) when calling any of these. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: replace begins_with, add frrstr_endswithQuentin Young2019-05-231-1/+15
| | | | | | | | * Change 'begins_with' to 'frrstr_startswith' for consistency * Add suffix checker, frrstr_endswith() * Update vtysh to use the new function Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: add string replace functionQuentin Young2019-05-071-0/+26
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: return bool from boolean functionsQuentin Young2019-02-261-2/+2
| | | | | | Not 1 or 0. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: fix config.h/zebra.h include orderDavid Lamparter2018-09-081-0/+4
| | | | | | | | config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
* Merge pull request #2495 from pacovn/fixme_all_digitRuss White2018-06-201-0/+8
|\ | | | | bgpd, lib, ospfd, zebra: all_digit moved to frrstr
| * bgpd, lib, ospfd, zebra: all_digit moved to frrstrpaco2018-06-191-0/+8
| | | | | | | | | | | | This solves a pending FIXME Signed-off-by: F. Aragon <paco@voltanet.io>
* | lib: uninitialized variable (Coverity 1469898)paco2018-06-151-0/+3
|/ | | | Signed-off-by: F. Aragon <paco@voltanet.io>
* lib: fix static analysis issues, use regfree()Quentin Young2018-06-061-1/+4
| | | | | | | | | | | * Fix potential NULL dereference * Fix use of uninitialized value * Fix leaking memory by not freeing regex_t * Fix extra \n when using empty regex filter * Clean up still-reachable hook memory * Handle nonexistent pager Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* *: style for | supportQuentin Young2018-06-061-2/+8
| | | | Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* vtysh: add | supportQuentin Young2018-06-061-0/+10
| | | | | | | | | | | * Rewrite pager implementation * Replace fprintf() with vty_out() * Modify vty_out() for better vtysh support * Remove static global outputfile var * Remove fp argument from many vtysh functions * Add some docs for stuff along the way Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
* lib: add string utilitiesQuentin Young2018-06-061-0/+141
I see lots of the same code being copy-pasted and slightly tweaked for string processing all over the codebase. Time to start aggregating these pieces into something consistent and correct. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>