comparison src/free-hook.c @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents fbbf69b4e8a7
children 8626e4521993
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
508 #if defined(DEBUG_INPUT_BLOCKING) || defined (DEBUG_GCPRO) 508 #if defined(DEBUG_INPUT_BLOCKING) || defined (DEBUG_GCPRO)
509 509
510 /* Note: There is no more input blocking in XEmacs */ 510 /* Note: There is no more input blocking in XEmacs */
511 typedef enum { 511 typedef enum {
512 block_type, unblock_type, totally_type, 512 block_type, unblock_type, totally_type,
513 gcpro1_type, gcpro2_type, gcpro3_type, gcpro4_type, gcpro5_type, 513 gcpro1_type, gcpro2_type, gcpro3_type, gcpro4_type, ungcpro_type
514 ungcpro_type
515 } blocktype; 514 } blocktype;
516 515
517 struct block_input_history_struct 516 struct block_input_history_struct
518 { 517 {
519 char *file; 518 char *file;
525 #endif 524 #endif
526 }; 525 };
527 526
528 typedef struct block_input_history_struct block_input_history; 527 typedef struct block_input_history_struct block_input_history;
529 528
530 #endif /* DEBUG_INPUT_BLOCKING || DEBUG_GCPRO */ 529 #endif
531 530
532 #ifdef DEBUG_INPUT_BLOCKING 531 #ifdef DEBUG_INPUT_BLOCKING
533 532
534 int blhistptr; 533 int blhistptr;
535 534
574 blhistptr++; 573 blhistptr++;
575 if (blhistptr >= BLHISTLIMIT) 574 if (blhistptr >= BLHISTLIMIT)
576 blhistptr = 0; 575 blhistptr = 0;
577 } 576 }
578 577
579 #endif /* DEBUG_INPUT_BLOCKING */ 578 #endif
580 579
581 580
582 #ifdef DEBUG_GCPRO 581 #ifdef DEBUG_GCPRO
583 582
584 int gcprohistptr; 583 int gcprohistptr;
586 block_input_history gcprohist[GCPROHISTLIMIT]; 585 block_input_history gcprohist[GCPROHISTLIMIT];
587 586
588 static void 587 static void
589 log_gcpro (char *file, int line, struct gcpro *value, blocktype type) 588 log_gcpro (char *file, int line, struct gcpro *value, blocktype type)
590 { 589 {
590 FRAME start_frame;
591
591 if (type == ungcpro_type) 592 if (type == ungcpro_type)
592 { 593 {
593 if (value == gcprolist) goto OK; 594 if (value == gcprolist) goto OK;
594 if (! gcprolist) abort (); 595 if (! gcprolist) abort ();
595 if (value == gcprolist->next) goto OK; 596 if (value == gcprolist->next) goto OK;
678 { 679 {
679 log_gcpro (file, line, gcpro1, ungcpro_type); 680 log_gcpro (file, line, gcpro1, ungcpro_type);
680 gcprolist = gcpro1->next; 681 gcprolist = gcpro1->next;
681 } 682 }
682 683
683
684 /* To be called from the debugger */
685 void show_gcprohist (void);
686 void 684 void
687 show_gcprohist (void) 685 show_gcprohist (void)
688 { 686 {
689 int i, j; 687 int i, j;
690 for (i = 0, j = gcprohistptr; 688 for (i = 0, j = gcprohistptr;
703 gcprohist[j].value); 701 gcprohist[j].value);
704 } 702 }
705 fflush (stdout); 703 fflush (stdout);
706 } 704 }
707 705
708 #endif /* DEBUG_GCPRO */ 706 #endif