how to convert twi library from interrupt to polling based

Hello all ,
There is a twi library in arduino libraries found below
https://github.com/arduino/Arduino/blob/master/libraries/Wire/utility/twi.c
I need to convert this library in to a polling based library. I felt it is quiet easy and thought of following steps.
[1] Remove all _BV(TWIE) - To ensure interrupt is not enabled
[2] Convert the TWI isr - TWI_vect in to a normal function twi_isr( )
[3] Wherever they wait for ISR to finish it work - call normal function twi_isr( ). I found the following places

 // wait until twi is ready, become master receiver
  while(TWI_READY != twi_state){
    continue;
  }

  // wait for read operation to complete
  while(TWI_MRX == twi_state){
    continue;
  }

  // wait for write operation to complete
  while(wait && (TWI_MTX == twi_state)){
    continue;
  }

I converted the above lines as follows

  // wait until twi is ready, become master receiver
  while(TWI_READY != twi_state){
	twi_isr();
    continue;
  }

  // wait for read operation to complete
  while(TWI_MRX == twi_state){
        while( ! ( TWCR & ( 1 << TWINT ) ) );  // Wait for twi to finish it work
	twi_isr(); // to check status register and take corresponding action
    continue;
  }
  // wait for write operation to complete
  while(wait && (TWI_MTX == twi_state)){
        while( ! ( TWCR & ( 1 << TWINT ) ) );  // Wait for twi to finish it work
	twi_isr();
    continue;
  }

twi_isr is just a normal function version of the original ISR from avr. I did not modify it. After this modification i try to run the examples available in https://github.com/arduino/Arduino/tree/master/libraries/Wire/examples. But this does not work. Please let me know your suggestions. Thanks a lot.

Regards,
Bivin.

Wherever they wait for ISR to finish it work - call normal function twi_isr( ). I found the following places

I have the impression that you didn't understand how the TWI hardware works. You don't have to change the twi.c functions in the first place as you did but check for the TWINT flag in TWCR inside the loop() (or where ever your sketch works most of the time) and if it's set call the twi_isr() function.

I need to convert this library in to a polling based library.

May I ask for the reason for this? maybe there's a better alternative.