Charm-quark fragmentation with an effective coupling constant