the __YASM_OBJFMT__ value to always be lowercase, e.g. for "-f Win32" on
the command line, __YASM_OBJFMT__ becomes "win32".
Requested by: Brian Gladman <brg@gladman.plus.com>
svn path=/trunk/yasm/; revision=1337
#include <util.h>
/*@unused@*/ RCSID("$Id$");
+#include <ctype.h>
#include <libyasm/compat-queue.h>
#include <libyasm/bitvect.h>
#include <libyasm.h>
static int
opt_objfmt_handler(/*@unused@*/ char *cmd, char *param, /*@unused@*/ int extra)
{
+ size_t i;
assert(param != NULL);
cur_objfmt_module = yasm_load_objfmt(param);
if (!cur_objfmt_module) {
if (objfmt_keyword)
yasm_xfree(objfmt_keyword);
objfmt_keyword = yasm__xstrdup(param);
+ for (i=0; i<strlen(objfmt_keyword); i++)
+ objfmt_keyword[i] = tolower(objfmt_keyword[i]);
return 0;
}