Vapor–liquid phase diagrams and structure of a square-well fluid confined in weakly attractive cylindrical pores