  Recent measurements of prompt charm-baryon production at midrapidity in pp
and p--Pb collisions show baryon-to-meson yield ratios significantly higher
than those in $\rm e^+e^-$ collisions, suggesting that the charm fragmentation
is not universal across different collision systems. Thus, more precise and
broader measurements of prompt charm-baryon production are crucial to study the
charm quark hadronization in a partonic-rich environment like the one produced
in pp collisions at the LHC energies. Prompt charm baryon-to-meson yield ratios
in proton--nucleus collisions provide important information about possible
additional modification of hadronization mechanisms, on cold nuclear matter
effects, and on the possible presence of collective effects that could modify
the production of heavy-flavor hadrons. The non-prompt charm-hadron production
can provide information about the beauty sector and can be used to study flavor
dependence of heavy-quark hadronization. In this contribution, the most recent
results on prompt and non-prompt charm-hadron yield ratios in pp and p--Pb
collisions and on charm fragmentation fractions and charm production cross
section at midrapidity per unit of rapidity measured by ALICE are discussed.
