Getting a list of available screen resolutions

How to let the player/user pick from all the resolutions his machine/display provides? It appears that the SDL_ListModes() function is not reliable. Does anyone else share that experience? Did you find a way around it? Or do you provide a hand-written list of possible resolutions?
If a manual solution is the case: where can one get a list like that? Grumbel created a list of popular resolutions on our wiki: http://freegamedev.net/wiki/Screen_Resolutions and Wikipedia has a list too: http://en.wikipedia.org/wiki/List_of_common_resolutions . Do you know where such a list is available for easy import? (Otherwise someone will have to hack some regex/sed
)
And even when such a list is at hand, how to prevent the user from picking a resolution not supported by his graphics card and/or monitor?
If a manual solution is the case: where can one get a list like that? Grumbel created a list of popular resolutions on our wiki: http://freegamedev.net/wiki/Screen_Resolutions and Wikipedia has a list too: http://en.wikipedia.org/wiki/List_of_common_resolutions . Do you know where such a list is available for easy import? (Otherwise someone will have to hack some regex/sed

And even when such a list is at hand, how to prevent the user from picking a resolution not supported by his graphics card and/or monitor?