forked from andrea-rosasco/shell_bush
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.h
38 lines (33 loc) · 1.17 KB
/
shell.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* bush--
*
* Programma sviluppato a supporto del laboratorio di
* Sistemi di Elaborazione e Trasmissione del corso di laurea
* in Informatica classe L-31 presso l'Universita` degli Studi di
* Genova, anno accademico 2016/2017.
*
* Copyright (C) 2015,2016 by Giovanni Lagorio <giovanni.lagorio@unige.it>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef SHELL_H
#define SHELL_H
#include "ast.h"
struct var_table;
struct shell;
struct shell *sh_new();
void sh_destroy(struct shell * const this);
const char *sh_get_prompt(const struct shell * const this);
struct var_table *sh_get_var_table(const struct shell * const this);
char **sh_get_environment(const struct shell * const this);
void sh_build_environment(struct shell * const this);
enum next_action sh_execute(struct shell * const this, const struct node * const cmd);
#define PATH "PATH"
#define PWD "PWD"
#define HOME "HOME"
#define PATH_SEPARATOR '/'
#define DIR_SEPARATOR ':'
#endif /* #ifndef SHELL_H */