Jump to content
  • entries
    654
  • comments
    2,653
  • views
    874,545

C mode file

SpiceWare

1,447 views

While working on SpiceC I discovered GCC supports 0b notation for binary values. I don't know when this occurred, but am quite pleased to see it! Before this change you could only use numbers represented in decimal, hexadecimal, and octal. At my job we use Visual Studio 2005 and 2012 for the supported and current versions of our software (V13 was developed with 2005, V14 and V15 with 2012). Neither of those versions of Visual Studio support it. We've started work on V16 and are currently in the process of figuring out issues([email protected]#$%^$#) with Visual Studio 2017 not liking our custom User Controls. I just tested VS2017 and it does support binary!

Because of this I decided to clone jEdit's mode file (syntax highlighting rules) for C and added the binary colorization rule so graphic images within binary numbers become clearer to see:


blogentry-3056-0-15286600-1520539700_thumb.png



See this blog entry for how to add the new mode file. The assembly entry for the catalog file is:

<MODE NAME="C colorized binary"         FILE="c.xml"
                                        FILE_NAME_GLOB="*.c"/>

Mode file:
c.xml.zip

Catalog file, for reference:
catalog.zip


Addendum: I was running jEdit 5.3.0. It did not support HiDPI on the Mac:


blogentry-3056-0-43836700-1521142280.png



Just realized 5.4.0 was released a year ago(!) and noticed this in the change log:

Quote

- Use new version of JarBundler that also sets LSApplicationCategoryType and
NSHighResolutionCapable. (Björn "Vampire" Kautler)

 


I wondered if that meant it now supported HiDPI, so installed the update. It does!


blogentry-3056-0-88740300-1521142275.png


Note the difference in the text quality and window buttons at the top-left. The toolbar icons are still low-def though.

 

JEDIT NAVIGATION
<PREVIOUS> <INDEX> <NEXT>

  • Like 1


8 Comments


Recommended Comments

Thanks! I figured it out about 4 years ago.

 

While I've heard of bbedit, I've never used it. I checked their site and see they do have a way to create syntax highlighting rules, so it might be possible. On this page I see:

 

 

Anyone who encounters a problem with our software (or isn’t sure if it’s working correctly), or who would like to request a feature or enhancement, should contact tech support directly for assistance.

 

so maybe contact them and include link(s) to my screenshots of jEdit in action.

  • Like 1

Share this comment


Link to comment

It honestly never occurred to me to ask the developers to add the feature. Since I paid for it, it wouldn't hurt to try, at least. :)

 

I may give jEdit a try, despite my resistance to change. Is it possible to open a file with a terminal command, opening it a running instance of the editor? That may be what I like best about BBEdit.

Share this comment


Link to comment

Should be. I just made a quick attempt, it launched jEdit but ignored any parameters and filenames. Might have to run jEdit as a parameter to java or something.

Share this comment


Link to comment

Realized I was running the prior version of jEdit, so installed the update. Didn't help with the terminal, it still ignores any parameters and filenames, but it did make the text look significantly better on my 4K monitor! See screenshots added to blog entry.

Share this comment


Link to comment

Glad to see you have the jEdit update working.

I had to jump through installing java higher than 1.6 which is what the Macs are determined to stay at.

I followed online guides and finally installed the newer java. The 1.6 is still there too.

I finally got it to show: $ java -version

java version "1.8.0_144"

Share this comment


Link to comment

jEdit 5.4.0 looks more like a standalone application.

 

The older version had either the top menu bar different or the application's toolbar different.

 

I've never mentioned it, but I know nothing about programming in C.

Share this comment


Link to comment

Hmm, I don't recall when I updated Java though I did switch from Apple's included version to Oracle's separate install soon after Apple stopped supporting it.

 

The top menu bar's tied to Utilities->Global Options->jEdit->Appearance->Swing look & feel. Set that to Mac OS X and the menu's at the top like a normal Mac program. Any other choice and the menu is attached to the window. If you look at the older jEdit screenshots I've posted you'll see I figured that out between 2006 and 2012.

 

I'm sure you'll be able to pick it up - as I pointed out to RT the basic concepts are the same, just the formatting is different.

Share this comment


Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...