Skip to content
This repository has been archived by the owner on Feb 15, 2020. It is now read-only.

Potential arguable issue with comments in the generated code #5

Open
TomekBrz opened this issue Oct 10, 2014 · 2 comments
Open

Potential arguable issue with comments in the generated code #5

TomekBrz opened this issue Oct 10, 2014 · 2 comments

Comments

@TomekBrz
Copy link

So, my main point to bring up is just about the part where you comment in what character each bit of the table is producing.

When it comes to the forward-slash character, there is a risk of compiler errors on the AVR/Arduino and spark.io platform because for some bizarre reason the compiler looks at the forward slash before it looks that it is in a comment.

So the recommendations from other users has been to simply remove the forward slash, but it may be enough to simply write "forwardslash" instead of ""

[So this is not really an issue, but practically is a bit of one.]

Perhaps I should also make another issue, for another small point. I do not know if this is an issue or not. But the files I generated made something like this:
"extern const uint_8 calibri_48ptBitmaps[];"

I am not sure how types work in other situations, but for arduino code I had to change uint_8 to uint8_t. I dont know if this is an issue or a lack of programming knowledge on my end.

@pavius
Copy link
Owner

pavius commented Oct 12, 2014

Yes, this is indeed an issue. The correct way would have been to escape the forward slash (i.e. \\). TDF is no longer actively maintained so I guess this will have to be manually patched at the output.

As for the uint8_t comment - this is customizable and can be saved as part of the configuration.

@rljonesau
Copy link

rljonesau commented Dec 2, 2018

If you pull the source code, then edit line 1436 of MainForm.cs to become:

resultTextSource += String.Format("\t{{{0}{1}{2}}}, \t\t{3}'{4}'{5}" + nl,

The comment will then be produced like this: // '\' which prevents the line continuation being interpreted and shifting everything out of place by one character after the back slash!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants