diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-04 18:18:16 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-11-04 18:18:16 -0800 |
commit | b8577c30fcc6e962e341f5ab3402197cd9bb1124 (patch) | |
tree | 8763ee3a7cbbb0e614b4a807931bebe8a164c395 /scanopt.c | |
parent | c29d6e204b4dfe99a2f08c258652823e4c26c324 (diff) | |
download | flex-b8577c30fcc6e962e341f5ab3402197cd9bb1124.tar.gz flex-b8577c30fcc6e962e341f5ab3402197cd9bb1124.tar.bz2 flex-b8577c30fcc6e962e341f5ab3402197cd9bb1124.zip |
Imported Upstream version 2.5.37upstream/2.5.37
Diffstat (limited to 'scanopt.c')
-rw-r--r-- | scanopt.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -189,7 +189,7 @@ scanopt_t *scanopt_init (options, argc, argv, flags) s->aux = (struct _aux *) malloc (s->optc * sizeof (struct _aux)); for (i = 0; i < s->optc; i++) { - const char *p, *pname; + const Char *p, *pname; const struct optspec_t *opt; struct _aux *aux; @@ -200,11 +200,11 @@ scanopt_t *scanopt_init (options, argc, argv, flags) if (opt->opt_fmt[0] == '-' && opt->opt_fmt[1] == '-') { aux->flags |= IS_LONG; - pname = opt->opt_fmt + 2; + pname = (const Char *)(opt->opt_fmt + 2); s->has_long = 1; } else { - pname = opt->opt_fmt + 1; + pname = (const Char *)(opt->opt_fmt + 1); s->has_short = 1; } aux->printlen = strlen (opt->opt_fmt); @@ -481,7 +481,7 @@ int scanopt_usage (scanner, fp, usage) while (*p && n < maxlen[1] && *p != '\n') { - if (isspace (*p) + if (isspace ((Char)(*p)) || *p == '-') lastws = p; n++; @@ -504,8 +504,7 @@ int scanopt_usage (scanner, fp, usage) if (lastws) { fprintf (fp, "%.*s\n", - lastws - - pstart, + (int)(lastws - pstart), pstart); pstart = lastws + 1; |