1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2025-03-31 17:25:22 -04:00

Start working on command line parser

This commit is contained in:
Alex Kotov 2020-12-02 00:55:16 +05:00
parent 90d2ef08dd
commit 761fb821d8
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
7 changed files with 30 additions and 0 deletions

1
.gitignore vendored
View file

@ -32,6 +32,7 @@
/tests/multiboot2_print1
/tests/multiboot2_print2
/tests/test_cmdline
/tests/test_multiboot2_helpers
/tests/test_multiboot2_print
/tests/test_multiboot2_validation

View file

@ -5,6 +5,7 @@ AM_CFLAGS = -std=c99 -Wall -Wextra -I$(top_srcdir)/include
lib_LIBRARIES = libkernaux.a
TESTS = \
tests/test_cmdline \
tests/test_multiboot2_helpers \
tests/test_multiboot2_print \
tests/test_multiboot2_validation \
@ -17,6 +18,7 @@ noinst_PROGRAMS = \
tests/multiboot2_print2
libkernaux_a_SOURCES = \
src/cmdline.c \
src/console.c \
src/multiboot2/helpers.c \
src/multiboot2/is_valid.c \
@ -36,6 +38,10 @@ tests_multiboot2_print2_SOURCES = \
$(libkernaux_a_SOURCES) \
tests/multiboot2_print2.c
tests_test_cmdline_SOURCES = \
$(libkernaux_a_SOURCES) \
tests/test_cmdline.c
tests_test_multiboot2_helpers_SOURCES = \
$(libkernaux_a_SOURCES) \
tests/test_multiboot2_helpers.c

View file

@ -21,6 +21,7 @@ Table of contents
API
---
* [Simple command line parser](/include/kernaux/cmdline.h) *(work in progress)*
* [Multiboot 2 (GRUB 2) information parser](/include/kernaux/multiboot2.h)
* [Serial console](/include/kernaux/console.h)
* [Page Frame Allocator](/include/kernaux/pfa.h) *(work in progress)*

View file

@ -1,5 +1,6 @@
nobase_include_HEADERS = \
kernaux/arch/x86.h \
kernaux/cmdline.h \
kernaux/console.h \
kernaux/multiboot2.h \
kernaux/pfa.h \

12
include/kernaux/cmdline.h Normal file
View file

@ -0,0 +1,12 @@
#ifndef KERNAUX_INCLUDED_CMDLINE
#define KERNAUX_INCLUDED_CMDLINE 1
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif

3
src/cmdline.c Normal file
View file

@ -0,0 +1,3 @@
#include "config.h"
#include <kernaux/cmdline.h>

6
tests/test_cmdline.c Normal file
View file

@ -0,0 +1,6 @@
#include <kernaux/cmdline.h>
int main()
{
return 0;
}