User Tools

Site Tools


haas:fall2020:cprog:projects:cbf0

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:fall2020:cprog:projects:cbf0 [2020/09/28 18:37] wedgehaas:fall2020:cprog:projects:cbf0 [2020/09/29 15:02] (current) – [Experiencing xxd] wedge
Line 183: Line 183:
  
 <cli> <cli>
 +system:~/src/desig/cbf0$ ./cbf0 in/sample0.txt
 00000000: 3e 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f  >ABCDEFGHIJKLMNO 00000000: 3e 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f  >ABCDEFGHIJKLMNO
 00000010: 50 51 52 53 54 55 56 57 58 59 5a 3c 0a 5b 61 62  PQRSTUVWXYZ<.[ab 00000010: 50 51 52 53 54 55 56 57 58 59 5a 3c 0a 5b 61 62  PQRSTUVWXYZ<.[ab
Line 194: Line 195:
 00000090: 45 46 3a 48 45 58 41 44 45 43 49 4d 41 4c 0a 29  EF:HEXADECIMAL.) 00000090: 45 46 3a 48 45 58 41 44 45 43 49 4d 41 4c 0a 29  EF:HEXADECIMAL.)
 000000a0: 21 40 23 24 25 5e 26 2a 28 0a 2e 0a              !@#$%^&*(... 000000a0: 21 40 23 24 25 5e 26 2a 28 0a 2e 0a              !@#$%^&*(...
 +</cli>
 +
 +Or, if using a line throttle:
 +
 +<cli>
 +system:~/src/desig/cbf0$ ./cbf0 in/sample0.txt 4
 +00000000: 3e 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f  >ABCDEFGHIJKLMNO
 +00000010: 50 51 52 53 54 55 56 57 58 59 5a 3c 0a 5b 61 62  PQRSTUVWXYZ<.[ab
 +00000020: 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72  cdefghijklmnopqr
 +00000030: 73 74 75 76 77 78 79 7a 5d 0a 30 31 3a 20 20 20  stuvwxyz].01:   
 </cli> </cli>
 =====Detecting Terminal Size===== =====Detecting Terminal Size=====
Line 221: Line 232:
  
 Compile and run the above code to see how it works. Try it in different size terminals. Then incorporate the logic into your hex viewer for this project. Compile and run the above code to see how it works. Try it in different size terminals. Then incorporate the logic into your hex viewer for this project.
 +
 +=====Command-Line Arguments=====
  
 ====setting up main()==== ====setting up main()====
haas/fall2020/cprog/projects/cbf0.1601318273.txt.gz · Last modified: 2020/09/28 18:37 by wedge