View Full Version : GL_EXTENSIONS
11-24-2001, 07:54 AM
Is it dangerous to use strtok directly on the string returned
CHAR separators = " \t\n";
CHAR *char_buffer = glGetString(GL_EXTENSIONS);
strtok( char_buffer, separators );
11-24-2001, 01:34 PM
Usually no, but I personally don't like the strtok function because it copies the string to a static buffer somewhere. How big this buffer is though is undocumented (at least in VC++) and probably implementation specific (unless the ANSI standard says something about that). I personally would have liked the function to return a start and end pointer instead.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.