comparison src/free-hook.c @ 337:fbbf69b4e8a7 r21-0-66

Import from CVS: tag r21-0-66
author cvs
date Mon, 13 Aug 2007 10:51:02 +0200
parents c5d627a313b1
children cc15677e0335
comparison
equal deleted inserted replaced
336:fe0a93612022 337:fbbf69b4e8a7
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, ungcpro_type 513 gcpro1_type, gcpro2_type, gcpro3_type, gcpro4_type, gcpro5_type,
514 ungcpro_type
514 } blocktype; 515 } blocktype;
515 516
516 struct block_input_history_struct 517 struct block_input_history_struct
517 { 518 {
518 char *file; 519 char *file;
524 #endif 525 #endif
525 }; 526 };
526 527
527 typedef struct block_input_history_struct block_input_history; 528 typedef struct block_input_history_struct block_input_history;
528 529
529 #endif 530 #endif /* DEBUG_INPUT_BLOCKING || DEBUG_GCPRO */
530 531
531 #ifdef DEBUG_INPUT_BLOCKING 532 #ifdef DEBUG_INPUT_BLOCKING
532 533
533 int blhistptr; 534 int blhistptr;
534 535
573 blhistptr++; 574 blhistptr++;
574 if (blhistptr >= BLHISTLIMIT) 575 if (blhistptr >= BLHISTLIMIT)
575 blhistptr = 0; 576 blhistptr = 0;
576 } 577 }
577 578
578 #endif 579 #endif /* DEBUG_INPUT_BLOCKING */
579 580
580 581
581 #ifdef DEBUG_GCPRO 582 #ifdef DEBUG_GCPRO
582 583
583 int gcprohistptr; 584 int gcprohistptr;
585 block_input_history gcprohist[GCPROHISTLIMIT]; 586 block_input_history gcprohist[GCPROHISTLIMIT];
586 587
587 static void 588 static void
588 log_gcpro (char *file, int line, struct gcpro *value, blocktype type) 589 log_gcpro (char *file, int line, struct gcpro *value, blocktype type)
589 { 590 {
590 FRAME start_frame;
591
592 if (type == ungcpro_type) 591 if (type == ungcpro_type)
593 { 592 {
594 if (value == gcprolist) goto OK; 593 if (value == gcprolist) goto OK;
595 if (! gcprolist) abort (); 594 if (! gcprolist) abort ();
596 if (value == gcprolist->next) goto OK; 595 if (value == gcprolist->next) goto OK;
679 { 678 {
680 log_gcpro (file, line, gcpro1, ungcpro_type); 679 log_gcpro (file, line, gcpro1, ungcpro_type);
681 gcprolist = gcpro1->next; 680 gcprolist = gcpro1->next;
682 } 681 }
683 682
683
684 /* To be called from the debugger */
685 void show_gcprohist (void);
684 void 686 void
685 show_gcprohist (void) 687 show_gcprohist (void)
686 { 688 {
687 int i, j; 689 int i, j;
688 for (i = 0, j = gcprohistptr; 690 for (i = 0, j = gcprohistptr;
701 gcprohist[j].value); 703 gcprohist[j].value);
702 } 704 }
703 fflush (stdout); 705 fflush (stdout);
704 } 706 }
705 707
706 #endif 708 #endif /* DEBUG_GCPRO */