This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
haas:fall2018:cprog:projects:cbf0 [2017/10/15 20:49] – external edit 127.0.0.1 | haas:fall2018:cprog:projects:cbf0 [2018/09/17 13:26] (current) – [Experiencing xxd] wedge | ||
---|---|---|---|
Line 126: | Line 126: | ||
<cli> | <cli> | ||
lab46: | lab46: | ||
- | 0000000: 3e41 4243 4445 4647 4849 4a4b 4c4d 4e4f > | + | 00000000: 3e41 4243 4445 4647 4849 4a4b 4c4d 4e4f > |
- | 0000010: 5051 5253 5455 5657 5859 5a3c 0a5b 6162 PQRSTUVWXYZ< | + | 00000010: 5051 5253 5455 5657 5859 5a3c 0a5b 6162 PQRSTUVWXYZ< |
- | 0000020: 6364 6566 6768 696a 6b6c 6d6e 6f70 7172 cdefghijklmnopqr | + | 00000030: 7374 7576 7778 797a 5d0a 3031 3a09 0920 stuvwxyz].01: |
- | 0000030: 7374 7576 7778 797a 5d0a 3031 3a09 0920 stuvwxyz].01: | + | 00000040: 4249 4e41 5259 0a30 3132 3334 3536 373a BINARY.01234567: |
- | 0000040: 4249 4e41 5259 0a30 3132 3334 3536 373a BINARY.01234567: | + | 00000050: 0920 4f43 5441 4c0a 3031 3233 3435 3637 . OCTAL.01234567 |
- | 0000050: 0920 4f43 5441 4c0a 3031 3233 3435 3637 . OCTAL.01234567 | + | 00000060: 3839 3a09 2044 4543 494d 414c 0a30 3132 89:. DECIMAL.012 |
- | 0000060: 3839 3a09 2044 4543 494d 414c 0a30 3132 89:. DECIMAL.012 | + | 00000070: 3334 3536 3738 3941 4243 4445 463a 4845 3456789ABCDEF: |
- | 0000070: 3334 3536 3738 3941 4243 4445 463a 4845 3456789ABCDEF: | + | 00000080: 5841 4445 4349 4d41 4c0a 2921 4023 2425 XADECIMAL.)!@# |
- | 0000080: 5841 4445 4349 4d41 4c0a 2921 4023 2425 XADECIMAL.)!@# | + | 00000090: 5e26 2a28 0a2e 0a ^&*(... |
- | 0000090: 5e26 2a28 0a2e 0a ^&*(... | + | |
lab46: | lab46: | ||
</ | </ | ||
Line 166: | Line 165: | ||
* The second command-line argument is a sizing throttle (controlling the number of lines your program will display). If no argument, or a **0** is given, assume autosize (use the detected height to be your maximum in your calculations). | * The second command-line argument is a sizing throttle (controlling the number of lines your program will display). If no argument, or a **0** is given, assume autosize (use the detected height to be your maximum in your calculations). | ||
* Each row will display: | * Each row will display: | ||
- | * a 7-digit hex offset (referring to the first data byte on a given line) | + | * an 8-digit hex offset (referring to the first data byte on a given line) |
* followed by a colon and a single space | * followed by a colon and a single space | ||
* differently from **xxd(1)**: sixteen space separated groups of bytes | * differently from **xxd(1)**: sixteen space separated groups of bytes | ||
Line 182: | Line 181: | ||
<cli> | <cli> | ||
- | 0000000: 3e 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f > | + | 00000000: 3e 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f > |
- | 0000010: 50 51 52 53 54 55 56 57 58 59 5a 3c 0a 5b 61 62 PQRSTUVWXYZ< | + | 00000010: 50 51 52 53 54 55 56 57 58 59 5a 3c 0a 5b 61 62 PQRSTUVWXYZ< |
- | 0000020: 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 cdefghijklmnopqr | + | 00000020: 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 cdefghijklmnopqr |
- | 0000030: 73 74 75 76 77 78 79 7a 5d 0a 30 31 3a 09 09 20 stuvwxyz].01: | + | 00000030: 73 74 75 76 77 78 79 7a 5d 0a 30 31 3a 09 09 20 stuvwxyz].01: |
- | 0000040: 42 49 4e 41 52 59 0a 30 31 32 33 34 35 36 37 3a BINARY.01234567: | + | 00000040: 42 49 4e 41 52 59 0a 30 31 32 33 34 35 36 37 3a BINARY.01234567: |
- | 0000050: 09 20 4f 43 54 41 4c 0a 30 31 32 33 34 35 36 37 . OCTAL.01234567 | + | 00000050: 09 20 4f 43 54 41 4c 0a 30 31 32 33 34 35 36 37 . OCTAL.01234567 |
- | 0000060: 38 39 3a 09 20 44 45 43 49 4d 41 4c 0a 30 31 32 89:. DECIMAL.012 | + | 00000060: 38 39 3a 09 20 44 45 43 49 4d 41 4c 0a 30 31 32 89:. DECIMAL.012 |
- | 0000070: 33 34 35 36 37 38 39 41 42 43 44 45 46 3a 48 45 3456789ABCDEF: | + | 00000070: 33 34 35 36 37 38 39 41 42 43 44 45 46 3a 48 45 3456789ABCDEF: |
- | 0000080: 58 41 44 45 43 49 4d 41 4c 0a 29 21 40 23 24 25 XADECIMAL.)!@# | + | 00000080: 58 41 44 45 43 49 4d 41 4c 0a 29 21 40 23 24 25 XADECIMAL.)!@# |
- | 0000090: 5e 26 2a 28 0a 2e 0a | + | 00000090: 5e 26 2a 28 0a 2e 0a |
</ | </ | ||
=====Detecting Terminal Size===== | =====Detecting Terminal Size===== | ||
Line 224: | Line 223: | ||
* Code must compile cleanly (no warnings or errors) | * Code must compile cleanly (no warnings or errors) | ||
- | * Use the **-Wall** and **--std=c99** flags when compiling. | + | * Use the **-Wall** and **--std=gnu99** flags when compiling. |
* Code must be nicely and consistently indented (you may use the **indent** tool) | * Code must be nicely and consistently indented (you may use the **indent** tool) | ||
* Code must utilize the algorithm/ | * Code must utilize the algorithm/ |