summaryrefslogtreecommitdiff
path: root/scanopt.c
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-04 18:18:16 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-04 18:18:16 -0800
commitb8577c30fcc6e962e341f5ab3402197cd9bb1124 (patch)
tree8763ee3a7cbbb0e614b4a807931bebe8a164c395 /scanopt.c
parentc29d6e204b4dfe99a2f08c258652823e4c26c324 (diff)
downloadflex-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.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/scanopt.c b/scanopt.c
index 2c8d593..f76ecd3 100644
--- a/scanopt.c
+++ b/scanopt.c
@@ -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;