User Tools

Site Tools


haas:fall2017:discrete:projects:bdt0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:fall2017:discrete:projects:bdt0 [2017/09/25 09:53] – [Submission] wedgehaas:fall2017:discrete:projects:bdt0 [2017/10/03 14:25] (current) – [Experiencing xxd] wedge
Line 100: Line 100:
       * error message should be of the form: **Error: Terminal height is less than 20 lines!**       * error message should be of the form: **Error: Terminal height is less than 20 lines!**
       * Unlike the width, the height can impact program output (taller terminals, if not otherwise throttled by a second command-line argument, can auto-expand if there is more room and data to display).       * Unlike the width, the height can impact program output (taller terminals, if not otherwise throttled by a second command-line argument, can auto-expand if there is more room and data to display).
-  * 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, display the entire file.
   * Each row will display:   * Each row will display:
     * a 7-digit hex offset (referring to the first data byte on a given line)     * a 7-digit hex offset (referring to the first data byte on a given line)
Line 112: Line 112:
   * The hex values and rendered ASCII displayed will be sourced from the file specified on the command-line. While the target files for this project are less than 512 bytes, your program should be able to handle larger and smaller files, and update its display accordingly.   * The hex values and rendered ASCII displayed will be sourced from the file specified on the command-line. While the target files for this project are less than 512 bytes, your program should be able to handle larger and smaller files, and update its display accordingly.
   * If a line throttle is given, your program is to stop output of data and ASCII rendering at that line, once it completes.   * If a line throttle is given, your program is to stop output of data and ASCII rendering at that line, once it completes.
-  * Once the data in the file has been exhausted, you need to wrap up as appropriate; finish the current line (even if you have to pad spaces), display the corresponding ascii field (padding spaces as appropriate), and display the closing footer.+  * Once the data in the file has been exhausted, you need to wrap up as appropriate; finish the current line (even if you have to pad spaces), display the corresponding ascii field (padding spaces as appropriate).
   * Don't forget to **fclose()** any open file pointers! And **free()** any **malloc()**'ed or **calloc()**'ed memory.   * Don't forget to **fclose()** any open file pointers! And **free()** any **malloc()**'ed or **calloc()**'ed memory.
   * If provided (via command-line arguments), highlight the offset field and the specified address + length (see below).   * If provided (via command-line arguments), highlight the offset field and the specified address + length (see below).
Line 204: Line 204:
 While there are 8 available foreground colors, bolding can double that range to 16. While there are 8 available foreground colors, bolding can double that range to 16.
  
-=====Implementation Restrictions=====+=====Verification===== 
 +I'm working on an **eval** script that should aid you in verifying how compliant your implementation is against project specifications.
  
 +====make check====
 +I've tied in the running of the verification script into the Makefile. To utilize it, all you have to do is type "**make check**" and follow any on-screen prompts.
 +
 +It may stop to prompt you after completing each category of tests so that you can better analyze the results (or hit CTRL-c to exit out of the script and address any issues).
 +
 +For example, let's say there's a problem with the first file:
 +
 +<cli>
 +lab46:~/src/discrete/bdt0$ make check
 +===================================
 += discrete/bdt0 Evaluation Script =
 +===================================
 +[Part 0]: Compliance with xxd output ...
 +
 +----[   audio.mp3 ]---------------------------------------------------
 + xxd:   17152 char,   256 lines, md5: 57bd8a3badfef2a39cd7bccd7f86c03d
 +bdt0:   17194 char,   257 lines, md5: 63376e4205135c2d0e520884a6e861ff
 +----------------------------------------------------------------------
 + CHK:     MISMATCH     MISMATCH     MISMATCH     
 +----------------------------------------------------------------------
 +
 +----[        data ]---------------------------------------------------
 + xxd:    1269 char,    19 lines, md5: 1a9bab04b8ebdb523c1d3e722845a6c5
 +bdt0:    1269 char,    19 lines, md5: 1a9bab04b8ebdb523c1d3e722845a6c5
 +----------------------------------------------------------------------
 + CHK:           OK           OK           OK     
 +----------------------------------------------------------------------
 +
 +----[   s13.p.rle ]---------------------------------------------------
 + xxd:    6564 char,    98 lines, md5: 24895128bce7a041f553226c7981c0d4
 +bdt0:    6564 char,    98 lines, md5: 24895128bce7a041f553226c7981c0d4
 +----------------------------------------------------------------------
 + CHK:           OK           OK           OK     
 +----------------------------------------------------------------------
 +
 +----[ sample0.txt ]---------------------------------------------------
 + xxd:     661 char,    10 lines, md5: 4e01dda9d62c98781664f9fed8d494ff
 +bdt0:     661 char,    10 lines, md5: 4e01dda9d62c98781664f9fed8d494ff
 +----------------------------------------------------------------------
 + CHK:           OK           OK           OK     
 +----------------------------------------------------------------------
 +Tally: 9/12 | Press ENTER to continue
 +lab46:~/src/discrete/bdt0$ 
 +</cli>
 +
 +With the individual char and line counts, we can get some impression of things being off in more significant ways (and of course the MD5sums will not match).
 +
 +You can then run things manually to see the end results.
 +
 +=====Implementation Restrictions=====
 As our goal is not only to explore the more subtle concepts of computing but to promote different methods of thinking (and arriving at solutions seemingly in different ways), one of the themes I have been harping on is the stricter adherence to the structured programming philosophy. It isn't just good enough to be able to crank out a solution if you remain blind to the many nuances of the tools we are using, so we will at times be going out of our way to emphasize focus on certain areas that may see less exposure (or avoidance due to it being less familiar). As our goal is not only to explore the more subtle concepts of computing but to promote different methods of thinking (and arriving at solutions seemingly in different ways), one of the themes I have been harping on is the stricter adherence to the structured programming philosophy. It isn't just good enough to be able to crank out a solution if you remain blind to the many nuances of the tools we are using, so we will at times be going out of our way to emphasize focus on certain areas that may see less exposure (or avoidance due to it being less familiar).
  
haas/fall2017/discrete/projects/bdt0.1506333183.txt.gz · Last modified: 2017/09/25 09:53 by wedge