From 31c69b6ca1b91e7fd9fd8e14082fd2584c5f538c Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sun, 24 May 2020 16:48:22 +0200 Subject: first public release Signed-off-by: Toni Uhlig --- source/tools/dummy.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 source/tools/dummy.c (limited to 'source/tools/dummy.c') diff --git a/source/tools/dummy.c b/source/tools/dummy.c new file mode 100644 index 0000000..d7623da --- /dev/null +++ b/source/tools/dummy.c @@ -0,0 +1,34 @@ +#include + +#include +#include +#include + + +int subroutine(void* ptr, int d) +{ + return (int)ptr+d+1; +} + +int main(int argc, char** argv) +{ + DWORD dwWait = 2; + + if (argc > 1 && argc != 2) { + printf("usage: %s [WAIT_TIME]\n", argv[0]); + abort(); + } else if (argc == 2) { + errno = 0; + dwWait = strtoul(argv[1], NULL, 10); + if (errno != 0) + dwWait = 2; + } + + printf("%s", "Hi, I'm a useless dummy like the guy who coded me.\n"); + printf("Waiting %lu seconds ..\n", dwWait); + sleep(dwWait); + printf("%s", "Dummy done.\n"); + if (subroutine(NULL, 1) == 2) { + return 0; + } else return 1; +} -- cgit v1.2.3