Fix an incorrect sizeof.

Fixes CID #966192.
Improve the Get(Cur)DispMode and SetDispMode functions.

Fixes CID #966222.