Subversion Repositories HelenOS

Rev

Rev 3386 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
Line 43... Line 43...
43
static cliuser_t usr;
43
static cliuser_t usr;
44
 
44
 
45
/* Globals that are modified during start-up that modules/builtins
45
/* Globals that are modified during start-up that modules/builtins
46
 * should be aware of. */
46
 * should be aware of. */
47
volatile unsigned int cli_quit = 0;
47
volatile unsigned int cli_quit = 0;
48
volatile unsigned int cli_interactive = 1;
-
 
49
volatile unsigned int cli_verbocity = 1;
48
volatile unsigned int cli_verbocity = 1;
50
 
49
 
51
/* The official name of this program
50
/* The official name of this program
52
 * (change to your liking in configure.ac and re-run autoconf) */
51
 * (change to your liking in configure.ac and re-run autoconf) */
53
const char *progname = PACKAGE_NAME;
52
const char *progname = PACKAGE_NAME;
54
 
53
 
55
/* These are not exposed, even to builtins */
54
/* These are not exposed, even to builtins */
56
static int cli_init(cliuser_t *usr);
55
static int cli_init(cliuser_t *);
57
static void cli_finit(cliuser_t *usr);
56
static void cli_finit(cliuser_t *);
58
 
57
 
59
/* Constructor */
58
/* Constructor */
60
static int cli_init(cliuser_t *usr)
59
static int cli_init(cliuser_t *usr)
61
{
60
{
62
    usr->line = (char *) NULL;
61
    usr->line = (char *) NULL;
Line 92... Line 91...
92
 
91
 
93
    while (!cli_quit) {
92
    while (!cli_quit) {
94
        get_input(&usr);
93
        get_input(&usr);
95
        if (NULL != usr.line) {
94
        if (NULL != usr.line) {
96
            ret = tok_input(&usr);
95
            ret = tok_input(&usr);
-
 
96
            cli_set_prompt(&usr);
97
            usr.lasterr = ret;
97
            usr.lasterr = ret;
98
        }
98
        }
99
    }
99
    }
100
    goto finit;
100
    goto finit;
101
 
101