1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* ==================================================================
FILE: tclreadline.c
$Id$
---
tclreadline -- gnu readline for tcl
http://www.zellner.org/tclreadline/
Copyright (c) 1998 - 2014, Johannes Zellner <johannes@zellner.org>
This software is copyright under the BSD license.
================================================================== */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <tcl.h>
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* ================================================================== *
* FILE: tclreadline.c
* $Id$
* ---
* tclreadline -- gnu readline for tcl
* http://www.zellner.org/tclreadline/
* Copyright (c) 1998 - 2014, Johannes Zellner <johannes@zellner.org>
* This software is copyright under the BSD license.
* ================================================================== */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <tcl.h>
#include <stdio.h>
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
char** cmd;
struct cmds_t* next;
} cmds_t;
#define ISWHITE(c) ((' ' == c) || ('\t' == c) || ('\n' == c))
/* forward declarations. */
static char* stripleft(char* in);
static char* stripright(char* in);
static char* stripwhite(char* in);
static int TclReadlineLineComplete(void);
static void TclReadlineTerminate(int state);
static char* TclReadlineQuote(char* text, char* quotechars);
static int TclReadlineCmd(ClientData clientData, Tcl_Interp *interp, int objc,
|
>
|
>
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
char** cmd;
struct cmds_t* next;
} cmds_t;
#define ISWHITE(c) ((' ' == c) || ('\t' == c) || ('\n' == c))
/**
* forward declarations
*/
static char* stripleft(char* in);
static char* stripright(char* in);
static char* stripwhite(char* in);
static int TclReadlineLineComplete(void);
static void TclReadlineTerminate(int state);
static char* TclReadlineQuote(char* text, char* quotechars);
static int TclReadlineCmd(ClientData clientData, Tcl_Interp *interp, int objc,
|