Another possibility is for the states to publish the codes on their web sites, then the state would pay the copyright holder (out of their state budgets) for each person that accesses the code. Full copyright would still be in force, and per copy royalties would still be sent to the rights holder, yet free access is still available to those who the law applies to.