diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-08-28 15:21:12 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-08-28 15:21:12 -0700 |
commit | 1ba81b0f57f965f390e09f40c5f70eb9931c7498 (patch) | |
tree | 1d9a10935897804d4c96a6de10baa1a475fb7463 /000organization.cc | |
parent | fd6d8612edf07ea4a4612fd5263ad4250e06c77f (diff) | |
download | mu-1ba81b0f57f965f390e09f40c5f70eb9931c7498.tar.gz |
3270
Clean up the Globals section so that we can generate extern declarations for all globals out using this command after we carve it out into globals.cc: grep ';' globals.cc |perl -pwe 's/[=(].*/;/' |perl -pwe 's/^[^\/# ]/extern $&/' > globals.h The first perl command strips out initializers. The second prepends 'extern'. This simplistic approach requires each global definition to lie all on one line.
Diffstat (limited to '000organization.cc')
-rw-r--r-- | 000organization.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/000organization.cc b/000organization.cc index cd02d58d..dccbee8e 100644 --- a/000organization.cc +++ b/000organization.cc @@ -98,6 +98,11 @@ #include "function_list" // by convention, files ending with '_list' are auto-generated // Globals +// +// (Code in this section should strictly consist only of single-line variable +// definitions; the makefile will simplistically auto-generate extern +// declarations for them.) +// // End Globals int main(int argc, char* argv[]) { |