forked from mamedev/mame
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated forked linenoise to latest upstream.
This removes the need to force it to build as C++, and adds proper UTF-8 support for Windows. Since this is a fork of linenoise, there's no hope for getting lua-linenoise to sync with it upstream. I made the bare minimum changes to keep it working, but didn't add bindings for new functionality (e.g. multi-line editing).
- Loading branch information
Showing
14 changed files
with
2,511 additions
and
1,274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
all: linenoise_example linenoise_utf8_example linenoise_cpp_example | ||
CFLAGS += -Wall -W -Os -g | ||
CC ?= gcc | ||
|
||
linenoise_example: linenoise.h linenoise.c example.c | ||
$(CC) -Wall -W -Os -g -o $@ linenoise.c example.c | ||
all: linenoise_example linenoise_utf8_example | ||
|
||
linenoise_utf8_example: linenoise.c utf8.c example.c | ||
$(CC) -DNO_COMPLETION -DUSE_UTF8 -Wall -W -Os -g -o $@ linenoise.c utf8.c example.c | ||
linenoise_example: linenoise.h linenoise-ship.c linenoise-win32.c example.c | ||
$(CC) $(CFLAGS) -o $@ linenoise-ship.c example.c | ||
|
||
linenoise_cpp_example: linenoise.h linenoise.c | ||
g++ -Wall -W -Os -g -o $@ linenoise.c example.c | ||
linenoise_utf8_example: linenoise.h linenoise-ship.c linenoise-win32.c | ||
$(CC) $(CFLAGS) -DUSE_UTF8 -o $@ linenoise-ship.c example.c | ||
|
||
clean: | ||
rm -f linenoise_example linenoise_utf8_example linenoise_cpp_example *.o | ||
rm -f linenoise_example linenoise_utf8_example linenoise-ship.c *.o | ||
|
||
ship: linenoise-ship.c | ||
|
||
# linenoise-ship.c simplifies delivery of linenoise support | ||
# simple copy linenoise-ship.c to linenoise.c in your application, and also linenoise.h | ||
# - If you want win32 support, also copy linenoise-win32.c | ||
# - If you never want to support utf-8, you can omit utf8.h and utf8.c | ||
|
||
linenoise-ship.c: utf8.h utf8.c stringbuf.h stringbuf.c linenoise.c | ||
cat $^ >$@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.