Compare commits
5 Commits
90b5364b29
...
e49ff84b74
| Author | SHA1 | Date | |
|---|---|---|---|
|
e49ff84b74
|
|||
|
b7c9bfd9f5
|
|||
|
f6165164ee
|
|||
|
3a445c2db2
|
|||
|
45d023147a
|
@@ -112,8 +112,8 @@ endforeach (page)
|
||||
|
||||
# CPack
|
||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Shell for running JSON-RPC 2.0 queries")
|
||||
set (CPACK_PACKAGE_VENDOR "Premysl Janouch")
|
||||
set (CPACK_PACKAGE_CONTACT "Přemysl Janouch <p@janouch.name>")
|
||||
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
|
||||
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||
set (CPACK_PACKAGE_VERSION_MAJOR ${project_VERSION_MAJOR})
|
||||
set (CPACK_PACKAGE_VERSION_MINOR ${project_VERSION_MINOR})
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2014 - 2018, Přemysl Janouch <p@janouch.name>
|
||||
Copyright (c) 2014 - 2018, Přemysl Eric Janouch <p@janouch.name>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* json-rpc-shell.c: simple JSON-RPC 2.0 shell
|
||||
*
|
||||
* Copyright (c) 2014 - 2016, Přemysl Janouch <p@janouch.name>
|
||||
* Copyright (c) 2014 - 2016, Přemysl Eric Janouch <p@janouch.name>
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted.
|
||||
@@ -531,7 +531,8 @@ input_el_redisplay (struct input_el *self)
|
||||
el_push (self->editline, x);
|
||||
|
||||
// We have to do this or it gets stuck and nothing is done
|
||||
(void) el_gets (self->editline, NULL);
|
||||
int count = 0;
|
||||
(void) el_wgets (self->editline, &count);
|
||||
}
|
||||
|
||||
static char *
|
||||
@@ -3176,9 +3177,16 @@ process_edited_input (struct app_context *ctx)
|
||||
print_error ("%s: %s", "input editing failed", e->message);
|
||||
error_free (e);
|
||||
}
|
||||
else if (!ctx->input->vtable->replace_line (ctx->input, input.str))
|
||||
print_error ("%s: %s", "input editing failed",
|
||||
"could not re-insert modified text");
|
||||
else
|
||||
{
|
||||
// Strip trailing newlines, added automatically by editors
|
||||
while (input.len && strchr ("\r\n", input.str[input.len - 1]))
|
||||
input.str[--input.len] = 0;
|
||||
|
||||
if (!ctx->input->vtable->replace_line (ctx->input, input.str))
|
||||
print_error ("%s: %s", "input editing failed",
|
||||
"could not re-insert modified text");
|
||||
}
|
||||
|
||||
if (unlink (ctx->editor_filename))
|
||||
print_error ("could not unlink `%s': %s",
|
||||
@@ -3460,7 +3468,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
// XXX: to be completely correct, we should use tputs, but we cannot
|
||||
g_ctx.input->vtable->set_prompt (g_ctx.input,
|
||||
xstrdup_printf ("%c%s%cjson-rpc> %c%s%c",
|
||||
xstrdup_printf ("%c%s%cjson-rpc>%c%s%c ",
|
||||
INPUT_START_IGNORE, g_ctx.attrs[ATTR_PROMPT],
|
||||
INPUT_END_IGNORE,
|
||||
INPUT_START_IGNORE, g_ctx.attrs[ATTR_RESET],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* json-rpc-test-server.c: JSON-RPC 2.0 demo server
|
||||
*
|
||||
* Copyright (c) 2015 - 2018, Přemysl Janouch <p@janouch.name>
|
||||
* Copyright (c) 2015 - 2018, Přemysl Eric Janouch <p@janouch.name>
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted.
|
||||
|
||||
2
liberty
2
liberty
Submodule liberty updated: bca7167d03...1a76b2032e
Reference in New Issue
Block a user