about summary refs log tree commit diff stats
path: root/cpp/.traces/divide_literal
blob: 81ed75305b7a37f11027056b99130a5d9b2eb17a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
parse/0: instruction: divide
parse/0:   ingredient: {name: "8", value: 0, type: 0, properties: ["8": "literal"]}
parse/0:   ingredient: {name: "2", value: 0, type: 0, properties: ["2": "literal"]}
parse/0:   product: {name: "1", value: 0, type: 1, properties: ["1": "integer"]}
after-brace/0: recipe main
after-brace/0: divide ...
new/0: routine allocated memory from 1000 to 101000
schedule/0: main
run/0: instruction main/0
run/0: {name: "1", value: 1, type: 1, properties: ["1": "integer"]} <- divide/5 {name: "8", value: 8, type: 0, properties: ["8": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]}
run/0: ingredient 0 is 8
run/0: ingredient 1 is 2
run/0: ingredient 1 is 2
run/0: product 0 is 4
mem/0: storing 4 in location 1
it.com> 2009-11-29 18:58:13 +0100 implemented colorschemes.' href='/akspecs/ranger/commit/ranger/gui/colorscheme.py?id=f027adc08ce0d15717c7694956f23ff637553543'>f027adc0 ^
9dc6fe07 ^
f027adc0 ^

9dc6fe07 ^
9dc6fe07 ^
9dc6fe07 ^

f027adc0 ^
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
                                  



                                                                          
 

                           
 


                               
 


                                               
 

                                                      
 

                                                                     
 


                                                 
 


                                                      
 

                                                                  
 
 

                                
 
CONTEXT_KEYS = [ 'reset', 'error',
		'in_display', 'in_statusbar', 'in_titlebar', 'in_console',
		'directory', 'file', 'hostname',
		'executable', 'media', 'link',
		'broken', 'selected', 'empty', 'maindisplay']

class ColorSchemeContext():
	pass

class ColorScheme():
	def __init__(self):
		self.cache = {}

	def get(self, *keys):
		try:
			return self.cache[keys]

		except KeyError:
			context = ColorSchemeContext()

			for key in CONTEXT_KEYS:
				context.__dict__[key] = (key in keys)

			color = self.use(context)
			self.cache[keys] = color
			return color

	def get_attr(self, *keys):
		from ranger.gui.color import get_color
		import curses

		fg, bg, attr = self.get(*keys)
		return attr | curses.color_pair(get_color(fg, bg))


	def use(self, context):
		return -1, -1, 0