On Wed, Feb 26, 2014 at 6:00 AM, Stephan Beal <sgb...@googlemail.com> wrote:
> On Wed, Feb 26, 2014 at 6:29 AM, Doug Franklin <nutdriverle...@comcast.net > > wrote: > >> So, I'm kinda late to the party, since I only started using Fossil a year >> ago, or so. But, I'd like to throw out a suggestion: something like >> doxygen or javadoc so that the documentation and source are the same >> artifact. Knuth tried with tangle/weave, but maybe it's time to revisit >> the concept? >> > > That doesn't quite apply in this particular case. The C-level library APIs > are indeed doxygen format directly in the header files, but the scripting > engine has no native doc format (and there are no plans to > > I haven't had a chance to look at your scripting engine, but I would have thought that the scripting bindings would have been implemented with "primitives" written in C that map the scripting engine's data model to C's data model. Just curious...... PS: An example of what I mean: Years ago, I wrote bindings for a scripting engine to use a library that had a C API. I wrote a set of primitives like the following: int x_Send(Context *cx) { int port; int len; char buf[1024]; port = e_GetInt(cx, 0); // get int parameter at index 0 len = e_GetString(cx, 1, sizeof(buf), buf); // get string at 1 if (mSend(port, len, buf) == 0) { e_ReturnInt(0); // set an int return value return(e_OK); } strcpy(buf, "Send failed."); // error description - should provide useful details e_SetError(strlen(buf), buf); return(e_ERR); }
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users