paths.c: refactoring; two big functions were split to smaller parts
paths.c: refactoring; two big functions were split to smaller parts

loganchien/scratchbox2,madscientist42/scratchbox2,ldbox/ldbox,loganchien/scratchbox2,lbt/scratchbox2,h113331pp/scratchbox2,OlegGirko/ldbox,ldbox/ldbox,loganchien/scratchbox2,loganchien/scratchbox2,madscientist42/scratchbox2,ldbox/ldbox,ldbox/ldbox,madscientist42/scratchbox2,BinChengfei/scratchbox2,madscientist42/scratchbox2,BinChengfei/scratchbox2,h113331pp/scratchbox2,OlegGirko/ldbox,loganchien/scratchbox2,OlegGirko/ldbox,loganchien/scratchbox2,h113331pp/scratchbox2,lbt/scratchbox2,lbt/scratchbox2,BinChengfei/scratchbox2,lbt/scratchbox2,BinChengfei/scratchbox2,BinChengfei/scratchbox2,madscientist42/scratchbox2,OlegGirko/ldbox,ldbox/ldbox,OlegGirko/ldbox,lbt/scratchbox2,madscientist42/scratchbox2,OlegGirko/ldbox,ldbox/ldbox,h113331pp/scratchbox2,h113331pp/scratchbox2,h113331pp/scratchbox2,BinChengfei/scratchbox2