1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00

Ruby: reorder code

This commit is contained in:
Alex Kotov 2022-06-07 21:30:52 +03:00
parent d066a9d231
commit 7415eb06fa
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 12 additions and 8 deletions

View file

@ -11,6 +11,10 @@ unless have_var 'kernaux_assert_cb', 'kernaux.h'
raise 'kernaux_assert_cb not found'
end
# Package "cmdline"
have_func 'kernaux_cmdline'
# Package "ntoa"
have_func 'kernaux_utoa'
have_func 'kernaux_itoa'
have_func 'kernaux_utoa2'
@ -22,14 +26,14 @@ have_func 'kernaux_itoa10'
have_func 'kernaux_utoa16'
have_func 'kernaux_itoa16'
# Package "printf"
have_func 'kernaux_snprintf'
# Package "printf-fmt"
# TODO: do something if not found?
have_func 'KernAux_PrintfFmt_Spec_create'
have_func 'KernAux_PrintfFmt_Spec_parse'
have_func 'KernAux_PrintfFmt_Spec_set_width'
have_func 'KernAux_PrintfFmt_Spec_set_precision'
have_func 'kernaux_cmdline'
raise 'can\'t create Makefile' unless create_makefile 'kernaux/default'

View file

@ -8,21 +8,21 @@
void init_assert();
void init_ntoa();
#ifdef HAVE_KERNAUX_SNPRINTF
void init_printf();
#endif // HAVE_KERNAUX_SNPRINTF
#ifdef HAVE_KERNAUX_CMDLINE
void init_cmdline();
#endif // HAVE_KERNAUX_CMDLINE
#ifdef HAVE_KERNAUX_SNPRINTF
void init_printf();
#endif // HAVE_KERNAUX_SNPRINTF
void Init_default()
{
init_assert();
init_ntoa();
#ifdef HAVE_KERNAUX_SNPRINTF
init_printf();
#endif // HAVE_KERNAUX_SNPRINTF
#ifdef HAVE_KERNAUX_CMDLINE
init_cmdline();
#endif // HAVE_KERNAUX_CMDLINE
#ifdef HAVE_KERNAUX_SNPRINTF
init_printf();
#endif // HAVE_KERNAUX_SNPRINTF
}