3 typedef struct s_entry
\r
12 {EREAD, "a read pipe operation failed"},
\r
13 {EREADPIPE, "a pipe used to read from the stdout of a command is broken"},
\r
14 {ETIMEOUT, "a command is timeouted"},
\r
15 {EWRITE, "a write operation failed"},
\r
16 {EWRITEPIPE, "a pipe used to write to the stdin of a command is broken"},
\r
17 {EEXEC, "can't execute a command"},
\r
18 {EWAIT, "wait function failed"},
\r
19 {ECMDNOTFOUND, "command is not found"},
\r
20 {EEXITCODENOTMATCH, "exit codes don't match"},
\r
21 {EOUTPUTNOTMATCH, "outputs don't match"},
\r
22 {ESIGNOTMATCH, "signals don't match"},
\r
23 {EUNEXPECTEDSIG, "unexpected signal caught"},
\r
24 {ESIGNOTRECEIPT, "expected signal not receipt"},
\r
25 {EFILENOTFOUND, "specified tesh file not found"},
\r
26 {EGETCWD, "system error : the getcwd() function failed"},
\r
27 {EDIRNOTFOUND, "specified directory not found"},
\r
28 {ECHDIR, "system error : the chdir() function failed"},
\r
29 {EPROCESSCMDLINE, "internal error : the process_command_line() function failed"},
\r
30 {EARGNOTSPEC, "none optional argument not specified in the command line"},
\r
31 {ENOTPOSITIVENUM, "argument option not strictly positive"},
\r
32 {ESYNTAX, "syntax error"},
\r
33 {EINVALIDTIMEOUT, "timeout value specified by metacommand invalid"},
\r
34 {EINVALIDEXITCODE, "expected exit code value specified by the metacommand invalid"},
\r
35 {ESIGNOTSUPP, "signal specified by the metacommand not supported (Windows specific)"},
\r
36 {ELEADTIME, "lead time"},
\r
37 {EREADMENOTFOUND, "unable to locate the README.txt file"},
\r
38 {EINCLUDENOTFOUND, "include file specified by a metacommand is not found"},
\r
39 {ESUFFIXTOOLONG, "suffix is too long"},
\r
40 {EFILENOTINSPECDIR,"file not found in the specified directories"},
\r
41 {EFILENOTINCURDIR,"file not found in the current directory"},
\r
46 error_to_string(int error)
\r
50 for(i = 0; error >= 0 && err[i].code != -1; i++)
\r
52 if(err[i].code == error)
\r
53 return err[i].string;
\r
56 return "unknow error";
\r