%% options copyright owner = Dirk Krause copyright year = 2015-xxxx SPDX-License-Identifier: BSD-3-Clause %% module #include "dk4app.h" #if DK4_HAVE_ASSERT_H #ifndef ASSERT_H_INCLUDED #include #define ASSERT_H_INCLUDED 1 #endif #endif int dk4app_get_argc(dk4_app_t const *app) { int back = 0; #if DK4_USE_ASSERT assert(NULL != app); #endif if (NULL != app) { back = app->my_argc; } return back; } const dkChar * dk4app_get_argv(dk4_app_t const *app, int n) { const dkChar *back = NULL; #if DK4_USE_ASSERT assert(NULL != app); #endif if (NULL != app) { if (n < app->my_argc) { back = (app->my_argv)[n]; } } return back; }