Commits

Jason McKesson  committed 92d1a7f

Getting started on copy.
Wrote the algorithm.

  • Participants
  • Parent commits 65d94e5

Comments (0)

Files changed (2)

File CopyFromDump.lua

+local lfs = require "lfs"
+
+--[[
+Copy algorithm.
+
+* For each *.lua file in the basic_dump directory:
+** `dofile` the file.
+** Check to see if there is a corresponding file in the `function_enums` directory.
+*** if not:
+**** Write the loaded table, using stable ordering.
+**** Use hg add to add it to Mercurial.
+*** If there is a file there:
+**** `dofile` the destination file.
+**** For each function in the source:
+***** Check for a corresponding function.
+****** If one doesn't exist, copy the function entirely
+****** If one does exist, for each parameter in the source
+******* Check for a corresponding one in the destination function.
+******** If one doesn't exist, add it, with the parameter's table.
+******** If it does exist, do nothing.
+******* Given a corresponding function, for each parameter in the *destination*
+******** If no corresponding parameter exists in the source, delete it from the destion. Add it to the list of deleted entries.
+]]
+
+

File function_enums/info.txt

 
 When the .spec files are updated, re-generate the basic_dump by executing "lua MakeDirectDump.lua" from the glLoadGen directory (obviously download and copy glLoadGen to that directory).
 
-Then go to this directory and execute the "lua CopyFromDump.lua" script. This will copy any new definitions here, as well as delete any ones that are not still part of the .spec files. It will specify on the command-line any parameters that are to be deleted.
+Then go to the root directory and execute the "lua CopyFromDump.lua" script. This will copy any new definitions here, as well as delete any ones that are not still part of the .spec files. It will specify on the command-line any parameters that are to be deleted.
 
 You can use Mercurial to diff the modified file to see exactly what was deleted in the transfer, so that you can re-instate it.