wireshark/wsutil
Stig Bjørlykke 19153cf911 wsutil: Add config_file_exists_with_entries()
The purpose of this function is to check if a configuration file exists
and has at least one entry which is not a comment.

Use this when building the list of profiles where the user can copy
configuration from, to avoid listing profiles with empty files or files
with only comments.

Change-Id: If45f52025959818fb1213ffac488cd59441e9fce
Reviewed-on: https://code.wireshark.org/review/30113
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-11 12:33:05 +00:00
..
.editorconfig Rename airpdcap to dot11decrypt. 2018-02-24 11:56:18 +00:00
CMakeLists.txt wsutil: get_datafile_dir: avoid hard-coded build directory 2018-10-03 03:49:16 +00:00
adler32.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
adler32.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
base32.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
base32.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
bits_count_ones.h Get rid of trailing white space. 2018-03-13 22:30:49 +00:00
bits_ctz.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
bitswap.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
bitswap.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
buffer.c fix missing parentheses in 'if' statement 2018-05-03 04:09:42 +00:00
buffer.h Fix function declaration of ws_buffer_length(). 2018-05-04 02:26:31 +00:00
cfutils.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
cfutils.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
clopts_common.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
clopts_common.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
cmdarg_err.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
cmdarg_err.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
color.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
copyright_info.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
copyright_info.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
cpu_info.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
cpu_info.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crash_info.c Clean up REPORT_DISSECTOR_BUG(). 2018-03-25 23:49:35 +00:00
crash_info.h Clean up REPORT_DISSECTOR_BUG(). 2018-03-25 23:49:35 +00:00
crc6.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc6.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc7.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc7.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc8.c The CRC8 routines don't modify the buffer; make the pointers to it const. 2018-02-17 19:30:35 +00:00
crc8.h The CRC8 routines don't modify the buffer; make the pointers to it const. 2018-02-17 19:30:35 +00:00
crc10.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc10.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc11.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc11.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc16-plain.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc16-plain.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc16.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc16.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc32.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc32.h Rename airpdcap to dot11decrypt. 2018-02-24 11:56:18 +00:00
curve25519.c wsutil: Add Curve25519 ECDH (X25519) using Gcrypt 2018-08-08 11:23:55 +00:00
curve25519.h wsutil: Add Curve25519 ECDH (X25519) using Gcrypt 2018-08-08 11:23:55 +00:00
dot11decrypt_wep.c spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
eax.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
eax.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
file_util.c Windows: prioritize Npcap over WinPcap 2018-05-08 17:29:34 +00:00
file_util.h If we have fseek/ftell variants with 64-bit offsets, use them. 2018-07-20 23:13:08 +00:00
filesystem.c wsutil: Add config_file_exists_with_entries() 2018-10-11 12:33:05 +00:00
filesystem.h wsutil: Add config_file_exists_with_entries() 2018-10-11 12:33:05 +00:00
frequency-utils.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
frequency-utils.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
g711.c Add editor-modelines; adjust whitespace. 2014-10-14 16:45:09 +00:00
g711.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
getopt_long.c Include alloca.h if we have it. 2018-03-23 22:39:07 +00:00
getopt_long.h wsutil: use SPDX identifiers. 2018-02-07 05:34:22 +00:00
inet_addr.c wsutil: fix compilation on freebsd. 2018-05-28 21:40:18 +00:00
inet_addr.h wsutil: fix WS_INET_ADDRSTRLEN definition on Windows 2018-05-11 18:24:15 +00:00
inet_ipv4.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
inet_ipv6.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
interface.c Eliminate some unneeded header checks. 2018-05-16 22:03:09 +00:00
interface.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
jsmn.c wsutil: split libjsmn. 2016-09-30 20:12:00 +00:00
jsmn.h jsmn(.h): fix warning: '@param' command used in a comment that is not attached to a function declaration [-Wdocumentation] 2016-10-06 14:20:16 +00:00
mpeg-audio.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
mpeg-audio.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
netlink.h make our version of nla_for_each_nested() public 2018-05-23 13:18:00 +00:00
nstime.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
nstime.h Add macros to initialize nstime_t values and use them. 2018-06-28 03:39:54 +00:00
os_version_info.c Add Windows 10 Release ID to About info 2018-06-27 03:17:35 +00:00
os_version_info.h Windows: Fetch our version using RtlGetVersion. 2018-06-26 20:30:02 +00:00
pint.h Update a comment to reflect current reality. 2018-07-03 05:37:06 +00:00
plugins.c plugins: Minor interface improvement 2018-08-21 19:56:12 +00:00
plugins.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
pow2.h Define macros to calculate (2^N)^M, and use them in more places. 2018-02-20 05:27:38 +00:00
privileges.c Eliminate some unneeded header checks. 2018-05-16 22:03:09 +00:00
privileges.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
processes.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
report_message.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
report_message.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
rsa.c remove redundant break statement 2018-04-24 04:33:12 +00:00
rsa.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
sign_ext.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
sober128.c wsutil/sober128: remove unused macros and functions 2017-02-02 21:13:55 +00:00
sober128.h wsutil/sober128: remove unused macros and functions 2017-02-02 21:13:55 +00:00
socket.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
str_util.c lwm2mtlv: Handle String data type as UTF-8 2018-04-28 06:19:48 +00:00
str_util.h lwm2mtlv: Handle String data type as UTF-8 2018-04-28 06:19:48 +00:00
strnatcmp.c wsutil: use SPDX identifiers. 2018-02-07 05:34:22 +00:00
strnatcmp.h wsutil: use SPDX identifiers. 2018-02-07 05:34:22 +00:00
strptime.c spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
strptime.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
strtoi.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
strtoi.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
tempfile.c Remove some unused or hard-coded header checks. 2018-03-12 22:11:32 +00:00
tempfile.h Remove some unused or hard-coded header checks. 2018-03-12 22:11:32 +00:00
time_util.c Try to discourage the use of APIs via counting. 2018-09-19 16:07:03 +00:00
time_util.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
type_util.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
type_util.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
unicode-utils.c Bring back arg_list_utf_16to8(), but have it just do UTF-16-to-UTF-8 mapping. 2018-10-08 03:05:45 +00:00
unicode-utils.h Bring back arg_list_utf_16to8(), but have it just do UTF-16-to-UTF-8 mapping. 2018-10-08 03:05:45 +00:00
utf8_entities.h Qt: Replace the toolbar extension icon. 2018-02-17 08:26:46 +00:00
win32-utils.c Windows: Conditionally set CREATE_BREAKAWAY_FROM_JOB. 2018-03-13 23:34:53 +00:00
win32-utils.h Windows: Always assign newly-created processes to our job. 2018-03-13 17:18:30 +00:00
ws_cpuid.h Tweak ws_cpuid so that Valgrind is happy. 2018-04-05 07:34:01 +00:00
ws_mempbrk.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
ws_mempbrk.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
ws_mempbrk_int.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
ws_mempbrk_sse42.c wsutil: add CR to license. 2018-03-09 08:52:17 +00:00
ws_pipe.c Do not pass pipe handle to WaitForMultipleObjects 2018-08-16 20:25:35 +00:00
ws_pipe.h Windows: Always assign newly-created processes to our job. 2018-03-13 17:18:30 +00:00
ws_printf.h Try to discourage the use of APIs via counting. 2018-09-19 16:07:03 +00:00
wsgcrypt.c Extract HKDF-Expand from TLS 1.3 dissector 2018-02-12 08:37:48 +00:00
wsgcrypt.h Move hkdf_extract to wsgcrypt.h 2018-02-15 16:19:35 +00:00
wsgetopt.h wsutil: use SPDX identifiers. 2018-02-07 05:34:22 +00:00
wsjson.c wsutil: fix json-glib memleaks and warning 2018-05-13 17:03:55 +00:00
wsjson.h wsutil: convert one leftover function in wsjson. 2018-04-21 22:42:11 +00:00
wspcap.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
xtea.c replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
xtea.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00