Pseudo Code:

When pressing the jump key
first test whether the entity is on ground
if not, do nothing
else set a variable jump_strength at a certain value above the gravity value
insert the variable at the z position of the move vector in c_move
then reduce the value of the variable jump_strength, until its almost null,
then set it to null
and, don't forget to time correct it..