Moving ScanInc outside of extern C