ECE 2524 - Interface Patterns Summary

ECE 2524

Introduction to Unix for Engineers

Interface Patterns Summary

Self Study

  1. Does our wordfreq program follow the Polyvalent-Program Pattern?

  2. Has our wordfreq program followed the “Silence is Golden” rule? Why or why not?

  3. Identify the functions defined in main.c of the bc source. At a high level, what does each one do?

  4. At what line of bc’s main.c do each of the following modules start:

    • command line option parsing
    • the read/parse/execute interpreter loop (the loop itself is actually hidden away in a function, what is the name of this top-level function called in main()?)
  5. Where in the source of bc is the check to determine interactive mode vs. non-interactive mode? What function is used? Read the man page for this function.