8
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
8
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
8
|
21 |
|
22 */ |
|
23 |
383
|
24 #if !defined (octave_symtab_h) |
|
25 #define octave_symtab_h 1 |
8
|
26 |
3011
|
27 #include <cassert> |
|
28 |
1755
|
29 #include <string> |
4214
|
30 #include <stack> |
5765
|
31 #include <sstream> |
220
|
32 |
3011
|
33 #include "oct-alloc.h" |
1755
|
34 #include "str-vec.h" |
|
35 |
2975
|
36 #include "ov.h" |
|
37 |
2979
|
38 class octave_lvalue; |
8
|
39 |
1755
|
40 class string_vector; |
|
41 |
8
|
42 class symbol_record; |
|
43 class symbol_table; |
|
44 |
4913
|
45 struct |
|
46 whos_parameter |
|
47 { |
4914
|
48 char command; |
|
49 char modifier; |
|
50 int parameter_length; |
|
51 int first_parameter_length; |
|
52 int dimensions; |
|
53 int balance; |
4913
|
54 std::string text; |
|
55 std::string line; |
|
56 }; |
|
57 |
3011
|
58 // Individual records in a symbol table. |
8
|
59 |
3011
|
60 class |
|
61 symbol_record |
|
62 { |
|
63 public: |
8
|
64 |
3258
|
65 // If you add or delete an entry here, you'll also need to change |
3325
|
66 // the width parameter in the declaration for symbol_type below... |
3258
|
67 |
195
|
68 enum TYPE |
|
69 { |
|
70 UNKNOWN = 0, |
|
71 USER_FUNCTION = 1, |
|
72 USER_VARIABLE = 2, |
3325
|
73 DLD_FUNCTION = 4, |
|
74 BUILTIN_FUNCTION = 8, |
4208
|
75 COMMAND = 16, |
5102
|
76 RAWCOMMAND = 32, |
5794
|
77 MAPPER_FUNCTION = 64 |
195
|
78 }; |
|
79 |
8
|
80 private: |
|
81 |
3011
|
82 // Variables or functions. |
|
83 |
|
84 class symbol_def |
|
85 { |
|
86 public: |
|
87 |
|
88 symbol_def (const octave_value& val = octave_value (), |
|
89 unsigned int sym_type = 0) |
|
90 : symbol_type (sym_type), eternal (0), read_only (0), help_string (), |
5399
|
91 definition (val), count (1) { } |
3011
|
92 |
|
93 ~symbol_def (void) { } |
|
94 |
|
95 bool is_variable (void) const |
5794
|
96 { return (symbol_type & symbol_record::USER_VARIABLE); } |
3011
|
97 |
4208
|
98 // It's not necessary to check for COMMAND and MAPPER_FUNCTION |
3968
|
99 // here. Those tags are just used as additional qualifiers for |
|
100 // the other types of functions. |
|
101 |
3011
|
102 bool is_function (void) const |
|
103 { |
|
104 return (symbol_type & symbol_record::USER_FUNCTION |
3325
|
105 || symbol_type & symbol_record::DLD_FUNCTION |
3011
|
106 || symbol_type & symbol_record::BUILTIN_FUNCTION); |
|
107 } |
|
108 |
|
109 bool is_user_variable (void) const |
|
110 { return (symbol_type & symbol_record::USER_VARIABLE); } |
195
|
111 |
5136
|
112 // Don't use |= here to avoid error with AIX compiler. |
4208
|
113 void mark_as_command (void) |
5136
|
114 { symbol_type = symbol_type | symbol_record::COMMAND; } |
4207
|
115 |
4208
|
116 void unmark_command (void) |
|
117 { symbol_type &= ~symbol_record::COMMAND; } |
4207
|
118 |
4208
|
119 bool is_command (void) const |
|
120 { return (symbol_type & symbol_record::COMMAND); } |
3011
|
121 |
5102
|
122 void mark_as_rawcommand (void) |
|
123 { symbol_type |= (symbol_record::COMMAND |
|
124 | symbol_record::RAWCOMMAND); } |
|
125 |
|
126 void unmark_rawcommand (void) |
|
127 { symbol_type &= ~symbol_record::RAWCOMMAND; } |
|
128 |
|
129 bool is_rawcommand (void) const |
|
130 { return (symbol_type & symbol_record::RAWCOMMAND); } |
|
131 |
3011
|
132 bool is_mapper_function (void) const |
|
133 { return (symbol_type & symbol_record::MAPPER_FUNCTION); } |
|
134 |
|
135 bool is_user_function (void) const |
|
136 { return (symbol_type & symbol_record::USER_FUNCTION); } |
|
137 |
|
138 bool is_builtin_function (void) const |
|
139 { return (symbol_type & symbol_record::BUILTIN_FUNCTION); } |
|
140 |
3325
|
141 bool is_dld_function (void) const |
|
142 { return (symbol_type & symbol_record::DLD_FUNCTION); } |
|
143 |
5775
|
144 // FIXME |
3523
|
145 bool is_map_element (const std::string& /* elts */) const |
3011
|
146 { return false; } |
|
147 |
|
148 bool is_defined (void) const |
|
149 { return definition.is_defined (); } |
|
150 |
|
151 bool is_read_only (void) const |
|
152 { return read_only; } |
|
153 |
|
154 bool is_eternal (void) const |
|
155 { return eternal; } |
8
|
156 |
4913
|
157 bool is_matrix_type (void) const |
|
158 { return definition.is_matrix_type (); } |
|
159 |
5659
|
160 bool is_sparse_type (void) const |
|
161 { return definition.is_sparse_type (); } |
|
162 |
|
163 bool is_complex_type (void) const |
|
164 { return definition.is_complex_type (); } |
|
165 |
|
166 std::string class_name (void) const |
|
167 { return definition.class_name (); } |
|
168 |
|
169 Matrix size (void) const |
|
170 { return definition.size (); } |
|
171 |
4913
|
172 size_t byte_size (void) const |
|
173 { return definition.byte_size (); }; |
|
174 |
5275
|
175 octave_idx_type numel (void) const |
4913
|
176 { return definition.numel (); }; |
|
177 |
5275
|
178 octave_idx_type capacity (void) const |
5164
|
179 { return definition.capacity (); }; |
|
180 |
4913
|
181 dim_vector dims (void) const |
|
182 { return definition.dims (); } |
|
183 |
5275
|
184 octave_idx_type rows (void) const { return definition.rows (); } |
|
185 octave_idx_type columns (void) const { return definition.columns (); } |
3013
|
186 |
3523
|
187 std::string type_name (void) const { return definition.type_name (); } |
3013
|
188 |
3523
|
189 std::string type_as_string (void) const; |
3355
|
190 |
3523
|
191 void type (std::ostream& os, const std::string& name, bool pr_type_info, |
3356
|
192 bool quiet, bool pr_orig_txt); |
|
193 |
3523
|
194 std::string which (const std::string& name); |
3355
|
195 |
3523
|
196 void which (std::ostream& os, const std::string& name); |
3355
|
197 |
3011
|
198 void define (const octave_value& val, unsigned int sym_type) |
|
199 { |
|
200 definition = val; |
|
201 symbol_type = sym_type; |
|
202 } |
|
203 |
|
204 void protect (void) { read_only = 1; } |
|
205 |
|
206 void unprotect (void) { read_only = 0; } |
|
207 |
|
208 void make_eternal (void) { eternal = 1; } |
|
209 |
|
210 octave_value& def (void) { return definition; } |
|
211 |
3523
|
212 std::string help (void) const { return help_string; } |
3011
|
213 |
5823
|
214 void document (const std::string& h); |
3011
|
215 |
|
216 unsigned int type (void) { return symbol_type; } |
|
217 |
|
218 void *operator new (size_t size) |
|
219 { return allocator.alloc (size); } |
|
220 |
|
221 void operator delete (void *p, size_t size) |
|
222 { allocator.free (p, size); } |
|
223 |
|
224 static octave_allocator allocator; |
8
|
225 |
3011
|
226 // The type of this symbol (see the enum above). |
5102
|
227 unsigned int symbol_type : 9; |
3011
|
228 |
|
229 // Nonzero means this variable cannot be cleared. |
|
230 unsigned int eternal : 1; |
|
231 |
|
232 // Nonzero means this variable cannot be given a new value. |
|
233 unsigned int read_only : 1; |
|
234 |
|
235 // The doc string associated with this variable. |
3523
|
236 std::string help_string; |
3011
|
237 |
|
238 // The value of this definition. See ov.h and related files. |
|
239 octave_value definition; |
767
|
240 |
3011
|
241 // Reference count. |
|
242 int count; |
|
243 |
3933
|
244 void print_info (std::ostream& os, |
|
245 const std::string& prefix = std::string ()) const; |
3239
|
246 |
3011
|
247 // No copying! |
|
248 |
|
249 symbol_def (const symbol_def& sd); |
|
250 |
|
251 symbol_def& operator = (const symbol_def& sd); |
|
252 }; |
8
|
253 |
|
254 public: |
2953
|
255 |
3011
|
256 typedef int (*change_function) (void); |
2953
|
257 |
3011
|
258 symbol_record (void) |
5861
|
259 : formal_param (false), automatic_variable (false), |
|
260 linked_to_global (false), tagged_static (false), |
|
261 can_hide_function (true), visible (true), nm (), chg_fcn (0), |
4234
|
262 definition (new symbol_def ()), next_elem (0) { } |
|
263 |
5775
|
264 // FIXME -- kluge alert! We obviously need a better way of |
4234
|
265 // handling allow_shadow! |
3011
|
266 |
3523
|
267 symbol_record (const std::string& n, symbol_record *nxt) |
5861
|
268 : formal_param (false), automatic_variable (false), |
|
269 linked_to_global (false), tagged_static (false), |
|
270 can_hide_function (n != "__end__"), visible (true), nm (n), |
|
271 chg_fcn (0), definition (new symbol_def ()), next_elem (nxt) { } |
8
|
272 |
5013
|
273 ~symbol_record (void) |
|
274 { |
|
275 if (--definition->count <= 0) |
|
276 delete definition; |
|
277 } |
8
|
278 |
3523
|
279 std::string name (void) const { return nm; } |
2975
|
280 |
3523
|
281 std::string help (void) const { return definition->help (); } |
3011
|
282 |
|
283 octave_value& def (void) { return definition->def (); } |
8
|
284 |
3523
|
285 void rename (const std::string& new_name); |
195
|
286 |
3011
|
287 bool is_function (void) const |
|
288 { return definition->is_function (); } |
|
289 |
4208
|
290 void mark_as_command (void) |
|
291 { definition->mark_as_command (); } |
4207
|
292 |
4208
|
293 void unmark_command (void) |
|
294 { definition->unmark_command (); } |
4207
|
295 |
4208
|
296 bool is_command (void) const |
|
297 { return definition->is_command (); } |
3011
|
298 |
5102
|
299 void mark_as_rawcommand (void) |
|
300 { definition->mark_as_rawcommand (); } |
|
301 |
|
302 void unmark_rawcommand (void) |
|
303 { definition->unmark_rawcommand (); } |
|
304 |
|
305 bool is_rawcommand (void) const |
|
306 { return definition->is_rawcommand (); } |
|
307 |
3011
|
308 bool is_mapper_function (void) const |
|
309 { return definition->is_mapper_function (); } |
|
310 |
|
311 bool is_user_function (void) const |
|
312 { return definition->is_user_function (); } |
195
|
313 |
3011
|
314 bool is_builtin_function (void) const |
|
315 { return definition->is_builtin_function (); } |
|
316 |
3325
|
317 bool is_dld_function (void) const |
|
318 { return definition->is_dld_function (); } |
|
319 |
3011
|
320 bool is_variable (void) const |
|
321 { return definition->is_variable (); } |
8
|
322 |
3011
|
323 bool is_user_variable (void) const |
|
324 { return definition->is_user_variable (); } |
|
325 |
3523
|
326 bool is_map_element (const std::string& elts) const |
3011
|
327 { return definition->is_map_element (elts); } |
8
|
328 |
3011
|
329 unsigned int type (void) const { return definition->type (); } |
|
330 |
|
331 bool is_defined (void) const { return definition->is_defined (); } |
|
332 |
|
333 bool is_read_only (void) const { return definition->is_read_only (); } |
8
|
334 |
3011
|
335 bool is_eternal (void) const { return definition->is_eternal (); } |
|
336 |
|
337 void protect (void) { definition->protect (); } |
195
|
338 |
3011
|
339 void unprotect (void) { definition->unprotect (); } |
|
340 |
|
341 void make_eternal (void) { definition->make_eternal (); } |
2893
|
342 |
5399
|
343 void hide (void) { visible = false; } |
|
344 void show (void) { visible = true; } |
|
345 bool is_visible (void) const { return visible; } |
5397
|
346 |
3011
|
347 void set_change_function (change_function f) { chg_fcn = f; } |
2893
|
348 |
3011
|
349 void define (const octave_value& v, unsigned int sym_type = USER_VARIABLE); |
|
350 |
|
351 bool define (octave_function *f, unsigned int sym_type); |
2893
|
352 |
3523
|
353 void document (const std::string& h) { definition->document (h); } |
195
|
354 |
3011
|
355 void clear (void); |
195
|
356 |
5397
|
357 void alias (symbol_record *s, bool mark_to_clear = false); |
8
|
358 |
|
359 void mark_as_formal_parameter (void); |
3011
|
360 bool is_formal_parameter (void) const { return formal_param; } |
8
|
361 |
5861
|
362 void mark_as_automatic_variable (void); |
|
363 bool is_automatic_variable (void) const { return automatic_variable; } |
|
364 |
195
|
365 void mark_as_linked_to_global (void); |
3011
|
366 bool is_linked_to_global (void) const { return linked_to_global; } |
8
|
367 |
2846
|
368 void mark_as_static (void); |
3011
|
369 bool is_static (void) const { return tagged_static; } |
4319
|
370 void unmark_static (void) { tagged_static = false; } |
2846
|
371 |
4913
|
372 bool is_matrix_type (void) const |
|
373 { return definition->is_matrix_type (); } |
|
374 |
5659
|
375 bool is_sparse_type (void) const |
|
376 { return definition->is_sparse_type (); } |
|
377 |
|
378 bool is_complex_type (void) const |
|
379 { return definition->is_complex_type (); } |
|
380 |
|
381 std::string class_name (void) const |
|
382 { return definition->class_name (); } |
|
383 |
|
384 Matrix size (void) const |
|
385 { return definition->size (); } |
|
386 |
4913
|
387 size_t byte_size (void) const |
|
388 { return definition->byte_size (); }; |
|
389 |
5275
|
390 octave_idx_type numel (void) const |
4913
|
391 { return definition->numel (); }; |
|
392 |
5275
|
393 octave_idx_type capacity (void) const |
5164
|
394 { return definition->capacity (); }; |
|
395 |
4913
|
396 dim_vector dims (void) const { return definition->dims (); } |
|
397 |
|
398 int dimensions_string_req_first_space (int print_dims) const; |
|
399 |
|
400 int dimensions_string_req_total_space (int print_dims) const; |
|
401 |
|
402 std::string make_dimensions_string (int print_dims) const; |
|
403 |
5275
|
404 octave_idx_type rows (void) const { return definition->rows (); } |
|
405 octave_idx_type columns (void) const { return definition->columns (); } |
3013
|
406 |
3523
|
407 std::string type_name (void) const { return definition->type_name (); } |
3013
|
408 |
3523
|
409 std::string type_as_string (void) const |
3355
|
410 { return definition->type_as_string (); } |
|
411 |
3523
|
412 void type (std::ostream& os, bool pr_type_info, bool quiet, bool pr_orig_txt) |
3356
|
413 { definition->type (os, name (), pr_type_info, quiet, pr_orig_txt); } |
|
414 |
3523
|
415 std::string which (void) { return definition->which (name ()); } |
3355
|
416 |
3523
|
417 void which (std::ostream& os) { definition->which (os, name ()); } |
3355
|
418 |
2975
|
419 octave_value& variable_value (void); |
2979
|
420 octave_lvalue variable_reference (void); |
2390
|
421 |
3011
|
422 symbol_record *next (void) const { return next_elem; } |
8
|
423 |
3011
|
424 void chain (symbol_record *s) { next_elem = s; } |
195
|
425 |
220
|
426 void push_context (void); |
3011
|
427 |
220
|
428 void pop_context (void); |
|
429 |
4913
|
430 void print_symbol_info_line (std::ostream& os, |
|
431 std::list<whos_parameter>& params) const; |
3013
|
432 |
3933
|
433 void print_info (std::ostream& os, |
|
434 const std::string& prefix = std::string ()) const; |
3239
|
435 |
8
|
436 private: |
|
437 |
2893
|
438 unsigned int formal_param : 1; |
5861
|
439 unsigned int automatic_variable : 1; |
2893
|
440 unsigned int linked_to_global : 1; |
|
441 unsigned int tagged_static : 1; |
4234
|
442 unsigned int can_hide_function : 1; |
5399
|
443 unsigned int visible : 1; |
195
|
444 |
3523
|
445 std::string nm; |
3011
|
446 change_function chg_fcn; |
195
|
447 symbol_def *definition; |
8
|
448 symbol_record *next_elem; |
395
|
449 |
3011
|
450 // This should maybe be one stack with a structure containing all the |
|
451 // items we need to save for recursive calls... |
4214
|
452 std::stack <symbol_def *> context; |
|
453 std::stack <unsigned int> global_link_context; |
8
|
454 |
5397
|
455 std::stack <symbol_record *> aliases_to_clear; |
|
456 |
|
457 void push_alias_to_clear (symbol_record *s) |
|
458 { aliases_to_clear.push (s); } |
|
459 |
3011
|
460 bool read_only_error (const char *action); |
195
|
461 |
5397
|
462 void maybe_delete_def (void) |
|
463 { |
|
464 if (--definition->count <= 0) |
|
465 delete definition; |
|
466 } |
|
467 |
3011
|
468 // No copying! |
|
469 |
|
470 symbol_record (const symbol_record& s); |
195
|
471 |
8
|
472 symbol_record& operator = (const symbol_record& s); |
|
473 }; |
|
474 |
767
|
475 // A symbol table. |
200
|
476 |
|
477 #define SYMTAB_LOCAL_SCOPE 1 |
|
478 #define SYMTAB_GLOBAL_SCOPE 2 |
|
479 |
|
480 #define SYMTAB_ALL_SCOPES (SYMTAB_LOCAL_SCOPE | SYMTAB_GLOBAL_SCOPE) |
|
481 |
3011
|
482 #define SYMTAB_ALL_TYPES (symbol_record::USER_FUNCTION \ |
|
483 | symbol_record::USER_VARIABLE \ |
3325
|
484 | symbol_record::DLD_FUNCTION \ |
3011
|
485 | symbol_record::BUILTIN_FUNCTION \ |
4208
|
486 | symbol_record::COMMAND \ |
5102
|
487 | symbol_record::RAWCOMMAND \ |
5794
|
488 | symbol_record::MAPPER_FUNCTION) |
200
|
489 |
5794
|
490 #define SYMTAB_VARIABLES (symbol_record::USER_VARIABLE) |
1412
|
491 |
8
|
492 class |
|
493 symbol_table |
|
494 { |
|
495 public: |
|
496 |
4238
|
497 symbol_table (unsigned int tab_size = 128, |
|
498 const std::string& nm = std::string ()) |
|
499 : table_size (tab_size), table (new symbol_record [table_size]), |
|
500 table_name (nm) |
4009
|
501 { |
|
502 assert ((tab_size % 2) == 0); |
4238
|
503 |
|
504 if (table_name.empty ()) |
|
505 { |
5765
|
506 std::ostringstream buf; |
|
507 buf << symtab_count++; |
|
508 table_name = buf.str (); |
4238
|
509 } |
4009
|
510 } |
3011
|
511 |
5013
|
512 ~symbol_table (void); |
8
|
513 |
3523
|
514 symbol_record *lookup (const std::string& nm, bool insert = false, |
2856
|
515 bool warn = false); |
8
|
516 |
3523
|
517 void rename (const std::string& old_name, const std::string& new_name); |
572
|
518 |
4009
|
519 void clear (void); |
|
520 |
|
521 void clear_variables (void); |
|
522 void clear_functions (void); |
|
523 void clear_globals (void); |
|
524 |
|
525 bool clear (const std::string& nm); |
|
526 |
|
527 bool clear_variable (const std::string& nm); |
|
528 bool clear_function (const std::string& nm); |
|
529 bool clear_global (const std::string& nm); |
|
530 |
|
531 bool clear_variable_pattern (const std::string& pat); |
|
532 bool clear_function_pattern (const std::string& pat); |
|
533 bool clear_global_pattern (const std::string& pat); |
8
|
534 |
164
|
535 int size (void) const; |
8
|
536 |
3013
|
537 Array<symbol_record *> |
4913
|
538 subsymbol_list (const string_vector& pats = string_vector (), |
|
539 unsigned int type = SYMTAB_ALL_TYPES, |
|
540 unsigned int scope = SYMTAB_ALL_SCOPES) const; |
|
541 |
|
542 Array<symbol_record *> |
3355
|
543 symbol_list (const string_vector& pats = string_vector (), |
3013
|
544 unsigned int type = SYMTAB_ALL_TYPES, |
|
545 unsigned int scope = SYMTAB_ALL_SCOPES) const; |
|
546 |
195
|
547 |
1755
|
548 string_vector |
3355
|
549 name_list (const string_vector& pats = string_vector (), |
3013
|
550 bool sort = false, unsigned int type = SYMTAB_ALL_TYPES, |
|
551 unsigned int scope = SYMTAB_ALL_SCOPES) const; |
605
|
552 |
4009
|
553 string_vector |
|
554 user_function_name_list (void) const |
|
555 { |
|
556 return name_list |
|
557 (string_vector (), false, |
|
558 symbol_record::USER_FUNCTION|symbol_record::DLD_FUNCTION, |
|
559 SYMTAB_ALL_SCOPES); |
|
560 } |
|
561 |
|
562 string_vector |
|
563 global_variable_name_list (void) const |
|
564 { |
|
565 return name_list |
|
566 (string_vector (), false, SYMTAB_VARIABLES, SYMTAB_GLOBAL_SCOPE); |
|
567 } |
|
568 |
|
569 string_vector |
|
570 variable_name_list (void) const |
|
571 { |
|
572 return name_list |
|
573 (string_vector (), false, SYMTAB_VARIABLES, SYMTAB_LOCAL_SCOPE); |
|
574 } |
3011
|
575 |
|
576 int maybe_list (const char *header, const string_vector& argv, |
3523
|
577 std::ostream& os, bool show_verbose, |
3011
|
578 unsigned type, unsigned scope); |
|
579 |
3523
|
580 Array<symbol_record *> glob (const std::string& pat = std::string ("*"), |
3355
|
581 unsigned int type = SYMTAB_ALL_TYPES, |
|
582 unsigned int scope = SYMTAB_ALL_SCOPES) const; |
8
|
583 |
220
|
584 void push_context (void); |
3011
|
585 |
220
|
586 void pop_context (void); |
|
587 |
5861
|
588 // Create a new symbol table with the same entries. Only the symbol |
|
589 // names and some attributes are copied, not values. |
|
590 symbol_table *dup (void); |
|
591 |
|
592 // Inherit some values from the parent_sym_tab. |
|
593 void inherit (symbol_table *parent_sym_tab); |
|
594 |
3941
|
595 void print_info (std::ostream& os) const; |
3011
|
596 |
8
|
597 private: |
|
598 |
3011
|
599 unsigned int table_size; |
|
600 |
|
601 symbol_record *table; |
|
602 |
4238
|
603 std::string table_name; |
|
604 |
|
605 static unsigned long int symtab_count; |
|
606 |
4913
|
607 void |
|
608 print_descriptor (std::ostream& os, |
|
609 std::list<whos_parameter> params) const; |
|
610 |
|
611 std::list<whos_parameter> |
|
612 parse_whos_line_format (Array<symbol_record *>& symbols) const; |
|
613 |
3523
|
614 unsigned int hash (const std::string& s); |
8
|
615 |
3011
|
616 // No copying! |
8
|
617 |
3011
|
618 symbol_table (const symbol_table&); |
1962
|
619 |
3011
|
620 symbol_table& operator = (const symbol_table&); |
|
621 }; |
2790
|
622 |
4913
|
623 // Defines layout for the whos/who -long command. |
|
624 extern std::string Vwhos_line_format; |
|
625 |
8
|
626 #endif |
|
627 |
|
628 /* |
|
629 ;;; Local Variables: *** |
|
630 ;;; mode: C++ *** |
|
631 ;;; End: *** |
|
632 */ |