Skip to content

Commit f759d86

Browse files
committed
More feedback added.
1 parent 72c1b2c commit f759d86

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

docs/class-assignments/extra-feedback.txt

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@ Additional notes on the lab assignment based on existing implementations.
22

33
Last updated: Dec 31, 2018.
44

5+
--------------------------------------------------------------------------------
6+
We really require you to use a consistent C style.
7+
8+
For example, the following two lines do not use consistent C style as one line
9+
uses extra spaces with parentheses and the other does not, and also there is a
10+
differentce with whitespace around '{':
11+
12+
if (WIFEXITED( wstatus )){
13+
14+
if (pipe(pd) == -1) {
15+
516
--------------------------------------------------------------------------------
617
Refuse special characters that you do not implement yet. For example, if you do
718
not implement pipes (as in the 1st phase), refuse it. It cannot work like this:
@@ -17,11 +28,24 @@ If you did accept '|' as a normal character, it should have worked like this:
1728
$ echo hello | wc -l
1829
hello | wc -l
1930

20-
However, please do something like this:
31+
And in case of date(1), it should have printed out an error, similar to this:
32+
33+
$ date xxx
34+
date: illegal time format
35+
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
36+
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
37+
38+
So, do something like the following:
2139

2240
$ echo hello | wc -l
2341
(default rule matched) error:1: syntax error near unexpected token '|'
2442

43+
Also, refure redirections unless you already implemented those. The following
44+
is not correct in the 1st phase:
45+
46+
$ echo hello > out
47+
hello
48+
2549
--------------------------------------------------------------------------------
2650
Please do implement command line history. In case of readline, it's really just
2751
calling one function, like this, for example:

0 commit comments

Comments
 (0)