about summary refs log tree commit diff stats
path: root/main.c
Commit message (Collapse)AuthorAgeFilesLines
* applied Sanders max_and_focus.patchAnselm R. Garbe2006-09-041-0/+1
|
* trying a different configurationAnselm R. Garbe2006-08-251-3/+3
|
* fixed typoAnselm R. Garbe2006-08-251-1/+1
|
* removed a bunch of lines, made mode symbols configurableAnselm R. Garbe2006-08-251-1/+1
|
* new color stuff/new rendering stuffAnselm R. Garbe2006-08-251-5/+9
|
* back to 3 colorsAnselm R. Garbe2006-08-251-4/+3
|
* 3->4 colorsAnselm R. Garbe2006-08-241-3/+4
|
* changing tag indicator through underlineAnselm R. Garbe2006-08-241-0/+1
|
* removed a blank lineAnselm R. Garbe2006-08-231-1/+0
|
* separated setup stuff into main.c:setup() - this makes main() more readableAnselm R. Garbe2006-08-231-86/+95
|
* rearranged getprotoAnselm R. Garbe2006-08-221-6/+5
|
* removed winprop (merged into getproto)Anselm R. Garbe2006-08-221-27/+7
|
* removed DEFTAGAnselm R. Garbe2006-08-221-1/+1
|
* small renamings of two static functionsAnselm R.Garbe2006-08-211-2/+2
|
* small changes to dwm.1, rearranged order within main event loopAnselm R.Garbe2006-08-211-4/+4
|
* corrected order of cleanup code Anselm R.Garbe2006-08-161-1/+1
|
* we close stdin as wellAnselm R.Garbe2006-08-161-3/+4
|
* extended cleanupAnselm R.Garbe2006-08-151-0/+7
|
* applied jk_to_tab patchAnselm R.Garbe2006-08-151-2/+1
|
* changed main event loopAnselm R.Garbe2006-08-151-10/+7
|
* removed NUMLOCKMASK, added dynamically calculated numlockmask insteadAnselm R.Garbe2006-08-141-7/+19
|
* changed order of selecting input at root windowAnselm R.Garbe2006-08-141-4/+4
|
* removed unneecessary crapAnselm R.Garbe2006-08-141-1/+0
|
* some other small fixesAnselm R.Garbe2006-08-141-8/+8
|
* removed ungrabkeys again (because of sander's mail)Anselm R.Garbe2006-08-141-1/+0
|
* implemented ungrabkeys() which is called in cleanup()Anselm R.Garbe2006-08-141-0/+1
|
* supplying NULL args in selectAnselm R.Garbe2006-08-141-1/+1
|
* reducing ConnectionNumber calls to a bare minimumAnselm R.Garbe2006-08-141-4/+5
|
* implemented viewextend and added M-S-C-n shortcuts for extending the current ↵Anselm R.Garbe2006-08-111-3/+3
| | | | view... updated man page (works great!) nice feature
* implement multi-tag selection through button3 click on the specific tagAnselm R.Garbe2006-08-111-1/+3
|
* prepared 0.8 0.8Anselm R.Garbe2006-08-101-0/+1
|
* readded border color, this sucks leastAnselm R.Garbe2006-08-101-0/+1
|
* removed unnecessary border colorAnselm R.Garbe2006-08-101-1/+0
|
* removed NET_ACTIVE_WINDOW handlingAnselm R.Garbe2006-08-081-1/+0
|
* implemented NET_ACTIVE_WINDOW supportAnselm R.Garbe2006-08-081-0/+1
|
* applied Sanders tiny patchesAnselm R.Garbe2006-08-081-1/+2
|
* small fix of a commentarg@10ksloc.org2006-08-071-1/+1
|
* changed getproto, maybe that might fix the killclient issue reported on the listarg@10ksloc.org2006-08-071-2/+3
|
* slight fixarg@10ksloc.org2006-08-051-3/+2
|
* switched to regexp matching for Rulesarg@10ksloc.org2006-08-041-0/+1
|
* removed TLast tag enum, now tags is simple defined as char *[] array, the ↵arg@10ksloc.org2006-08-031-0/+3
| | | | rest is calculated correctly, rules take an int array for the tags
* made fullscreen apps working fine in floating mode (there is no sane way to ↵arg@10ksloc.org2006-08-021-7/+8
| | | | make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
* dwm is now exit, if stdin is closed due broken pipearg@10ksloc.org2006-08-021-8/+5
|
* renamed WM_PROTOCOL_DELWIN into PROTODELWINarg@10ksloc.org2006-08-011-1/+1
|
* centralized/externalized configuration to config.harg@10ksloc.org2006-08-011-3/+1
|
* some cleanups/fixes inspired by Jukka Salmi's feedbackarg@10ksloc.org2006-07-211-1/+2
|
* simplified main.c, switching back to single urxvt usagearg@10ksloc.org2006-07-211-27/+13
|
* added yet another CUTOMIZE tagarg@10ksloc.org2006-07-201-0/+2
|
* cleaned up codearg@10ksloc.org2006-07-201-27/+16
|
* applied Sanders resize patch, fixed lower bugarg@10ksloc.org2006-07-191-1/+1
|
tik/mu/blame/024jump.cc?h=main&id=d9025124a102fb7b421699e4e0463a3c62b261cb'>^
1066660e ^
201b2e6c ^

88be3dbc ^
201b2e6c ^
bc643692 ^

201b2e6c ^
bc643692 ^
201b2e6c ^
bc643692 ^
d7494165 ^
201b2e6c ^
88be3dbc ^
201b2e6c ^
bc643692 ^

201b2e6c ^
bc643692 ^
201b2e6c ^
bc643692 ^
57699011 ^
201b2e6c ^
1848b18f ^

201b2e6c ^
795f5244 ^
d855b0a0 ^
201b2e6c ^
d855b0a0 ^
795f5244 ^
e4630643 ^

d855b0a0 ^
795f5244 ^
e4630643 ^

d855b0a0 ^
795f5244 ^
e4630643 ^

d855b0a0 ^



dc1323e9 ^
0487a30e ^
cdd6fd09 ^
201b2e6c ^

1066660e ^
cdd6fd09 ^
1066660e ^
201b2e6c ^

88be3dbc ^
201b2e6c ^
bc643692 ^

201b2e6c ^
bc643692 ^
201b2e6c ^
bc643692 ^
d7494165 ^
201b2e6c ^
88be3dbc ^
201b2e6c ^
bc643692 ^

201b2e6c ^
bc643692 ^
201b2e6c ^
bc643692 ^
57699011 ^
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
                   
 


                                      
                    
 
                   
                        

                             
                                             
     
                                        
                                  
                                       
            
                                    
                                                                                                                                         

          
                                              
                                                                                                                                                                               

          



                                                
                                                              
                                                    
                                                                                   
                                             

 

                                          
                               
 
                         
             
                       
                               


                               


                    
 

                                             
                                        
                                        
                                       
               
                                    
                                                                                                                                             

          
                                              
                                                                                                                                                                              

          
                                              
                                                                                                                                                                                       

          



                                                
                                                              
                                 
                                                          

          
                                                    
                                                                                   
                                             

 
                   
             

                       
 
                           
                              
                        
                               
 
                               
             

                      
 
                         
                          
                          
                               
 

                                             
                                        
                                                
                                       
                   
                                    
                                                                                                                                                 

          
                                              
                                                                                                                                                                                  

          
                                              
                                                                                                                                                                                           

          



                                                
                                                              
                                
                                                              

          
                                                    
                                                                                   
                                             

 
                       
             

                         
 
                             
                              
                          
                               
 
                                   
             

                           
 
                               
                              
                          
                               
//: Jump primitives

:(scenario jump_can_skip_instructions)
recipe main [
  jump 1:offset
  1:number <- copy 1
]
+run: jump 1:offset
-run: 1:number <- copy 1
-mem: storing 1 in location 1

:(before "End Primitive Recipe Declarations")
JUMP,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "jump", JUMP);
:(before "End Primitive Recipe Checks")
case JUMP: {
  if (SIZE(inst.ingredients) != 1) {
    raise_error << maybe(get(Recipe, r).name) << "'jump' requires exactly one ingredient, but got " << inst.to_string() << '\n' << end();
    break;
  }
  if (!is_mu_scalar(inst.ingredients.at(0))) {
    raise_error << maybe(get(Recipe, r).name) << "first ingredient of 'jump' should be a label or offset, but got " << inst.ingredients.at(0).original_string << '\n' << end();
    break;
  }
  break;
}
:(before "End Primitive Recipe Implementations")
case JUMP: {
  assert(current_instruction().ingredients.at(0).initialized);
  current_step_index() += ingredients.at(0).at(0)+1;
  trace(9998, "run") << "jumping to instruction " << current_step_index() << end();
  continue;  // skip rest of this instruction
}

//: special type to designate jump targets
:(before "End Mu Types Initialization")
put(Type_ordinal, "offset", 0);

:(scenario jump_backward)
recipe main [
  jump 1:offset  # 0 -+
  jump 3:offset  #    |   +-+ 1
                 #   \/  /\ |
  jump -2:offset #  2 +-->+ |
]                #         \/ 3
+run: jump 1:offset
+run: jump -2:offset
+run: jump 3:offset

:(before "End Primitive Recipe Declarations")
JUMP_IF,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "jump-if", JUMP_IF);
:(before "End Primitive Recipe Checks")
case JUMP_IF: {
  if (SIZE(inst.ingredients) != 2) {
    raise_error << maybe(get(Recipe, r).name) << "'jump-if' requires exactly two ingredients, but got " << inst.to_string() << '\n' << end();
    break;
  }
  if (!is_mu_scalar(inst.ingredients.at(0))) {
    raise_error << maybe(get(Recipe, r).name) << "'jump-if' requires a boolean for its first ingredient, but got " << inst.ingredients.at(0).original_string << '\n' << end();
    break;
  }
  if (!is_mu_scalar(inst.ingredients.at(1))) {
    raise_error << maybe(get(Recipe, r).name) << "'jump-if' requires a label or offset for its second ingredient, but got " << inst.ingredients.at(0).original_string << '\n' << end();
    break;
  }
  break;
}
:(before "End Primitive Recipe Implementations")
case JUMP_IF: {
  assert(current_instruction().ingredients.at(1).initialized);
  if (!ingredients.at(0).at(0)) {
    trace(9998, "run") << "jump-if fell through" << end();
    break;
  }
  current_step_index() += ingredients.at(1).at(0)+1;
  trace(9998, "run") << "jumping to instruction " << current_step_index() << end();
  continue;  // skip rest of this instruction
}

