Formatting C code for a document [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am working on a book containing a number of C examples. I am looking for a way I can spit the code through a processor that will give it to me with alternating grey/white lines with line numbers and b&w only syntax highlighting.
Any suggestions?
Thanks,
Alan

Are you sure you want to use MS-Word, especially for a book text? If it's not completely required, have a look at latex and packages like:
listings
minted
Alternatively if you don't want to do full, proper text layout, just find some application which does format the code and copy&paste it. Visual Studio can copy formats apparently.

Download Notepad++ then select
TextFX -> TextFX Edit -> Reindent C++ code|Indent & surround| ...| more options
To get the colors read this question
Then just paste it in your word processor.

Related

tool to visualize C sourcecode [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
It's always hard to understand new code,
especially if it is spread over many files with
hundreds of functions - like most linux kernel parts.
I think it is easier to understand the big picture if it is
visualized and if you can follow the links "with your eyes".
I am therefore looking for a tool to visualize C code,
which function is calling which one, where is the entry
and so on.
I would prefer a vscode plugin but it doesn't really matter.
Thank you in advance!
You might want to try these tools:
https://github.com/johnyf/pycflow2dot
Layout C call graphs from cflow using GraphViz dot
https://marketplace.visualstudio.com/items?itemName=joaompinto.vscode-graphviz
vscode extension for Graphviz
http://www.gson.org/egypt
egypt - a tool for making call graphs
https://kcachegrind.github.io
KCachegrind profiling tool Callgrind and the profile data visualization

Clean up a csv file in C [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there a library I can use to parse CSV files in C. I am on a Linux system. I know about this but it is in C++ and I need something in C. Don't want to go through the pain of debugging and testing if someone has already done it.
Take a look at libcsv, which is a CSV library written in ANSI C89.
There's a simple CSV parser library that's described in the excellent book The Practice of Programming by
Kernighan and Pike, and the source is available from the site linked to.
Parsing a CSV is no too much complicated, depend of the CSV structure, take a look at the strtok function.

Does anyone know an API for decoding strings like cron does in C? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm a newbie in C and i want to read a file which lines are like 30 7 * * 14-15 and parse to date structures.
So i would really use your help to find an API or an algorithm to do it.
Try to read sources, for example concerning freebsd, fetch os sources (if not aredy done as part of standart os upgrade procedure) , find cron, see sources, take what you need. It is not so unreal as seems.
Sources well documented at comments:
https://svnweb.freebsd.org/base/stable/9/usr.sbin/cron/cron/database.c?revision=225736&view=markup
UPD: link suggested in comment by #PeterT (more exactly for parsing entry):
https://svnweb.freebsd.org/base/stable/9/usr.sbin/cron/lib/entry.c?view=markup#l88

.pes file creator [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am looking into starting my own brand of clothing. I have the sample material and a logo but the embroider has asked me to provide a PES file for her to use with her Brother Embroidery Machine. I have looked into changing my .jpg or my .png file into a .pes file but i have had no luck. It looks like there is a lot more to it than a simple conversion.
My question here is would anyone be able to create a .pes file for me if i provide the logo? If not would anyone be able to point me in the right direction on how i could create it myself?
Thanks
There are quite a few programs that can do this conversion, but it usually requires a bit of know how, and usually the software is fairly expensive. Here are a couple of the more affordable products.
http://www.sandscomputing.com/id20.html
http://www.buzztools.com/buzz-2-Stitches.asp
You might want to turn the image to a more embroidery style image first, which you can do with the following:
http://www.drawstitch.com/index.php/Products/Embroidery_Effect/
Did you try Embroidermodder? It's a famous open source solution for editing digital embroidery files.
It's strange that its creator Josh Varga answered this question without pointing you to it!

Looking for Scid's opening book viewer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm trying to implement a chess bot using an opening library.
I've downloaded an opening book file (opening.bin) from Scid.
Is there a viewer utility available for download ?
Sorry for answering the question late. Basically, you should use polyglot for opening the .bin file. The .bin format is a format invented by Polyglot's author, and it makes sense to use his code to open it. Take a look of polyglot's source, book.cpp, it has everything you need even selecting a random move. Alternatively, you could study the source code for Fruit and Stockfish, both chess engines use the .bin opening books.
In general, don't ask chess questions on stackoverflow, ask on talkchess.com.

Resources