Ticket #3275 (new defect)

Opened 10 years ago

Last modified 9 years ago

[patch] Highlight %lf in C code in mcedit

Reported by: safinaskar Owned by:
Priority: major Milestone: Future Releases
Component: mcedit Version: 4.8.13
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

"%f" is highlighted in C code in mcedit, but "%lf" is not. See the following table:

C89 C99
scanf %lf is supported %lf is supported
printf %lf is not supported %lf is supported

As you can see, %lf is supported in most cases, so, please, highlight it.

# mc -V
GNU Midnight Commander 4.8.13
Built with GLib 2.40.0
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
# mc --configure-options

'--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--disable-dependency-tracking' 'AWK=awk' 'X11_WWW=x-www-browser' '--libexecdir=/usr/lib' '--with-x' '--with-screen=slang' '--disable-rpath' '--disable-static' '--disable-silent-rules' '--enable-aspell' '--enable-vfs-sftp' '--enable-vfs-undelfs' '--enable-tests' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security' 'LDFLAGS=-fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'

Attachments

mc-4.8.13-syntax_highlight_long.patch (15.6 KB) - added by and 9 years ago.
support %lf and other long specifiers

Change History

Changed 9 years ago by and

support %lf and other long specifiers

comment:1 Changed 9 years ago by and

  • Summary changed from Highlight %lf in C code in mcedit to [patch] Highlight %lf in C code in mcedit

comment:2 Changed 9 years ago by andrew_b

-    keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
+    keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[Ll\]\{eEfgGoxX\} brightgreen

Are you sure your patch is valid for languages other than C/C++?

Note: See TracTickets for help on using tickets.