ctwill - mini indexes for cweb (again) - literate-programming

I am looking for ctwill's (literate) source code.
I did not find it in CTAN or through Knuth's page.
The links in this previous question (ftp://ftp.cs.stanford.edu/pub/ctwill/ and ftp://labrea.stanford.edu/pub/ctwill/) don't seem to work. (And the same links appear in this cweb repository, so no luck there either.)
Any help is deeply appreciated!

Actually, the repository for cweb binaries contains the source for ctwill.
The reason why this is not immediately apparent is because of how ctwill is generated. Indeed, it is a modified version of cweave, which is generated from the very source files of cweave using the changefile mechanism devised by Knuth.

Related

How to change back to code from html created by doxygen

I batch create the documents from the code by using doxygen. However, I lost code and I didn't lose the document. I want to convert the code back from the documents. Is there any option in doxygen to do this? Thank you very much.
By the way, the documents are all html files
Doxygen is a documentation generator; it's job is to go from code to documentation. As such, it has no functionality for reversing this process. Especially since the generated HTML can change from version to version.
Documentation conversion is also an inherently lossy process. Unless you outputted all of your source code into the documentation, you're not going to be able to reconstruct everything. The best you might do is rebuild most aspects of some headers, but even then, anything that goes undocumented (like header include files and such) won't be in the HTML.

How to exclude test paths from cppcheck analysis?

I try to run a cppcheck analysis over my code, which has the following file structure:
/code/module_1/src/a.cpp
/code/module_1/src/b.cpp
/code/module_1/test/c.cpp
/code/module_2/src/d.cpp
/code/module_2/src/e.cpp
/code/module_3/test/f.cpp
I'd like to run an analysis excluding all test code. Is this possible with a command like "cppcheck -itest"? It doesn't work for me, although I think it should, according to the docs:
...Directory name is matched to all parts of the path.
I'm using version 1.69. I know I could mention all test directories separately (which does work, I checked), but the number of modules is too high to do this for many analyses reasonably.
Is this possible?
I installed Cppcheck to do some tests and it seems the -i implementation is a bit bonkers. However, I managed to achieve what you want.
Solution: use -itest\ instead of -itest (this was in Windows; maybe Linux needs -itest/)
Rationale: in my tests, -itest worked only if there was a .\test\ directory, in which case even .\a\test\a.cpp was excluded. With -itest\, however, such exclusion took place regardless of the presence of .\test\ directory.
This seems like a bug which the developers ought to weed out, but, in the meantime, you can succeed using the above workaround.
This is a late response to an old question, but perhaps this will help other latecomers like myself.
Disclaimer: This answer is for Windows.
It seems as if v1.79 has remedied the OP's issue. The following command line syntax has worked for me:
cppcheck -itest code
In this example, "-itest" weeds out any occurrence of the "test" directory, as originally (and correctly) assumed by the OP. In addition, the code folder is found next to the cppcheck.exe. This will be the root of the recursive source-code scan.
I'd use something like:
cppcheck /code/module_1/src /code/module_2/src /code/module_3/src

Embedding code in Trac wiki

Is it possible to embed code to Trac wiki page straight from source code? I mean code blocks, not links pointing to the source. Like
MyCode.java contents
Look at IncludeMacro which is also able to embed from source repository (keyword source:).
Furthermore you can copy source code to wiki and format it with syntax-highlighting, for example:
{{{
#!python
hello = lambda: "world"
}}}
Read more about it here.
You're using 'code blocks' in a way that makes me think of partial citation.
As falkb pointed out, IncludeMacro is the current best way of embedding Trac (and even external) content into a Trac resource, that is rendered with support for Trac's WikiFormatting. But sadly, there is NO such partial citation capability yet.
You may want to at least request it as enhancement for the aforementioned plugin, and could even push it closer to reality by providing valid use case example - or better: some real code to make it happen. Be prepared to test code, if a patch is proposed or - ideally - if the trunk (development) branch receives changes to make partial citation happen.

Resource not found(?) while porting C++ .net code from MSVS2005 to MSVS2010

Actually I don't know if this question has already been answered because I don't know where is the "real" problem. Here is the context: I have C++ .NET code that I'm trying to port from MSVS2005 to MSVS2010, that is from .NET 2.0 to .NET 4.0. When entering in the method InitializeComponent() for one of the forms created at startup, I get a first-chance exception System.Resources.MissingManifestResourceException' occured in mscorlib.dll when calling resources->ApplyResources( this->MyControl, L"MyControl" ).
The additional information is:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MyForm.resources" was correctly embedded or linked into assembly "MyAssembly" at compile time, or that all the satellite assemblies required are loadable and fully signed.
It worked perfectly when compiled with MSVS2005.
MSVS2010 converted all the solution automatically without problem.
The .resx files are there.
Since I have no clue about the source of the problem I cannot say more. I will be more than happy to give you more info if you try to help me.
Thanks in advance for your help.
Dominique
Make sure your resx file and the namespace of the component are the same.
I've seen it before where the resx gets compiled as SomeFoo.MyForm.resources where the form is in SomeFoo.Forms.MyForm
OK, Daniel's suggestion push me toward the solution.
I looked at the properties for the .resx files in the project. All files contained no "Resource Logical Name" buth the .resx and the .fr.resx files which where the ones that could be used on my computer.
I erased the entries for the virtual file names and everything works fine since then.
Thank you!

Viewing language (C/C++) reference/documentation in CodeBlocks

My first question on StackOverflow...
Does anybody know a way of viewing the reference/documentation manual of a language through CodeBlocks? Specifically for C/C++.
Example:
Say I want to look up the reference for strncpy(). In a very old Borland system (which we use at school) I would write the word and middle-click on it, thus being taken to its reference. It would also be nice if one can browse through the manual in some way.
Have I completely overlooked this (also searching google), or is it missing?
If it's missing, what's the quickest way of searching the C and/or reference manual without being online?
Regards!
Yes, it is possible. I'm not sure about the help files themselves though.
The procedure seems to be documented here.
from the forums.
Re: F1 - help and function reference
« Reply #1 on: September 15, 2008, 02:07:59 pm »
if you have the help plugin installed, you can set help files through "Settings->Environment" and clicking on "Help files" in the list to the left.
The default file is called when pressing F1..
Logged
starmaker
Newcomer
*
Posts: 3
Re: F1 - help and function reference
« Reply #2 on: September 15, 2008, 06:57:29 pm »
You are right but is there any up do date documentation ?
Now I use MSDN or cppreference.com web pages.
Regards,
starmaker
I found the complete answer. Based on your reply EvilTech.
Here's the setup procedure for different systems:
http://wiki.codeblocks.org/index.php?title=Help_plugin
And here are the help files for C++ compiled from an online source:
http://onnerby.se/~daniel/chm/
I find it strange though that I couldn't find any other help files for C "out there". I also had problems viewing the .chm files. The list of keywords of the file are shown, but the contents of each keyword does not show. Turns out this is comes from a windows security update. The solution is to right-click on the file -> properties -> click on "unblock".
(BTW, do you mean Code::Blocks)
Having never used that, I can say anything definite, but have you tried selecting the term and pressing F1?
Why not ask this in the forums of Code::Blocks?