wireshark/extcap
Guy Harris a34cc98b2a Put the main() and wmain() routines for CLI programs into a separate file.
That means that code is only in one place, rather than having copies of
it in each of those programs.

CLI programs that, on Windows, should get UTF-8 arguments rather than
arguments in the local code page should:

	include the top-level cli_main.h header;

	define the main function as real_main();

	be built with the top-level cli_main.c file.

On UN*X, cli_main.c has a main() program, and just passes the arguments
on to real_main().

On Windows, cli_main.c has a wmain() function that converts the UTF-16
arguments it's handed to UTF-8 arguments, using WideCharToMultiByte() so
that it doesn't use any functions other than those provided by the
system, and then calls real_main() with the argument count and UTF-8
arguments.

Change-Id: I8b11f01dbc5c63fce599d1bef9ad96cd92c3c01e
Reviewed-on: https://code.wireshark.org/review/31017
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-13 00:52:11 +00:00
..
.editorconfig Win32: Make extcap utilities console applications. 2018-10-12 19:01:49 +00:00
CMakeLists.txt Put the main() and wmain() routines for CLI programs into a separate file. 2018-12-13 00:52:11 +00:00
androiddump.c Put the main() and wmain() routines for CLI programs into a separate file. 2018-12-13 00:52:11 +00:00
ciscodump.c Put the main() and wmain() routines for CLI programs into a separate file. 2018-12-13 00:52:11 +00:00
dpauxmon.c Extcap programs must write to the packet pipe in binary mode. 2018-07-19 09:30:52 +00:00
dpauxmon_user.h extcap: Support for DisplayPort AUX channel monitors 2018-05-14 10:44:37 +00:00
extcap-base.c extcap: save debug flag and use it to activate ssh debug. 2018-11-14 04:58:38 +00:00
extcap-base.h Put the main() and wmain() routines for CLI programs into a separate file. 2018-12-13 00:52:11 +00:00
randpktdump.c Put the main() and wmain() routines for CLI programs into a separate file. 2018-12-13 00:52:11 +00:00
sdjournal.c Add a systemd Journal Export extcap. 2018-10-01 08:58:13 +00:00
ssh-base.c extcap: save debug flag and use it to activate ssh debug. 2018-11-14 04:58:38 +00:00
ssh-base.h extcap: save debug flag and use it to activate ssh debug. 2018-11-14 04:58:38 +00:00
sshdump.c Put the main() and wmain() routines for CLI programs into a separate file. 2018-12-13 00:52:11 +00:00
udpdump.c Put the main() and wmain() routines for CLI programs into a separate file. 2018-12-13 00:52:11 +00:00