I'm going to offer a dissenting opinion here. I would not use typedefs for stuff like this. Dealing with code that is littered with typedefs for trivial datatypes is annoying. Everytime you are looking at such code there is huge context switch for the brain to read
code: |
my_awesome_datatype val;
|
where someone has typedeffed an int to my_awesome_datatype. Worse still is when people typedef the same data type multiple times.
code: |
typedef int my_awesome_datatype ;
typedef int color ;
|
You best bet is to change all ints to floats. Since c is a static language, I'm sure there are multiple tools available to assist these kinds of refactorings.