• Home
  • Raw
  • Download

Lines Matching full:print

48             print('   %s (GLAPIENTRYP %s)(%s); /* %d */' % (
52 print('#ifndef GLAPIENTRYP')
53 print('# ifndef GLAPIENTRY')
54 print('# define GLAPIENTRY')
55 print('# endif')
56 print('')
57 print('# define GLAPIENTRYP GLAPIENTRY *')
58 print('#endif')
59 print('')
60 print('')
61 print('#ifdef __cplusplus')
62 print('extern "C" {')
63 print('#endif')
64 print('')
65 print('#ifdef MemoryBarrier')
66 print('#undef MemoryBarrier')
67 print('#endif')
68 print('')
69 print('struct _glapi_table')
70 print('{')
74 print('};')
75 print('')
76 print('#ifdef __cplusplus')
77 print('}')
78 print('#endif')
94 print("""
108 print('#include "main/glheader.h"')
113 print('#define CALL_by_offset(disp, cast, offset, parameters) \\')
114 print(' (*(cast (GET_by_offset(disp, offset)))) parameters')
115 print('#define GET_by_offset(disp, offset) \\')
116 print(' (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL')
117 print('#define SET_by_offset(disp, offset, fn) \\')
118 print(' do { \\')
119 print(' if ( (offset) < 0 ) { \\')
120 print(' /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\\n", */ \\')
121 print(' /* __func__, __LINE__, disp, offset, # fn); */ \\')
122 print(' /* abort(); */ \\')
123 print(' } \\')
124 print(' else { \\')
125 print(' ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \\')
126 print(' } \\')
127 print(' } while(0)')
128 print('')
140 print('/* total number of offsets below */')
141 print('#define _gloffset_COUNT %d' % (len(abi_functions + functions)))
142 print('')
145 print('#define _gloffset_%s %d' % (f.name, f.offset))
149 print('#define %s_size %u' % (remap_table, count))
150 print('extern int %s[ %s_size ];' % (remap_table, remap_table))
151 print('')
154 print('#define %s_remap_index %u' % (f.name, index))
156 print('')
159 print('#define _gloffset_%s %s[%s_remap_index]' % (f.name, remap_table, f.name))
161 print('')
166 print('typedef %s (GLAPIENTRYP _glptr_%s)(%s);' % (f.return_type, f.name, arg_string))
167 print('#define CALL_%s(disp, parameters) \\' % (f.name))
168 print(' (* GET_%s(disp)) parameters' % (f.name))
169 print('static inline _glptr_%s GET_%s(struct _glapi_table *disp) {' % (f.name, f.name))
170 print(' return (_glptr_%s) (GET_by_offset(disp, _gloffset_%s));' % (f.name, f.name))
171 print('}')
172 print()
173print('static inline void SET_%s(struct _glapi_table *disp, %s (GLAPIENTRYP fn)(%s)) {' % (f.name,…
174 print(' SET_by_offset(disp, _gloffset_%s, fn);' % (f.name))
175 print('}')
176 print()
208 printer.Print(api)