From 36389fb0dac5c1aed0fe0f6ccbd676ad364c1a9b Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 23 Mar 2021 15:04:54 +1100 Subject: Abstract htop main function to allow for a platform binary One review request relating to the PCP platform is to have a clearly separate binary from the regular htop so that we have no confusion as to what is being requested to run, to aid debugging, and a bunch of other good reasons. This commit renames htop.c to CommandLine.c and provides a minimal htop main function for 'native' platforms to use. The PCP version of this will setup libpcp.so and then call the same CommandLine_run function as regular htop. Related to https://github.com/htop-dev/htop/pull/536 --- CommandLine.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 CommandLine.h (limited to 'CommandLine.h') diff --git a/CommandLine.h b/CommandLine.h new file mode 100644 index 00000000..b1f157ea --- /dev/null +++ b/CommandLine.h @@ -0,0 +1,14 @@ +#ifndef HEADER_CommandLine +#define HEADER_CommandLine +/* +htop - CommandLine.h +(C) 2004-2011 Hisham H. Muhammad +(C) 2020-2021 htop dev team +Released under the GNU GPLv2, see the COPYING file +in the source distribution for its full text. +*/ + + +int CommandLine_run(const char* name, int argc, char** argv); + +#endif -- cgit v1.2.3