Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.6 KiB

  1. This file gives an overview of the architecture of the JT (Job Test) utility
  2. by describing the main features of the most important files.
  3. main.cxx --------------------------------------------------------------------
  4. after initialization, reads the command line and gives it to
  5. ProcessCommandLine() in parse.cxx.
  6. parse.cxx -------------------------------------------------------------------
  7. Implements the GetToken(), PeekToken(), and ProcessCommandLine() routines.
  8. The latter reads a token and dispatches to the routine in commands.cxx that
  9. implements the command the token represents.
  10. commands.cxx ----------------------------------------------------------------
  11. contains implementation of all the commands in JT.
  12. globals.cxx -----------------------------------------------------------------
  13. contains globals used by multiple modules. The critical globals are:
  14. g_wszLastStringToken
  15. g_wszLastNumberToken
  16. g_ulLastNumberToken
  17. - these are modified by parse.cxx routines GetToken() and PeekToken().
  18. g_pJob
  19. g_pJobQueue
  20. g_pJobScheduler
  21. - these are initialized at startup.
  22. JT acts like notepad.exe, in that when it starts it creates blank job and
  23. queue objects, and all commands operate on those objects. You can fill the
  24. job (or queue) object by loading a .job (or .que) file from disk, or by
  25. putting data into it using commands like /SJ - set job properties, /CTJ -
  26. create trigger on job (/SQ, /STQ).
  27. If you exit JT while the job and queue objects are dirty but "untitled" (i.e.,
  28. no filename has ever been associated with the objects via a load, save, or
  29. activate command) then all changes are lost.
  30. However if a filename has been associated with the dirtied object, it will be
  31. written to disk automatically before JT exits.
  32. g_apEnumJobs
  33. - this array holds the enumerators created and used by the /SCE, /ENN, /ENC,
  34. /ENR, and /ENS commands.
  35. jobprop.cxx -----------------------------------------------------------------
  36. trigprop.cxx
  37. These two modules handle the input (parsing) and output (display) of job and
  38. trigger properties.
  39. atsign.cxx ------------------------------------------------------------------
  40. contains DoAtSign(), called from parse.cxx when an @ is found on the command
  41. line.
  42. DoAtSign() reads input from text file and processes it so that it can
  43. recursively call ProcessCommandLine() for each logical line in the input file.
  44. It creates a single line (in a null terminated string) out of multiple \n
  45. separated lines in its input file by condensing runs of whitespace (including
  46. newlines) into a single space and stripping out comments.
  47. help.cxx -------------------------------------------------------------------
  48. resource.h
  49. jt.rc
  50. The help module translates TOKEN values into RC_* values (defined in
  51. resource.h) and uses them to load and print RCDATA strings from jt.rc.
  52. STRINGTABLEs store strings as UNICODE, whereas RCDATA strings are stored as
  53. ANSI. Since JT will never be localized, there's no need to double the
  54. storage overhead of these strings.
  55. Another limitation of string tables is that each string can only be 255
  56. characters long, and must have its own identifier. RCDATA strings are
  57. unlimited, and one identifier for the entire RCDATA block represents all
  58. strings the block contains.
  59. util.cxx --------------------------------------------------------------------
  60. Miscellaneous utility routines, mostly for input and output of property
  61. values.
  62. log.cxx ---------------------------------------------------------------------
  63. Logging routines that can write to file, console, or debugger. These routines
  64. have remained mostly unchanged since they were originally created for another
  65. project. They've been code reviewed at least twice.