#1055082 fastwc examples needs to be updated

Package:
flex
Source:
flex
Description:
fast lexical analyzer generator
Submitter:
Osamu Aoki
Date:
2023-10-31 05:39:02 UTC
Severity:
normal
Tags:
#1055082#5
Date:
2023-10-31 05:27:47 UTC
From:
To:
The flex binary package comes with examples under /usr/share/doc/flex/examples/fastw .

These were from 2016 and don't work as expected with current gcc and
flex.

Attached patch fix these issues.
 * need "int" for main
 * need tailing "%%"

I think these may have been OK with old tool chain but they cause
trouble these days.

Now these can be compiled with

```
gcc -lfl mywc.c -o mywc
for f in 1 2 3 4 5; do
flex wc$f.l
gcc -lfl lex.yy.c -o wc$f
rm -f lex.yy.c
done
```

These example files are from upstream source under
https://salsa.debian.org/srivasta/flex/-/tree/master/examples/fastwc/

#1055082#10
Date:
2023-10-31 05:37:43 UTC
From:
To:
Hi,

Oops, "-lfl" may have been redundant...

Regards,

Osamu