:(scenario jump_if)
recipe main [
  jump-if 999, 1:offset
  123:number <- copy 1
]
+run: jump-if 999, 1:offset
+run: jumping to instruction 2
-run: 1:number <- copy 1
-mem: storing 1 in location 123

:(scenario jump_if_fallthrough)
recipe main [
  jump-if 0, 1:offset
  123:number <- copy 1
]
+run: jump-if 0, 1:offset
+run: jump-if fell through
+run: 123:number <- copy 1
+mem: storing 1 in location 123

:(before "End Primitive Recipe Declarations")
JUMP_UNLESS,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "jump-unless", JUMP_UNLESS);
:(before "End Primitive Recipe Checks")
case JUMP_UNLESS: {
  if (SIZE(inst.ingredients) != 2) {
    raise_error << maybe(get(Recipe, r).name) << "'jump-unless' requires exactly two ingredients, but got " << inst.to_string() << '\n' << end();
    break;
  }
  if (!is_mu_scalar(inst.ingredients.at(0))) {
    raise_error << maybe(get(Recipe, r).name) << "'jump-unless' requires a boolean for its first ingredient, but got " << inst.ingredients.at(0).original_string << '\n' << end();
    break;
  }
  if (!is_mu_scalar(inst.ingredients.at(1))) {
    raise_error << maybe(get(Recipe, r).name) << "'jump-unless' requires a label or offset for its second ingredient, but got " << inst.ingredients.at(0).original_string << '\n' << end();
    break;
  }
  break;
}
:(before "End Primitive Recipe Implementations")
case JUMP_UNLESS: {
  assert(current_instruction().ingredients.at(1).initialized);
  if (ingredients.at(0).at(0)) {
    trace(9998, "run") << "jump-unless fell through" << end();
    break;
  }
  current_step_index() += ingredients.at(1).at(0)+1;
  trace(9998, "run") << "jumping to instruction " << current_step_index() << end();
  continue;  // skip rest of this instruction
}

:(scenario jump_unless)
recipe main [
  jump-unless 0, 1:offset
  123:number <- copy 1
]
+run: jump-unless 0, 1:offset
+run: jumping to instruction 2
-run: 123:number <- copy 1
-mem: storing 1 in location 123

:(scenario jump_unless_fallthrough)
recipe main [
  jump-unless 999, 1:offset
  123:number <- copy 1
]
+run: jump-unless 999, 1:offset
+run: jump-unless fell through
+run: 123:number <- copy 1
+mem: storing 1 in location 123