circ scripts
[Evergreen.git] / Evergreen / circ_rules / circ_main.rules
1 [%
2
3
4         # ------------------------------------------------------------------
5         # Macros for simpler syntax
6         # ------------------------------------------------------------------
7         MACRO jump(n)           PROCESS "$n";
8         MACRO policy(p) PROCESS policy_block val=p;
9         BLOCK policy_block; val; STOP; END; 
10
11         MACRO ret(status,text) PROCESS ret_block s=status t=text;
12
13         BLOCK ret_block;
14                 result.0 = s;
15                 result.1 = t;
16                 "Circ Template Result: "; result.0; " "; result.1; 
17                 STOP;
18         END;
19
20
21
22         # ------------------------------------------------------------------
23         # These are passed in to every script
24         # ------------------------------------------------------------------
25         #       Objects         : Methods  
26         # -------------------
27         #       patron          :
28         #       copy                    : 
29         #       circlib         : 
30         #       standings       : 
31         #       title                   :
32         # ------------------------------------------------------------------
33
34         # ------------------------------------------------------------------
35         # Constants
36         # ------------------------------------------------------------------
37         OK                                                      = 0;
38         COPY_ISREF                              = 2;
39         COPY_NOCIRC                             = 3;
40         COPY_UNAVAIL                    = 4;
41         COPY_LOCATION                   = 5;
42
43         PATRON_STANDING         = 10;
44         PATRON_FINE                             = 11;
45         PATRON_CHARGE_COUNT     = 12;
46
47
48
49         # ------------------------------------------------------------------
50         # Run the rules files
51         # ------------------------------------------------------------------
52         PROCESS "$run_block"
53                 patron                  = circ_objects.patron 
54                 copy                            = circ_objects.copy
55                 circlib                 = circ_objects.copy.circlib() 
56                 title                           = circ_objects.title
57                 standings               = circ_objects.standings;
58
59
60 %]
61
62