Application of an approximate density-functional method to sulfur containing compounds