-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuiltin.h
More file actions
60 lines (50 loc) · 1013 Bytes
/
Copy pathbuiltin.h
File metadata and controls
60 lines (50 loc) · 1013 Bytes
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef _BUILTIN_H_
#define _BUILTIN_H_
#include <stdbool.h>
#include "command.h"
bool builtin_is_internal(scommand cmd);
/*
* Indica si el comando alojado en `cmd` es un comando interno
*
* REQUIRES: cmd != NULL
*
*/
bool builtin_alone(pipeline p);
/*
* Indica si el pipeline tiene solo un elemento y si este se corresponde a un
* comando interno.
*
* REQUIRES: p != NULL
*
* ENSURES:
*
* builtin_alone(p) == pipeline_length(p) == 1 &&
* builtin_is_internal(pipeline_front(p))
*
*
*/
void builtin_run(scommand cmd);
/*
* Ejecuta un comando interno
*
* REQUIRES: {builtin_is_internal(cmd)}
*
*/
void builtin_pwd(bool breakline);
/*
* Muestra el directorio de trabajo actual.
*
*/
void builtin_cd(scommand cmd);
/*
* Cambia el directorio actual al especificado en el comando interno `cmd`.
*
* REQUIRES: {builtin_is_internal(cmd)}
*
*/
void print_help(void);
/*
* Imprime una lista con la información de ayuda para los comandos internos.
*
*/
#endif