Besides the factor that I don't understand the data block at the beginning of the snippet and also that I don't program in C, your code seems that is doing what is supposed to do.

There are 2 loops one inside the other, scanning the matrix with 4ms from col to col so a total of 20ms is achieved to scan the whole matrix. I cannot understand what is bothering you exactly. The pulses you mention have to be there! Otherwise cannot the display cannot be scaned. Am I missing something?

Ioannis