LEFT | RIGHT |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 #include "runtime.h" | 5 #include "runtime.h" |
6 #include "type.h" | 6 #include "type.h" |
7 | 7 |
8 //static Lock debuglock; | 8 //static Lock debuglock; |
9 | 9 |
10 static void vprintf(int8*, byte*); | 10 static void vprintf(int8*, byte*); |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 343 |
344 void | 344 void |
345 runtime·printpointer(void *p) | 345 runtime·printpointer(void *p) |
346 { | 346 { |
347 runtime·printhex((uint64)p); | 347 runtime·printhex((uint64)p); |
348 } | 348 } |
349 | 349 |
350 void | 350 void |
351 runtime·printstring(String v) | 351 runtime·printstring(String v) |
352 { | 352 { |
353 extern uint64 runtime·maxstring; | |
354 | |
355 if(v.len > runtime·maxstring) { | 353 if(v.len > runtime·maxstring) { |
356 gwrite("[string too long]", 17); | 354 gwrite("[string too long]", 17); |
357 return; | 355 return; |
358 } | 356 } |
359 if(v.len > 0) | 357 if(v.len > 0) |
360 gwrite(v.str, v.len); | 358 gwrite(v.str, v.len); |
361 } | 359 } |
362 | 360 |
363 void | 361 void |
364 runtime·printsp(void) | 362 runtime·printsp(void) |
365 { | 363 { |
366 gwrite(" ", 1); | 364 gwrite(" ", 1); |
367 } | 365 } |
368 | 366 |
369 void | 367 void |
370 runtime·printnl(void) | 368 runtime·printnl(void) |
371 { | 369 { |
372 gwrite("\n", 1); | 370 gwrite("\n", 1); |
373 } | 371 } |
374 | 372 |
375 void | 373 void |
376 runtime·typestring(Eface e, String s) | 374 runtime·typestring(Eface e, String s) |
377 { | 375 { |
378 s = *e.type->string; | 376 s = *e.type->string; |
379 FLUSH(&s); | 377 FLUSH(&s); |
380 } | 378 } |
381 | 379 |
LEFT | RIGHT |