summary refs log tree commit diff stats
path: root/worker
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2020-04-24 11:42:21 +0200
committerDrew DeVault <sir@cmpwn.com>2020-04-24 12:59:21 -0400
commit7f033278eb3afc3b9ae2dca28efe8d4a3514d14a (patch)
treeee02c27cb1dfadd54be0178e91d6f2d5f0cbf4dc /worker
parent447e662057c663f47f5c8a490543b1a52b26bc86 (diff)
downloadaerc-7f033278eb3afc3b9ae2dca28efe8d4a3514d14a.tar.gz
Add postpone command
This command uses the Postpone folder from the account config to save
messages to. Messages are saved as though they were sent so have a valid
'to' recipient address and should be able to be read back in for later
editing.
Diffstat (limited to 'worker')
0 files changed, 0 insertions, 0 deletions
tik/mu/blame/013update_operation.cc?h=main&id=a5ab5b24e71fc93c58cb2d00fbde54d874a6263a'>^
e6692482 ^
f3760b0f ^
82177734 ^
e6692482 ^

795f5244 ^
82177734 ^
e6692482 ^












1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33


                                                                              
                                                
                                                                  


                                                      
                                                                                                               



                                                                                      
                                
                                                   
                                                                                                      

             
                                                    
                                       












                                                                                     
//: Once all code is loaded, save operation ids of instructions and check that
//: nothing's undefined.

:(before "End Instruction Modifying Transforms")
Transform.push_back(update_instruction_operations);  // idempotent

:(code)
void update_instruction_operations(recipe_ordinal r) {
  trace(9991, "transform") << "--- compute instruction operations for recipe " << get(Recipe, r).name << end();
  recipe& caller = get(Recipe, r);
//?   cerr << "--- compute instruction operations for recipe " << caller.name << '\n';
  for (long long int index = 0; index < SIZE(caller.steps); ++index) {
    instruction& inst = caller.steps.at(index);
    if (inst.is_label) continue;
    if (!contains_key(Recipe_ordinal, inst.name)) {
      raise_error << maybe(caller.name) << "instruction " << inst.name << " has no recipe\n" << end();
      return;
    }
    inst.operation = get(Recipe_ordinal, inst.name);
    // End Instruction Operation Checks
  }
}

// hook to suppress inserting recipe name into errors and warnings (for later layers)
string maybe(string s) {
  return s + ": ";
}

// temporarily suppress run
void transform(string form) {
  load(form);
  transform_all();
}