topcom.c: extract part of code for setting up standard constraints