Added a tiny implementation of readline library, based on linenoise sources.

See https://github.com/antirez/linenoise for details.

Implemented a routine atexit() in libc.

Pdc modified to use readline library.
This commit is contained in:
Serge Vakulenko
2015-07-18 18:41:46 -07:00
parent 0b8e8bd520
commit e8cb02f3f7
15 changed files with 1507 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
TOPSRC = $(shell cd ..; pwd)
SUBDIR = startup libc libcurses libtermlib libwiznet
SUBDIR = startup libc libcurses libtermlib libwiznet libreadline
PROG = ar as aout ld nm ranlib size strip
CFLAGS += -std=gnu89 -fno-builtin -g -Werror -Wall -DCROSS -I. \

17
lib/libreadline/Makefile Normal file
View File

@@ -0,0 +1,17 @@
TOPSRC = $(shell cd ../..; pwd)
include $(TOPSRC)/target.mk
vpath %.c $(TOPSRC)/src/libreadline
CFLAGS += -B$(TOPSRC)/lib/ $(DEFS) -Wa,-x -Wall -Werror
OBJS = readline.o
all: ../libreadline.a
../libreadline.a: ../ar ../ranlib $(OBJS)
../ar rc $@ $(OBJS)
../ranlib $@
clean:
rm -f *~ *.o a.out *.a