rush
Revamped UNIX Shell
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Enumerations
Enumerator
Macros
shellutils.h
Go to the documentation of this file.
1
13
#ifndef SHELLUTILS_H
14
#define SHELLUTILS_H
15
16
17
#include <limits.h>
18
#include <stdbool.h>
19
#include <sys/types.h>
20
21
23
#if (defined ARG_MAX && ARG_MAX <= 1048576)
24
#define MAX_CMDLINE_LEN ARG_MAX
25
#else
26
#define MAX_CMDLINE_LEN 1048576
27
#endif
28
29
31
typedef
enum
{
32
PS_RUNNING
,
33
PS_STOPPED
,
34
PS_TERMINATED
35
}
ProcState
;
36
38
typedef
struct
{
39
pid_t
pid
;
40
char
*
cmdLine
;
41
bool
background
;
42
ProcState
state
;
43
}
ProcInfo
;
44
46
typedef
struct
{
47
char
*inFile;
49
char
*outFile;
51
bool
background;
53
const
char
*parseError;
56
char
*cmdLine;
58
char
**argv;
60
}
ShCommand
;
61
62
69
void
shPrompt
(
void
);
70
102
ShCommand
*
shParseCmdLine
(
char
cmdLine[]);
103
125
int
shPrintProcState
(
const
ProcInfo
*info);
126
127
128
#endif
/* SHELLUTILS_H */
Generated on Wed Jun 5 2013 09:32:05 for rush by
1.8.1.2