summaryrefslogtreecommitdiffstats
path: root/linenoise/linenoise.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-04 07:25:27 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-04 07:25:27 -0700
commitd10711353bf9cf0c03a31f81478b57672065b6f0 (patch)
tree3a5e1b6f3252edd0e3c4492f41548fd3042de38a /linenoise/linenoise.h
parentdc552d93b35e4455d2d102a900fab5973ae8e6b8 (diff)
downloadtxr-d10711353bf9cf0c03a31f81478b57672065b6f0.tar.gz
txr-d10711353bf9cf0c03a31f81478b57672065b6f0.tar.bz2
txr-d10711353bf9cf0c03a31f81478b57672065b6f0.zip
linenoise: compile as C++ and use checked allocator.
* linenoise/linenoise.c (mem_t): New typedef, compatible with the one in lib.h, which we don't want to include. (chk_malloc, chk_realloc): External declarations added. (unsupported_term): Make element type const char *. (linenoiseAddCompletion): Use checked allocator, add casts, use the superior "sizeof *dest_pointer_var" expression in size calculations rather than "sizeof (maybe_wrong_type)". (abAppend, linenoiseHistoryAdd, linenoiseHistorySetMaxLen): Likewise. * linenoise/linenoise.h: Remove unnecessary include guards; we don't use them in this project. Remove 'extern "C"'; we don't require C linkage when compiling everything as C++.
Diffstat (limited to 'linenoise/linenoise.h')
-rw-r--r--linenoise/linenoise.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/linenoise/linenoise.h b/linenoise/linenoise.h
index fbb01cfa..10456c32 100644
--- a/linenoise/linenoise.h
+++ b/linenoise/linenoise.h
@@ -36,13 +36,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __LINENOISE_H
-#define __LINENOISE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct linenoiseCompletions {
size_t len;
char **cvec;
@@ -60,9 +53,3 @@ int linenoiseHistoryLoad(const char *filename);
void linenoiseClearScreen(void);
void linenoiseSetMultiLine(int ml);
void linenoisePrintKeyCodes(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LINENOISE_H */